summaryrefslogtreecommitdiff
path: root/libraries
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Change runtime linker to perform lazy loading of symbols/sectionsTamar Christina2016-04-114-34/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Runtime Linker is currently eagerly loading all object files on all platforms which do not use the system linker for `GHCi`. The problem with this approach is that it requires all symbols to be found. Even those of functions never used/called. This makes the number of libraries required to link things like `mingwex` quite high. To work around this the `rts` was relying on a trick. It itself was compiled with `MingW64-w`'s `GCC`. So it was already linked against `mingwex`. As such, it re-exported the symbols from itself. While this worked it made it impossible to link against `mingwex` in user libraries. And with this means no `C99` code could ever run in `GHCi` on Windows without having the required symbols re-exported from the rts. Consequently this rules out a large number of packages on Windows. SDL2, HMatrix etc. After talking with @rwbarton I have taken the approach of loading entire object files when a symbol is needed instead of doing the dependency tracking on a per symbol basis. This is a lot less fragile and a lot less complicated to implement. The changes come down to the following steps: 1) modify the linker to and introduce a new state for ObjectCode: `Needed`. A Needed object is one that is required for the linking to succeed. The initial set consists of all Object files passed as arguments to the link. 2) Change `ObjectCode`'s to be indexed but not initialized or resolved. This means we know where we would load the symbols, but haven't actually done so. 3) Mark any `ObjectCode` belonging to `.o` passed as argument as required: ObjectState `NEEDED`. 4) During `Resolve` object calls, mark all `ObjectCode` containing the required symbols as `NEEDED` 5) During `lookupSymbol` lookups, (which is called from `linkExpr` and `linkDecl` in `GHCI.hs`) is the symbol is in a not-yet-loaded `ObjectCode` then load the `ObjectCode` on demand and return the address of the symbol. Otherwise produce an unresolved symbols error as expected. 6) On `unloadObj` we then change the state of the object and remove it's symbols from the `reqSymHash` table so it can be reloaded. This change affects all platforms and OSes which use the runtime linker. It seems there are no real perf tests for `GHCi`, but performance shouldn't be impacted much. We gain a lot of time not loading all `obj` files, and we lose some time in `lookupSymbol` when we're finding sections that have to be loaded. The actual finding itself is O(1) (Assuming the hashtnl is perfect) It also consumes slighly more memory as instead of storing just the address of a symbol I also store some other information, like if the symbol is weak or not. This change will break any packages relying on renamed POSIX functions that were re-named and re-exported by the rts. Any packages following the proper naming for functions as found on MSDN will work fine. Test Plan: ./validate on all platforms which use the Runtime linker. Reviewers: thomie, rwbarton, simonmar, erikd, bgamari, austin, hvr Reviewed By: erikd Subscribers: kgardas, gridaphobe, RyanGlScott, simonmar, rwbarton, #ghc_windows_task_force Differential Revision: https://phabricator.haskell.org/D1805 GHC Trac Issues: #11223
* Typos in NoteJoachim Breitner2016-04-101-8/+5
|
* base: Fix "since" annotation on GHC.ExecutionStackBen Gamari2016-04-102-2/+2
| | | | I have no idea where "4.11" came from.
* Add doc to (<=<) comparing its type to (.)Chris Martin2016-04-101-1/+6
| | | | | | | | | | | | | | This is another documentation addition similar to D1989, this time comparing the type of the Kleisli composition operator (<=<) to that of plain function composition (.). Reviewers: hvr, austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2100
* Provide an optimized replicateM_ implementation #11795Michael Snoyman2016-04-101-5/+38
| | | | | | | | | | | | | | | | | | In my testing, the worker/wrapper transformation applied here significantly decreases the number of allocations performed when using replicateM_. Additionally, this version of the function behaves correctly for negative numbers (namely, it will behave the same as replicateM_ 0, which is what previous versions of base have done). Reviewers: bgamari, simonpj, hvr, austin Reviewed By: bgamari, simonpj, austin Subscribers: nomeata, simonpj, mpickering, thomie Differential Revision: https://phabricator.haskell.org/D2086 GHC Trac Issues: #11795
* Remove obsolete comment about the implementation of foldlJoachim Breitner2016-04-081-4/+0
|
* GHC.Base: Use thenIO in instance Applicative IOJoachim Breitner2016-04-081-3/+3
| | | | | | | | Since recent changes to CSE, the previous definition were no longer CSEd with thenIO, which resulted in extra steps in the simplifier and hence slightly larger compile times. See ticket:11781#comment:7. Differential Revision: https://phabricator.haskell.org/D2092
* Don't infer CallStacksEric Seidel2016-04-042-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We originally wanted CallStacks to be opt-in, but dealing with let binders complicated things, forcing us to infer CallStacks. It turns out that the inference is actually unnecessary though, we can let the wanted CallStacks bubble up to the outer context by refusing to quantify over them. Eventually they'll be solved from a given CallStack or defaulted to the empty CallStack if they reach the top. So this patch prevents GHC from quantifying over CallStacks, getting us back to the original plan. There's a small ugliness to do with PartialTypeSignatures, if the partial theta contains a CallStack constraint, we *do* want to quantify over the CallStack; the user asked us to! Note that this means that foo :: _ => CallStack foo = getCallStack callStack will be an *empty* CallStack, since we won't infer a CallStack for the hole in the theta. I think this is the right move though, since we want CallStacks to be opt-in. One can always write foo :: (HasCallStack, _) => CallStack foo = getCallStack callStack to get the CallStack and still have GHC infer the rest of the theta. Test Plan: ./validate Reviewers: goldfire, simonpj, austin, hvr, bgamari Reviewed By: simonpj, bgamari Subscribers: bitemyapp, thomie Projects: #ghc Differential Revision: https://phabricator.haskell.org/D1912 GHC Trac Issues: #11573
* Bump binary submoduleBen Gamari2016-04-041-0/+0
|
* Kill the magic of AnyBen Gamari2016-03-302-1/+23
| | | | | | | | | | | | | | | | | | | | This turns `Any` into a standard wired-in type family defined in `GHC.Types`, instead its current incarnation as a magical creature provided by the `GHC.Prim`. Also kill `AnyK`. See #10886. Test Plan: Validate Reviewers: simonpj, goldfire, austin, hvr Reviewed By: simonpj Subscribers: goldfire, thomie Differential Revision: https://phabricator.haskell.org/D2049 GHC Trac Issues: #10886
* ghc-prim: Mark unpackCStringUtf8# and unpackNBytes# as NOINLINEBen Gamari2016-03-301-5/+33
| | | | | | | | | | | | | | | There is no benefit to be had from inlining this function and it may defeat rewrite rules if inlined early. See #11772.. Test Plan: Validate, nofib Reviewers: simonpj, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2057 GHC Trac Issues: #11772
* Defer inlining of Ord methodsBen Gamari2016-03-303-31/+207
| | | | | | This performs the same refactoring performed in D1980 for Eq on Ord, rewriting the class operations in terms of monomorphic helpers than can be reliably matched in rewrite rules.
* ghc-prim: Delay inlining of {gt,ge,lt,le}Int to phase 1Ben Gamari2016-03-301-6/+12
| | | | Otherwise rewrite rules may not get an opporunity to fire.
* base: Fix haddock typoBen Gamari2016-03-291-1/+1
|
* base: Add comment noting import loopBen Gamari2016-03-291-0/+2
|
* Add Data.Functor.Classes instances for Proxy (trac issue #11756)Andrew Martin2016-03-292-0/+21
| | | | | | | | | | | | | | Test Plan: currently no test plan Reviewers: hvr, RyanGlScott, bgamari, austin Reviewed By: RyanGlScott, bgamari, austin Subscribers: thomie, RyanGlScott, andrewthad Differential Revision: https://phabricator.haskell.org/D2051 GHC Trac Issues: #11756
* base: Document caveats about Control.Concurrent.ChanErik de Castro Lopo2016-03-291-0/+5
| | | | | | | | | | | | | | | These are implemented using `MVars` which have known caveats. Suggest the use of `TChan` from the stm library instead. Test Plan: n/a Reviewers: austin, hvr, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2047
* Update bytestring submodule to latest snapshotHerbert Valerio Riedel2016-03-281-0/+0
| | | | | | | | | Most notably, this pulls in the following changes > Fix breakByte and spanByte rewrite rules > Implement `stripPrefix`/`stripSuffix` The first patch is related to #11688