blob: e39444ce00c15b93f85e3854f311aba8b69f12d0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
{-# LANGUAGE ImplicitParams #-}
-- !!! Implicit parameter test
module Main where
main = do { let ?x = 13 in putStrLn $ show $ foo
; let ?x = 14 in putStrLn $ show $ baz () }
foo :: (?x :: Int) => Int
foo = ?x
-- Check that defaulting works too
baz () = ?x
|