From: simonpj Date: Thu, 3 May 2001 08:47:06 +0000 (+0000) Subject: [project @ 2001-05-03 08:47:06 by simonpj] X-Git-Tag: Approximately_9120_patches~2023 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=8e2456cc3835f5c3776ce2805182791c0fcf8102;p=ghc-hetmet.git [project @ 2001-05-03 08:47:06 by simonpj] Add implicit param test --- diff --git a/ghc/tests/typecheck/should_run/tcrun012.hs b/ghc/tests/typecheck/should_run/tcrun012.hs new file mode 100644 index 0000000..aca84ad --- /dev/null +++ b/ghc/tests/typecheck/should_run/tcrun012.hs @@ -0,0 +1,15 @@ +{-# OPTIONS -fglasgow-exts #-} + +-- !!! Implicit parameter test + +module Main where + +main = do { putStrLn $ show $ foo with ?x = 13 + ; putStrLn $ show $ baz () with ?x = 14 } + +foo :: (?x :: Int) => Int +foo = ?x + +-- Check that defaulting works too +baz () = ?x + diff --git a/ghc/tests/typecheck/should_run/tcrun012.stdout b/ghc/tests/typecheck/should_run/tcrun012.stdout new file mode 100644 index 0000000..df9e19c --- /dev/null +++ b/ghc/tests/typecheck/should_run/tcrun012.stdout @@ -0,0 +1,2 @@ +13 +14