From 8e2456cc3835f5c3776ce2805182791c0fcf8102 Mon Sep 17 00:00:00 2001 From: simonpj Date: Thu, 3 May 2001 08:47:06 +0000 Subject: [PATCH] [project @ 2001-05-03 08:47:06 by simonpj] Add implicit param test --- ghc/tests/typecheck/should_run/tcrun012.hs | 15 +++++++++++++++ ghc/tests/typecheck/should_run/tcrun012.stdout | 2 ++ 2 files changed, 17 insertions(+) create mode 100644 ghc/tests/typecheck/should_run/tcrun012.hs create mode 100644 ghc/tests/typecheck/should_run/tcrun012.stdout 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 -- 1.7.10.4