[Git][ghc/ghc][wip/T25266] Wibble error messages

Simon Peyton Jones (@simonpj) gitlab at gitlab.haskell.org
Tue Oct 15 13:59:43 UTC 2024



Simon Peyton Jones pushed to branch wip/T25266 at Glasgow Haskell Compiler / GHC


Commits:
edd61fdc by Simon Peyton Jones at 2024-10-15T14:59:32+01:00
Wibble error messages

- - - - -


3 changed files:

- testsuite/tests/indexed-types/should_fail/ExtraTcsUntch.stderr
- testsuite/tests/polykinds/T14172.stderr
- testsuite/tests/typecheck/should_compile/T13785.stderr


Changes:

=====================================
testsuite/tests/indexed-types/should_fail/ExtraTcsUntch.stderr
=====================================
@@ -1,12 +1,12 @@
 ExtraTcsUntch.hs:23:18: error: [GHC-83865]
     • Couldn't match expected type: F Int
-                  with actual type: [[a0]]
+                  with actual type: [p0]
     • In the first argument of ‘h’, namely ‘[x]’
       In the expression: h [x]
       In an equation for ‘g1’: g1 _ = h [x]
     • Relevant bindings include
-        x :: [a0] (bound at ExtraTcsUntch.hs:21:3)
-        f :: [a0] -> ((), ((), ())) (bound at ExtraTcsUntch.hs:21:1)
+        x :: p0 (bound at ExtraTcsUntch.hs:21:3)
+        f :: p0 -> ((), ((), ())) (bound at ExtraTcsUntch.hs:21:1)
 
 ExtraTcsUntch.hs:25:38: error: [GHC-83865]
     • Couldn't match expected type: F Int
@@ -14,7 +14,4 @@ ExtraTcsUntch.hs:25:38: error: [GHC-83865]
     • In the first argument of ‘h’, namely ‘[[undefined]]’
       In the expression: h [[undefined]]
       In the expression: (h [[undefined]], op x [y])
-    • Relevant bindings include
-        x :: [a0] (bound at ExtraTcsUntch.hs:21:3)
-        f :: [a0] -> ((), ((), ())) (bound at ExtraTcsUntch.hs:21:1)
 


=====================================
testsuite/tests/polykinds/T14172.stderr
=====================================
@@ -1,7 +1,9 @@
 T14172.hs:7:46: error: [GHC-88464]
-    • Found type wildcard ‘_’ standing for ‘a'1 :: k0’
-      Where: ‘k0’ is an ambiguous type variable
-             ‘a'1’ is an ambiguous type variable
+    • Found type wildcard ‘_’ standing for ‘a'’
+      Where: ‘a'’ is a rigid type variable bound by
+               the inferred type of
+                 traverseCompose :: (a -> f b) -> g a -> f (h a')
+               at T14172.hs:8:1-46
       To use the inferred type, enable PartialTypeSignatures
     • In the first argument of ‘h’, namely ‘_’
       In the first argument of ‘f’, namely ‘(h _)’
@@ -10,19 +12,18 @@ T14172.hs:7:46: error: [GHC-88464]
 
 T14172.hs:8:19: error: [GHC-25897]
     • Couldn't match type ‘a’ with ‘g'1 a'0’
-      Expected: (f'0 a -> f (f'0 b)) -> g a -> f (h a'1)
-        Actual: (Unwrapped (Compose f'0 g'1 a'0)
-                 -> f (Unwrapped (h a'1)))
-                -> Compose f'0 g'1 a'0 -> f (h a'1)
+      Expected: (f'0 a -> f (f'0 b)) -> g a -> f (h a')
+        Actual: (Unwrapped (Compose f'0 g'1 a'0) -> f (Unwrapped (h a')))
+                -> Compose f'0 g'1 a'0 -> f (h a')
       ‘a’ is a rigid type variable bound by
         the inferred type of
-          traverseCompose :: (a -> f b) -> g a -> f (h a'1)
+          traverseCompose :: (a -> f b) -> g a -> f (h a')
         at T14172.hs:7:1-47
     • In the first argument of ‘(.)’, namely ‘_Wrapping Compose’
       In the expression: _Wrapping Compose . traverse
       In an equation for ‘traverseCompose’:
           traverseCompose = _Wrapping Compose . traverse
     • Relevant bindings include
-        traverseCompose :: (a -> f b) -> g a -> f (h a'1)
+        traverseCompose :: (a -> f b) -> g a -> f (h a')
           (bound at T14172.hs:8:1)
 


=====================================
testsuite/tests/typecheck/should_compile/T13785.stderr
=====================================
@@ -1,12 +1,13 @@
-
-T13785.hs:16:5: warning: [GHC-55524] [-Wmonomorphism-restriction]
+T13785.hs:21:5: warning: [GHC-55524] [-Wmonomorphism-restriction]
     • The Monomorphism Restriction applies to the bindings
       for ‘bar2’, ‘baz2’
     • In an equation for ‘foo’:
           foo
-            = bar >> baz >> bar2
+            = bar >> baz >> bar1 >> bar2
             where
                 bar, baz :: m Char
                 (bar, baz) = c
+                (bar1, baz1) = c :: (m Char, m Char)
                 (bar2, baz2) = c
     Suggested fix: Consider giving ‘baz2’ and ‘bar2’ a type signature
+



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

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/edd61fdc5463aff3fdea91ffbdf659c48b1d02d3
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/20241015/0f27982d/attachment-0001.html>


More information about the ghc-commits mailing list