[Git][ghc/ghc][wip/T23916] Wibbles

Simon Peyton Jones (@simonpj) gitlab at gitlab.haskell.org
Tue Sep 26 14:48:59 UTC 2023



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


Commits:
0ddbf9cb by Simon Peyton Jones at 2023-09-26T15:48:45+01:00
Wibbles

- - - - -


4 changed files:

- compiler/GHC/Parser/Errors/Ppr.hs
- testsuite/tests/parser/should_fail/patFail001.stderr
- testsuite/tests/typecheck/should_fail/T17139.stderr
- testsuite/tests/typecheck/should_fail/tcfail140.stderr


Changes:

=====================================
compiler/GHC/Parser/Errors/Ppr.hs
=====================================
@@ -332,7 +332,7 @@ instance Diagnostic PsMessage where
     PsErrLetInPat
       -> mkSimpleDecorated $ text "(let ... in ...)-syntax in pattern"
     PsErrLambdaInPat lam_variant
-      -> mkSimpleDecorated $ lamCaseKeyword lam_variant <+> text "...-syntax in pattern"
+      -> mkSimpleDecorated $ text "Illegal" <+> lamCaseKeyword lam_variant <> text "-syntax in pattern"
     PsErrArrowExprInPat e
       -> mkSimpleDecorated $ text "Expression syntax in pattern:" <+> ppr e
     PsErrArrowCmdInPat c


=====================================
testsuite/tests/parser/should_fail/patFail001.stderr
=====================================
@@ -1,4 +1,3 @@
 
 patFail001.hs:3:4: error: [GHC-00482]
-    Lambda-syntax in pattern.
-    Pattern matching on functions is not possible.
+    Illegal lambda-syntax in pattern


=====================================
testsuite/tests/typecheck/should_fail/T17139.stderr
=====================================
@@ -7,7 +7,7 @@ T17139.hs:15:16: error: [GHC-88464]
                  lift :: forall a b (f :: * -> *). (a -> b) -> TypeFam f (a -> b)
                at T17139.hs:14:1-38
     • In the expression: _ (f <*> x)
-      The lambda expression ‘\ x -> _ (f <*> x)’ has one value argument,
+      The lambda expression ‘\ x -> ...’ has one value argument,
         but its type ‘TypeFam f (a -> b)’ has none
       In the expression: \ x -> _ (f <*> x)
     • Relevant bindings include


=====================================
testsuite/tests/typecheck/should_fail/tcfail140.stderr
=====================================
@@ -28,7 +28,7 @@ tcfail140.hs:15:15: error: [GHC-83865]
 tcfail140.hs:17:8: error: [GHC-27346]
     • The data constructor ‘Just’ should have 1 argument, but has been given none
     • In the pattern: Just
-      The lambda expression ‘\ Just x -> x’ has two value arguments,
+      The lambda expression ‘\ Just x -> ...’ has two value arguments,
         but its type ‘Maybe a -> a’ has only one
       In the expression: ((\ Just x -> x) :: Maybe a -> a) (Just 1)
 



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

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


More information about the ghc-commits mailing list