summaryrefslogtreecommitdiff
path: root/libraries
Commit message (Collapse)AuthorAgeFilesLines
* fix #10734 by adding braces to pretty-printing of let inside doarcpatch-D1448John Leo2015-11-071-1/+1
| | | | | | | | | | | | | | Test Plan: validate Reviewers: bgamari, austin, goldfire Reviewed By: goldfire Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1448 GHC Trac Issues: #10734
* Cabal-level sanity check to enforce Cabal flag-invariantHerbert Valerio Riedel2015-11-031-0/+5
| | | | | | | | | | This helps catch cabal-flag misconfiguration early on during `cabal configure`, rather than much later in the build-process during compilation. Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D1423
* Build system: renable -Wall on validate (base)Thomas Miedema2015-11-033-3/+2
| | | | | | | | | | | | | | | | Problem: 'SRC_HC_OPTS += -Wall' in 'mk/warnings.mk' was getting overwritten by 'SRC_HC_OPTS = ...' in 'mk/flavours/*.mk'. It didn't affect the compiler or most other libraries, because most .cabal files define 'ghc-options: -Wall'. Bug introduced in commit 2c24fd707f8650205bb574ffac5f376239af3723, when moving validate settings from 'mk/validate-settings.mk' to 'mk/flavours/validate.mk'. Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D1425
* Add `MonadPlus IO` and `Alternative IO` instancesHerbert Valerio Riedel2015-11-035-4/+19
| | | | | | | | | | | | This requires adding a new primitive `mplusIO` to `GHC.IO` Update transformers submodule to accomodate extant orphan instances. Reviewed By: austin, bgamari Differential Revision: https://phabricator.haskell.org/D1148 GHC Trac Issues: #10755
* base: Add new Control.Monad.Fail module (re #10751)Herbert Valerio Riedel2015-11-034-0/+86
| | | | | | | | | | | | | | | | | This is based on David's initial patch augmented by more extensive Haddock comments. This has been broken out of D1248 to reduce its size by splitting the patch into smaller logical pieces. On its own, this new module does nothing interesting yet. Later patches will add support for a different desugaring of `do`-blocks, at which point the new `MonadFail` class will become more useful. Reviewed By: ekmett, austin Differential Revision: https://phabricator.haskell.org/D1424
* base: Add changelog entry for 4.8.2.0Ben Gamari2015-11-021-0/+10
|
* base: GHC.RTS.Flags symbols really were introduced in 4.8.2Ben Gamari2015-11-021-6/+6
|
* base: Update `@since 4.8.2` annotations (re #11026)Herbert Valerio Riedel2015-11-027-18/+18
| | | | This missed to perform in f8ba4b55cc3a061458f5cfabf17de96128defbbb
* Update filepath submodule for proper versionHerbert Valerio Riedel2015-11-021-0/+0
| | | | | This pulls in a minor version bump to v1.4.1, this way GHC HEAD nightly builds report a proper version number.
* Update process submodule to process-1.4 releaseHerbert Valerio Riedel2015-11-022-0/+0
| | | | | We already used a process-1.4 snapshot with non-bumped version, so this commit is mostly a `.cabal` file upper-bound relaxation change.
* Update Cabal submoduleHerbert Valerio Riedel2015-11-011-0/+0
| | | | | This allows us to remove 4 newly added language pragmas from the T4437 test-case as they were recently added to Cabal 1.23
* Bump ghc-prim version to 0.5.0.0 (closes #11043)Herbert Valerio Riedel2015-11-014-3/+3
| | | | | | | | | | | This also needs to update the primitive/vector submodules in order to relax upper bounds on ghc-prim. Like in f8ba4b55cc3a061458f5cfabf17de96128defbbb, a mass-rewrite in testsuite/ via sed -i s,ghc-prim-0.4.0.0,ghc-prim-0.5.0.0,g $(git grep -Fl 'ghc-prim-0.4.0.0') was performed.
* ghc-prim: add API delta as changelog (re #11043)Herbert Valerio Riedel2015-11-012-0/+39
| | | | [skip ci]
* Bump `base` version to 4.9.0.0 (closes #11026)Herbert Valerio Riedel2015-11-013-5/+5
| | | | | | | | | | | This also relaxes a few upper bounds on base in the ghc.git repo; This required a mass-rewrite in testsuite/ sed -i s,base-4.8.2.0,base-4.9.0.0,g $(git grep -Fl 'base-4.8.2.0') because it turns out the testsuite is still sensitive to package version changes.
* Update hoopl submoduleHerbert Valerio Riedel2015-11-011-0/+0
| | | | | This is needed to prepare for #11026 as this update relaxes the upper bounds on `base` to allow for `base-4.9.0.0`
* Update unix submoduleHerbert Valerio Riedel2015-11-011-0/+0
| | | | | This is needed to prepare for #11026 as this update relaxes the upper bounds on `base` to allow for `base-4.9.0.0`
* Update process submoduleHerbert Valerio Riedel2015-11-011-0/+0
| | | | | | | | | | This is needed to prepare for #11026 as this update relaxes the upper bounds on `base` to allow for `base-4.9.0.0` This also needs to relax a few upper bounds on process in some cabal files (there will be another process submodule update soon, as a major version bump of process' version is still pending)
* Update filepath submoduleHerbert Valerio Riedel2015-11-011-0/+0
| | | | | This is needed to prepare for #11026 as this update relaxes the upper bounds on `base` to allow for `base-4.9.0.0`
* Update directory submoduleHerbert Valerio Riedel2015-11-011-0/+0
| | | | | This is needed to prepare for #11026 as this update relaxes the upper bounds on `base` to allow for `base-4.9.0.0`
* Update array/stm/hpc/haddock submodulesHerbert Valerio Riedel2015-11-013-0/+0
| | | | | This is needed to prepare for #11026 as these updates relax the upper bounds on `base` to allow for `base-4.9.0.0`
* ghc-prim: Fix hs_ctz64 for powerpcErik de Castro Lopo2015-11-011-1/+1
| | | | | | | | | | | | Test Plan: Test on powerpc/linux Reviewers: austin, hvr, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1413
* Remove Data.List.NonEmpty.{words,unwords,lines,unlines}Herbert Valerio Riedel2015-10-311-34/+3
| | | | | | | | | This change mirrors the change that occured for the recent `semigroups-0.18` release, i.e. https://github.com/ekmett/semigroups/commit/7a000212847b0d309892f34e4754a25ddec7100b This removal addresses concerns raised in #10365
* Add subWordC# on x86ishNikita Karetnikov2015-10-312-14/+0
| | | | | | | | | | | | | | | This adds a subWordC# primop which implements subtraction with overflow reporting. Reviewers: tibbe, goldfire, rwbarton, bgamari, austin, hvr Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1334 GHC Trac Issues: #10962
* Update parallel submoduleHerbert Valerio Riedel2015-10-311-0/+0
| | | | | This is needed to prepare for #11026 as this update relaxes the upper bounds on `base` to allow for `base-4.9.0.0`
* Update primitive/vector submodulesHerbert Valerio Riedel2015-10-312-0/+0
| | | | | This is needed to prepare for #11026 as these updates relax the upper bounds on `base` to allow for `base-4.9.0.0`
* Generate Typeable info at definition sitesBen Gamari2015-10-309-117/+345
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the second attempt at merging D757. This patch implements the idea floated in Trac #9858, namely that we should generate type-representation information at the data type declaration site, rather than when solving a Typeable constraint. However, this turned out quite a bit harder than I expected. I still think it's the right thing to do, and it's done now, but it was quite a struggle. See particularly * Note [Grand plan for Typeable] in TcTypeable (which is a new module) * Note [The overall promotion story] in DataCon (clarifies existing stuff) The most painful bit was that to generate Typeable instances (ie TyConRepName bindings) for every TyCon is tricky for types in ghc-prim etc: * We need to have enough data types around to *define* a TyCon * Many of these types are wired-in Also, to minimise the code generated for each data type, I wanted to generate pure data, not CAFs with unpackCString# stuff floating about. Performance ~~~~~~~~~~~ Three perf/compiler tests start to allocate quite a bit more. This isn't surprising, because they all allocate zillions of data types, with practically no other code, esp. T1969 * T1969: GHC allocates 19% more * T4801: GHC allocates 13% more * T5321FD: GHC allocates 13% more * T9675: GHC allocates 11% more * T783: GHC allocates 11% more * T5642: GHC allocates 10% more I'm treating this as acceptable. The payoff comes in Typeable-heavy code. Remaining to do ~~~~~~~~~~~~~~~ * I think that "TyCon" and "Module" are over-generic names to use for the runtime type representations used in GHC.Typeable. Better might be "TrTyCon" and "TrModule". But I have not yet done this * Add more info the the "TyCon" e.g. source location where it was defined * Use the new "Module" type to help with Trac Trac #10068 * It would be possible to generate TyConRepName (ie Typeable instances) selectively rather than all the time. We'd need to persist the information in interface files. Lacking a motivating reason I have not done this, but it would not be difficult. Refactoring ~~~~~~~~~~~ As is so often the case, I ended up refactoring more than I intended. In particular * In TyCon, a type *family* (whether type or data) is repesented by a FamilyTyCon * a algebraic data type (including data/newtype instances) is represented by AlgTyCon This wasn't true before; a data family was represented as an AlgTyCon. There are some corresponding changes in IfaceSyn. * Also get rid of the (unhelpfully named) tyConParent. * In TyCon define 'Promoted', isomorphic to Maybe, used when things are optionally promoted; and use it elsewhere in GHC. * Cleanup handling of knownKeyNames * Each TyCon, including promoted TyCons, contains its TyConRepName, if it has one. This is, in effect, the name of its Typeable instance. Updates haddock submodule Test Plan: Let Harbormaster validate Reviewers: austin, hvr, goldfire Subscribers: goldfire, thomie Differential Revision: https://phabricator.haskell.org/D1404 GHC Trac Issues: #9858
* Revert "Generate Typeable info at definition sites"Ben Gamari2015-10-298-342/+117
| | | | | | | | This reverts commit bef2f03e4d56d88a7e9752a7afd6a0a35616da6c. This merge was botched Also reverts haddock submodule.
* Generate Typeable info at definition sitesBen Gamari2015-10-298-117/+342
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements the idea floated in Trac #9858, namely that we should generate type-representation information at the data type declaration site, rather than when solving a Typeable constraint. However, this turned out quite a bit harder than I expected. I still think it's the right thing to do, and it's done now, but it was quite a struggle. See particularly * Note [Grand plan for Typeable] in TcTypeable (which is a new module) * Note [The overall promotion story] in DataCon (clarifies existing stuff) The most painful bit was that to generate Typeable instances (ie TyConRepName bindings) for every TyCon is tricky for types in ghc-prim etc: * We need to have enough data types around to *define* a TyCon * Many of these types are wired-in Also, to minimise the code generated for each data type, I wanted to generate pure data, not CAFs with unpackCString# stuff floating about. Performance ~~~~~~~~~~~ Three perf/compiler tests start to allocate quite a bit more. This isn't surprising, because they all allocate zillions of data types, with practically no other code, esp. T1969 * T3294: GHC allocates 110% more (filed #11030 to track this) * T1969: GHC allocates 30% more * T4801: GHC allocates 14% more * T5321FD: GHC allocates 13% more * T783: GHC allocates 12% more * T9675: GHC allocates 12% more * T5642: GHC allocates 10% more * T9961: GHC allocates 6% more * T9203: Program allocates 54% less I'm treating this as acceptable. The payoff comes in Typeable-heavy code. Remaining to do ~~~~~~~~~~~~~~~ * I think that "TyCon" and "Module" are over-generic names to use for the runtime type representations used in GHC.Typeable. Better might be "TrTyCon" and "TrModule". But I have not yet done this * Add more info the the "TyCon" e.g. source location where it was defined * Use the new "Module" type to help with Trac Trac #10068 * It would be possible to generate TyConRepName (ie Typeable instances) selectively rather than all the time. We'd need to persist the information in interface files. Lacking a motivating reason I have not done this, but it would not be difficult. Refactoring ~~~~~~~~~~~ As is so often the case, I ended up refactoring more than I intended. In particular * In TyCon, a type *family* (whether type or data) is repesented by a FamilyTyCon * a algebraic data type (including data/newtype instances) is represented by AlgTyCon This wasn't true before; a data family was represented as an AlgTyCon. There are some corresponding changes in IfaceSyn. * Also get rid of the (unhelpfully named) tyConParent. * In TyCon define 'Promoted', isomorphic to Maybe, used when things are optionally promoted; and use it elsewhere in GHC. * Cleanup handling of knownKeyNames * Each TyCon, including promoted TyCons, contains its TyConRepName, if it has one. This is, in effect, the name of its Typeable instance. Requires update of the haddock submodule. Differential Revision: https://phabricator.haskell.org/D757
* Update `deepseq` submoduleHerbert Valerio Riedel2015-10-281-0/+0
| | | | This is done now to prepare for #11026
* Update haskeline/terminfo submodulesHerbert Valerio Riedel2015-10-282-0/+0
| | | | | | | This is needed to prepare for #11026 as these updates relax the upper bounds on `base` to allow for `base-4.9.0.0` This update contains no code-changes to terminfo/haskeline yet
* Remove cygwin32_HOST_OS #ifdefsErik de Castro Lopo2015-10-261-11/+11
| | | | | | | | | | | | | | | | | Build system support for Cygwin was removed in b6be81b841. Test Plan: - Validate on x86_64/linux - Cross-compile rts/RtsSymbols.c and rts/Linker.c to Windows using the i686-w64-mingw32-gcc and x86_64-w64-mingw32-gcc cross compilers. Reviewers: hvr, austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1371
* base: Add Haddocks to GHC.RTS.FlagsBen Gamari2015-10-261-3/+46
|
* typo in comments: s/selectg/select/Sergei Trofimovich2015-10-241-1/+1
| | | | Signed-off-by: Sergei Trofimovich <siarheit@google.com>
* base: Note platform dependence of registerFdBen Gamari2015-10-231-0/+5
| | | | Just a documentation change. Fixes #10736.
* base: Have the argument of mask restore the state.Facundo Domínguez2015-10-195-3/+31
| | | | | | | | | | | | | | | | | | | | | The implementation of `mask` and `uninterruptibleMask` assumed so far that the restore argument would be called in a context with the same masking state as that set by `mask` or `uninterruptibleMask`. This patch has the restore argument restore the masking, whatever the current masking state is. Test Plan: validate Reviewers: simonmar, hvr, austin, bgamari Reviewed By: bgamari Subscribers: thomie, qnikst Differential Revision: https://phabricator.haskell.org/D1327 GHC Trac Issues: #10149
* template-haskell: set explicit return=pureHerbert Valerio Riedel2015-10-182-0/+2
| | | | This fixups a thinko in c6781a5064049e0a7c17c1f2239567a3c44955af
* template-haskell: MRP-refactor Applicative/Monad instancesHerbert Valerio Riedel2015-10-182-4/+3
| | | | | As `template-haskell` is compiled by stage1+ GHC only, we can drop the explicit `return` definition rightaway.
* Move Control.Monad.IO.Class to base from transformersRyanGlScott2015-10-174-0/+40
| | | | | | | | | | | | | | | | | | | | | See Trac #10773 Remove Control.Monad.IO.Class from `transformers`. Updates `transformers` submodule. See Trac #10773 Test Plan: ./validate Reviewers: ekmett, hvr, bgamari, austin Reviewed By: hvr, bgamari, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1147 GHC Trac Issues: #10773
* base: MINIMAL pragmas for Arrow/ArrowChoiceAustin Seipp2015-10-161-0/+2
| | | | | | | | | | Summary: This was left off in the previous commits. Signed-off-by: Austin Seipp <austin@well-typed.com> Reviewed By: ekmett Differential Revision: https://phabricator.haskell.org/D1332
* base: changelog entries for Arrow/ArrowChoiceAustin Seipp2015-10-161-0/+3
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* Allow left ∨ (+++) as minimal definition of ArrowChoice instanceM Farkas-Dyck2015-10-161-6/+7
| | | | | | | | See #10911. Reviewers: ekmett Signed-off-by: Austin Seipp <austin@well-typed.com>
* Add typed holes support in Template Haskell.Jan Stolarek2015-10-163-0/+8
| | | | | Fixes #10267. Typed holes in typed Template Haskell currently don't work. See #10945 and #10946.
* Rename package key to unit ID, and installed package ID to component ID.Edward Z. Yang2015-10-145-16/+16
| | | | | | Comes with Haddock submodule update. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Update Cabal to HEAD, IPID renamed to Component ID.Edward Z. Yang2015-10-142-9/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit contains a Cabal submodule update which unifies installed package IDs and package keys under a single notion, a Component ID. We update GHC to keep follow this unification. However, this commit does NOT rename installed package ID to component ID and package key to unit ID; the plan is to do that in a companion commit. - Compiler info now has "Requires unified installed package IDs" - 'exposed' is now expected to contain unit keys, not IPIDs. - Shadowing is no more. We now just have a very simple strategy to deal with duplicate unit keys in combined package databases: if their ABIs are the same, use the latest one; otherwise error. Package databases maintain the invariant that there can only be one entry of a unit ID. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, austin, bgamari, hvr, goldfire Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1184 GHC Trac Issues: #10714
* Allow arr ∧ (first ∨ (***)) as minimal definition of Arrow instanceM Farkas-Dyck2015-10-131-7/+4
| | | | | | See #10216. Signed-off-by: Austin Seipp <austin@well-typed.com>
* base: Add forkOSWithUnmaskJoey Adams2015-10-132-2/+13
| | | | | | | | | | Fixes #8010, according to the specified libraries proposal. [1] Also, some minor wordsmithing. [1] http://thread.gmane.org/gmane.comp.lang.haskell.libraries/22709 Signed-off-by: Austin Seipp <austin@well-typed.com>
* Make dataToQa aware of Data instances which use functions to implement toConstrRyanGlScott2015-10-138-23/+109
| | | | | | | | | | | | | | | | | | | | Trac #10796 exposes a way to make `template-haskell`'s `dataToQa` function freak out if using a `Data` instance that produces a `Constr` (by means of `toConstr`) using a function name instead of a data constructor name. While such `Data` instances are somewhat questionable, they are nevertheless present in popular libraries (e.g., `containers`), so we can at least make `dataToQa` aware of their existence. In order to properly distinguish strings which represent variables (as opposed to data constructors), it was necessary to move functionality from `Lexeme` (in `ghc`) to `GHC.Lexeme` in a new `ghc-boot` library (which was previously named `bin-package-db`). Reviewed By: goldfire, thomie Differential Revision: https://phabricator.haskell.org/D1313 GHC Trac Issues: #10796
* base: MRP-refactoring of AMP instancesHerbert Valerio Riedel2015-10-1218-65/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This refactors `(>>)`/`(*>)`/`return`/`pure` methods into normal form. The redundant explicit `return` method definitions are dropped altogether. The explicit `(>>) = (*>)` definitions can't be removed yet, as the default implementation of `(>>)` is still in terms of `(*>)` (even though that should have been changed according to the AMP but wasn't -- see note in GHC.Base for details why this had to be postponed) A nofib comparision shows this refactoring to result in minor runtime improvements (unless those are within normal measurement fluctuations): Program Size Allocs Runtime Elapsed TotalMem ------------------------------------------------------------------------- Min -0.0% -0.0% -1.6% -3.9% -1.1% Max -0.0% +0.0% +0.5% +0.5% 0.0% Geometric Mean -0.0% -0.0% -0.4% -0.5% -0.0% Full `nofib` report at https://phabricator.haskell.org/P68 Reviewers: quchen, alanz, austin, #core_libraries_committee, bgamari Reviewed By: bgamari Differential Revision: https://phabricator.haskell.org/D1316
* Keep `shift{L,R}` on `Integer` from segfaultingBen Gamari2015-10-102-8/+3
| | | | | | | | | | | | | | | | | | | | | | | This can happen because the underlying primitive operations in `integer-gmp` don't support negative shift-amounts, and since `integer-gmp` can't throw proper exceptions and just provides a low-level API, it simply segfaults instead... This patch simply removes the `shift{L,R}` method definitions (and defines `unsafeShift{L,R}` instead) whose default-impls fallback on using `shift` which properly handles negative shift arguments. This addresses #10571 Test Plan: harbormaster can do it Reviewers: hvr, austin, rwbarton Subscribers: rwbarton, thomie, bgamari Differential Revision: https://phabricator.haskell.org/D1018 GHC Trac Issues: #10571
* Ensure shiftL/shiftR arguments aren't negativeBen Gamari2015-10-071-2/+6
| | | | Fixes #10571.