Commit 29c623e3 authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Test Trac #1606

parent f656d8a5
......@@ -169,3 +169,4 @@ test('tcfail181', normal, compile_fail, [''])
test('tcfail182', normal, compile_fail, [''])
test('tcfail183', normal, compile_fail, [''])
test('tcfail184', normal, compile_fail, [''])
test('tcfail185', normal, compile_fail, [''])
-- See Trac #1606
module ShouldFail where
f :: Int -> Int -> Bool -> Bool -> Int -> Int
f a b = \ x y -> let { y1 = y; y2 = y1; y3 = y2; y4 = y3; y5 = y4;
y6 = y5; y7 = y6 } in x
tcfail185.hs:7:31:
Couldn't match expected type `Int -> Int'
against inferred type `Bool'
In the expression:
let
y1 = y
y2 = y1
y3 = y2
....
in x
In the expression:
\ x y
-> let
y1 = ...
....
in x
In the definition of `f': f a b = \ x y -> let ... in x
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