summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_run/tcrun012.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/typecheck/should_run/tcrun012.hs')
-rw-r--r--testsuite/tests/typecheck/should_run/tcrun012.hs15
1 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_run/tcrun012.hs b/testsuite/tests/typecheck/should_run/tcrun012.hs
new file mode 100644
index 0000000000..a3c946a24e
--- /dev/null
+++ b/testsuite/tests/typecheck/should_run/tcrun012.hs
@@ -0,0 +1,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
+