Commit 411bd2df authored by Ryan Scott's avatar Ryan Scott Committed by Ben Gamari
Browse files

Describe symptoms of (and the cure for) #12768 in 8.0.2 release notes

GHC 8.0.2 introduced a bugfix involving GeneralizedNewtypeDeriving in
96d45145. This made typechecking of
GND-produced code a bit stricter, and an unfortunate side effect of this was
that there were a couple of corner-case programs that stopped compiling
when transitioning from GHC 8.0.1 to 8.0.2.

Since the number of affected programs seems quite small, and since the fix
is so straightforward, we opt to simply note this discrepancy in the 8.0.2
release notes.

Resolves #12768.

(cherry picked from commit ead83db8)
parent 8719d871
......@@ -25,6 +25,23 @@ Language
presence of :ghc-flag:`-XRebindableSyntax` and
:ghc-flag:`-XOverloadedStrings` (:ghc-ticket:`12688`).
- GHC is now a bit more strict in typechecking code generated by
:ghc-flag:`-XGeneralizedNewtypeDeriving`. For example, GHC will now reject
this program: ::
class C m where
foo :: C m => m ()
newtype N m a = N (m a)
deriving C -- This is now an error
This is in contrast to GHC 8.0.1 and earlier, which would accept this code.
To fix this code, simply remove the ``C m`` constraint from ``foo``, as it
is wholly unnecessary: ::
class C m where
foo :: m ()
- Some programs using :ghc-flag:`-XDefaultSignatures` that incorrectly
type-checked in GHC 8.0.1 are now rejected by GHC 8.0.2. See
:ghc-ticket:`12784` for details.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment