Commit fdbc137b authored by simonpj's avatar simonpj
Browse files

Test for Trac #2414

parent aa96c28f
-- Test for Trac #2414
-- Should provoke an occurs-check error
module ShouldFail where
unfoldr :: (b -> Maybe (Bool, b)) -> Bool
unfoldr = unfoldr
f = unfoldr Just
Occurs check: cannot construct the infinite type: b = (Bool, b)
Expected type: b
Inferred type: (Bool, b)
In the first argument of `unfoldr', namely `Just'
In the expression: unfoldr Just
......@@ -195,3 +195,4 @@ test('tcfail202', normal, compile_fail, [''])
test('T1899', normal, compile_fail, [''])
test('T2126', normal, compile_fail, [''])
test('T2307', normal, compile_fail, [''])
test('T2414', normal, compile_fail, [''])
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