diff options
Diffstat (limited to 'testsuite/tests/typecheck/should_compile/ImplicitParamFDs.hs')
-rw-r--r-- | testsuite/tests/typecheck/should_compile/ImplicitParamFDs.hs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/ImplicitParamFDs.hs b/testsuite/tests/typecheck/should_compile/ImplicitParamFDs.hs new file mode 100644 index 0000000000..6ab7144803 --- /dev/null +++ b/testsuite/tests/typecheck/should_compile/ImplicitParamFDs.hs @@ -0,0 +1,17 @@ +{-# LANGUAGE ImplicitParams #-} + +module ImplicitParamFDs where + +import Data.Char + +bar :: (?x::Bool) => Bool +bar = ?x + +foo :: (?x::Int) => Bool +foo = let ?x = True in bar + +quux :: (?x :: Char) => (Int, Bool) +quux = (ord ?x, let ?x = True in ?x) + +flub :: (?x :: Int) => (Int, Integer) +flub = (?x, let ?x = 5 in ?x) |