diff options
Diffstat (limited to 'testsuite/tests/typecheck/should_compile/tc101.hs')
-rw-r--r-- | testsuite/tests/typecheck/should_compile/tc101.hs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/tc101.hs b/testsuite/tests/typecheck/should_compile/tc101.hs new file mode 100644 index 0000000000..7ae95d53f5 --- /dev/null +++ b/testsuite/tests/typecheck/should_compile/tc101.hs @@ -0,0 +1,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) |