[Git][ghc/ghc][wip/sand-witch/lazy-skol] Wibble

Simon Peyton Jones (@simonpj) gitlab at gitlab.haskell.org
Tue Jan 9 00:32:15 UTC 2024



Simon Peyton Jones pushed to branch wip/sand-witch/lazy-skol at Glasgow Haskell Compiler / GHC


Commits:
b6ef2663 by Simon Peyton Jones at 2024-01-09T00:32:03+00:00
Wibble

- - - - -


5 changed files:

- compiler/GHC/Tc/Gen/Pat.hs
- libraries/base/tests/T23454.stderr
- testsuite/tests/vdq-rta/should_fail/T22326_fail_match.stderr
- testsuite/tests/vdq-rta/should_fail/T22326_fail_n_args.stderr
- testsuite/tests/vdq-rta/should_fail/T22326_fail_pat.stderr


Changes:

=====================================
compiler/GHC/Tc/Gen/Pat.hs
=====================================
@@ -433,6 +433,10 @@ tc_forall_lpat tv penv (L span pat) thing_inside
         ; return (L span pat', res) }
 
 tc_forall_pat :: TcTyVar -> Checker (Pat GhcRn) (Pat GhcTc)
+tc_forall_pat tv penv (ParPat x lpat) thing_inside
+  = do { (lpat', res) <- tc_forall_lpat tv penv lpat thing_inside
+       ; return (ParPat x lpat', res) }
+
 tc_forall_pat tv _ (EmbTyPat _ tp) thing_inside
   -- The entire type pattern is guarded with the `type` herald:
   --    f (type t) (x :: t) = ...
@@ -440,6 +444,7 @@ tc_forall_pat tv _ (EmbTyPat _ tp) thing_inside
   -- a redundant `ExpansionPat` node.
   = do { (arg_ty, result) <- tc_ty_pat tp tv thing_inside
        ; return (EmbTyPat arg_ty tp, result) }
+
 tc_forall_pat tv _ pat thing_inside
   -- The type pattern is not guarded with the `type` herald, or perhaps
   -- only parts of it are, e.g.


=====================================
libraries/base/tests/T23454.stderr
=====================================
@@ -19,6 +19,3 @@ T23454.hs:12:38: error: [GHC-25897]
           Nothing -> error "bug fixed"
     • Relevant bindings include
         bogus :: a :~: b (bound at T23454.hs:12:1)
-   |
-12 | bogus = case testEquality (SNat @a) (coerce (SNat @a) :: SNat b) of
-   |                                      ^^^^^^


=====================================
testsuite/tests/vdq-rta/should_fail/T22326_fail_match.stderr
=====================================
@@ -7,6 +7,3 @@ T22326_fail_match.hs:7:4: error: [GHC-25897]
         at T22326_fail_match.hs:7:1-25
     • In the pattern: type (Maybe a)
       In an equation for ‘f’: f (type (Maybe a)) x = ()
-  |
-7 | f (type (Maybe a)) x = ()
-  |    ^^^^^^^^^^^^^^


=====================================
testsuite/tests/vdq-rta/should_fail/T22326_fail_n_args.stderr
=====================================
@@ -7,6 +7,3 @@ T22326_fail_n_args.hs:6:1: error: [GHC-25897]
         at T22326_fail_n_args.hs:6:1-26
     • The equation for ‘f’ has three value arguments,
         but its type ‘a -> forall b -> b’ has only two
-  |
-6 | f x (type y) z = undefined
-  | ^^^^^^^^^^^^^^^^^^^^^^^^^^


=====================================
testsuite/tests/vdq-rta/should_fail/T22326_fail_pat.stderr
=====================================
@@ -7,6 +7,3 @@ T22326_fail_pat.hs:9:4: error: [GHC-25897]
         at T22326_fail_pat.hs:9:1-17
     • In the pattern: type Int
       In an equation for ‘f’: f (type Int) = ()
-  |
-9 | f (type Int) = ()
-  |    ^^^^^^^^



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

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/b6ef2663ff82a3992bd6bff73ff17ac89817bce0
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/20240108/3e36ec74/attachment-0001.html>


More information about the ghc-commits mailing list