|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Implement the "Embrace Type :: Type" GHC proposal,
.../ghc-proposals/blob/master/proposals/0020-no-type-in-type.rst
GHC 8.0 included a major change to GHC's type system: the Type :: Type
axiom. Though casual users were protected from this by hiding its
features behind the -XTypeInType extension, all programs written in GHC
8+ have the axiom behind the scenes. In order to preserve backward
compatibility, various legacy features were left unchanged. For example,
with -XDataKinds but not -XTypeInType, GADTs could not be used in types.
Now these restrictions are lifted and -XTypeInType becomes a redundant
flag that will be eventually deprecated.
* Incorporate the features currently in -XTypeInType into the
-XPolyKinds and -XDataKinds extensions.
* Introduce a new extension -XStarIsType to control how to parse * in
code and whether to print it in error messages.
Test Plan: Validate
Reviewers: goldfire, hvr, bgamari, alanz, simonpj
Reviewed By: goldfire, simonpj
Subscribers: rwbarton, thomie, mpickering, carter
GHC Trac Issues: #15195
Differential Revision: https://phabricator.haskell.org/D4748
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
See Trac #7854. Specifically:
* Major clean up and simplification of check_op in checkValidClass;
specifically
- use checkValidType on the entire method-selector type to detect
ambiguity
- put a specific test for -XConstrainedClassMethods
* Make -XConstrainedClassMethods be implied by -XMultiParamTypeClasses
(a bit ad-hoc but see #7854), and document in the user manual.
* Do the checkAmbiguity test just once in TcValidity.checkValidType,
rather than repeatedly at every level. See Note [When to call checkAmbiguity]
* Add -XAllowAmbiguousTypes in GHC.IP, since 'ip' really is ambiguous.
(It's a rather magic function.)
* Improve location info for check_op in checkValidClass
* Update quite a few tests, which had genuinely-ambiguous class
method signatures. Some I fixed by making them unambiguous; some
by adding -XAllowAmbiguousTypes
|