| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
| |
Make GHC.depanal store the module graph in the session again. Fixes
ghc -M.
|
|
|
|
| |
Make more error messages from the downsweep into ErrMsg exceptions.
|
|
|
|
| |
oops, fix updating the module graph
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix some reporting of errors in the GHC API: errors during the
downsweep were thrown as exceptions; now they're reported via the
(Messages->IO ()) callback in the same way as other errors.
getModuleInfo no longer prints anything on stdout. It does ignore
error messages and return Nothing, however - we should fix this and
return the error messages at some point.
The ErrMsg type can now be thrown as an exception. This can be a
convenient alternative if collecting multiple error messages isn't
required. We do this in the downsweep now.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MERGE TO STABLE
Put back in a missing case for higher-rank types. When the
definition is
a) non-recursive
b) a function binding
c) lacks a type signature
we want to *infer* a perhaps-higher-rank type for the RHS,
before making a monomorphically-typed Id for the LHS.
E.g. f = \(x :: forall a. a->a) -> (x True, x 'c')
This case got lost in the transition to 6.4
tc194 tests it
|
|
|
|
| |
isObjectLinkable: don't return True for an empty linkable
|
|
|
|
| |
If hsc_lang is HscNothing, produce an empty linkable.
|
|
|
|
| |
Don't write the interface in JustTypecheck mode
|
|
|
|
| |
Yet another wibble to the GHCi top-level interaction story; avoid dup error messages
|
|
|
|
| |
rename exportsFromAvail
|
|
|
|
|
|
|
| |
Further GHCi wibbles
a) Don't print the value of a 'let'
b) Only one error message for 'print id'
|
|
|
|
| |
Dead code (HEAD only)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix what "standard class" means
MERGE to STABLE
The Report's definition of defaulting (Section 4.3.4) defines a "standard class" to be
one defined by the Prelude or a standard library. GHC was omitting the "..or a standard
library" part; and it even omitted the Prelude classes Monad and Functor.
This commit fixes the bug by adding
Random, RandomGen,
Monad, MonadPlus, Functor
to the classes defined as "standard".
|
|
|
|
| |
Comments and type sig only
|
|
|
|
| |
Track new semantics of splitLongestPrefix; fixes -main-is bug
|
|
|
|
| |
Clarify code for splitLongestPrefix; no effect on behaviour
|
|
|
|
|
| |
needsCDecl: remove extra equation for CaseLabel, which was overlapped
(and wrong!).
|
|
|
|
|
|
|
|
| |
Warning police: Removed overlapped patterns. In general, taking
compiler warnings about unmatched patterns seriously when they come up
later might be better than writing catch-all patterns right from the
start. Otherwise readers are confused and wonder which patterns might
be missing when there are none.
|
|
|
|
|
| |
Warning police: Removed an overlapped catch-all pattern (which could
really never match due to genprimopcode)
|
|
|
|
| |
Warning police: Use non-deprecated form of "foreign import"
|
|
|
|
| |
Further wibble to preceding GHCi commit
|
|
|
|
| |
Wibble to preceding GHCi commit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Improve the GHCi interaction
Merge to STABLE?
This fix addresses Sourceforge #1156554 "GHCi: No instance for (Show (IO ()))",
and simultaneously improves the top-level interaction in two other ways:
- Only one error can show up (previously there could be two)
- If an I/O action gives a Showable result, the result is printed
(provided it isn't ()). So
prompt> return 4
prints 4, rather than nothing
- For command-line 'let' and 'x<-e' forms, if exactly one variable
is bound, we print its value if it is Showable and not ()
prompt> let x = 4
4
prompt> x <- return 5
5
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Liberalise the defaulting rules for GHCi
Merge to STABLE?
The H98 defaulting rules are these. Group constraints of the form (C v),
for some particular type variable v. Then default v if
a) v appears only in this group (no implicit params or D [v])
b) at least one of the C's is numeric
c) all the C's are standard
GHCi changed rules (b) to
(b') at least one of the C's is numeric, or Eq,Ord,Show
This commit further liberalises GHCi to change (c):
(c') any of the C's are standard
Otherwise the existence of a non-standard class (e.g. Random) is enough
to kill defaulting altogether.
|
|
|
|
| |
Comments only
|
|
|
|
| |
SMP: omit the -pthread flag on Windows
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Tune up the reporting of unused imports
Merge to STABLE
(I think the earlier change made it across)
(PS: the commit also does some trimming of
redundant imports. If they don't merge, just
discard them.)
My earlier fixes to the reporting of unused imports still missed
some obscure cases, some of which are now fixed by this commit.
I had to make the import-provenance data type yet richer, but in
fact it has more sharing now, so it may be cheaper on space.
There's still one infelicity. Consider
import M( x )
imoprt N( x )
where the same underlying 'x' is involved in both cases. Currently we
don't report a redundant import, because dropping either import would
change the qualified names in scope (M.x, N.x). But if the qualified
names aren't used, the import is indeed redundant. Sadly we don't know
that, because we only know what Names are used. Left for the future!
There's a comment in RnNames.warnDuplicateImports
This commit also trims quite a few redundant imports disovered
by the new setup.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Catch an exception in Template Haskell code
Merge to STABLE
If the code run by a Template Haskell splice fails with, say,
a pattern-match failure, we should not report it as a GHC panic.
It's a bug in the user's program.
This commit fixes up the exception handling to do the right thing.
Fixes SourceForge item #1201666
TH_fail tests it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make sure the default methods are in scope
in a Template Haskell splice
Merge to STABLE
This was just a typo really; in TcRnDriver.tcTopSrcDecls there were two
tcl_envs, but one had a different name so we got the less up-to-date one.
Fixes SourceForge item #1194808
TH_spliceInst tests it.
|
|
|
|
|
| |
We should be using ASSIGN_DBL/PK_DBL for stores/loads respectively of
doubles. Hopefully fixes SIGBUS on HPPA, and possible Sparc too.
|
|
|
|
| |
revert rev. 1.71
|
|
|
|
|
| |
Use constructor functions instead of stginit functions on Win32, too.
(stginit functions are still used for profiling)
|
|
|
|
| |
more import fixing
|
|
|
|
| |
import fix
|
|
|
|
|
|
| |
closureDescription: remove duplicate module name for external names,
and include the unique for local names. This makes profiling with -hd
more uesful.
|
|
|
|
| |
remove duplicate export
|
|
|
|
| |
Add showSDocDump
|
|
|
|
|
|
| |
Profiling: the type_descr and closure_descr were the wrong way around,
so +RTS -hy behaves like +RTS -hd, and vice-versa. How on earth that
happened I have no idea.
|
|
|
|
|
|
|
|
|
|
| |
Improve source locations on error messages from the downsweep. We now
keep track of SrcSpans from import declarations, so we can report a
proper source location for unknown imports (this improves on the
previous hacky solution of keeping track of the filename that
contained the original import declaration).
ModSummary now contains (Located Module) for each import instead of Module.
|
|
|
|
| |
Further tweaks to the filename handling.
|
|
|
|
|
|
| |
Rationalise the filename handling in a few places, taking some bits
from the defunct System.FilePath library. Also fixes a bug I recently
introduced in replaceFilenameDirectory.
|
|
|
|
| |
replaceFilenameSuffix: fix
|
|
|
|
| |
Add modInfoInstances
|
|
|
|
| |
More commentary
|
|
|
|
| |
expand comment
|
|
|
|
|
|
| |
Bugfix to previous commit: filenames without an extension are assumed
to be a haskell source filenames with the extension removed (eg. ghc
--make hello should compile hello.hs).
|
|
|
|
| |
small cleanup: use joinFileExt
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement -x <suffix> flag to override the suffix of a filename for
the purposes of determinig how it should be compiled. The usage is
similar to gcc, except that we just use a suffix rather than a name
for the language. eg.
ghc -c -x hs hello.blah
will pretend hello.blah is a .hs file. Another possible use is -x
hspp, which skips preprocessing.
This works for one-shot compilation, --make, GHCi, and ghc -e. The
original idea was to make it possible to use runghc on a file that
doesn't end in .hs, so changes to runghc will follow.
Also, I made it possible to specify .c files and other kinds of files
on the --make command line; these will be compiled to objects as
normal and linked into the final executable.
GHC API change: I had to extend the Target type to include an optional
start phase, and also GHC.guessTarget now takes a (Maybe Phase) argument.
I thought this would be half an hour, in fact it took half a day, and
I still haven't documented it. Sigh.
|
|
|
|
| |
added modInfoIsExportedName & modInfoLookupName functions
|
|
|
|
| |
Better debug-printing for -ddump-inlinings
|