summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Z. Yang <ezyang@cs.stanford.edu>2017-02-12 22:36:19 -0800
committerEdward Z. Yang <ezyang@cs.stanford.edu>2017-02-17 16:47:28 -0800
commit89168849a781626fc794ae97375da979ac83bf96 (patch)
tree77853738762272af87275b56917fa465ba26331d
parentfd2d5b6de7493c2ff2ac76401ef296f575c52483 (diff)
downloadhaskell-89168849a781626fc794ae97375da979ac83bf96.tar.gz
Say 'data' explicitly in IfAbstractTyCon output.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
-rw-r--r--compiler/iface/IfaceSyn.hs4
-rw-r--r--testsuite/tests/backpack/should_fail/bkpfail10.stderr2
-rw-r--r--testsuite/tests/backpack/should_fail/bkpfail23.stderr2
-rw-r--r--testsuite/tests/backpack/should_fail/bkpfail25.stderr2
-rw-r--r--testsuite/tests/backpack/should_fail/bkpfail26.stderr2
-rw-r--r--testsuite/tests/backpack/should_fail/bkpfail27.stderr2
-rw-r--r--testsuite/tests/roles/should_fail/Roles12.stderr2
-rw-r--r--testsuite/tests/roles/should_fail/T9204.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/T12035.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/T12035j.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/T3468.stderr4
11 files changed, 13 insertions, 13 deletions
diff --git a/compiler/iface/IfaceSyn.hs b/compiler/iface/IfaceSyn.hs
index 646987873f..7150e228ba 100644
--- a/compiler/iface/IfaceSyn.hs
+++ b/compiler/iface/IfaceSyn.hs
@@ -726,8 +726,8 @@ pprIfaceDecl ss (IfaceData { ifName = tycon, ifCType = ctype,
pp_nd = case condecls of
IfAbstractTyCon how ->
case how of
- DistinctNominalAbstract -> text "abstract"
- SkolemAbstract -> text "skolem"
+ DistinctNominalAbstract -> text "{- abstract -} data"
+ SkolemAbstract -> text "{- skolem -} data"
IfDataTyCon{} -> text "data"
IfNewTyCon{} -> text "newtype"
diff --git a/testsuite/tests/backpack/should_fail/bkpfail10.stderr b/testsuite/tests/backpack/should_fail/bkpfail10.stderr
index bb31da49c4..c5214513b4 100644
--- a/testsuite/tests/backpack/should_fail/bkpfail10.stderr
+++ b/testsuite/tests/backpack/should_fail/bkpfail10.stderr
@@ -13,7 +13,7 @@ bkpfail10.bkp:8:9: error:
• Type constructor ‘H’ has conflicting definitions in the module
and its hsig file
Main module: data H a = H a
- Hsig file: skolem H
+ Hsig file: {- skolem -} data H
The types have different kinds
• while checking that q:H implements signature H in p[H=q:H]
diff --git a/testsuite/tests/backpack/should_fail/bkpfail23.stderr b/testsuite/tests/backpack/should_fail/bkpfail23.stderr
index 54dddc01d1..de4026ad6a 100644
--- a/testsuite/tests/backpack/should_fail/bkpfail23.stderr
+++ b/testsuite/tests/backpack/should_fail/bkpfail23.stderr
@@ -15,7 +15,7 @@ bkpfail23.bkp:14:9: error:
and its hsig file
Main module: type F a = ()
Hsig file: type role F phantom
- skolem F a
+ {- skolem -} data F a
Illegal parameterized type synonym in implementation of abstract data.
(Try eta reducing your type synonym so that it is nullary.)
• while checking that h:H implements signature H in p[H=h:H]
diff --git a/testsuite/tests/backpack/should_fail/bkpfail25.stderr b/testsuite/tests/backpack/should_fail/bkpfail25.stderr
index f01231db8e..ef2d03554c 100644
--- a/testsuite/tests/backpack/should_fail/bkpfail25.stderr
+++ b/testsuite/tests/backpack/should_fail/bkpfail25.stderr
@@ -19,5 +19,5 @@ bkpfail25.bkp:12:9: error:
• Type constructor ‘T’ has conflicting definitions in the module
and its hsig file
Main module: type T a = a
- Hsig file: skolem T a
+ Hsig file: {- skolem -} data T a
• while checking that q:H implements signature H in p[H=q:H]
diff --git a/testsuite/tests/backpack/should_fail/bkpfail26.stderr b/testsuite/tests/backpack/should_fail/bkpfail26.stderr
index 583629f212..fa192c261a 100644
--- a/testsuite/tests/backpack/should_fail/bkpfail26.stderr
+++ b/testsuite/tests/backpack/should_fail/bkpfail26.stderr
@@ -14,7 +14,7 @@ bkpfail26.bkp:15:9: error:
• Type constructor ‘T’ has conflicting definitions in the module
and its hsig file
Main module: type T a = [a]
- Hsig file: skolem T a
+ Hsig file: {- skolem -} data T a
Illegal parameterized type synonym in implementation of abstract data.
(Try eta reducing your type synonym so that it is nullary.)
• while checking that q:H implements signature H in p[H=q:H]
diff --git a/testsuite/tests/backpack/should_fail/bkpfail27.stderr b/testsuite/tests/backpack/should_fail/bkpfail27.stderr
index 5f33d0473a..3d1446a77d 100644
--- a/testsuite/tests/backpack/should_fail/bkpfail27.stderr
+++ b/testsuite/tests/backpack/should_fail/bkpfail27.stderr
@@ -14,6 +14,6 @@ bkpfail27.bkp:15:9: error:
• Type constructor ‘T’ has conflicting definitions in the module
and its hsig file
Main module: type T = F
- Hsig file: skolem T
+ Hsig file: {- skolem -} data T
Illegal type family application in implementation of abstract data.
• while checking that q:H implements signature H in p[H=q:H]
diff --git a/testsuite/tests/roles/should_fail/Roles12.stderr b/testsuite/tests/roles/should_fail/Roles12.stderr
index 7dff7f97ec..ac57e2bcbc 100644
--- a/testsuite/tests/roles/should_fail/Roles12.stderr
+++ b/testsuite/tests/roles/should_fail/Roles12.stderr
@@ -4,6 +4,6 @@ Roles12.hs:5:1: error:
and its hs-boot file
Main module: type role T phantom
data T a
- Boot file: abstract T a
+ Boot file: {- abstract -} data T a
The roles do not match.
Roles on abstract types default to ‘representational’ in boot files.
diff --git a/testsuite/tests/roles/should_fail/T9204.stderr b/testsuite/tests/roles/should_fail/T9204.stderr
index 721e74e74b..e5e99253fc 100644
--- a/testsuite/tests/roles/should_fail/T9204.stderr
+++ b/testsuite/tests/roles/should_fail/T9204.stderr
@@ -4,6 +4,6 @@ T9204.hs:6:1: error:
and its hs-boot file
Main module: type role D phantom
data D a
- Boot file: abstract D a
+ Boot file: {- abstract -} data D a
The roles do not match.
Roles on abstract types default to ‘representational’ in boot files.
diff --git a/testsuite/tests/typecheck/should_fail/T12035.stderr b/testsuite/tests/typecheck/should_fail/T12035.stderr
index 7086785d6d..9e5ff78b09 100644
--- a/testsuite/tests/typecheck/should_fail/T12035.stderr
+++ b/testsuite/tests/typecheck/should_fail/T12035.stderr
@@ -3,4 +3,4 @@ T12035.hs-boot:2:1: error:
Type constructor ‘T’ has conflicting definitions in the module
and its hs-boot file
Main module: type T = Bool
- Boot file: abstract T
+ Boot file: {- abstract -} data T
diff --git a/testsuite/tests/typecheck/should_fail/T12035j.stderr b/testsuite/tests/typecheck/should_fail/T12035j.stderr
index 7086785d6d..9e5ff78b09 100644
--- a/testsuite/tests/typecheck/should_fail/T12035j.stderr
+++ b/testsuite/tests/typecheck/should_fail/T12035j.stderr
@@ -3,4 +3,4 @@ T12035.hs-boot:2:1: error:
Type constructor ‘T’ has conflicting definitions in the module
and its hs-boot file
Main module: type T = Bool
- Boot file: abstract T
+ Boot file: {- abstract -} data T
diff --git a/testsuite/tests/typecheck/should_fail/T3468.stderr b/testsuite/tests/typecheck/should_fail/T3468.stderr
index 9284df2fb4..cae8eedefc 100644
--- a/testsuite/tests/typecheck/should_fail/T3468.stderr
+++ b/testsuite/tests/typecheck/should_fail/T3468.stderr
@@ -1,9 +1,9 @@
-T3468.hs-boot:3:1:
+T3468.hs-boot:3:1: error:
Type constructor ‘Tool’ has conflicting definitions in the module
and its hs-boot file
Main module: type role Tool phantom
data Tool d where
F :: a -> Tool d
- Boot file: abstract Tool
+ Boot file: {- abstract -} data Tool
The types have different kinds