Ian Lynagh [Fri, 26 Sep 2008 13:16:09 +0000 (13:16 +0000)]
Pass SRC_HC_OPTS to GHC when building GHC's Main.hs
Ian Lynagh [Fri, 26 Sep 2008 12:44:25 +0000 (12:44 +0000)]
Improve runghc docs; fixes trac #2477
Manuel M T Chakravarty [Thu, 25 Sep 2008 22:53:24 +0000 (22:53 +0000)]
Type families: fixes in flattening & finalisation
* Finalisation didn't do the right thing for equalities x ~ y, where
x was instantiated, but not zonked and y flexible (need to do y := x)
* During flattening we weren't careful enough when turning wanteds
intermediates into locals
Both bugs showed up in a small example of SPJ:
linear :: HasTrie (Basis v) => (Basis v, v)
linear = basisValue
class HasTrie a where
type family Basis u :: *
basisValue :: (Basis v,v)
basisValue = error "urk"
Ian Lynagh [Thu, 25 Sep 2008 16:56:18 +0000 (16:56 +0000)]
Fix the behaviour of flags like --help and --version; fixes trac #2620
They should override other mode flags, not conflict with them
Ian Lynagh [Thu, 25 Sep 2008 13:38:55 +0000 (13:38 +0000)]
Follow the integer package changes
Manuel M T Chakravarty [Thu, 25 Sep 2008 08:41:39 +0000 (08:41 +0000)]
Type families: fix decomposition problem
* Fixes the problem reported in
<http://www.haskell.org/pipermail/haskell-cafe/2008-July/044911.html>
Judah Jacobson [Wed, 24 Sep 2008 21:24:22 +0000 (21:24 +0000)]
Don't exit ghci if :info is called on an undefined identifier.
Ian Lynagh [Wed, 24 Sep 2008 23:05:53 +0000 (23:05 +0000)]
Fix maintainer-clean
Ian Lynagh [Wed, 24 Sep 2008 12:42:55 +0000 (12:42 +0000)]
Use -f when making the runhaskell symlink
Otherwise installation fails if runhaskell already exists.
Ian Lynagh [Wed, 24 Sep 2008 12:41:37 +0000 (12:41 +0000)]
Use -perm -100 rather than -perm /a+x when looking for executable files
/a+x doesn't work on some Solaris and OS X machines. Spotted by
Christian Maeder.
Ian Lynagh [Wed, 24 Sep 2008 12:33:23 +0000 (12:33 +0000)]
Use $(FIND) rather than find, as the former may be gfind
Ian Lynagh [Wed, 24 Sep 2008 12:30:46 +0000 (12:30 +0000)]
Look for gfind as well as find
Ian Lynagh [Wed, 24 Sep 2008 12:25:58 +0000 (12:25 +0000)]
In configure, don't call FPTOOLS_HADDOCK
We now use the in-tree haddock, so we don't need to look for it.
Ian Lynagh [Wed, 24 Sep 2008 12:17:59 +0000 (12:17 +0000)]
Use $(TAR) rather than tar
Fixes problems on Solaris, where we need to use gtar instead of tar
Ian Lynagh [Wed, 24 Sep 2008 12:09:40 +0000 (12:09 +0000)]
Add $(strip) to a Makefile test
Fixes making bindists on solaris. Patch from Christian Maeder.
Ian Lynagh [Wed, 24 Sep 2008 12:08:40 +0000 (12:08 +0000)]
Use test -f rather than test -e, for portability (Solaris)
Ian Lynagh [Tue, 23 Sep 2008 20:57:55 +0000 (20:57 +0000)]
Remove some dependencies on bootstrapping.conf from libraries/Makefile
They were causing some unnecessary work:
Running make in a built tree reregisters the GHC package in
bootstrapping.conf, and the build system thought that this updated
timestamp meant that the configure stamps were out of date. This is
particularly bad for the libraries with configure scripts, as those
take a while to run.
The bootstrapping.conf is built in an earlier phase ("make boot") so
one shouldn't rely on the dependencies anyway.
Ian Lynagh [Tue, 23 Sep 2008 16:56:13 +0000 (16:56 +0000)]
Bump the version number to 6.11
Thomas Schilling [Sun, 21 Sep 2008 08:56:47 +0000 (08:56 +0000)]
Generalise type of 'defaultErrorHandler' so it can be used inside a Ghc session.
Ian Lynagh [Sun, 21 Sep 2008 11:15:08 +0000 (11:15 +0000)]
Make "sh -e boot" work
Ian Lynagh [Sun, 21 Sep 2008 11:14:36 +0000 (11:14 +0000)]
Use -f rather than -e for portability
Ian Lynagh [Sun, 21 Sep 2008 00:04:06 +0000 (00:04 +0000)]
Add some special cases for putting dph in bindists
Ian Lynagh [Sat, 20 Sep 2008 23:29:45 +0000 (23:29 +0000)]
Escape a hash in the Makefile (it was breaking source dist creation)
Simon Marlow [Tue, 23 Sep 2008 17:39:04 +0000 (17:39 +0000)]
Disallow package flags in OPTIONS_GHC pragmas (#2499)
Simon Marlow [Tue, 23 Sep 2008 14:49:56 +0000 (14:49 +0000)]
#2566: emit a warning for 'ghc -c foo.bar'
$ ghc -c foo.bar
Warning: the following files would be used as linker inputs, but linking is not being done: foo.bar
ghc: no input files
Usage: For basic information, try the `--help' option.
Simon Marlow [Mon, 22 Sep 2008 21:09:15 +0000 (21:09 +0000)]
Fix to new executable allocation code (fixed print002 etc.)
The problem here is caused by the fact that info tables include a
relative offset to the string naming the constructor. Executable
memory now resides at two places in the address space: one for writing
and one for executing. In the info tables generated by GHCi, we were
calculating the offset relative to the writable instance, rather than
the executable instance, which meant that the GHCi debugger couldn't
find the names for constructors it found in the heap.
Simon Marlow [Mon, 22 Sep 2008 15:28:27 +0000 (15:28 +0000)]
clean sm/Evac_thr.c and sm/Scav_thr.c
Simon Marlow [Mon, 22 Sep 2008 15:23:40 +0000 (15:23 +0000)]
add -XNewQualifiedOperators (Haskell' qualified operator syntax)
simonpj@microsoft.com [Sat, 20 Sep 2008 21:20:10 +0000 (21:20 +0000)]
Fix Trac #2597 (first bug): correct type checking for empty list
The GHC front end never generates (ExplicitList []), but TH can.
This patch makes the typechecker robust to such programs.
simonpj@microsoft.com [Sat, 20 Sep 2008 21:11:01 +0000 (21:11 +0000)]
Fix Trac #2597 (second bug): complain about an empty DoE block
When converting an empty do-block from TH syntax to HsSyn,
complain rather than crashing.
Ian Lynagh [Sat, 20 Sep 2008 18:35:34 +0000 (18:35 +0000)]
Update dependencies
Ian Lynagh [Sat, 20 Sep 2008 16:29:18 +0000 (16:29 +0000)]
Fix building with GHC 6.6
Ian Lynagh [Sat, 20 Sep 2008 01:06:35 +0000 (01:06 +0000)]
Remove fno-method-sharing from the list of static flags
It is now a dynamic flag
simonpj@microsoft.com [Sat, 20 Sep 2008 17:52:38 +0000 (17:52 +0000)]
Tidy up the treatment of dead binders
This patch does a lot of tidying up of the way that dead variables are
handled in Core. Just the sort of thing to do on an aeroplane.
* The tricky "binder-swap" optimisation is moved from the Simplifier
to the Occurrence Analyser. See Note [Binder swap] in OccurAnal.
This is really a nice change. It should reduce the number of
simplifier iteratoins (slightly perhaps). And it means that
we can be much less pessimistic about zapping occurrence info
on binders in a case expression.
* For example:
case x of y { (a,b) -> e }
Previously, each time around, even if y,a,b were all dead, the
Simplifier would pessimistically zap their OccInfo, so that we
can't see they are dead any more. As a result virtually no
case expression ended up with dead binders. This wasn't Bad
in itself, but it always felt wrong.
* I added a check to CoreLint to check that a dead binder really
isn't used. That showed up a couple of bugs in CSE. (Only in
this sense -- they didn't really matter.)
* I've changed the PprCore printer to print "_" for a dead variable.
(Use -dppr-debug to see it again.) This reduces clutter quite a
bit, and of course it's much more useful with the above change.
* Another benefit of the binder-swap change is that I could get rid of
the Simplifier hack (working, but hacky) in which the InScopeSet was
used to map a variable to a *different* variable. That allowed me
to remove VarEnv.modifyInScopeSet, and to simplify lookupInScopeSet
so that it doesn't look for a fixpoint. This fixes no bugs, but
is a useful cleanup.
* Roman pointed out that Id.mkWildId is jolly dangerous, because
of its fixed unique. So I've
- localied it to MkCore, where it is private (not exported)
- renamed it to 'mkWildBinder' to stress that you should only
use it at binding sites, unless you really know what you are
doing
- provided a function MkCore.mkWildCase that emodies the most
common use of mkWildId, and use that elsewhere
So things are much better
* A knock-on change is that I found a common pattern of localising
a potentially global Id, and made a function for it: Id.localiseId
Ian Lynagh [Fri, 19 Sep 2008 17:46:51 +0000 (17:46 +0000)]
Gix the ghcii script
The ghc executable name doesn't have a version number on Windows, so
don't put one in the script.
Ian Lynagh [Fri, 19 Sep 2008 15:30:10 +0000 (15:30 +0000)]
Create runhaskell as well as runghc
Simon Marlow [Fri, 19 Sep 2008 13:46:02 +0000 (13:46 +0000)]
On Linux use libffi for allocating executable memory (fixed #738)
Simon Marlow [Fri, 19 Sep 2008 10:26:01 +0000 (10:26 +0000)]
Move the context_switch flag into the Capability
Fixes a long-standing bug that could in some cases cause sub-optimal
scheduling behaviour.
Ian Lynagh [Fri, 19 Sep 2008 13:35:55 +0000 (13:35 +0000)]
Fix building the extralibs tarball
We now need to dig the appropriate lines out of packages, rather than
just catting libraries/extra-packages, in order to find out what the
extralibs are.
Ian Lynagh [Fri, 19 Sep 2008 13:03:32 +0000 (13:03 +0000)]
Install libffi when installing frmo a bindist
Ian Lynagh [Fri, 19 Sep 2008 12:55:28 +0000 (12:55 +0000)]
Fix how we put libffi into bindists
Ian Lynagh [Fri, 19 Sep 2008 11:58:31 +0000 (11:58 +0000)]
Don't require Parser.y in a source dist
Ian Lynagh [Fri, 19 Sep 2008 11:58:16 +0000 (11:58 +0000)]
Add HpcParser.hs to source dists
Ian Lynagh [Fri, 19 Sep 2008 11:25:22 +0000 (11:25 +0000)]
Fix the list of generated files that need to go into the source dists
simonpj@microsoft.com [Fri, 19 Sep 2008 09:31:47 +0000 (09:31 +0000)]
Improve documentation of overlapping instances
Ian Lynagh [Thu, 18 Sep 2008 19:44:24 +0000 (19:44 +0000)]
Put generated files in source dists
We don't want to require that users building source dists have alex/happy
Ian Lynagh [Thu, 18 Sep 2008 19:01:16 +0000 (19:01 +0000)]
Add libraries/syb to .darcs-boring
pepe [Thu, 18 Sep 2008 12:21:33 +0000 (12:21 +0000)]
Fix a couple of issues with :print
- Ticket #1995: Unsoundness with newtypes
- Ticket #2475: "Can't unify" error when stopped at an exception
In addition this patch adds the following:
- Unfailingness: RTTI cannot panic anymore.
In case of failure, it recovers gracefully by returning the "I know nothing" type
- A -ddump-rtti flag
pepe [Fri, 18 Apr 2008 17:23:03 +0000 (17:23 +0000)]
wibble
Chaddai Fouche [Thu, 18 Sep 2008 16:52:56 +0000 (16:52 +0000)]
RichTokenStream support
This patch adds support for raw token streams, that contain more
information than normal token streams (they contains comments at
least). The "lexTokenStream" function brings this support to the
Lexer module. In addition to that, functions have been added to
the GHC module to make easier to recover of the token stream of
a module ("getTokenStream").
Building on that, I added what could be called "rich token
stream": token stream to which have been added the source string
corresponding to each token, the function addSourceToToken takes
a StringBuffer and a starting SrcLoc and a token stream and build
this rich token stream. getRichTokenStream is a convenience
function to get a module rich token stream. "showRichTokenStream"
use the SrcLoc information in such a token stream to get a string
similar to the original source (except unsignificant
whitespaces). Thus "putStrLn . showRichTokenStream =<<
getRichTokenStream s mod" should print a valid module source, the
interesting part being to modify the token stream between the get
and the show of course.
Ian Lynagh [Thu, 18 Sep 2008 14:33:12 +0000 (14:33 +0000)]
When passing gcc -B, also tell it where the mingw include directory is
Ian Lynagh [Thu, 18 Sep 2008 14:31:18 +0000 (14:31 +0000)]
Don't put the mingw directory in RTS's package.conf
Ian Lynagh [Thu, 18 Sep 2008 13:44:43 +0000 (13:44 +0000)]
Be more forceful when cleaning in compiler/ and ghc/
Now that the Cabal file is generated by configure, it would be nice
if clean worked even if the cabal file is missing. So now we just rm -rf
the dist directory.
Ian Lynagh [Thu, 18 Sep 2008 13:36:36 +0000 (13:36 +0000)]
Generate ghc.cabal and ghc-bin.cabal with configure
This allows us to put the proper version number into them
Ian Lynagh [Thu, 18 Sep 2008 12:25:16 +0000 (12:25 +0000)]
Make the ghci scripts point to the versioned GHC program, not just "ghc"
simonpj@microsoft.com [Thu, 18 Sep 2008 16:17:19 +0000 (16:17 +0000)]
Fix Trac #1470: improve handling of recursive instances (needed for SYB3)
This bug has been hanging around for a long time, as you'll see by its
number. The fix implements a feature that is really needed by SYB3, to
allow an instance to (rather indirectly) refer to itself. The trickiness
comes when solving the superclass constraints.
The whoel issue is explained in Note [Recursive instances and superclases]
in TcSimplify.
In cracking this one I found I could remove the WantSCs argument to the
ReduceMe flag, which is a worthwhile simplification. Good!
simonpj@microsoft.com [Thu, 18 Sep 2008 15:56:02 +0000 (15:56 +0000)]
Comments only
simonpj@microsoft.com [Thu, 18 Sep 2008 15:52:45 +0000 (15:52 +0000)]
Replace ASSERT with WARN, and explain why
The DPH library tripped an ASSERT. The code is actually OK, but it's
badly-optimised so I changed it to WARN. The issue here is explained
in ClosureInfo, Note [Unsafe coerce complications].
simonpj@microsoft.com [Thu, 18 Sep 2008 15:51:44 +0000 (15:51 +0000)]
Add a missing "prime" (env' --> env'') thereby fixing a tripping WARN. Hurrah!
simonpj@microsoft.com [Wed, 17 Sep 2008 16:29:10 +0000 (16:29 +0000)]
Fix nasty infelicity: do not short-cut empty substitution in the simplifier
I was perplexed about why an arity-related WARN was tripping. It took
me _day_ (sigh) to find that it was because SimplEnv.substExpr was taking
a short cut when the substitution was empty, thereby not subsituting for
Ids in scope, which must be done (CoreSubst Note [Extending the Subst]).
The fix is a matter of deleting the "optimisation". Same with
CoreSubst.substSpec, although I don't know if that actually caused a
probem.
simonpj@microsoft.com [Wed, 17 Sep 2008 16:27:04 +0000 (16:27 +0000)]
Avoid arity reduction when doing eta-reduce
We like things with high arity, so when doing eta reduction
it's probably a good idea to avoid reducing arity.
simonpj@microsoft.com [Wed, 17 Sep 2008 16:24:34 +0000 (16:24 +0000)]
Add extra WARN test
This warning tests that the arity of a function does not decrease.
And that it's at least as great as the strictness signature.
Failing this test isn't a disater, but it's distinctly odd and
usually indicates that not enough information is getting propagated
around, and hence you may get more simplifier iterations.
simonpj@microsoft.com [Wed, 17 Sep 2008 16:23:50 +0000 (16:23 +0000)]
Comments only
simonpj@microsoft.com [Wed, 17 Sep 2008 16:19:20 +0000 (16:19 +0000)]
Re-adjust interaction between -ddump flags and force-recompilation
If you say -ddump-xx we effectively add -fforce-recomp, so that you
see your dump output. But this works badly in --make mode, because
you get the ddump output for every module, which is probably not what
you want. This patch forces recompilation with -ddump-X only in one-shot
mode.
Of course, this only affects people using -ddump options.
simonpj@microsoft.com [Wed, 17 Sep 2008 16:18:47 +0000 (16:18 +0000)]
Add Outputable GhcMode instance
simonpj@microsoft.com [Wed, 17 Sep 2008 13:51:04 +0000 (13:51 +0000)]
Improve error reporting for 'deriving' (Trac #2604)
simonpj@microsoft.com [Tue, 16 Sep 2008 09:45:21 +0000 (09:45 +0000)]
Add link to GADT paper re rigid types
Simon Marlow [Thu, 18 Sep 2008 11:28:56 +0000 (11:28 +0000)]
Fix MacOS X build: don't believe __GNUC_GNU_INLINE__ on MacOS X
Simon Marlow [Thu, 18 Sep 2008 11:28:12 +0000 (11:28 +0000)]
require Alex version 2.1.0
Having 2.0.1 causes some unicode tests to fail
Manuel M T Chakravarty [Thu, 18 Sep 2008 10:09:34 +0000 (10:09 +0000)]
Type families: fixes in the new solver
Tim Chevalier [Thu, 18 Sep 2008 09:03:49 +0000 (09:03 +0000)]
ext-core library: Parser fixes; make it build with the HEAD
In the ext-core parser I guess I never tested:
* existential type variable bindings in case alts
* empty data declarations
That'll learn me!
Ian Lynagh [Wed, 17 Sep 2008 21:08:13 +0000 (21:08 +0000)]
Wibble ghc-pkg imports to fix building on Windows
Ian Lynagh [Wed, 17 Sep 2008 19:21:55 +0000 (19:21 +0000)]
ghc-pkg needs to make package.conf with sensible permissions
It was calling openTempFile which uses a 600 permissions mask.
Thomas Schilling [Wed, 17 Sep 2008 10:29:25 +0000 (10:29 +0000)]
Change 'loadWithCompiler' callback argument to just print warnings.
Rename function accordingly.
The callback wasn't very flexible to begin with. There's pretty much
no way around to calling 'compile' inside that callback since
'upsweep' depends on certain side effects of compile. It therefore
makes more sense to restrict the callback to its intended use only,
namely to log warnings and errors.
Simon Marlow [Wed, 17 Sep 2008 08:59:17 +0000 (08:59 +0000)]
Fix: GhcStage2HcOpts were being added to stage 3 too
Manuel M T Chakravarty [Wed, 17 Sep 2008 06:25:48 +0000 (06:25 +0000)]
Type families: unify with family apps in checking mode
Manuel M T Chakravarty [Tue, 16 Sep 2008 15:12:54 +0000 (15:12 +0000)]
Type families: bug fixes
Manuel M T Chakravarty [Tue, 16 Sep 2008 07:57:00 +0000 (07:57 +0000)]
Keep sysnonyms folded in equalities if possible
Manuel M T Chakravarty [Tue, 16 Sep 2008 05:51:36 +0000 (05:51 +0000)]
Type families: apply flattening coercions in the right order
Manuel M T Chakravarty [Mon, 15 Sep 2008 03:14:23 +0000 (03:14 +0000)]
TcTyFuns: tidy warning
Manuel M T Chakravarty [Mon, 15 Sep 2008 03:01:18 +0000 (03:01 +0000)]
Signature for Inst.isValidWantedEqInst
Manuel M T Chakravarty [Sun, 14 Sep 2008 16:36:39 +0000 (16:36 +0000)]
Remember if RewriteInst is swapped & bug fixes
Manuel M T Chakravarty [Sun, 14 Sep 2008 12:06:38 +0000 (12:06 +0000)]
Type families: fixed all non-termination in the testsuite
Manuel M T Chakravarty [Sat, 13 Sep 2008 13:36:31 +0000 (13:36 +0000)]
Type families: completed the new equality solver
- Implements normalisation of class constraints containing synonym family
applications or skolems refined by local equalities.
- Clean up of TcSimplify.reduceContext by using the new equality solver.
- Removed all the now unused code of the old algorithm.
- This completes the implementation of the new algorithm, but it is largely
untested => many regressions.
Ian Lynagh [Tue, 16 Sep 2008 22:00:57 +0000 (22:00 +0000)]
Use the new -optdep flag replacements when building with >= GHC 6.9
Fix building the HEAD with itself
Ian Lynagh [Mon, 15 Sep 2008 10:02:17 +0000 (10:02 +0000)]
Use "exec" when running ghc in the wrapper
Ian Lynagh [Sun, 14 Sep 2008 15:35:07 +0000 (15:35 +0000)]
Add "#!/bin/sh" to runghc.wrapper
Ian Lynagh [Sun, 14 Sep 2008 15:33:44 +0000 (15:33 +0000)]
Add a "#!/bin/sh" to ghc.wrapper
andygill@ku.edu [Tue, 16 Sep 2008 17:23:13 +0000 (17:23 +0000)]
Fixing directory creation to not create "" directories inside hpc report (harmless but needless)
andygill@ku.edu [Tue, 16 Sep 2008 03:05:21 +0000 (03:05 +0000)]
Fix Trac #2052 Allowing hpc to understand hsc files.
andygill@ku.edu [Mon, 15 Sep 2008 20:43:22 +0000 (20:43 +0000)]
Fix Trac #2311: creates subdirs for package coverage information
Simon Marlow [Tue, 16 Sep 2008 13:22:22 +0000 (13:22 +0000)]
FIX #2469: sort out our static/extern inline story
gcc has changed the meaning of "extern inline" when certain flags are
on (e.g. --std=gnu99), and this broke our use of it in the header
files.
Simon Marlow [Tue, 16 Sep 2008 13:09:22 +0000 (13:09 +0000)]
Fix a warning
Simon Marlow [Mon, 15 Sep 2008 14:59:24 +0000 (14:59 +0000)]
Stop using mremap() to allocate space for trampolines
This was causing problems because sometimes mremap() moved the memory
we had allocated from the low 2Gb to above the 2Gb boundary, causing
some linkages to fail. There's no MAP_32BIT flag to mremap().
So now we just use mmap(MAP_ANON|MAP_32BIT) to allocated space for the
trampolines. People without MAP_32BIT (eg. *BSD) will still have to
do something else here, such as allocating memory from a fixed
address; so I've made it slightly easier for those guys, but there's
still work to do (#2063).
One solution (that Simon PJ is advocating) is to turn on -fPIC by
default on x86-64. This is a good solution as it removes the need for
MAP_32BIT, but doesn't work with -fvia-C, so probably this is for
later.
Simon Marlow [Fri, 12 Sep 2008 15:55:49 +0000 (15:55 +0000)]
add $(GhcStage[123]HcOpts)
Roman Leshchinskiy [Tue, 16 Sep 2008 03:47:46 +0000 (03:47 +0000)]
Improve handling of -fdph-* flags
Roman Leshchinskiy [Tue, 16 Sep 2008 03:37:10 +0000 (03:37 +0000)]
Add -fdph-this
Roman Leshchinskiy [Tue, 16 Sep 2008 03:34:28 +0000 (03:34 +0000)]
Remove last traces of package ndp
Roman Leshchinskiy [Tue, 16 Sep 2008 01:32:36 +0000 (01:32 +0000)]
Clean up vectorisation error messages
Roman Leshchinskiy [Mon, 15 Sep 2008 04:28:23 +0000 (04:28 +0000)]
Fix vectoriser bug
We were using mkWildId in situations where it cause disastrous shadowing