diff options
Diffstat (limited to 'testsuite/tests/deriving/should_compile/T14339.hs')
-rw-r--r-- | testsuite/tests/deriving/should_compile/T14339.hs | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/testsuite/tests/deriving/should_compile/T14339.hs b/testsuite/tests/deriving/should_compile/T14339.hs index e2521f2de0..098b6e829a 100644 --- a/testsuite/tests/deriving/should_compile/T14339.hs +++ b/testsuite/tests/deriving/should_compile/T14339.hs @@ -5,9 +5,6 @@ module Bug where import GHC.TypeLits -newtype Baz = Baz Foo - deriving Bar - newtype Foo = Foo Int class Bar a where @@ -15,3 +12,14 @@ class Bar a where instance (TypeError (Text "Boo")) => Bar Foo where bar = undefined + +newtype Baz = Baz Foo + deriving Bar + +-- Apparently we derive +-- instance TypeError (Text "Boo") => Bar Baz +-- +-- Is that really what we want? It defers the type +-- error... surely we should use standalone deriving +-- if that is what we want? +-- See GHC.Tc.Validity.validDerivPred and #22696.
\ No newline at end of file |