| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a data family (`URec`) and six data family instances (`UAddr`,
`UChar`, `UDouble`, `UFloat`, `UInt`, and `UWord`) which a `deriving
Generic(1)` clause will generate if it sees `Addr#`, `Char#`, `Double#`,
`Float#`, `Int#`, or `Word#`, respectively. The programmer can then
provide instances for these data family instances to provide custom
implementations for unboxed types, similar to how derived `Eq`, `Ord`,
and `Show` instances currently special-case unboxed types.
Fixes #10868.
Test Plan: ./validate
Reviewers: goldfire, dreixel, bgamari, austin, hvr, kosmikus
Reviewed By: dreixel, kosmikus
Subscribers: simonpj, thomie
Differential Revision: https://phabricator.haskell.org/D1239
GHC Trac Issues: #10868
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch is due to Andreas Schwab.
This fixes #10926, which reports (on AArch64) errors of the form,
```
/tmp/ghc1492_0/ghc_1.hc:2844:25: warning: passing argument 1 of
'hs_atomic_xor64' makes pointer from integer without a cast
[-Wint-conversion]
_c1Ho = hs_atomic_xor64((*Sp) + (((Sp[1]) << 0x3UL) + 0x10UL), Sp[2]);
^
In file included from
/home/abuild/rpmbuild/BUILD/ghc-7.10.2/includes/Stg.h:273:0: 0,
from /tmp/ghc1492_0/ghc_1.hc:3:
/home/abuild/rpmbuild/BUILD/ghc-7.10.2/includes/stg/Prim.h:41:11:
note: expected 'volatile StgWord64 *
{aka volatile long unsigned int *}'
but argument is of type 'long unsigned int'
StgWord64 hs_atomic_xor64(volatile StgWord64 *x, StgWord64 val);
^
```
Test Plan: Validate
Reviewers: austin, simonmar
Reviewed By: simonmar
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1300
GHC Trac Issues: #10926
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CallStack requires tuples, instances of which are defined in GHC.Tuple.
Unfortunately the change made in D757 to the `Typeable` deriving
mechanism means that `GHC.Tuple` must import `GHC.Types` for types
necessary to generate type representations. This results in a cycle.
Test Plan: Validate
Reviewers: gridaphobe, austin, hvr
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1298
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: bgamari, hvr, austin
Reviewed By: bgamari, hvr, austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1289
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This implements phase 1 of the semigroup-as-monoid-superclass
proposal (https://ghc.haskell.org/wiki/Proposal/SemigroupMonoid).
The modules were migrated from the `semigroups-0.17` release mostly
as-is, except for dropping several trivial `{-# INLINE #-}`s,
removing CPP usage, and instances for types & classes provided
outside of `base` (e.g. `containers`, `deepseq`, `hashable`, `tagged`,
`bytestring`, `text`)
Differential Revision: https://phabricator.haskell.org/D1284
|
|
|
|
|
|
|
| |
The function is very small and the compiler should be at liberty to
inline it. But it is recursive, so it did not do it before. By applying
the usual transformation with a local recursive function, GHC can now
inline it, producing the loop that one would expect.
|
|
|
|
|
|
|
|
|
|
| |
To quote Simon Marlow,
We don't expect users to ever write code that uses mkWeak# or
finalizeWeak#, we have safe interfaces to these. Let's document the type
unsafety and fix the problem with () without introducing any overhead.
Updates stm submodule.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: See Note [MallocPtr finalizers]
Test Plan: validate; new test T10904
Reviewers: ezyang, bgamari, austin, hvr, rwbarton
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1275
|
|
|
|
|
|
|
|
|
|
|
| |
Previously it was only available from GHC.Conc, but it makes sense for it to be
available from a more official place where people might find it.
While I was here, I improved the docs a little.
Reviewed By: austin
Differential Revision: https://phabricator.haskell.org/D1272
|
|
|
|
|
|
|
|
|
|
|
|
| |
This should (1) fix the ./validate build, which I accidentally broke in D1168,
and (2) update the Cabal submodule so that it recognizes `DeriveLift` as a GHC
extension.
Reviewed By: adamse, austin
Differential Revision: https://phabricator.haskell.org/D1269
GHC Trac Issues: #1830
|
|
|
|
|
|
|
| |
Previously the types needlessly used (), which is defined ghc-prim,
leading to unfortunate import cycles. See #10867 for details.
Updates stm submodule.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This implements -XDeriveLift, which allows for automatic derivation
of the Lift class from template-haskell. The implementation is based
off of Ian Lynagh's th-lift library
(http://hackage.haskell.org/package/th-lift).
Test Plan: ./validate
Reviewers: hvr, simonpj, bgamari, goldfire, austin
Reviewed By: goldfire, austin
Subscribers: osa1, thomie
Differential Revision: https://phabricator.haskell.org/D1168
GHC Trac Issues: #1830
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The default top-level exception handler now uses the `Show` instance for
`ErrorCall` when printing exceptions, so it will actually print the out-of-band
data (e.g. `CallStack`s) in compiled binaries, instead of just printing the
error message.
This also updates the hpc submodule to fix the test output.
Reviewed By: austin, thomie
Differential Revision: https://phabricator.haskell.org/D1217
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
During the build, when HADDOCK_DOCS=YES, the command 'cd libraries && sh
gen_contents_index --intree' is run, which calls haddock to generate the
haddock index at 'libraries/dist-haddock/index.html'.
What it did before was check the ./packages file for all libraries. The
problem is that 'base' and 'ghc-prim' were folded into the main repo
some time ago, hence don't have an entry in the ./packages file anymore.
As a result, 'base' and 'ghc-prim' were missing from the index.html
file.
It now simply runs haddock on all the all the `.haddock` files in the
libraries directory.
The only risk is that this could include the extra libraries in the
index.html, if you ever built them in the past (with
BUILD_EXTRA_PKGS=YES), even though now you want to exclude them (with
BUILD_EXTRA_PKGS=NO). gen_contents_index doesn't have access to build
system variables though (PACKAGES_STAGE1+PACKAGES_STAGE2), so fixing
this would be a little bit fiddly.
Test Plan:
'make libraries/dist-haddock/index.html && grep -q base
libraries/dist-haddock/index.html && echo ok'
Reviewed by: austin
Differential Revision: https://phabricator.haskell.org/D1247
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently there exists a nameBase function (for retrieving a Name's OccName)
and a nameModule function (for retrieving a Name's ModName), but there is no
counterpart for PkgNames.
This would be useful for implementing Template Haskell features which need
to have easy access to a Name's package (e.g., automatically derived Lift
instances).
Reviewed By: goldfire, austin, thomie
Differential Revision: https://phabricator.haskell.org/D1237
|
|
|
|
| |
This fixes some hpc tests on Windows. Update submodule hpc.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This allows these to be used from Text.Read.Lex import cycles.
Reviewed By: thomie, austin
Differential Revision: https://phabricator.haskell.org/D1121
GHC Trac Issues: #10444
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After I have found out that I should look at -ddump-prep and not
-ddump-core, I noticed that these days, GHC is perfectly capeable of
turning (the equivalent) of foldl to (the equivalent) of foldl' if the
operation in question is strict. So instead of using rewrite rules to
rewrite maximum to a strictMaximum for certain types, we simply use
SPECIALIZE.
This also marks maximum/minimum as INLINEABLE, so that client code can
get similar specializations, hopefully even automatically. And inded,
minimum applied to [Double] produces good code (although due to
inlineing, not due to specialization, it seems).
I checked (by looking at the core) that this still fixes #10788.
Differential revision: https://phabricator.haskell.org/D1229
|
|
|
|
|
|
|
|
| |
This fixes a regression reported in #10788, where due to less inlining
compared to earlier versions, we’d get worse code. With the SPECIALIZE,
we get the good code, and moreover, the good code is in List.hs and
_not_ inlined to the use site, so smaller code size and less compilation
time.
|
|
|
|
|
|
|
|
|
|
| |
Previously, foldr1 would be defiend recursively and thus not inline.
This is bad, for example, when maximumBy has a strict comparison
function: Before the BBP, it was implemented via foldl1, which inlined
and yielded good code. With BBP, it goes via foldr1, so we better inline
this as well. Fixes #10830.
Differential Revision: https://phabricator.haskell.org/D1205
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For details see #6018, Phab:D202 and the wiki page:
https://ghc.haskell.org/trac/ghc/wiki/InjectiveTypeFamilies
This patch also wires-in Maybe data type and updates haddock submodule.
Test Plan: ./validate
Reviewers: simonpj, goldfire, austin, bgamari
Subscribers: mpickering, bgamari, alanz, thomie, goldfire, simonmar,
carter
Differential Revision: https://phabricator.haskell.org/D202
GHC Trac Issues: #6018
|
|
|
|
|
|
|
|
|
|
| |
I didn't realize that `./validate` does not run every test :(
Test Plan: ./validate --slow
Update submodule hpc.
Differential Revision: https://phabricator.haskell.org/D1204
|
|
|
|
| |
Please revert when #10712 is fixed.
|
|
|
|
| |
Updates stm submodule.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch modifies `error`, `undefined`, and `assertError` to use
implicit call-stacks to provide better error messages to users.
There are a few knock-on effects:
- `GHC.Classes.IP` is now wired-in so it can be used in the wired-in
types for `error` and `undefined`.
- `TysPrim.tyVarList` has been replaced with a new function
`TysPrim.mkTemplateTyVars`. `tyVarList` made it easy to introduce
subtle bugs when you need tyvars of different kinds. The naive
```
tv1 = head $ tyVarList kind1
tv2 = head $ tyVarList kind2
```
would result in `tv1` and `tv2` sharing a `Unique`, thus substitutions
would be applied incorrectly, treating `tv1` and `tv2` as the same
tyvar. `mkTemplateTyVars` avoids this pitfall by taking a list of kinds
and producing a single tyvar of each kind.
- The types `GHC.SrcLoc.SrcLoc` and `GHC.Stack.CallStack` now live in
ghc-prim.
- The type `GHC.Exception.ErrorCall` has a new constructor
`ErrorCallWithLocation` that takes two `String`s instead of one, the
2nd one being arbitrary metadata about the error (but usually the
call-stack). A bi-directional pattern synonym `ErrorCall` continues to
provide the old API.
Updates Cabal, array, and haddock submodules.
Reviewers: nh2, goldfire, simonpj, hvr, rwbarton, austin, bgamari
Reviewed By: simonpj
Subscribers: rwbarton, rodlogic, goldfire, maoe, simonmar, carter,
liyang, bgamari, thomie
Differential Revision: https://phabricator.haskell.org/D861
GHC Trac Issues: #5273
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a somewhat minor optimisation exploiting the static knowledge
of the operands involved allowing to save a few allocations.
Reviewers: austin, rwbarton, goldfire, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1179
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This amounts to enabling PolyKinds in GHC.Generics. However, explicit
kind signatures must be applied to the datatypes and typeclasses in
GHC.Generics to ensure that the Core which TcGenGenerics generates
is properly kinded.
Several of the typeclasses in GHC.Generics could be poly-kinded, but
this differential does not attempt to address this, since D493 already
addresses this.
Test Plan: ./validate
Reviewers: hvr, austin, dreixel, bgamari
Reviewed By: austin, dreixel, bgamari
Subscribers: goldfire, thomie
Differential Revision: https://phabricator.haskell.org/D1166
GHC Trac Issues: #10775
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now since ByteArrays are mutable we need to be more explicit about when
the size is queried.
Test Plan: Add testcase and validate
Reviewers: goldfire, hvr, austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1139
GHC Trac Issues: #9447
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We only support building GHC on mys2 nowadays, see
https://ghc.haskell.org/trac/ghc/wiki/Building/Preparation/Windows.
This (partially) reverts various commits from a few years ago, among which:
* 5775d5142da227d65fb86994d363eb16841ee642
"Add OSTYPE build-system variable, and use it"
* 3fb8c431824aa2f3bd979e35d1a283546fcfbe74
"Fix building libgmp on cygwin"
* cdbb4720c424500adb57cbbef69721d0b039fa46
"Fix cmd invocation by libffi cuild system on Windows 7 cygwin"
* e8121501ee3549a35e954726ccfd871ac9d51f83
"Fix dblatex and xml* tool detection on Windows"
Reviewed by: austin, Phyx
Differential Revision: https://phabricator.haskell.org/D1155
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
...since we already have introduced backward compat breakage
that breaks packages such as QuickCheck-2.8.1
Differential Revision: https://phabricator.haskell.org/D1144
|
|
|
|
| |
Differential Revision: https://phabricator.haskell.org/D1140
|
|
|
|
|
|
|
|
|
| |
akio wants to use oneShot with unlifted types as well, and there is no
good reason not to let him. This changes the type of the built-in
oneShot definition to open kinds, and also expand the documentation a
little bit.
Differential Revision: https://phabricator.haskell.org/D1136
|
|
|
|
| |
[skip ci]
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds following instances:
* Foldable ZipList
* Traversable ZipList
* Functor Complex
* Applicative Complex
* Monad Complex
* Foldable Complex
* Traversable Complex
* Generic1 Complex
* Monoid a => Monoid (Identity a)
* Storable ()
Reviewers: ekmett, fumieval, hvr, austin
Subscribers: thomie, #core_libraries_committee
Projects: #core_libraries_committee
Differential Revision: https://phabricator.haskell.org/D1049
GHC Trac Issues: #10609
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Template Haskell allows reification of fixity for infix functions and
data constructors, and not for infix types. This adds a `Fixity` field
to the relevant `Info` constructors that can have infix types (`ClassI`,
`TyConI`, and `FamilyI`).
I don't think that `VarI` or `PrimTyConI` can be infix, but I could be
wrong.
Test Plan: ./validate
Reviewers: austin, goldfire, bgamari
Reviewed By: goldfire, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1109
GHC Trac Issues: #10704
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: validate
Reviewers: hvr, austin, bgamari, simonpj
Reviewed By: simonpj
Subscribers: simonpj, thomie
Differential Revision: https://phabricator.haskell.org/D1126
GHC Trac Issues: #9848
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Certain instances of `Exception` are simply datatypes with only one
argument, which should be `newtype`s.
Reviewers: ekmett, hvr, austin, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1131
GHC Trac Issues: #10738
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
See https://mail.haskell.org/pipermail/libraries/2015-May/025708.html
for motivation.
This fixes #10457
Test Plan: Validate
Reviewers: hvr, austin
Subscribers: simonmar, thomie, dolio
Differential Revision: https://phabricator.haskell.org/D1124
GHC Trac Issues: #10457
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: using remote validate
Reviewers: austin, hvr, simonpj, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1117
|
|
|
|
| |
Update submodule array.
|
|
|
|
|
|
|
|
| |
This fixes #9516.
Differential Revision: https://phabricator.haskell.org/D181
Authored-by: Edsko de Vries <edsko@well-typed.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GHC now warns if rules compete, so that it's not predicatable
which will work and which will not. E.g.
{-# RULES
f (g x) = ...
g True = ...
#-}
If we had (f (g True)) it's not clear which rule would fire.
This showed up fraility in the libraries.
* Suppress warnigns in Control.Arrow, Control.Category for class
methods. At the moment we simply don't have a good way to write a
RULE with a class method in the LHS. See Trac #1595. Arrow and
Category attempt to do so; I have silenced the complaints with
-fno-warn-inline-rule-shadowing, but it's not a great solution.
* Adjust the NOINLINE pragma on 'GHC.Base.map' to account for the
map/coerce rule
* Adjust the rewrite rules in Enum, especially for the "literal 1"
case. See Note [Enum Integer rules for literal 1].
* Suppress warnings for 'bytestring' e.g.
libraries/bytestring/Data/ByteString.hs:895:1: warning:
Rule "ByteString specialise break (x==)" may never fire
because rule "Class op ==" for ‘==’ might fire first
Probable fix: add phase [n] or [~n] to the competing rule
|