Commit ead83db8 authored by Ryan Scott's avatar Ryan Scott

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.
parent 630d8817
......@@ -29,6 +29,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 ()
Compiler
~~~~~~~~
......
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