blob: f994df3a4f54d1e830adf85a60878853e5facf44 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
{-# LANGUAGE ImplicitParams, Rank2Types #-}
-- !!! Implicit parameters, and Rank-2 types
-- This one made the 5.00.1 not print anything
module Main where
foo :: ((?x :: Int) => IO a) -> Int -> IO a
-- Note the rank2 type
foo s z = do let ?x = z in s -- Should pick up ?x = z
let ?x = z+3 in s -- Ditto z+3
main = foo (print ?x) 42
|