5 years agoInstead of tracking Origin in LHsBindsLR, track it in MatchGroup
Dr. ERDI Gergo [Sat, 12 Apr 2014 11:36:31 +0000 (19:36 +0800)] 
Instead of tracking Origin in LHsBindsLR, track it in MatchGroup

5 years agoMake BlockAlloc.c comment slightly more accurate (fixes #8491)
Edward Z. Yang [Sun, 13 Apr 2014 08:09:40 +0000 (01:09 -0700)] 
Make BlockAlloc.c comment slightly more accurate (fixes #8491)

Signed-off-by: Edward Z. Yang <>
5 years agoFix linked list manipulation code (buggy on consecutive deletion)
Edward Z. Yang [Sun, 13 Apr 2014 06:02:13 +0000 (23:02 -0700)] 
Fix linked list manipulation code (buggy on consecutive deletion)

Signed-off-by: Edward Z. Yang <>
5 years agoExpected output of as-pattern test
Dr. ERDI Gergo [Sat, 12 Apr 2014 09:52:26 +0000 (17:52 +0800)] 
Expected output of as-pattern test

5 years agoAdd source file for new test that checks that as-patterns are rejected
Dr. ERDI Gergo [Sat, 12 Apr 2014 08:35:44 +0000 (16:35 +0800)] 
Add source file for new test that checks that as-patterns are rejected
in pattern synonym definitions

5 years agoRemove unused variable binding to fix validate
Dr. ERDI Gergo [Sat, 12 Apr 2014 00:57:27 +0000 (08:57 +0800)] 
Remove unused variable binding to fix validate

5 years agoUpdate Haddock submodule reference.
Mateusz Kowalczyk [Fri, 11 Apr 2014 18:15:07 +0000 (19:15 +0100)] 
Update Haddock submodule reference.

5 years agoFix #8641, creating directories when we have stubs.
Edward Z. Yang [Fri, 11 Apr 2014 01:28:11 +0000 (18:28 -0700)] 
Fix #8641, creating directories when we have stubs.

Signed-off-by: Edward Z. Yang <>
5 years agoSplit off pattern synonym definition checking from pattern inversion
Dr. ERDI Gergo [Thu, 10 Apr 2014 14:13:00 +0000 (22:13 +0800)] 
Split off pattern synonym definition checking from pattern inversion

5 years agoFix egregious blunder in the type flattener
Simon Peyton Jones [Wed, 9 Apr 2014 21:47:09 +0000 (22:47 +0100)] 
Fix egregious blunder in the type flattener

In tidying up the flattener I introduced an error that no
regression test caught, giving rise to Trac #8978, #8979.
It shows up if you have a type synonym whose RHS mentions
type functions, such sas
     type family F a
     type T a = (F a, a)   -- This synonym isn't properly flattened

The fix is easy, but sadly the bug is in the released GHC 7.8.1

5 years agoSuppress uniques to stop output wobbling (test for Trac #8958)
Simon Peyton Jones [Wed, 9 Apr 2014 21:40:22 +0000 (22:40 +0100)] 
Suppress uniques to stop output wobbling (test for Trac #8958)

5 years agoFix #5435, adding new test config check_stdout.
Edward Z. Yang [Wed, 9 Apr 2014 09:32:21 +0000 (02:32 -0700)] 
Fix #5435, adding new test config check_stdout.

check_stdout(f) allows you to override the test framework's
diff based output checking with another mechanism.  f is
a function which takes two arguments: the first is the
filename containing the observed stdout, the second is the
normaliser that would have been applied (in case you want
to read, normalise, and then do something.)

Signed-off-by: Edward Z. Yang <>
5 years agoImprove error reporting for untouchable type variables
Simon Peyton Jones [Tue, 8 Apr 2014 16:37:45 +0000 (17:37 +0100)] 
Improve error reporting for untouchable type variables

This change adds a suggestion
    Possible fix: add a type signature for â€˜f’
when we have a GADT-style definition with a
type we can't figure out.

See Note [Suggest adding a type signature] in TcErrors.

This initially came up in the discussion of Trac #8968.

5 years agoTest Trac #8963
Simon Peyton Jones [Tue, 8 Apr 2014 15:28:56 +0000 (16:28 +0100)] 
Test Trac #8963

5 years agoRefactor in worker/wrapper generation
Simon Peyton Jones [Tue, 8 Apr 2014 15:28:31 +0000 (16:28 +0100)] 
Refactor in worker/wrapper generation

I don't think there should be any change in behaviour, but
the code is clearer now.  Function checkSize is elimiated
in favour of doing those checks before (rather than after)

5 years agoAllow a longer demand signature than arity
Simon Peyton Jones [Tue, 8 Apr 2014 15:20:11 +0000 (16:20 +0100)] 
Allow a longer demand signature than arity

See Note [Demand analysis for trivial right-hand sides] in DmdAnal.
This allows a function with arity 2 to have a DmdSig with 3 args;
which in turn had a knock-on effect, which showed up in the test for
Trac #8963.

In fact it seems entirely reasonable, so this patch removes the
WARN and CoreLint checks that were complaining.

5 years agoDon't preprocess .s files
Simon Marlow [Tue, 8 Apr 2014 09:21:27 +0000 (10:21 +0100)] 
Don't preprocess .s files

One important reason is that gcc 4.8.1 sometimes crashes:

Another reason is that preprocessing assembly files unnecessarily
slows down compilation.

5 years agoAdd comments & notes explaining the typing of pattern synonym definitions
Dr. ERDI Gergo [Tue, 8 Apr 2014 14:29:23 +0000 (22:29 +0800)] 
Add comments & notes explaining the typing of pattern synonym definitions

5 years agoImprove documentation of GeneralisedNewtypeDeriving
Simon Peyton Jones [Tue, 8 Apr 2014 08:43:13 +0000 (09:43 +0100)] 
Improve documentation of GeneralisedNewtypeDeriving

5 years agoZonk the existential type variables in tcPatSynDecl
Simon Peyton Jones [Tue, 8 Apr 2014 08:42:51 +0000 (09:42 +0100)] 
Zonk the existential type variables in tcPatSynDecl

This was just an omission, which showed up as Trac #8966

5 years agoImprove tracing slightly
Simon Peyton Jones [Tue, 8 Apr 2014 08:41:20 +0000 (09:41 +0100)] 
Improve tracing slightly

5 years agoClarify bits about role inference in users' guide.
Richard Eisenberg [Tue, 8 Apr 2014 03:41:24 +0000 (23:41 -0400)] 
Clarify bits about role inference in users' guide.

5 years agousers_guide: note -XPatternSynonyms is required for use sites
Austin Seipp [Mon, 7 Apr 2014 15:15:05 +0000 (10:15 -0500)] 
users_guide: note -XPatternSynonyms is required for use sites

Signed-off-by: Austin Seipp <>
5 years agoDerive Typable for promoted data constructors (Trac #8950)
Simon Peyton Jones [Mon, 7 Apr 2014 14:45:35 +0000 (15:45 +0100)] 
Derive Typable for promoted data constructors (Trac #8950)

I got sucked into a significant refactoring of the way that
Typeable instances are derived.  This makes it simpler and
more uniform.

I also improved the documentation in the user manual.  Typeable
really is different to other classes, and now gets its own subsection.

5 years agoInclude LD_OPTS when building the RTS shared libs
Simon Marlow [Mon, 7 Apr 2014 12:51:29 +0000 (13:51 +0100)] 
Include LD_OPTS when building the RTS shared libs

5 years agoIgnore repeated loads of the same archive (#8942)
Simon Marlow [Mon, 7 Apr 2014 08:15:14 +0000 (09:15 +0100)] 
Ignore repeated loads of the same archive (#8942)

5 years agoUpdate long-out-of-date performance numbers on 32-bit
Simon Peyton Jones [Mon, 7 Apr 2014 14:22:46 +0000 (15:22 +0100)] 
Update long-out-of-date performance numbers on 32-bit

Many are improvements!

5 years agoSmall issue with signatures in a TH splice (fixes Trac #8932)
Simon Peyton Jones [Mon, 7 Apr 2014 14:22:11 +0000 (15:22 +0100)] 
Small issue with signatures in a TH splice (fixes Trac #8932)

5 years agoRequire PatternSynonyms language flag when encountering a use of pattern synonym
Dr. ERDI Gergo [Sun, 6 Apr 2014 13:26:46 +0000 (21:26 +0800)] 
Require PatternSynonyms language flag when encountering a use of pattern synonym

5 years agoAdd test case for #8950.
Richard Eisenberg [Sat, 5 Apr 2014 17:58:17 +0000 (13:58 -0400)] 
Add test case for #8950.

5 years agoFix #8958.
Richard Eisenberg [Sat, 5 Apr 2014 17:56:00 +0000 (13:56 -0400)] 
Fix #8958.

We now do role inference on stupid datatype contexts, allowing a
lightweight role annotation syntax.

5 years agoDisable thin archive support on Windows
Simon Marlow [Fri, 4 Apr 2014 16:02:20 +0000 (17:02 +0100)] 
Disable thin archive support on Windows

5 years agoTest return value of clock_gettime() for errors.
Simon Marlow [Tue, 1 Apr 2014 12:10:27 +0000 (13:10 +0100)] 
Test return value of clock_gettime() for errors.

I don't want to fall back to gettimeofday(), because that might have a
different absolute value.

5 years agoFix copy/paste error (#8937)
Simon Marlow [Tue, 1 Apr 2014 12:02:59 +0000 (13:02 +0100)] 
Fix copy/paste error (#8937)

5 years agowindows: Fix #8870
Austin Seipp [Fri, 4 Apr 2014 15:33:14 +0000 (10:33 -0500)] 
windows: Fix #8870

This bumps the amount of default reserved and committed stack for GHC
executables to 8mb, to work around #8870. A proper fix should happen in

See note [Windows stack usage] in SysTools for the details.

Signed-off-by: Austin Seipp <>
5 years agoRevert "Revert ad15c2, which causes Windows seg-faults (Trac #8834)"
Austin Seipp [Fri, 4 Apr 2014 15:33:03 +0000 (10:33 -0500)] 
Revert "Revert ad15c2, which causes Windows seg-faults (Trac #8834)"

This reverts commit a79613a75c7da0d3d225850382f0f578a07113b5.

5 years agoSimplify and tidy up the handling of tuple names
Simon Peyton Jones [Fri, 4 Apr 2014 07:41:35 +0000 (08:41 +0100)] 
Simplify and tidy up the handling of tuple names

This fixes Trac #8954.

There were actually three places where tuple occ-names
were parsed:
  - IfaceEnv.lookupOrigNameCache
  - Convert.isBuiltInOcc
  - OccName.isTupleOcc_maybe

I combined all three into TysWiredIn.isBuiltInOcc_maybe
Much nicer.

5 years agoWith AutoDeriveTypeable, derive for promoted constructors, too.
Richard Eisenberg [Fri, 4 Apr 2014 04:39:59 +0000 (00:39 -0400)] 
With AutoDeriveTypeable, derive for promoted constructors, too.

This addresses #8950. However, the problem isn't completely solved,
because the Prelude types' Typeable instances are not created by

5 years agoUpdate Haddock submodule
Mateusz Kowalczyk [Thu, 3 Apr 2014 20:21:12 +0000 (21:21 +0100)] 
Update Haddock submodule

5 years agoParse the variables in a type signature in the order given (Trac #8945)
Simon Peyton Jones [Thu, 3 Apr 2014 14:55:46 +0000 (15:55 +0100)] 
Parse the variables in a type signature in the order given (Trac #8945)

This is just making the parser behave more sensibly, and return
the list [x,y,z] from the signature
   x,y,z :: Int
rathe than [x,z,y] as now.

Turns out that the other use of sig_vars *did* do the right
thing already.

5 years agoTest Trac #8931
Simon Peyton Jones [Thu, 3 Apr 2014 12:34:52 +0000 (13:34 +0100)] 
Test Trac #8931

5 years agoFix desguaring of bang patterns (Trac #8952)
Simon Peyton Jones [Thu, 3 Apr 2014 12:30:59 +0000 (13:30 +0100)] 
Fix desguaring of bang patterns (Trac #8952)

A palpable bug, although one that will rarely bite

5 years agoMake sure that polykinded Typeable is defaultable (Trac #8931)
Simon Peyton Jones [Tue, 1 Apr 2014 13:34:11 +0000 (14:34 +0100)] 
Make sure that polykinded Typeable is defaultable (Trac #8931)

5 years agoUpdate Haddock submodule
Mateusz Kowalczyk [Tue, 1 Apr 2014 18:15:53 +0000 (19:15 +0100)] 
Update Haddock submodule

5 years agoSupport thin archive format
Simon Marlow [Fri, 28 Mar 2014 14:43:53 +0000 (14:43 +0000)] 
Support thin archive format

This is a patch from FB's internal build of GHC that I'm pushing

Author: Andrew Gallagher <>

This diff adds simple thin archive support to ghc's linker code, which
basically just entails finding the member data from disk rather than
from inside the archive (except for the case of the symbol index and
gnu filename index, where the member data is still inline).

5 years agoTemporarily fight off build bogons on OS X
Austin Seipp [Mon, 31 Mar 2014 11:47:44 +0000 (06:47 -0500)] 
Temporarily fight off build bogons on OS X

Right now there's a bug with Clang that prevents 'cabal haddock' from
working nicely. But there's an easy fix for now.

Signed-off-by: Austin Seipp <>
5 years agoUpdate Haddock submodule
Mateusz Kowalczyk [Mon, 31 Mar 2014 04:40:50 +0000 (05:40 +0100)] 
Update Haddock submodule

5 years agoAdd inline versions of copy ops for small arrays
Johan Tibell [Sun, 30 Mar 2014 13:12:01 +0000 (15:12 +0200)] 
Add inline versions of copy ops for small arrays

If the number of elements being copied is known statically this might
lead to the copy loop being unrolled in the backend.

5 years agoCopySmallArrayStressTest needs random
Joachim Breitner [Sat, 29 Mar 2014 20:08:17 +0000 (21:08 +0100)] 
CopySmallArrayStressTest needs random

5 years agoAdd more missing linker symbols
Johan Tibell [Sat, 29 Mar 2014 16:17:41 +0000 (17:17 +0100)] 
Add more missing linker symbols

5 years agoPrimOps.cmm: whitespace only
Johan Tibell [Fri, 28 Mar 2014 08:21:10 +0000 (09:21 +0100)] 
PrimOps.cmm: whitespace only

Harmonize the indentation amount. The file mixed 4, 2, and in some
cases 3 spaces for indentation.

5 years agoAdd missing symbols to linker
Johan Tibell [Sat, 29 Mar 2014 09:57:49 +0000 (10:57 +0100)] 
Add missing symbols to linker

The copy array family of primops were moved out-of-line.

5 years agoAdd SmallArray# and SmallMutableArray# types
Johan Tibell [Sun, 23 Mar 2014 11:06:56 +0000 (12:06 +0100)] 
Add SmallArray# and SmallMutableArray# types

These array types are smaller than Array# and MutableArray# and are
faster when the array size is small, as they don't have the overhead
of a card table. Having no card table reduces the closure size with 2
words in the typical small array case and leads to less work when
updating or GC:ing the array.

Reduces both the runtime and memory allocation by 8.8% on my insert
benchmark for the HashMap type in the unordered-containers package,
which makes use of lots of small arrays. With tuned GC settings
(i.e. `+RTS -A6M`) the runtime reduction is 15%.

Fixes #8923.

5 years agoRemove debugging output
Simon Marlow [Fri, 28 Mar 2014 09:09:38 +0000 (09:09 +0000)] 
Remove debugging output

5 years agoMake copy array ops out-of-line by default
Johan Tibell [Thu, 27 Mar 2014 17:04:56 +0000 (18:04 +0100)] 
Make copy array ops out-of-line by default

This should reduce code size when there's little to gain from inlining
these primops, while still retaining the inlining benefit when the
size of the copy is known statically.

5 years agorts: remove unused functions, fix validate on OS X
Austin Seipp [Thu, 27 Mar 2014 21:51:07 +0000 (16:51 -0500)] 
rts: remove unused functions, fix validate on OS X

After a toolchain update, Clang is no longer appreciative of the fact
these are unused, thanks to -Werror during validate.

Signed-off-by: Austin Seipp <>
5 years agoUse the correct callClobberedRegs on Windows/x64 (#8834)
Simon Marlow [Mon, 24 Mar 2014 14:36:16 +0000 (14:36 +0000)] 
Use the correct callClobberedRegs on Windows/x64 (#8834)

Signed-off-by: Austin Seipp <>
5 years agoincrease bounds for T3064
Simon Marlow [Thu, 27 Mar 2014 13:49:36 +0000 (13:49 +0000)] 
increase bounds for T3064

5 years agoUse LDFLAGS when compiling ghc-pwd
Simon Marlow [Thu, 27 Mar 2014 12:34:38 +0000 (12:34 +0000)] 
Use LDFLAGS when compiling ghc-pwd

5 years agoInclude SRC_CC_OPTS and SRC_LD_OPTS when compiling ghc-cabal
Simon Marlow [Thu, 27 Mar 2014 12:33:44 +0000 (12:33 +0000)] 
Include SRC_CC_OPTS and SRC_LD_OPTS when compiling ghc-cabal

5 years agoPass custom CC and LD opts to Cabal when configuring a package
Simon Marlow [Thu, 27 Mar 2014 12:29:48 +0000 (12:29 +0000)] 
Pass custom CC and LD opts to Cabal when configuring a package

Cabal compiles a program to check for the existence of foreign
libraries, so it needs to know our custom options, if any.

5 years agoInclude EXTRA_LD_OPTS (amongst other things) when linking programs
Simon Marlow [Tue, 25 Mar 2014 14:32:28 +0000 (14:32 +0000)] 
Include EXTRA_LD_OPTS (amongst other things) when linking programs

One problem was that we weren't including $1_$2_DIST_LD_OPTS when
linking a program, which looks to be accidental: it was being defined
but not used anywhere.  This meant that setting $1_$2_EXTRA_LD_OPTS,
for example, had no effect.

This commit straightens out the handling of LD_OPTS to be consistent
with the way we handle CC_OPTS and HC_OPTS.

5 years agoDon't perform permission checks for scripts named with -ghci-script (#6017)
Simon Marlow [Thu, 20 Mar 2014 21:47:22 +0000 (21:47 +0000)] 
Don't perform permission checks for scripts named with -ghci-script (#6017)

The user explicitly requested this script on the command-line, so it's
unnecessary to require that the script is also owned by the user.
Also, it is currently impossible to make a GHCi wrapper that invokes a
custom script without first making a copy of the script to circumvent
the permissions check, which seems wrong.

5 years ago--with-gcc overrides CC_STAGE0 when not cross-compiling (#8498)
Simon Marlow [Thu, 20 Mar 2014 15:47:18 +0000 (15:47 +0000)] 
--with-gcc overrides CC_STAGE0 when not cross-compiling (#8498)

5 years agoFixup help text
Simon Marlow [Thu, 20 Mar 2014 15:46:41 +0000 (15:46 +0000)] 
Fixup help text

5 years agoAdd flags to control memcpy and memset inlining
Johan Tibell [Wed, 26 Mar 2014 16:08:29 +0000 (17:08 +0100)] 
Add flags to control memcpy and memset inlining

This adds -fmax-inline-memcpy-insns and -fmax-inline-memset-insns.
These flags control when we inline calls to memcpy/memset with
statically known arguments. The flag naming style is taken from GCC
and the same limit is used by both GCC and LLVM.

5 years agoTypos in comments
Gabor Greif [Tue, 25 Mar 2014 21:52:13 +0000 (22:52 +0100)] 
Typos in comments

5 years agoSuppress uniques for simpl016 to normalise debug output
Simon Peyton Jones [Tue, 25 Mar 2014 14:59:38 +0000 (14:59 +0000)] 
Suppress uniques for simpl016 to normalise debug output

5 years agoTest Trac #8848
Simon Peyton Jones [Tue, 25 Mar 2014 14:34:44 +0000 (14:34 +0000)] 
Test Trac #8848

5 years agoComments only
Simon Peyton Jones [Tue, 25 Mar 2014 14:20:10 +0000 (14:20 +0000)] 
Comments only

5 years agoImprove the desugaring of RULE left-hand-sides (fixes Trac #8848)
Simon Peyton Jones [Tue, 25 Mar 2014 14:12:59 +0000 (14:12 +0000)] 
Improve the desugaring of RULE left-hand-sides (fixes Trac #8848)

I've added detailed comments with
  Note [Decomposing the left-hand side of a RULE]

The result is a noticeable improvement.  Previously

 * we rejected a perfectly decent SPECIALISE (Trac #8848)

 * and for something like
      f :: (Eq a) => b -> a -> a
      {-# SPECIALISE f :: b -> [Int] -> [Int] #-}
   we ended up with
      RULE  f ($fdEqList $dfEqInt) = f_spec
   whereas we wanted
      RULES forall (d:Eq [Int]). f d = f_spec

5 years agoEliminate redundant seq's (Trac #8900)
Simon Peyton Jones [Mon, 24 Mar 2014 14:22:50 +0000 (14:22 +0000)] 
Eliminate redundant seq's (Trac #8900)

This patch makes the simplifier eliminate a redundant seq like
    case x of y -> ...y....
where y is used strictly.  GHC used to do this, but I made it less
aggressive in

   commit 28d9a03253e8fd613667526a170b684f2017d299 (Jan 2013)

However #8900 shows that doing so sometimes loses good
transformations; and the transformation is valid according to "A
semantics for imprecise exceptions".  So I'm restoring the old

See Note [Eliminating redundant seqs]

5 years agorelnotes: GND is not -XSafe compatible.
Austin Seipp [Mon, 24 Mar 2014 11:07:27 +0000 (06:07 -0500)] 
relnotes: GND is not -XSafe compatible.

Signed-off-by: Austin Seipp <>
5 years agoComments only
Simon Peyton Jones [Mon, 24 Mar 2014 08:27:20 +0000 (08:27 +0000)] 
Comments only

5 years agoImplicit parameters should not be allowed in class and instance declarations
Simon Peyton Jones [Fri, 21 Mar 2014 15:55:39 +0000 (15:55 +0000)] 
Implicit parameters should not be allowed in class and instance declarations

Trac #8912 pointed out that GHC 7.4 and 7.6 have omitted this test, although
7.2 and earlier had it.  This patch puts the test back in, and refactors a

5 years agoFlattener preserves synonyms, rewriteEvidence can drop buggy "optimisation"
Simon Peyton Jones [Fri, 21 Mar 2014 15:37:27 +0000 (15:37 +0000)] 
Flattener preserves synonyms, rewriteEvidence can drop buggy "optimisation"

There was a special case in rewriteEvidence, looking like:
  = return (Just (if ctEvPred old_ev `tcEqType` new_pred
                  then old_ev
                  else old_ev { ctev_pred = new_pred }))

But this was wrong: old_pred and new_pred might differ in the kind
of a TyVar occurrence, in which case tcEqType would not notice,
but we really, really want new_pred.  This caused Trac #8913.

I solved this by dropping the whole test, and instead making
the flattener preserve type synonyms. This was easy because
TcEvidence has TcTyConAppCo which (unlike) Coercion, handles

5 years agoDebug tracing only
Simon Peyton Jones [Fri, 21 Mar 2014 15:33:10 +0000 (15:33 +0000)] 
Debug tracing only

5 years agoFor equalities with incompatible kinds, new IrredCan goes in the inert set, not work...
Simon Peyton Jones [Fri, 21 Mar 2014 15:32:58 +0000 (15:32 +0000)] 
For equalities with incompatible kinds, new IrredCan goes in the inert set, not work list

This change makes the code for canIrred markedly simpler (and more efficient)
See Note [Equalities with incompatible kinds].

I don't think there was really a bug here, but I came across it when
fixing Trac #8913

5 years agoComments only
Simon Peyton Jones [Fri, 21 Mar 2014 15:26:11 +0000 (15:26 +0000)] 
Comments only

5 years agoDon't export isTcReflCo_maybe (unused)
Simon Peyton Jones [Fri, 21 Mar 2014 15:25:30 +0000 (15:25 +0000)] 
Don't export isTcReflCo_maybe (unused)

5 years agoAdd missing kind-check for tcEqType on forall-types
Simon Peyton Jones [Fri, 21 Mar 2014 15:24:49 +0000 (15:24 +0000)] 
Add missing kind-check for tcEqType on forall-types

This wasn't showing up as a bug, but it was definitely wrong.

5 years agoRevert "change deriveConstants to use nm in a POSIX way (fixes #8781)"
Austin Seipp [Mon, 24 Mar 2014 07:14:09 +0000 (02:14 -0500)] 
Revert "change deriveConstants to use nm in a POSIX way (fixes #8781)"

It causes a failure on Windows right now.

This reverts commit 045b28033a33a48d31951240a8cb35f2b78345dc.

5 years agoRevert "Fix #8745 - GND is now -XSafe compatible."
Austin Seipp [Mon, 24 Mar 2014 04:45:22 +0000 (23:45 -0500)] 
Revert "Fix #8745 - GND is now -XSafe compatible."

See #8827 - for now, we're making GND unsafe again.

This also fixes the tests since they were originally not using the new
unicode quote style we're using.

This reverts commit a8a01e742434df11b830ab99af12d9045dfcbc4b.

5 years agoThe substitution is never needed, so don't prepare it
Gabor Greif [Sun, 23 Mar 2014 22:27:47 +0000 (23:27 +0100)] 
The substitution is never needed, so don't prepare it

5 years agoCatch a bunch of typos in comments
Gabor Greif [Sun, 23 Mar 2014 20:05:10 +0000 (21:05 +0100)] 
Catch a bunch of typos in comments

5 years agoFix typo
Gabor Greif [Sun, 23 Mar 2014 19:33:48 +0000 (20:33 +0100)] 
Fix typo

5 years agoTrac #8831 is fixed
Simon Peyton Jones [Sun, 23 Mar 2014 18:46:22 +0000 (18:46 +0000)] 
Trac #8831 is fixed

5 years agoTest Trac #8893
Simon Peyton Jones [Sun, 23 Mar 2014 18:44:43 +0000 (18:44 +0000)] 
Test Trac #8893

5 years agoSimplify handling of the interactive package; fixes Trac #8831
Simon Peyton Jones [Sat, 22 Mar 2014 23:18:14 +0000 (23:18 +0000)] 
Simplify handling of the interactive package; fixes Trac #8831

This patch is really a fix to the big commint
   Re-work the naming story for the GHCi prompt (Trac #8649)
which introduced the 'interactive' package
See Note [The interactive package] in HscTypes

The original commit set both
  (a) The tcg_mod field of TcGblEnv to 'interactive:Ghci4' (say)
  (b) The thisPackage field of DynFlags to 'interactive'

But the second step interacts badly with linking.  :loaded modules are
in the package set by 'thisPackage' (usually 'main'); if you change
that, then we try to link package 'main', but can't find it, and
that is what happened in #8831.

The fix was simple: do (a) but not (b).

I changed Note [The interactive package] in HscTypes to describe this.

5 years agoApply the kind subst to the (kinds of the) quanitifed tyvars in deriveTyData
Simon Peyton Jones [Sat, 22 Mar 2014 23:11:10 +0000 (23:11 +0000)] 
Apply the kind subst to the (kinds of the) quanitifed tyvars in deriveTyData

I've elaboated Note [Unify kinds in deriving] to explain
what is going on here.

The change fixes Trac #8893.

5 years agoghc-cabal: force use of UTF8 when writing out `haddock-prologue.txt`
Herbert Valerio Riedel [Sun, 23 Mar 2014 12:33:03 +0000 (13:33 +0100)] 
ghc-cabal: force use of UTF8 when writing out `haddock-prologue.txt`

This unbreaks the GHC build if a non-UTF8 locale such as LANG=C is active

See also haskell/cabal#1721 and haskell/haddock#286

Signed-off-by: Herbert Valerio Riedel <>
5 years agoConvert haddock into a proper submodule (re #8545)
Herbert Valerio Riedel [Thu, 20 Mar 2014 08:20:06 +0000 (09:20 +0100)] 
Convert haddock into a proper submodule (re #8545)

This should help contribute content to

Signed-off-by: Herbert Valerio Riedel <>
5 years agochange deriveConstants to use nm in a POSIX way (fixes #8781)
Karel Gardas [Sat, 22 Mar 2014 21:33:05 +0000 (22:33 +0100)] 
change deriveConstants to use nm in a POSIX way (fixes #8781)

The patch provided by Christian Maeder <>

Signed-off-by: Karel Gardas <>
Signed-off-by: Austin Seipp <>
5 years agoAdd a simplistic Vagrantfile with bootstrapping
Austin Seipp [Sat, 22 Mar 2014 20:21:40 +0000 (15:21 -0500)] 
Add a simplistic Vagrantfile with bootstrapping

This adds a simple Vagrantfile to the root directory, which you can use
to easily spin up RHEL/Debian/Ubuntu virtual machine in seconds to test

For example, from the root of the GHC tree, you can say:

    $ vagrant up ubuntu1204-amd64
    $ vagrant ssh ubuntu1204-amd64

This will give you access to a provisioned Ubuntu 12.04 virtual machine
with all the necessary GHC dependencies installed (modulo a few things).

Debian 7/CentOS 6.5/Ubuntu 12.04 only for now, in amd64/i386
configurations. In the future I plan to at least add FreeBSD and NixOS
boxes where possible.

Improvements are necessary of course. By default a box is given 4GB of
RAM and 2 cores, and resolves DNS entries by routing through the host
DNS configuration. Do not run 'vagrant up' unless you have lots of RAM
as it will spawn *every* virtual machine.

Hopefully, this should make it far easier for contributors to get
started eventually.

Signed-off-by: Austin Seipp <>
5 years agoadd --with-ar and --with-ranlib configure parameters
Karel Gardas [Sun, 9 Feb 2014 20:58:05 +0000 (21:58 +0100)] 
add --with-ar and --with-ranlib configure parameters

Both --with-ar and --with-ranlib are usable on non-GNU/Linux systems
where GNU tools are usually installed (or possible to install), but
not into standard location nor with standard name. Tested on Solaris 10.

Signed-off-by: Austin Seipp <>
5 years agosync-all: Skip END actions on exceptions
Florian Weimer [Thu, 13 Mar 2014 09:23:56 +0000 (10:23 +0100)] 
sync-all: Skip END actions on exceptions

Before this change, the END actions were executed even if the code
throws an exception using "die".  This resulted in very confusing
error reporting when an invalid command line option was specified.

Signed-off-by: Austin Seipp <>
5 years agoFix #8917.
Richard Eisenberg [Sat, 22 Mar 2014 17:13:26 +0000 (13:13 -0400)] 
Fix #8917.

FamInstEnv.normaliseTcApp should normalise arguments even when
the top-level tycon isn't a type family. This was a regression
from 7.6 -- not sure when it happened, but it was probably my
fault. Fixed now, in any case.

5 years agoAdd test case for #8917
Richard Eisenberg [Sat, 22 Mar 2014 16:34:40 +0000 (12:34 -0400)] 
Add test case for #8917

5 years agoRemove redundant compatibility check.
Richard Eisenberg [Sat, 22 Mar 2014 03:40:47 +0000 (23:40 -0400)] 
Remove redundant compatibility check.

Previously, the closed type family compatibility check was
done even when type-checking an interface file. But interface
files now store compatibility info, so this check was redundant.

5 years agoComments only -- clarifying Notes around compatibility.
Richard Eisenberg [Fri, 21 Mar 2014 21:22:10 +0000 (17:22 -0400)] 
Comments only -- clarifying Notes around compatibility.