summaryrefslogtreecommitdiff
path: root/libraries
Commit message (Collapse)AuthorAgeFilesLines
* Testsuite: write "\n" instead of "\r\n" when using mingw PythonThomas Miedema2016-06-181-0/+1
| | | | | | | | | | | | | | | Mingw style Python uses '\r\n' by default for newlines. This is annoying, because it means that when a GHC developer on Windows uses mingw Python to `make accept` a test, every single line of the .stderr file is touched. This makes it difficult to spot the real changes, and it leads to unnecessary git history bloat. Prevent this from happening by using io.open instead of open. See `Note [Universal newlines]` Reviewed by: Phyx Differential Revision: https://phabricator.haskell.org/D2342
* Testsuite: run tests in <testdir>.run instead of /tmpThomas Miedema2016-06-181-0/+0
| | | | | | | | | | | | | | | | | | | | As discussed in Phab:D1187, this approach makes it a bit easier to inspect the test directory while working on a new test. The only tests that needed changes are the ones that refer to files in ancestor directories. Those files are now copied directly into the test directory. validate still runs the tests in a temporary directory in /tmp, see `Note [Running tests in /tmp]` in testsuite/driver/runtests.py. Update submodule hpc. Reviewed by: simonmar Differential Revision: https://phabricator.haskell.org/D2333 GHC Trac Issues: #11980
* Revert accidental submodule updatesThomas Miedema2016-06-185-0/+0
| | | | | Commit 77bb09270c70455bbd547470c4e995707d19f37d seems to have accidentally set some submodules to earlier versions. Undo this.
* NUMA cleanupsSimon Marlow2016-06-171-2/+2
| | | | | - Move the numaMap and nNumaNodes out of RtsFlags to Capability.c - Add a test to tests/rts
* Re-add FunTy (big patch)Simon Peyton Jones2016-06-155-0/+0
| | | | | | | | | | | | | | | | | | | | | | With TypeInType Richard combined ForAllTy and FunTy, but that was often awkward, and yielded little benefit becuase in practice the two were always treated separately. This patch re-introduces FunTy. Specfically * New type data TyVarBinder = TvBndr TyVar VisibilityFlag This /always/ has a TyVar it. In many places that's just what what we want, so there are /lots/ of TyBinder -> TyVarBinder changes * TyBinder still exists: data TyBinder = Named TyVarBinder | Anon Type * data Type = ForAllTy TyVarBinder Type | FunTy Type Type | .... There are a LOT of knock-on changes, but they are all routine. The Haddock submodule needs to be updated too
* Rts flags cleanupSimon Marlow2016-06-103-99/+66
| | | | | | | | * Remove unused/old flags from the structs * Update old comments * Add missing flags to GHC.RTS * Simplify GHC.RTS, remove C code and use hsc2hs instead * Make ParFlags unconditional, and add support to GHC.RTS
* Add @since annotations to base instancesSeraphime Kirkovski2016-06-0687-4/+1029
| | | | | | | | | | | | | | | | | | Add @since annotations to instances in `base`. Test Plan: * ./validate # some commets shouldn't break the build * review the annotations for absurdities. Reviewers: ekmett, goldfire, RyanGlScott, austin, hvr, bgamari Reviewed By: RyanGlScott, hvr, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2277 GHC Trac Issues: #11767
* Replace hand-written Bounded instances with derived onesRyan Scott2016-06-045-136/+58
| | | | | | | | | | | | | | | | | Summary: The spiritual successor to D2291, since deriving `Bounded` instances in `GHC.Enum` wasn't possible prior to changes made in that Diff. This Diff finds every manually implemented `Bounded` instance in `base` that is completely equivalent to the derived instances, and replaces it. Reviewers: bgamari, goldfire, austin, hvr Reviewed By: austin, hvr Subscribers: thomie, rwbarton Differential Revision: https://phabricator.haskell.org/D2301
* integer-gmp: Make minusInteger more efficientAlan Mock2016-06-042-3/+41
| | | | | | | | | | | | | | | | Give `minusInteger` its own implementation. Previously `minusInteger` used `plusInteger` and `negateInteger`, which meant it always allocated. Now it works more like `plusInteger`. Reviewers: goldfire, hvr, bgamari, austin Reviewed By: hvr, bgamari, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2278 GHC Trac Issues: #12129
* Derive instances in Data.DataRyan Scott2016-06-031-697/+58
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Currently, none of the `Data` instances in `Data.Data` are derived, which has resulted in hundreds of lines of laboriously hand-written `Data` instances. This cleans it up by using `DeriveDataTypeable` to derive all of the boring instances. Note that previously, `tcTopSrcDecls` in `TcRnDriver` was typechecking the variables generated in `deriving` statements before other top-level variables, which causes an error when `DeriveDataTypeable` is used in `Data.Data`, since the `deriving`-generated variable definitions refer to top-level definitions in `Data.Data` itself. To fix this, the order in which these two groups are typechecked was reversed. Test Plan: ./validate Reviewers: rwbarton, bgamari, hvr, austin Reviewed By: austin Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D2291
* Testsuite: don't use --interactive in MakefilesThomas Miedema2016-05-271-0/+0
| | | | | | | | | | | | | | Add a linter to encourage the use of `$(TEST_HC_OPTS_INTERACTIVE)` instead of `$(TEST_HC_OPTS) --interactive -ignore-dot-ghci -v0`. It's too easy to forget one of those flags when adding a new test. Update submodule hpc. Reviewed by: austin Differential Revision: https://phabricator.haskell.org/D2265 GHC Trac Issues: #11468
* Testsuite: fix enum01/02/03 on Windows (#9399)Thomas Miedema2016-05-256-6/+15
|
* Update submodule vector [skip ci]Thomas Miedema2016-05-241-0/+0
| | | | Contains commits to let vector compile with primitive master.
* Always use native-Haskell de/encoders for ASCII and latin1Thomas Miedema2016-05-244-26/+29
| | | | | | | | This fixes test encoding005 on Windows (#10623). Reviewed by: austin, bgamari Differential Revision: https://phabricator.haskell.org/D2262
* Remove 'deriving Typeable' statementsRyan Scott2016-05-244-62/+60
| | | | | | | | | | | | | | | | | Summary: Deriving `Typeable` has been a no-op since GHC 7.10, and now that we require 7.10+ to build GHC, we can remove all the redundant `deriving Typeable` statements in GHC. Test Plan: ./validate Reviewers: goldfire, austin, hvr, bgamari Reviewed By: austin, hvr, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2260
* Testsuite: fix T12010 for realThomas Miedema2016-05-223-11/+7
| | | | | | | | | | | | | | | | | * Use `extra_files` instead of (the deprecated) `extra_clean` (#11980). * Don't depend on generated files from build tree (libraries/base/include/HsBaseConfig.h). Running 'make test TEST=T12010' should work, even without building GHC first (it will use the system installed ghc). Test Plan: 'make test TEST=T12010' on Linux and Windows. Reviewed by: Phyx Differential Revision: https://phabricator.haskell.org/D2256 GHC Trac Issues: #12010
* Fix failing T12010Tamar Christina2016-05-213-5/+6
| | | | | | | | | | | | | | | | Summary: T12010 seems to be failing because it can't find the correct paths. This gives the test some more qualified paths. Test Plan: make TEST=12010 Reviewers: hvr, bgamari, austin, thomie Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D2252 GHC Trac Issues: #12010
* Use the correct return type for Windows' send()/recv() (Fix #12010)Tamar Christina2016-05-197-29/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: They return signed 32 bit ints on Windows, even on a 64 bit OS, rather than Linux's 64 bit ssize_t. This means when recv() returned -1 to signal an error we thought it was 4294967295. It was converted to an int, -1 and the buffer was memcpy'd which caused a segfault. Other bad stuff happened with send()s. See also note CSsize in System.Posix.Internals. Add a test for #12010 Test Plan: - GHC testsuite (T12010) - http-conduit test (https://github.com/snoyberg/http-client/issues/191) Reviewers: austin, hvr, bgamari, Phyx Reviewed By: Phyx Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2170 GHC Trac Issues: #12010
* rts: Add isPinnedByteArray# primopBen Gamari2016-05-181-0/+10
| | | | | | | | | | | | | | | | | Adds a primitive operation to determine whether a particular `MutableByteArray#` is backed by a pinned buffer. Test Plan: Validate with included testcase Reviewers: austin, simonmar Reviewed By: austin, simonmar Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2217 GHC Trac Issues: #12059
* Delete libraries/ghci/GNUmakefile [skip ci]Thomas Miedema2016-05-171-4/+0
| | | | | This file should not have been included in the repository, as it is generated by `./boot`.
* Testsuite: don't skip concio001 and concio001_thrThomas Miedema2016-05-172-4/+4
| | | | | I think they were skipped before because they write to the same output file (concio001). This is no longer a problem.
* Move Extension type to ghc-boot-thBen Gamari2016-05-1610-134/+229
| | | | | | | | | | | | | | | | | | | | This creates a new package, `ghc-boot-th`, to contain the `Extension` type, which now lives in `GHC.LanguageExtension.Type`. This ensures that the transitive dependency set of the `template-haskell` package remains minimal. The `GHC.LanguageExtensions.Type` module is also re-exported by `ghc-boot`, which provides an orphan `binary` instance as well. Test Plan: Validate Reviewers: goldfire, thomie, hvr, austin Reviewed By: thomie Subscribers: RyanGlScott, thomie, erikd, ezyang Differential Revision: https://phabricator.haskell.org/D2224
* Update bytestring submodule to 0.10.8.1 release tagHerbert Valerio Riedel2016-05-151-0/+0
|
* Make Generic1 poly-kindedRyanGlScott2016-05-123-48/+73
| | | | | | | | | | | | | | | | | | | | | | | This generalizes the `Generic1` typeclass to be of kind `k -> *`, and this also makes the relevant datatypes and typeclasses in `GHC.Generics` poly-kinded. If `PolyKinds` is enabled, `DeriveGeneric` derives `Generic1` instances such that they use the most general kind possible. Otherwise, deriving `Generic1` defaults to make an instance where the argument is of kind `* -> *` (the current behavior). Fixes #10604. Depends on D2117. Test Plan: ./validate Reviewers: kosmikus, dreixel, goldfire, austin, hvr, simonpj, bgamari Reviewed By: simonpj, bgamari Subscribers: thomie, ekmett Differential Revision: https://phabricator.haskell.org/D2168 GHC Trac Issues: #10604
* Add TH support for pattern synonyms (fixes #8761)Dominik Bollmann2016-05-126-26/+186
| | | | | | | | | | | | | | | | | | This commit adds Template Haskell support for pattern synonyms as requested by trac ticket #8761. Test Plan: ./validate Reviewers: thomie, jstolarek, osa1, RyanGlScott, mpickering, austin, goldfire, bgamari Reviewed By: goldfire, bgamari Subscribers: rdragon Differential Revision: https://phabricator.haskell.org/D1940 GHC Trac Issues: #8761
* Update time submodule to 1.6.0.1 release tagHerbert Valerio Riedel2016-05-071-0/+0
|
* Update Win32 submodule to v2.3.1.1 release tagHerbert Valerio Riedel2016-05-061-0/+0
|
* base: Export runRW# from GHC.ExtsBen Gamari2016-05-041-0/+3
| | | | | | | | | | | | | | | Seems like this should be available in GHC.Exts. Thanks for @carter for pointing this out. Test Plan: Validate Reviewers: rwbarton, hvr, austin Reviewed By: austin Subscribers: thomie, carter Differential Revision: https://phabricator.haskell.org/D2171
* Export oneShot from GHC.ExtsJoachim Breitner2016-05-041-1/+1
| | | | as suggested by carter in #12011.
* Update bytestring submodule to 0.10.8.0 release tagHerbert Valerio Riedel2016-05-041-0/+0
|
* Update libraries/hpc submodule to v0.6.0.3 release tagHerbert Valerio Riedel2016-05-031-0/+0
|
* StaticPointers: Allow closed vars in the static form.Facundo Domínguez2016-05-022-9/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: With this patch closed variables are allowed regardless of whether they are bound at the top level or not. The FloatOut pass is always performed. When optimizations are disabled, only expressions that go to the top level are floated. Thus, the applications of the StaticPtr data constructor are always floated. The CoreTidy pass makes sure the floated applications appear in the symbol table of object files. It also collects the floated bindings and inserts them in the static pointer table. The renamer does not check anymore if free variables appearing in the static form are top-level. Instead, the typechecker looks at the tct_closed flag to decide if the free variables are closed. The linter checks that applications of StaticPtr only occur at the top of top-level bindings after the FloatOut pass. The field spInfoName of StaticPtrInfo has been removed. It used to contain the name of the top-level binding that contains the StaticPtr application. However, this information is no longer available when the StaticPtr is constructed, as the binding name is determined now by the FloatOut pass. Test Plan: ./validate Reviewers: goldfire, simonpj, austin, hvr, bgamari Reviewed By: simonpj Subscribers: thomie, mpickering, mboes Differential Revision: https://phabricator.haskell.org/D2104 GHC Trac Issues: #11656
* Export constructors for IntPtr and WordPtrRyanGlScott2016-05-024-5/+40
| | | | | | | | | | | | | | | | | | | | This finishes what #5529 started by exporting the constructors for `IntPtr` and `WordPtr` from `Foreign.Ptr`, allowing them to be used in `foreign` declarations. Fixes #11983. Test Plan: `make TEST=T11983` Reviewers: simonpj, hvr, bgamari, austin Reviewed By: simonpj Subscribers: simonpj, thomie Differential Revision: https://phabricator.haskell.org/D2142 GHC Trac Issues: #11983
* Testsuite: fixup lots of testsThomas Miedema2016-04-265-11/+11
| | | | | | | | | These aren't run very often, because they require external libraries. https://ghc.haskell.org/trac/ghc/wiki/Building/RunningTests/Running#AdditionalPackages maessen-hashtab still doesn't compile, QuickCheck api changed. Update submodule hpc.
* Testsuite: Delete test for deprecated "packedstring"Thomas Miedema2016-04-263-15/+1
|
* Update unix submodule to v2.7.2.0 releaseHerbert Valerio Riedel2016-04-191-0/+0
|
* Update `pretty` submodule to v1.1.3.3 releaseHerbert Valerio Riedel2016-04-191-0/+0
|
* Update binary submodule to 0.8.3.0 releaseHerbert Valerio Riedel2016-04-191-0/+0
|
* Update deepseq submodule to latest 1.4.2.0 snapshotHerbert Valerio Riedel2016-04-191-0/+0
| | | | NB: this needs 91ee5090f1e3f43e9e803cf7005a7f3357e58377
* Mark GHC.Stack.Types TrustworthyHerbert Valerio Riedel2016-04-191-1/+2
| | | | | | | GHC can't infer this module safe due to the `GHC.Types (Char, Int)` and the (dummy) `GHC.Integer ()` import. If only `GHC.Types` was marked Trustworthy or Safe...
* Update `directory` submodule to v1.2.6.2 releaseHerbert Valerio Riedel2016-04-191-0/+0
| | | | | The v1.2.6.1 release uploaded to Hackage is broken, we don't want to bundle a release that's non-installable from Hackage
* Update haskeline submodule to 0.7.2.3 releaseHerbert Valerio Riedel2016-04-171-0/+0
|
* Update `directory` submodule to v1.2.6.1 releaseHerbert Valerio Riedel2016-04-171-0/+0
| | | | This fixes a build-failure on OSX
* TH: Tweak Haddock languageBen Gamari2016-04-171-2/+2
|
* Add TemplateHaskell support for Overlapping pragmasIavor S. Diatchki2016-04-176-6/+36
| | | | | | | | | | Reviewers: hvr, goldfire, austin, RyanGlScott, bgamari Reviewed By: RyanGlScott, bgamari Subscribers: RyanGlScott, thomie Differential Revision: https://phabricator.haskell.org/D2118
* Update array submodule to v0.5.1.1 release tagHerbert Valerio Riedel2016-04-171-0/+0
|
* Update `directory` submodule to v1.2.6.0 releaseHerbert Valerio Riedel2016-04-161-0/+0
|
* Use `@since` annotation in GHC.ExecutionStackHerbert Valerio Riedel2016-04-112-2/+2
| | | | | While ad532ded871a9a5180388a2b7cdbdc26e053284c fixed the version number, this fixes the markup...
* Deriving Functor-like classes should unify kind variablesRyanGlScott2016-04-111-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While the deriving machinery always unifies the kind of the typeclass argument with the kind of the datatype, this proves not to be sufficient to produce well kinded instances for some poly-kinded datatypes. For example: ``` newtype Compose (f :: k2 -> *) (g :: k1 -> k2) (a :: k1) = Compose (f (g a)) deriving Functor ``` would fail because only `k1` would get unified with `*`, causing the following ill kinded instance to be generated: ``` instance (Functor (f :: k2 -> *), Functor (g :: * -> k2)) => Functor (Compose f g) where ... ``` To prevent this, we need to take the subtypes and unify their kinds with `* -> *`. Fixes #10524 for good. Test Plan: ./validate Reviewers: simonpj, hvr, austin, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2097 GHC Trac Issues: #10524, #10561
* Added (more) missing instances for Identity and ConstShane O'Brien2016-04-114-8/+19
| | | | | | | | | | | | | | | | | | | * `Identity` and `Const` now have `Num`, `Real`, `Integral`, `Fractional`, `Floating`, `RealFrac` and `RealFloat` instances * `Identity` and `Const` now have `Bits` and `FiniteBits` instances * `Identity` and `Const` now have `IsString` instances Reviewers: RyanGlScott, austin, hvr, bgamari, ekmett Reviewed By: ekmett Subscribers: nomeata, ekmett, RyanGlScott, thomie Differential Revision: https://phabricator.haskell.org/D2079 GHC Trac Issues: #11790