From: simonpj Date: Thu, 3 May 2001 12:30:35 +0000 (+0000) Subject: [project @ 2001-05-03 12:30:35 by simonpj] X-Git-Tag: Approximately_9120_patches~2009 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=1b56645432591432812fc53031ef9d8e402753d1;p=ghc-hetmet.git [project @ 2001-05-03 12:30:35 by simonpj] Add another IP test --- diff --git a/ghc/tests/typecheck/should_compile/tc127.hs b/ghc/tests/typecheck/should_compile/tc127.hs new file mode 100644 index 0000000..815ed5c --- /dev/null +++ b/ghc/tests/typecheck/should_compile/tc127.hs @@ -0,0 +1,27 @@ +{-# OPTIONS -fglasgow-exts #-} + +-- !!! Another implicit parameter test, from Alastair Reid + +module ShouldCompile where + +import Maybe + +type Env = ([(String,Int)],Int) + +ident1 :: (?env :: Env) => String -> Int +ident1 x = y + where + env = ?env + y = fromJust (lookup x (fst env)) + +ident2 :: (?env :: Env) => String -> Int +ident2 x = y + where + y = fromJust (lookup x (fst ?env)) + + +-- Two more tests from Jeff Lewis +x () = y where y = ?wibble + +f () = ?wibble :: Int +g () = f ()