summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/tc101.hs
blob: 7ae95d53f5f35073420ba1ecd7bccd979f2aff59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
-- !!! Caused ghc-4.04proto to loop!
-- !!! (as reported by Sigbjorn)

module ShouldCompile where

-- This made the compiler (4.04 proto) loop (stack overflow)
-- The bug was in TcUnify.uUnboundVar and is documented there.

type A a = ()

f :: (A a -> a -> ()) -> ()
f = \ _ -> ()

x :: ()
x = f (\ x p -> p x)