ghc.git
6 years agoMake {-# UNPACK #-} work for type/data family invocations
Simon Peyton Jones [Sun, 23 Dec 2012 15:38:48 +0000 (15:38 +0000)] 
Make {-# UNPACK #-} work for type/data family invocations

This fixes most of Trac #3990.  Consider
  data family D a
  data instance D Double = CD Int Int
  data T = T {-# UNPACK #-} !(D Double)
Then we want the (D Double unpacked).

To do this we need to construct a suitable coercion, and it's much
safer to record that coercion in the interface file, lest the in-scope
instances differ somehow.  That in turn means elaborating the HsBang
type to include a coercion.

To do that I moved HsBang from BasicTypes to DataCon, which caused
quite a few minor knock-on changes.

Interface-file format has changed!

Still to do: need to do knot-tying to allow instances to take effect
within the same module.

6 years agoClarify documentation of [~] syntax on RULE activations
Simon Peyton Jones [Fri, 21 Dec 2012 13:17:26 +0000 (13:17 +0000)] 
Clarify documentation of [~] syntax on RULE activations

6 years agoOnly allow special NeverActive syntax for RULES.
Andrew Farmer [Thu, 6 Dec 2012 21:47:33 +0000 (15:47 -0600)] 
Only allow special NeverActive syntax for RULES.

6 years agoClarify promotion rules for newtypes in the documentation
Simon Peyton Jones [Fri, 21 Dec 2012 09:14:19 +0000 (09:14 +0000)] 
Clarify promotion rules for newtypes in the documentation

6 years agoLikely fix to uninitialized DynFlags in plugins.
Daniel Vainsencher [Thu, 13 Dec 2012 18:19:43 +0000 (18:19 +0000)] 
Likely fix to uninitialized DynFlags in plugins.

6 years agoMerge branch 'master' of darcs.haskell.org:/home/darcs/ghc
Simon Peyton Jones [Fri, 21 Dec 2012 08:06:16 +0000 (08:06 +0000)] 
Merge branch 'master' of darcs.haskell.org:/home/darcs/ghc

6 years agoAllow newtypes to be promoted
Simon Peyton Jones [Fri, 21 Dec 2012 08:05:58 +0000 (08:05 +0000)] 
Allow newtypes to be promoted

Fixes Trac #7488

6 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Simon Peyton Jones [Thu, 20 Dec 2012 20:14:05 +0000 (20:14 +0000)] 
Merge branch 'master' of darcs.haskell.org/ghc

6 years agoFix over-zealous ASSERT in TcUnify
Simon Peyton Jones [Thu, 20 Dec 2012 20:13:36 +0000 (20:13 +0000)] 
Fix over-zealous ASSERT in TcUnify

6 years agoRedirect asynchronous exceptions to the sandbox thread in runStmt (#1381)
Simon Marlow [Thu, 20 Dec 2012 09:18:49 +0000 (09:18 +0000)] 
Redirect asynchronous exceptions to the sandbox thread in runStmt (#1381)

See comment for details.

We no longer use pushInterruptTargetThread/popInterruptTargetThread,
so these could go away in due course.

6 years ago'sync-all get -q' also passes -q to 'git submodule'
Simon Marlow [Wed, 19 Dec 2012 10:13:09 +0000 (10:13 +0000)] 
'sync-all get -q' also passes -q to 'git submodule'

6 years agoRename all of the 'cmmz' flags and make them more consistent.
Austin Seipp [Mon, 17 Dec 2012 10:21:50 +0000 (04:21 -0600)] 
Rename all of the 'cmmz' flags and make them more consistent.

There's only a single compiler backend now, so the 'z' suffix means
nothing. Also, the flags were confusingly named ('cmm-foo' vs
'foo-cmm',) and counter-intuitively, '-ddump-cmm' did not do at all what
you expected since the new backend went live.

Basically, all of the -ddump-cmmz-* flags are now -ddump-cmm-*. Some were
renamed to be more consistent.

This doesn't update the manual; it already mentions '-ddump-cmm' and
that flag implies all the others anyway, which is probably what you
want.

Signed-off-by: Austin Seipp <mad.one@gmail.com>
6 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Simon Peyton Jones [Wed, 19 Dec 2012 23:50:38 +0000 (23:50 +0000)] 
Merge branch 'master' of darcs.haskell.org/ghc

6 years agoFix TcUnify.matchExpectedTyConApp so that it returns types of compatible kinds
Simon Peyton Jones [Wed, 19 Dec 2012 23:49:47 +0000 (23:49 +0000)] 
Fix TcUnify.matchExpectedTyConApp so that it returns types of compatible kinds

This fixes Trac #7368. The problem was that we were matching
   Bad w ~ f (Bad f)
where (f :: * -> *).  Thta leads to (w ~ Bad f), which is
ill-kinded, but matchExpectedTyConApp was returning the (Bad f)
as the argument type, and that was being used to instanatiate
w in the data constructor type, which is very bad.

The code also becomes simpler and easier to understand, which is
an excellent thing.

6 years agoPass the correct inst_tys argument to dataConCannotMatch, in mkRecSelBinds
Simon Peyton Jones [Wed, 19 Dec 2012 17:37:27 +0000 (17:37 +0000)] 
Pass the correct inst_tys argument to dataConCannotMatch, in mkRecSelBinds

This fixes Trac #7503.

6 years agoAdd some ASSERTs to calls of zipTopTvSubst
Simon Peyton Jones [Wed, 19 Dec 2012 17:36:34 +0000 (17:36 +0000)] 
Add some ASSERTs to calls of zipTopTvSubst

6 years agoMove the kind Nat and Symbol out of TysPrim and into TysWiredIn
Simon Peyton Jones [Wed, 19 Dec 2012 17:35:51 +0000 (17:35 +0000)] 
Move the kind Nat and Symbol out of TysPrim and into TysWiredIn

They properly belong in TysWiredIn, since they are defined in Haskell
in GHC.TypeLits.

Moveover, make them WiredIn (again as they should be) and use
checkWiredInTyCon when encountering them in TcHsType.tc_hs_type,
so that the interface file is loaded.  This fixes Trac #7502.

6 years agoMerge branch 'master' of darcs.haskell.org:/home/darcs/ghc
Simon Peyton Jones [Wed, 19 Dec 2012 15:15:47 +0000 (15:15 +0000)] 
Merge branch 'master' of darcs.haskell.org:/home/darcs/ghc

6 years agoFix Trac #7506 (missing check for form of FFI type)
Simon Peyton Jones [Wed, 19 Dec 2012 13:23:21 +0000 (13:23 +0000)] 
Fix Trac #7506 (missing check for form of FFI type)

6 years agospelling in doc
Gabor Greif [Wed, 19 Dec 2012 12:37:08 +0000 (13:37 +0100)] 
spelling in doc

6 years agotypo
Gabor Greif [Fri, 14 Dec 2012 09:00:55 +0000 (10:00 +0100)] 
typo

6 years agoMerge branch 'master' of darcs.haskell.org:/home/darcs/ghc
Simon Peyton Jones [Wed, 19 Dec 2012 10:32:09 +0000 (10:32 +0000)] 
Merge branch 'master' of darcs.haskell.org:/home/darcs/ghc

6 years agoWibbles to faa8ff40 (UNPACK pragmas)
Simon Peyton Jones [Wed, 19 Dec 2012 10:28:34 +0000 (10:28 +0000)] 
Wibbles to faa8ff40 (UNPACK pragmas)

Nothing big here, just tidying up deetails

6 years agoTidy up documtation of monomorphsim restriction etc
Simon Peyton Jones [Wed, 19 Dec 2012 09:10:26 +0000 (09:10 +0000)] 
Tidy up documtation of monomorphsim restriction etc

6 years agoDocument the behavior of "info!".
Iavor S. Diatchki [Wed, 19 Dec 2012 00:21:54 +0000 (16:21 -0800)] 
Document the behavior of "info!".

6 years agoA better fix for #7493 (see comment for details)
Simon Marlow [Tue, 18 Dec 2012 09:10:26 +0000 (09:10 +0000)] 
A better fix for #7493 (see comment for details)

6 years agoRevert "Fix a bug in the handling of nested orElse"
Simon Marlow [Tue, 18 Dec 2012 08:43:29 +0000 (08:43 +0000)] 
Revert "Fix a bug in the handling of nested orElse"

This reverts commit f184d9caffa09750ef6a374a7987b9213d6db28e.

The next commit will fix it in a better way.

6 years agoSmall refactoring: makes it easier to see what nativeCodeGen actually does
Ian Lynagh [Sun, 16 Dec 2012 14:06:53 +0000 (14:06 +0000)] 
Small refactoring: makes it easier to see what nativeCodeGen actually does

6 years agoPPC: Implement stack resizing for the linear register allocator.
Erik de Castro Lopo [Sat, 15 Dec 2012 17:40:54 +0000 (04:40 +1100)] 
PPC: Implement stack resizing for the linear register allocator.

Fixes #7498.

6 years agoDe-tab compiler/nativeGen/PPC/Instr.hs.
Erik de Castro Lopo [Sat, 15 Dec 2012 09:55:21 +0000 (20:55 +1100)] 
De-tab compiler/nativeGen/PPC/Instr.hs.

6 years agoCall gcc with '-x assembler-with-cpp' instead of '-x assembler'.
Erik de Castro Lopo [Sat, 15 Dec 2012 17:22:17 +0000 (04:22 +1100)] 
Call gcc with '-x assembler-with-cpp' instead of '-x assembler'.

On x86 and powerpc, the second form above was ignoring all the CPP
lines and hence trying to compile x86 asm on powerpc and powerpc asm
on x86.

6 years agoImplement the slow mode of -dynamic-too
Ian Lynagh [Thu, 13 Dec 2012 22:40:12 +0000 (22:40 +0000)] 
Implement the slow mode of -dynamic-too

I'm not sure if making an entirely new HscEnv is too large a hammer,
but it works for now.

6 years agoRename remaining FastBytes usages to ByteString
Ian Lynagh [Fri, 14 Dec 2012 19:23:17 +0000 (19:23 +0000)] 
Rename remaining FastBytes usages to ByteString

6 years agoRemove the trivial mkFastStringFastBytes wrapper
Ian Lynagh [Fri, 14 Dec 2012 18:14:51 +0000 (18:14 +0000)] 
Remove the trivial mkFastStringFastBytes wrapper

6 years agoUse ByteString rather than FastBytes in Binary
Ian Lynagh [Fri, 14 Dec 2012 18:12:09 +0000 (18:12 +0000)] 
Use ByteString rather than FastBytes in Binary

6 years agoMerge branch 'master' of darcs.haskell.org:/home/darcs/ghc
Simon Peyton Jones [Fri, 14 Dec 2012 17:39:34 +0000 (17:39 +0000)] 
Merge branch 'master' of darcs.haskell.org:/home/darcs/ghc

Conflicts:
compiler/typecheck/TcTyClsDecls.lhs

6 years agoMajor refactoring of the way that UNPACK pragmas are handled
Simon Peyton Jones [Fri, 14 Dec 2012 17:37:25 +0000 (17:37 +0000)] 
Major refactoring of the way that UNPACK pragmas are handled

The situation was pretty dire.  The way in which data constructors
were handled, notably the mapping between their *source* argument types
and their *representation* argument types (after seq'ing and unpacking)
was scattered in three different places, and hard to keep in sync.

Now it is all in one place:

 * The dcRep field of a DataCon gives its representation,
   specified by a DataConRep

 * As well as having the wrapper, the DataConRep has a "boxer"
   of type DataConBoxer (defined in MkId for loopy reasons).
   The boxer used at a pattern match to reconstruct the source-level
   arguments from the rep-level bindings in the pattern match.

 * The unboxing in the wrapper and the boxing in the boxer are dual,
   and are now constructed together, by MkId.mkDataConRep. This is
   the key function of this change.

 * All the computeBoxingStrategy code in TcTyClsDcls disappears.

Much nicer.

There is a little bit of refactoring left to do; the strange
deepSplitProductType functions are now called only in WwLib, so
I moved them there, and I think they could be tidied up further.

6 years agoRemove a couple more FastBytes functions
Ian Lynagh [Fri, 14 Dec 2012 01:06:05 +0000 (01:06 +0000)] 
Remove a couple more FastBytes functions

6 years agoUse BS.pack instead of mkFastBytesByteList
Ian Lynagh [Fri, 14 Dec 2012 01:02:12 +0000 (01:02 +0000)] 
Use BS.pack instead of mkFastBytesByteList

6 years agoWhitespace only in hsSyn/Convert.lhs
Ian Lynagh [Fri, 14 Dec 2012 00:52:20 +0000 (00:52 +0000)] 
Whitespace only in hsSyn/Convert.lhs

6 years agoInline some FastBytes/ByteString wrappers
Ian Lynagh [Fri, 14 Dec 2012 00:42:54 +0000 (00:42 +0000)] 
Inline some FastBytes/ByteString wrappers

Working towards removing FastBytes

6 years agoMerge branch 'master' of darcs.haskell.org:/srv/darcs//ghc
Ian Lynagh [Thu, 13 Dec 2012 22:40:50 +0000 (22:40 +0000)] 
Merge branch 'master' of darcs.haskell.org:/srv/darcs//ghc

6 years agoMake enabled_capabilities visible (fixes dynamic linking)
Simon Marlow [Thu, 13 Dec 2012 22:18:49 +0000 (22:18 +0000)] 
Make enabled_capabilities visible (fixes dynamic linking)

6 years agoRemove most of TailCalls.h
Simon Marlow [Tue, 11 Dec 2012 16:53:24 +0000 (16:53 +0000)] 
Remove most of TailCalls.h

it was only needed for registerised compilation.

6 years agoMerge branch 'master' of darcs.haskell.org:/srv/darcs//ghc
Ian Lynagh [Thu, 13 Dec 2012 22:00:15 +0000 (22:00 +0000)] 
Merge branch 'master' of darcs.haskell.org:/srv/darcs//ghc

6 years agoMerge ../bs
Ian Lynagh [Thu, 13 Dec 2012 21:57:59 +0000 (21:57 +0000)] 
Merge ../bs

6 years agoImplement word2Float# and word2Double#
Johan Tibell [Thu, 6 Dec 2012 03:08:48 +0000 (19:08 -0800)] 
Implement word2Float# and word2Double#

6 years agoMake FastBytes a synonym for ByteString
Ian Lynagh [Thu, 13 Dec 2012 20:20:58 +0000 (20:20 +0000)] 
Make FastBytes a synonym for ByteString

A step on the way to getting rid of FastBytes

slow nofib Compile times look like:
    -1 s.d.   -2.4%
    +1 s.d.   +3.4%
    Average   +0.4%
but looking at the times for the longer-running compilations I think the
change is just noise.

7 years agoMerge ../bs
Ian Lynagh [Wed, 12 Dec 2012 21:34:53 +0000 (21:34 +0000)] 
Merge ../bs

7 years agoUse ByteString rather than FastBytes inside FastZString
Ian Lynagh [Wed, 12 Dec 2012 17:12:13 +0000 (17:12 +0000)] 
Use ByteString rather than FastBytes inside FastZString

Slow nofib Compile Times difference looks like just noise:
-1 s.d.        -2.9%
+1 s.d.        +2.9%
Average        -0.1%

7 years agoAdd a comment
Ian Lynagh [Wed, 12 Dec 2012 17:52:51 +0000 (17:52 +0000)] 
Add a comment

7 years agoSmall code tidy-up
Ian Lynagh [Wed, 12 Dec 2012 17:16:53 +0000 (17:16 +0000)] 
Small code tidy-up

7 years agotypo
Gabor Greif [Wed, 12 Dec 2012 09:26:49 +0000 (10:26 +0100)] 
typo

7 years agoImplement the -dynamic-too optimised path for the NCG
Ian Lynagh [Tue, 11 Dec 2012 20:41:18 +0000 (20:41 +0000)] 
Implement the -dynamic-too optimised path for the NCG

We don't yet have the slow path, for when we have to fall back to
separate compilation.

We also only currently handle the case qhere we're compiling Haskell
code with the NCG.

7 years agoAdd more plumbing to the nativeCodeGen
Ian Lynagh [Tue, 11 Dec 2012 19:09:01 +0000 (19:09 +0000)] 
Add more plumbing to the nativeCodeGen

This patch adds more of the plumbing necessary to allow the nativeGen
to build multiple ways in a single compilation.

7 years agoTweak how 'count' is handled in the nativeCodeGen
Ian Lynagh [Tue, 11 Dec 2012 18:35:28 +0000 (18:35 +0000)] 
Tweak how 'count' is handled in the nativeCodeGen

We were always passing 0 to cmmNativeGenStream, so now the 0 is just
hardcoded there.

7 years agoPackage the NativeGen state up into a named type
Ian Lynagh [Tue, 11 Dec 2012 18:17:57 +0000 (18:17 +0000)] 
Package the NativeGen state up into a named type

This will make it a little more pleasant to have the nativegen
build for multiple ways at once.

7 years agoSmall refactoring: Use more idiomatic strictness forcing in AsmCodeGen
Ian Lynagh [Tue, 11 Dec 2012 17:04:06 +0000 (17:04 +0000)] 
Small refactoring: Use more idiomatic strictness forcing in AsmCodeGen

7 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Ian Lynagh [Tue, 11 Dec 2012 16:35:38 +0000 (16:35 +0000)] 
Merge branch 'master' of darcs.haskell.org/ghc

7 years agoadd enabled_capabilities (#7491)
Simon Marlow [Tue, 11 Dec 2012 15:38:00 +0000 (15:38 +0000)] 
add enabled_capabilities (#7491)

7 years agodocument special "this" syntax for PackageImports (#7409)
Simon Marlow [Tue, 11 Dec 2012 09:20:24 +0000 (09:20 +0000)] 
document special "this" syntax for PackageImports (#7409)

7 years agoFix #7487
Jose Pedro Magalhaes [Fri, 7 Dec 2012 16:24:06 +0000 (16:24 +0000)] 
Fix #7487

Signed-off-by: Jose Pedro Magalhaes <jpm@cs.ox.ac.uk>
7 years agoFix a bug in the handling of nested orElse
Simon Marlow [Mon, 10 Dec 2012 12:00:54 +0000 (12:00 +0000)] 
Fix a bug in the handling of nested orElse

Exposed by the following snippet, courtesy of Bas van Dijk and Patrick
Palka on libraries@haskell.org:

import Control.Concurrent.STM
main = do
  x <- atomically $ do
         t <- newTVar 1
         writeTVar t 2
         ((readTVar t >> retry) `orElse` return ()) `orElse` return ()
         readTVar t
  print x

7 years agoAdd -funbox-strict-primitive-fields example
Johan Tibell [Mon, 10 Dec 2012 00:12:36 +0000 (16:12 -0800)] 
Add -funbox-strict-primitive-fields example

7 years agoChange how sync-all handles directory changes
Ian Lynagh [Sun, 9 Dec 2012 19:34:28 +0000 (19:34 +0000)] 
Change how sync-all handles directory changes

We now remember the current working directory right at the start,
and change back to it after we've finished working in a subdirectory.

This should fix a problem some people have been seeing, where
sync-all thinks that they have an out-of-date time library because
its working directory has gone wrong somehow.

7 years agoFix loading dynamic interfaces when using -dynamic-too
Ian Lynagh [Sat, 8 Dec 2012 19:52:24 +0000 (19:52 +0000)] 
Fix loading dynamic interfaces when using -dynamic-too

We need to have WayDyn in the ways in the DynFlags, or the interface
loader will fail.

-dynamic-too now correctly evaluates whether or not it is possible to
build for the dynamic way too, but doesn't actually do so yet.

7 years agoAdd a function to change DynFlags to be suitable for compiling for way=dynamic
Ian Lynagh [Sat, 8 Dec 2012 19:03:00 +0000 (19:03 +0000)] 
Add a function to change DynFlags to be suitable for compiling for way=dynamic

Will be used when we are compiling with -dynamic-too. This needed a
little refactoring of the "addWay" code to allow the code to be shared.

7 years agoAdd replaceDynFlags to the ContainsDynFlags class
Ian Lynagh [Sat, 8 Dec 2012 17:16:07 +0000 (17:16 +0000)] 
Add replaceDynFlags to the ContainsDynFlags class

7 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Ian Lynagh [Sat, 8 Dec 2012 16:43:13 +0000 (16:43 +0000)] 
Merge branch 'master' of darcs.haskell.org/ghc

7 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Ian Lynagh [Sat, 8 Dec 2012 16:24:00 +0000 (16:24 +0000)] 
Merge branch 'master' of darcs.haskell.org/ghc

7 years agoMerge branch 'master' of darcs.haskell.org:/srv/darcs//ghc
Ian Lynagh [Sat, 8 Dec 2012 15:50:53 +0000 (15:50 +0000)] 
Merge branch 'master' of darcs.haskell.org:/srv/darcs//ghc

7 years agoTweaks to dynamic-too code
Ian Lynagh [Fri, 7 Dec 2012 23:20:19 +0000 (23:20 +0000)] 
Tweaks to dynamic-too code

7 years agoRefactor primitive field unpacking check
Johan Tibell [Fri, 7 Dec 2012 22:08:21 +0000 (14:08 -0800)] 
Refactor primitive field unpacking check

7 years agoMinor twiddle to -funbox-strict-primitive-fields docs
Johan Tibell [Fri, 7 Dec 2012 19:56:51 +0000 (11:56 -0800)] 
Minor twiddle to -funbox-strict-primitive-fields docs

7 years agoMerge branch 'master' of darcs.haskell.org:/srv/darcs//ghc
Ian Lynagh [Fri, 7 Dec 2012 18:38:29 +0000 (18:38 +0000)] 
Merge branch 'master' of darcs.haskell.org:/srv/darcs//ghc

7 years agoDon't set "-O0 -g" C flags when -debug is given
Ian Lynagh [Fri, 7 Dec 2012 18:36:54 +0000 (18:36 +0000)] 
Don't set "-O0 -g" C flags when -debug is given

-debug now only determines whether or not a debug RTS is linked in.
To get main() with debugging symbols you need to explicitly say
    -optc-O0 -optc-g

7 years agoDocument -funbox-strict-primitive-fields
Johan Tibell [Fri, 7 Dec 2012 17:00:04 +0000 (09:00 -0800)] 
Document -funbox-strict-primitive-fields

7 years agoDetabbing
Jose Pedro Magalhaes [Fri, 7 Dec 2012 08:55:41 +0000 (08:55 +0000)] 
Detabbing

7 years agoPessimistically assume that unknown arches can't do unaligned loads
Ian Lynagh [Fri, 7 Dec 2012 16:15:24 +0000 (16:15 +0000)] 
Pessimistically assume that unknown arches can't do unaligned loads

7 years agoInvalidate the ModSummary cache in setSessionDynFlags (#7478)
Simon Marlow [Fri, 7 Dec 2012 12:05:29 +0000 (12:05 +0000)] 
Invalidate the ModSummary cache in setSessionDynFlags (#7478)

7 years agofix code in library initialisation example (#7471)
Simon Marlow [Fri, 7 Dec 2012 10:35:40 +0000 (10:35 +0000)] 
fix code in library initialisation example (#7471)

7 years agofix description of ghci instance env bug
Simon Marlow [Fri, 7 Dec 2012 10:35:13 +0000 (10:35 +0000)] 
fix description of ghci instance env bug

7 years agoAdd -funbox-strict-primitive-fields
Johan Tibell [Thu, 29 Nov 2012 08:06:19 +0000 (00:06 -0800)] 
Add -funbox-strict-primitive-fields

When enabled, this flag causes all strict fields which representation is
smaller or equal to the size of a pointer to be unboxed.

7 years agoMerge branch 'master' of mac:ghc/git/val64/.
Ian Lynagh [Thu, 6 Dec 2012 20:50:45 +0000 (20:50 +0000)] 
Merge branch 'master' of mac:ghc/git/val64/.

7 years agoMake nativeCodeGen return the rest of its UniqSupply
Ian Lynagh [Thu, 6 Dec 2012 19:34:27 +0000 (19:34 +0000)] 
Make nativeCodeGen return the rest of its UniqSupply

7 years agoMerge branch 'master' of darcs.haskell.org:/srv/darcs//ghc
Ian Lynagh [Thu, 6 Dec 2012 16:14:01 +0000 (16:14 +0000)] 
Merge branch 'master' of darcs.haskell.org:/srv/darcs//ghc

7 years agoStop attempting to "trim" data types in interface files
Simon Peyton Jones [Thu, 6 Dec 2012 16:03:16 +0000 (16:03 +0000)] 
Stop attempting to "trim" data types in interface files

Without -O, we previously tried to make interface files smaller
by not including the data constructors of data types.  But
there are a lot of exceptions, notably when Template Haskell is
involved or, more recently, DataKinds.

However Trac #7445 shows that even without TemplateHaskell, using
the Data class and invoking Language.Haskell.TH.Quote.dataToExpQ
is enough to require us to expose the data constructors.

So I've given up on this "optimisation" -- it's probably not
important anyway.  Now I'm simply not attempting to trim off
the data constructors.  The gain in simplicity is worth the
modest cost in interface file growth, which is limited to the
bits reqd to describe those data constructors.

7 years agoUse a MonadIO instance instead of an 'io' function
Ian Lynagh [Wed, 5 Dec 2012 22:46:33 +0000 (22:46 +0000)] 
Use a MonadIO instance instead of an 'io' function

7 years agoAdd the beginnings of support for building vanilla and dynamic at the same time
Ian Lynagh [Wed, 5 Dec 2012 21:42:50 +0000 (21:42 +0000)] 
Add the beginnings of support for building vanilla and dynamic at the same time

7 years agoWhitespace only in iface/IfaceType.lhs
Ian Lynagh [Wed, 5 Dec 2012 20:45:34 +0000 (20:45 +0000)] 
Whitespace only in iface/IfaceType.lhs

7 years agoRefactor findAndReadIface; no functional changes
Ian Lynagh [Wed, 5 Dec 2012 20:35:16 +0000 (20:35 +0000)] 
Refactor findAndReadIface; no functional changes

7 years agoTypo
Ian Lynagh [Wed, 5 Dec 2012 19:27:42 +0000 (19:27 +0000)] 
Typo

7 years agoMerge branch 'master' of darcs.haskell.org:/srv/darcs//ghc
Ian Lynagh [Wed, 5 Dec 2012 18:30:51 +0000 (18:30 +0000)] 
Merge branch 'master' of darcs.haskell.org:/srv/darcs//ghc

7 years agoDocument promotion of existential data types
Simon Peyton Jones [Wed, 5 Dec 2012 16:41:53 +0000 (16:41 +0000)] 
Document promotion of existential data types

Thanks to Richard Eisenberg for writing this.

7 years agoWhen using a GHC plugin, load its interface file very partially: just enough that...
Daniel Vainsencher [Mon, 26 Nov 2012 11:18:50 +0000 (11:18 +0000)] 
When using a GHC plugin, load its interface file very partially: just enough that it can be used, without its rules and instances affecting (and being linked from!) the module being compiled.

7 years agoDon't define DYNAMIC when compiling the dyn way
Ian Lynagh [Wed, 5 Dec 2012 16:29:07 +0000 (16:29 +0000)] 
Don't define DYNAMIC when compiling the dyn way

We want to compile the sources only once, and to produce both vanilla
and dyn object files. This means that the sources can't differ for the
two ways.

This needed a bit of a kludge to get keepCAFsForGHCi included only in
the dynamic library.

7 years agoIn FP_GCC_VERSION, test $CC not $GCC
Ian Lynagh [Wed, 5 Dec 2012 12:37:52 +0000 (12:37 +0000)] 
In FP_GCC_VERSION, test $CC not $GCC

$GCC is empty when autoreconf 2.56 or 2.59 is used, although it works
with 2.67. If testing $GCC with 2.5* worked in the past then I'm not
sure when/why it broke.

7 years agoMerge branch 'master' of darcs.haskell.org:/home/darcs/ghc
Simon Peyton Jones [Wed, 5 Dec 2012 11:18:26 +0000 (11:18 +0000)] 
Merge branch 'master' of darcs.haskell.org:/home/darcs/ghc

7 years agoAdd comment
Simon Peyton Jones [Wed, 5 Dec 2012 11:17:20 +0000 (11:17 +0000)] 
Add comment

7 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Simon Peyton Jones [Wed, 5 Dec 2012 11:07:53 +0000 (11:07 +0000)] 
Merge branch 'master' of darcs.haskell.org/ghc