| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
|
|
| |
These are associated with
- new instance reporting
- typeable changes in -ddump-simpl output
- -ddump-types being a bit less verbose
- some renaming of type variables in debugger output (no idea why this happens)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch implements the idea floated in #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 30% more
T5642: GHC allocates 14% more
T9872d: GHC allocates 5% 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 #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.
* Each TyCon, including promoted TyCons, contains its TyConRepName,
if it has one. This is, in effect, the name of its Typeable
instance.
* I added PatSynId, DefMethId, and ReflectionId to the IdInfo.IdDetails
type. They are used for debugging only, namely to suppress excessive
output in -ddump-types.
* Tidy up the generation of PrelInfo.knownKeyNames
* Move newImplicitBinder from IfaceEnv to BuildTyCl
* PrelNames.conName renamed to dcQual for consistency with varQual, tcQual
* Move mkDefaultMethodIds, mkRecSelBinds from TcTyClsDecls to TcTyDecls
|
|
|
|
|
| |
I'm not sure why tcRnDeclsi didn't call tcRnSrcDecls before, but now it
does. About 20 lines of code vanish. Hooray.
|
|
|
|
|
| |
This localises the (revolting) initTcForLookup function, exposing
instead the more civilised interface for lookupGlobal
|
| |
|
|
|
|
| |
See Note [Displaying potential instances].
|
|
|
|
|
|
|
|
|
|
|
| |
This was proposed a couple of times in the past, e.g.
- https://mail.haskell.org/pipermail/libraries/2011-November/017153.html
- https://mail.haskell.org/pipermail/libraries/2013-July/020446.html
but its implementation had been blocked by the fact that `Monoid` wasn't
in scope where the `Monad` class was defined. Since the AMP/FTP restructuring
this is no longer the case.
|
| |
|
|
|
|
|
|
|
|
|
| |
This is a minor refactoring, but it simplifies the code quite a bit
* Decrease the number of variants of tcExtend in TcEnv
* Remove "not_actually_free" from TcEnv.tc_extend_local_env2
* Simplify plumbingof the "closed" flag
* Remove redundant scoping of wild-card variables
|
|
|
|
|
|
|
|
|
|
|
| |
This is a variation of T2431 where the emptyness of the type is hidden
behind a newtype, a type family and a closed type family. In all cases,
it would be sound for the compiler to determine that the equality type
is empty and the case alternatives may be dropped.
At the moment, GHC does _not_ determine that. But if it ever does, this
test ensures that we do not forget to make the lint from #10180 smarter
as well.
|
|
|
|
|
|
|
|
|
|
|
|
| |
The last trace of NDP was removed in 2008 in commit:
44ee866e5bc20fcdf29ab13ea050816da9faf915
NDP stood for 'Nested Data Parallelism'. It was superseded by Data
Parallel Haskell (DPH).
Reviewed By: austin
Differential Revision: https://phabricator.haskell.org/D752
|
|
|
|
|
| |
This addresses https://ghc.haskell.org/trac/ghc/ticket/10180#comment:6
[skip ci]
|
|
|
|
|
|
|
|
| |
Any expression with of empty type is necessary bottom, so we can use
that here. No effects known, but it is the right thing to do and
validate, so lets do it.
Differential Revision: https://phabricator.haskell.org/D754
|
|
|
|
|
|
|
|
|
|
|
|
| |
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate with 7.8 stage0 and HEAD stage0
Reviewers: austin, kgardas
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D740
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The LLVM developers seem to make breaking changes in the LLVM IR
language between major releases. As a consumer of the LLVM tools
GHC now needs to be locked more tightly to a single version of
the LLVM tools.
GHC HEAD currently only supports LLVM version 3.6. This commit
changes the configure script to look for `llc-3.6` and `opt-3.6`
before looking for `llc` and `opt`. If the former are not found,
but the later are, check that they actually are version 3.6.
At the same time, when detecting known problems with the LLVM
tools (ie #9439) test for it using the versions of the LLVM tools
retrieved from the bootstrap compiler's settings file.
Test Plan: Manual testing.
Reviewers: thomie, rwbarton, nomeata, austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D745
GHC Trac Issues: #10170
|
|
|
|
| |
[skip ci]
|
|
|
|
| |
in a follow up to #10180.
|
|
|
|
|
|
|
|
|
| |
The arity of an id should not be larger than what the type allows, and
it should also not contradict the strictness signature. This adds a lint
check for that.
This broke test T8743, uncovering a bug in the SOURCE import machinery,
which is now filed as #10182.
|
|
|
|
|
|
| |
detected either by exprIsBottom or by an empty type.
This was suggested by SPJ and fixes #10180.
|
|
|
|
|
| |
as evaluting (\ (@ a) -> e) diverges if and only if evaluating e
diverges. This was found in the context of #10180.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This implements (roughly) the plan put forward in comment:14:ticket:7788,
fixing #7788, #8550, #9554, #10139, and addressing concerns raised in #10079.
There are some regressions w.r.t. GHC 7.8, but only with pathological type
families (like F a = F a). This also (hopefully -- don't have a test case)
fixes #10158. Unsolved problems include #10184 and #10185, which are both
known deficiencies of the approach used here.
As part of this change, the plumbing around detecting infinite loops has
changed. Instead of -fcontext-stack and -ftype-function-depth, we now have
one combined -freduction-depth parameter. Setting it to 0 disbales the
check, which is now the recommended way to get (terminating) code to
typecheck in releases. (The number of reduction steps may well change between
minor GHC releases!)
This commit also introduces a new IntWithInf type in BasicTypes
that represents an integer+infinity. This type is used in a few
places throughout the code.
Tests in
indexed-types/should_fail/T7788
indexed-types/should_fail/T8550
indexed-types/should_fail/T9554
indexed-types/should_compile/T10079
indexed-types/should_compile/T10139
typecheck/should_compile/T10184 (expected broken)
typecheck/should_compile/T10185 (expected broken)
This commit also changes performance testsuite numbers, for the better.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Another bug in the #10164 series. Only Python 2.7 and up allow you to
omit the positional argument specifiers in format strings.
Test Plan: this fixes the Solaris builders
Reviewed By: kgardas
Differential Revision: https://phabricator.haskell.org/D750
GHC Trac Issues: #10164
|
|
|
|
|
|
|
| |
Turns out we've been a bit too lazy and quite a few undocumented changes have
accumulated in `base` relative to GHC 7.10's `base-4.8.0.0`...
[skip ci]
|
|
|
|
|
| |
We've accumulated enough to justify a minor version bump to 4.8.1.0,
but not enough to justify a major version bump yet as far as I can see.
|
| |
|
|
|
|
| |
[ci skip]
|
|
|
|
|
|
| |
The `configure` script checks for presence of `install-sh` even if
it's not used, so we simply add it to the distribution to make `configure`
happy.
|
|
|
|
|
|
| |
[skip ci]
(cherry picked from commit 7bd3efe3ccc6dc0a3ec84008285b4e03b48d8f41)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There were some flags of the RTS that when given an argument (which they
don't have) were not firing an error.
e.g -Targument when the flag -T has no argument.
Now this is an error and affects the following flags:
-B -w -T -Z -P -Pa -c -t
Signed-off-by: Carlos Tomé <carlostome1990@gmail.com>
Reviewed By: austin, thomie, hvr
Differential Revision: https://phabricator.haskell.org/D748
GHC Trac Issues: #9839
|
|
|
|
|
|
|
|
| |
Reviewers: austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D749
|
|
|
|
| |
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
|
|
|
| |
to not accidentially invalidate a strictness signature with a Diverges
result info. This seems to fix #10176.
Differential Revision: https://phabricator.haskell.org/D747
|
|
|
|
|
| |
originally provided by Neil Mitchell. Despite what he observed, I can
observe the bug even with all in one module.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In #9261, there was some confusion about the meaning of the taskCount
stats variable in the rts.
It turns out that taskCount is not decremented when a worker task is
stopped (i.e. from workerTaskStop), but only when freeMyTask is called,
which frees the task bound to the current thread. So taskCount is the
current number of bound tasks + the total number of worker tasks.
This makes the calculation of the current number of bound tasks in
rts/Stats.c correct _as is_.
[skip ci]
Reviewed By: austin
Differential Revision: https://phabricator.haskell.org/D746
|
|
|
|
|
|
| |
This fixes compilation under windows with pre-AMP GHCs
although it's not clear if bootstrapping GHC was affected.
(see https://github.com/judah/haskeline/issues/20 for details)
|
|
|
|
| |
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
|
|
|
|
|
| |
Removed a trailing `in` from the final line which caused a compilation
error. [skip ci]
Reviewed by: thomie
Differential Revision: https://phabricator.haskell.org/D744
|
|
|
|
| |
this submdoule updates pulls in only meta-data changes
|
| |
|
|
|
|
|
|
| |
[skip ci]
(cherry picked from commit 9d15af88b9b5cbf9dd4a4d072aa94540074cc4b3)
|
|
|
|
|
|
|
|
|
|
|
|
| |
This major version bump was made necessary by
f44333eae7bc7dc7b6003b75874a02445f6b633b which changed the type
signatures of prefetch primops, as well as other changes
such as 051d694fc978ad28ac3043d296cafddd3c2a7050 turning `Any` into
an abstract closed type family.
Reviewed By: ekmett
Differential Revision: https://phabricator.haskell.org/D743
|
|
|
|
|
|
|
| |
The TH output contains uniques which change too much.
So I took the length of the string instead. Crude,
perhaps too crude, but it'll still show up most significant
output changes
|
|
|
|
| |
This deepseq update drops the redundant ghc-prim dependency for GHC>=7.6
|
|
|
|
| |
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| | |
This update fixes #10165.
Signed-off-by: Austin Seipp <austin@well-typed.com>
|