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

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

index 461058e..47472eb 100644 (file)
@@ -1,6 +1,6 @@
 {-# OPTIONS -fglasgow-exts #-}
 
--- Implicit Parameters
+-- !!! 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.
diff --git a/ghc/tests/typecheck/should_compile/tc122.hs b/ghc/tests/typecheck/should_compile/tc122.hs
new file mode 100644 (file)
index 0000000..2c68c12
--- /dev/null
@@ -0,0 +1,18 @@
+{-# OPTIONS -fglasgow-exts #-}
+
+-- !!! Implicit Parameters
+
+-- GHC 5.00 doesn't handle this:
+
+--  Could not deduce `?wibble :: t' from the context ()
+--  Probable fix:
+--      Add `?wibble :: t' to the banding(s) for {y}
+--  Or add an instance declaration for `?wibble :: t'
+--  arising from use of implicit parameter `?wibble' at tc122.hs:18
+--  in the definition of function `y': wibble
+
+
+module ShouldCompile where
+
+x () = y
+    where y = ?wibble