Clemens Fruhwirth [Mon, 31 Dec 2007 17:07:15 +0000 (17:07 +0000)]
More verbose error reporting in mk/target.mk
Ian Lynagh [Tue, 15 Jan 2008 20:47:16 +0000 (20:47 +0000)]
Fix generating dependencies for different ways now we use FilePath
We were making filenames like
dist/build/GHC/Base.p_.o
rather than
dist/build/GHC/Base.p_o
mainland@eecs.harvard.edu [Mon, 14 Jan 2008 19:05:30 +0000 (19:05 +0000)]
Fix utils/Util for debug build
Ian Lynagh [Mon, 14 Jan 2008 11:50:31 +0000 (11:50 +0000)]
Give an error if view pattern syntax is used in an expression; fixes #2033
Roman Leshchinskiy [Tue, 15 Jan 2008 05:18:44 +0000 (05:18 +0000)]
FIX BUILD (Solaris): include fcntl.h for file operations
Manuel M T Chakravarty [Tue, 15 Jan 2008 01:50:14 +0000 (01:50 +0000)]
Fix warning when USE_READLINE is unset
Ian Lynagh [Mon, 14 Jan 2008 10:39:53 +0000 (10:39 +0000)]
Remove an extra ) that was breaking the build on Windows
Ian Lynagh [Sun, 13 Jan 2008 15:00:17 +0000 (15:00 +0000)]
Fix warnings in utils/ListSetOps
Ian Lynagh [Sun, 13 Jan 2008 14:29:39 +0000 (14:29 +0000)]
Fix warnings in utils/Panic
Ian Lynagh [Sun, 13 Jan 2008 14:26:04 +0000 (14:26 +0000)]
Fix warnings in utils/UniqSet
Ian Lynagh [Sun, 13 Jan 2008 14:23:47 +0000 (14:23 +0000)]
Fix warnings in utils/Maybes
Ian Lynagh [Sun, 13 Jan 2008 14:16:30 +0000 (14:16 +0000)]
Fix warnings in utils/BufWrite
Ian Lynagh [Sun, 13 Jan 2008 14:16:12 +0000 (14:16 +0000)]
Fix warnings in utils/FastTypes
Split off a FastBool module, to avoid a circular import with Panic
Ian Lynagh [Sun, 13 Jan 2008 13:20:42 +0000 (13:20 +0000)]
Fix warnings in utils/OrdList
Ian Lynagh [Sun, 13 Jan 2008 13:18:30 +0000 (13:18 +0000)]
Fix warnings in utils/FastMutInt
Ian Lynagh [Sun, 13 Jan 2008 13:16:58 +0000 (13:16 +0000)]
Fix warnings in utils/State
Ian Lynagh [Sun, 13 Jan 2008 12:41:07 +0000 (12:41 +0000)]
Only initialise readline if we are connected to a terminal
Patch from Bertram Felgenhauer <int-e@gmx.de>
Ian Lynagh [Sun, 13 Jan 2008 00:58:32 +0000 (00:58 +0000)]
Fix warnings in utils/Util
Ian Lynagh [Sun, 13 Jan 2008 00:20:37 +0000 (00:20 +0000)]
Fix warnings in utils/Bag.lhs
Ian Lynagh [Sat, 12 Jan 2008 23:42:15 +0000 (23:42 +0000)]
Add GMP_INCLUDE_DIRS in a couple of places
Fixes the build on OpenBSD (trac #2009). Based on a patch from kili.
Ian Lynagh [Sat, 12 Jan 2008 18:57:53 +0000 (18:57 +0000)]
Tweak whitespace in HsExpr
Ian Lynagh [Sat, 12 Jan 2008 18:14:44 +0000 (18:14 +0000)]
Fix warnings in HsExpr
Ian Lynagh [Sat, 12 Jan 2008 17:28:37 +0000 (17:28 +0000)]
FilePath fixes
Ian Lynagh [Sat, 12 Jan 2008 15:54:13 +0000 (15:54 +0000)]
don't initialize readline needlessly
Readline.initialize spills some escape sequences to stdout for some terminal
types, potentially spoiling ghc -e output. So don't initialize readline
unless we're working interactively on a terminal.
Patch from Bertram Felgenhauer <int-e@gmx.de>
Ian Lynagh [Sat, 12 Jan 2008 15:52:14 +0000 (15:52 +0000)]
Fix whitespace
Ian Lynagh [Sat, 12 Jan 2008 15:44:59 +0000 (15:44 +0000)]
Use System.FilePath
judah.jacobson@gmail.com [Thu, 10 Jan 2008 22:19:28 +0000 (22:19 +0000)]
Fix filename completion by adding trailing spaces/slashes manually.
judah.jacobson@gmail.com [Wed, 9 Jan 2008 00:36:06 +0000 (00:36 +0000)]
Use command-dependent word break characters for tab completion in ghci. Fixes bug #998.
simonpj@microsoft.com [Thu, 10 Jan 2008 11:31:33 +0000 (11:31 +0000)]
Fix 2030: make -XScopedTypeVariables imply -XRelaxedPolyRec
The type checker doesn't support lexically scoped type variables
unless we are using the RelaxedPolyRec option. Reasons: see
Note [Scoped tyvars] in TcBinds.
So I've changed DynFlags to add this implication, improved the
documentation, and simplified the code in TcBinds somewhat.
(It's longer but only because of comments!)
Roman Leshchinskiy [Wed, 9 Jan 2008 02:37:47 +0000 (02:37 +0000)]
More refactoring in getCoreToDo
Roman Leshchinskiy [Wed, 9 Jan 2008 02:28:22 +0000 (02:28 +0000)]
Document -fsimplifier-phases
Roman Leshchinskiy [Wed, 9 Jan 2008 02:24:49 +0000 (02:24 +0000)]
Add -fsimplifier-phases option
It controls the number of simplifier phases run during optimisation. These are
numbered from n to 1 (by default, n=2). Phase 0 is always run regardless of
this flag. The flag is ignored with -O0 since (practically) no optimisation is
performed in that case.
Roman Leshchinskiy [Wed, 9 Jan 2008 01:43:59 +0000 (01:43 +0000)]
Refactor getCoreToDo slightly
simonpj@microsoft.com [Mon, 7 Jan 2008 14:26:01 +0000 (14:26 +0000)]
Fix Trac #2018: float-out was ignoring the kind of a coercion variable
The float-out transformation must handle the case where a coercion
variable is free, which in turn mentions type variables in its kind.
Just like a term variable really.
I did a bit of refactoring at the same time.
Test is tc241
MERGE to stable branch
simonpj@microsoft.com [Mon, 7 Jan 2008 14:23:06 +0000 (14:23 +0000)]
Make the treatment of equalities more uniform
This patch (which is part of the fix for Trac #2018) makes coercion variables
be handled more uniformly. Generally, they are treated like dictionaries
in the type checker, not like type variables, but in a couple of places we
were treating them like type variables. Also when zonking we should use
zonkDictBndr not zonkIdBndr.
simonpj@microsoft.com [Mon, 7 Jan 2008 12:58:19 +0000 (12:58 +0000)]
Fix Trac #2017
simonpj@microsoft.com [Mon, 7 Jan 2008 11:54:51 +0000 (11:54 +0000)]
Add -XImpredicativeTypes, and tighten up type-validity checking (cf Trac 2019)
Somehow we didn't have a separate flag for impredicativity; now we do.
Furthermore, Trac #2019 showed up a missing test for monotypes in data
constructor return types. And I realised that we were even allowing
things like
Num (forall a. a) => ...
which we definitely should not.
This patch insists on monotypes in several places where we were (wrongly)
too liberal before.
Could be merged to 6.8 but no big deal.
Simon Marlow [Fri, 4 Jan 2008 16:28:40 +0000 (16:28 +0000)]
pass -no-user-package-conf to ghc-inplace
Ian Lynagh [Sun, 6 Jan 2008 22:15:47 +0000 (22:15 +0000)]
Fix build: Recent instance shuffling left us with overlapping instances
Ian Lynagh [Sun, 6 Jan 2008 21:57:23 +0000 (21:57 +0000)]
Add instructions for building docs to README
simonpj@microsoft.com [Fri, 4 Jan 2008 10:54:50 +0000 (10:54 +0000)]
A little refactoring of GenIfaceEq to make the Outputable instance into H98
simonpj@microsoft.com [Fri, 4 Jan 2008 10:54:09 +0000 (10:54 +0000)]
Make the instance of DebugNodes more H98-like
Isaac Dupree [Fri, 4 Jan 2008 10:53:39 +0000 (10:53 +0000)]
change CmmActual, CmmFormal to use a data CmmHinted rather than tuple (#1405)
This allows the instance of UserOfLocalRegs to be within Haskell98, and IMHO
makes the code a little cleaner generally.
This is one small (though tedious) step towards making GHC's code more
portable...
Isaac Dupree [Wed, 26 Dec 2007 17:59:15 +0000 (17:59 +0000)]
generalize instance Outputable GenCmm to H98 (#1405)
Isaac Dupree [Wed, 26 Dec 2007 17:49:04 +0000 (17:49 +0000)]
move and generalize another instance (#1405)
was instance Outputable CmmGraph
type CmmGraph = LGraph Middle Last
now instance (ctx) => Outputable (LGraph m l),
in module with LGraph where it belongs
This also let us reduce the context of DebugNodes to Haskell98,
leaving that class's only extension being multi-parameter.
(also Outputable (LGraph M Last) with M = ExtendWithSpills Middle
was another redundant instance that was then removed)
Isaac Dupree [Wed, 26 Dec 2007 17:19:13 +0000 (17:19 +0000)]
move and generalize an instance (#1405)
UserOfLocalRegs (ZLast Last) isn't Haskell98, but it was just as
good an instance to be UserOfLocalRegs a => UserOfLocalRegs (ZLast a)
simonpj@microsoft.com [Fri, 4 Jan 2008 12:58:14 +0000 (12:58 +0000)]
Do not consult -XGADTs flag when pattern matching on GADTs
See Trac #2004, and Note [Flags and equational constraints] in TcPat.
simonpj@microsoft.com [Fri, 4 Jan 2008 12:53:05 +0000 (12:53 +0000)]
Add a note about primop wrappers (cf Trac #1509)
simonpj@microsoft.com [Fri, 4 Jan 2008 12:19:39 +0000 (12:19 +0000)]
Document SOURCE pragma; clarify TH behavior for mutually-recurive modules (Trac #1012)
simonpj@microsoft.com [Fri, 4 Jan 2008 10:22:36 +0000 (10:22 +0000)]
White space and comments only
Simon Marlow [Thu, 3 Jan 2008 17:02:36 +0000 (17:02 +0000)]
Optionally use libffi to implement 'foreign import "wrapper"' (#793)
To enable this, set UseLibFFI=YES in mk/build.mk.
The main advantage here is that this reduces the porting effort for
new platforms: libffi works on more architectures than our current
adjustor code, and it is probably more heavily tested. We could
potentially replace our existing code, but since it is probably faster
than libffi (just a guess, I'll measure later) and is already working,
it doesn't seem worthwhile.
Right now, you must have libffi installed on your system. I used the
one supplied by Debian/Ubuntu.
Simon Marlow [Thu, 3 Jan 2008 16:38:05 +0000 (16:38 +0000)]
remove trace apparently left in by accident
simonpj@microsoft.com [Thu, 3 Jan 2008 16:00:36 +0000 (16:00 +0000)]
Remove -funfolding-update-in-place flag documentation
This flag does nothing, and should have been removed ages ago. (GHC
no longer does update-in-place.)
MERGE to 6.8 branch
Simon Marlow [Thu, 3 Jan 2008 14:03:38 +0000 (14:03 +0000)]
Fix warnings with newer gcc versions (I hope)
Simon Marlow [Thu, 3 Jan 2008 11:27:17 +0000 (11:27 +0000)]
FIX #1898: add a missing UNTAG_CLOSURE() in checkBlackHoles
Simon Marlow [Wed, 2 Jan 2008 15:17:40 +0000 (15:17 +0000)]
fix validation failure on non-i386
Simon Marlow [Wed, 2 Jan 2008 15:07:37 +0000 (15:07 +0000)]
expand "out of stack slots" panic to suggest using -fregs-graph, see #1993
Simon Marlow [Wed, 2 Jan 2008 11:45:29 +0000 (11:45 +0000)]
Warning clean, and fix compilation with GHC 6.2.x
Simon Marlow [Thu, 20 Dec 2007 15:17:34 +0000 (15:17 +0000)]
Add dead code elimination in cmmMiniInline
cmmMiniInline counts the uses of local variables, so it can easily
eliminate assigments to unused locals. This almost never gets
triggered, as we don't generate any dead assignments, but it will be
needed by a forthcoming cleanup in CgUtils.emitSwitch.
Isaac Dupree [Wed, 2 Jan 2008 12:40:01 +0000 (12:40 +0000)]
implement prefix unboxed tuples (part of #1509)
Clemens Fruhwirth [Tue, 1 Jan 2008 15:40:17 +0000 (15:40 +0000)]
Link libgmp.a statically into libHSrts.dll on Windows
Clemens Fruhwirth [Tue, 1 Jan 2008 15:21:57 +0000 (15:21 +0000)]
Embedd DLL name into its import library, so client libs reference them properly in .idata
Clemens Fruhwirth [Tue, 1 Jan 2008 15:21:01 +0000 (15:21 +0000)]
Add package dependencies to link pass when building ghc package (required for windows DLL build)
Clemens Fruhwirth [Sun, 30 Dec 2007 19:39:52 +0000 (19:39 +0000)]
Fix building libHSrts.dll by using ghc-pkg instead of grepping in base.cabal
Clemens Fruhwirth [Sat, 29 Dec 2007 16:27:07 +0000 (16:27 +0000)]
Add installPackage to dependencies of make.library.* as it's used by the rule
Clemens Fruhwirth [Fri, 28 Dec 2007 18:40:24 +0000 (18:40 +0000)]
Install dynlibs correctly
Add dynlibdir target to config.mk.in, setting it to @libdir@.
Invoke installPackage with dynlibdir at libraries/Makefile
Make installPackage.hs hand dynlibdir to Cabal.
Isaac Dupree [Fri, 28 Dec 2007 17:57:27 +0000 (17:57 +0000)]
import ord that alex secretly imported
Isaac Dupree [Thu, 27 Dec 2007 17:13:35 +0000 (17:13 +0000)]
add missing import that happy -agc secretly provided
Isaac Dupree [Wed, 26 Dec 2007 14:07:43 +0000 (14:07 +0000)]
correct type mistake, hidden by happy -agc coercions!
Clemens Fruhwirth [Thu, 27 Dec 2007 14:31:14 +0000 (14:31 +0000)]
API changes for cabal-HEAD
Rename interfacedir to haddockdir
Change empty(Copy|Register)Flags to default(Copy|Register)Flags
Wrap content of RegisterFlags with toFlag (the Flag type is actually just Maybe)
Tim Chevalier [Tue, 25 Dec 2007 20:04:11 +0000 (20:04 +0000)]
Extend API for compiling to and from Core
Added API support for compiling Haskell to simplified Core, and for
compiling Core to machine code. The latter, especially, should be
considered experimental and has only been given cursory testing. Also
fixed warnings in DriverPipeline. Merry Christmas.
simonpj@microsoft.com [Mon, 24 Dec 2007 12:22:17 +0000 (12:22 +0000)]
When complaining about non-rigid context, give suggestion of adding a signature
simonpj@microsoft.com [Fri, 21 Dec 2007 09:04:06 +0000 (09:04 +0000)]
Improve handling of newtypes (fixes Trac 1495)
In a few places we want to "look through" newtypes to get to the
representation type. But we need to be careful that we don't fall
into an ininite loop with e.g.
newtype T = MkT T
The old mechansim for doing this was to have a field nt_rep, inside
a newtype TyCon, that gave the "ultimate representation" of the type.
But that failed for Trac 1495, which looked like this:
newtype Fix a = Fix (a (Fix a))
data I a = I a
Then, expanding the type (Fix I) went on for ever.
The right thing to do seems to be to check for loops when epxanding
the *type*, rather than in the *tycon*. This patch does that,
- Removes nt_rep from TyCon
- Make Type.repType check for loops
See Note [Expanding newtypes] in Type.lhs.
At the same time I also fixed a bug for Roman, where newtypes were not
being expanded properly in FamInstEnv.topNormaliseType. This function
and Type.repType share a common structure.
Ian, see if this merges easily to the branch
If not, I don't think it's essential to fix 6.8
simonpj@microsoft.com [Fri, 21 Dec 2007 08:55:42 +0000 (08:55 +0000)]
Fix Trac #1981: seq on a type-family-typed expression
We were crashing when we saw
case x of DEFAULT -> rhs
where x had a type-family type. This patch fixes it.
MERGE to the 6.8 branch.
simonpj@microsoft.com [Thu, 20 Dec 2007 16:46:21 +0000 (16:46 +0000)]
Comment only
simonpj@microsoft.com [Thu, 20 Dec 2007 16:43:07 +0000 (16:43 +0000)]
Fix nasty recompilation bug in MkIface.computeChangedOccs
MERGE to 6.8 branch
In computeChangedOccs we look up the old version of a Name.
But a WiredIn Name doesn't have an old version, because WiredIn things
don't appear in interface files at all.
Result: ghc-6.9: panic! (the 'impossible' happened)
(GHC version 6.9 for x86_64-unknown-linux):
lookupVers1 base:GHC.Prim chr#{v}
This fixes the problem. The patch should merge easily onto the branch.
simonpj@microsoft.com [Thu, 20 Dec 2007 13:19:12 +0000 (13:19 +0000)]
Fix Trac #1988; keep the ru_fn field of a RULE up to date
The ru_fn field was wrong when we moved RULES from one Id to another.
The fix is simple enough.
However, looking at this makes me realise that the worker/wrapper stuff
for recursive newtypes isn't very clever: we generate demand info but
then don't properly exploit it.
This patch fixes the crash though.
simonpj@microsoft.com [Thu, 20 Dec 2007 18:03:35 +0000 (18:03 +0000)]
Add better panic message in getSRTInfo (Trac #1973)
simonpj@microsoft.com [Thu, 20 Dec 2007 17:34:32 +0000 (17:34 +0000)]
Remove obselete code for update-in-place (which we no longer do)
simonpj@microsoft.com [Thu, 20 Dec 2007 11:13:00 +0000 (11:13 +0000)]
Implement generalised list comprehensions
This patch implements generalised list comprehensions, as described in
the paper "Comprehensive comprehensions" (Peyton Jones & Wadler, Haskell
Workshop 2007). If you don't use the new comprehensions, nothing
should change.
The syntax is not exactly as in the paper; see the user manual entry
for details.
You need an accompanying patch to the base library for this stuff
to work.
The patch is the work of Max Bolingbroke [batterseapower@hotmail.com],
with some advice from Simon PJ.
The related GHC Wiki page is
http://hackage.haskell.org/trac/ghc/wiki/SQLLikeComprehensions
Ian Lynagh [Tue, 18 Dec 2007 14:45:05 +0000 (14:45 +0000)]
More bindist-publishing fixes and refactoring
Ian Lynagh [Sun, 16 Dec 2007 12:25:44 +0000 (12:25 +0000)]
Fix publishing the docs
Simon Marlow [Mon, 17 Dec 2007 16:46:10 +0000 (16:46 +0000)]
FIX #1980: must check for ThreadRelocated in killThread#
Manuel M T Chakravarty [Mon, 17 Dec 2007 09:38:39 +0000 (09:38 +0000)]
Eliminate external GMP dependencies
- Ensure the stage1 compiler uses ghc's own GMP library on Mac OS
- Need to rebuild installPackage and ifBuildable with stage1 compiler as they
go into bindists
Ian Lynagh [Mon, 17 Dec 2007 23:34:57 +0000 (23:34 +0000)]
Include ~/Library/Frameworks in the framework searchpath
Patch from Christian Maeder
Ian Lynagh [Mon, 17 Dec 2007 19:57:34 +0000 (19:57 +0000)]
Make ghcii.sh executable
Ian Lynagh [Mon, 17 Dec 2007 19:55:54 +0000 (19:55 +0000)]
Don't rely on distrib/prep-bin-dist-mingw being executable
Simon Marlow [Fri, 14 Dec 2007 12:33:45 +0000 (12:33 +0000)]
always try to remove the new file before restoring the old one (#1963)
Ian Lynagh [Wed, 12 Dec 2007 12:11:54 +0000 (12:11 +0000)]
Fix a bug in gen_contents_index
The library doc index thought that the docs were in $module.html, rather
than $package/$module.html.
Roman Leshchinskiy [Sat, 15 Dec 2007 00:08:37 +0000 (00:08 +0000)]
Fix lifting of case expressions
We have to explicity check for empty arrays in each alternative as recursive
algorithms wouldn't terminate otherwise.
Roman Leshchinskiy [Sat, 15 Dec 2007 00:07:39 +0000 (00:07 +0000)]
Use (UArr Int) instead of PArray_Int# in vectorisation
Roman Leshchinskiy [Fri, 14 Dec 2007 23:09:14 +0000 (23:09 +0000)]
Fix bug in VectInfo loading
Roman Leshchinskiy [Fri, 14 Dec 2007 01:10:15 +0000 (01:10 +0000)]
Remove unused vectorisation built-in
Roman Leshchinskiy [Thu, 13 Dec 2007 03:48:55 +0000 (03:48 +0000)]
Treat some standard data cons specially during vectorisation
This is a temporary hack which allows us to vectorise literals.
Roman Leshchinskiy [Thu, 13 Dec 2007 03:48:39 +0000 (03:48 +0000)]
More vectorisation-related built ins
Roman Leshchinskiy [Wed, 12 Dec 2007 06:27:14 +0000 (06:27 +0000)]
Track changes to package ndp
Roman Leshchinskiy [Wed, 12 Dec 2007 04:05:21 +0000 (04:05 +0000)]
Add vectorisation built-ins
Simon Marlow [Thu, 13 Dec 2007 15:40:56 +0000 (15:40 +0000)]
FIX #1963: catch Ctrl-C and clean up properly
Roman Leshchinskiy [Fri, 14 Dec 2007 00:30:03 +0000 (00:30 +0000)]
Document the new threshold flags
Roman Leshchinskiy [Fri, 14 Dec 2007 00:27:19 +0000 (00:27 +0000)]
Separate and optional size thresholds for SpecConstr and LiberateCase
This patch replaces -fspec-threshold by -fspec-constr-threshold and
-fliberate-case-threshold. The thresholds can be disabled by
-fno-spec-constr-threshold and -fno-liberate-case-threshold.