ghc.git
5 years agoAdd IfacePromotionInfo data-kind-syntax
Trevor Elliott [Mon, 9 Sep 2013 01:25:48 +0000 (18:25 -0700)] 
Add IfacePromotionInfo

 * Remove the orphan instance for PromotionInfo from types/TyCon.lhs

5 years agoFix how we're using roles with `data kind` declarations
Trevor Elliott [Mon, 9 Sep 2013 00:46:48 +0000 (17:46 -0700)] 
Fix how we're using roles with `data kind` declarations

5 years agoSquashed commit of the following:
Trevor Elliott [Sun, 8 Sep 2013 23:46:17 +0000 (16:46 -0700)] 
Squashed commit of the following:

commit 6549c3e569d0e0c3714814860201924432da2435
Author: Trevor Elliott <trevor@galois.com>
Date:   Sun Sep 8 16:43:42 2013 -0700

    Document `data kind` syntax

commit 81c6d7b884e819cf0b0569cef23b67bb5aff8944
Merge: 6c3f34c c798a8c
Author: Trevor Elliott <trevor@galois.com>
Date:   Sun Sep 8 11:40:47 2013 -0700

    Merge remote-tracking branch 'head/master' into data-kind-syntax-v2

commit 6c3f34c80bd8b17920a956e194ec29d1affbd776
Author: Trevor Elliott <awesomelyawesome@gmail.com>
Date:   Wed Aug 28 02:21:07 2013 -0400

    Merge with the roles changes

      There a bunch of spots where the roles haven't been properly integrated with,
    so this patch should get some review.

commit 6bb530f50f655e74fb4e337311699eee46b519b7
Merge: 7d27880 4b5238a
Author: Trevor Elliott <awesomelyawesome@gmail.com>
Date:   Tue Aug 27 02:35:55 2013 -0400

    Merge remote-tracking branch 'head/master' into data-kind-syntax-v2

    Conflicts:
     compiler/basicTypes/DataCon.lhs
     compiler/iface/IfaceSyn.lhs
     compiler/main/PprTyThing.hs
     compiler/parser/Lexer.x
     compiler/parser/Parser.y.pp
     compiler/typecheck/TcInstDcls.lhs
     compiler/typecheck/TcTyClsDecls.lhs
     compiler/typecheck/TcTyDecls.lhs
     compiler/types/TyCon.lhs

commit 7d2788021dab549ffd888deb9f28c8e7eab0d4ba
Author: Trevor Elliott <trevor@galois.com>
Date:   Mon Jul 29 09:05:38 2013 -0700

    Migrate through some lost instances

commit 13e1f41ec9252fd9d547d8e4b9fb04ffaf43c105
Merge: e051060 9e185cc
Author: Trevor Elliott <awesomelyawesome@gmail.com>
Date:   Sun Jul 28 14:28:05 2013 -0400

    Merge remote-tracking branch 'origin/master' into data-kind-syntax-v2

    Moved Binary instances for data-kind related types to IfaceSyn

commit e051060bbef4d359f2b1caa1c6135b23df17ffe7
Merge: 08d7c2f 2f99cdb
Author: Trevor Elliott <awesomelyawesome@gmail.com>
Date:   Wed Jul 17 01:58:16 2013 -0400

    Merge remote-tracking branch 'origin/master' into data-kind-syntax-v2

commit 08d7c2fca10a8c89b6fd638536a28972753ae360
Author: Trevor Elliott <awesomelyawesome@gmail.com>
Date:   Mon Jul 1 21:56:48 2013 -0400

    Fix some bugs from the merge with master

     * Figure out what the right choice for the kind checking strategy of kind decls
       should be

commit 12f055d23a1b5c0a74d2db0784b779b605f3888f
Merge: f0adbdc e56b9d5
Author: Trevor Elliott <awesomelyawesome@gmail.com>
Date:   Mon Jul 1 21:12:47 2013 -0400

    Merge remote-tracking branch 'origin/master' into data-kind-syntax-v2

    Conflicts:
     compiler/typecheck/TcTyClsDecls.lhs

commit f0adbdc29fefc54675f0960e3178f3b079058eea
Author: Trevor Elliott <awesomelyawesome@gmail.com>
Date:   Sun Jun 23 15:53:06 2013 -0400

    Swap the names for PromotionFlavor and PromotionInfo

commit e177270dc002f45286a9b644935ea339d8a6c8d3
Merge: 16df4be 3660ef9
Author: Trevor Elliott <awesomelyawesome@gmail.com>
Date:   Sat Jun 22 04:00:15 2013 -0400

    Merge remote-tracking branch 'origin/master' into data-kind-syntax-v2

commit 16df4beac24065d3075a65b26add543452d1f2b2
Merge: b021b30 569b265
Author: Trevor Elliott <awesomelyawesome@gmail.com>
Date:   Sat Jun 22 02:41:14 2013 -0400

    merge with master

commit b021b30f66fdb66965f6c57fb0969317c9aeb9e3
Author: Trevor Elliott <trevor@galois.com>
Date:   Thu Jun 20 19:39:20 2013 -0700

    Start reworking comments

commit b765370181571c1922b508f8dd17648a090ac248
Merge: d1ac794 e4fc6fd
Author: Trevor Elliott <trevor@galois.com>
Date:   Thu Jun 20 18:27:43 2013 -0700

    Merge branch 'master' into data-kind-syntax-v2

commit d1ac794b5bd06ae04e014cabe4560628b70fcdeb
Merge: 9ad0a3c 73991d6
Author: Trevor Elliott <trevor@galois.com>
Date:   Thu Jun 20 18:16:15 2013 -0700

    Merge remote-tracking branch 'origin/master' into data-kind-syntax-v2

commit 9ad0a3c57a5b77f5040f1201b2c53a84680c1af2
Author: Trevor Elliott <trevor@galois.com>
Date:   Thu Jun 20 18:13:58 2013 -0700

    Don't add the promotion tick to data kind constructors

commit 8c37784e31702ecf7d91f2d7cf7dfab675a56927
Merge: 4dff379 db9b631
Author: Trevor Elliott <trevor@galois.com>
Date:   Mon Jun 17 10:55:51 2013 -0700

    Merge remote-tracking branch 'origin/master' into data-kind-syntax-v2

    Conflicts:
     compiler/main/PprTyThing.hs
     compiler/rename/RnTypes.lhs
     compiler/types/TyCon.lhs

commit 4dff3791ac9d1175d26f8c3b44923aefbe6c3f40
Author: Trevor Elliott <trevor@galois.com>
Date:   Mon Jun 3 20:45:00 2013 -0700

    When parsing interfaces, use forkM while checking type constructors

commit 7903009475b3e89aecc0a8e5d328ea84ea53a39d
Author: Trevor Elliott <trevor@galois.com>
Date:   Mon Jun 3 20:06:40 2013 -0700

    When parsing data kind declarations, don't change the constructor namespace

commit 78ff545601cedba106eda05a38ce8f24f8480961
Author: Trevor Elliott <trevor@galois.com>
Date:   Mon May 27 18:45:52 2013 -0700

    Switch from Maybe TyCon to a richer type for promotion

      The new type distinguishes the two cases where promotion isn't possible:
    1) Promotion isn't possible, as it's disabled by a 'data type' declaration
    2) Promotion isn't possible because we don't know how to promote it

commit 0573fd3e8f9822171ddeb0df937e10075b653678
Author: Trevor Elliott <trevor@galois.com>
Date:   Mon May 27 17:36:21 2013 -0700

    Remove an old TODO

commit e218d5d6848109e9dea129250199115a9db6b1d9
Author: Trevor Elliott <trevor@galois.com>
Date:   Mon May 27 17:36:15 2013 -0700

    Properly print data kind declarations in ghci

commit 22b011d43f84cb0478eded613344e1dd165664e5
Author: Trevor Elliott <trevor@galois.com>
Date:   Thu May 16 18:38:22 2013 -0700

    Switch to using the PromotedDataCon for the RHS of a data kind

      Something is still wrong here: doing :browse will get a panic for some
    reason.

commit 12db8c704765d2775b0299c2e718d015577a6f18
Author: Trevor Elliott <trevor@galois.com>
Date:   Sat May 4 19:06:43 2013 -0700

    Thread data kind syntax through the interface

      Things are not quite right at the moment.  The issue is that we can't
    distinguish abstract types from types that are constructors in a data kind.
    As such, we should introduce a new constructor to TyCon to help
    disambiguate these two cases.  Also it might be nice to add a new TyCon
    for kinds, which would avoid the need for a new RHS in the AlgTyCon case.

commit 73f19612444e2a3b1534ab41f02449c9a5191ccb
Author: Trevor Elliott <trevor@galois.com>
Date:   Tue Apr 30 20:30:21 2013 -0700

    Handle kind declarations separately

commit 8d3bf040748026829382c5d13421f910b3f9fcf9
Author: Trevor Elliott <trevor@galois.com>
Date:   Fri Apr 26 20:40:49 2013 -0700

    Partial type-kind checking of `data kind` declarations

commit 2399eb788ed0fe571c22de4f810080a323ddaceb
Author: Trevor Elliott <trevor@galois.com>
Date:   Fri Apr 26 18:01:28 2013 -0700

    Support empty `data kind` declarations

commit 61a28f2df42b34742219a97a22c029f840fef7f5
Author: Trevor Elliott <trevor@galois.com>
Date:   Fri Apr 26 17:34:31 2013 -0700

    Rename `data kind` declarations

commit 5d3485a3e3ab7a78f1055b872f78203d5d005b76
Author: Trevor Elliott <trevor@galois.com>
Date:   Fri Apr 26 16:53:26 2013 -0700

    Fix a typo in a parser comment

commit 7f631cf41a3ca84cd820b292711014b4e806a440
Author: Trevor Elliott <trevor@galois.com>
Date:   Fri Apr 26 16:53:00 2013 -0700

    Add paring for `data kind` declarations

commit d29733901b2cd195989cdc972ac74c1ed4f19670
Author: Trevor Elliott <trevor@galois.com>
Date:   Fri Apr 26 14:31:30 2013 -0700

    Rename typeLiteralsBit to dataKindsBit in the lexer

commit ca8ae194826fc47a2ba4f0188d62f5247b0fe631
Author: Trevor Elliott <trevor@galois.com>
Date:   Fri Apr 26 14:27:50 2013 -0700

    Add a check for -XDataKinds when parsing a `data type` declaration

commit 8588717e8ce224affa584bd1e27aa14e098f5a8f
Author: Trevor Elliott <trevor@galois.com>
Date:   Fri Apr 26 14:18:41 2013 -0700

    Implement the 'data type' syntax and checking

      Add a new form of data declaration where the 'type' modifier can be used
    to prevent data promotion.  For example

      data type T = K

    will not yield a promoted kind T, and promoted type K, even though they are
    in principle promotable.

5 years agoNote infinite stack default in release notes.
Austin Seipp [Sun, 8 Sep 2013 09:07:23 +0000 (04:07 -0500)] 
Note infinite stack default in release notes.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
5 years agoAvoid allocating while holding a lock (#8242)
Takano Akio [Fri, 6 Sep 2013 10:55:37 +0000 (19:55 +0900)] 
Avoid allocating while holding a lock (#8242)

This reverts commit 6770663f764db76dbb7138ccb3aea0527d194151.

If the program enters the garbage collector with the closure
lock held, it will confuse the garbage collector and will
result in an infinite loop in evacuate().

Signed-off-by: Austin Seipp <aseipp@pobox.com>
5 years agoDefault to infinite stack size (#8189)
Austin Seipp [Sun, 8 Sep 2013 07:08:45 +0000 (02:08 -0500)] 
Default to infinite stack size (#8189)

When servicing a stack overflows, only throw an exception to the given
thread if the user explicitly set a max stack size, using +RTS -K.
Otherwise just service it normally and grow the stack.

In case we actually run out of *heap* (stack chuncks are allocated on
the heap), then we need to bail by calling the stackOverflow() hook and
exit immediately.

Authored-by: Ben Gamari <bgamari.foss@gmail.com>
Signed-off-by: Austin Seipp <aseipp@pobox.com>
5 years agoresurrected -fdicts-strict, off by default
Nicolas Frisby [Wed, 17 Jul 2013 15:39:25 +0000 (10:39 -0500)] 
resurrected -fdicts-strict, off by default

also added -fdmd-tx-dict-sel, on by default

5 years agoRecord PAP allocation to CCCS.
Edward Z. Yang [Sat, 7 Sep 2013 21:16:37 +0000 (14:16 -0700)] 
Record PAP allocation to CCCS.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
5 years agoFix ghc-pkg list --simple-output not being alphabetical (#8245).
Niklas Hambüchen [Fri, 6 Sep 2013 14:23:24 +0000 (23:23 +0900)] 
Fix ghc-pkg list --simple-output not being alphabetical (#8245).

It was sorted by version number so far.

I also added a sort to the normal output (without --simple-output)
since the source it comes from does not guarantee sortedness.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
5 years agoAdd basic support for GHCJS
Austin Seipp [Fri, 6 Sep 2013 18:18:11 +0000 (13:18 -0500)] 
Add basic support for GHCJS

This patch encompasses most of the basic infrastructure for GHCJS. It
includes:

  * A new extension, -XJavaScriptFFI
  * A new architecture, ArchJavaScript
  * Parser and lexer support for 'foreign import javascript', only
    available under -XJavaScriptFFI, using ArchJavaScript.
  * As a knock-on, there is also a new 'WayCustom' constructor in
    DynFlags, so clients of the GHC API can add custom 'tags' to their
    built files. This should be useful for other users as well.

The remaining changes are really just the resulting fallout, making sure
all the cases are handled appropriately for DynFlags and Platform.

Authored-by: Luite Stegeman <stegeman@gmail.com>
Signed-off-by: Austin Seipp <aseipp@pobox.com>
5 years agoFix link to launchbury93natural
Joachim Breitner [Fri, 6 Sep 2013 09:10:25 +0000 (11:10 +0200)] 
Fix link to launchbury93natural

5 years agoWindows: load eh_frame as rodata, fixes #8237
Edward Z. Yang [Fri, 6 Sep 2013 06:34:58 +0000 (23:34 -0700)] 
Windows: load eh_frame as rodata, fixes #8237

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
5 years agoTemporary Haskeline fix for Windows build.
Edward Z. Yang [Fri, 6 Sep 2013 01:38:45 +0000 (18:38 -0700)] 
Temporary Haskeline fix for Windows build.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
5 years agodocs only: update the release notes with atomic primops
Ryan Newton [Thu, 5 Sep 2013 22:38:25 +0000 (18:38 -0400)] 
docs only: update the release notes with atomic primops

5 years agoIgnore drectve sections, partially fixing #7056
Edward Z. Yang [Thu, 5 Sep 2013 00:43:35 +0000 (17:43 -0700)] 
Ignore drectve sections, partially fixing #7056

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
5 years agoFix annoying iOS linker warnings (#8208)
Austin Seipp [Wed, 4 Sep 2013 22:35:53 +0000 (17:35 -0500)] 
Fix annoying iOS linker warnings (#8208)

Authored-by: Luke Iannini <lukexi@me.com>
Signed-off-by: Austin Seipp <aseipp@pobox.com>
5 years agoUpdate `Cabal` to 1.18.0 final
Herbert Valerio Riedel [Wed, 4 Sep 2013 21:59:06 +0000 (23:59 +0200)] 
Update `Cabal` to 1.18.0 final

5 years agoUpdate `containers` to 0.5.3.1 release
Herbert Valerio Riedel [Wed, 4 Sep 2013 18:50:15 +0000 (20:50 +0200)] 
Update `containers` to 0.5.3.1 release

5 years agodocumentation and comments for -ffun-to-thunk and -flate-dmd-anal
Nicolas Frisby [Wed, 4 Sep 2013 18:25:30 +0000 (13:25 -0500)] 
documentation and comments for -ffun-to-thunk and -flate-dmd-anal

5 years agoAdd a --no-dph flag to ./validate
Austin Seipp [Wed, 4 Sep 2013 18:15:40 +0000 (13:15 -0500)] 
Add a --no-dph flag to ./validate

Under --slow, the DPH tests can take incredible amounts of time to run.
And on some platforms, we may not have a fully working linker in order
to build DPH etc anyway. So this provides a way to turn it off.

This flag is off by default, but should your specify it, you can skip
the required 'dph' libraries in a build, should you remove them from the
source tree.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
5 years agoMake sure -fcmm-sink is passed to Parser properly
Austin Seipp [Wed, 4 Sep 2013 16:23:03 +0000 (11:23 -0500)] 
Make sure -fcmm-sink is passed to Parser properly

Parser.hs needs to be compiled with -fcmm-sink on x86 platforms, so the
register allocator doesn't run out of stack slots. Previously, we had to
do some CPP hacks in order to emit an #ifdef into the file - this is
because we preprocess it once up front, and run the preprocessor again
when we compile it.

There's two cases: the boostrap compiler is > 7.8, and the stage1 parser
needs the flag, or the stage1 compiler is compiling the stage2
Parser.hs, and needs the flag..

The previous approach was super fragile with Clang. The more principled
fix is to instead do this through the build system.

This fixes #8182.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
5 years agoRemove -fglasgow-exts from --help
Austin Seipp [Wed, 4 Sep 2013 16:13:30 +0000 (11:13 -0500)] 
Remove -fglasgow-exts from --help

It's been deprecated for who knows how long, and gives a warning.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
5 years agoAdd --show-options to --help (#8190)
Austin Seipp [Wed, 4 Sep 2013 16:06:33 +0000 (11:06 -0500)] 
Add --show-options to --help (#8190)

Signed-off-by: Austin Seipp <aseipp@pobox.com>
5 years agoTurn manual Typeable instances into errors; fixes #8132
Jose Pedro Magalhaes [Wed, 4 Sep 2013 08:09:17 +0000 (10:09 +0200)] 
Turn manual Typeable instances into errors; fixes #8132

5 years agoFix definition of DefinerOfRegs for CmmForeignCall
Jan Stolarek [Wed, 4 Sep 2013 13:11:40 +0000 (14:11 +0100)] 
Fix definition of DefinerOfRegs for CmmForeignCall

And update comments

5 years agoMake role inference work on the source type of a data con
Simon Peyton Jones [Wed, 4 Sep 2013 11:07:01 +0000 (12:07 +0100)] 
Make role inference work on the source type of a data con

When inferring roles it is Much More Kosher to work on the source
type, as written by the user, rather than the representation type as
computed by GHC.  Error messages may be better and, more subtly, the
representation type is the result of a pretty complicated calculation
and I'm worried about accidental cycles.

5 years agoPut the interface-file typechecking of IfUnpackCo inside forkM
Simon Peyton Jones [Wed, 4 Sep 2013 11:05:01 +0000 (12:05 +0100)] 
Put the interface-file typechecking of IfUnpackCo inside forkM

Now that IfBangs can contain coercions, which can mention the
very type being typechecked, the tc_strict call must be inside
forkM. This led to Trac #8221

5 years agoImprove debug tracing a bit
Simon Peyton Jones [Wed, 4 Sep 2013 11:02:56 +0000 (12:02 +0100)] 
Improve debug tracing a bit

5 years agoFix over-eager unpacking in isUnpackableType
Simon Peyton Jones [Wed, 4 Sep 2013 11:02:42 +0000 (12:02 +0100)] 
Fix over-eager unpacking in isUnpackableType

This bug meant that we tried to unpack Link in

  data Link a = MkLink !(Link a)

when -funbox-small-strict-fields was on.  See Trac #8221.

5 years agoDon't refer to oc->next after freeing oc.
Simon Marlow [Wed, 4 Sep 2013 10:08:10 +0000 (11:08 +0100)] 
Don't refer to oc->next after freeing oc.

5 years agoFix printf formats for pathchar on Windows (where it's wchar_t, not char)
Simon Marlow [Wed, 4 Sep 2013 10:00:12 +0000 (11:00 +0100)] 
Fix printf formats for pathchar on Windows (where it's wchar_t, not char)

5 years agoDon't move Capabilities in setNumCapabilities (#8209)
Simon Marlow [Wed, 4 Sep 2013 09:37:10 +0000 (10:37 +0100)] 
Don't move Capabilities in setNumCapabilities (#8209)

We have various problems with reallocating the array of Capabilities,
due to threads in waitForReturnCapability that are already holding a
pointer to a Capability.

Rather than add more locking to make this safer, I decided it would be
easier to ensure that we never move the Capabilities at all.  The
capabilities array is now an array of pointers to Capabaility.  There
are extra indirections, but it rarely matters - we don't often access
Capabilities via the array, normally we already have a pointer to
one.  I ran the parallel benchmarks and didn't see any difference.

5 years agoHack-fix build breakage on Linux/GCC from fc4856f9
Herbert Valerio Riedel [Wed, 4 Sep 2013 08:00:08 +0000 (10:00 +0200)] 
Hack-fix build breakage on Linux/GCC from fc4856f9

For some reason, the new `GccIsClang` variable introduced via
fc4856f9e811d9a23ae9212f43a09ddf5ef12b26 for addressing #8148
isn't set explicitly to `NO`; so this simply changes the test
`ifeq $(GccIsClang) NO` to `ifneq $(GccIsClang) YES` which
should fix the build with and w/o Clang.

5 years agoMake validate play nice with clang (for Xcode 5 command line tools)
Manuel M T Chakravarty [Wed, 4 Sep 2013 05:29:03 +0000 (15:29 +1000)] 
Make validate play nice with clang (for Xcode 5 command line tools)

* This partially fixes #8148. However, --with-ghc-4.8 will still not work given the rather dubious m4 macros and the failures in the test suite due to '-nodefaultlibs' still need to be fixed.

5 years agoAllow non-Nominal covars (bugfix)
Richard Eisenberg [Tue, 3 Sep 2013 14:27:02 +0000 (10:27 -0400)] 
Allow non-Nominal covars (bugfix)

5 years agoFix #7918
Edsko de Vries [Tue, 3 Sep 2013 11:51:10 +0000 (12:51 +0100)] 
Fix #7918

5 years agoComments and type synonym in CmmSink
Jan Stolarek [Tue, 3 Sep 2013 10:51:51 +0000 (11:51 +0100)] 
Comments and type synonym in CmmSink

5 years agoComment only
Simon Peyton Jones [Tue, 3 Sep 2013 08:10:35 +0000 (09:10 +0100)] 
Comment only

5 years agoImprove Linting in GHCi (fixes Trac #8215)
Simon Peyton Jones [Tue, 3 Sep 2013 08:10:26 +0000 (09:10 +0100)] 
Improve Linting in GHCi (fixes Trac #8215)

The original problem was that we weren't bringing varaibles bound in the
interactive context into scope before Linting the result of a top-level
declaration in GHCi.  (We were doing this for expressions.)

Moreover I found that we weren't Linting the result of desugaring
a GHCi expression, which we really should be doing.

It took me a bit of time to unravel all this, and I did some refactoring
to make it easier next time.

  * CoreMonad contains the Lint wrappers that get the right
    environments into place.  It always had endPass and lintPassResult
    (which Lints bindings), but now it has lintInteractiveExpr.

  * Both use a common function CoreMonad.interactiveInScope to find
    those in-scope variables.

Quite a bit of knock-on effects from this, but nothing exciting.

5 years agoPatch by lukexi.
Gabor Greif [Tue, 3 Sep 2013 02:14:48 +0000 (04:14 +0200)] 
Patch by lukexi.

Fixing #8217 for the unix(-like) case.

5 years agoExtend `packages` by 4th column for upstream repo
Herbert Valerio Riedel [Mon, 2 Sep 2013 14:32:28 +0000 (16:32 +0200)] 
Extend `packages` by 4th column for upstream repo

By keeping the repository url in the `packages` file scripts such as
source:ghc/sync-all can pick it up. Moreover, it's easier to
automatically validate for correctness than the
wiki:Repositories/Upstream page.

5 years agoComments only
Jan Stolarek [Mon, 2 Sep 2013 13:25:58 +0000 (14:25 +0100)] 
Comments only

5 years agoImprove documentation for the 7.8 release
Simon Peyton Jones [Mon, 2 Sep 2013 08:51:42 +0000 (09:51 +0100)] 
Improve documentation for the 7.8 release

* Document ExplicitNamespaces
* Improve documentation of ambiguity, and AllowAmbiguousTypes
* Improve documentation of overlapping/incoherent instance rules
* List language extensions in alphabetical order

5 years agoMake Specialise close over kind variables (fixes Trac #8196)
Simon Peyton Jones [Mon, 2 Sep 2013 08:49:40 +0000 (09:49 +0100)] 
Make Specialise close over kind variables (fixes Trac #8196)

This is a lingering bug from the introduction of polymorphic kinds.
In the specialiser we were specialising over a type, but failing
to specialise over the kinds it mentions.

The fix is simple: add a call to closeOverKinds.

Most of the patch is to add closeOverKinds, and to use it in a few
other places where we are doing essentially the same thing.

5 years agoRemove the final vestiges of InlineWrappers
Simon Peyton Jones [Mon, 2 Sep 2013 08:46:59 +0000 (09:46 +0100)] 
Remove the final vestiges of InlineWrappers

Part of Nick Frisby's patch (c080f727ba5f83921b842fcff71e9066adbdc250)
for late demand-analysis removed the over-zealous short-cut whereby
strictness wrappers were not spelled out in detail in interface files.

This patch completes the process by
 * removing InlineWrapper from UnfoldingSource
 * removing IfWrapper from IfaceUnfolding

There was a tiny bit of special ad-hocery for wrappers, in OccurAnal,
but fortunately that too turns out to be rendered irrelevant by
the more uniform treatment, and after that there was no need
to remember which functions are wrappers.

5 years agoExplicit import lists for StgCmmProf.
Edward Z. Yang [Thu, 8 Aug 2013 21:46:29 +0000 (14:46 -0700)] 
Explicit import lists for StgCmmProf.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
5 years agoComment fix
Gabor Greif [Sat, 31 Aug 2013 21:39:51 +0000 (23:39 +0200)] 
Comment fix

5 years agominor: remove tabs from file
Ryan Newton [Sat, 31 Aug 2013 20:10:05 +0000 (16:10 -0400)] 
minor: remove tabs from file

5 years agoMerge branch 'master' into atomics
Ryan Newton [Sat, 31 Aug 2013 19:28:02 +0000 (15:28 -0400)] 
Merge branch 'master' into atomics

5 years agoTeach `validate` script how to `--help`
Herbert Valerio Riedel [Sat, 31 Aug 2013 14:42:06 +0000 (16:42 +0200)] 
Teach `validate` script how to `--help`

This basically turns the comment at the beginning of the `validate`
shell script into an interactive `--help` output plus some minor additions.

5 years agoUpdate `haskeline` library to latest HEAD
Herbert Valerio Riedel [Sat, 31 Aug 2013 08:19:55 +0000 (10:19 +0200)] 
Update `haskeline` library to latest HEAD

(+ 3 outstanding local patches)

5 years agoNote unloadObj changes in release notes.
Austin Seipp [Fri, 30 Aug 2013 22:40:38 +0000 (17:40 -0500)] 
Note unloadObj changes in release notes.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
5 years agoTypo in release notes regarding -dynamic-too
Austin Seipp [Fri, 30 Aug 2013 22:40:23 +0000 (17:40 -0500)] 
Typo in release notes regarding -dynamic-too

Signed-off-by: Austin Seipp <aseipp@pobox.com>
5 years agoUpdate time to 1.4.1 release
Herbert Valerio Riedel [Fri, 30 Aug 2013 15:27:00 +0000 (17:27 +0200)] 
Update time to 1.4.1 release

5 years agoFix off-by-one error in FastString.getFastStringTable (#8110)
Patrick Palka [Fri, 30 Aug 2013 15:14:40 +0000 (11:14 -0400)] 
Fix off-by-one error in FastString.getFastStringTable (#8110)

The function was reading past the end of the FastString table, causing
the -dfaststring-stats option to behave unpredictably.

5 years agoExport languageExtensions as part of the API.
Jan Stolarek [Fri, 30 Aug 2013 14:19:16 +0000 (15:19 +0100)] 
Export languageExtensions as part of the API.

Fixes #8200

5 years agoFix comment typos that interfere with syntax highlighting
Patrick Palka [Thu, 21 Mar 2013 14:40:16 +0000 (10:40 -0400)] 
Fix comment typos that interfere with syntax highlighting

5 years agoHaddockify documentation in HsBinds and HsExpr
Dan Frumin [Thu, 29 Aug 2013 20:14:02 +0000 (20:14 +0000)] 
Haddockify documentation in HsBinds and HsExpr

Fixes #8201

5 years agoUpdate binary to 0.7.1.0 release
Herbert Valerio Riedel [Fri, 30 Aug 2013 12:51:54 +0000 (14:51 +0200)] 
Update binary to 0.7.1.0 release

5 years agoUpdate containers to 0.5.2.1 release
Herbert Valerio Riedel [Fri, 30 Aug 2013 11:04:12 +0000 (13:04 +0200)] 
Update containers to 0.5.2.1 release

(+ local fix for PolyTypeable)

5 years agoFix minor error regarding NumDecimals.
Austin Seipp [Fri, 30 Aug 2013 07:01:32 +0000 (02:01 -0500)] 
Fix minor error regarding NumDecimals.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
5 years agoRelease note blurb about IncoherentInstances.
Austin Seipp [Fri, 30 Aug 2013 03:15:31 +0000 (22:15 -0500)] 
Release note blurb about IncoherentInstances.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
5 years agoImprove documentation of the new IncoherentInstances behaviour
Joachim Breitner [Mon, 19 Aug 2013 10:24:18 +0000 (12:24 +0200)] 
Improve documentation of the new IncoherentInstances behaviour

Signed-off-by: Austin Seipp <aseipp@pobox.com>
5 years agoLiberalising IncoherentInstances
Joachim Breitner [Mon, 19 Aug 2013 08:24:25 +0000 (10:24 +0200)] 
Liberalising IncoherentInstances

(Almost) as suggested by SPJ on
http://www.haskell.org/pipermail/glasgow-haskell-users/2013-July/022651.html
(fixes #8141)

Signed-off-by: Austin Seipp <aseipp@pobox.com>
5 years agoAdd flag docs for -dynamic-too (#8181)
Austin Seipp [Thu, 29 Aug 2013 22:59:40 +0000 (17:59 -0500)] 
Add flag docs for -dynamic-too (#8181)

Signed-off-by: Austin Seipp <aseipp@pobox.com>
5 years agoTreat EPERM error from mmap as an OOM (#7500)
Reid Barton [Wed, 28 Aug 2013 20:16:08 +0000 (16:16 -0400)] 
Treat EPERM error from mmap as an OOM (#7500)

Linux can give back EPERM from an mmap call when a user program attempts
to map pages near `mmap_min_addr`, which is a kernel security measure to
prevent people from mapping pages at address 0. We may do this when we
hint to mmap what address to map the pages to.

However, it's theoretically possible we're not actually out of memory -
we could have continuously mapped pages at some other place far away
from `mmap_min_addr` and succeeded instead. So as an added precaution,
if mmap for a given addr gives us EPERM, we'll also attempt to map
*again*, but without the address hint. Maybe the kernel can do the right
thing.

However, while testing #7500, the amount of free address space we could
have otherwise used only turns out to be about 139MB. Which isn't really
a lot. So, given that, we *also* otherwise treat EPERM as an out of
memory error.

This fixes #7500.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
5 years agoAdd release notes about -dynamic-too
Austin Seipp [Thu, 29 Aug 2013 22:44:23 +0000 (17:44 -0500)] 
Add release notes about -dynamic-too

See #8181.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
5 years agoAdd -fwarn-overloaded-literals to release notes.
Austin Seipp [Thu, 29 Aug 2013 22:37:56 +0000 (17:37 -0500)] 
Add -fwarn-overloaded-literals to release notes.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
5 years agoRemove some redundancy.
Austin Seipp [Thu, 29 Aug 2013 22:36:17 +0000 (17:36 -0500)] 
Remove some redundancy.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
5 years agoRevert "Check for integer overflow in osGetMBlocks"
Austin Seipp [Thu, 29 Aug 2013 22:30:16 +0000 (17:30 -0500)] 
Revert "Check for integer overflow in osGetMBlocks"

This reverts commit 48865521de6638240819b3979edbb3d33401dc8e.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
5 years agoRevert "Paranoid integer overflow check in my_mmap"
Austin Seipp [Thu, 29 Aug 2013 22:30:14 +0000 (17:30 -0500)] 
Revert "Paranoid integer overflow check in my_mmap"

This reverts commit 1ce65edbff90fc8103062a1f94258ecc0c682309.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
5 years agoRevert "Paranoid integer overflow check in osGetMBlocks"
Austin Seipp [Thu, 29 Aug 2013 22:30:11 +0000 (17:30 -0500)] 
Revert "Paranoid integer overflow check in osGetMBlocks"

This reverts commit 1247dff7b852d45dc5006ae8be33ac991cc76c74.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
5 years agoParanoid integer overflow check in osGetMBlocks
Reid Barton [Wed, 28 Aug 2013 21:13:41 +0000 (17:13 -0400)] 
Paranoid integer overflow check in osGetMBlocks

Signed-off-by: Austin Seipp <aseipp@pobox.com>
5 years agoParanoid integer overflow check in my_mmap
Reid Barton [Wed, 28 Aug 2013 21:13:21 +0000 (17:13 -0400)] 
Paranoid integer overflow check in my_mmap

Signed-off-by: Austin Seipp <aseipp@pobox.com>
5 years agoCheck for integer overflow in osGetMBlocks
Reid Barton [Wed, 28 Aug 2013 21:08:19 +0000 (17:08 -0400)] 
Check for integer overflow in osGetMBlocks

Fixes Trac #5188.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
5 years agoDocument :kind! in ghci built-in help
Reid Barton [Thu, 29 Aug 2013 03:00:47 +0000 (23:00 -0400)] 
Document :kind! in ghci built-in help

Signed-off-by: Austin Seipp <aseipp@pobox.com>
5 years agosimplified the .hi format and added the -flate-dmd-anal flag (fixes #7782)
Nicolas Frisby [Thu, 22 Aug 2013 20:05:30 +0000 (15:05 -0500)] 
simplified the .hi format and added the -flate-dmd-anal flag (fixes #7782)

cf http://ghc.haskell.org/trac/ghc/wiki/LateDmd

5 years agoImprove docs for -XNegativeLiterals
Simon Peyton Jones [Thu, 29 Aug 2013 12:01:16 +0000 (13:01 +0100)] 
Improve docs for -XNegativeLiterals

5 years agoRefactor to avoid gratuitous DEBUG warning
Simon Peyton Jones [Wed, 28 Aug 2013 15:38:54 +0000 (16:38 +0100)] 
Refactor to avoid gratuitous DEBUG warning

5 years agoImprove TcSimplify.approximateWC, fixing Trac #8155
Simon Peyton Jones [Wed, 28 Aug 2013 15:37:59 +0000 (16:37 +0100)] 
Improve TcSimplify.approximateWC, fixing Trac #8155

See Note [ApproximateWC]

5 years agoImprove debug error message for applyTypeToArgs
Simon Peyton Jones [Wed, 28 Aug 2013 14:13:30 +0000 (15:13 +0100)] 
Improve debug error message for applyTypeToArgs

5 years agoDisplay the full type environment when reporting type holes
Simon Peyton Jones [Wed, 28 Aug 2013 14:12:17 +0000 (15:12 +0100)] 
Display the full type environment when reporting type holes

This fixes Trac #8191.

The patch also adds and documents a new flag -fmax-relevant-bindings=N
which lets you control how many bindings in the type environment are shown.

5 years agoRevert "Update submodules"
Jan Stolarek [Thu, 29 Aug 2013 12:12:04 +0000 (13:12 +0100)] 
Revert "Update submodules"

This reverts commit 6df74382986fad6d9132e03e1f19303be8f19672.

5 years agoUpdate submodules
Jan Stolarek [Thu, 29 Aug 2013 11:57:36 +0000 (12:57 +0100)] 
Update submodules

I didn't notice that rebase did not update submodules. Fixing now.

5 years agoOptimize self-recursive tail calls
Jan Stolarek [Thu, 29 Aug 2013 09:57:04 +0000 (10:57 +0100)] 
Optimize self-recursive tail calls

This patch implements loopification optimization. It was described
in "Low-level code optimisations in the Glasgow Haskell Compiler" by
Krzysztof Woś, but we use a different approach here. Krzysztof's
approach was to perform optimization as a Cmm-to-Cmm pass. Our
approach is to generate properly optimized tail calls in the code
generator, which saves us the trouble of processing Cmm. This idea
was proposed by Simon Marlow. Implementation details are explained
in Note [Self-recursive tail calls].

Performance of most nofib benchmarks is not affected. There are
some benchmarks that show 5-7% improvement, with an average improvement
of 2.6%. It would require some further investigation to check if this
is related to benchamrking noise or does this optimization really
help make some class of programs faster.

As a minor cleanup, this patch renames forkProc to forkLneBody.
It also moves some data declarations from StgCmmMonad to
StgCmmClosure, because they are needed there and it seems that
StgCmmClosure is on top of the whole StgCmm* hierarchy.

5 years agoWhitespaces and comment formatting
Jan Stolarek [Thu, 29 Aug 2013 09:56:48 +0000 (10:56 +0100)] 
Whitespaces and comment formatting

5 years agoUpdate `bytestring` library to latest HEAD
Herbert Valerio Riedel [Thu, 29 Aug 2013 08:20:26 +0000 (10:20 +0200)] 
Update `bytestring` library to latest HEAD

This also folds the new upstream repo at Github into GHC's `bytestring` Git
repo, so that we can directly track upstream from there in the future.

5 years agoUpdate Cabal to 1.18.0 RC2
Herbert Valerio Riedel [Thu, 29 Aug 2013 08:12:58 +0000 (10:12 +0200)] 
Update Cabal to 1.18.0 RC2

5 years agoMore docs for -XNumDecimals
Austin Seipp [Thu, 29 Aug 2013 04:18:16 +0000 (23:18 -0500)] 
More docs for -XNumDecimals

Signed-off-by: Austin Seipp <aseipp@pobox.com>
5 years agoFix validate failure.
Austin Seipp [Thu, 29 Aug 2013 01:16:46 +0000 (20:16 -0500)] 
Fix validate failure.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
5 years agoWibbles.
Austin Seipp [Wed, 28 Aug 2013 22:36:05 +0000 (17:36 -0500)] 
Wibbles.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
5 years agoMention iOS cross compilation in release notes.
Austin Seipp [Wed, 28 Aug 2013 22:28:55 +0000 (17:28 -0500)] 
Mention iOS cross compilation in release notes.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
5 years agoWibbles.
Austin Seipp [Wed, 28 Aug 2013 22:25:08 +0000 (17:25 -0500)] 
Wibbles.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
5 years agoDocument -XNegativeLiterals in the relase notes.
Austin Seipp [Wed, 28 Aug 2013 22:25:00 +0000 (17:25 -0500)] 
Document -XNegativeLiterals in the relase notes.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
5 years agoDetabify RnPat.lhs
Austin Seipp [Wed, 28 Aug 2013 22:18:47 +0000 (17:18 -0500)] 
Detabify RnPat.lhs

Signed-off-by: Austin Seipp <aseipp@pobox.com>
5 years agoImplement -XNumDecimals (#7266)
Austin Seipp [Wed, 28 Aug 2013 22:14:06 +0000 (17:14 -0500)] 
Implement -XNumDecimals (#7266)

Under -XNumDecimals, it's possible to specify an integer literal using
compact "floating point" syntax for any floating literal constant which
also happens to be an integer. This lets us write

    1.2e6 :: Integer

instead of:

    1200000 :: Integer

This also makes some amendments to the users guide.

Authored-by: Shachaf Ben-Kiki <shachaf@gmail.com>
Signed-off-by: Austin Seipp <aseipp@pobox.com>
5 years agoApplicative instance for Ghc and GhcT
Dan Frumin [Mon, 26 Aug 2013 14:53:37 +0000 (14:53 +0000)] 
Applicative instance for Ghc and GhcT

Fixes #8175.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
5 years agoRework how iOS does linking (#8127)
Austin Seipp [Wed, 28 Aug 2013 21:55:42 +0000 (16:55 -0500)] 
Rework how iOS does linking (#8127)

iOS has some particular constraints about how applications can be built:

 * We must generate a static library (.a) since XCode does the final
   link.
 * We need to carefully give the right set of arguments to libtool in
   the case we're generating an archive.
 * Dynamic linking isn't supported.
 * It can only be done on OS X.

This patch cleans up all of the above. We add a new flag `-staticlib`
(only supported on Darwin) that allows us to produce archive files using
libtool, and a -pgmlibtool flag to control which 'libtool' executable to
use.

This fixes #8127. I believe this is the last piece missing from the iOS
cross compiler.

Authored-by: Luke Iannini <lukexi@me.com>
Authored-by: Maxwell Swadling <maxwellswadling@gmail.com>
Authored-by: Stephen Blackheath <...@blacksapphire.com>
Signed-off-by: Austin Seipp <aseipp@pobox.com>
5 years agoClarify comments about apartness
Richard Eisenberg [Wed, 28 Aug 2013 16:09:33 +0000 (12:09 -0400)] 
Clarify comments about apartness

5 years agoAdd check for obsolete `darcs.haskell.org` repo urls
Herbert Valerio Riedel [Wed, 28 Aug 2013 15:56:15 +0000 (17:56 +0200)] 
Add check for obsolete `darcs.haskell.org` repo urls

If the check detects an obsolete URL, show a warning and tell the user how
to invoke `sync-all` in order to update the local Git repo to point to the new
repository URLs.

This is related to #8121