ghc.git
5 years agoAdd missing stderr file for tcrun045.
Edward Z. Yang [Fri, 30 May 2014 00:29:25 +0000 (17:29 -0700)] 
Add missing stderr file for tcrun045.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
5 years agoFix bitrotted GHC API test T6145.
Edward Z. Yang [Fri, 30 May 2014 00:20:50 +0000 (17:20 -0700)] 
Fix bitrotted GHC API test T6145.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
5 years agoAdd .gitignore for autogenerated test files.
Edward Z. Yang [Fri, 30 May 2014 00:07:06 +0000 (17:07 -0700)] 
Add .gitignore for autogenerated test files.

I used this shell command to automatically generate the lists:

for i in `git ls-files -o --exclude-standard --directory`; do echo "`basename $i`" >> "`dirname "$i"`/.gitignore"; done

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
5 years agoUpdate T4891, T8639_api to follow 73c08ab10 (GHCi naming changes)
Edward Z. Yang [Thu, 29 May 2014 23:58:02 +0000 (16:58 -0700)] 
Update T4891, T8639_api to follow 73c08ab10 (GHCi naming changes)

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
5 years agoUpdate Haddock submodule.
Mateusz Kowalczyk [Thu, 29 May 2014 01:26:35 +0000 (03:26 +0200)] 
Update Haddock submodule.

This doesn't make any actual changes as to what the source looked like
at previous commit we were pointing to but I made some foolish reverts
that I now have to accomodate for. Sorry!

5 years agoFix comment typo
Jan Stolarek [Wed, 28 May 2014 15:27:29 +0000 (17:27 +0200)] 
Fix comment typo

5 years agoNo need to call defaultKind in mkTcEqPred
Simon Peyton Jones [Wed, 28 May 2014 08:16:53 +0000 (09:16 +0100)] 
No need to call defaultKind in mkTcEqPred

5 years agoUse mkTcEqPred rather than mkEqPred in the type checker
Simon Peyton Jones [Wed, 28 May 2014 08:16:16 +0000 (09:16 +0100)] 
Use mkTcEqPred rather than mkEqPred in the type checker

Type.mkEqPred has an assertion warning for kind compatibility.  But
during type checking we may form equality predicates with incompatible
kinds; hence TcType.mkTcEqPred, which does not check.  We were calling
the former instead of the latter in a couple of places, leading to
spurious debug warnings.

5 years agoT4006, environment001, T3307 all work on msys2
Simon Peyton Jones [Wed, 28 May 2014 08:12:34 +0000 (09:12 +0100)] 
T4006, environment001, T3307 all work on msys2

5 years agoTest Trac #9144
Simon Peyton Jones [Tue, 27 May 2014 21:27:44 +0000 (22:27 +0100)] 
Test Trac #9144

5 years agoAssert that matcher-derived PatSyn types match the (redundant) stored types in IfaceP...
Dr. ERDI Gergo [Tue, 27 May 2014 13:48:42 +0000 (21:48 +0800)] 
Assert that matcher-derived PatSyn types match the (redundant) stored types in IfacePatSyn

5 years agoStore IfExtNames for PatSyn matchers and wrappers in interface file.
Dr. ERDI Gergo [Tue, 27 May 2014 13:16:41 +0000 (21:16 +0800)] 
Store IfExtNames for PatSyn matchers and wrappers in interface file.
This way, the Ids for the matchers/wrappers are reused by importing
modules, and thus unfoldings are kept.

Also updates haddock submodule to accomodate tweaks in PatSyn representation

5 years agoReplace DeriveDataTypeable by AutoDeriveTypeable
Herbert Valerio Riedel [Tue, 27 May 2014 11:49:30 +0000 (13:49 +0200)] 
Replace DeriveDataTypeable by AutoDeriveTypeable

This is a first step towards addressing #9111

This results in the following additional Typeable (exported) instances
being generated (list was compiled by diff'ing hoogle txt output):

  instance Typeable CFile
  instance Typeable 'CFile
  instance Typeable CFpos
  instance Typeable 'CFpos
  instance Typeable CJmpBuf
  instance Typeable 'CJmpBuf
  instance Typeable ChItem
  instance Typeable QSem
  instance Typeable ID
  instance Typeable 'ID
  instance Typeable CONST
  instance Typeable Qi
  instance Typeable Qr
  instance Typeable Mp
  instance Typeable ConstrRep
  instance Typeable Fixity
  instance Typeable 'Prefix
  instance Typeable 'Infix
  instance Typeable Constr
  instance Typeable DataType
  instance Typeable DataRep
  instance Typeable Data
  instance Typeable HasResolution
  instance Typeable IsList

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoAdd missing test file T7269
Simon Peyton Jones [Mon, 26 May 2014 16:03:23 +0000 (17:03 +0100)] 
Add missing test file T7269

5 years agoFix yet another bug in 'deriving' for polykinded classes (Trac #7269)
Simon Peyton Jones [Mon, 26 May 2014 14:25:30 +0000 (15:25 +0100)] 
Fix yet another bug in 'deriving' for polykinded classes (Trac #7269)

This patch makes the code a bit simpler if anything.

5 years agotest.mk: Be liberal in accepting GHC_PKG output
Joachim Breitner [Fri, 23 May 2014 20:27:58 +0000 (22:27 +0200)] 
test.mk: Be liberal in accepting GHC_PKG output

When the tree is not built, GHC_PKG refers to ghc-pkg in the patth,
which may not yet support --simple-output to suppress the field name. So
we strip the fieldname when parsing the output, to avoid annoying
warnings.

5 years agoTypos in comments
Gabor Greif [Fri, 23 May 2014 17:04:12 +0000 (19:04 +0200)] 
Typos in comments

5 years agoBump bytes-allocated for T3064
Simon Peyton Jones [Fri, 23 May 2014 08:41:27 +0000 (09:41 +0100)] 
Bump bytes-allocated for T3064

I'm not sure why this has increased, but it seems small

5 years agoWhite space only
Simon Peyton Jones [Fri, 23 May 2014 06:48:52 +0000 (07:48 +0100)] 
White space only

5 years agoMore debug info for failures in typeKind and kindFunResult
Simon Peyton Jones [Fri, 23 May 2014 06:48:40 +0000 (07:48 +0100)] 
More debug info for failures in typeKind and kindFunResult

5 years agoBetter pretty-printing for ClsInst
Simon Peyton Jones [Fri, 23 May 2014 06:48:06 +0000 (07:48 +0100)] 
Better pretty-printing for ClsInst

5 years agoMake the unifier a fixpoint even for the free kind vars of a tyvar
Simon Peyton Jones [Fri, 23 May 2014 06:47:17 +0000 (07:47 +0100)] 
Make the unifier a fixpoint even for the free kind vars of a tyvar

The (pure) unifier tcUnifyTys returns an idempotent substitution.
But previously the kinds of type variables free in the range of
the subst could have un-substituted kind variables.

This patch fixes that, fixing Trac #9106.

See Note [Finding the substitution fixpoint] in Unify

5 years agoSimple eta reduction in call to adjustMatchResults, just a tidy-up
Simon Peyton Jones [Mon, 19 May 2014 22:51:24 +0000 (23:51 +0100)] 
Simple eta reduction in call to adjustMatchResults, just a tidy-up

5 years agoTweaks to note; also fixed unicode quotes
Gabor Greif [Tue, 20 May 2014 09:04:54 +0000 (11:04 +0200)] 
Tweaks to note; also fixed unicode quotes

to regular ones.

5 years agoCoercible: Test case for now broken(?) corner case
Joachim Breitner [Tue, 20 May 2014 08:52:14 +0000 (10:52 +0200)] 
Coercible: Test case for now broken(?) corner case

involving a non-terminating newtype. This worked before 7e78faf03.
Probably not a problem, but still better to have a test case for it. See
ticket #9117.

5 years agoCoercible: Unwrap newtypes before coercing under tycons
Joachim Breitner [Tue, 20 May 2014 08:25:26 +0000 (10:25 +0200)] 
Coercible: Unwrap newtypes before coercing under tycons

This fixes parts of #9117.

5 years agoHarden imports in `DeriveConstants.hs` module
Herbert Valerio Riedel [Tue, 20 May 2014 07:40:36 +0000 (09:40 +0200)] 
Harden imports in `DeriveConstants.hs` module

This was generated by applying `-ddump-minimal-imports` and addresses
the current compile failure (see #9016) with GHC HEAD due to the new
`die` being exported by `System.Exit`

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoFix below warning by including "unistd.h" also
Gabor Greif [Mon, 19 May 2014 20:50:41 +0000 (22:50 +0200)] 
Fix below warning by including "unistd.h" also

exec_signals_prepare.c:26:5: warning: implicit declaration of function 'execv' is invalid in C99
      [-Wimplicit-function-declaration]
    execv(argv[1], argv+1);
    ^
1 warning generated.

5 years agoCatch some typos
Gabor Greif [Mon, 19 May 2014 17:42:07 +0000 (19:42 +0200)] 
Catch some typos

5 years agoProvide deprecated backward compatible implementation to 'equalP'
Gabor Greif [Fri, 16 May 2014 17:41:34 +0000 (19:41 +0200)] 
Provide deprecated backward compatible implementation to 'equalP'

5 years agoRe-add 'classP' with a compatible implementation and a deprecation notice
Gabor Greif [Wed, 14 May 2014 21:41:50 +0000 (23:41 +0200)] 
Re-add 'classP' with a compatible implementation and a deprecation notice

5 years agoRemove the bit about External Core from flags.xml
Simon Peyton Jones [Fri, 16 May 2014 07:35:25 +0000 (08:35 +0100)] 
Remove the bit about External Core from flags.xml

This is a lefover vestige from Austin's removal of External Core

5 years agoTighten up wording in the section on let-generalisation and MonoLocalBinds
Simon Peyton Jones [Fri, 16 May 2014 07:34:44 +0000 (08:34 +0100)] 
Tighten up wording in the section on let-generalisation and MonoLocalBinds

5 years agoExtract derived constants from nm output for various OSes differently.
Christian Maeder [Thu, 3 Apr 2014 08:00:07 +0000 (10:00 +0200)] 
Extract derived constants from nm output for various OSes differently.

Fixes #8783.

In order to avoid querying the nm version that does not work on Mac OS X
we use the "nm -P" output that is supposed to produce (more portable)
POSIX output and works on all tested OSes (MinGW, Mac OS X, Solaris and
Linux using GNU nm) although slightly different (as documented). The "nm
-P" output is actually only needed to recognize the output of a non-GNU
Solaris nm (all other OSes produce sane outut using "nm" only).

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agointeger-gmp: do not confuse ./configure (#8783)
Christian Maeder [Mon, 19 May 2014 02:36:40 +0000 (21:36 -0500)] 
integer-gmp: do not confuse ./configure (#8783)

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agorts: remove stable-names from hashtable upon free
Edward Z. Yang [Mon, 19 May 2014 02:32:10 +0000 (21:32 -0500)] 
rts: remove stable-names from hashtable upon free

This fixes #9078.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agobase: Document Foreign.ForeignPtr (#8475)
Chris Heller [Mon, 19 May 2014 02:31:14 +0000 (21:31 -0500)] 
base: Document Foreign.ForeignPtr (#8475)

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoghc: Update containers submodule
Austin Seipp [Sun, 18 May 2014 21:58:46 +0000 (16:58 -0500)] 
ghc: Update containers submodule

Also update a few tests, since containers now has IsList instances.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoOnly uninstall signal handlers if they were actually installed (#9068)
Simon Marlow [Wed, 14 May 2014 20:10:06 +0000 (21:10 +0100)] 
Only uninstall signal handlers if they were actually installed (#9068)

Submitted by: tomgr

5 years agoRefactoring around TyCon.isSynTyCon
Simon Peyton Jones [Thu, 15 May 2014 15:07:04 +0000 (16:07 +0100)] 
Refactoring around TyCon.isSynTyCon

* Document isSynTyCon better
* Add isTypeSyonymTyCon for regular H98 type synonyms
* Use isTypeSynonymTyCon rather than isSynTyCon where
  the former is really intended

All arose as part of a bug I introduced when fixing Trac #9102,
thinking that isSynTyCon meant H98 type syononyms.

5 years agoExpress OPTIONS_GHC as LANGUAGE pragmas
Herbert Valerio Riedel [Thu, 15 May 2014 11:52:14 +0000 (13:52 +0200)] 
Express OPTIONS_GHC as LANGUAGE pragmas

These two instances were missed previously for some unknown reason

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoAdd LANGUAGE pragmas to compiler/ source files
Herbert Valerio Riedel [Wed, 14 May 2014 17:46:28 +0000 (19:46 +0200)] 
Add LANGUAGE pragmas to compiler/ source files

In some cases, the layout of the LANGUAGE/OPTIONS_GHC lines has been
reorganized, while following the convention, to

- place `{-# LANGUAGE #-}` pragmas at the top of the source file, before
  any `{-# OPTIONS_GHC #-}`-lines.

- Moreover, if the list of language extensions fit into a single
  `{-# LANGUAGE ... -#}`-line (shorter than 80 characters), keep it on one
  line. Otherwise split into `{-# LANGUAGE ... -#}`-lines for each
  individual language extension. In both cases, try to keep the
  enumeration alphabetically ordered.
  (The latter layout is preferable as it's more diff-friendly)

While at it, this also replaces obsolete `{-# OPTIONS ... #-}` pragma
occurences by `{-# OPTIONS_GHC ... #-}` pragmas.

5 years agoAvoid trivial cases of NondecreasingIndentation
Herbert Valerio Riedel [Thu, 15 May 2014 07:51:51 +0000 (09:51 +0200)] 
Avoid trivial cases of NondecreasingIndentation

This cleanup allows the following refactoring commit to avoid adding a
few `{-# LANGUAGE NondecreasingIndentation #-}` pragmas.

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoConvert `ghc-bin.cabal` to use others-extensions
Herbert Valerio Riedel [Wed, 14 May 2014 10:41:21 +0000 (12:41 +0200)] 
Convert `ghc-bin.cabal` to use others-extensions

This replaces the previous `default-extensions` by per-file declared
`{-# LANGUAGE ... #-}` pragmas.

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoDrop default-extensions:CPP in hpc-bin.cabal
Herbert Valerio Riedel [Wed, 14 May 2014 10:37:25 +0000 (12:37 +0200)] 
Drop default-extensions:CPP in hpc-bin.cabal

The utils/hpc/*.hs code doesn't use any CPP statements anyway, so this
extensions was redundantly enabled to begin with.

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoDrop use of CPP in `bin-package-db`
Herbert Valerio Riedel [Wed, 14 May 2014 10:33:31 +0000 (12:33 +0200)] 
Drop use of CPP in `bin-package-db`

This also removes the redundant `default-extensions` field in
`bin-package-db.cabal` and adds an `other-extensions` field instead.

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoAvoid NondecreasingIndentation syntax in ghc-pkg
Herbert Valerio Riedel [Wed, 14 May 2014 10:16:13 +0000 (12:16 +0200)] 
Avoid NondecreasingIndentation syntax in ghc-pkg

This also makes ghc-pkg.cabal `default-extensions`-free

NB: Printing this commit via `git show --ignore-all-spaces` shows the
    only non-whitespaces changes are in `ghc-pkg.cabal`

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoAdd missing stack checks to stg_ap_* functions (#9001)
Simon Marlow [Wed, 14 May 2014 11:25:08 +0000 (12:25 +0100)] 
Add missing stack checks to stg_ap_* functions (#9001)

5 years agoRemove LANGUAGE pragrams implied by Haskell2010
Herbert Valerio Riedel [Wed, 14 May 2014 07:31:57 +0000 (09:31 +0200)] 
Remove LANGUAGE pragrams implied by Haskell2010

Haskell2010 implies (at least) EmptyDataDecls, ForeignFunctionInterface,
PatternGuards, DoAndIfThenElse, and RelaxedPolyRec.

This is a follow-up to dd92e2179e3171a0630834b773c08d416101980d

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoSet cabal files to default-language:Haskell2010
Herbert Valerio Riedel [Wed, 14 May 2014 07:24:10 +0000 (09:24 +0200)] 
Set cabal files to default-language:Haskell2010

This is a first step towards eliminating `default-extensions` in favour of
per-file declared `{-# LANGUAGE ... #-}` pragmas.

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoAdd strict ver. of (<$>): (<$!>) to Control.Monad
Alexander Berntsen [Tue, 13 May 2014 08:50:30 +0000 (10:50 +0200)] 
Add strict ver. of (<$>): (<$!>) to Control.Monad

A strict (<$>) has been proposed numerous times. The first time
around[1] by Johan Tibell, and the last time around[2] by David
Luposchainsky. David's thread was able to avoid The Bikeshed Monster,
and his (<$!>) proposal received unanimous +1s all around.

This addresses #9099.

 [1]: http://www.haskell.org/pipermail/libraries/2013-November/021728.html
 [2]: http://www.haskell.org/pipermail/libraries/2014-April/022864.html

Authored-by: Alexander Berntsen <alexander@plaimi.net>
Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoUpdate Haddock submodule.
Mateusz Kowalczyk [Wed, 14 May 2014 00:32:42 +0000 (02:32 +0200)] 
Update Haddock submodule.

This splits up Haddock up a bit to allow use of its parser (and in the
future perhaps more) without GHC dependency. It should build fine with
the regular work-flow but if you get problems with building Haddock then
please revert this and let me know.

5 years agoWibble to 4cfc1fae
Simon Peyton Jones [Tue, 13 May 2014 23:15:48 +0000 (00:15 +0100)] 
Wibble to 4cfc1fae

isSynTyCon is true of type *family* TyCons, which *are* allowed
in TyConAppCo

5 years agoFix globalRegMaybe for unregisterised build.
Peter Trommler [Wed, 30 Apr 2014 09:41:51 +0000 (11:41 +0200)] 
Fix globalRegMaybe for unregisterised build.

In commit 83a003f globalRegMaybe will be called but panics
for unregisterised compilers.

In an unregisterised compiler there are no global registers
so always return `Nothing`.

Fixes #9055.

5 years agoFix invariant in mkAppCoFlexible
Simon Peyton Jones [Tue, 13 May 2014 12:17:19 +0000 (13:17 +0100)] 
Fix invariant in mkAppCoFlexible

mkAppCoFlexible was breaking the invariant that the head of a TyConAppCo cannot
be a type synonym.  This small patch fixes it.

5 years agoLint should check that TyConAppCo doesn't have a synonym in the tycon position
Simon Peyton Jones [Tue, 13 May 2014 12:15:45 +0000 (13:15 +0100)] 
Lint should check that TyConAppCo doesn't have a synonym in the tycon position

That is why Lint didn't nail Trac #9102

5 years agoTypo in note
Gabor Greif [Mon, 12 May 2014 22:49:30 +0000 (00:49 +0200)] 
Typo in note

5 years agoTypo in comment
Gabor Greif [Mon, 12 May 2014 22:38:19 +0000 (00:38 +0200)] 
Typo in comment

5 years agoImprove desugaring of lazy pattern match
Simon Peyton Jones [Mon, 12 May 2014 15:03:48 +0000 (16:03 +0100)] 
Improve desugaring of lazy pattern match

This patch implements a simpler, and nicer, desugaring for
lazy pattern matching, fixing Trac #9098

5 years agoIn splitHsFunType, take account of prefix (->)
Simon Peyton Jones [Mon, 12 May 2014 15:02:36 +0000 (16:02 +0100)] 
In splitHsFunType, take account of prefix (->)

This fixes Trac #9096

5 years agoComments only, on inert_fsks and inert_no_eqs
Simon Peyton Jones [Fri, 9 May 2014 09:40:50 +0000 (10:40 +0100)] 
Comments only, on inert_fsks and inert_no_eqs

I wrote these when studying Trac #9090

5 years agoRevert output of T5979
Joachim Breitner [Sat, 10 May 2014 16:28:44 +0000 (18:28 +0200)] 
Revert output of T5979

this reverts 12332f1. The error message changes when there are two
versions of transformers in the database, one of them hidden. That might
be a bug of its own, but for now lets make the test case succeed after a
fresh build. Affected developers should probably
$ ./inplace/bin/ghc-pkg unregister transformers-0.3.0.0

5 years agoRequire transformers for T5979
Joachim Breitner [Sat, 10 May 2014 09:38:49 +0000 (11:38 +0200)] 
Require transformers for T5979

in order to get a reliable error message
(although the error message could be improved anyways to mention the
explicit package the module is imported with.)

5 years agotestsuite: fix cc004
Austin Seipp [Sat, 10 May 2014 02:50:52 +0000 (21:50 -0500)] 
testsuite: fix cc004

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agotestsuite: fix cgrun051 exit code
Austin Seipp [Sat, 10 May 2014 01:58:06 +0000 (20:58 -0500)] 
testsuite: fix cgrun051 exit code

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoUpdate .gitignore
Austin Seipp [Sat, 3 May 2014 22:35:04 +0000 (17:35 -0500)] 
Update .gitignore

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoError message wibble, presumably due to recent changes in transformers
Simon Peyton Jones [Thu, 8 May 2014 12:06:05 +0000 (13:06 +0100)] 
Error message wibble, presumably due to recent changes in transformers

5 years agoBetter error message in vectoriser
Simon Peyton Jones [Thu, 8 May 2014 09:39:21 +0000 (10:39 +0100)] 
Better error message in vectoriser

5 years agoPreserve evaluated-ness in CoreTidy
Simon Peyton Jones [Thu, 8 May 2014 09:38:52 +0000 (10:38 +0100)] 
Preserve evaluated-ness in CoreTidy

The main effect of this patch is to preserve the evaluated-ness of
case binders and suchlike, to avoid spurious Lint complaints after
tidying.  See Note [Preserve evaluatedness] in CoreTidy.

Plus a bit of associated refactoring of tidyIdBndr, tidyLetBndr.

5 years agoMark evaluated arguments in dataConInstPat
Simon Peyton Jones [Thu, 8 May 2014 09:33:17 +0000 (10:33 +0100)] 
Mark evaluated arguments in dataConInstPat

See Note [Mark evaluated arguments] in CoreUtils.

This is not a significant change, but avoids a spurious Lint complaint.

5 years agoRefactor buildClass and mkDictSelId a bit, to avoid the no_unf argument
Simon Peyton Jones [Thu, 8 May 2014 09:31:53 +0000 (10:31 +0100)] 
Refactor buildClass and mkDictSelId a bit, to avoid the no_unf argument

No change in functionality, just a cleaner story, with the RHS for
dictionary selectors being treated less specially than before.

5 years agoImprove tracing in Simplifier
Simon Peyton Jones [Mon, 7 Apr 2014 14:41:45 +0000 (15:41 +0100)] 
Improve tracing in Simplifier

5 years agoUpdate transformers submodule to new v0.4 rel
Herbert Valerio Riedel [Tue, 6 May 2014 20:46:27 +0000 (22:46 +0200)] 
Update transformers submodule to new v0.4 rel

This also updates the haskeline to upstream master to
accomodate the new transformers version

5 years agoAdding missing test files for #9071
Simon Peyton Jones [Tue, 6 May 2014 08:46:14 +0000 (09:46 +0100)] 
Adding missing test files for #9071

5 years agoAdd a bit more typechecker tracing
Simon Peyton Jones [Tue, 6 May 2014 07:23:26 +0000 (08:23 +0100)] 
Add a bit more typechecker tracing

This is in pursuit of Trac #9063

5 years agoFix Trac #9071, an egregious bug in TcDeriv.inferConstraints
Simon Peyton Jones [Tue, 6 May 2014 07:22:37 +0000 (08:22 +0100)] 
Fix Trac #9071, an egregious bug in TcDeriv.inferConstraints

The constraints for Functor don't line up 1-1 with the arguments
(they are fetched out from sub-terms of the type), but the surrounding
code was mistakenly assuming they were in 1-1 association.

5 years agoSecond go at fixing #9061
Simon Peyton Jones [Tue, 6 May 2014 07:20:28 +0000 (08:20 +0100)] 
Second go at fixing #9061

My first attempt introduce a bug in -fprint-minimal-imports, but
fortunately a regression test caught it.

5 years agoModularise pretty-printing for foralls
Simon Peyton Jones [Tue, 6 May 2014 07:19:01 +0000 (08:19 +0100)] 
Modularise pretty-printing for foralls

See TypeRep.pprUserForAll.  This just makes forall-printing a bit more
consistent.  In particular, I wasn't seeing the kind foralls when
displaying a CoAxiom or CoAxBranch

The output on T7939 is just possible a bit too verbose now, but even if so
that's an error in the right direction.

5 years agoImprove comments and tracing in SpecConstr
Simon Peyton Jones [Mon, 5 May 2014 07:50:51 +0000 (08:50 +0100)] 
Improve comments and tracing in SpecConstr

5 years agoChanged profiling output is fine (according to Simon Marlow)
Simon Peyton Jones [Fri, 2 May 2014 11:10:42 +0000 (12:10 +0100)] 
Changed profiling output is fine (according to Simon Marlow)

5 years agoAdd -fno-full-laziness to get consistent profiling output
Simon Peyton Jones [Fri, 2 May 2014 11:10:26 +0000 (12:10 +0100)] 
Add -fno-full-laziness to get consistent profiling output

5 years agoFix over-zealous unused-import warning
Simon Peyton Jones [Fri, 2 May 2014 11:09:52 +0000 (12:09 +0100)] 
Fix over-zealous unused-import warning

See Note [Un-warnable import decls] in RnNames.

Fixes Trac #9061.

5 years agoRevert "Per-thread allocation counters and limits"
Simon Marlow [Sun, 4 May 2014 19:27:42 +0000 (20:27 +0100)] 
Revert "Per-thread allocation counters and limits"

Problems were found on 32-bit platforms, I'll commit again when I have a fix.

This reverts the following commits:
   54b31f744848da872c7c6366dea840748e01b5cf
   b0534f78a73f972e279eed4447a5687bd6a8308e

5 years agoImprove docs for array indexing primops
Johan Tibell [Sun, 4 May 2014 09:32:15 +0000 (11:32 +0200)] 
Improve docs for array indexing primops

5 years agoUpdate comment now that we have per-gen weak pointer lists.
Edward Z. Yang [Sun, 4 May 2014 08:18:54 +0000 (01:18 -0700)] 
Update comment now that we have per-gen weak pointer lists.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
5 years agofix rts exported symbols base_GHCziIOziException_allocationLimitExceeded_closure
Sergei Trofimovich [Sat, 3 May 2014 19:29:14 +0000 (22:29 +0300)] 
fix rts exported symbols base_GHCziIOziException_allocationLimitExceeded_closure

Commit  b0534f78a73f972e279eed4447a5687bd6a8308e added new exported rts symbols,
but slightly misspelled them.

Observer on first compiled program:
> Linking dist/build/haskell-updater/haskell-updater ...
> /usr/lib64/ghc-7.9.20140503/rts-1.0/libHSrts.a(Schedule.o): In function `scheduleWaitThread':
> (.text+0xc4c): undefined reference to `base_GHCziIOziException_allocationLimitExceeded_closure'
> /usr/lib64/ghc-7.9.20140503/rts-1.0/libHSrts.a(RtsStartup.o): In function `hs_init_ghc':
> (.text+0x2fa): undefined reference to `base_GHCziIOziException_allocationLimitExceeded_closure'
> collect2: error: ld returned 1 exit status

CC: Simon Marlow <marlowsd@gmail.com>
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
5 years agoRemove external core
Austin Seipp [Mon, 28 Apr 2014 02:11:23 +0000 (21:11 -0500)] 
Remove external core

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoUpdate Haddock submodule ref. Fixes `cabal test'.
Mateusz Kowalczyk [Sat, 3 May 2014 13:43:00 +0000 (15:43 +0200)] 
Update Haddock submodule ref. Fixes `cabal test'.

5 years agoPer-thread allocation counters and limits
Simon Marlow [Mon, 28 Apr 2014 15:55:47 +0000 (16:55 +0100)] 
Per-thread allocation counters and limits

This tracks the amount of memory allocation by each thread in a
counter stored in the TSO.  Optionally, when the counter drops below
zero (it counts down), the thread can be sent an asynchronous
exception: AllocationLimitExceeded.  When this happens, given a small
additional limit so that it can handle the exception.  See
documentation in GHC.Conc for more details.

Allocation limits are similar to timeouts, but

  - timeouts use real time, not CPU time.  Allocation limits do not
    count anything while the thread is blocked or in foreign code.

  - timeouts don't re-trigger if the thread catches the exception,
    allocation limits do.

  - timeouts can catch non-allocating loops, if you use
    -fno-omit-yields.  This doesn't work for allocation limits.

I couldn't measure any impact on benchmarks with these changes, even
for nofib/smp.

5 years agoReplace all #!/usr/bin/perl with #!/usr/bin/env perl
Joachim Breitner [Wed, 30 Apr 2014 09:22:32 +0000 (11:22 +0200)] 
Replace all #!/usr/bin/perl with #!/usr/bin/env perl

As suggested in #9057.

5 years agoDon't inline non-register GlobalRegs
Simon Marlow [Tue, 29 Apr 2014 19:32:50 +0000 (20:32 +0100)] 
Don't inline non-register GlobalRegs

5 years agoRts: Reuse scavenge_small_bitmap (#8742)
Arash Rouhani [Thu, 6 Feb 2014 08:10:03 +0000 (09:10 +0100)] 
Rts: Reuse scavenge_small_bitmap (#8742)

The function was inlined at two places already. And the function is
having the STATIC_INLINE annotation, so the assembly output should.
be the same.

To convince myself, I did diff the output of the object files before
and after the patch and they matched on my 64-bit Ubuntu 13.10 machine,
running gcc 4.8.1-10ubuntu9.

Also, I had to move scavenge_small_bitmap up a bit since it's not in any
.h-file.

While I was at it, I also applied the analogous patch for Compact.c.
Though I had to write `thread_small_bitmap` instead of just moving it.

5 years agoRts: Consistently use StgWord for sizes of bitmaps
Arash Rouhani [Thu, 13 Feb 2014 14:28:11 +0000 (15:28 +0100)] 
Rts: Consistently use StgWord for sizes of bitmaps

A long debate is in issue #8742, but the main motivation is that this
allows for applying a patch to reuse the function scavenge_small_bitmap
without changing the .o-file output.

Similarly, I changed the types in rts/sm/Compact.c, so I can create
a STATIC_INLINE function for the redundant code block:

        while (size > 0) {
            if ((bitmap & 1) == 0) {
                thread((StgClosure **)p);
            }
            p++;
            bitmap = bitmap >> 1;
            size--;
        }

5 years agorts: Fix memory leak when loading ELF objects
Austin Seipp [Tue, 29 Apr 2014 14:09:25 +0000 (09:09 -0500)] 
rts: Fix memory leak when loading ELF objects

Issue discovered by Coverity Scan, CID 43168.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agorts: Fix leak of file archive handle
Austin Seipp [Tue, 29 Apr 2014 14:05:38 +0000 (09:05 -0500)] 
rts: Fix leak of file archive handle

Issue discovered by Coverity Scan, CID 43171.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agorts: Add an initial Coverity model
Austin Seipp [Tue, 29 Apr 2014 15:07:50 +0000 (10:07 -0500)] 
rts: Add an initial Coverity model

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoAdd Note [Role twiddling functions] to Coercion.
Richard Eisenberg [Tue, 29 Apr 2014 15:55:56 +0000 (11:55 -0400)] 
Add Note [Role twiddling functions] to Coercion.

This commit also makes better names for several of these functions,
and removes one that went unused.

5 years agoRevert "rts: Add an initial Coverity model"
Austin Seipp [Tue, 29 Apr 2014 14:59:01 +0000 (09:59 -0500)] 
Revert "rts: Add an initial Coverity model"

This reverts commit 4539400a72ded7fa69149b28cfa9c84464f4739d.

5 years agorts: Add an initial Coverity model
Austin Seipp [Tue, 29 Apr 2014 13:48:57 +0000 (08:48 -0500)] 
rts: Add an initial Coverity model

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoTypo in comment
Gabor Greif [Tue, 29 Apr 2014 13:38:29 +0000 (15:38 +0200)] 
Typo in comment