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

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

6 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

6 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]

6 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

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

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

This reverts commit 6df74382986fad6d9132e03e1f19303be8f19672.

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

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

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

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

6 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

6 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>
6 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>
6 years agoWibbles.
Austin Seipp [Wed, 28 Aug 2013 22:36:05 +0000 (17:36 -0500)] 
Wibbles.

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

Signed-off-by: Austin Seipp <aseipp@pobox.com>
6 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>
6 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>
6 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>
6 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>
6 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>
6 years agoClarify comments about apartness
Richard Eisenberg [Wed, 28 Aug 2013 16:09:33 +0000 (12:09 -0400)] 
Clarify comments about apartness

6 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

6 years agoImprove error messages for roles by writing role names out
Richard Eisenberg [Wed, 28 Aug 2013 02:07:39 +0000 (22:07 -0400)] 
Improve error messages for roles by writing role names out

6 years agoFix Trac #8186.
Richard Eisenberg [Tue, 27 Aug 2013 21:39:08 +0000 (17:39 -0400)] 
Fix Trac #8186.

Parallel list comprehensions are now handled in DsMeta.

6 years agoUpdate `-ddump-minimal-imports` entry in user's guide
Herbert Valerio Riedel [Tue, 27 Aug 2013 20:54:41 +0000 (22:54 +0200)] 
Update `-ddump-minimal-imports` entry in user's guide

The entry is updated to mention explicitly the feature implemented
for #7957, as well as rewording and improving the docbook markup.

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
6 years agoMake `-ddump-minimal-imports` honour `-dumpdir` flag
Herbert Valerio Riedel [Sun, 25 Aug 2013 15:24:14 +0000 (17:24 +0200)] 
Make `-ddump-minimal-imports` honour `-dumpdir` flag

The `-dumpdir` flag was added via 668c860b361f16 but failed to
take care of `-ddump-minimal-imports`'s output.
This commit makes up for that omission.

This addresses #7957

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
6 years agoUser guide entry for `:shows paths` sub-command
Herbert Valerio Riedel [Tue, 27 Aug 2013 20:45:45 +0000 (22:45 +0200)] 
User guide entry for `:shows paths` sub-command

This also adds an entry to the release notes section.

See #8172 for more details

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
6 years agoGHCi: Implement new `:show paths` sub-command
Herbert Valerio Riedel [Sun, 25 Aug 2013 08:22:45 +0000 (10:22 +0200)] 
GHCi: Implement new `:show paths` sub-command

`:show paths` dumps the current working directory as well
as the current value of the `importPaths` dynamic flags field.

This addresses #8172

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
6 years agoComments only, relating to #8166 fix
Simon Peyton Jones [Tue, 27 Aug 2013 14:48:02 +0000 (15:48 +0100)] 
Comments only, relating to #8166 fix

6 years agoProperly externalise codegen identifiers (#8166)
Austin Seipp [Tue, 27 Aug 2013 01:12:02 +0000 (20:12 -0500)] 
Properly externalise codegen identifiers (#8166)

388e14e2 unfortunately broke a subtle invariant in the code generator:
when generating code for an application, names may need to be
externalised, in case you're building against something external with
was built with -split-objs.

We were never externalising the ids of the applied functions. This means
if the libraries are split and we call into them, then the compiler
won't may not generate correct ids when making references to functions
in the library (causing linker failure).

I'm not entirely sure how this didn't break everything, but it certainly
caused several failures for a bunch of people. I had to fiddle with my
tree a little to make this occur.

This should fix #8166.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
6 years agoSync Cabal to upstream version 1.18 pre-release
Herbert Valerio Riedel [Mon, 26 Aug 2013 20:03:25 +0000 (22:03 +0200)] 
Sync Cabal to upstream version 1.18 pre-release

Apart from bumping build-dep version bounds, `ghc-cabal` is adapted to
some minor Cabal API changes, and `bin-package-db` is made aware of
Cabal's recently added AGPL licence support.

6 years agoDelete trailing whitespace in LlvmCodeGen/Ppr.hs
Austin Seipp [Sat, 24 Aug 2013 02:53:41 +0000 (21:53 -0500)] 
Delete trailing whitespace in LlvmCodeGen/Ppr.hs

Signed-off-by: Austin Seipp <aseipp@pobox.com>
6 years agoDelete trailing whitespace in aclocal.m4
Austin Seipp [Sat, 24 Aug 2013 02:52:43 +0000 (21:52 -0500)] 
Delete trailing whitespace in aclocal.m4

Signed-off-by: Austin Seipp <aseipp@pobox.com>
6 years agoDelete trailing whitespace in mk/config.mk.in
Austin Seipp [Sat, 24 Aug 2013 02:51:58 +0000 (21:51 -0500)] 
Delete trailing whitespace in mk/config.mk.in

Signed-off-by: Austin Seipp <aseipp@pobox.com>
6 years agoAdd support for iOS simulator (issue #8152).
Austin Seipp [Sat, 24 Aug 2013 02:49:50 +0000 (21:49 -0500)] 
Add support for iOS simulator (issue #8152).

The iOS simulator is essentially an iOS target but for an x86 machine
instead. It doesn't support the native code generator either, though.

Authored-by: Stephen Blackheath <...@blacksapphire.com>
Signed-off-by: Austin Seipp <aseipp@pobox.com>
6 years agoFix build on non-unicode locale
Reid Barton [Fri, 23 Aug 2013 23:27:20 +0000 (19:27 -0400)] 
Fix build on non-unicode locale

happy reads .y files with the system encoding, so keep Parser.y.pp ASCII.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
6 years agoFix i386/Linux build.
Austin Seipp [Sat, 24 Aug 2013 02:45:25 +0000 (21:45 -0500)] 
Fix i386/Linux build.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
6 years agoFix GHCi macros not shadowing builtins (#8113)
Herbert Valerio Riedel [Sat, 24 Aug 2013 09:40:57 +0000 (11:40 +0200)] 
Fix GHCi macros not shadowing builtins (#8113)

This restores the original behaviour that was broken accidentally during
the refactoring peformed via 4f764d06f3b9899c09a6a459a22d4be694ee45d9.

This has been broken effectively for all GHC 7.6.x releases.

6 years agodll-split: Say where to update module list and fix a typo.
Edward Z. Yang [Fri, 23 Aug 2013 19:25:48 +0000 (12:25 -0700)] 
dll-split: Say where to update module list and fix a typo.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
6 years agoRemove unused ghc-frontpanel.glade file
Austin Seipp [Fri, 23 Aug 2013 18:31:14 +0000 (13:31 -0500)] 
Remove unused ghc-frontpanel.glade file

Signed-off-by: Austin Seipp <aseipp@pobox.com>
6 years agoFix build for i386/windows.
Austin Seipp [Fri, 23 Aug 2013 17:27:53 +0000 (12:27 -0500)] 
Fix build for i386/windows.

symbol_extras is only part of ObjectCode on certain platforms.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
6 years agoFix validation failure in Fingerprint.hsc
Austin Seipp [Fri, 23 Aug 2013 14:40:59 +0000 (09:40 -0500)] 
Fix validation failure in Fingerprint.hsc

Signed-off-by: Austin Seipp <aseipp@pobox.com>
6 years agoFingerprint.getFileHash: Fix not reading file at all.
Niklas Hambüchen [Fri, 23 Aug 2013 12:46:14 +0000 (21:46 +0900)] 
Fingerprint.getFileHash: Fix not reading file at all.

This lead to the stage1 compiler calculating random iface hashes.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
6 years agoFingerprint: Fix comment typo
Niklas Hambüchen [Fri, 23 Aug 2013 12:46:02 +0000 (21:46 +0900)] 
Fingerprint: Fix comment typo

Signed-off-by: Austin Seipp <aseipp@pobox.com>
6 years agoFix windows detection in ./sync-all.
Austin Seipp [Fri, 23 Aug 2013 11:14:24 +0000 (06:14 -0500)] 
Fix windows detection in ./sync-all.

We weren't considering 'msys' for the $OSNAME.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
6 years agoRevert "Add support for external repositories to sync-all"
Austin Seipp [Fri, 23 Aug 2013 10:16:13 +0000 (05:16 -0500)] 
Revert "Add support for external repositories to sync-all"

This reverts commit 2e41f2fa91c833a4420ac273254e49468044bc4b.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
6 years agoRemove dead code.
Austin Seipp [Thu, 22 Aug 2013 23:10:41 +0000 (18:10 -0500)] 
Remove dead code.

GHC >= 7.4 is needed to bootstrap.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
6 years agoActually, split that last comment a bit.
Austin Seipp [Thu, 22 Aug 2013 22:43:48 +0000 (17:43 -0500)] 
Actually, split that last comment a bit.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
6 years agoAdd some more comments to UsageFile.
Austin Seipp [Thu, 22 Aug 2013 22:32:27 +0000 (17:32 -0500)] 
Add some more comments to UsageFile.

This brings them up to date with the changes in #8144.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
6 years agoRemove trailing whitespace from Fingerprint.hsc
Austin Seipp [Thu, 22 Aug 2013 21:36:35 +0000 (16:36 -0500)] 
Remove trailing whitespace from Fingerprint.hsc

Signed-off-by: Austin Seipp <aseipp@pobox.com>
6 years agoRemove trailing whitespace from HscTypes
Austin Seipp [Thu, 22 Aug 2013 21:36:11 +0000 (16:36 -0500)] 
Remove trailing whitespace from HscTypes

Signed-off-by: Austin Seipp <aseipp@pobox.com>
6 years agoRemove trailing whitespace from MkIface
Austin Seipp [Thu, 22 Aug 2013 21:34:55 +0000 (16:34 -0500)] 
Remove trailing whitespace from MkIface

Signed-off-by: Austin Seipp <aseipp@pobox.com>
6 years agoFix -Werror failure in Fingerprint.hsc
Austin Seipp [Thu, 22 Aug 2013 21:21:38 +0000 (16:21 -0500)] 
Fix -Werror failure in Fingerprint.hsc

Signed-off-by: Austin Seipp <aseipp@pobox.com>
6 years agoFix interface hashes including time stamp of dependent files.
Niklas Hambüchen [Thu, 22 Aug 2013 02:05:56 +0000 (11:05 +0900)] 
Fix interface hashes including time stamp of dependent files.

Fixes #8144.

Before, the modification time of e.g. #included files (and everything
that ends up as a UsageFile, e.g. via addDependentFile) was taken as
input for the interface hash of a module.

This lead to different hashes for identical inputs on every compilation.

We now use file content hashes instead.

This changes the interface file format.
You will get "Binary.get(Usage): 50" when you try to do an incremental
using .hi files that were created with a GHC 7.7 (only) older than this commit.

To calculate the md5 hash (`Fingerprint`) of a file in constant space,
there now is GHC.Fingerprint.getFileHash, and a fallback version
for older GHCs that needs to load the file into memory completely
(only used when compiling stage1 with an older GHC).

Signed-off-by: Austin Seipp <aseipp@pobox.com>
6 years agoMkIface: Be consistent with do notation
Niklas Hambüchen [Tue, 20 Aug 2013 09:44:24 +0000 (18:44 +0900)] 
MkIface: Be consistent with do notation

Signed-off-by: Austin Seipp <aseipp@pobox.com>
6 years agoMkIface: When printing the recomp reason, make clear only mtime is used
Niklas Hambüchen [Tue, 20 Aug 2013 09:13:05 +0000 (18:13 +0900)] 
MkIface: When printing the recomp reason, make clear only mtime is used

Signed-off-by: Austin Seipp <aseipp@pobox.com>
6 years agoMkIface: More specific comment about what forms the interface hash
Niklas Hambüchen [Tue, 20 Aug 2013 08:00:21 +0000 (17:00 +0900)] 
MkIface: More specific comment about what forms the interface hash

Signed-off-by: Austin Seipp <aseipp@pobox.com>
6 years agoMkIface: Mention that #include now adds dependent files
Niklas Hambüchen [Tue, 20 Aug 2013 07:58:04 +0000 (16:58 +0900)] 
MkIface: Mention that #include now adds dependent files

Signed-off-by: Austin Seipp <aseipp@pobox.com>
6 years agoUpdate email addresses
Gabor Greif [Mon, 19 Aug 2013 09:31:15 +0000 (11:31 +0200)] 
Update email addresses

6 years agoStrings and comments only: 'to to ' fixes
Gabor Greif [Mon, 19 Aug 2013 09:20:19 +0000 (11:20 +0200)] 
Strings and comments only: 'to to ' fixes

I'd still prefer if a native english speaker would check them.

6 years agoRemove DYNAMIC_GHC_PROGRAMS tests in the linker
Simon Marlow [Thu, 22 Aug 2013 19:20:29 +0000 (20:20 +0100)] 
Remove DYNAMIC_GHC_PROGRAMS tests in the linker

The linker is usable even when GHCi is dynamically linked.  These
tests make the linker_unload test fail.

6 years agoUpdate release notes for GHC 7.8
Jan Stolarek [Thu, 22 Aug 2013 14:45:56 +0000 (15:45 +0100)] 
Update release notes for GHC 7.8

6 years agoComments only
Jan Stolarek [Thu, 22 Aug 2013 11:07:13 +0000 (12:07 +0100)] 
Comments only

This comment is no loger true

6 years agoOnly add -O to C compilations if there was -O on the command line
Simon Marlow [Thu, 22 Aug 2013 09:53:53 +0000 (10:53 +0100)] 
Only add -O to C compilations if there was -O on the command line

In 1e2b3780ebc40d28cd0f029b90df102df09e6827 I changed the option
ordering for C compilations.  A side effect was that -optc options
came before the automatic -O we were adding, which made it so that the
-debug RTS was getting optimised when it shouldn't have been.

Perhaps we shouldn't have automatic -O options added to C
compilations.  But that might cause problems for build systems that
are relying on the current behaviour, so I've made a minor change
instead: now C optimisation level == Haskell optimisation level.

6 years agoReally unload object code when it is safe to do so (#8039)
Simon Marlow [Fri, 5 Jul 2013 14:57:32 +0000 (15:57 +0100)] 
Really unload object code when it is safe to do so (#8039)

The next major GC after an unloadObj() will do a traversal of the heap
to determine whether the object code can be removed from memory or
not.  We'll keep doing these until it is safe to remove the object
code.

In my experiments with GHCi, the objects get unloaded immediately,
which is a good sign: we're not accidentally holding on to any
references anywhere in the GHC data structures.

Changes relative to the patch earlier posted on the ticket:
 - fix two memory leaks discovered with Valgrind, after
   testing with tests/rts/linker_unload.c

6 years agoIn the non-threaded RTS, make *_barrier functions EXTERN_INLINE, not #define. (fixes...
Ryan Newton [Thu, 1 Aug 2013 16:18:16 +0000 (12:18 -0400)] 
In the non-threaded RTS, make *_barrier functions EXTERN_INLINE, not #define. (fixes #8077)

6 years agoDetabify
Jan Stolarek [Wed, 21 Aug 2013 08:22:00 +0000 (09:22 +0100)] 
Detabify

I missed that file yesterday when I was cleaning up codeGen/ directory.

6 years agoAdded paragraph to user's guide about Nominal role for Set
Richard Eisenberg [Wed, 21 Aug 2013 02:41:04 +0000 (22:41 -0400)] 
Added paragraph to user's guide about Nominal role for Set

6 years agoAdded bullet in release notes about roles.
Richard Eisenberg [Tue, 20 Aug 2013 18:05:29 +0000 (14:05 -0400)] 
Added bullet in release notes about roles.

6 years agoComments only
Jan Stolarek [Tue, 20 Aug 2013 15:59:11 +0000 (16:59 +0100)] 
Comments only

6 years agoMerge cgTailCall and cgLneJump into one function
Jan Stolarek [Tue, 20 Aug 2013 14:03:26 +0000 (15:03 +0100)] 
Merge cgTailCall and cgLneJump into one function

Previosly logic of these functions was sth like this:

  cgIdApp x = case x of
                A -> cgLneJump x
                _ -> cgTailCall x

  cgTailCall x = case x of
                   B -> ...
                   C -> ...
                   _ -> ...

After merging there is no nesting of cases:

  cgIdApp x = case x of
                A -> -- body of cgLneJump
                B -> ...
                C -> ...
                _ -> ...

6 years agoRemove unused module
Jan Stolarek [Tue, 20 Aug 2013 11:50:28 +0000 (12:50 +0100)] 
Remove unused module

This commit removes module StgCmmGran which has only no-op functions.
According to comments in the module, it was used by GpH, but GpH
project seems to be dead for a couple of years now.

6 years agoCleanup StgCmm pass
Jan Stolarek [Tue, 20 Aug 2013 10:53:05 +0000 (11:53 +0100)] 
Cleanup StgCmm pass

This cleanup includes:
  * removing dead code. This includes forkStatics function,
    which was in fact one big noop, and global bindings in
    CgInfoDownwards,
  * converting functions that used FCode monad only to
    access DynFlags into functions that take DynFlags
    as a parameter and don't work in a monad,
  * addBindC function is now smarter. It extracts Id from
    CgIdInfo passed to it in the same way addBindsC does.
    Previously this was done at every call site, which was
    redundant.

6 years agoTrailing whitespaces, code formatting, detabify
Jan Stolarek [Tue, 20 Aug 2013 09:34:39 +0000 (10:34 +0100)] 
Trailing whitespaces, code formatting, detabify

A major cleanup of trailing whitespaces and tabs in codeGen/
directory. I also adjusted code formatting in some places.

6 years agoFix typo
Gabor Greif [Tue, 20 Aug 2013 09:54:00 +0000 (11:54 +0200)] 
Fix typo

6 years agoComments only
Gabor Greif [Mon, 19 Aug 2013 09:43:02 +0000 (11:43 +0200)] 
Comments only

6 years agoUpdate Win32 submodule.
Austin Seipp [Tue, 20 Aug 2013 04:49:45 +0000 (23:49 -0500)] 
Update Win32 submodule.

This fixes a build failure for i386/Windows.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
6 years agoAdd note on isSafeOverlap field.
David Terei [Mon, 19 Aug 2013 23:00:55 +0000 (16:00 -0700)] 
Add note on isSafeOverlap field.

6 years agoReplace occurences of darcs.haskell.org by git.haskell.org
Herbert Valerio Riedel [Mon, 19 Aug 2013 21:20:32 +0000 (23:20 +0200)] 
Replace occurences of darcs.haskell.org by git.haskell.org

...as the new `git.haskell.org` CNAME has been activated
(see also GitolitePlan and #8121 for more details)

6 years agoComments only
Jan Stolarek [Mon, 19 Aug 2013 14:44:19 +0000 (15:44 +0100)] 
Comments only

Documentation of Integer constant folding

6 years agoComments only
Simon Peyton Jones [Mon, 19 Aug 2013 08:45:27 +0000 (09:45 +0100)] 
Comments only

6 years agoFix Haddock formatting
Simon Peyton Jones [Mon, 19 Aug 2013 08:45:08 +0000 (09:45 +0100)] 
Fix Haddock formatting

6 years agoImprove eta-reduction some more, when the function includes casts
Simon Peyton Jones [Fri, 16 Aug 2013 10:21:41 +0000 (11:21 +0100)] 
Improve eta-reduction some more, when the function includes casts

6 years agoAdd a better implementation of dropTail, and use it
Simon Peyton Jones [Fri, 16 Aug 2013 10:15:33 +0000 (11:15 +0100)] 
Add a better implementation of dropTail, and use it

6 years agoComments only
Simon Peyton Jones [Fri, 16 Aug 2013 10:15:12 +0000 (11:15 +0100)] 
Comments only

6 years agoImprove error when using forall with UnicodeSyntax
Austin Seipp [Mon, 19 Aug 2013 04:01:57 +0000 (23:01 -0500)] 
Improve error when using forall with UnicodeSyntax

Fixes Trac #7901.

'∀' is neither upper nor lowercase, unlike the 'f' in 'forall', so when
explicit forall is not enabled, it creates a parse error before reaching
the '.', which is where we give a nice message for ascii 'forall'.
Therefore, we make '∀' into a token as long as UnicodeSyntax is enabled,
which is safe because its caselessness means it can never be mistaken
for a symbol, and check extensions in the parser when the 'forall' rule
is used.

Authored-by: Paul Cavallaro <ptc@fb.com>
Authored-by: Anders Papitto <anderspapitto@gmail.com>
Signed-off-by: Austin Seipp <aseipp@pobox.com>
6 years agoDead code elimination.
Austin Seipp [Mon, 19 Aug 2013 03:59:17 +0000 (22:59 -0500)] 
Dead code elimination.

Authored-by: Paul Cavallaro <ptc@fb.com>
Signed-off-by: Austin Seipp <aseipp@pobox.com>
6 years agoRemove dead code, fix a typo.
Austin Seipp [Mon, 19 Aug 2013 03:57:35 +0000 (22:57 -0500)] 
Remove dead code, fix a typo.

Authored-by: Anders Papitto <anderspapitto@gmail.com>
Signed-off-by: Austin Seipp <aseipp@pobox.com>
6 years agoEliminate trailing whitespace from Parser.y.pp
Austin Seipp [Mon, 19 Aug 2013 03:56:04 +0000 (22:56 -0500)] 
Eliminate trailing whitespace from Parser.y.pp

Signed-off-by: Austin Seipp <aseipp@pobox.com>
6 years agoEliminate trailing whitespace from Lexer.x
Austin Seipp [Mon, 19 Aug 2013 03:54:44 +0000 (22:54 -0500)] 
Eliminate trailing whitespace from Lexer.x

Signed-off-by: Austin Seipp <aseipp@pobox.com>
6 years agoAdd support for external repositories to sync-all
Austin Seipp [Sun, 18 Aug 2013 16:33:57 +0000 (11:33 -0500)] 
Add support for external repositories to sync-all

Signed-off-by: Austin Seipp <aseipp@pobox.com>
6 years agoFix Trac #8138.
Richard Eisenberg [Fri, 16 Aug 2013 17:36:10 +0000 (13:36 -0400)] 
Fix Trac #8138.

The code in CoreLint did not take into account the possibility of
~R# arguments to functions. These can arise in argToPat in SpecConstr.
Now, CoreLint does not fail when it sees a ~R# parameter.

This commit also updates the core-spec document accordingly.

6 years agoComments only
Jan Stolarek [Fri, 16 Aug 2013 10:21:45 +0000 (11:21 +0100)] 
Comments only

I restored part of documentation that describes what is a let-no-escape
and which was deleted 10 months ago together with the old codegen. Then
I removed lots of Literate Haskell clutter (like empty \begin{code} -
\end{code} blocks) and finally decided to remove all the Literate Haskell
markup because there wasn't much of it left, but it made comments so
difficult to read.

6 years agoComments only
Jan Stolarek [Fri, 16 Aug 2013 08:02:28 +0000 (09:02 +0100)] 
Comments only

6 years agoDon't delete HsTimeConfig.h.in during distclean.
Austin Seipp [Wed, 14 Aug 2013 21:49:52 +0000 (16:49 -0500)] 
Don't delete HsTimeConfig.h.in during distclean.

sdist preps the tree via distclean before anything else, which caused
HsTimeConfig.h.in under 'time' to be deleted - even though it should be
included in the resulting tarball for ./configure.

The correct target is 'maintainer-clean'.

I'm guessing the nightlies didn't complain because they run ./boot,
forcing regeneration. NixOS's Hydra does not, though.

Thanks to Peter Simons and Andres Löh for pointing this out.

Signed-off-by: Austin Seipp <aseipp@pobox.com>