[commit: testsuite] overlapping-tyfams: Wibbles while supporting "type family where" (b169484)

Richard Eisenberg eir at cis.upenn.edu
Fri Jun 21 15:17:07 CEST 2013


Repository : ssh://darcs.haskell.org//srv/darcs/testsuite

On branch  : overlapping-tyfams

https://github.com/ghc/testsuite/commit/b169484ffd4e52019d1304bdf73192a6685f30ac

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

commit b169484ffd4e52019d1304bdf73192a6685f30ac
Author: Richard Eisenberg <eir at cis.upenn.edu>
Date:   Wed Jun 19 13:21:45 2013 +0100

    Wibbles while supporting "type family where"

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

 tests/indexed-types/should_compile/Overlap13.hs  |    2 +-
 tests/indexed-types/should_fail/Overlap10.stderr |    6 +++---
 tests/indexed-types/should_fail/Overlap11.hs     |    3 +--
 tests/indexed-types/should_fail/Overlap11.stderr |    6 +++---
 tests/indexed-types/should_fail/Overlap3.stderr  |   12 +++---------
 tests/indexed-types/should_fail/Overlap6.stderr  |    8 ++++----
 tests/indexed-types/should_fail/Overlap7.stderr  |   12 +++---------
 tests/indexed-types/should_fail/Overlap9.stderr  |    8 ++++----
 tests/indexed-types/should_fail/T7786.stderr     |    2 +-
 9 files changed, 23 insertions(+), 36 deletions(-)

diff --git a/tests/indexed-types/should_compile/Overlap13.hs b/tests/indexed-types/should_compile/Overlap13.hs
index 6e5c2e4..56fc78e 100644
--- a/tests/indexed-types/should_compile/Overlap13.hs
+++ b/tests/indexed-types/should_compile/Overlap13.hs
@@ -4,7 +4,7 @@ module Overlap13 where
 
 type family F a b where
   F a a = Int
-  F Int Int = Int
+  F a Int = Int
   F a b = b
 
 g :: a -> F a Int
diff --git a/tests/indexed-types/should_fail/Overlap10.stderr b/tests/indexed-types/should_fail/Overlap10.stderr
index 342cbe4..b31de8d 100644
--- a/tests/indexed-types/should_fail/Overlap10.stderr
+++ b/tests/indexed-types/should_fail/Overlap10.stderr
@@ -1,8 +1,8 @@
 
-Overlap10.hs:11:7:
+Overlap10.hs:10:7:
     Couldn't match expected type ‛F a Bool’ with actual type ‛Bool’
     Relevant bindings include
-      g :: a -> F a Bool (bound at Overlap10.hs:11:1)
-      x :: a (bound at Overlap10.hs:11:3)
+      g :: a -> F a Bool (bound at Overlap10.hs:10:1)
+      x :: a (bound at Overlap10.hs:10:3)
     In the expression: False
     In an equation for ‛g’: g x = False
diff --git a/tests/indexed-types/should_fail/Overlap11.hs b/tests/indexed-types/should_fail/Overlap11.hs
index 1498d59..79b0ecb 100644
--- a/tests/indexed-types/should_fail/Overlap11.hs
+++ b/tests/indexed-types/should_fail/Overlap11.hs
@@ -2,8 +2,7 @@
 
 module Overlap11 where
 
-type family F a b
-type instance where
+type family F a b where
   F a a = Int
   F a b = b
 
diff --git a/tests/indexed-types/should_fail/Overlap11.stderr b/tests/indexed-types/should_fail/Overlap11.stderr
index 476ae6c..97627e7 100644
--- a/tests/indexed-types/should_fail/Overlap11.stderr
+++ b/tests/indexed-types/should_fail/Overlap11.stderr
@@ -1,8 +1,8 @@
 
-Overlap11.hs:11:8:
+Overlap11.hs:10:8:
     Couldn't match expected type ‛F a Int’ with actual type ‛Int’
     Relevant bindings include
-      g :: a -> F a Int (bound at Overlap11.hs:11:1)
-      x :: a (bound at Overlap11.hs:11:3)
+      g :: a -> F a Int (bound at Overlap11.hs:10:1)
+      x :: a (bound at Overlap11.hs:10:3)
     In the expression: (5 :: Int)
     In an equation for ‛g’: g x = (5 :: Int)
diff --git a/tests/indexed-types/should_fail/Overlap3.stderr b/tests/indexed-types/should_fail/Overlap3.stderr
index 7226058..c8d1b5e 100644
--- a/tests/indexed-types/should_fail/Overlap3.stderr
+++ b/tests/indexed-types/should_fail/Overlap3.stderr
@@ -1,10 +1,4 @@
 
-Overlap3.hs:7:3:
-    Conflicting family instance declarations:
-      F a a -- Defined at Overlap3.hs:7:3
-      F Char Char -- Defined at Overlap3.hs:9:15
-
-Overlap3.hs:8:3:
-    Conflicting family instance declarations:
-      F a b -- Defined at Overlap3.hs:8:3
-      F Char Char -- Defined at Overlap3.hs:9:15
+Overlap3.hs:8:1:
+    Illegal instance for closed family ‛F’
+    In the type instance declaration for ‛F’
diff --git a/tests/indexed-types/should_fail/Overlap6.stderr b/tests/indexed-types/should_fail/Overlap6.stderr
index c59a1ab..ce0a64f 100644
--- a/tests/indexed-types/should_fail/Overlap6.stderr
+++ b/tests/indexed-types/should_fail/Overlap6.stderr
@@ -1,15 +1,15 @@
 
-Overlap6.hs:16:7:
+Overlap6.hs:15:7:
     Couldn't match type ‛x’ with ‛And x 'True’
       ‛x’ is a rigid type variable bound by
           the type signature for
             g :: Proxy Bool x -> Proxy Bool (And x 'True)
-          at Overlap6.hs:15:6
+          at Overlap6.hs:14:6
     Expected type: Proxy Bool (And x 'True)
       Actual type: Proxy Bool x
     Relevant bindings include
       g :: Proxy Bool x -> Proxy Bool (And x 'True)
-        (bound at Overlap6.hs:16:1)
-      x :: Proxy Bool x (bound at Overlap6.hs:16:3)
+        (bound at Overlap6.hs:15:1)
+      x :: Proxy Bool x (bound at Overlap6.hs:15:3)
     In the expression: x
     In an equation for ‛g’: g x = x
diff --git a/tests/indexed-types/should_fail/Overlap7.stderr b/tests/indexed-types/should_fail/Overlap7.stderr
index a87186e..2858f79 100644
--- a/tests/indexed-types/should_fail/Overlap7.stderr
+++ b/tests/indexed-types/should_fail/Overlap7.stderr
@@ -1,10 +1,4 @@
 
-Overlap7.hs:7:3:
-    Conflicting family instance declarations:
-      F Int a -- Defined at Overlap7.hs:7:3
-      F a Int -- Defined at Overlap7.hs:9:15
-
-Overlap7.hs:8:3:
-    Conflicting family instance declarations:
-      F a b -- Defined at Overlap7.hs:8:3
-      F a Int -- Defined at Overlap7.hs:9:15
+Overlap7.hs:8:1:
+    Illegal instance for closed family ‛F’
+    In the type instance declaration for ‛F’
diff --git a/tests/indexed-types/should_fail/Overlap9.stderr b/tests/indexed-types/should_fail/Overlap9.stderr
index a0a6ea8..9f9f102 100644
--- a/tests/indexed-types/should_fail/Overlap9.stderr
+++ b/tests/indexed-types/should_fail/Overlap9.stderr
@@ -1,11 +1,11 @@
 
-Overlap9.hs:11:7:
+Overlap9.hs:10:7:
     Could not deduce (F a ~ Int)
     from the context (Show a)
       bound by the type signature for g :: Show a => a -> F a
-      at Overlap9.hs:10:6-23
+      at Overlap9.hs:9:6-23
     Relevant bindings include
-      g :: a -> F a (bound at Overlap9.hs:11:1)
-      x :: a (bound at Overlap9.hs:11:3)
+      g :: a -> F a (bound at Overlap9.hs:10:1)
+      x :: a (bound at Overlap9.hs:10:3)
     In the expression: length (show x)
     In an equation for ‛g’: g x = length (show x)
diff --git a/tests/indexed-types/should_fail/T7786.stderr b/tests/indexed-types/should_fail/T7786.stderr
index 359c84f..85a1be2 100644
--- a/tests/indexed-types/should_fail/T7786.stderr
+++ b/tests/indexed-types/should_fail/T7786.stderr
@@ -1,5 +1,5 @@
 
-T7786.hs:89:22:
+T7786.hs:86:22:
     Couldn't match type ‛xxx’ with ‛'Empty [KeySegment]’
     Inaccessible code in
       a pattern with constructor





More information about the ghc-commits mailing list