diff options
author | lewie <unknown> | 2001-04-11 18:23:32 +0000 |
---|---|---|
committer | lewie <unknown> | 2001-04-11 18:23:32 +0000 |
commit | 86f07c03c07735a160302b92f8ee77529fc02f03 (patch) | |
tree | 3c891a45871d6c1737c3a42e265c5233586995b2 /ghc/tests | |
parent | dabf228557652cff050924cdc669450c0ece0f76 (diff) | |
download | haskell-86f07c03c07735a160302b92f8ee77529fc02f03.tar.gz |
[project @ 2001-04-11 18:23:32 by lewie]
Another implicit param test.
Diffstat (limited to 'ghc/tests')
-rw-r--r-- | ghc/tests/typecheck/should_compile/tc121.hs | 2 | ||||
-rw-r--r-- | ghc/tests/typecheck/should_compile/tc122.hs | 18 |
2 files changed, 19 insertions, 1 deletions
diff --git a/ghc/tests/typecheck/should_compile/tc121.hs b/ghc/tests/typecheck/should_compile/tc121.hs index 461058efac..47472eb503 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 0000000000..2c68c12faf --- /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 |