Commit 89168849 authored by Edward Z. Yang's avatar Edward Z. Yang
Browse files

Say 'data' explicitly in IfAbstractTyCon output.


Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
parent fd2d5b6d
...@@ -726,8 +726,8 @@ pprIfaceDecl ss (IfaceData { ifName = tycon, ifCType = ctype, ...@@ -726,8 +726,8 @@ pprIfaceDecl ss (IfaceData { ifName = tycon, ifCType = ctype,
pp_nd = case condecls of pp_nd = case condecls of
IfAbstractTyCon how -> IfAbstractTyCon how ->
case how of case how of
DistinctNominalAbstract -> text "abstract" DistinctNominalAbstract -> text "{- abstract -} data"
SkolemAbstract -> text "skolem" SkolemAbstract -> text "{- skolem -} data"
IfDataTyCon{} -> text "data" IfDataTyCon{} -> text "data"
IfNewTyCon{} -> text "newtype" IfNewTyCon{} -> text "newtype"
......
...@@ -13,7 +13,7 @@ bkpfail10.bkp:8:9: error: ...@@ -13,7 +13,7 @@ bkpfail10.bkp:8:9: error:
• Type constructor ‘H’ has conflicting definitions in the module • Type constructor ‘H’ has conflicting definitions in the module
and its hsig file and its hsig file
Main module: data H a = H a Main module: data H a = H a
Hsig file: skolem H Hsig file: {- skolem -} data H
The types have different kinds The types have different kinds
• while checking that q:H implements signature H in p[H=q:H] • while checking that q:H implements signature H in p[H=q:H]
......
...@@ -15,7 +15,7 @@ bkpfail23.bkp:14:9: error: ...@@ -15,7 +15,7 @@ bkpfail23.bkp:14:9: error:
and its hsig file and its hsig file
Main module: type F a = () Main module: type F a = ()
Hsig file: type role F phantom Hsig file: type role F phantom
skolem F a {- skolem -} data F a
Illegal parameterized type synonym in implementation of abstract data. Illegal parameterized type synonym in implementation of abstract data.
(Try eta reducing your type synonym so that it is nullary.) (Try eta reducing your type synonym so that it is nullary.)
• while checking that h:H implements signature H in p[H=h:H] • while checking that h:H implements signature H in p[H=h:H]
...@@ -19,5 +19,5 @@ bkpfail25.bkp:12:9: error: ...@@ -19,5 +19,5 @@ bkpfail25.bkp:12:9: error:
• Type constructor ‘T’ has conflicting definitions in the module • Type constructor ‘T’ has conflicting definitions in the module
and its hsig file and its hsig file
Main module: type T a = a 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] • while checking that q:H implements signature H in p[H=q:H]
...@@ -14,7 +14,7 @@ bkpfail26.bkp:15:9: error: ...@@ -14,7 +14,7 @@ bkpfail26.bkp:15:9: error:
• Type constructor ‘T’ has conflicting definitions in the module • Type constructor ‘T’ has conflicting definitions in the module
and its hsig file and its hsig file
Main module: type T a = [a] 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. Illegal parameterized type synonym in implementation of abstract data.
(Try eta reducing your type synonym so that it is nullary.) (Try eta reducing your type synonym so that it is nullary.)
• while checking that q:H implements signature H in p[H=q:H] • while checking that q:H implements signature H in p[H=q:H]
...@@ -14,6 +14,6 @@ bkpfail27.bkp:15:9: error: ...@@ -14,6 +14,6 @@ bkpfail27.bkp:15:9: error:
• Type constructor ‘T’ has conflicting definitions in the module • Type constructor ‘T’ has conflicting definitions in the module
and its hsig file and its hsig file
Main module: type T = F Main module: type T = F
Hsig file: skolem T Hsig file: {- skolem -} data T
Illegal type family application in implementation of abstract data. Illegal type family application in implementation of abstract data.
• while checking that q:H implements signature H in p[H=q:H] • while checking that q:H implements signature H in p[H=q:H]
...@@ -4,6 +4,6 @@ Roles12.hs:5:1: error: ...@@ -4,6 +4,6 @@ Roles12.hs:5:1: error:
and its hs-boot file and its hs-boot file
Main module: type role T phantom Main module: type role T phantom
data T a data T a
Boot file: abstract T a Boot file: {- abstract -} data T a
The roles do not match. The roles do not match.
Roles on abstract types default to ‘representational’ in boot files. Roles on abstract types default to ‘representational’ in boot files.
...@@ -4,6 +4,6 @@ T9204.hs:6:1: error: ...@@ -4,6 +4,6 @@ T9204.hs:6:1: error:
and its hs-boot file and its hs-boot file
Main module: type role D phantom Main module: type role D phantom
data D a data D a
Boot file: abstract D a Boot file: {- abstract -} data D a
The roles do not match. The roles do not match.
Roles on abstract types default to ‘representational’ in boot files. Roles on abstract types default to ‘representational’ in boot files.
...@@ -3,4 +3,4 @@ T12035.hs-boot:2:1: error: ...@@ -3,4 +3,4 @@ T12035.hs-boot:2:1: error:
Type constructor ‘T’ has conflicting definitions in the module Type constructor ‘T’ has conflicting definitions in the module
and its hs-boot file and its hs-boot file
Main module: type T = Bool Main module: type T = Bool
Boot file: abstract T Boot file: {- abstract -} data T
...@@ -3,4 +3,4 @@ T12035.hs-boot:2:1: error: ...@@ -3,4 +3,4 @@ T12035.hs-boot:2:1: error:
Type constructor ‘T’ has conflicting definitions in the module Type constructor ‘T’ has conflicting definitions in the module
and its hs-boot file and its hs-boot file
Main module: type T = Bool Main module: type T = Bool
Boot file: abstract T Boot file: {- abstract -} data T
T3468.hs-boot:3:1: T3468.hs-boot:3:1: error:
Type constructor ‘Tool’ has conflicting definitions in the module Type constructor ‘Tool’ has conflicting definitions in the module
and its hs-boot file and its hs-boot file
Main module: type role Tool phantom Main module: type role Tool phantom
data Tool d where data Tool d where
F :: a -> Tool d F :: a -> Tool d
Boot file: abstract Tool Boot file: {- abstract -} data Tool
The types have different kinds The types have different kinds
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment