ghc.git
5 years agorts: Add casts to prevent compiler warnings in printfs.
Erik de Castro Lopo [Sat, 26 Oct 2013 00:11:54 +0000 (11:11 +1100)] 
rts: Add casts to prevent compiler warnings in printfs.

5 years agoUpdate `pretty` to 1.1.1.1 release
Herbert Valerio Riedel [Sun, 27 Oct 2013 20:59:49 +0000 (21:59 +0100)] 
Update `pretty` to 1.1.1.1 release

5 years agoAdd GitHub upstream repo for `libraries/random`
Herbert Valerio Riedel [Sun, 27 Oct 2013 12:37:14 +0000 (13:37 +0100)] 
Add GitHub upstream repo for `libraries/random`

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoAdd more missing `{-# LANGUAGE #-}`s to `genprimopcode` output
Herbert Valerio Riedel [Sun, 27 Oct 2013 09:37:28 +0000 (10:37 +0100)] 
Add more missing `{-# LANGUAGE #-}`s to `genprimopcode` output

This is a follow-up to 0620241a0f09d1ff865fa575eadb61aa59d2fe4f
which addressed only the `Prim.hs` output; this commit adds the missing
`LANGUAGE` pragmas for the generated `PrimopWrappers.hs` output as well.

While at it, the redundant `CPP` pragma is removed from the generated
`Prim.hs` file.

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoAdd `{-# LANGUAGE MagicHash #-}` in output of `genprimopcode`
Herbert Valerio Riedel [Sun, 27 Oct 2013 08:59:48 +0000 (09:59 +0100)] 
Add `{-# LANGUAGE MagicHash #-}` in output of `genprimopcode`

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoAnother release note fix.
Austin Seipp [Sun, 27 Oct 2013 02:27:59 +0000 (21:27 -0500)] 
Another release note fix.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoFix bad grammar.
Austin Seipp [Sun, 27 Oct 2013 01:22:45 +0000 (20:22 -0500)] 
Fix bad grammar.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoRelease note blurb for stack size changes.
Austin Seipp [Sun, 27 Oct 2013 01:21:35 +0000 (20:21 -0500)] 
Release note blurb for stack size changes.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoUntabify and delete trailing whitespace.
Austin Seipp [Sun, 27 Oct 2013 01:15:54 +0000 (20:15 -0500)] 
Untabify and delete trailing whitespace.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoFix Windows build.
Austin Seipp [Sun, 27 Oct 2013 01:13:55 +0000 (20:13 -0500)] 
Fix Windows build.

GlobalMemoryStatusEx actually requires _WIN32_WINNT to be defined as
0x0501 (Windows XP) for availability.

For completeness, I bumped WIN32_WINNT in Ticker and OSThreads as well.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoUpdate `Cabal` to 1.18.1.2
Herbert Valerio Riedel [Sat, 26 Oct 2013 21:58:14 +0000 (23:58 +0200)] 
Update `Cabal` to 1.18.1.2

5 years agoFix getPhysicalMemorySize on OS X (#8481)
Austin Seipp [Sat, 26 Oct 2013 17:50:16 +0000 (12:50 -0500)] 
Fix getPhysicalMemorySize on OS X (#8481)

Darwin doesn't support _SC_PHYS_PAGES, but we can get the exact number
of bytes of physical memory via 'hw.memsize', so we use that instead.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoRevert "Implement shortcuts for slow calls that would require PAPs (#6084)"
Austin Seipp [Sat, 26 Oct 2013 03:33:56 +0000 (22:33 -0500)] 
Revert "Implement shortcuts for slow calls that would require PAPs (#6084)"

This reverts commit 2f5db98e90cf0cff1a11971c85f108a7480528ed.

5 years agoRevert "comments"
Austin Seipp [Sat, 26 Oct 2013 03:33:52 +0000 (22:33 -0500)] 
Revert "comments"

This reverts commit 9026c77a07533bda3773c3c3f3df1c6592bc80c7.

5 years agoChange type of `errMsgSpans` field of `ErrMsg` to `SrcSpan`
Joachim Breitner [Wed, 23 Oct 2013 09:24:24 +0000 (11:24 +0200)] 
Change type of `errMsgSpans` field of `ErrMsg` to `SrcSpan`

It was `[SrcSpan]`, but never ever contained more than one span.

5 years agoRelease note blurb about ELF weak symbols.
Austin Seipp [Sat, 26 Oct 2013 01:08:28 +0000 (20:08 -0500)] 
Release note blurb about ELF weak symbols.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoRelease note wibble.
Austin Seipp [Fri, 25 Oct 2013 17:33:26 +0000 (12:33 -0500)] 
Release note wibble.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoRelease note blurbs for directory.
Austin Seipp [Fri, 25 Oct 2013 17:28:34 +0000 (12:28 -0500)] 
Release note blurbs for directory.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoUpdate documentation regarding SpecConstr.
Austin Seipp [Fri, 25 Oct 2013 16:49:09 +0000 (11:49 -0500)] 
Update documentation regarding SpecConstr.

 * Note new SPEC type in release notes.
 * Document SPEC in the users guide under the documentation for
   -fspec-constr.
 * Clean up comments in SpecConstr regarding the forcing of
   specialisation (see Note [Forcing specialisation].)

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoUntabify RtsFlags.c
Austin Seipp [Fri, 25 Oct 2013 14:17:01 +0000 (09:17 -0500)] 
Untabify RtsFlags.c

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoUntabify Linker.c
Austin Seipp [Fri, 25 Oct 2013 14:15:34 +0000 (09:15 -0500)] 
Untabify Linker.c

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoMake sure to #include Stable.h in Linker.c
Austin Seipp [Fri, 25 Oct 2013 13:37:42 +0000 (08:37 -0500)] 
Make sure to #include Stable.h in Linker.c

It needs freeStablePtr, which tripped my validate build, due to an
implicit declaration warning. I'm quite surprised this somehow did not
trip the build before.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoLinker.c: add dso_handle to the symbol table
Takano Akio [Sun, 6 Jan 2013 08:51:19 +0000 (17:51 +0900)] 
Linker.c: add dso_handle to the symbol table

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoghci: add support for ELF weak symbols
Takano Akio [Sat, 29 Dec 2012 02:59:34 +0000 (11:59 +0900)] 
ghci: add support for ELF weak symbols

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoLinker.c: remove stablehash, which is no longer used
Takano Akio [Sat, 29 Dec 2012 02:47:22 +0000 (11:47 +0900)] 
Linker.c: remove stablehash, which is no longer used

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoMake SpecConstr also check for GHC.Types.SPEC
Austin Seipp [Fri, 25 Oct 2013 11:13:27 +0000 (06:13 -0500)] 
Make SpecConstr also check for GHC.Types.SPEC

SpecConstr has for a while now looked for types with the built
in ForceSpecConstr annotation, in order to know where to be particularly
aggressive.

Unfortunately using an annotation has a number of downsides, the most
prominent two being:

  A) ForceSpecConstr is vital for efficiency (even if it's
     a hack), but it means users of it must have GHCI - even though
     stage2 features are not required for anything but the annotation.

  B) Any user who might need it (read: vector) has to duplicate the same
     piece of code. In general there are few people actually doing this,
     but it's unclear why they should have to.

This patch makes SpecConstr look for functions applied to the new
GHC.Types.SPEC type - a copy of the already-extant 'SPEC' type - as well
as look for annotations, in the stage2 compiler.

In particular, this means `vector` can now be built with a stage1
compiler, since it no longer depends on stage2 for anything else. This
is particularly important for e.g. iOS cross-compilers.

This also means we should be able to build `vector` earlier in the build
process too, but this patch doesn't address that.

This requires an accompanying bump in ghc-prim.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoAdd build.mk.sample entry for Cross Compilation
Austin Seipp [Fri, 25 Oct 2013 08:42:42 +0000 (03:42 -0500)] 
Add build.mk.sample entry for Cross Compilation

This is suitable e.g. for iOS.

Authored-by: Authored-by: Luke Iannini <lukexi@me.com>
Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoPlacate clang (#8444, #8445)
Austin Seipp [Fri, 25 Oct 2013 08:39:19 +0000 (03:39 -0500)] 
Placate clang (#8444, #8445)

Once again the whitespace rules (and the rules concerning expansion of
tokens) have bitten us.

Authored-by: Authored-by: Luke Iannini <lukexi@me.com>
Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoCorrectly set relative rpath for OS X (#8266)
Austin Seipp [Fri, 25 Oct 2013 08:26:23 +0000 (03:26 -0500)] 
Correctly set relative rpath for OS X (#8266)

This includes both executables (by correcly setting the rpath to the
topDir) and libffi, and GHC itself, so that everything works with no
build tree.

Authored-by: Christiaan Baaj <christiaan.baaij@gmail.com>
Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agousers_guide: Update default maximum stack size
Ben Gamari [Fri, 13 Sep 2013 03:28:20 +0000 (23:28 -0400)] 
users_guide: Update default maximum stack size

5 years agorts: Set default maximum stack size to 80% of physical memory
Ben Gamari [Fri, 13 Sep 2013 03:20:06 +0000 (23:20 -0400)] 
rts: Set default maximum stack size to 80% of physical memory

5 years agousers_guide: Document zero stack size limit
Ben Gamari [Tue, 22 Oct 2013 14:45:38 +0000 (10:45 -0400)] 
users_guide: Document zero stack size limit

5 years agorts: Allow for infinite stack size
Ben Gamari [Sat, 7 Sep 2013 02:48:52 +0000 (22:48 -0400)] 
rts: Allow for infinite stack size

This is encoded as RtsFlags.GcFlags.maxStkSize == 0.

5 years agorts: Fix typo in comment
Ben Gamari [Sat, 7 Sep 2013 22:00:40 +0000 (18:00 -0400)] 
rts: Fix typo in comment

5 years agorts: Print correct stack size on stack overflow
Ben Gamari [Sat, 7 Sep 2013 21:53:34 +0000 (17:53 -0400)] 
rts: Print correct stack size on stack overflow

This requires that stackOverflow() in RtsUtils.c be passed a reference
to the current TSO. This requires a small change in libraries/base.

5 years agorts: Add getPhysicalMemorySize
Ben Gamari [Fri, 13 Sep 2013 03:04:10 +0000 (23:04 -0400)] 
rts: Add getPhysicalMemorySize

5 years agoUntabify and remove trailing whitespace
Simon Peyton Jones [Fri, 25 Oct 2013 13:43:25 +0000 (14:43 +0100)] 
Untabify and remove trailing whitespace

... plus a couple of unused variables in TcSMonad

5 years agoRemove canSolve in favour of canRewrite
Simon Peyton Jones [Fri, 25 Oct 2013 13:36:37 +0000 (14:36 +0100)] 
Remove canSolve in favour of canRewrite

There was no useful distinction; a simple refactoring.

5 years agoBe more careful when iterating the constraint-simpifier loop (fixes Trac #8474)
Simon Peyton Jones [Fri, 25 Oct 2013 13:35:37 +0000 (14:35 +0100)] 
Be more careful when iterating the constraint-simpifier loop (fixes Trac #8474)

We were (uselessly) iterating the simplification loop an exponential
number of times.  Lovely simple test case showed this up.

See Note [Cutting off simpl_loop] in TcSimplify

5 years agoAdd a tiny bit more tracing
Simon Peyton Jones [Thu, 24 Oct 2013 14:55:20 +0000 (15:55 +0100)] 
Add a tiny bit more tracing

5 years agoClean `.buildinfo` only if `.buildinfo.in` exists
Herbert Valerio Riedel [Fri, 25 Oct 2013 13:00:06 +0000 (15:00 +0200)] 
Clean `.buildinfo` only if `.buildinfo.in` exists

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agocomments
Simon Marlow [Fri, 25 Oct 2013 10:19:49 +0000 (11:19 +0100)] 
comments

5 years agoTurn several nats into StgWord to avoid potential integer overflow (#7762)
Simon Marlow [Fri, 25 Oct 2013 09:44:29 +0000 (10:44 +0100)] 
Turn several nats into StgWord to avoid potential integer overflow (#7762)

5 years agoMake integer overflow less likely to happen (#7762)
Simon Marlow [Fri, 25 Oct 2013 09:40:23 +0000 (10:40 +0100)] 
Make integer overflow less likely to happen (#7762)

The particular problematic code in #7762 was this:

            nat newSize = size - n;
            char *freeAddr = MBLOCK_ROUND_DOWN(bd->start);
            freeAddr += newSize * MBLOCK_SIZE;
                        ^^^^^^^^^^^^^^^^^^^^^^  OVERFLOW!!!

For good measure, I'm going to fix the bug twice.  This patch fixes
the class of bugs of this kind, by making sure that any expressions
involving BLOCK_SIZE or MBLOCK_SIZE are promoted to unsigned long.  In
a separate patch, I'll fix a bunch of individual instances (including
the one above).

5 years agoDiscard dead assignments in tryToInline
Simon Marlow [Fri, 25 Oct 2013 09:32:48 +0000 (10:32 +0100)] 
Discard dead assignments in tryToInline

Inlining global registers and constants made code slightly larger in
some cases.  I finally got around to looking into why, and discovered
one reason: we weren't discarding dead code in some cases.  This patch
fixes it.

5 years agoImplement shortcuts for slow calls that would require PAPs (#6084)
Simon Marlow [Mon, 18 Feb 2013 14:34:26 +0000 (14:34 +0000)] 
Implement shortcuts for slow calls that would require PAPs (#6084)

5 years agoAnother attempt to fix the conditions for slop-zeroing
Simon Marlow [Fri, 25 Oct 2013 07:18:08 +0000 (08:18 +0100)] 
Another attempt to fix the conditions for slop-zeroing

Also refactor the #defines to hopefully make it clearer what's going
on.

5 years agoRemove unnecessary check in CmmContFlowOpt
Jan Stolarek [Thu, 24 Oct 2013 13:27:39 +0000 (15:27 +0200)] 
Remove unnecessary check in CmmContFlowOpt

Fixes #8456

5 years agoUntabify (sorry didn't fully do it first time)
Simon Peyton Jones [Thu, 24 Oct 2013 11:37:44 +0000 (12:37 +0100)] 
Untabify (sorry didn't fully do it first time)

5 years agoTrailing whitespace only
Simon Peyton Jones [Thu, 24 Oct 2013 10:39:27 +0000 (11:39 +0100)] 
Trailing whitespace only

5 years agoUntabify and trailing whitespace
Simon Peyton Jones [Thu, 24 Oct 2013 10:38:47 +0000 (11:38 +0100)] 
Untabify and trailing whitespace

5 years agoUntabify and remove trailing spaces
Simon Peyton Jones [Thu, 24 Oct 2013 10:37:23 +0000 (11:37 +0100)] 
Untabify and remove trailing spaces

5 years agoRefactor the topNormaliseNewType story, fixing Trac #8467
Simon Peyton Jones [Thu, 24 Oct 2013 10:15:04 +0000 (11:15 +0100)] 
Refactor the topNormaliseNewType story, fixing Trac #8467

A bit of a mess had accumulated, with unclear invariants.

* Remove splitNewTypeRepCo_maybe, in favour of topNormaliseNewType_maybe
  (which had the same signature but behaved subtly differently).

* Make topNormaliseNewType_maybe guaranteed to return a non-newtype
  if it says (Just ty).  This is what was causing the loop in #8467

* Apply similar tidying up to FamInstEnv.topNormaliseType

5 years agoAdd doc link
Simon Peyton Jones [Wed, 23 Oct 2013 13:24:24 +0000 (14:24 +0100)] 
Add doc link

5 years agooprhNamesOfFamInst should include the type family itself (fix Trac #8469)
Simon Peyton Jones [Wed, 23 Oct 2013 13:23:46 +0000 (14:23 +0100)] 
oprhNamesOfFamInst should include the type family itself (fix Trac #8469)

Trivial fix; matches oprhNamesOfClsInst.

5 years agoSuppress AMP warnings with -XNoImplicitPrelude (fixed Trac #8320)
Simon Peyton Jones [Thu, 24 Oct 2013 08:07:26 +0000 (03:07 -0500)] 
Suppress AMP warnings with -XNoImplicitPrelude (fixed Trac #8320)

The AMP warnings caused 'base' to be loaded even when we were
compiling 'ghc-prim'.  That is bad, bad, bad.  We got a very
obscure message
   attempting to use module ‛ghc-prim:GHC.Types’
     (libraries/ghc-prim/./GHC/Types.hs) which is not loaded

See Note [Home module load error] in LoadIface

5 years agoRevert "Fix Trac #7667.", restoring the refined fix.
Richard Eisenberg [Wed, 23 Oct 2013 18:33:18 +0000 (14:33 -0400)] 
Revert "Fix Trac #7667.", restoring the refined fix.

Apologies -- there was some git confusion that cause the Wrong Thing
to happen.

This reverts commit bb9d53e32da52221173431733928c497187686ff.

Conflicts:

compiler/hsSyn/Convert.lhs

5 years agoRemove debugging printouts -- sorry!
Richard Eisenberg [Wed, 23 Oct 2013 18:21:54 +0000 (14:21 -0400)] 
Remove debugging printouts -- sorry!

5 years agoMerge branch 'master' of git://git.haskell.org/ghc
Richard Eisenberg [Wed, 23 Oct 2013 18:07:31 +0000 (14:07 -0400)] 
Merge branch 'master' of git://git.haskell.org/ghc

5 years agoBe more selective about when to print out roles with :info
Richard Eisenberg [Tue, 22 Oct 2013 15:16:42 +0000 (11:16 -0400)] 
Be more selective about when to print out roles with :info

5 years agoUpdate user manual with respect to new default for class roles.
Richard Eisenberg [Tue, 22 Oct 2013 14:53:14 +0000 (10:53 -0400)] 
Update user manual with respect to new default for class roles.

5 years agoChange default roles for classes to be *nominal*.
Richard Eisenberg [Tue, 22 Oct 2013 14:40:41 +0000 (10:40 -0400)] 
Change default roles for classes to be *nominal*.

5 years agoChange GeneralizedNewtypeDeriving safety check.
Richard Eisenberg [Mon, 21 Oct 2013 17:02:57 +0000 (13:02 -0400)] 
Change GeneralizedNewtypeDeriving safety check.

Now, instead of looking at a class's roles, the GND check looks
at all of the methods in the class individually. This has the
advantage that sometimes, we can use information about the
derivation requested during the safety check. For example,
we can now derive (IArray UArray), whereas the previous check
prevented this.

5 years agoComments & typos only
Richard Eisenberg [Mon, 21 Oct 2013 17:02:37 +0000 (13:02 -0400)] 
Comments & typos only

5 years agoRefine fix for #7667.
Richard Eisenberg [Mon, 21 Oct 2013 14:10:24 +0000 (10:10 -0400)] 
Refine fix for #7667.

Now, we allow types that do not begin with ':', but we retain other
checks on variable names.

5 years agoFix Trac #8455.
Richard Eisenberg [Mon, 21 Oct 2013 13:52:30 +0000 (09:52 -0400)] 
Fix Trac #8455.

This was quite simple -- just use mkIntegerExpr instead of mkIntExpr.

5 years agoNormalise the type when generating do-bind warnings (Trac #8470)
Simon Peyton Jones [Wed, 23 Oct 2013 11:12:39 +0000 (12:12 +0100)] 
Normalise the type when generating do-bind warnings (Trac #8470)

This was easy to do, except that the desugar monad needs a
FamInstEnv init.  Straightforward, routine, albeit a bit clunky.

5 years agoFix Trac #8448
Simon Peyton Jones [Wed, 23 Oct 2013 11:10:48 +0000 (12:10 +0100)] 
Fix Trac #8448

We weren't dealing with built-in syntax; data constructors
that are built-in syntax (only [] actually) don't appear
in the GlobalRdrEnv

5 years agoRename topNormaliseType to topNormaliseType_maybe
Simon Peyton Jones [Wed, 23 Oct 2013 11:09:33 +0000 (12:09 +0100)] 
Rename topNormaliseType to topNormaliseType_maybe
and add new, simpler topNormaliseType

This is just a minor refactoring

5 years agos/excpetions/exceptions/
Edward Z. Yang [Mon, 21 Oct 2013 19:59:35 +0000 (12:59 -0700)] 
s/excpetions/exceptions/

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
5 years agoMore comments about stack layout
Simon Peyton Jones [Fri, 18 Oct 2013 21:29:57 +0000 (22:29 +0100)] 
More comments about stack layout

5 years agoComments only
Jan Stolarek [Fri, 18 Oct 2013 16:18:27 +0000 (18:18 +0200)] 
Comments only

5 years agoImprove control flow optimisation algorithm
Jan Stolarek [Fri, 18 Oct 2013 15:43:55 +0000 (17:43 +0200)] 
Improve control flow optimisation algorithm

Fixes #8456. Previous version of control flow optimisations
did not update the list of block predecessors, leading to
unnecessary duplication of blocks in some cases. See Trac
and comments in the code for more details.

5 years agoTrailing whitespaces
Jan Stolarek [Thu, 17 Oct 2013 13:53:17 +0000 (15:53 +0200)] 
Trailing whitespaces

5 years agoClarify comments and liberalise stack-check optimisation slightly
Simon Peyton Jones [Fri, 18 Oct 2013 13:35:07 +0000 (14:35 +0100)] 
Clarify comments and liberalise stack-check optimisation slightly

The only substantive change here is to change "==" into ">=" in
the Note [Always false stack check] code.  This is semantically
correct, but won't have any practical impact.

5 years agoMerge branch 'master' of git://git.haskell.org/ghc
Richard Eisenberg [Fri, 18 Oct 2013 13:22:19 +0000 (09:22 -0400)] 
Merge branch 'master' of git://git.haskell.org/ghc

5 years agoComments about control-flow optimisation
Simon Peyton Jones [Fri, 18 Oct 2013 12:51:56 +0000 (13:51 +0100)] 
Comments about control-flow optimisation

5 years agoComments (about the stack overflow check) only
Simon Peyton Jones [Fri, 18 Oct 2013 12:04:33 +0000 (13:04 +0100)] 
Comments (about the stack overflow check) only

5 years agoTrailing whitespace only
Simon Peyton Jones [Thu, 17 Oct 2013 16:01:58 +0000 (17:01 +0100)] 
Trailing whitespace only

5 years agoWhen de-serialising interfaces, need to distinguish types from kinds
Simon Peyton Jones [Thu, 17 Oct 2013 15:59:57 +0000 (16:59 +0100)] 
When de-serialising interfaces, need to distinguish types from kinds

This patches fixes two separate instances of the bug,

 * one in tc_ax_branches (Trac #8449)

 * one in type/kind applications in IfaceExpr
   (hence the new tcIfaceApps)

The latter was reported by Iavor, no ticket

5 years agoComments only
Simon Peyton Jones [Thu, 17 Oct 2013 14:18:17 +0000 (15:18 +0100)] 
Comments only

5 years agoComments only
Simon Peyton Jones [Thu, 10 Oct 2013 09:53:41 +0000 (10:53 +0100)] 
Comments only

5 years agoOptimise stack checks that are always false
Jan Stolarek [Thu, 17 Oct 2013 21:17:06 +0000 (23:17 +0200)] 
Optimise stack checks that are always false

Fix a bug introduced in 94125c97e49987e91fa54da6c86bc6d17417f5cf.
See Note [Always false stack check]

5 years agoAdd typed Template Haskell details to the release notes.
Geoffrey Mainland [Thu, 17 Oct 2013 19:21:58 +0000 (15:21 -0400)] 
Add typed Template Haskell details to the release notes.

5 years agoDocument new typed Template Haskell features.
Geoffrey Mainland [Thu, 17 Oct 2013 19:21:38 +0000 (15:21 -0400)] 
Document new typed Template Haskell features.

5 years agoSupport the syntax [e||...||] for typed expression brackets.
Geoffrey Mainland [Thu, 17 Oct 2013 18:09:01 +0000 (14:09 -0400)] 
Support the syntax [e||...||] for typed expression brackets.

5 years agoFix typo
Geoffrey Mainland [Thu, 17 Oct 2013 18:08:44 +0000 (14:08 -0400)] 
Fix typo

5 years agoCorrect release notes about SIMD support.
Geoffrey Mainland [Thu, 17 Oct 2013 18:04:53 +0000 (14:04 -0400)] 
Correct release notes about SIMD support.

6 years agoDocument -c in hp2hs(1)
Joachim Breitner [Thu, 17 Oct 2013 07:41:35 +0000 (09:41 +0200)] 
Document -c in hp2hs(1)

This fixes #8452.

6 years agoMinor code refactoring in HscMain
Jan Stolarek [Wed, 16 Oct 2013 11:23:23 +0000 (13:23 +0200)] 
Minor code refactoring in HscMain

Compiled HscMain.o is now smaller.

6 years agoTrailing whitespaces
Jan Stolarek [Wed, 16 Oct 2013 11:23:03 +0000 (13:23 +0200)] 
Trailing whitespaces

6 years agoRemove unused code
Jan Stolarek [Wed, 16 Oct 2013 11:12:12 +0000 (13:12 +0200)] 
Remove unused code

I am removing old loopification code that has been commented out
for long long time. We now have loopification implemented in
the code generator (see Note [Self-recursive tail calls]) so we
won't need to resurect this old code.

6 years agoTrailing whitespaces
Jan Stolarek [Wed, 16 Oct 2013 11:11:52 +0000 (13:11 +0200)] 
Trailing whitespaces

6 years agoGenerate (old + 0) instead of Sp in stack checks
Jan Stolarek [Wed, 16 Oct 2013 07:45:56 +0000 (09:45 +0200)] 
Generate (old + 0) instead of Sp in stack checks

When compiling a function we can determine how much stack space it will
use. We therefore need to perform only a single stack check at the beginning
of a function to see if we have enough stack space. Instead of referring
directly to Sp - as we used to do in the past - the code generator uses
(old + 0) in the stack check. Stack layout phase turns (old + 0) into Sp.

The idea here is that, while we need to perform only one stack check for
each function, we could in theory place more stack checks later in the
function. They would be redundant, but not incorrect (in a sense that they
should not change program behaviour). We need to make sure however that a
stack check inserted after incrementing the stack pointer checks for a
respectively smaller stack space. This would not be the case if the code
generator produced direct references to Sp. By referencing (old + 0) we make
sure that we always check for a correct amount of stack: when converting
(old + 0) to Sp the stack layout phase takes into account changes already
made to stack pointer. The idea for this change came from observations made
while debugging #8275.

6 years agoImprove documentation (Related to #8447)
Iavor S. Diatchki [Wed, 16 Oct 2013 09:33:49 +0000 (02:33 -0700)] 
Improve documentation (Related to #8447)

6 years agoUpdate `Cabal` to 1.18.1.1 final
Herbert Valerio Riedel [Wed, 16 Oct 2013 06:54:28 +0000 (08:54 +0200)] 
Update `Cabal` to 1.18.1.1 final

6 years agoAdded comments to BooleanFormula to explain the expression simplifier. (#7633)
Twan van Laarhoven [Tue, 15 Oct 2013 19:38:58 +0000 (20:38 +0100)] 
Added comments to BooleanFormula to explain the expression simplifier. (#7633)

6 years agoTrivial comment fix. (#8358)
Zac Slade [Wed, 25 Sep 2013 21:36:59 +0000 (16:36 -0500)] 
Trivial comment fix. (#8358)

Version of Happy required is now 1.19.

6 years agoFix Trac #7667.
Richard Eisenberg [Mon, 14 Oct 2013 19:00:33 +0000 (15:00 -0400)] 
Fix Trac #7667.

We no longer check capitalization (or colons) in names that come
from TH, according to the commentary in #7667.

6 years agoTypo in manual
Krzysztof Gogolewski [Tue, 15 Oct 2013 16:42:52 +0000 (18:42 +0200)] 
Typo in manual

Remove remains of old role syntax