[project @ 2001-05-03 08:47:06 by simonpj]
authorsimonpj <unknown>
Thu, 3 May 2001 08:47:06 +0000 (08:47 +0000)
committersimonpj <unknown>
Thu, 3 May 2001 08:47:06 +0000 (08:47 +0000)
Add implicit param test

ghc/tests/typecheck/should_run/tcrun012.hs [new file with mode: 0644]
ghc/tests/typecheck/should_run/tcrun012.stdout [new file with mode: 0644]

diff --git a/ghc/tests/typecheck/should_run/tcrun012.hs b/ghc/tests/typecheck/should_run/tcrun012.hs
new file mode 100644 (file)
index 0000000..aca84ad
--- /dev/null
@@ -0,0 +1,15 @@
+{-# OPTIONS -fglasgow-exts #-}
+
+-- !!! Implicit parameter test
+
+module Main where
+
+main = do { putStrLn $ show $ foo with ?x = 13 
+         ; putStrLn $ show $ baz () with ?x = 14 }
+
+foo :: (?x :: Int) => Int
+foo = ?x
+
+-- Check that defaulting works too
+baz () = ?x
+
diff --git a/ghc/tests/typecheck/should_run/tcrun012.stdout b/ghc/tests/typecheck/should_run/tcrun012.stdout
new file mode 100644 (file)
index 0000000..df9e19c
--- /dev/null
@@ -0,0 +1,2 @@
+13
+14