Commit d2c76332 authored by Ian Lynagh's avatar Ian Lynagh
Browse files

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

Test is drvfail013
parent 185965f6
...@@ -11,3 +11,4 @@ test('drvfail009', normal, compile_fail, ['']) ...@@ -11,3 +11,4 @@ test('drvfail009', normal, compile_fail, [''])
test('drvfail010', normal, compile_fail, ['']) test('drvfail010', normal, compile_fail, [''])
test('drvfail011', normal, compile_fail, ['']) test('drvfail011', normal, compile_fail, [''])
test('drvfail012', normal, compile_fail, ['']) test('drvfail012', normal, compile_fail, [''])
test('drvfail013', normal, compile_fail, [''])
-- 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
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))
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