diff options
Diffstat (limited to 'testsuite/tests/typecheck/should_fail/tcfail178.hs')
-rw-r--r-- | testsuite/tests/typecheck/should_fail/tcfail178.hs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_fail/tcfail178.hs b/testsuite/tests/typecheck/should_fail/tcfail178.hs new file mode 100644 index 0000000000..8071def02e --- /dev/null +++ b/testsuite/tests/typecheck/should_fail/tcfail178.hs @@ -0,0 +1,19 @@ +-- See Trac #1221 + +module ShouldFail where + +a :: Num a => (Bool -> [a]) -> [a] +a x = x True ++ [1] + +y :: b -> () +y = const () + +-- Typechecks ok +b = a (const [2]) + +-- This one had an uninformative error message +c = a y + +-- More informative +d = a () + |