[project @ 2001-04-11 18:10:16 by lewie]
authorlewie <unknown>
Wed, 11 Apr 2001 18:10:16 +0000 (18:10 +0000)
committerlewie <unknown>
Wed, 11 Apr 2001 18:10:16 +0000 (18:10 +0000)
Add implicit param test.

ghc/tests/typecheck/should_compile/tc121.hs [new file with mode: 0644]

diff --git a/ghc/tests/typecheck/should_compile/tc121.hs b/ghc/tests/typecheck/should_compile/tc121.hs
new file mode 100644 (file)
index 0000000..461058e
--- /dev/null
@@ -0,0 +1,18 @@
+{-# OPTIONS -fglasgow-exts #-}
+
+-- Implicit Parameters
+
+-- If the implicit param isn't recognized as a PredType, x and y
+-- will be inferred to have two params instead of one.
+
+module ShouldCompile where
+
+x () = ?wibble
+
+y () = x ()
+
+same :: a -> a -> b
+same x y = undefined
+
+a () = same x id
+b () = same y id