[commit: ghc] wip/spj-tc-branch2: Test Trac #12507 (0b06fcc)
git at git.haskell.org
git at git.haskell.org
Fri Sep 30 15:17:44 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/spj-tc-branch2
Link : http://ghc.haskell.org/trac/ghc/changeset/0b06fcc23bd029c00884bbdb92ffd3a7e1c95c88/ghc
>---------------------------------------------------------------
commit 0b06fcc23bd029c00884bbdb92ffd3a7e1c95c88
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.
>---------------------------------------------------------------
0b06fcc23bd029c00884bbdb92ffd3a7e1c95c88
testsuite/tests/typecheck/should_compile/T12507.hs | 16 ++++++++++++++++
testsuite/tests/typecheck/should_compile/all.T | 1 +
2 files changed, 17 insertions(+)
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 4ca8c91..6dc3a73 100644
--- a/testsuite/tests/typecheck/should_compile/all.T
+++ b/testsuite/tests/typecheck/should_compile/all.T
@@ -544,3 +544,4 @@ test('T12466a', normal, compile, [''])
test('T12644', normal, compile, [''])
test('T12427a', normal, compile_fail, [''])
test('T12427b', normal, compile, [''])
+test('T12507', normal, compile, [''])
More information about the ghc-commits
mailing list