summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_run/tcrun023.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/typecheck/should_run/tcrun023.hs')
-rw-r--r--testsuite/tests/typecheck/should_run/tcrun023.hs13
1 files changed, 13 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_run/tcrun023.hs b/testsuite/tests/typecheck/should_run/tcrun023.hs
new file mode 100644
index 0000000000..3a6166b015
--- /dev/null
+++ b/testsuite/tests/typecheck/should_run/tcrun023.hs
@@ -0,0 +1,13 @@
+{-# LANGUAGE ImplicitParams #-}
+
+-- Implicit parameters should not give rise to ambiguity.
+
+module Main (main) where
+
+foo :: (?x :: [a]) => Int -> String
+foo n = show (n + length ?x)
+
+
+main = do { putStrLn (let ?x = [True,False] in foo 3) ;
+ putStrLn (let ?x = "fred" in foo 4) }
+