Commit 5acd938f authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Add test for Trac #1072

parent bd0625f3
module Tc239_Help ( WrapIO, WrapIO2 ) where
newtype WrapIO e a = MkWrapIO { unwrap :: IO a }
type WrapIO2 a = WrapIO String a
instance Monad (WrapIO e) where
return x = MkWrapIO (return x)
m >>= f = MkWrapIO (do x <- unwrap m
unwrap (f x) )
fail str = error str
\ No newline at end of file
......@@ -252,6 +252,9 @@ test('tc236', expect_fail_if_compiler_lt('ghc', '6.9'), compile, [''])
test('tc237', normal, compile, [''])
test('tc238', normal, compile, [''])
test('tc239', extra_clean(['Tc239_Help.hi', 'Tc239_Help.o']),
multimod_compile, ['tc239', '-v0'])
test('FD1', namebase_if_compiler_lt('ghc','6.9', 'FD1-6.8'), compile_fail, [''])
test('FD2', normal, compile_fail, [''])
test('FD3', normal, compile_fail, [''])
......
-- Trac #1072
module ShouldCompile where
import Tc239_Help
f1 :: Show a => WrapIO e a
f1 = return undefined
f2 :: Show a => WrapIO2 a
f2 = f1
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