ghc.git
5 years agoFix ./validate failure due to -Werror
Austin Seipp [Tue, 14 Jan 2014 01:15:51 +0000 (19:15 -0600)] 
Fix ./validate failure due to -Werror

This occurs when doing bootstraps with the 7.7 compiler.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoAnother AMP fix for Stream
Austin Seipp [Tue, 14 Jan 2014 01:00:47 +0000 (19:00 -0600)] 
Another AMP fix for Stream

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoFix AMP warnings for MaybeT/MaybeErr
Austin Seipp [Tue, 14 Jan 2014 00:39:10 +0000 (18:39 -0600)] 
Fix AMP warnings for MaybeT/MaybeErr

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agogenprimopcode: Applicative instance for ParserM
Austin Seipp [Mon, 13 Jan 2014 23:57:47 +0000 (17:57 -0600)] 
genprimopcode: Applicative instance for ParserM

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoFix binary linking errors on Solaris
Karel Gardas [Mon, 13 Jan 2014 23:00:18 +0000 (17:00 -0600)] 
Fix binary linking errors on Solaris

The -u option must be placed before libraries which define the necessary
symbols.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoAdd Solaris linker support to SysTools
Karel Gardas [Mon, 13 Jan 2014 22:59:47 +0000 (16:59 -0600)] 
Add Solaris linker support to SysTools

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoMark T8602 as expect_fail on Windows
Austin Seipp [Mon, 13 Jan 2014 18:23:05 +0000 (12:23 -0600)] 
Mark T8602 as expect_fail on Windows

Windows runs the preprocessor using runInteractiveProcess and can't
properly run the generated shell script as a result, since it can't
recognize e.g. a shebang or anything.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoFix T8526 on Windows
Austin Seipp [Mon, 13 Jan 2014 18:02:32 +0000 (12:02 -0600)] 
Fix T8526 on Windows

The shell interpretes the quotes incorrectly.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoFix T7859 mingw32 output
Austin Seipp [Mon, 13 Jan 2014 15:20:47 +0000 (09:20 -0600)] 
Fix T7859 mingw32 output

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoFix T8172 for Win32 (again)
Austin Seipp [Mon, 13 Jan 2014 15:05:07 +0000 (09:05 -0600)] 
Fix T8172 for Win32 (again)

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoAdd T8172 output for Win32
Austin Seipp [Mon, 13 Jan 2014 15:01:29 +0000 (09:01 -0600)] 
Add T8172 output for Win32

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoMark static001 as failing
Austin Seipp [Mon, 13 Jan 2014 14:40:28 +0000 (08:40 -0600)] 
Mark static001 as failing

Right now the stderr output doesn't match because we don't suppress some
libtool errors, but these seem to be benign. In the mean time, just mark
the text failing (soon to be marked expect_broken)

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoFix T3333
Austin Seipp [Mon, 13 Jan 2014 14:29:23 +0000 (08:29 -0600)] 
Fix T3333

Weak symbols work with the dynamic linker, not just the linux static
linker (c.f. Mac OS X.)

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoUpdate .gitignore
Austin Seipp [Mon, 13 Jan 2014 12:33:50 +0000 (06:33 -0600)] 
Update .gitignore

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoUpdate .gitignore again
Austin Seipp [Mon, 13 Jan 2014 12:33:03 +0000 (06:33 -0600)] 
Update .gitignore again

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoTweak OS X/amd64 perf numbers.
Austin Seipp [Mon, 13 Jan 2014 12:32:43 +0000 (06:32 -0600)] 
Tweak OS X/amd64 perf numbers.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoFix the behavior of ae87e122 (#8180)
Austin Seipp [Mon, 13 Jan 2014 08:52:35 +0000 (02:52 -0600)] 
Fix the behavior of ae87e122 (#8180)

As Simon pointed out, we should only enable -dynamic-too in the template
haskell case if GHC is dynamic and we're not already compiling in the
dyn way (the dyn way will be switched on by -dynamic-too later in the
pipeline anyway - see pipeLoop)

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoDisable -dynamic-too on Windows
Austin Seipp [Mon, 13 Jan 2014 08:15:35 +0000 (02:15 -0600)] 
Disable -dynamic-too on Windows

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoRegenerate core-spec.pdf.
Richard Eisenberg [Tue, 14 Jan 2014 01:32:35 +0000 (20:32 -0500)] 
Regenerate core-spec.pdf.

This applies the changes in commit
a924debcbb3dc5c004f988fcc1b480a01ba276dd to the PDF file.

5 years agoRemove obsolete declarations from `MiscClosures.h`
Herbert Valerio Riedel [Mon, 13 Jan 2014 15:42:58 +0000 (16:42 +0100)] 
Remove obsolete declarations from `MiscClosures.h`

When `integer-gmp` was moved out of the RTS
(via 1b61c2db6a8d6627577bcd7876474a0c5bd1eedb)
these declarations were missed.

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoAdapt perf values due to [cbde8627/integer-gmp]
Herbert Valerio Riedel [Mon, 13 Jan 2014 16:32:03 +0000 (17:32 +0100)] 
Adapt perf values due to [cbde8627/integer-gmp]

These are slight improvements due to optimizations in `integer-gmp` (#8647)

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoLower T4830/allocated_bytes due to [7bdcadda7/integer-gmp] (#8647)
Herbert Valerio Riedel [Mon, 13 Jan 2014 13:22:03 +0000 (14:22 +0100)] 
Lower T4830/allocated_bytes due to [7bdcadda7/integer-gmp] (#8647)

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoTest Trac #8616
Simon Peyton Jones [Mon, 13 Jan 2014 12:23:31 +0000 (12:23 +0000)] 
Test Trac #8616

5 years agoMore .gitignore updates
Austin Seipp [Mon, 13 Jan 2014 06:28:01 +0000 (00:28 -0600)] 
More .gitignore updates

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoAdd Windows to NoSharedLibsPlatformList
Austin Seipp [Mon, 13 Jan 2014 06:21:18 +0000 (00:21 -0600)] 
Add Windows to NoSharedLibsPlatformList

We're punting on full -dynamic and -dynamic-too support for Windows
right now, since it's still unstable. Also, ensure "Support dynamic-too"
in `ghc --info` is set to "NO" for Cabal.

See issues #7134, #8228, and #5987

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoMore testsuite .gitignore updates
Austin Seipp [Sun, 12 Jan 2014 21:00:59 +0000 (15:00 -0600)] 
More testsuite .gitignore updates

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoFix #8180
Austin Seipp [Sun, 12 Jan 2014 19:40:51 +0000 (13:40 -0600)] 
Fix #8180

When compiling a set of modules under --make, we need to check if the
module graph has TemplateHaskell enabled. If it does, then we need to
switch on -dynamic-too for GHCi, so that the linker can properly find
the right dynamic object files.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoUpdate new testsuite .gitignore
Austin Seipp [Sun, 12 Jan 2014 18:42:08 +0000 (12:42 -0600)] 
Update new testsuite .gitignore

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoBump Haddock perf numbers for new parser
Austin Seipp [Sun, 12 Jan 2014 18:38:15 +0000 (12:38 -0600)] 
Bump Haddock perf numbers for new parser

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoFix new Haddock doc parse failures.
Austin Seipp [Sun, 12 Jan 2014 18:37:59 +0000 (12:37 -0600)] 
Fix new Haddock doc parse failures.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoUpdate `sync-all` and others files w.r.t. merged testsuite (re #8545)
Herbert Valerio Riedel [Sun, 12 Jan 2014 11:05:23 +0000 (12:05 +0100)] 
Update `sync-all` and others files w.r.t. merged testsuite (re #8545)

See merge commit 66693401b98cb5aa912948af7bbd2182474f50c4

This commit also adds a check for a left-over testsuite/.git folder to sync-all

This way, the first time sync-all is called after updating to a
post-testsuite-merge (see #8545) state of ghc.git, the sync-all script
aborts with an error message if a `testsuite/.git` folder is detected and
thus forces the user to take action.

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoFold testsuite.git into ghc.git (re #8545)
Herbert Valerio Riedel [Sun, 12 Jan 2014 10:40:09 +0000 (11:40 +0100)] 
Fold testsuite.git into ghc.git (re #8545)

This commit performs a subtree merge of testsuite.git into ghc.git;
The next commit will adapt `sync-all` et al. to the new situation.

At the time of merge, testsuite.git was at commit
[998a816ae89c4fd573f4abd7c6abb346cf7ee9af/testsuite]

The following steps have been used to accomplish this merge:

1. Clone a fresh testsuite.git copy (& cd into)

2. Remove accidentally committed binary files from history

 git filter-branch \
  --index-filter "git rm -r --cached --ignore-unmatch \
    tests/haddock/should_compile_flag_nohaddock/a.out \
    tests/haddock/should_compile_noflag_nohaddock/a.out \
    tests/ghc-regress/haddock/should_compile_flag_nohaddock/a.out \
    tests/ghc-regress/haddock/should_compile_noflag_nohaddock/a.out \
    tests/ghc-regress/dph/diophantine/dph-diophantine-fast \
    tests/ghc-regress/dph/diophantine/dph-diophantine-opt \
    tests/ghc-regress/dph/primespj/dph-primespj-fast \
    tests/ghc-regress/dph/quickhull/dph-quickhull-fast \
    tests/ghc-regress/dph/smvm/dph-smvm \
    tests/ghc-regress/dph/sumnats/dph-sumnats \
    tests/ghc-regress/dph/words/dph-words-fast \
    tests/ghc-regress/plugins/plugins01" \
   HEAD

3. Rename all paths in testsuite.git to be prefixed with `testsuite/`

 git filter-branch -f --prune-empty --tree-filter \
  "mkdir -p testsuite; \
   git ls-tree --name-only \$GIT_COMMIT | xargs -I files mv files testsuite/"

4. cd into ghc/ checkout, and perform subtree merge of testsuite into ghc
   (see also http://nuclearsquid.com/writings/subtree-merging-and-you/)

 cd ../ghc/
 git remote add -f testsuite ../testsuite/.git
 git merge -s ours --no-commit testsuite/master
 git read-tree --prefix=/ -u testsuite/master
 git commit

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agofix a mistyped label that caused a stray reference
Gabor Greif [Sun, 12 Jan 2014 02:26:33 +0000 (03:26 +0100)] 
fix a mistyped label that caused a stray reference

Richard, you may want to regenerate the PDF
as I get

! LaTeX Error: File `stmaryrd.sty' not found.

with my setup and do not want to mess things up.

Also for me ?? appear twice on top of the page 13
and I have tp 'rm core-spec.pdf; make' to get it
right.

5 years agoFix typo in error message
Herbert Valerio Riedel [Sat, 11 Jan 2014 10:20:26 +0000 (11:20 +0100)] 
Fix typo in error message

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoUpdate mailmap
Herbert Valerio Riedel [Mon, 16 Dec 2013 16:18:17 +0000 (17:18 +0100)] 
Update mailmap

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoFix #8599.
Richard Eisenberg [Fri, 10 Jan 2014 20:26:02 +0000 (15:26 -0500)] 
Fix #8599.

This change is just some documentation around ignoring the context
of an enclosing instance when processing `deriving` clauses of an
associated data instance.

5 years agoClarify issue in #8630 in users' guide.
Richard Eisenberg [Fri, 10 Jan 2014 15:06:53 +0000 (10:06 -0500)] 
Clarify issue in #8630 in users' guide.

We do *not* propagate kind information from an instance declaration's
members back into the instance head.

5 years agoDocument the fact that Areas overlap, and why.
Simon Marlow [Fri, 10 Jan 2014 20:29:41 +0000 (20:29 +0000)] 
Document the fact that Areas overlap, and why.

5 years agoComment typos only
Gabor Greif [Fri, 10 Jan 2014 18:23:02 +0000 (19:23 +0100)] 
Comment typos only

5 years agoMake initGhcMonad call setUnsafeGlobalDynFlags
Simon Peyton Jones [Fri, 10 Jan 2014 18:16:34 +0000 (18:16 +0000)] 
Make initGhcMonad call setUnsafeGlobalDynFlags

If we don't do this, then in various GHC API scenarios
(which use runGhc) with tracing/debugging/ASSERTs on,
we try to read those unsafe global dynamic flags and
find them uninitialised.

5 years agoMake showSDoc and friends respect -dppr-cols
Simon Peyton Jones [Fri, 10 Jan 2014 18:14:57 +0000 (18:14 +0000)] 
Make showSDoc and friends respect -dppr-cols

Previously they just used a fixed width of 100, ignoring
-dppr-cols.  I think this dates back to a time when
the flag didn't exist, or wasn't conveniently available.

Thanks to Andrew Gibiansky for pointing this out.

5 years agoBring kind variables into the type-checker's scope as well as type variables
Simon Peyton Jones [Fri, 10 Jan 2014 18:12:50 +0000 (18:12 +0000)] 
Bring kind variables into the type-checker's scope as well as type variables

Fixes Trac #8616

5 years agoNotes and code cosmetics
Joachim Breitner [Fri, 10 Jan 2014 14:22:41 +0000 (14:22 +0000)] 
Notes and code cosmetics

Explain why defaultDmd resTypeArgDmd are similar, but both needed, and
apply slight code cosmetics.

5 years agoAdd forgotten stderr output for T5498
Joachim Breitner [Fri, 10 Jan 2014 11:55:14 +0000 (11:55 +0000)] 
Add forgotten stderr output for T5498

5 years agoFix a typo in comment
Gabor Greif [Fri, 10 Jan 2014 11:05:14 +0000 (12:05 +0100)] 
Fix a typo in comment

5 years agoTest Trac #8651
Simon Peyton Jones [Fri, 10 Jan 2014 09:28:11 +0000 (09:28 +0000)] 
Test Trac #8651

5 years agoTest Trac #8649
Simon Peyton Jones [Fri, 10 Jan 2014 09:22:57 +0000 (09:22 +0000)] 
Test Trac #8649

5 years agoAdjust "max_bytes_used" upward for T4801
Simon Peyton Jones [Fri, 10 Jan 2014 08:48:53 +0000 (08:48 +0000)] 
Adjust "max_bytes_used" upward for T4801

5 years agoChanges in error messages when fixing Trac #8649
Simon Peyton Jones [Thu, 9 Jan 2014 17:59:51 +0000 (17:59 +0000)] 
Changes in error messages when fixing Trac #8649

Mostly improvements, happily

5 years agoTest Trac #5498
Simon Peyton Jones [Tue, 7 Jan 2014 12:21:28 +0000 (12:21 +0000)] 
Test Trac #5498

5 years agoComments only
Simon Peyton Jones [Thu, 9 Jan 2014 17:58:37 +0000 (17:58 +0000)] 
Comments only

5 years agoRe-work the naming story for the GHCi prompt (Trac #8649)
Simon Peyton Jones [Thu, 9 Jan 2014 17:58:18 +0000 (17:58 +0000)] 
Re-work the naming story for the GHCi prompt (Trac #8649)

The basic idea here is simple, and described in Note [The interactive package]
in HscTypes, which starts thus:

    Note [The interactive package]
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Type and class declarations at the command prompt are treated as if
    they were defined in modules
       interactive:Ghci1
       interactive:Ghci2
       ...etc...
    with each bunch of declarations using a new module, all sharing a
    common package 'interactive' (see Module.interactivePackageId, and
    PrelNames.mkInteractiveModule).

    This scheme deals well with shadowing.  For example:

       ghci> data T = A
       ghci> data T = B
       ghci> :i A
       data Ghci1.T = A  -- Defined at <interactive>:2:10

    Here we must display info about constructor A, but its type T has been
    shadowed by the second declaration.  But it has a respectable
    qualified name (Ghci1.T), and its source location says where it was
    defined.

    So the main invariant continues to hold, that in any session an original
    name M.T only refers to oe unique thing.  (In a previous iteration both
    the T's above were called :Interactive.T, albeit with different uniques,
    which gave rise to all sorts of trouble.)

This scheme deals nicely with the original problem.  It allows us to
eliminate a couple of grotseque hacks
  - Note [Outputable Orig RdrName] in HscTypes
  - Note [interactive name cache] in IfaceEnv
(both these comments have gone, because the hacks they describe are no
longer necessary). I was also able to simplify Outputable.QueryQualifyName,
so that it takes a Module/OccName as args rather than a Name.

However, matters are never simple, and this change took me an
unreasonably long time to get right.  There are some details in
Note [The interactive package] in HscTypes.

5 years agoFurther improve the "same-occurrence" error messages (Trac #8278)
Simon Peyton Jones [Thu, 9 Jan 2014 16:55:31 +0000 (16:55 +0000)] 
Further improve the "same-occurrence" error messages (Trac #8278)

Sometimes we actually have a good SrcSpan for the type constructor
and reporting that is better than just reporting which module it
was defined on

5 years agoA little refactoring so that we print package-qualified modules names if necessary
Simon Peyton Jones [Thu, 9 Jan 2014 16:19:22 +0000 (16:19 +0000)] 
A little refactoring so that we print package-qualified modules names if necessary

5 years agoImprove documentation of :module etc (Trac #8622)
Simon Peyton Jones [Thu, 9 Jan 2014 16:17:59 +0000 (16:17 +0000)] 
Improve documentation of :module etc (Trac #8622)

I did quite a bit of restructuring, as well as adding
the note specifically referred to in #8622

5 years agoComment typo
Simon Peyton Jones [Tue, 7 Jan 2014 10:03:56 +0000 (10:03 +0000)] 
Comment typo

5 years agoFurther refine the test for 'given' equalities
Simon Peyton Jones [Tue, 7 Jan 2014 10:03:42 +0000 (10:03 +0000)] 
Further refine the test for 'given' equalities

Trac #8651 revealed that my previous fix (itself in response to #8644)
wasn't quite right.  The plan, using the CtOrigin to identify
constraints arising from flattening, is described in TcSimplify,
Note [When does an implication have given equalities?]

5 years agoDocument Proxy# (#8658)
Austin Seipp [Thu, 9 Jan 2014 07:02:56 +0000 (01:02 -0600)] 
Document Proxy# (#8658)

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoTest that runST is not inlined prematurely
Joachim Breitner [Wed, 8 Jan 2014 18:23:56 +0000 (18:23 +0000)] 
Test that runST is not inlined prematurely

This resulted form a discussion about #5916.

5 years agoExtend runRnSpliceHook to decls and patterns
Edsko de Vries [Wed, 8 Jan 2014 15:48:32 +0000 (15:48 +0000)] 
Extend runRnSpliceHook to decls and patterns

5 years agoTests for #8601
John Lenz [Tue, 7 Jan 2014 13:22:56 +0000 (07:22 -0600)] 
Tests for #8601

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agorunghc: Fix interaction of stdin and --ghc-args
John Lenz [Tue, 7 Jan 2014 13:21:23 +0000 (07:21 -0600)] 
runghc: Fix interaction of stdin and --ghc-args

When reading the program from standard input, runghc did not properly
handle the --ghc-arg= escape for arguments to ghc which do not start
with a dash, since arguments were processed twice and the first time the
--ghc-arg= was stripped.  Now arguments are only processed once.  For
backwards compatibility, a prefix of --ghc-arg=--ghc-arg= is allowed
since this prefix will work on both old and new versions of ghc.

This fixes #8601

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoFix validate failure.
Austin Seipp [Tue, 7 Jan 2014 13:18:51 +0000 (07:18 -0600)] 
Fix validate failure.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoRemove trailing whitespace.
Austin Seipp [Tue, 7 Jan 2014 13:12:36 +0000 (07:12 -0600)] 
Remove trailing whitespace.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoLlvmMangler: Make sure no symbols slip through re-.typing
Ben Gamari [Wed, 18 Dec 2013 15:09:31 +0000 (10:09 -0500)] 
LlvmMangler: Make sure no symbols slip through re-.typing

Previously a few symbols weren't flipped from %function to %object
as the section splitter was emitting them without processes. This
may be a bug in itself but for now let's just work around the issue
but rewriting all symbol `.types`.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoLlvmMangler: Rewrite @function symbols to @object
Ben Gamari [Sat, 14 Dec 2013 17:04:28 +0000 (12:04 -0500)] 
LlvmMangler: Rewrite @function symbols to @object

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoAdd test suite for #8602
Chris Heller [Thu, 2 Jan 2014 21:54:58 +0000 (16:54 -0500)] 
Add test suite for #8602

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoRe-order preprocessor args to agree with User Guide (fixes #8602)
Chris Heller [Thu, 2 Jan 2014 21:55:52 +0000 (16:55 -0500)] 
Re-order preprocessor args to agree with User Guide (fixes #8602)

The section of the User Guide in reference is 4.12.4

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoLower unfolding threshold for windows (again.)
Austin Seipp [Tue, 7 Jan 2014 07:42:29 +0000 (01:42 -0600)] 
Lower unfolding threshold for windows (again.)

We creeped back up again past the symbol threshold on my test x86_64
win2k8 test machine. This brings it down to 60600 symbols in split
windows DLL.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agonativeGen: Fix spelling in comment
Ben Gamari [Sat, 21 Dec 2013 14:44:38 +0000 (09:44 -0500)] 
nativeGen: Fix spelling in comment

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoFix specification of -z origin for gold.
Austin Seipp [Tue, 7 Jan 2014 07:06:10 +0000 (01:06 -0600)] 
Fix specification of -z origin for gold.

Gold apparently doesn't recognize `-z origin`, only `-zorigin` it seems.

Authored-by: Ben Gamari <bgamari.foss@gmail.com>
Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoLLVM mangler: fix AVX instruction rewriter.
Austin Seipp [Tue, 7 Jan 2014 07:03:48 +0000 (01:03 -0600)] 
LLVM mangler: fix AVX instruction rewriter.

This was pretty badly broken...

Authored-by: Ben Gamari <bgamari.foss@gmail.com>
Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoFix __GLASGOW_HASKELL_LLVM__ #define
Austin Seipp [Tue, 7 Jan 2014 06:59:17 +0000 (00:59 -0600)] 
Fix __GLASGOW_HASKELL_LLVM__ #define

(It improperly used 'show' on the Maybe Int, not the Int.)

Authored-by: Karel Gardas <karel.gardas@centrum.cz>
Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoFix -dynamic-too clashing with -o (#8180)
Austin Seipp [Mon, 16 Dec 2013 15:04:44 +0000 (09:04 -0600)] 
Fix -dynamic-too clashing with -o (#8180)

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoUpdate perf values for T5237
Joachim Breitner [Mon, 6 Jan 2014 10:57:28 +0000 (10:57 +0000)] 
Update perf values for T5237

Probably improved by [9e10d188]

5 years agoAdd output for T8639
Joachim Breitner [Mon, 6 Jan 2014 10:54:45 +0000 (10:54 +0000)] 
Add output for T8639

(probably forgotten in [0a0ca809])

5 years agoUpdate T7594 properly
Joachim Breitner [Mon, 6 Jan 2014 10:50:08 +0000 (10:50 +0000)] 
Update T7594 properly

The previous updates had the line numbers wrong.

5 years agoFix #5209: Reset GHCi prompt in multiline mode
Benno Fünfstück [Fri, 3 Jan 2014 16:17:30 +0000 (17:17 +0100)] 
Fix #5209: Reset GHCi prompt in multiline mode

GHCi didn't reset the multiline prompt when an exception (in particular,
the UserInterrupt exception) occured. This commit uses `finally` to
reset the prompt in all cases.

5 years agoTest Trac #8579
Simon Peyton Jones [Fri, 3 Jan 2014 16:50:12 +0000 (16:50 +0000)] 
Test Trac #8579

5 years agoTest Trac #8628
Simon Peyton Jones [Fri, 3 Jan 2014 16:33:59 +0000 (16:33 +0000)] 
Test Trac #8628

5 years agoTest Trac #8640
Simon Peyton Jones [Fri, 3 Jan 2014 16:22:01 +0000 (16:22 +0000)] 
Test Trac #8640

5 years agoDo hFlush in the T8639_api test
Simon Peyton Jones [Fri, 3 Jan 2014 16:10:27 +0000 (16:10 +0000)] 
Do hFlush in the T8639_api test

5 years agoUpdate T7594 as a result of fixing #8644
Simon Peyton Jones [Fri, 3 Jan 2014 16:09:47 +0000 (16:09 +0000)] 
Update T7594 as a result of fixing #8644

The fix to #8644 makes the original T7594 pass (rightly).
I've added a variant that shouuld and does fail

5 years agoWhite space only
Simon Peyton Jones [Fri, 3 Jan 2014 16:07:17 +0000 (16:07 +0000)] 
White space only

5 years agoTest Trac #8644
Simon Peyton Jones [Fri, 3 Jan 2014 16:06:04 +0000 (16:06 +0000)] 
Test Trac #8644

5 years agoImprove the equality-floating story (again), to fix Trac #8644
Simon Peyton Jones [Fri, 3 Jan 2014 16:04:04 +0000 (16:04 +0000)] 
Improve the equality-floating story (again), to fix Trac #8644

We float equalities out of implications whose 'givens' include equalities.
But it's a bit tricky knowing whether some givens do or do not include
equalities, as #8644 shows.  There the given has type 'c' (which might
have equalities), but we discover that 'c ~ ()', which definitely doesn't.

In short, we must look at the givens *after* normalisation, not before.
Moreover, something similar happens in approximateWC, where we need
to ask whether an implication has given equalities.

This patch does the job:

* Add a Boolean field inert_no_eqs to InertCans, which records
  whether we've added a non-constant equality

* Add a field ic_no_eqs to Implication, which records whether the
  ic_given binders include any equalities

* Get rid of Inst.hasEqualities altogether

On the way I did some un-forced refactoring

* Introduce the auxiliary function TcCanonical.flattenNestedFamApp

* Kill off FamHeadMap and PredMap in favour of
  the new FunEqMap and DictMap respectively

5 years agoRefactor the way shadowing in handled in GHCi
Simon Peyton Jones [Fri, 3 Jan 2014 15:50:39 +0000 (15:50 +0000)] 
Refactor the way shadowing in handled in GHCi

If you say
  ghci> import Foo( T )
  ghci> data T = MkT
  ghci> data T = XXX
then the second 'data T' should shadow the first.  But the qualified
Foo.T should still be available.  We really weren't handling this
correctly at all, resulting in Trac #8639 and #8628 among others

This patch:

* Add RdrName.extendGlobalRdrEnv, which does shadowing properly

* Change HscTypes.icExtendGblRdrEnv (was badly-named icPlusGblRdrEnv)
  to use the new function

* Change RnNames.extendGobalRdrEnvRn to use the new function

* Move gresFrom Avails into RdrName
* Better pprGlobalRdrEnv function in RdrName

5 years agoImprove error message when using qualified names in GHCi
Simon Peyton Jones [Fri, 3 Jan 2014 15:39:35 +0000 (15:39 +0000)] 
Improve error message when using qualified names in GHCi

When you say
  ghci> :i Foo.x
GHCi tries to find module Foo and get 'x' from it.  But
if Foo doesn't exist we don't want to say:
  Attempting to use module ‛Foo’ which is not loaded

This is a bit confusing. Rather we just want to say that
Foo.x is not in scope.

5 years agoAdd alterOccEnv
Simon Peyton Jones [Fri, 3 Jan 2014 15:36:31 +0000 (15:36 +0000)] 
Add alterOccEnv

5 years agoUse the GlobalRdrEnv when renaming the axuiliary bindings in 'deriving'
Simon Peyton Jones [Fri, 3 Jan 2014 15:35:45 +0000 (15:35 +0000)] 
Use the GlobalRdrEnv when renaming the axuiliary bindings in 'deriving'

I'm not sure why were were using bindLocalNames before, but it triggers
an assert failure that checks that local names are Internal.  This
change makes things more uniform and straightforward.

5 years agoImproved out-of-scope error for qualified names in GHCi
Simon Peyton Jones [Thu, 2 Jan 2014 15:18:45 +0000 (15:18 +0000)] 
Improved out-of-scope error for qualified names in GHCi

5 years agoTest Trac #8639
Simon Peyton Jones [Thu, 2 Jan 2014 15:18:10 +0000 (15:18 +0000)] 
Test Trac #8639

5 years agoTest Trac #8639 (just the GHCi version)
Simon Peyton Jones [Tue, 31 Dec 2013 17:07:31 +0000 (17:07 +0000)] 
Test Trac #8639 (just the GHCi version)

5 years agoIn ':show imports' take account of -XNoImplicitPrelude
Simon Peyton Jones [Thu, 2 Jan 2014 15:16:32 +0000 (15:16 +0000)] 
In ':show imports' take account of -XNoImplicitPrelude

Fixes Trac #8640

5 years agoTest Trac #8625
Simon Peyton Jones [Tue, 31 Dec 2013 21:28:51 +0000 (21:28 +0000)] 
Test Trac #8625

5 years agoHandle parens in predicates when converting to TH
Simon Peyton Jones [Tue, 31 Dec 2013 21:25:19 +0000 (21:25 +0000)] 
Handle parens in predicates when converting to TH

This fixes Trac #8625

5 years agoUpdate Note [Coercible instances]
Joachim Breitner [Thu, 2 Jan 2014 11:39:45 +0000 (12:39 +0100)] 
Update Note [Coercible instances]

5 years agoClean up block allocator, fixes #8609
Edward Z. Yang [Thu, 12 Dec 2013 00:17:39 +0000 (16:17 -0800)] 
Clean up block allocator, fixes #8609

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
5 years agoFix number literal syntax mistake
Joachim Breitner [Mon, 30 Dec 2013 21:14:19 +0000 (22:14 +0100)] 
Fix number literal syntax mistake

introduced in c2e88b34cd3cb48d4bb203b6f0e7de1980e9c570.

5 years agoComments only
Simon Peyton Jones [Mon, 30 Dec 2013 12:10:45 +0000 (12:10 +0000)] 
Comments only