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