summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-regress/typecheck/should_compile/tc129.hs
diff options
context:
space:
mode:
authorsimonpj <unknown>2001-06-25 12:54:59 +0000
committersimonpj <unknown>2001-06-25 12:54:59 +0000
commit172201a482e23dd4a61359a8625f0e50556b8bf4 (patch)
treec52b638c08f8624bec25c35f19031e69a6c74e92 /testsuite/tests/ghc-regress/typecheck/should_compile/tc129.hs
parent34a5daae6402706cf57983bda739bb3d48aaa182 (diff)
downloadhaskell-172201a482e23dd4a61359a8625f0e50556b8bf4.tar.gz
[project @ 2001-06-25 12:54:59 by simonpj]
Add an implicit-parameter test
Diffstat (limited to 'testsuite/tests/ghc-regress/typecheck/should_compile/tc129.hs')
-rw-r--r--testsuite/tests/ghc-regress/typecheck/should_compile/tc129.hs15
1 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/tests/ghc-regress/typecheck/should_compile/tc129.hs b/testsuite/tests/ghc-regress/typecheck/should_compile/tc129.hs
new file mode 100644
index 0000000000..0fb623daaf
--- /dev/null
+++ b/testsuite/tests/ghc-regress/typecheck/should_compile/tc129.hs
@@ -0,0 +1,15 @@
+-- !!! Test inheritance of implicit parameters.
+-- GHC 5.00.2 fails this test
+
+-- The thing is to do with whether an implicit parameter
+-- constraint can be "inherited". See notes in TcSimplify.lhs
+
+module ShouldCompile where
+
+data R = R {f :: Int}
+
+foo :: (?x :: Int) => R -> R
+foo r = r {f = ?x}
+
+baz = (?x +1) :: Int
+