[Git][ghc/ghc][wip/T23070-unify] Wibbles

Simon Peyton Jones (@simonpj) gitlab at gitlab.haskell.org
Fri Apr 28 14:58:31 UTC 2023



Simon Peyton Jones pushed to branch wip/T23070-unify at Glasgow Haskell Compiler / GHC


Commits:
670a77b4 by Simon Peyton Jones at 2023-04-28T16:00:05+01:00
Wibbles

- - - - -


6 changed files:

- compiler/GHC/Tc/Errors.hs
- testsuite/tests/partial-sigs/should_fail/T14584.stderr
- testsuite/tests/partial-sigs/should_fail/T14584a.stderr
- testsuite/tests/polykinds/T14846.stderr
- testsuite/tests/rep-poly/RepPolyRecordUpdate.stderr
- testsuite/tests/typecheck/should_fail/T16204c.stderr


Changes:

=====================================
compiler/GHC/Tc/Errors.hs
=====================================
@@ -1672,8 +1672,8 @@ mkTyVarEqErr' ctxt item (tv1, co1) ty2
     return (main_msg, [])
 
   -- Incompatible kinds
-  -- This is wrinkle (4) in Note [Equalities with incompatible kinds] in
-  -- GHC.Tc.Solver.Canonical
+  -- This is wrinkle (4) in Note [Equalities with incompatible kinds]
+  -- in GHC.Tc.Solver.Equality
   | hasCoercionHoleCo co1 || hasCoercionHoleTy ty2
   = return (mkBlockedEqErr item, [])
 


=====================================
testsuite/tests/partial-sigs/should_fail/T14584.stderr
=====================================
@@ -1,7 +1,7 @@
 
 T14584.hs:57:41: warning: [GHC-39999] [-Wdeferred-type-errors (in -Wdefault)]
     • Could not deduce ‘SingI a’ arising from a use of ‘sing’
-      from the context: (Action act, Monoid a, Good m1)
+      from the context: (Action act, Monoid a, Good m)
         bound by the instance declaration at T14584.hs:55:10-89
     • In the second argument of ‘fromSing’, namely
         ‘(sing @m @a :: Sing _)’
@@ -10,23 +10,11 @@ T14584.hs:57:41: warning: [GHC-39999] [-Wdeferred-type-errors (in -Wdefault)]
       In the expression:
         act @_ @_ @act (fromSing @m (sing @m @a :: Sing _))
 
-T14584.hs:57:41: warning: [GHC-06200] [-Wdeferred-type-errors (in -Wdefault)]
-    • Cannot use equality for substitution: a0 ~ a
-      Doing so would be ill-kinded.
-    • In the second argument of ‘fromSing’, namely
-        ‘(sing @m @a :: Sing _)’
-      In the fourth argument of ‘act’, namely
-        ‘(fromSing @m (sing @m @a :: Sing _))’
-      In the expression:
-        act @_ @_ @act (fromSing @m (sing @m @a :: Sing _))
-    • Relevant bindings include
-        monHom :: a -> a (bound at T14584.hs:57:3)
-
 T14584.hs:57:50: warning: [GHC-25897] [-Wdeferred-type-errors (in -Wdefault)]
-    • Could not deduce ‘m1 ~ *’
-      from the context: (Action act, Monoid a, Good m1)
+    • Could not deduce ‘m ~ *’
+      from the context: (Action act, Monoid a, Good m)
         bound by the instance declaration at T14584.hs:55:10-89
-      ‘m1’ is a rigid type variable bound by
+      ‘m’ is a rigid type variable bound by
         the instance declaration
         at T14584.hs:55:10-89
     • In the type ‘a’
@@ -36,9 +24,8 @@ T14584.hs:57:50: warning: [GHC-25897] [-Wdeferred-type-errors (in -Wdefault)]
         ‘(fromSing @m (sing @m @a :: Sing _))’
 
 T14584.hs:57:60: warning: [GHC-88464] [-Wpartial-type-signatures (in -Wdefault)]
-    • Found type wildcard ‘_’ standing for ‘a0 :: m’
-      Where: ‘a0’ is an ambiguous type variable
-             ‘m’ is a rigid type variable bound by
+    • Found type wildcard ‘_’ standing for ‘a :: m’
+      Where: ‘a’, ‘m’ are rigid type variables bound by
                the instance declaration
                at T14584.hs:55:10-89
     • In the first argument of ‘Sing’, namely ‘_’


=====================================
testsuite/tests/partial-sigs/should_fail/T14584a.stderr
=====================================
@@ -1,7 +1,7 @@
 
 T14584a.hs:12:5: warning: [GHC-83865] [-Wdeferred-type-errors (in -Wdefault)]
     • Couldn't match expected type ‘()’ with actual type ‘m -> m’
-    • Probable cause: ‘id’ is applied to too few arguments
+    • Probable cause: ‘id @m :: _’ is applied to too few arguments
       In the expression: id @m :: _
       In an equation for ‘f’: f = id @m :: _
 
@@ -16,7 +16,11 @@ T14584a.hs:12:9: warning: [GHC-25897] [-Wdeferred-type-errors (in -Wdefault)]
       In an equation for ‘f’: f = id @m :: _
 
 T14584a.hs:12:14: warning: [GHC-88464] [-Wpartial-type-signatures (in -Wdefault)]
-    • Found type wildcard ‘_’ standing for ‘()’
+    • Found type wildcard ‘_’ standing for ‘m -> m’
+      Where: ‘m’, ‘k’ are rigid type variables bound by
+               the type signature for:
+                 f :: forall {k} (m :: k). ()
+               at T14584a.hs:11:1-17
     • In an expression type signature: _
       In the expression: id @m :: _
       In an equation for ‘f’: f = id @m :: _


=====================================
testsuite/tests/polykinds/T14846.stderr
=====================================
@@ -5,8 +5,8 @@ T14846.hs:38:8: error: [GHC-25897]
         Actual: Hom riki a a
       ‘ríki’ is a rigid type variable bound by
         the type signature for:
-          i :: forall {k4} {k5} {cls2 :: k5 -> Constraint} (xx :: k4)
-                      (a :: Struct cls2) (ríki :: Struct cls2 -> Struct cls2 -> *).
+          i :: forall {k4} {k5} {cls1 :: k5 -> Constraint} (xx :: k4)
+                      (a :: Struct cls1) (ríki :: Struct cls1 -> Struct cls1 -> *).
                StructI xx a =>
                ríki a a
         at T14846.hs:38:8-48
@@ -23,8 +23,8 @@ T14846.hs:38:8: error: [GHC-25897]
       In the instance declaration for ‘Category (Hom riki)’
 
 T14846.hs:39:44: error: [GHC-25897]
-    • Couldn't match kind ‘k3’ with ‘Struct cls2’
-      Expected kind ‘Struct cls2 -> Constraint’,
+    • Couldn't match kind ‘k3’ with ‘Struct cls1’
+      Expected kind ‘Struct cls1 -> Constraint’,
         but ‘cls’ has kind ‘k3 -> Constraint’
       ‘k3’ is a rigid type variable bound by
         the instance declaration


=====================================
testsuite/tests/rep-poly/RepPolyRecordUpdate.stderr
=====================================
@@ -17,7 +17,7 @@ RepPolyRecordUpdate.hs:13:9: error: [GHC-55287]
     • The record update at field ‘fld’
       does not have a fixed runtime representation.
       Its type is:
-        a0 :: TYPE rep0
+        a :: TYPE rep0
       Cannot unify ‘rep’ with the type variable ‘rep0’
       because it is not a concrete ‘RuntimeRep’.
     • In a record update at field ‘fld’,


=====================================
testsuite/tests/typecheck/should_fail/T16204c.stderr
=====================================
@@ -2,7 +2,7 @@
 T16204c.hs:16:8: error: [GHC-83865]
     • Couldn't match type ‘Rep’ with ‘*’
       Expected: Sing @(*) a
-        Actual: Sing @Rep a0
+        Actual: Sing @Rep a
     • In the first argument of ‘id’, namely ‘sTo’
       In the expression: id sTo
       In an equation for ‘x’: x = id sTo



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/670a77b4302cd6c63ef24ffae29f30e3e49b2425

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/670a77b4302cd6c63ef24ffae29f30e3e49b2425
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230428/2febad8b/attachment-0001.html>


More information about the ghc-commits mailing list