summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail/too-many.hs
blob: e3a4e2ba04029e9219d4491dffe3d4b4816fe455 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
module TooMany where

foo :: (Int -> Int -> Bool) -> Int
foo = error "urk"

f1 :: Int -> Int -> Int -> Bool
f1 = f1

g1 = foo (f1 2 3)
     -- Here is is sensible to report
     -- f1 is applied to too many arguments

f2 :: Int -> Bool
f2 = f2

g2 = foo (f2 2)
     -- Here is is /not/ sensible to report
     -- f2 is applied to too many arguments