| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
This moves all URL references to Trac tickets to their corresponding
GitLab counterparts.
|
|
|
|
|
| |
This eliminates most uses of run_command in the testsuite in favor of the more
structured makefile_test.
|
|
|
|
| |
This reverts commit 76c8fd674435a652c75a96c85abbf26f1f221876.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This contains two commits:
----
Make GHC's code-base compatible w/ `MonadFail`
There were a couple of use-sites which implicitly used pattern-matches
in `do`-notation even though the underlying `Monad` didn't explicitly
support `fail`
This refactoring turns those use-sites into explicit case
discrimations and adds an `MonadFail` instance for `UniqSM`
(`UniqSM` was the worst offender so this has been postponed for a
follow-up refactoring)
---
Turn on MonadFail desugaring by default
This finally implements the phase scheduled for GHC 8.6 according to
https://prime.haskell.org/wiki/Libraries/Proposals/MonadFail#Transitionalstrategy
This also preserves some tests that assumed MonadFail desugaring to be
active; all ghc boot libs were already made compatible with this
`MonadFail` long ago, so no changes were needed there.
Test Plan: Locally performed ./validate --fast
Reviewers: bgamari, simonmar, jrtc27, RyanGlScott
Reviewed By: bgamari
Subscribers: bgamari, RyanGlScott, rwbarton, thomie, carter
Differential Revision: https://phabricator.haskell.org/D5028
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Specifically:
* MonadFix
* MonadZip
* Data
* Foldable
* Traversable
* Eq1
* Ord1
* Read1
* Show1
* Generic
* Generic1
Fixes #15098.
Reviewers: RyanGlScott, hvr
Reviewed By: RyanGlScott
Subscribers: sjakobi, rwbarton, thomie, ekmett, carter
GHC Trac Issues: #15098
Differential Revision: https://phabricator.haskell.org/D4870
|
|
|
|
|
| |
This data type witnesses the lifting of a monoid into an applicative
pointwise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: ./validate
Reviewers: austin, hvr, bgamari, RyanGlScott
Reviewed By: RyanGlScott
Subscribers: RyanGlScott, rwbarton, thomie
GHC Trac Issues: #13115
Differential Revision: https://phabricator.haskell.org/D3938
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's not impossible that this will also get caught by another test given
a suitably configured compiler, but this is minimal enough that it seems
worth including.
Test Plan: Validate with `DYNAMIC_GHC_PROGRAMS=NO`
Reviewers: austin
Subscribers: rwbarton, thomie
GHC Trac Issues: #14129
Differential Revision: https://phabricator.haskell.org/D3924
|
|
|
|
|
|
| |
This is a preparatory refactoring for Semigroup=>Monoid
as it prevents a messy .hs-boot file which would interact
inconveniently with the buildsystem...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Annotations currently fail to type check if they annotation cannot
be loaded into ghci, such as when built with -fno-code.
Test Plan: ./validate
Reviewers: austin, bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie
GHC Trac Issues: #13818
Differential Revision: https://phabricator.haskell.org/D3701
|
|
|
|
|
|
|
|
|
|
|
|
| |
The script I used is included as testsuite/driver/kill_extra_files.py,
though at this point it is for mostly historical interest.
Some of the tests in libraries/hpc relied on extra_files.py, so this
commit includes an update to that submodule.
One test in libraries/process also relies on extra_files.py, but we
cannot update that submodule so easily, so for now we special-case it
in the test driver.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`(:~~:)`, the hetergeneous version of `(:~:)`, should have class
instances similar to those of `(:~:)`, especially since their
implementations aren't particularly tricky or surprising. This adds
them.
Reviewers: bgamari, austin, hvr, goldfire
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D3181
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: dfeuer, austin, hvr, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D3024
GHC Trac Issues: #13181
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The `clean_cmd` and `extra_clean` setup functions don't do anything.
Remove them from .T files.
Created using https://github.com/thomie/refactor-ghc-testsuite. This
diff is a test for the .T-file parser/processor/pretty-printer in that
repository.
find . -name '*.T' -exec ~/refactor-ghc-testsuite/Main "{}" \;
Tests containing inline comments or multiline strings are not modified.
Preparation for #12223.
Test Plan: Harbormaster
Reviewers: austin, hvr, simonmar, mpickering, bgamari
Reviewed By: mpickering
Subscribers: mpickering
Differential Revision: https://phabricator.haskell.org/D3000
GHC Trac Issues: #12223
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Fixes #12438. As discussed on the Haskell libraries mailing list here:
https://mail.haskell.org/pipermail/libraries/2016-November/027396.html
Reviewers: hvr, austin, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2726
GHC Trac Issues: #12438
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch does a raft of useful tidy-ups in the type checker.
I've been meaning to do this for some time, and finally made
time to do it en route to ICFP.
1. Modify TcType.ExpType to make a distinct data type,
InferResult for the Infer case, and consequential
refactoring.
2. Define a new function TcUnify.fillInferResult, to fill in
an InferResult. It uses TcMType.promoteTcType to promote
the type to the level of the InferResult.
See TcMType Note [Promoting a type]
This refactoring is in preparation for an improvement
to typechecking pattern bindings, coming next.
I flirted with an elaborate scheme to give better
higher rank inference, but it was just too complicated.
See TcMType Note [Promotion and higher rank types]
3. Add to InferResult a new field ir_inst :: Bool to say
whether or not the type used to fill in the
InferResult should be deeply instantiated. See
TcUnify Note [Deep instantiation of InferResult].
4. Add a TcLevel to SkolemTvs. This will be useful generally
- it's a fast way to see if the type
variable escapes when floating (not used yet)
- it provides a good consistency check when updating a
unification variable (TcMType.writeMetaTyVarRef, the
level_check_ok check)
I originally had another reason (related to the flirting
in (2), but I left it in because it seems like a step in
the right direction.
5. Reduce and simplify the plethora of uExpType,
tcSubType and related functions in TcUnify. It was
such an opaque mess and it's still not great, but it's
better.
6. Simplify the uo_expected field of TypeEqOrigin. Richard
had generatlised it to a ExpType, but it was almost always
a Check type. Now it's back to being a plain TcType which
is much, much easier.
7. Improve error messages by refraining from skolemisation when
it's clear that there's an error: see
TcUnify Note [Don't skolemise unnecessarily]
8. Type.isPiTy and isForAllTy seem to be missing a coreView check,
so I added it
9. Kill off tcs_used_tcvs. Its purpose is to track the
givens used by wanted constraints. For dictionaries etc
we do that via the free vars of the /bindings/ in the
implication constraint ic_binds. But for coercions we
just do update-in-place in the type, rather than
generating a binding. So we need something analogous to
bindings, to track what coercions we have added.
That was the purpose of tcs_used_tcvs. But it only
worked for a /single/ iteration, whereas we may have
multiple iterations of solving an implication. Look
at (the old) 'setImplicationStatus'. If the constraint
is unsolved, it just drops the used_tvs on the floor.
If it becomes solved next time round, we'll pick up
coercions used in that round, but ignore ones used in
the first round.
There was an outright bug. Result = (potentialy) bogus
unused-constraint errors. Constructing a case where this
actually happens seems quite trick so I did not do so.
Solution: expand EvBindsVar to include the (free vars of
the) coercions, so that the coercions are tracked in
essentially the same way as the bindings.
This turned out to be much simpler. Less code, more
correct.
10. Make the ic_binds field in an implication have type
ic_binds :: EvBindsVar
instead of (as previously)
ic_binds :: Maybe EvBindsVar
This is notably simpler, and faster to use -- less
testing of the Maybe. But in the occaional situation
where we don't have anywhere to put the bindings, the
belt-and-braces error check is lost. So I put it back
as an ASSERT in 'setImplicationStatus' (see the use of
'termEvidenceAllowed')
All these changes led to quite bit of error message wibbling
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds `Data.Bifoldable` and `Data.Bitraversable` from the
`bifunctors` package to `base`, completing the migration started in
D336. This is fairly straightforward, although there were a suprising
amount of reinternal organization in `base` that was needed for this to
happen:
* `Data.Foldable`, `Data.Traversable`, `Data.Bifoldable`, and
`Data.Bitraversable` share some nonexported datatypes (e.g., `StateL`,
`StateR`, `Min`, `Max`, etc.) to implement some instances. To avoid
code duplication, I migrated this internal code to a new hidden
module, `Data.Functor.Utils` (better naming suggestions welcome).
* `Data.Traversable` and `Data.Bitraversable` also make use of an
identity newtype, so I modified them to use
`Data.Functor.Identity.Identity`. This has a ripple effect on several
other modules, since I had to move instances around in order to avoid
dependency cycles.
Fixes #10448.
Reviewers: ekmett, hvr, austin, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2284
GHC Trac Issues: #9682, #10448
|
| |
|
|
|
|
|
|
|
|
|
| |
Instead of just profasm and profthreaded. And at least until
-fexternal-interpreter is the default.
Also:
* WAY=profc doesn't exist anymore.
* Omit all threaded_ways for conc039, not just a few.
|
|
|
|
| |
Refactoring only.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GHC.Generics provides several representation data types that have
obvious instances of various type classes in base, along with various
other types of meta-data (such as associativity and fixity).
Specifically, instances have been added for the following type classes
(where possible):
- Applicative
- Data
- Functor
- Monad
- MonadFix
- MonadPlus
- MonadZip
- Foldable
- Traversable
- Enum
- Bounded
- Ix
- Generic1
Thanks to ocharles for starting this!
Test Plan: Validate
Reviewers: ekmett, austin, hvr, bgamari
Reviewed By: bgamari
Subscribers: RyanGlScott, thomie
Differential Revision: https://phabricator.haskell.org/D1937
GHC Trac Issues: #9043
|
|
|
|
| |
This seems necessary after 9634e24 (#11569).
|
|
|
|
|
|
|
|
|
| |
Previously "types" was inappropriately made plural instead of
"instance",
instance Eq Ordering -- Defined in ‘GHC.Classes’
...plus 24 others
...plus 13 instance involving out-of-scope typess
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The idea here is described in [wiki:Typechecker]. Briefly,
this refactor keeps solid track of "synthesis" mode vs
"checking" in GHC's bidirectional type-checking algorithm.
When in synthesis mode, the expected type is just an IORef
to write to.
In addition, this patch does a significant reworking of
RebindableSyntax, allowing much more freedom in the types
of the rebindable operators. For example, we can now have
`negate :: Int -> Bool` and
`(>>=) :: m a -> (forall x. a x -> m b) -> m b`. The magic
is in tcSyntaxOp.
This addresses tickets #11397, #11452, and #11458.
Tests:
typecheck/should_compile/{RebindHR,RebindNegate,T11397,T11458}
th/T11452
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This re-working of the typechecker algorithm is based on
the paper "Visible type application", by Richard Eisenberg,
Stephanie Weirich, and Hamidhasan Ahmed, to be published at
ESOP'16.
This patch introduces -XTypeApplications, which allows users
to say, for example `id @Int`, which has type `Int -> Int`. See
the changes to the user manual for details.
This patch addresses tickets #10619, #5296, #10589.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
(Apologies for the size of this patch, I couldn't make a smaller one
that was validate-clean and also made sense independently)
(Some of this code is derived from GHCJS.)
This commit adds support for running interpreted code (for GHCi and
TemplateHaskell) in a separate process. The functionality is
experimental, so for now it is off by default and enabled by the flag
-fexternal-interpreter.
Reaosns we want this:
* compiling Template Haskell code with -prof does not require
building the code without -prof first
* when GHC itself is profiled, it can interpret unprofiled code, and
the same applies to dynamic linking. We would no longer need to
force -dynamic-too with TemplateHaskell, and we can load ordinary
objects into a dynamically-linked GHCi (and vice versa).
* An unprofiled GHCi can load and run profiled code, which means it
can use the stack-trace functionality provided by profiling without
taking the performance hit on the compiler that profiling would
entail.
Amongst other things; see
https://ghc.haskell.org/trac/ghc/wiki/RemoteGHCi for more details.
Notes on the implementation are in Note [Remote GHCi] in the new
module compiler/ghci/GHCi.hs. It probably needs more documenting,
feel free to suggest things I could elaborate on.
Things that are not currently implemented for -fexternal-interpreter:
* The GHCi debugger
* :set prog, :set args in GHCi
* `recover` in Template Haskell
* Redirecting stdin/stdout for the external process
These are all doable, I just wanted to get to a working validate-clean
patch first.
I also haven't done any benchmarking yet. I expect there to be slight hit
to link times for byte code and some penalty due to having to
serialize/deserialize TH syntax, but I don't expect it to be a serious
problem. There's also lots of low-hanging fruit in the byte code
generator/linker that we could exploit to speed things up.
Test Plan:
* validate
* I've run parts of the test suite with
EXTRA_HC_OPTS=-fexternal-interpreter, notably tests/ghci and tests/th.
There are a few failures due to the things not currently implemented
(see above).
Reviewers: simonpj, goldfire, ezyang, austin, alanz, hvr, niteria, bgamari, gibiansky, luite
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1562
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 547c597112954353cef7157cb0a389bc4f6303eb modifies the
pretty-printer to render names from a set of core packages (`base`,
`ghc-prim`, `template-haskell`) as unqualified. The idea here was that
many of these names typically are not in scope but are well-known by the
user and therefore qualification merely introduces noise.
This, however, is a very large hammer and potentially breaks any
consumer who relies on parsing GHC output (hence #11208). This commit
partially reverts this change, now only printing `Constraint` (which
appears quite often in errors) as unqualified.
Fixes #11208.
Updates tests in `array` submodule.
Test Plan: validate
Reviewers: hvr, thomie, austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1619
GHC Trac Issues: #11208
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This implements the ideas originally put forward in
"System FC with Explicit Kind Equality" (ICFP'13).
There are several noteworthy changes with this patch:
* We now have casts in types. These change the kind
of a type. See new constructor `CastTy`.
* All types and all constructors can be promoted.
This includes GADT constructors. GADT pattern matches
take place in type family equations. In Core,
types can now be applied to coercions via the
`CoercionTy` constructor.
* Coercions can now be heterogeneous, relating types
of different kinds. A coercion proving `t1 :: k1 ~ t2 :: k2`
proves both that `t1` and `t2` are the same and also that
`k1` and `k2` are the same.
* The `Coercion` type has been significantly enhanced.
The documentation in `docs/core-spec/core-spec.pdf` reflects
the new reality.
* The type of `*` is now `*`. No more `BOX`.
* Users can write explicit kind variables in their code,
anywhere they can write type variables. For backward compatibility,
automatic inference of kind-variable binding is still permitted.
* The new extension `TypeInType` turns on the new user-facing
features.
* Type families and synonyms are now promoted to kinds. This causes
trouble with parsing `*`, leading to the somewhat awkward new
`HsAppsTy` constructor for `HsType`. This is dispatched with in
the renamer, where the kind `*` can be told apart from a
type-level multiplication operator. Without `-XTypeInType` the
old behavior persists. With `-XTypeInType`, you need to import
`Data.Kind` to get `*`, also known as `Type`.
* The kind-checking algorithms in TcHsType have been significantly
rewritten to allow for enhanced kinds.
* The new features are still quite experimental and may be in flux.
* TODO: Several open tickets: #11195, #11196, #11197, #11198, #11203.
* TODO: Update user manual.
Tickets addressed: #9017, #9173, #7961, #10524, #8566, #11142.
Updates Haddock submodule.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now for unqualified imports. Improves upon #11071.
Unfortunately, it seems that since 7.10, ghc will not print all
out-of-scope errors.
Test Plan: test suite updated
Reviewers: austin, thomie, bgamari
Reviewed By: bgamari
Differential Revision: https://phabricator.haskell.org/D1478
GHC Trac Issues: #11071
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The idea here is that this gives a more detailed stack trace in two
cases:
1. With `-prof` and `-fprof-auto`
2. In GHCi (see #11047)
Example, with an error inserted in nofib/shootout/binary-trees:
```
$ ./Main 3
Main: z
CallStack (from ImplicitParams):
error, called at Main.hs:67:29 in main:Main
CallStack (from -prof):
Main.check' (Main.hs:(67,1)-(68,82))
Main.check (Main.hs:63:1-21)
Main.stretch (Main.hs:32:35-57)
Main.main.c (Main.hs:32:9-57)
Main.main (Main.hs:(27,1)-(43,42))
Main.CAF (<entire-module>)
```
This doesn't quite obsolete +RTS -xc, which also attempts to display
more information in the case when the error is in a CAF, but I'm
exploring other solutions to that.
Includes submodule updates.
Test Plan: validate
Reviewers: simonpj, ezyang, gridaphobe, bgamari, hvr, austin
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1426
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Amazingly, there were zero changes to the byte code generator and very
few changes to the interpreter - mainly because we've used good
abstractions that hide the differences between profiling and
non-profiling. So that bit was pleasantly straightforward, but there
were a pile of other wibbles to get the whole test suite through.
Note that a compiler built with -prof is now like one built with
-dynamic, in that to use TH you have to build the code the same way.
For dynamic, we automatically enable -dynamic-too when TH is required,
but we don't have anything equivalent for profiling, so you have to
explicitly use -prof when building code that uses TH with a profiled
compiler. For this reason Cabal won't work with TH. We don't expect
to ship a profiled compiler, so I think that's OK.
Test Plan: validate with GhcProfiled=YES in validate.mk
Reviewers: goldfire, bgamari, rwbarton, austin, hvr, erikd, ezyang
Reviewed By: ezyang
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1407
GHC Trac Issues: #4837, #545
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Improved error messages are only printed when the old message would be
"No instance for...", since they're not as helpful for "Could not deduce..."
No special test case as error messages are tested by other tests already.
Signed-off-by: David Kraeutmann <kane@kane.cx>
Reviewed By: austin, goldfire
Differential Revision: https://phabricator.haskell.org/D1182
GHC Trac Issues: #10733
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For now, this fails compliation immediately with an error. If desired, this
can be a warning that annotations in Safe Haskell are ignored.
Signed-off-by: David Kraeutmann <kane@kane.cx>
Reviewed By: goldfire, austin
Differential Revision: https://phabricator.haskell.org/D1226
GHC Trac Issues: #10826
|
|
|
|
|
|
|
|
|
|
| |
Summary: See Note [Displaying potential instances].
Reviewers: austin
Subscribers: KaneTW, thomie
Differential Revision: https://phabricator.haskell.org/D1176
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
addTopDecls restricts what declarations it can be used to add. Adding
annotations via this method works fine with no special changes apart
from adding AnnD to the declaration whitelist.
Test Plan: validate
Reviewers: austin, goldfire, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1201
GHC Trac Issues: #10486
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
* don't print anything to stdout
* add missing Makefile
* also ignore mk/ghcconfig*.mk when using installed compiler
* prevent warning: -rtsopts and -with-rtsopts have no effect with -shared
|
|
|
|
|
|
|
|
| |
GHC can't yest build a TypeRep for a type involving kind variables.
(We await kinds = types for that.) But the error message was terrible,
as fixing #10524 reminded me.
This improves it a lot.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This implements the new `Typeable` solver: when GHC sees `Typeable` constraints
it solves them on the spot.
The current implementation creates `TyCon` representations on the spot.
Pro: No overhead at all in code that does not use `Typeable`
Cons: Code that uses `Typeable` may create multipe `TyCon` represntations.
We have discussed an implementation where representations of `TyCons` are
computed once, in the module, where a datatype is declared. This would
lead to more code being generated: for a promotable datatype we need to
generate `2 + number_of_data_cons` type-constructro representations,
and we have to do that for all programs, even ones that do not intend to
use typeable.
I added code to emit warning whenevar `deriving Typeable` is encountered---
the idea being that this is not needed anymore, and shold be fixed.
Also, we allow `instance Typeable T` in .hs-boot files, but they result
in a warning, and are ignored. This last one was to avoid breaking exisitng
code, and should become an error, eventually.
Test Plan:
1. GHC can compile itself.
2. I compiled a number of large libraries, including `lens`.
- I had to make some small changes:
`unordered-containers` uses internals of `TypeReps`, so I had to do a 1 line fix
- `lens` needed one instance changed, due to a poly-kinded `Typeble` instance
3. I also run some code that uses `syb` to traverse a largish datastrucutre.
I didn't notice any signifiant performance difference between the 7.8.3 version,
and this implementation.
Reviewers: simonpj, simonmar, austin, hvr
Reviewed By: austin, hvr
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D652
GHC Trac Issues: #9858
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Add Functor instances for Dual, Sum and Product
Add Foldable instances for Dual, Sum and Product
Add Traversable instances for Dual, Sum and Product
Add Foldable and Traversable instances for First and Last
Add Applicative, Monad instances to Dual, Sum, Product
Add MonadFix to Data.Monoid wrappers
Derive Data for Identity
Add Data instances to Data.Monoid wrappers
Add Data (Alt f a) instance
Reviewers: ekmett, dfeuer, hvr, austin
Reviewed By: dfeuer, austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D673
GHC Trac Issues: #10107
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As Trac #10047 points out, a quasi-quotation [n|...blah...|] is supposed
to behave exactly like $(n "...blah..."). But it doesn't! This was outright
wrong: quasiquotes were being run even inside brackets.
Now that TH supports both typed and untyped splices, a quasi-quote is properly
regarded as a particular syntax for an untyped splice. But apart from that
they should be treated the same. So this patch refactors the handling of
quasiquotes to do just that.
The changes touch quite a lot of files, but mostly in a routine way.
The biggest changes by far are in RnSplice, and more minor changes in
TcSplice. These are the places where there was real work to be done.
Everything else is routine knock-on changes.
* No more QuasiQuote forms in declarations, expressions, types, etc.
So we get rid of these data constructors
* HsBinds.QuasiQuoteD
* HsExpr.HsSpliceE
* HsPat.QuasiQuotePat
* HsType.HsQuasiQuoteTy
* We get rid of the HsQuasiQuote type altogether
* Instead, we augment the HsExpr.HsSplice type to have three
consructors, for the three types of splice:
* HsTypedSplice
* HsUntypedSplice
* HsQuasiQuote
There are some related changes in the data types in HsExpr near HsSplice.
Specifically: PendingRnSplice, PendingTcSplice, UntypedSpliceFlavour.
* In Hooks, we combine rnQuasiQuoteHook and rnRnSpliceHook into one.
A smaller, clearer interface.
* We have to update the Haddock submodule, to accommodate the hsSyn changes
|
|
|
|
|
|
|
|
|
|
|
|
| |
In particular
In the type signature for:
f :: Int -> Int
I added the colon
Also reword the "maybe you haven't applied a function to enough arguments?"
suggestion to make grammatical sense.
These tiny changes affect a lot of error messages.
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: Compiled ghc fine. Opened ghci and fed it invalid code. It gave the improved error messages in response.
Reviewers: austin
Subscribers: thomie, simonpj, spacekitteh, rwbarton, simonmar, carter
Differential Revision: https://phabricator.haskell.org/D201
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The intent of this commit is to make test suite cases more stable, so that
it doesn't matter what order we load interface files in, the test output
doesn't change.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: simonpj, austin
Subscribers: thomie, carter
Differential Revision: https://phabricator.haskell.org/D484
|
|
|
|
| |
I this this arises from my de-orphaning the Enum Word instance
|
|
|
|
|
|
|
|
|
| |
It's a bit confusing to have .gitignore files spread all over the
filesystem. This commit tries to consolidate those into one .gitignore
file per component. Moreover, we try to describe files to be ignored which
happen to have a common identifying pattern by glob patterns.
Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
|
|
|
|
|
|
|
|
| |
I used this shell command to automatically generate the lists:
for i in `git ls-files -o --exclude-standard --directory`; do echo "`basename $i`" >> "`dirname "$i"`/.gitignore"; done
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
|
| |
|