[commit: ghc] master: Test Trac #12507 (cdbc73a)
git at git.haskell.org
git at git.haskell.org
Fri Oct 21 16:16:26 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/cdbc73aea2d8220dc2c3467afbac5c17db96453a/ghc
>---------------------------------------------------------------
commit cdbc73aea2d8220dc2c3467afbac5c17db96453a
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.
>---------------------------------------------------------------
cdbc73aea2d8220dc2c3467afbac5c17db96453a
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 92b81c6..3961b23 100644
--- a/testsuite/tests/typecheck/should_compile/all.T
+++ b/testsuite/tests/typecheck/should_compile/all.T
@@ -547,3 +547,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