[Git][ghc/ghc][wip/ttg-con-pat] Add comments from SPJ.

cgibbard gitlab at gitlab.haskell.org
Mon Apr 13 14:31:12 UTC 2020



cgibbard pushed to branch wip/ttg-con-pat at Glasgow Haskell Compiler / GHC


Commits:
197d2abd by Cale Gibbard at 2020-04-13T10:31:02-04:00
Add comments from SPJ.

- - - - -


1 changed file:

- compiler/GHC/Hs/Pat.hs


Changes:

=====================================
compiler/GHC/Hs/Pat.hs
=====================================
@@ -307,6 +307,7 @@ type instance XSigPat GhcTc = Type
 type instance XXPat GhcPs = NoExtCon
 type instance XXPat GhcRn = NoExtCon
 type instance XXPat GhcTc = CoPat
+  -- After typechecking, we add one extra constructor: CoPat
 
 type family ConLikeP x
 
@@ -325,6 +326,8 @@ hsConPatArgs (PrefixCon ps)   = ps
 hsConPatArgs (RecCon fs)      = map (hsRecFieldArg . unLoc) (rec_flds fs)
 hsConPatArgs (InfixCon p1 p2) = [p1,p2]
 
+-- | This is the extension field for ConPat, added after typechecking
+-- It adds quite a few extra fields, to support elaboration of pattern matching.
 data ConPatTc
   = ConPatTc
     { -- | The universal arg types  1-1 with the universal



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

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/197d2abdd3e6f83e4b2f9b2f1006a0ac8e097658
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/20200413/cd25bf70/attachment-0001.html>


More information about the ghc-commits mailing list