[commit: ghc] master: Testsuite: fix tcfail220 - Maybe is wired-in now (b639c97)

git at git.haskell.org git at git.haskell.org
Thu Sep 3 22:05:11 UTC 2015


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

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

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

commit b639c977fda47dd0088b0cf1c970018f032188a2
Author: Thomas Miedema <thomasmiedema at gmail.com>
Date:   Thu Sep 3 17:01:10 2015 +0200

    Testsuite: fix tcfail220 - Maybe is wired-in now
    
    This fixes validate.
    
    374457809de343f409fbeea0a885877947a133a2 (D202) mentions: "This patch
    also wires-in Maybe data type".
    
    A conflicting definition of a wired-in type in a .hsig file doesn't seem
    to cause compilation to fail. This is probably a bug, but a small one.
    Since SPJ in ffc21506894c7887d3620423aaf86bc6113a1071 swept this under
    the rug, by removing `data Bool a b c d = False` from tcfail220.hsig,
    I'm going to do the same here.
    
    D1098 touches these files, so ezyang can decide whether this problem
    warrants fixing when doing a rebase.
    
    Differential Revision: https://phabricator.haskell.org/D1208


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

b639c977fda47dd0088b0cf1c970018f032188a2
 testsuite/tests/typecheck/should_fail/tcfail220.hsig   | 2 +-
 testsuite/tests/typecheck/should_fail/tcfail220.stderr | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/testsuite/tests/typecheck/should_fail/tcfail220.hsig b/testsuite/tests/typecheck/should_fail/tcfail220.hsig
index 560fc31..c9e80e3 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail220.hsig
+++ b/testsuite/tests/typecheck/should_fail/tcfail220.hsig
@@ -1,4 +1,4 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 module ShouldFail where
 
-data Maybe a b = Nothing
+data Either a b c = Left a
diff --git a/testsuite/tests/typecheck/should_fail/tcfail220.stderr b/testsuite/tests/typecheck/should_fail/tcfail220.stderr
index 432dc4c..d78fa6d 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail220.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail220.stderr
@@ -1,9 +1,9 @@
 [1 of 1] Compiling ShouldFail[sig of Prelude] ( tcfail220.hsig, nothing )
 
 tcfail220.hsig:4:1: error:
-    Type constructor ‘Maybe’ has conflicting definitions in the module
+    Type constructor ‘Either’ has conflicting definitions in the module
     and its hsig file
-    Main module: data Maybe a = Nothing | Just a
-    Hsig file:  type role Maybe phantom phantom
-                data Maybe a b = Nothing
+    Main module: data Either a b = Left a | Right b
+    Hsig file:  type role Either representational phantom phantom
+                data Either a b c = Left a
     The types have different kinds



More information about the ghc-commits mailing list