Add a test for Trac #15586
authorKrzysztof Gogolewski <krz.gogolewski@gmail.com>
Tue, 4 Sep 2018 13:42:52 +0000 (15:42 +0200)
committerKrzysztof Gogolewski <krz.gogolewski@gmail.com>
Tue, 4 Sep 2018 13:42:52 +0000 (15:42 +0200)
Summary: The bug is already fixed in master.

Test Plan: make test TEST=T15586

Reviewers: bgamari, simonpj

Reviewed By: simonpj

Subscribers: rwbarton, carter

GHC Trac Issues: #15586

Differential Revision: https://phabricator.haskell.org/D5118

testsuite/tests/typecheck/should_compile/T15586.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_compile/all.T

diff --git a/testsuite/tests/typecheck/should_compile/T15586.hs b/testsuite/tests/typecheck/should_compile/T15586.hs
new file mode 100644 (file)
index 0000000..e8fd4f3
--- /dev/null
@@ -0,0 +1,12 @@
+{-# LANGUAGE GADTs #-}
+
+module STree where
+
+data STree a where
+    STreeIM :: {
+        l :: v a ,
+        stree :: a
+    } -> STree a
+
+insert :: STree a -> STree a
+insert s = s { stree = undefined }
index 64df3a8..c3a90ee 100644 (file)
@@ -649,3 +649,4 @@ test('T15412', normal, compile, [''])
 test('T15141', normal, compile, [''])
 test('T15473', normal, compile_fail, [''])
 test('T15499', normal, compile, [''])
+test('T15586', normal, compile, [''])