[commit: ghc] wip/spj-tc-branch2: Test Trac #12507 (03e6959)
git at git.haskell.org
git at git.haskell.org
Thu Sep 29 10:36:01 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/spj-tc-branch2
Link : http://ghc.haskell.org/trac/ghc/changeset/03e69590fb6834bf3997c02148f0e6313749b682/ghc
>---------------------------------------------------------------
commit 03e69590fb6834bf3997c02148f0e6313749b682
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Wed Sep 21 15:51:52 2016 +0100
Test Trac #12507
This is now working apparently. It relates to when a
polymorphic function gets instantiated, under some
implicit paramter bindings.
>---------------------------------------------------------------
03e69590fb6834bf3997c02148f0e6313749b682
testsuite/tests/typecheck/should_compile/T12507.hs | 16 ++++++++++++++++
testsuite/tests/typecheck/should_compile/all.T | 2 +-
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/testsuite/tests/typecheck/should_compile/T12507.hs b/testsuite/tests/typecheck/should_compile/T12507.hs
new file mode 100644
index 0000000..b4cfd0e
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/T12507.hs
@@ -0,0 +1,16 @@
+{-# LANGUAGE GADTs, ConstraintKinds, Rank2Types, ImplicitParams #-}
+
+module T12507 where
+
+data Rec fields where
+ Rec :: fields => Rec fields
+
+qn :: Rec fields -> (fields => r) -> r
+qn Rec e = e
+
+record :: Rec (?a :: Int, ?b :: String)
+record = Rec where ?a=42
+ ?b="hey"
+
+access :: Int
+access = qn record ?a
diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T
index 79953e5..37e2369 100644
--- a/testsuite/tests/typecheck/should_compile/all.T
+++ b/testsuite/tests/typecheck/should_compile/all.T
@@ -543,4 +543,4 @@ test('T12466', normal, compile, [''])
test('T12466a', normal, compile, [''])
test('T12427a', normal, compile_fail, [''])
test('T12427b', normal, compile, [''])
-
+test('T12507', normal, compile, [''])
More information about the ghc-commits
mailing list