ghc.git
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
AutoDeriveTypeable.

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
upstream.

Author: Andrew Gallagher <agallagher@fb.com>

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 <austin@well-typed.com>
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 <austin@well-typed.com>
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 <austin@well-typed.com>
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
behaviour.

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 <austin@well-typed.com>
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
little.

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
synonyms.

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
   73c08ab10e4077e18e459a1325996bff110360c3
   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 <hvr@gnu.org>
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

  https://ghc.haskell.org/trac/ghc/wiki/WorkingConventions/Git/Submodules

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
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 <Christian.Maeder@dfki.de>

Signed-off-by: Karel Gardas <karel.gardas@centrum.cz>
Signed-off-by: Austin Seipp <austin@well-typed.com>
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
GHC.

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 <austin@well-typed.com>
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 <austin@well-typed.com>
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 <austin@well-typed.com>
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.

5 years agoMake cabal01 pass with Cabal 1.18 (#8738).
Mikhail Glushenkov [Tue, 4 Mar 2014 07:02:36 +0000 (08:02 +0100)] 
Make cabal01 pass with Cabal 1.18 (#8738).

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoEnable popcnt test now when segfault is fixed
Johan Tibell [Sat, 22 Mar 2014 17:30:36 +0000 (18:30 +0100)] 
Enable popcnt test now when segfault is fixed

The fix was to ghc-prim.

5 years agoFollow hs_popcntX changes in ghc-prim
Johan Tibell [Sat, 22 Mar 2014 17:29:29 +0000 (18:29 +0100)] 
Follow hs_popcntX changes in ghc-prim

5 years agoMark test for #8831 as known-broken
Joachim Breitner [Sat, 22 Mar 2014 10:53:03 +0000 (11:53 +0100)] 
Mark test for #8831 as known-broken

to keep validate working.

5 years agocodeGen: inline allocation optimization for clone array primops
Johan Tibell [Thu, 13 Mar 2014 08:35:21 +0000 (09:35 +0100)] 
codeGen: inline allocation optimization for clone array primops

The inline allocation version is 69% faster than the out-of-line
version, when cloning an array of 16 unit elements on a 64-bit
machine.

Comparing the new and the old primop implementations isn't
straightforward. The old version had a missing heap check that I
discovered during the development of the new version. Comparing the
old and the new version would requiring fixing the old version, which
in turn means reimplementing the equivalent of MAYBE_CG in StgCmmPrim.

The inline allocation threshold is configurable via
-fmax-inline-alloc-size which gives the maximum array size, in bytes,
to allocate inline. The size does not include the closure header size.

Allowing the same primop to be either inline or out-of-line has some
implication for how we lay out heap checks. We always place a heap
check around out-of-line primops, as they may allocate outside of our
knowledge. However, for the inline primops we only allow allocation
via the standard means (i.e. virtHp). Since the clone primops might be
either inline or out-of-line the heap check layout code now consults
shouldInlinePrimOp to know whether a primop will be inlined.

5 years agoUpdate ghc --help references to --make and a.out (fixes #8600)
ccatalfo [Wed, 12 Mar 2014 02:11:11 +0000 (22:11 -0400)] 
Update ghc --help references to --make and a.out (fixes #8600)

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agolinker: Fix indirect calls for x86_64 windows (#2283)
Kyrill Briantsev [Fri, 21 Mar 2014 10:42:48 +0000 (05:42 -0500)] 
linker: Fix indirect calls for x86_64 windows (#2283)

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agotestsuite: add test for #8831
Austin Seipp [Fri, 21 Mar 2014 09:42:32 +0000 (04:42 -0500)] 
testsuite: add test for #8831

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoTypos
Austin Seipp [Fri, 21 Mar 2014 09:36:23 +0000 (04:36 -0500)] 
Typos

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoFlush after TH in #8884 test case
Joachim Breitner [Fri, 21 Mar 2014 12:46:15 +0000 (13:46 +0100)] 
Flush after TH in #8884 test case

(I recall that this was needed in some cases in the past, and might fix
the validate error on travis.)

5 years agoDon't use gcptr for interior pointers
Johan Tibell [Thu, 20 Mar 2014 06:58:10 +0000 (07:58 +0100)] 
Don't use gcptr for interior pointers

gcptr should only be used for pointers that the GC should
follow. While this didn't cause any bugs right now, since these
variables aren't live over a GC, it's clearer to use the right type.

5 years agoUpdate expected test outputs to match new format of pretty-printing
Dr. ERDI Gergo [Wed, 19 Mar 2014 13:44:38 +0000 (21:44 +0800)] 
Update expected test outputs to match new format of pretty-printing
interface contents

5 years agoisLexVarSym: check all characters of the name, not just the first one.
Dr. ERDI Gergo [Wed, 19 Mar 2014 12:07:47 +0000 (20:07 +0800)] 
isLexVarSym: check all characters of the name, not just the first one.

This is so that generated names like e.g. workers don't show up as
infix operators when using something like -ddump-simpl.

5 years agoImplement ordering comparisons for type-level naturals and symbols.
Iavor S. Diatchki [Wed, 19 Mar 2014 01:54:23 +0000 (18:54 -0700)] 
Implement ordering comparisons for type-level naturals and symbols.

This is done with two built-in type families: `CmpNat and `CmpSymbol`.
Both of these return a promoted `Ordering` type (EQ, LT, or GT).

5 years agoMake sure we occurrence-analyse unfoldings (fixes Trac #8892)
Simon Peyton Jones [Tue, 18 Mar 2014 17:10:18 +0000 (17:10 +0000)] 
Make sure we occurrence-analyse unfoldings (fixes Trac #8892)

For DFunUnfoldings we were failing to occurrence-analyse the unfolding,
and that meant that a loop breaker wasn't marked as such, which in turn
meant it was inlined away when it still had occurrence sites.  See
Note [Occurrrence analysis of unfoldings] in CoreUnfold.

This is a pretty long-standing bug, happily nailed by John Lato.

5 years agoUpdate submodule to Win32-2.3.0.2
Herbert Valerio Riedel [Tue, 18 Mar 2014 10:06:57 +0000 (11:06 +0100)] 
Update submodule to Win32-2.3.0.2

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoAdd some documentation about type-level literals.
Iavor S. Diatchki [Tue, 18 Mar 2014 06:19:16 +0000 (23:19 -0700)] 
Add some documentation about type-level literals.

I moved the "promoted literals" sub-section into a separate section,
as many folks were not finding the docs.  I also added some additional
paragraphs describing the current state of the feature.

5 years agoTest case: ghci059: Forgot stdout file
Joachim Breitner [Mon, 17 Mar 2014 14:34:54 +0000 (15:34 +0100)] 
Test case: ghci059: Forgot stdout file

5 years agoTest Trac #8889
Simon Peyton Jones [Mon, 17 Mar 2014 13:50:54 +0000 (13:50 +0000)] 
Test Trac #8889

5 years agoMore debug info
Simon Peyton Jones [Fri, 14 Mar 2014 13:50:29 +0000 (13:50 +0000)] 
More debug info

5 years agoComments only
Simon Peyton Jones [Fri, 14 Mar 2014 13:50:14 +0000 (13:50 +0000)] 
Comments only

5 years agoFix validation issue due to Coercible move (#8894)
Joachim Breitner [Mon, 17 Mar 2014 13:43:31 +0000 (14:43 +0100)] 
Fix validation issue due to Coercible move (#8894)

5 years agoRevert ad15c2, which causes Windows seg-faults (Trac #8834)
Simon Peyton Jones [Fri, 14 Mar 2014 22:55:26 +0000 (22:55 +0000)] 
Revert ad15c2, which causes Windows seg-faults (Trac #8834)

We don't yet understand WHY commit ad15c2, which is to do with
CmmSink, causes seg-faults on Windows, but it certainly seems to.  So
reverting it is a stop-gap, but we need to un-block the 7.8 release.

Many thanks to awson for identifying the offending commit.

5 years agoUnflatten the constraints of an inferred types (Trac #8889)
Simon Peyton Jones [Fri, 14 Mar 2014 22:51:20 +0000 (22:51 +0000)] 
Unflatten the constraints of an inferred types (Trac #8889)

There was even a comment to warn about this possiblity,
and it finally showed up in practice!  This patch fixes
it quite nicely, with commens to explain.

5 years agoRemove support for "primclass"
Joachim Breitner [Sun, 16 Mar 2014 17:39:27 +0000 (18:39 +0100)] 
Remove support for "primclass"

This partly reverts commit e239753c349f925b576b72dc3445934cba8bcd50. Since
Coercible is exported via GHC.Types, so "primclass" is no longer
needed. The support for => in primops.pp is still required for coerce.

5 years agoCoercible is now exported from GHC.Types (#8894)
Joachim Breitner [Sun, 16 Mar 2014 17:35:28 +0000 (18:35 +0100)] 
Coercible is now exported from GHC.Types (#8894)

so do not export it in GHC.Prim, and also have the pseudo-code for
GHC.Prim import GHC.Types, so that haddock is happy.

5 years agoFix comment for ghci script files
Joachim Breitner [Sun, 16 Mar 2014 16:40:51 +0000 (17:40 +0100)] 
Fix comment for ghci script files

(Unchecked comment-only commits should better use the right commenting
style...)

5 years agoTest case: :info Coercible in GHCi
Joachim Breitner [Sun, 16 Mar 2014 16:12:58 +0000 (17:12 +0100)] 
Test case: :info Coercible in GHCi

This prepares against future breakage, especially if #8894 is tackled.

5 years agoRemove code reporting issues with Safe Haskell and coerce.
Richard Eisenberg [Fri, 14 Mar 2014 19:03:21 +0000 (15:03 -0400)] 
Remove code reporting issues with Safe Haskell and coerce.

This is a followup to the fix for #8827, and should be merged
with that change.

5 years agoCall Arity test case: Check what happens with unboxed lets
Joachim Breitner [Fri, 14 Mar 2014 18:16:58 +0000 (19:16 +0100)] 
Call Arity test case: Check what happens with unboxed lets

5 years agoCall Arity: Never eta-expand thunks in recursive groups
Joachim Breitner [Fri, 14 Mar 2014 17:25:07 +0000 (18:25 +0100)] 
Call Arity: Never eta-expand thunks in recursive groups

Even if the recursion is a nice tail-call only recusion, we'd stil be
calling the thunk multiple times and eta-expansion would be wrong.
Includes a [Note].

(Also shows the disadvantage of unit tests: They had the same bug.)

5 years agoAdd test case for #8776
Dr. ERDI Gergo [Fri, 14 Mar 2014 14:34:56 +0000 (22:34 +0800)] 
Add test case for #8776

5 years agoReinstate pretty-printing of AnIds via pprId (#8776)
Dr. ERDI Gergo [Fri, 14 Mar 2014 14:17:45 +0000 (22:17 +0800)] 
Reinstate pretty-printing of AnIds via pprId (#8776)

5 years agoUse prefix notation in pprIfaceDecl for IfaceIds
Dr. ERDI Gergo [Fri, 14 Mar 2014 13:35:30 +0000 (21:35 +0800)] 
Use prefix notation in pprIfaceDecl for IfaceIds

5 years agoHonor Op_PrintExplicitForalls setting in pprIfaceForAllPart
Dr. ERDI Gergo [Fri, 14 Mar 2014 11:50:15 +0000 (19:50 +0800)] 
Honor Op_PrintExplicitForalls setting in pprIfaceForAllPart

5 years agoDocument Coercible in the user guide
Joachim Breitner [Fri, 14 Mar 2014 11:51:37 +0000 (12:51 +0100)] 
Document Coercible in the user guide

as a subsection of "Equality constraints", containing references to the
module's haddock and to the paper. Fixes #8888