Testsuite: tabs -> spaces [skip ci]
[ghc.git] / testsuite / tests / typecheck / should_run / tcrun019.hs
1 {-# LANGUAGE ImplicitParams, RankNTypes #-}
2
3 -- GHC 5.02 got this one wrong.
4
5 module Main where
6
7 -- Implicit parameters bug
8 -- mbs@cse.ogi.edu 24-Oct-2001 22:21:27
9
10 f :: (?x :: Int) => ((?x :: Int) => Int) -> Int -> Int
11 f g y = if y == 0
12 then g
13 else let ?x = ?x + 1
14 in f g (y - 1)
15
16 h :: (?x :: Int) => Int
17 h = ?x
18
19 main = print (let ?x = 0 in f h 10)
20 -- The result should be 10!
21