From 86f07c03c07735a160302b92f8ee77529fc02f03 Mon Sep 17 00:00:00 2001 From: lewie Date: Wed, 11 Apr 2001 18:23:32 +0000 Subject: [PATCH] [project @ 2001-04-11 18:23:32 by lewie] Another implicit param test. --- ghc/tests/typecheck/should_compile/tc121.hs | 2 +- ghc/tests/typecheck/should_compile/tc122.hs | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 ghc/tests/typecheck/should_compile/tc122.hs 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 -- 1.7.10.4