Commit 0349d0be authored by chak@cse.unsw.edu.au.'s avatar chak@cse.unsw.edu.au.
Browse files

Type families: tests excluding type families in left hand sides

parent 9ae96c09
......@@ -3,5 +3,6 @@
module ShouldFail where
type family C a :: *
-- must fail: rhs is not a tau type
type instance C Int = forall a. [a]
{-# OPTIONS -ftype-families -fglasgow-exts #-}
module ShouldFail where
type family C a :: *
data family D a :: *
-- must fail: lhs contains a type family application
data instance D [C a] = DC
type family E a :: *
-- must fail: lhs contains a type family application
type instance E [C a] = Int
Simple13.hs:9:0:
Illegal type family application in type instance: C a
Simple13.hs:13:0:
Illegal type family application in type instance: C a
......@@ -19,6 +19,7 @@ test('Simple11b', normal, compile_fail, [''])
test('Simple11c', normal, compile_fail, [''])
test('Simple11d', normal, compile_fail, [''])
test('Simple12', normal, compile_fail, [''])
test('Simple13', normal, compile_fail, [''])
test('Over', normal, multimod_compile_fail, ['OverD', '-no-hs-main -no-link'])
clean(['OverA.hi', 'OverA.o', 'OverB.hi', 'OverB.o', 'OverC.hi', 'OverC.o'])
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