• JohnWiegley's avatar
    Improve error message for newtypes and deriving clauses · 4f80ec0e
    JohnWiegley authored
    Change the error message generated when a deriving clause related to a newtype
    fails to always suggested trying GeneralizedNewtypeDeriving, even in
    situations where it may not work. Fixes #9600.
    Test Plan: testsuite/deriving/should_fail/9600.hs
    Reviewers: austin, bgamari, simonpj
    Rebased-by: bgamari
    Reviewed By: simonpj
    Subscribers: bgamari, hvr, simonmar, carter
    Differential Revision: https://phabricator.haskell.org/D216
    GHC Trac Issues: #9600
TcDeriv.hs 91.7 KB