summaryrefslogtreecommitdiff
path: root/testsuite/tests/simplCore/should_run/T7101.hs
blob: d6f22b5611814ad9ca2c999efc974f03b1ac2633 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
{-# LANGUAGE ImplicitParams, RankNTypes #-}

module Main where

f :: (?x :: Int) => ((?x :: Int) => Int) -> Bool -> Int  
f g False = g  
f g True = let ?x = ?x + 1
           in f g False

h :: (?x :: Int) => Int
h = ?x

main :: IO ()
main = print (let ?x = 0 in f h True)