diff options
author | RyanGlScott <ryan.gl.scott@gmail.com> | 2016-04-10 22:59:37 +0200 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2016-04-10 23:41:16 +0200 |
commit | 7443e5c8dae24b83f5f4975c7accce02b819029c (patch) | |
tree | 80d9030b79ca386636916fc9f7a2cdd629d437d0 /docs | |
parent | ad532ded871a9a5180388a2b7cdbdc26e053284c (diff) | |
download | haskell-7443e5c8dae24b83f5f4975c7accce02b819029c.tar.gz |
Remove the instantiation check when deriving Generic(1)
Previously, deriving `Generic(1)` bailed out when attempting to
instantiate visible type parameters (#5939), but this instantiation
check was quite fragile and doesn't interact well with `-XTypeInType`.
It has been decided that `Generic(1)` shouldn't be subjected to this
check anyway, so it has been removed, and `gen_Generic_binds`'s
machinery has been updated to substitute the type variables in a
generated `Rep`/`Rep1` instance with the user-supplied type arguments.
In addition, this also refactors `Condition` in `TcDeriv` a bit. Namely,
since we no longer need `tc_args` to check any conditions, the `[Type]`
component of `Condition` has been removed.
Fixes #11732.
Test Plan: ./validate
Reviewers: goldfire, kosmikus, simonpj, bgamari, austin
Reviewed By: simonpj, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2061
GHC Trac Issues: #5939, #11732
Diffstat (limited to 'docs')
-rw-r--r-- | docs/users_guide/8.0.1-notes.rst | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/docs/users_guide/8.0.1-notes.rst b/docs/users_guide/8.0.1-notes.rst index fe77bf42c0..2e22f44e08 100644 --- a/docs/users_guide/8.0.1-notes.rst +++ b/docs/users_guide/8.0.1-notes.rst @@ -85,7 +85,7 @@ Language kinds, along with kind families and type-level GADTs. Support is still experimental, and it is expected to improve over the next several releases. See :ref:`type-in-type` for the details. - + - The parser now supports Haddock comments on GADT data constructors. For example :: @@ -336,6 +336,13 @@ Compiler - :ghc-flag:`-ddump-strsigs` has been renamed to :ghc-flag:`-ddump-str-signatures`. +- :ghc-flag:`-XDeriveGeneric` is now less picky about instantiating type + arguments when deriving (:ghc-ticket:`11732`). As a consequence, the + following code is now legal (whereas before it would have been rejected). :: + + data T a b = T a b + deriving instance Generic (T Int b) + GHCi ~~~~ |