[Git][ghc/ghc][wip/sand-witch/pattern- at a-binders] Add comment about HstyPatRn

Andrei Borzenkov (@sand-witch) gitlab at gitlab.haskell.org
Fri Jul 14 10:14:36 UTC 2023



Andrei Borzenkov pushed to branch wip/sand-witch/pattern- at a-binders at Glasgow Haskell Compiler / GHC


Commits:
07dd34ec by Andrei Borzenkov at 2023-07-14T14:14:26+04:00
Add comment about HstyPatRn

- - - - -


1 changed file:

- compiler/GHC/Hs/Type.hs


Changes:

=====================================
compiler/GHC/Hs/Type.hs
=====================================
@@ -232,6 +232,13 @@ data HsPSRn = HsPSRn
   }
   deriving Data
 
+-- HsTyPatRn is the extension field for `HsTyPat`, after renaming
+-- E.g. pattern K @(Maybe (_x, a, b::Proxy k)
+-- In the type pattern @(Maybe ...):
+--    '_x' is a named wildcard
+--    'a'  is explicitly bound
+--    'k'  is implicitly bound
+-- See Note [Implicit and explicit type variable binders] in GHC.Rename.Pat
 data HsTyPatRn = HsTPRn
   { hstp_nwcs    :: [Name] -- ^ Wildcard names
   , hstp_imp_tvs :: [Name] -- ^ Implicitly bound variable names



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

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/07dd34ec00956acf326fab0fad8b2b2b947760a3
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/20230714/01cbb43e/attachment.html>


More information about the ghc-commits mailing list