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

Add more parse error tests for #3811

parent 96a5e89f
module T3811c where
data D = D
instance !Show D
T3811c.hs:6:10: Malformed instance header: !Show D
module T3811d where
data D a = D a
class C b (D Char) b
T3811d.hs:6:11:
Type found: D Char
where type variable expected, in: b (D Char) b
{-# LANGUAGE NoDatatypeContexts #-}
module T3811e where
data (Show a, Read a) => D a = D a
T3811e.hs:6:6:
Illegal datatype context (use -XDatatypeContexts): (Show a,
Read a) =>
T3811f.hs:4:7: Malformed head of type or class declaration: !Foo a
module T3811g where
f :: IO ()
f = do _ <- return ()
_ <- return ()
T3811g.hs:6:8:
The last statement in a 'do' construct must be an expression:
_ <- return ()
......@@ -65,4 +65,9 @@ test('T1344b', normal, compile_fail, [''])
test('T1344c', normal, compile_fail, [''])
test('T3811', normal, compile_fail, [''])
test('T3811b', normal, compile_fail, [''])
test('T3811c', normal, compile_fail, [''])
test('T3811d', normal, compile_fail, [''])
test('T3811e', normal, compile_fail, [''])
test('T3811f', normal, compile_fail, [''])
test('T3811g', normal, compile_fail, [''])
test('NoDoAndIfThenElse', normal, compile_fail, [''])
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