Ian Lynagh [Fri, 5 Jun 2009 13:13:24 +0000 (13:13 +0000)]
Follow Cabal changes
Ian Lynagh [Fri, 5 Jun 2009 12:29:29 +0000 (12:29 +0000)]
Update the docs on how you bind unlifted types in let/where clauses
Ian Lynagh [Fri, 5 Jun 2009 12:23:48 +0000 (12:23 +0000)]
Document -fwarn-lazy-unlifted-bindings
Ian Lynagh [Fri, 5 Jun 2009 12:20:48 +0000 (12:20 +0000)]
Fix typo
simonpj@microsoft.com [Fri, 5 Jun 2009 14:00:09 +0000 (14:00 +0000)]
Mention that generalised list comprehensions are enabled with -XTransformListComp
Ian Lynagh [Fri, 5 Jun 2009 11:43:16 +0000 (11:43 +0000)]
Make a proper Opt_WarnLazyUnliftedBindings warning, with a flag etc
Ian Lynagh [Thu, 4 Jun 2009 12:45:01 +0000 (12:45 +0000)]
Fix ghc-cabal, so that GHC.Prim gets registered when we install
Simon Marlow [Thu, 4 Jun 2009 09:35:39 +0000 (09:35 +0000)]
fix a warning
Simon Marlow [Thu, 4 Jun 2009 09:05:53 +0000 (09:05 +0000)]
Lock the StablePtr table during GC
Allows hs_free_fun_ptr() to be called by a separate thread
Simon Marlow [Thu, 4 Jun 2009 08:48:24 +0000 (08:48 +0000)]
fix $(TOP)
Simon Marlow [Thu, 4 Jun 2009 08:47:49 +0000 (08:47 +0000)]
remove a prototype that shouldn't be here
Ian Lynagh [Wed, 3 Jun 2009 12:12:09 +0000 (12:12 +0000)]
Merge the TODO lists in ghc.mk
Simon Marlow [Wed, 3 Jun 2009 10:12:44 +0000 (10:12 +0000)]
Tighten up the DocBook XSL stylesheet test
It wasn't failing even when the DTD was not found.
Simon Marlow [Wed, 3 Jun 2009 09:23:13 +0000 (09:23 +0000)]
fix logic for BUID_DOCBOOK_HTML
simonpj@microsoft.com [Wed, 3 Jun 2009 09:29:56 +0000 (09:29 +0000)]
Allow RULES for seq, and exploit them
Roman found situations where he had
case (f n) of _ -> e
where he knew that f (which was strict in n) would terminate if n did.
Notice that the result of (f n) is discarded. So it makes sense to
transform to
case n of _ -> e
Rather than attempt some general analysis to support this, I've added
enough support that you can do this using a rewrite rule:
RULE "f/seq" forall n. seq (f n) e = seq n e
You write that rule. When GHC sees a case expression that discards
its result, it mentally transforms it to a call to 'seq' and looks for
a RULE. (This is done in Simplify.rebuildCase.) As usual, the
correctness of the rule is up to you.
This patch implements the extra stuff. I have not documented it explicitly
in the user manual yet... let's see how useful it is first.
The patch looks bigger than it is, because
a) Comments; see esp MkId Note [seqId magic]
b) Some refactoring. Notably, I moved the special desugaring for
seq from MkCore back into DsUtils where it properly belongs.
(It's really a desugaring thing, not a CoreSyn invariant.)
c) Annoyingly, in a RULE left-hand side we need to be careful that
the magical desugaring done in MkId Note [seqId magic] item (c)
is *not* done on the LHS of a rule. Or rather, we arrange to
un-do it, in DsBinds.decomposeRuleLhs.
Ian Lynagh [Tue, 2 Jun 2009 18:22:11 +0000 (18:22 +0000)]
Remove the unused remains of __decodeFloat
Simon Marlow [Tue, 2 Jun 2009 14:02:33 +0000 (14:02 +0000)]
Remove old GUM/GranSim code
Simon Marlow [Tue, 2 Jun 2009 13:49:43 +0000 (13:49 +0000)]
tidy up autoconfiguration of docbook stuff
* use --nonet, so xmllint and co don't go off trying to download
stuff from the web
* use the http:// reference for the stylesheet, so we don't have to
search the filesystem for it (should speedup ./configure)
Simon Marlow [Tue, 2 Jun 2009 12:16:18 +0000 (12:16 +0000)]
fix 'make sdist'
Ian Lynagh [Tue, 2 Jun 2009 12:47:00 +0000 (12:47 +0000)]
Add a comment about why RM and RM_OPTS are not in config.mk
Ian Lynagh [Tue, 2 Jun 2009 12:46:44 +0000 (12:46 +0000)]
Follow the change in RM's definition in distrib/Makefile-bin-vars.in
simonpj@microsoft.com [Tue, 2 Jun 2009 13:37:06 +0000 (13:37 +0000)]
Fix Trac #3265: type operators in type/class declarations
We should accept these:
data a :*: b = ....
or
data (:*:) a b = ...
only if -XTypeOperators is in force. And similarly class decls.
This patch fixes the problem. It uses the slightly-nasty OccName.isSymOcc,
but the only way to avoid that is to cach the result in OccNames which seems
overkill to us.
Ian Lynagh [Tue, 2 Jun 2009 11:34:08 +0000 (11:34 +0000)]
Use -w when compiling libffi, to stop -Werror failures
Simon Marlow [Tue, 2 Jun 2009 10:23:52 +0000 (10:23 +0000)]
Add a section "Multi-threading and the FFI"
and collect all the information about multi-threaded FFI use into it.
Simon Marlow [Tue, 2 Jun 2009 09:59:36 +0000 (09:59 +0000)]
emit a helpful message if you say 'make html' and BUILD_DOCBOOK_HTML=NO
Simon Marlow [Tue, 2 Jun 2009 09:03:45 +0000 (09:03 +0000)]
mention documentation tools in the summary; tidy up formatting
Simon Marlow [Fri, 29 May 2009 15:19:34 +0000 (15:19 +0000)]
depend on mk/project.mk appropriately
Simon Marlow [Fri, 29 May 2009 11:30:28 +0000 (11:30 +0000)]
fix comment
Ian Lynagh [Sat, 30 May 2009 23:33:56 +0000 (23:33 +0000)]
Unquote a $(LN_S) in ghc/ghc.mk
Ian Lynagh [Sat, 30 May 2009 23:31:33 +0000 (23:31 +0000)]
$(XARGS) might include arguments, so don't quote it in makefiles
Ian Lynagh [Sat, 30 May 2009 22:00:21 +0000 (22:00 +0000)]
Quote commands that we run, so they work if there are space in their paths
I've also added some missing $s to some makefiles. These aren't
technically necessary, but it's nice to be consistent.
Ian Lynagh [Sat, 30 May 2009 19:37:29 +0000 (19:37 +0000)]
Remove some redundant code from hi-rule.mk
Ian Lynagh [Sat, 30 May 2009 18:47:50 +0000 (18:47 +0000)]
make the clean_libraries target work, so you can "make clean" in libraries/
Austin Seipp [Sat, 23 May 2009 09:09:01 +0000 (09:09 +0000)]
fix pprDynamicLinkerAsmLabel for Mac OS X x86_64
Ian Lynagh [Fri, 29 May 2009 18:01:50 +0000 (18:01 +0000)]
Make clean_libraries in the same way that we make all_libraries
Ian Lynagh [Fri, 29 May 2009 17:57:48 +0000 (17:57 +0000)]
Tweak mk/sub-makefile.mk
simonpj@microsoft.com [Fri, 29 May 2009 13:11:37 +0000 (13:11 +0000)]
Implement -XMonoLocalBinds: a radical new flag
The new flag -XMonoLocalBinds tells GHC not to generalise nested
bindings in let or where clauses, unless there is a type signature,
in which case we use it.
I'm thinking about whether this might actually be a good direction for
Haskell go to in, although it seems pretty radical. Anyway, the flag
is easy to implement (look at how few lines change), and having it
will allow us to experiement with and without.
Just for the record, below are the changes required in the boot
libraries -- ie the places where. Not quite as minimal as I'd hoped,
but the changes fall into a few standard patterns, and most represent
(in my opinion) sytlistic improvements. I will not push these patches,
however.
== running darcs what -s --repodir libraries/base
M ./Control/Arrow.hs -2 +4
M ./Data/Data.hs -7 +22
M ./System/IO/Error.hs +1
M ./Text/ParserCombinators/ReadP.hs +1
== running darcs what -s --repodir libraries/bytestring
M ./Data/ByteString/Char8.hs -1 +2
M ./Data/ByteString/Unsafe.hs +1
== running darcs what -s --repodir libraries/Cabal
M ./Distribution/PackageDescription.hs -2 +6
M ./Distribution/PackageDescription/Check.hs +3
M ./Distribution/PackageDescription/Configuration.hs -1 +3
M ./Distribution/ParseUtils.hs -2 +4
M ./Distribution/Simple/Command.hs -1 +4
M ./Distribution/Simple/Setup.hs -12 +24
M ./Distribution/Simple/UserHooks.hs -1 +5
== running darcs what -s --repodir libraries/containers
M ./Data/IntMap.hs -2 +2
== running darcs what -s --repodir libraries/dph
M ./dph-base/Data/Array/Parallel/Arr/BBArr.hs -1 +3
M ./dph-base/Data/Array/Parallel/Arr/BUArr.hs -2 +4
M ./dph-prim-par/Data/Array/Parallel/Unlifted/Distributed/Arrays.hs -6 +10
M ./dph-prim-par/Data/Array/Parallel/Unlifted/Distributed/Combinators.hs -3 +6
M ./dph-prim-seq/Data/Array/Parallel/Unlifted/Sequential/Flat/Permute.hs -2 +4
== running darcs what -s --repodir libraries/syb
M ./Data/Generics/Twins.hs -5 +18
Simon Marlow [Fri, 29 May 2009 09:08:27 +0000 (09:08 +0000)]
don't shrink the stack smaller than the value set by +RTS -k<size>
Simon Marlow [Fri, 29 May 2009 09:07:58 +0000 (09:07 +0000)]
Fix bug in previous change: allocate the correct size
simonpj@microsoft.com [Fri, 29 May 2009 08:45:14 +0000 (08:45 +0000)]
Make haddocking depend on the library .a file
You can't Haddock a library until it's built. Previously that happened
automatically because
Haddock itself was built with stage2
And all the libraries were built with stage1
But now DPH is built with stage2, so Haddock can get to work too
early.
This patch adds the missing dependency (thanks to Simon M)
simonpj@microsoft.com [Fri, 29 May 2009 07:20:20 +0000 (07:20 +0000)]
Fix Trac #3259: expose 'lazy' only after generating interface files
This patch fixes an insidious and long-standing bug in the way that
parallelism is handled in GHC. See Note [lazyId magic] in MkId.
Here's the diagnosis, copied from the Trac ticket. par is defined
in GHC.Conc thus:
{-# INLINE par #-}
par :: a -> b -> b
par x y = case (par# x) of { _ -> lazy y }
-- The reason for the strange "lazy" call is that it fools the
-- compiler into thinking that pseq and par are non-strict in
-- their second argument (even if it inlines pseq/par at the call
-- site). If it thinks par is strict in "y", then it often
-- evaluates "y" before "x", which is totally wrong.
The function lazy is the identity function, but it is inlined only
after strictness analysis, and (via some magic) pretends to be
lazy. Hence par pretends to be lazy too.
The trouble is that both par and lazy are inlined into your definition
of parallelise, so that the unfolding for parallelise (exposed in
Parallelise.hi) does not use lazy at all. Then when compiling Main,
parallelise is in turn inlined (before strictness analysis), and so
the strictness analyser sees too much.
This was all sloppy thinking on my part. Inlining lazy after
strictness analysis works fine for the current module, but not for
importing modules.
The fix implemented by this patch is to inline 'lazy' in CorePrep,
not in WorkWrap. That way interface files never see the inlined version.
The downside is that a little less optimisation may happen on programs
that use 'lazy'. And you'll only see this in the results -ddump-prep
not in -ddump-simpl. So KEEP AN EYE OUT (Simon and Satnam especially).
Still, it should work properly now. Certainly fixes #3259.
simonpj@microsoft.com [Thu, 28 May 2009 15:23:59 +0000 (15:23 +0000)]
Fix Trac #3262: suppress name-shadow warning for _names
Adopt Max's suggestion for name shadowing, by suppressing shadowing
warnings for variables starting with "_". A tiny bit of refactoring
along the way.
Simon Marlow [Thu, 28 May 2009 15:26:51 +0000 (15:26 +0000)]
don't call Haskeline to read input when stdin is not a terminal
Ben.Lippmeier@anu.edu.au [Thu, 28 May 2009 08:05:09 +0000 (08:05 +0000)]
Fix handling of R_SPARC_UA32 relocations in linker
These refer to unaligned locations that need to be written
byte-at-a-time. This fixes the SPARC ghci failures in
the current head.
simonpj@microsoft.com [Thu, 28 May 2009 16:54:43 +0000 (16:54 +0000)]
Document the fact that Template Haskell type splices work
simonpj@microsoft.com [Thu, 28 May 2009 16:52:15 +0000 (16:52 +0000)]
Improve printing of Orig RdrNames
In Tempate Haskell -ddump-splices, the "after" expression is populated
with RdrNames, many of which are Orig things. We used to print these
fully-qualified, but that's a bit heavy.
This patch refactors the code a bit so that the same print-unqualified
mechanism we use for Names also works for RdrNames. Lots of comments
too, because it took me a while to figure out how it all worked again.
simonpj@microsoft.com [Thu, 28 May 2009 16:50:39 +0000 (16:50 +0000)]
Print more nicely in -ddump-splices
When you say -ddump-splices, the "before" expression is now
*renamed* but not *typechecked"
Reason (a) less typechecking crap
(b) data constructors after type checking have been
changed to their *wrappers*, and that makes them
print always fully qualified
simonpj@microsoft.com [Thu, 28 May 2009 16:49:00 +0000 (16:49 +0000)]
Fix Trac #3261: make default types play nice with -Werror
The trial-and-error for type defaults was not playing nicely with
-Werror. The fix is simple.
simonpj@microsoft.com [Thu, 28 May 2009 16:48:02 +0000 (16:48 +0000)]
Adjust error message slightly
simonpj@microsoft.com [Thu, 28 May 2009 16:47:27 +0000 (16:47 +0000)]
White space only
simonpj@microsoft.com [Thu, 28 May 2009 16:45:25 +0000 (16:45 +0000)]
Remove type-ambiguous (fromIntegral 0)::Int, replacing it with just 0
This unnecessary ambiguity has been there for ages, and is now rejected
by -Werror, after fixing #3261
simonpj@microsoft.com [Thu, 28 May 2009 16:44:36 +0000 (16:44 +0000)]
Move getMainFun to TcRnDriver, trim DynFlags imports
simonpj@microsoft.com [Thu, 28 May 2009 16:43:29 +0000 (16:43 +0000)]
Comments only
simonpj@microsoft.com [Thu, 28 May 2009 16:42:50 +0000 (16:42 +0000)]
Comments about naming for data constructors
simonpj@microsoft.com [Thu, 28 May 2009 09:27:50 +0000 (09:27 +0000)]
Remove dead code isHsVar
Simon Marlow [Thu, 28 May 2009 13:34:40 +0000 (13:34 +0000)]
Round stack size to a whole number of megablocks
This is not a bug fix, it just makes better use of memory
Simon Marlow [Thu, 28 May 2009 13:33:57 +0000 (13:33 +0000)]
Fix #3156: ensure preconditions of splitLargeBlock()
Simon Marlow [Thu, 28 May 2009 11:16:08 +0000 (11:16 +0000)]
fix it so that 'make' on its own works even if we're not building docs
simonpj@microsoft.com [Thu, 28 May 2009 07:59:18 +0000 (07:59 +0000)]
Comments only
simonpj@microsoft.com [Thu, 28 May 2009 07:53:06 +0000 (07:53 +0000)]
Fix Trac #3013: multiple constructors in a GADT decl
Makes GADT syntax consistent by allowing multiple constructors
to be given a single signature
data T wehre
A, B :: T
C :: Int -> t
simonpj@microsoft.com [Thu, 28 May 2009 07:50:31 +0000 (07:50 +0000)]
Separate flags -XDeriveFunctor, -XDeriveFoldable, -XDeriveTraversable
See Trac #2953. This patch implements a distinct flag for each extended
class that may be automatically derived. And I updated the user manual
to reflect the fact that we can now derive Functor, Foldable, Traversable.
simonpj@microsoft.com [Thu, 28 May 2009 07:25:13 +0000 (07:25 +0000)]
Add a comment
Ben.Lippmeier.anu.edu.au [Wed, 27 May 2009 04:01:01 +0000 (04:01 +0000)]
Follow vreg/hreg patch in X86_64 NCG
Ben.Lippmeier@anu.edu.au [Tue, 26 May 2009 10:55:22 +0000 (10:55 +0000)]
Follow vreg/hreg patch in PPC NCG
Ben.Lippmeier@anu.edu.au [Tue, 19 May 2009 09:55:07 +0000 (09:55 +0000)]
Follow vreg/hreg patch in x86 NCG
Ben.Lippmeier@anu.edu.au [Tue, 19 May 2009 03:55:28 +0000 (03:55 +0000)]
Don't try and coalesce RealReg->RealReg moves
Ben.Lippmeier@anu.edu.au [Mon, 18 May 2009 01:44:44 +0000 (01:44 +0000)]
Split Reg into vreg/hreg and add register pairs
* The old Reg type is now split into VirtualReg and RealReg.
* For the graph coloring allocator, the type of the register graph
is now (Graph VirtualReg RegClass RealReg), which shows that it colors
in nodes representing virtual regs with colors representing real regs.
(as was intended)
* RealReg contains two contructors, RealRegSingle and RealRegPair,
where RealRegPair is used to represent a SPARC double reg
constructed from two single precision FP regs.
* On SPARC we can now allocate double regs into an arbitrary register
pair, instead of reserving some reg ranges to only hold float/double values.
Ben.Lippmeier@anu.edu.au [Tue, 21 Apr 2009 01:44:09 +0000 (01:44 +0000)]
SPARC NCG: Fix available regs for graph allocator
simonpj@microsoft.com [Wed, 27 May 2009 18:21:57 +0000 (18:21 +0000)]
Fix Trac #3221: renamer warnings for deriving clauses
This patch arranges to gather the variables used by 'deriving' clauses,
so that unused bindings are correctly reported.
simonpj@microsoft.com [Wed, 27 May 2009 18:12:42 +0000 (18:12 +0000)]
Template Haskell: allow type splices
At last! Trac #1476 and #3177
This patch extends Template Haskell by allowing splices in
types. For example
f :: Int -> $(burble 3)
A type splice should work anywhere a type is expected. This feature
has been long requested, and quite a while ago I'd re-engineered the
type checker to make it easier, but had never got around to finishing
the job. With luck, this does it.
There's a ToDo in the HsSpliceTy case of RnTypes.rnHsType, where I
am not dealing properly with the used variables; but that's awaiting
the refactoring of the way we report unused names.
simonpj@microsoft.com [Wed, 27 May 2009 18:08:40 +0000 (18:08 +0000)]
Template Haskell: improve lifting for strings
When you have a (\s::String -> ....[| s |]....), the string
's' is lifted. We used to get a chain of single-character
Cons nodes, correct but lots and lots of code.
This patch arranges to optimise that to a string literal. It does
so in two places:
a) In TcExpr, if we know that s::String, we generate liftString directly
b) In DsMeta, if we find a list of character literals, we convert to
a string. This catches a few cases that (a) does not
There an accompanying patch in the template-haskell package,
adding Language.Haskell.TH.Syntax.liftString
simonpj@microsoft.com [Wed, 27 May 2009 18:00:32 +0000 (18:00 +0000)]
Rename conDeclsNames to hsConDeclsNames, and export it
simonpj@microsoft.com [Wed, 27 May 2009 17:56:03 +0000 (17:56 +0000)]
Comments about wiredInIds
Ian Lynagh [Tue, 26 May 2009 19:29:53 +0000 (19:29 +0000)]
Wibble some comments to avoid haddock parse errors
Ian Lynagh [Tue, 26 May 2009 19:04:59 +0000 (19:04 +0000)]
Add a haddock target, for just building the haddock docs
Ian Lynagh [Tue, 26 May 2009 18:41:27 +0000 (18:41 +0000)]
Add some more $s to rules/haddock.mk for consistency
Ian Lynagh [Tue, 26 May 2009 18:40:34 +0000 (18:40 +0000)]
Fix haddocking
We were looking at HADDOCK_DOCS instead of $$(HADDOCK_DOCS)
Ian Lynagh [Mon, 25 May 2009 12:00:21 +0000 (12:00 +0000)]
Make the sed in configure.ac more portable
Ian Lynagh [Sun, 24 May 2009 20:44:12 +0000 (20:44 +0000)]
Remove legacy code that isn't used now that we require GHC >= 6.8
Ian Lynagh [Sun, 24 May 2009 13:53:50 +0000 (13:53 +0000)]
Remove unused variables
Ian Lynagh [Sun, 24 May 2009 13:47:53 +0000 (13:47 +0000)]
Remove unused variables
Ian Lynagh [Sun, 24 May 2009 13:34:39 +0000 (13:34 +0000)]
Be more precise about munging compiler/stage1/inplace-pkg-config
We were removing ".$(ProjectPatchLevel)" from anywhere in the file.
However, it included absolute paths, so if you untar a source
tarball into its default directory name, e.g.
"6.11.$(ProjectPatchLevel)", then the sed would break the paths.
Ian Lynagh [Sun, 24 May 2009 13:15:04 +0000 (13:15 +0000)]
Use the more portable %lu rather than %zu
We now also need to cast the values to (unsigned long), as on some
platforms sizeof returns (unsigned int).
Ian Lynagh [Sun, 24 May 2009 13:14:54 +0000 (13:14 +0000)]
Clean libraries/bootstrapping.conf
Ian Lynagh [Sat, 23 May 2009 23:14:38 +0000 (23:14 +0000)]
Fix warnings
Ian Lynagh [Sat, 23 May 2009 22:27:15 +0000 (22:27 +0000)]
Fix warnings in genprimopcode
Ian Lynagh [Sat, 23 May 2009 21:58:36 +0000 (21:58 +0000)]
Fix warnings in mkDerivedConstants
Ian Lynagh [Sat, 23 May 2009 21:35:18 +0000 (21:35 +0000)]
Fix warnings in ghc-cabal
Ian Lynagh [Sat, 23 May 2009 21:34:51 +0000 (21:34 +0000)]
Turn on warnings when validating
Ian Lynagh [Sat, 23 May 2009 00:42:31 +0000 (00:42 +0000)]
Fix configure
Ian Lynagh [Sat, 23 May 2009 00:16:43 +0000 (00:16 +0000)]
ghc_ge_607 is now always true
Ian Lynagh [Sat, 23 May 2009 00:04:45 +0000 (00:04 +0000)]
Sanity check the platforms we are given
Ian Lynagh [Fri, 22 May 2009 23:30:22 +0000 (23:30 +0000)]
Change how we find the host/build/target platforms
Rather than using the autoconf built-in stuff and mangling it, we
now just ask the bootstrapping compiler what platform we are on.
When doing a port of GHC, you need to specify the platform you are
porting to.
The minimum version of GHC required is now 6.8.
Simon Marlow [Wed, 20 May 2009 22:44:27 +0000 (22:44 +0000)]
remove old todo comment
Simon Marlow [Wed, 20 May 2009 22:36:47 +0000 (22:36 +0000)]
document -XUnicodeSyntax
Simon Marlow [Sat, 28 Mar 2009 19:13:55 +0000 (19:13 +0000)]
export sysErrorBelch
Simon Marlow [Wed, 6 May 2009 19:52:16 +0000 (19:52 +0000)]
rm package.conf.inplace in distclean, not clean
Simon Marlow [Wed, 6 May 2009 19:48:02 +0000 (19:48 +0000)]
#2197: try to detect when GHCi is compiled with -prof and emit an error message
Simon Marlow [Sat, 28 Mar 2009 21:15:18 +0000 (21:15 +0000)]
fix typo
Simon Marlow [Fri, 22 May 2009 08:33:51 +0000 (08:33 +0000)]
Remove hacky on-demand building of libraries/*/ghc.mk, put it back in sh boot
Now that the clean rules don't require libraries/*/ghc.mk, we don't
have to build them on demand. And having them built on demand
introduced a failure mode (where some libraries have ghc.mk and some
don't).