summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-regress/typecheck/should_run/tcrun012.hs
blob: a3c946a24e50cc08749fd07f0a928fc529c5e630 (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