Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add a test for trac #1588: unrequested generalized newtype deriving?

Test is drvfail013
  • Loading branch information...
commit a654d4f5759ad662395a4ef85f03bd97a7955ea9 1 parent 51f47de
@igfoo igfoo authored
View
1  tests/ghc-regress/deriving/should_fail/all.T
@@ -11,3 +11,4 @@ test('drvfail009', normal, compile_fail, [''])
test('drvfail010', normal, compile_fail, [''])
test('drvfail011', normal, compile_fail, [''])
test('drvfail012', normal, compile_fail, [''])
+test('drvfail013', normal, compile_fail, [''])
View
6 tests/ghc-regress/deriving/should_fail/drvfail013.hs
@@ -0,0 +1,6 @@
+
+-- Test for trac #1588: unrequested generalized newtype deriving?
+
+newtype MaybeT m a = MaybeT { runMaybeT :: m (Maybe a) } deriving Eq
+
+data MaybeT' m a = MaybeT' { runMaybeT' :: m (Maybe a) } deriving Eq
View
14 tests/ghc-regress/deriving/should_fail/drvfail013.stderr
@@ -0,0 +1,14 @@
+
+drvfail013.hs:4:0:
+ No instance for (Eq (m (Maybe a)))
+ arising from the 'deriving' clause of a data type declaration
+ at drvfail013.hs:4:0-70
+ Possible fix: add an instance declaration for (Eq (m (Maybe a)))
+ When deriving the instance for (Eq (MaybeT m a))
+
+drvfail013.hs:6:0:
+ No instance for (Eq (m (Maybe a)))
+ arising from the 'deriving' clause of a data type declaration
+ at drvfail013.hs:6:0-70
+ Possible fix: add an instance declaration for (Eq (m (Maybe a)))
+ When deriving the instance for (Eq (MaybeT' m a))
Please sign in to comment.
Something went wrong with that request. Please try again.