summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail/tcfail178.hs
blob: 74174ce249c68729f3fc6f8d6990796753b23c6c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
-- See #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 ()