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,
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"
......
......@@ -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]
......
......@@ -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]
......@@ -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]
......@@ -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]
......@@ -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]
......@@ -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.
......@@ -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.
......@@ -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
......@@ -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
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
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