summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorEdward Z. Yang <ezyang@cs.stanford.edu>2017-02-22 20:32:41 -0800
committerEdward Z. Yang <ezyang@cs.stanford.edu>2017-02-24 14:52:42 -0800
commit9d17028fbcecb53480598c4fcc7bd9e71b2ac7cf (patch)
tree2e4f4f91b9f13c335896ca1dae6a29acd57bd0c7 /testsuite
parent93ffcb028630df97bda82f16a103e3c8ffdaba35 (diff)
downloadhaskell-9d17028fbcecb53480598c4fcc7bd9e71b2ac7cf.tar.gz
Record full FieldLabel in ifConFields.
Summary: The previous implementation tried to be "efficient" by storing field names once in IfaceConDecls, and only just enough information for us to reconstruct the FieldLabel. But this came at a bit of code complexity cost. This patch undos the optimization, instead storing a full FieldLabel at each data constructor. Consequently, this fixes bugs #12699 and #13250. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: adamgundry, bgamari, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D3174
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/backpack/should_compile/T13250.bkp8
-rw-r--r--testsuite/tests/backpack/should_compile/T13250.stderr10
-rw-r--r--testsuite/tests/backpack/should_compile/all.T1
3 files changed, 19 insertions, 0 deletions
diff --git a/testsuite/tests/backpack/should_compile/T13250.bkp b/testsuite/tests/backpack/should_compile/T13250.bkp
new file mode 100644
index 0000000000..fb8098df44
--- /dev/null
+++ b/testsuite/tests/backpack/should_compile/T13250.bkp
@@ -0,0 +1,8 @@
+unit p where
+ signature A where
+ newtype F a = F { mkF :: a }
+unit q where
+ module A where
+ newtype F a = F { mkF :: a }
+unit r where
+ dependency p[A=q:A]
diff --git a/testsuite/tests/backpack/should_compile/T13250.stderr b/testsuite/tests/backpack/should_compile/T13250.stderr
new file mode 100644
index 0000000000..fc79c05623
--- /dev/null
+++ b/testsuite/tests/backpack/should_compile/T13250.stderr
@@ -0,0 +1,10 @@
+[1 of 3] Processing p
+ [1 of 1] Compiling A[sig] ( p/A.hsig, nothing )
+[2 of 3] Processing q
+ Instantiating q
+ [1 of 1] Compiling A ( q/A.hs, T13250.out/q/A.o )
+[3 of 3] Processing r
+ Instantiating r
+ [1 of 1] Including p[A=q:A]
+ Instantiating p[A=q:A]
+ [1 of 1] Compiling A[sig] ( p/A.hsig, T13250.out/p/p-HVmFlcYSefiK5n1aDP1v7x/A.o )
diff --git a/testsuite/tests/backpack/should_compile/all.T b/testsuite/tests/backpack/should_compile/all.T
index 8f4ec3b982..96bc5e1862 100644
--- a/testsuite/tests/backpack/should_compile/all.T
+++ b/testsuite/tests/backpack/should_compile/all.T
@@ -47,4 +47,5 @@ test('bkp52', normal, backpack_compile, [''])
test('T13149', expect_broken(13149), backpack_compile, [''])
test('T13214', normal, backpack_compile, [''])
+test('T13250', normal, backpack_compile, [''])
test('T13323', normal, backpack_compile, [''])