ghc.git
5 years agoRe-enable DYNAMIC_GHC_PROGRAMS for FreeBSD.
Gabor Pali [Fri, 17 Jan 2014 19:24:00 +0000 (20:24 +0100)] 
Re-enable DYNAMIC_GHC_PROGRAMS for FreeBSD.

All actively supported releases (8.4-RELEASE, 9.2-RELEASE and the
upcoming 10.0-RELEASE) now support resolution of $ORIGIN properly.

5 years agoAllow "amd64" to be recognized as an x86_64 platform.
Gabor Pali [Fri, 17 Jan 2014 19:15:35 +0000 (20:15 +0100)] 
Allow "amd64" to be recognized as an x86_64 platform.

5 years agoEnable LLVM-based code generation for FreeBSD/amd64.
Gabor Pali [Fri, 17 Jan 2014 19:13:02 +0000 (20:13 +0100)] 
Enable LLVM-based code generation for FreeBSD/amd64.

5 years agoFix #8675
Austin Seipp [Fri, 17 Jan 2014 16:49:21 +0000 (10:49 -0600)] 
Fix #8675

Haddock no longer has a generated parser, so we don't need it in the
sdist and we certainly don't want to check for it in the ./configure
script (as that would be bogus.)

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoAdd testcase for #4267
Joachim Breitner [Fri, 17 Jan 2014 15:03:39 +0000 (15:03 +0000)] 
Add testcase for #4267

5 years agoAdd a test case for #5949
Joachim Breitner [Fri, 17 Jan 2014 14:08:30 +0000 (14:08 +0000)] 
Add a test case for #5949

5 years agoDon't print roles for data instances
Simon Peyton Jones [Fri, 17 Jan 2014 14:06:02 +0000 (14:06 +0000)] 
Don't print roles for data instances

See Trac #8672

5 years agoEta expand data family instances before printing them
Simon Peyton Jones [Fri, 17 Jan 2014 14:05:35 +0000 (14:05 +0000)] 
Eta expand data family instances before printing them

Fixes Trac #8674

5 years agoTidy up Outputable.printDoc, and add printDoc_
Simon Peyton Jones [Fri, 17 Jan 2014 10:40:58 +0000 (10:40 +0000)] 
Tidy up Outputable.printDoc, and add printDoc_

The former adds a newline at the end (restoring the previous behaviour)
while the latter does not (which previously happened by turning the
thuing into a string and only then printing it).

5 years agoAdd an expect-broken test for Trac #8566
Simon Peyton Jones [Thu, 16 Jan 2014 18:12:49 +0000 (18:12 +0000)] 
Add an expect-broken test for Trac #8566

5 years agoTypos in comments
Krzysztof Gogolewski [Thu, 16 Jan 2014 19:22:11 +0000 (20:22 +0100)] 
Typos in comments

5 years ago...and clean up the imports
Joachim Breitner [Thu, 16 Jan 2014 18:01:13 +0000 (18:01 +0000)] 
...and clean up the imports

5 years agoRemove unused returnsCPR
Joachim Breitner [Thu, 16 Jan 2014 16:55:07 +0000 (16:55 +0000)] 
Remove unused returnsCPR

5 years agoRefactor WorkWrap, get rid of worthSplittingArgDmd
Joachim Breitner [Thu, 16 Jan 2014 14:42:31 +0000 (14:42 +0000)] 
Refactor WorkWrap, get rid of worthSplittingArgDmd

Instead of first checking whether splitting is useful, and then firing
up the worker-wrapper-machinery, which will do the same checks again, we
now simply generate a worker and wrapper, and while doing so keep track
of whether what we did was in any way useful.

So now there is only one place left where we decide whether we want to
do w/w, and that place has access to more information, in particular the
actual types at hand.

5 years agoReplace worthSplittingThunkDmd by worthSplittingArgDmd
Joachim Breitner [Thu, 16 Jan 2014 13:59:31 +0000 (13:59 +0000)] 
Replace worthSplittingThunkDmd by worthSplittingArgDmd

these functions were almost equal, and neither validate nor nofib show
any difference replacing one by the other. So lets simplify this.
(This also prepares for a refactoring that will get rid of
worthSplittingArgDmd completely.)

5 years agoUpdate to current Cabal 1.18 branch tip
Herbert Valerio Riedel [Thu, 16 Jan 2014 15:20:44 +0000 (16:20 +0100)] 
Update to current Cabal 1.18 branch tip

This should contain a fix that addresses the Solaris build breakage
(see #8670)

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoAllow the argument to 'reserve' to be a compile-time expression
Simon Marlow [Thu, 16 Jan 2014 15:14:49 +0000 (15:14 +0000)] 
Allow the argument to 'reserve' to be a compile-time expression

By using the constant-folder to reduce it to an integer.

5 years agoAdd a way to reserve temporary stack space in high-level Cmm
Simon Marlow [Thu, 16 Jan 2014 11:55:25 +0000 (11:55 +0000)] 
Add a way to reserve temporary stack space in high-level Cmm

We occasionally need to reserve some temporary memory in a primop for
passing to a foreign function.  We've been using the stack for this,
but when we moved to high-level Cmm it became quite fragile because
primops are in high-level Cmm and the stack is supposed to be under
the control of the Cmm pipeline.

So this change puts things on a firmer footing by adding a new Cmm
construct 'reserve'.  e.g. in decodeFloat_Int#:

    reserve 2 = tmp {

      mp_tmp1  = tmp + WDS(1);
      mp_tmp_w = tmp;

      /* Perform the operation */
      ccall __decodeFloat_Int(mp_tmp1 "ptr", mp_tmp_w "ptr", arg);

      r1 = W_[mp_tmp1];
      r2 = W_[mp_tmp_w];
    }

reserve is described in CmmParse.y.

Unfortunately the argument to reserve must be a compile-time constant.
We might have to extend the parser to allow expressions with
arithmetic operators if this is too restrictive.

Note also that the return instruction for the procedure must be
outside the scope of the reserved stack area, so we have to extract
the values from the reserved area before we close the scope.  This
means some more local variables (r1, r2 in the example above).  The
generated code is more or less identical to what we had before though.

5 years agoTypo in comment
Gabor Greif [Thu, 16 Jan 2014 12:06:29 +0000 (13:06 +0100)] 
Typo in comment

5 years agobump bounds for T6048
Simon Marlow [Thu, 16 Jan 2014 11:10:01 +0000 (11:10 +0000)] 
bump bounds for T6048

Presumably broken by an earlier change, anyone know which one?

5 years agoDocumentation on the stack layout algorithm
Simon Marlow [Mon, 13 Jan 2014 20:36:48 +0000 (20:36 +0000)] 
Documentation on the stack layout algorithm

5 years agoDisable -fregs-graph (#7679, #8657)
Simon Marlow [Mon, 13 Jan 2014 20:07:19 +0000 (20:07 +0000)] 
Disable -fregs-graph (#7679, #8657)

5 years agotype-rep is only broken when debugging is on
Joachim Breitner [Thu, 16 Jan 2014 09:22:04 +0000 (10:22 +0100)] 
type-rep is only broken when debugging is on

in which case it is a wontfix (see #8569)

5 years agoUpdate to `containers-0.5.4.0`
Herbert Valerio Riedel [Thu, 16 Jan 2014 07:16:52 +0000 (08:16 +0100)] 
Update to `containers-0.5.4.0`

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoFix ghciprog004 when built with Clang
Austin Seipp [Thu, 16 Jan 2014 01:11:42 +0000 (19:11 -0600)] 
Fix ghciprog004 when built with Clang

Clang warns about implicit return values by default.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoDon't pass -nodefaultlibs to Clang
Austin Seipp [Thu, 16 Jan 2014 00:56:55 +0000 (18:56 -0600)] 
Don't pass -nodefaultlibs to Clang

This fixes a large majority of the testsuite failures on Mavericks with
Clang.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoCache compiler info in DynFlags
Austin Seipp [Thu, 16 Jan 2014 00:56:44 +0000 (18:56 -0600)] 
Cache compiler info in DynFlags

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoPLT Redex definition of an STG-like language, as-per the fast curry paper.
Edward Z. Yang [Wed, 15 Jan 2014 21:29:53 +0000 (13:29 -0800)] 
PLT Redex definition of an STG-like language, as-per the fast curry paper.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
5 years agoIn rts/Printer.c, print exact UPDATE_FRAME type
Arash Rouhani [Thu, 26 Dec 2013 13:57:35 +0000 (14:57 +0100)] 
In rts/Printer.c, print exact UPDATE_FRAME type

When printing an update frame in printClosure(), it will not print
the unspecific UPDATE_FRAME, instead it prints BH_UPDATE_FRAME,
NORMAL_UPDATE_FRAME or MARKED_UPDATE_FRAME.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agos/warn-type-holes/warn-typed-holes/g
Austin Seipp [Wed, 15 Jan 2014 14:35:37 +0000 (08:35 -0600)] 
s/warn-type-holes/warn-typed-holes/g

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoUpdate to `terminfo-0.4.0.0`/`haskeline-0.7.1.2`
Herbert Valerio Riedel [Wed, 15 Jan 2014 08:30:00 +0000 (09:30 +0100)] 
Update to `terminfo-0.4.0.0`/`haskeline-0.7.1.2`

These new versions get rid of AMP warnings

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoTurn -XTypeHoles into a (on by default) warning
Austin Seipp [Wed, 15 Jan 2014 02:16:26 +0000 (20:16 -0600)] 
Turn -XTypeHoles into a (on by default) warning

After some discussion on ghc-devs@ and elsewhere, it seemed favorable to
make this change as type holes don't let any invalid programs though,
they merely change what the compiler reports in case of certain errors
(namely unbound occurrences, or _ appearing on a LHS.)

Now, the warning mechanism is controlled by -f[no-]warn-type-errors,
just like any other regular warning. Again, on by default.

The documentation and tests have been updated accordingly.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoTypo in comment
Gabor Greif [Tue, 14 Jan 2014 12:01:11 +0000 (13:01 +0100)] 
Typo in comment

5 years agoFix Windows binary-dist target
Austin Seipp [Tue, 14 Jan 2014 08:31:31 +0000 (02:31 -0600)] 
Fix Windows binary-dist target

I'm not entirely sure what the intention of this code was, but it was
quite old, and the binary distribution for Windows seems to work OK
nonetheless.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoFix TyCon import
Austin Seipp [Tue, 14 Jan 2014 01:20:58 +0000 (19:20 -0600)] 
Fix TyCon import

Signed-off-by: Austin Seipp <austin@well-typed.com>
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>