[commit: ghc] master: Say 'data' explicitly in IfAbstractTyCon output. (8916884)

git at git.haskell.org git at git.haskell.org
Sat Feb 18 00:48:01 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/89168849a781626fc794ae97375da979ac83bf96/ghc

>---------------------------------------------------------------

commit 89168849a781626fc794ae97375da979ac83bf96
Author: Edward Z. Yang <ezyang at cs.stanford.edu>
Date:   Sun Feb 12 22:36:19 2017 -0800

    Say 'data' explicitly in IfAbstractTyCon output.
    
    Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu>


>---------------------------------------------------------------

89168849a781626fc794ae97375da979ac83bf96
 compiler/iface/IfaceSyn.hs                            | 4 ++--
 testsuite/tests/backpack/should_fail/bkpfail10.stderr | 2 +-
 testsuite/tests/backpack/should_fail/bkpfail23.stderr | 2 +-
 testsuite/tests/backpack/should_fail/bkpfail25.stderr | 2 +-
 testsuite/tests/backpack/should_fail/bkpfail26.stderr | 2 +-
 testsuite/tests/backpack/should_fail/bkpfail27.stderr | 2 +-
 testsuite/tests/roles/should_fail/Roles12.stderr      | 2 +-
 testsuite/tests/roles/should_fail/T9204.stderr        | 2 +-
 testsuite/tests/typecheck/should_fail/T12035.stderr   | 2 +-
 testsuite/tests/typecheck/should_fail/T12035j.stderr  | 2 +-
 testsuite/tests/typecheck/should_fail/T3468.stderr    | 4 ++--
 11 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/compiler/iface/IfaceSyn.hs b/compiler/iface/IfaceSyn.hs
index 6469878..7150e22 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 bb31da4..c521451 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 54dddc0..de4026a 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 f01231d..ef2d035 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 583629f..fa192c2 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 5f33d04..3d1446a 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 7dff7f9..ac57e2b 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 721e74e..e5e9925 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 7086785..9e5ff78 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 7086785..9e5ff78 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 9284df2..cae8eed 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



More information about the ghc-commits mailing list