summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/tc101.hs
blob: d2c7958facfa4aae8aaabcc0d6ed94655bc41b0e (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 GHC.Tc.Utils.Unify.uUnboundVar and is documented there.

type A a = ()

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

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