From: lewie Date: Wed, 11 Apr 2001 18:23:32 +0000 (+0000) Subject: [project @ 2001-04-11 18:23:32 by lewie] X-Git-Tag: Approximately_9120_patches~2166 X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=86f07c03c07735a160302b92f8ee77529fc02f03 [project @ 2001-04-11 18:23:32 by lewie] Another implicit param test. --- diff --git a/ghc/tests/typecheck/should_compile/tc121.hs b/ghc/tests/typecheck/should_compile/tc121.hs index 461058e..47472eb 100644 --- a/ghc/tests/typecheck/should_compile/tc121.hs +++ b/ghc/tests/typecheck/should_compile/tc121.hs @@ -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 index 0000000..2c68c12 --- /dev/null +++ b/ghc/tests/typecheck/should_compile/tc122.hs @@ -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