ghc.git
5 years agoAdd a warning for empty enumerations; fixes #7881
Ian Lynagh [Thu, 1 Aug 2013 17:08:23 +0000 (18:08 +0100)] 
Add a warning for empty enumerations; fixes #7881

We now give a warning about enumerations like [5 .. 3] :: Int8.

5 years agoAdd -XNegativeLiterals to the flag list
Ian Lynagh [Thu, 1 Aug 2013 14:53:35 +0000 (15:53 +0100)] 
Add -XNegativeLiterals to the flag list

5 years agoDocument the Negative Literals extension
Ian Lynagh [Wed, 31 Jul 2013 22:51:43 +0000 (23:51 +0100)] 
Document the Negative Literals extension

5 years agoAdd NegativeLiterals extension
Ian Lynagh [Wed, 31 Jul 2013 17:43:11 +0000 (18:43 +0100)] 
Add NegativeLiterals extension

I'd been meaning to do this for some time, but finally got around to it
due to the overflowing literals warning. With that enabled, we were
getting a warning for
    -128 :: Int8
as that is parsed as
    negate (fromInteger 128)
which just happens to do the right thing, as
    negate (fromInteger 128) = negate (-128) = -128

5 years agoAdd a warning for overflowing literals; fixes #7895
Ian Lynagh [Wed, 31 Jul 2013 15:49:49 +0000 (16:49 +0100)] 
Add a warning for overflowing literals; fixes #7895

5 years agoWhitespace only in deSugar/MatchLit.lhs
Ian Lynagh [Tue, 30 Jul 2013 22:28:35 +0000 (23:28 +0100)] 
Whitespace only in deSugar/MatchLit.lhs

5 years agoMerge branch 'master' of ssh://darcs.haskell.org/srv/darcs/ghc
Jan Stolarek [Wed, 31 Jul 2013 11:37:50 +0000 (12:37 +0100)] 
Merge branch 'master' of ssh://darcs.haskell.org/srv/darcs/ghc

5 years agoFix typos
Gabor Greif [Wed, 31 Jul 2013 10:45:21 +0000 (12:45 +0200)] 
Fix typos

5 years agoAdd strength reduction rules (Fixes #7116)
Jan Stolarek [Mon, 8 Jul 2013 15:20:43 +0000 (16:20 +0100)] 
Add strength reduction rules (Fixes #7116)

This patch adds rules for converting floating point multiplication
of the form 2.0 * x and x * 2.0 into addition x + x.

5 years agoAdded operational semantics to docs/core-spec.
Richard Eisenberg [Mon, 8 Jul 2013 10:41:25 +0000 (11:41 +0100)] 
Added operational semantics to docs/core-spec.

5 years agoChange which files --make mode thinks are 'Haskellish'
Ian Lynagh [Tue, 30 Jul 2013 21:11:41 +0000 (22:11 +0100)] 
Change which files --make mode thinks are 'Haskellish'

It thought that .cmm files were Haskellish, but then didn't know
how to compile them. Now they aren't treated as Haskellish, and
it can compile and link them.

5 years agoMake sdist make a separate tarball for the Windows tarballs
Ian Lynagh [Tue, 30 Jul 2013 17:54:34 +0000 (18:54 +0100)] 
Make sdist make a separate tarball for the Windows tarballs

5 years agoRename doDynamicToo to dynamicTooMkDynamicDynFlags
Ian Lynagh [Tue, 30 Jul 2013 16:03:38 +0000 (17:03 +0100)] 
Rename doDynamicToo to dynamicTooMkDynamicDynFlags

Makes it look less likely that people will confuse what it is for
(e.g. #8104).

5 years agoMove libffi's tarball into its own repo
Ian Lynagh [Tue, 30 Jul 2013 14:54:30 +0000 (15:54 +0100)] 
Move libffi's tarball into its own repo

This means that ghc-tarballs is only needed on Windows

5 years agoRemove an out-of-date comment (see #8101)
Ian Lynagh [Sun, 28 Jul 2013 17:49:07 +0000 (18:49 +0100)] 
Remove an out-of-date comment (see #8101)

5 years agodesugar code even when -fno-code is used; fixes #8101
Ian Lynagh [Sun, 28 Jul 2013 16:01:50 +0000 (17:01 +0100)] 
desugar code even when -fno-code is used; fixes #8101

We need to desugar the code, or we don't get the warnings from the
desugarer.

5 years agoWhitespace only in deSugar/Match.lhs
Ian Lynagh [Sun, 28 Jul 2013 15:49:04 +0000 (16:49 +0100)] 
Whitespace only in deSugar/Match.lhs

5 years agoWhitespace only in basicTypes/RdrName.lhs
Ian Lynagh [Sun, 28 Jul 2013 11:30:12 +0000 (12:30 +0100)] 
Whitespace only in basicTypes/RdrName.lhs

5 years agoBeautify a few Binary instances
Ian Lynagh [Sat, 27 Jul 2013 14:47:53 +0000 (15:47 +0100)] 
Beautify a few Binary instances

5 years agoDe-orphan a load of Binary instances
Ian Lynagh [Sat, 27 Jul 2013 14:43:13 +0000 (15:43 +0100)] 
De-orphan a load of Binary instances

5 years agoWhitespace only in basicTypes/BasicTypes.lhs
Ian Lynagh [Sat, 27 Jul 2013 12:33:30 +0000 (13:33 +0100)] 
Whitespace only in basicTypes/BasicTypes.lhs

5 years agoWhitespace only in basicTypes/Avail.hs
Ian Lynagh [Sat, 27 Jul 2013 11:52:10 +0000 (12:52 +0100)] 
Whitespace only in basicTypes/Avail.hs

5 years agoRemove redundant parentheses
Ian Lynagh [Sat, 27 Jul 2013 11:08:10 +0000 (12:08 +0100)] 
Remove redundant parentheses

5 years agoUse OrdLists when parsing export lists
Ian Lynagh [Sat, 27 Jul 2013 09:45:11 +0000 (10:45 +0100)] 
Use OrdLists when parsing export lists

No functional changes

5 years agoSome release note additions.
Austin Seipp [Fri, 26 Jul 2013 12:11:30 +0000 (07:11 -0500)] 
Some release note additions.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
5 years agoRemove an unnecessary-looking import
Ian Lynagh [Thu, 25 Jul 2013 20:41:20 +0000 (21:41 +0100)] 
Remove an unnecessary-looking import

5 years agoWhitespace only in deSugar/Desugar.lhs
Ian Lynagh [Thu, 25 Jul 2013 20:38:34 +0000 (21:38 +0100)] 
Whitespace only in deSugar/Desugar.lhs

5 years agoFix a bug in stack layout with safe foreign calls (#8083)
Simon Marlow [Wed, 24 Jul 2013 11:49:58 +0000 (12:49 +0100)] 
Fix a bug in stack layout with safe foreign calls (#8083)

We weren't properly tracking the number of stack arguments in the
continuation of a foreign call.  It happened to work when the
continuation was not a join point, but when it was a join point we
were using the wrong amount of stack fixup.

5 years agoTemporarily disable common block elimination; fixes #8083 for now
Ian Lynagh [Tue, 23 Jul 2013 12:43:51 +0000 (13:43 +0100)] 
Temporarily disable common block elimination; fixes #8083 for now

5 years agoAdd final remaining bits to fix #7978.
Geoffrey Mainland [Mon, 22 Jul 2013 16:15:44 +0000 (17:15 +0100)] 
Add final remaining bits to fix #7978.

5 years agouse prompt2 in `:set +m` mode
Herbert Valerio Riedel [Fri, 12 Jul 2013 08:22:43 +0000 (10:22 +0200)] 
use prompt2 in `:set +m` mode

5 years agoAdd `:show imports` to completion table
Herbert Valerio Riedel [Tue, 9 Jul 2013 12:55:36 +0000 (14:55 +0200)] 
Add `:show imports` to completion table

5 years agoAdd `:show linker` command to `:help` output
Herbert Valerio Riedel [Tue, 9 Jul 2013 12:55:14 +0000 (14:55 +0200)] 
Add `:show linker` command to `:help` output

5 years agoDocument -fwarn-pointless-pragmas; fixes #8049
Ian Lynagh [Sun, 21 Jul 2013 20:02:40 +0000 (21:02 +0100)] 
Document -fwarn-pointless-pragmas; fixes #8049

5 years agoOn second thoughts, don't document -fwarn-alternative-layout-rule-transitional
Ian Lynagh [Sun, 21 Jul 2013 19:59:40 +0000 (20:59 +0100)] 
On second thoughts, don't document -fwarn-alternative-layout-rule-transitional

I think the alternative layout rule flags are deliberately not
documented at the moment.

5 years agoSync the list of default warnings with reality; fixes #8060.
Ian Lynagh [Sun, 21 Jul 2013 18:43:40 +0000 (19:43 +0100)] 
Sync the list of default warnings with reality; fixes #8060.

6 years agoFix bug in readMVar implementation: keep clean MVars clean.
Edward Z. Yang [Wed, 17 Jul 2013 22:49:47 +0000 (15:49 -0700)] 
Fix bug in readMVar implementation: keep clean MVars clean.

The readMVar implementation had only partially implemented
a micro-optimization which allows us to avoid adding an MVar
to the mutable list if the MVar was not changed.  However,
this was not applied to the release method on the fast path,
resulting in dirty MVars which were not added to the mutable list.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
6 years agoAdd support for byte endian swapping for Word 16/32/64.
Austin Seipp [Wed, 17 Jul 2013 08:41:01 +0000 (03:41 -0500)] 
Add support for byte endian swapping for Word 16/32/64.

  * Exposes bSwap{,16,32,64}# primops
  * Add a new machop: MO_BSwap
  * Use a Stg implementation (hs_bswap{16,32,64}) for other implementation
    in NCG.
  * Generate bswap in X86 NCG for 32 and 64 bits, and for 16 bits, bswap+shr
    instead of using xchg.
  * Generate llvm.bswap intrinsics in llvm codegen.

Authored-by: Vincent Hanquez <tab@snarc.org>
Signed-off-by: Austin Seipp <aseipp@pobox.com>
6 years agoUpdate docs for readMVar/tryReadMVar.
Edward Z. Yang [Wed, 17 Jul 2013 05:08:51 +0000 (22:08 -0700)] 
Update docs for readMVar/tryReadMVar.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
6 years agoadding FastString.string_table to the sharedCAF/Globals.c mechanism
Nicolas Frisby [Wed, 10 Jul 2013 17:55:08 +0000 (12:55 -0500)] 
adding FastString.string_table to the sharedCAF/Globals.c mechanism

6 years agoThis reverts commit 163de25813d12764aa5ded1666af7c06fee0d67e and commit 279ac9f66a832...
Nicolas Frisby [Sat, 6 Jul 2013 17:43:57 +0000 (12:43 -0500)] 
This reverts commit 163de25813d12764aa5ded1666af7c06fee0d67e and commit 279ac9f66a83203448b279ea478b2cc1dafbd35d.

6 years agoRename atomicReadMVar and friends to readMVar.
Edward Z. Yang [Sat, 13 Jul 2013 01:12:25 +0000 (18:12 -0700)] 
Rename atomicReadMVar and friends to readMVar.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
6 years agoFix typo in description
Gabor Greif [Thu, 11 Jul 2013 20:47:03 +0000 (22:47 +0200)] 
Fix typo in description

6 years agoRelease note for atomicReadMVar and friends.
Edward Z. Yang [Wed, 10 Jul 2013 20:41:49 +0000 (13:41 -0700)] 
Release note for atomicReadMVar and friends.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
6 years agoImplement tryAtomicReadMVar#.
Edward Z. Yang [Wed, 10 Jul 2013 20:32:15 +0000 (13:32 -0700)] 
Implement tryAtomicReadMVar#.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
6 years agoDon't call dirty_MVAR on atomicReadMVar unless we change the MVar.
Edward Z. Yang [Wed, 10 Jul 2013 20:32:00 +0000 (13:32 -0700)] 
Don't call dirty_MVAR on atomicReadMVar unless we change the MVar.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
6 years agoAdd LOCK_CLOSURE macro for use in C--, which inlines the capability check.
Edward Z. Yang [Wed, 10 Jul 2013 20:10:32 +0000 (13:10 -0700)] 
Add LOCK_CLOSURE macro for use in C--, which inlines the capability check.

This patch also tweaks lockClosure to be INLINE_HEADER, so C-- clients
don't accidentally use them and updates some other code which locks closures
to do the capability check.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
6 years agoImplement atomicReadMVar, fixing #4001.
Edward Z. Yang [Mon, 8 Jul 2013 18:03:35 +0000 (11:03 -0700)] 
Implement atomicReadMVar, fixing #4001.

We add the invariant to the MVar blocked threads queue that
threads blocked on an atomic read are always at the front of
the queue.  This invariant is easy to maintain, since takers
are only ever added to the end of the queue.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
6 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Ian Lynagh [Tue, 9 Jul 2013 10:06:17 +0000 (11:06 +0100)] 
Merge branch 'master' of darcs.haskell.org/ghc

6 years agoDisable executable stack for the linker note, fixing #703 (again)
Edward Z. Yang [Tue, 9 Jul 2013 07:01:43 +0000 (00:01 -0700)] 
Disable executable stack for the linker note, fixing #703 (again)

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
6 years agoFix build
Ian Lynagh [Sun, 7 Jul 2013 20:34:17 +0000 (21:34 +0100)] 
Fix build

6 years agoAlpha rename some functions for consistency
Ian Lynagh [Sun, 7 Jul 2013 20:28:36 +0000 (21:28 +0100)] 
Alpha rename some functions for consistency

6 years agoDocs for ghci completion command for ghci; part of #5687. Patch from hvr.
Ian Lynagh [Sun, 7 Jul 2013 20:27:37 +0000 (21:27 +0100)] 
Docs for ghci completion command for ghci; part of #5687. Patch from hvr.

6 years agoemacs-friendly completion command for ghci; part of #5687. Patch from hvr.
Ian Lynagh [Sun, 7 Jul 2013 20:26:18 +0000 (21:26 +0100)] 
emacs-friendly completion command for ghci; part of #5687. Patch from hvr.

6 years agoFix segfault with STM; fixes #8035. Patch from errge.
Ian Lynagh [Sun, 7 Jul 2013 18:13:31 +0000 (19:13 +0100)] 
Fix segfault with STM; fixes #8035. Patch from errge.

6 years agoAvoid needlessly splitting a UniqSupply when extracting a Unique (#8041)
Patrick Palka [Wed, 26 Jun 2013 14:21:06 +0000 (10:21 -0400)] 
Avoid needlessly splitting a UniqSupply when extracting a Unique (#8041)

In many places, 'splitUniqSupply' + 'uniqFromSupply' is used to split a
UniqSupply into a Unique and a new UniqSupply. In such places we should
instead use the more efficient and more appropriate
'takeUniqFromSupply' (or equivalent).

Not only is the former method slower, it also generates and throws away
an extra Unique.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
6 years agoRemove spurious extra brace in LLVM metadata
Peter Wortmann [Thu, 4 Jul 2013 16:16:45 +0000 (17:16 +0100)] 
Remove spurious extra brace in LLVM metadata

This actually caused a segfault in the optimized stage 2 compiler due to
wrong TBAA data.

Signed-off-by: David Terei <davidterei@gmail.com>
6 years agoAlways have LLVM optimize globals
Peter Wortmann [Tue, 2 Jul 2013 22:42:27 +0000 (23:42 +0100)] 
Always have LLVM optimize globals

This pass is pretty cheap and eliminates the aliases generated by the LLVM
backend. This in turn is required for dynamic linking to work correctly,
as LLVM fails to properly attribute calls to aliased addresses.

Signed-off-by: David Terei <davidterei@gmail.com>
6 years agoFix llvm.prefetch instrinct for old LLVM versions
Peter Wortmann [Thu, 4 Jul 2013 16:15:27 +0000 (17:15 +0100)] 
Fix llvm.prefetch instrinct for old LLVM versions

Seems the last parameter to llvm.prefectch was added in LLVM 3.0.

Signed-off-by: David Terei <davidterei@gmail.com>
6 years agocopy the plugin's FastStringTable changes back into the host compiler
Nicolas Frisby [Fri, 5 Jul 2013 00:26:03 +0000 (19:26 -0500)] 
copy the plugin's FastStringTable changes back into the host compiler

6 years agoinclude FastString.string_table in CoreMonad.reinitializeGlobals
Nicolas Frisby [Wed, 3 Jul 2013 23:23:54 +0000 (18:23 -0500)] 
include FastString.string_table in CoreMonad.reinitializeGlobals

6 years agoComment out a leftover pprTrace
Gabor Greif [Wed, 3 Jul 2013 20:56:23 +0000 (22:56 +0200)] 
Comment out a leftover pprTrace

6 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Ian Lynagh [Wed, 3 Jul 2013 12:59:59 +0000 (13:59 +0100)] 
Merge branch 'master' of darcs.haskell.org/ghc

6 years agoChange the ranlib detection
Ian Lynagh [Tue, 2 Jul 2013 23:16:16 +0000 (00:16 +0100)] 
Change the ranlib detection

On Windows, the ranlib in the path may not be the right ranlib (it may
be the 32bit ranlib when we are making a Win64 compiler, or vice-versa).
Therefore we can't leave it up to libffi to detect the right ranlib, but
need to tell it which ranlib to use. This means that we need to find
ranlib even if we don't actually need it ourselves.

6 years agoDo not build dynamic libraries with the perf-llvm BuildFlavour.
Geoffrey Mainland [Tue, 2 Jul 2013 20:30:33 +0000 (21:30 +0100)] 
Do not build dynamic libraries with the perf-llvm BuildFlavour.

6 years agoFix Trac #8028.
Richard Eisenberg [Tue, 2 Jul 2013 20:07:07 +0000 (21:07 +0100)] 
Fix Trac #8028.

Check for an empty list of equations when converting
a closed type family from TH to an HsDecl.

6 years agoTrack haskeline Win64 fix
Ian Lynagh [Tue, 2 Jul 2013 15:47:37 +0000 (16:47 +0100)] 
Track haskeline Win64 fix

6 years agoFix bumpTickyLitBy[E] on Win64; fixes #7940
Ian Lynagh [Tue, 2 Jul 2013 14:48:08 +0000 (15:48 +0100)] 
Fix bumpTickyLitBy[E] on Win64; fixes #7940

A comment claimed that the ticky counters are unsigned longs, but
as far as I can see that isn't the case: They're already word-sized
values.

6 years agoFix build on Win64
Ian Lynagh [Tue, 2 Jul 2013 13:59:08 +0000 (14:59 +0100)] 
Fix build on Win64

gcc thought that fourthFloating could be used without being defined.
In actual fact it couldn't, but I've refactored the code so that it
can now see this.

6 years agoFix #7970, #2161, unfix #551
Simon Marlow [Tue, 2 Jul 2013 11:10:53 +0000 (12:10 +0100)] 
Fix #7970, #2161, unfix #551

Establish the reachability of threads before weak pointers.  Hence a
deadlocked thread can keep a weak pointer alive and prevent it from
being finalized early.  However, an reference from the finalizer of a
weak pointer will no longer prevent a thread from being considered
deadlocked (#551).  To keep the thread alive in that situation you
need to use a StablePtr.

See comments on #7970 and in the code for more details.

6 years agoMerge branch 'master' of ssh://darcs.haskell.org/srv/darcs/ghc
Richard Eisenberg [Fri, 28 Jun 2013 16:28:16 +0000 (17:28 +0100)] 
Merge branch 'master' of ssh://darcs.haskell.org/srv/darcs/ghc

6 years agoFix Trac #8018.
Richard Eisenberg [Fri, 28 Jun 2013 16:27:00 +0000 (17:27 +0100)] 
Fix Trac #8018.

Don't use the zonked-in-the-knot types to create a name for the axiom
in a closed type family.

6 years agoMerge TcSMonad.matchClass into TcInteract.matchClassInst
Simon Peyton Jones [Fri, 28 Jun 2013 12:13:21 +0000 (13:13 +0100)] 
Merge TcSMonad.matchClass into TcInteract.matchClassInst

Just a simple refactoring.  There was only one caller, and the
intermediate data type was not helping.

6 years agoMerge branch 'master' of ssh://darcs.haskell.org/srv/darcs/ghc
Richard Eisenberg [Fri, 28 Jun 2013 08:35:51 +0000 (09:35 +0100)] 
Merge branch 'master' of ssh://darcs.haskell.org/srv/darcs/ghc

6 years agoUpdate user's guide for kind inference for closed type families.
Richard Eisenberg [Thu, 27 Jun 2013 12:25:53 +0000 (13:25 +0100)] 
Update user's guide for kind inference for closed type families.

6 years agoFix stale comments around closed type families.
Richard Eisenberg [Thu, 27 Jun 2013 12:19:36 +0000 (13:19 +0100)] 
Fix stale comments around closed type families.

6 years agoFix Trac #7939, and add kind inference to closed type families.
Richard Eisenberg [Tue, 25 Jun 2013 16:42:47 +0000 (17:42 +0100)] 
Fix Trac #7939, and add kind inference to closed type families.

Now, all open type families have result kinds that default to
*. Top-level type families have all arguments default to *,
and associated type families have all arguments that are not
mentioned in the class header default to *. Closed type
families perform kind inference, but generalize only over
those kind variables that are parametric in their use.

This is all a little fiddly and specific, but it seems to follow
use cases. This commit also includes a large
Note [Kind-checking strategies] in TcHsType that helps keep all
of this straight.

6 years agoLLVM refactor cleanups
Peter Wortmann [Thu, 27 Jun 2013 13:53:03 +0000 (14:53 +0100)] 
LLVM refactor cleanups

Slightly more documentation, removed unused label map (huh),
removed MonadIO instance on LlvmM to improve encapsulation.

6 years agoMajor Llvm refactoring
Peter Wortmann [Wed, 26 Jun 2013 14:45:16 +0000 (15:45 +0100)] 
Major Llvm refactoring

This combined patch reworks the LLVM backend in a number of ways:

1. Most prominently, we introduce a LlvmM monad carrying the contents of
   the old LlvmEnv around. This patch completely removes LlvmEnv and
   refactors towards standard library monad combinators wherever possible.

2. Support for streaming - we can now generate chunks of Llvm for Cmm as
   it comes in. This might improve our speed.

3. To allow streaming, we need a more flexible way to handle forward
   references. The solution (getGlobalPtr) unifies LlvmCodeGen.Data
   and getHsFunc as well.

4. Skip alloca-allocation for registers that are actually never written.
   LLVM will automatically eliminate these, but output is smaller and
   friendlier to human eyes this way.

5. We use LlvmM to collect references for llvm.used. This allows places
   other than cmmProcLlvmGens to generate entries.

6 years agoUse full contents size for arrays
Peter Wortmann [Wed, 29 May 2013 16:55:12 +0000 (17:55 +0100)] 
Use full contents size for arrays

I am not quite sure at what point it makes sense to look at arrays as
pointers, but I ran into at least one use case that strongly suggested
doing it this way (calculating the actual size of structures, to be exact).

6 years agoRewrite ppLlvmBlock to use standard library "break"
Peter Wortmann [Wed, 26 Jun 2013 14:44:36 +0000 (15:44 +0100)] 
Rewrite ppLlvmBlock to use standard library "break"

6 years agoExtend globals to aliases
Peter Wortmann [Wed, 26 Jun 2013 14:43:45 +0000 (15:43 +0100)] 
Extend globals to aliases

Also give them a proper constructor - getGlobalVar and getGlobalValue
map directly to the accessors.

6 years agoUse SDoc for all LLVM pretty-printing
Peter Wortmann [Wed, 26 Jun 2013 14:49:10 +0000 (15:49 +0100)] 
Use SDoc for all LLVM pretty-printing

This patch reworks some parts of the LLVM pretty-printing code that were
still using Show and String. Now we should be using SDoc and Outputable
throughout. Note that many get*Name functions become pp*Name
here as a side-effect.

6 years agoIteration on dterei's metadata design
Peter Wortmann [Fri, 21 Jun 2013 16:23:00 +0000 (17:23 +0100)] 
Iteration on dterei's metadata design

- MetaArgs is not needed, as variables are already meta data

- Same goes for MetaVal - its only reason for existing seems to be to
  support LLVM's strange pretty-printing for meta-data annotations, and
  I feel that is better to keep the data structure clean and handle it in
  the pretty-printing instead.

- Rename "MetaData" to "MetaAnnot". Meta-data is still meta-data when it
  is not associated with an expression or statement - for example compile
  unit data for debugging. I feel the old name was a bit misleading.

- Make the renamed MetaAnnot a proper data type instead of a type alias
  for a pair.

- Rename "MetaExpr" constructor to "MetaStruct". As the data is much more
  like a LLVM structure (not array, as it can contain values).

- Fix a warning

6 years agoAdd ability to call functions with metadata as arguments to LLVM
David Terei [Wed, 19 Jun 2013 00:38:47 +0000 (17:38 -0700)] 
Add ability to call functions with metadata as arguments to LLVM
backend.

6 years agoRework LLVM metadata representation to be more accurate.
David Terei [Tue, 18 Jun 2013 23:28:42 +0000 (16:28 -0700)] 
Rework LLVM metadata representation to be more accurate.

6 years agoComments for Trac #7989
Simon Peyton Jones [Tue, 25 Jun 2013 13:16:29 +0000 (14:16 +0100)] 
Comments for Trac #7989

6 years agoImprove "No data constructor has all these fields" message (#7989)
Takano Akio [Mon, 17 Jun 2013 09:42:09 +0000 (18:42 +0900)] 
Improve "No data constructor has all these fields" message (#7989)

6 years agoFix typos
Gabor Greif [Tue, 25 Jun 2013 11:58:02 +0000 (13:58 +0200)] 
Fix typos

6 years agoMake noteMustPointToIt true of all non-top-level thunks
Simon Peyton Jones [Tue, 25 Jun 2013 10:56:59 +0000 (11:56 +0100)] 
Make noteMustPointToIt true of all non-top-level thunks

See Note [GC recovery].  To come: clean-up of StgCmmBind.cgRhs.

6 years agoDocument -XTypeOperators, which had escaped documentation altogether thus far
Simon Peyton Jones [Tue, 25 Jun 2013 08:59:42 +0000 (09:59 +0100)] 
Document -XTypeOperators, which had escaped documentation altogether thus far

6 years agoFurther fixes in RnNames, to make associated type exports work
Simon Peyton Jones [Tue, 25 Jun 2013 08:30:27 +0000 (09:30 +0100)] 
Further fixes in RnNames, to make associated type exports work

You ought to be able to say

  module M( C( T, foo ) where
    class C a where
      type T a
      foo :: a -> T a

i.e. with T in C's sub-item list.  This makes it so.

6 years agoUpdate the package database directory's timestamps when rebuilding the package cache.
Geoffrey Mainland [Mon, 24 Jun 2013 22:35:33 +0000 (23:35 +0100)] 
Update the package database directory's timestamps when rebuilding the package cache.

I was seeing many "WARNING: cache is out of date" errors during validation
claiming that my package cache was out of date. This patch eliminates those
errors by ensuring that when we rebuild the package cache, the modification time
of the directory containing the package database is set to be the same as the
modification time of the cache.

6 years agoWhite space and ordering only
Simon Peyton Jones [Mon, 24 Jun 2013 12:10:17 +0000 (13:10 +0100)] 
White space and ordering only

6 years agoAllow associated types as sub-names in an import list (Trac #8011)
Simon Peyton Jones [Mon, 24 Jun 2013 12:10:04 +0000 (13:10 +0100)] 
Allow associated types as sub-names in an import list (Trac #8011)

6 years agoMake sure that Pretty.text is inlined in stage 0,
Simon Peyton Jones [Fri, 21 Jun 2013 16:41:26 +0000 (17:41 +0100)] 
Make sure that Pretty.text is inlined in stage 0,
so that RULE text/str gets a chance to fire (Trac #7995).

And make sure that Outputable.text is inlined, so that the underlying
Pretty.text rule can fire.

The thing is that literal strings only turn into unpackCString#
in phase 1.

6 years agoTidy up the segmentation of mdo expressions
Simon Peyton Jones [Fri, 21 Jun 2013 16:38:09 +0000 (17:38 +0100)] 
Tidy up the segmentation of mdo expressions

When we changed 'rec' to *not* do segmentation of any kind,
I did it by meddling with the inner loop of grab in glomSegments.
But that is really hard to understand!

This patch lifts the test out to the top where is is clear.

6 years agoBreak loop in interface typechecking (fixes Trac #8002)
Simon Peyton Jones [Fri, 21 Jun 2013 16:36:10 +0000 (17:36 +0100)] 
Break loop in interface typechecking (fixes Trac #8002)

6 years agoRe-adjust whitespace
Ian Lynagh [Sun, 23 Jun 2013 11:54:17 +0000 (12:54 +0100)] 
Re-adjust whitespace

6 years agoAllow the GHCi messages to be overridden via the GHC API; fixes #7456
Ian Lynagh [Sun, 23 Jun 2013 11:49:42 +0000 (12:49 +0100)] 
Allow the GHCi messages to be overridden via the GHC API; fixes #7456

They now go through log_action. The existing severities all used
printDoc, which always adds a trailing newline, which we don't
want for the GHCi messages. I therefore added a new severity
SevInteractive, which doesn't add a newline.