Commit 9767f141 authored by simonpj's avatar simonpj
Browse files

[project @ 2003-01-23 14:30:25 by simonpj]

Add two new deriving tests
parent 65f38b66
......@@ -3,4 +3,6 @@ test('drvfail001', normal, compile_fail, [''])
test('drvfail002', normal, compile_fail, [''])
test('drvfail003', normal, compile_fail, [''])
test('drvfail004', normal, compile_fail, [''])
test('drvfail005', normal, compile_fail, [''])
test('drvfail006', normal, compile_fail, [''])
test('drvfail007', normal, compile_fail, [''])
module ShouldFail where
data Test a = T a
deriving( Show a, Read )
Can't make a derived instance of `Show a (Test a)'
(`Show a' is not a class)
When deriving instances for type `Test'
{-# OPTIONS -fglasgow-exts #-}
-- Testing the newtype-deriving stuff
module ShouldFail where
import Control.Monad.State
newtype T a = T (StateT Int IO a) deriving( MonadState )
-- Here MonadState takes two type params,
-- but exactly one is needed.
\ No newline at end of file
Supports Markdown
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