[Git][ghc/ghc][wip/int-index/t2t-expr] Comments for IsPunnedVarOcc
Vladislav Zavialov (@int-index)
gitlab at gitlab.haskell.org
Mon Oct 2 15:38:06 UTC 2023
Vladislav Zavialov pushed to branch wip/int-index/t2t-expr at Glasgow Haskell Compiler / GHC
Commits:
96bbea26 by Vladislav Zavialov at 2023-10-02T18:34:15+03:00
Comments for IsPunnedVarOcc
- - - - -
1 changed file:
- compiler/GHC/Hs/Expr.hs
Changes:
=====================================
compiler/GHC/Hs/Expr.hs
=====================================
@@ -222,9 +222,16 @@ type instance XOverLabel GhcTc = DataConCantHappen
-- ---------------------------------------------------------------------
+-- | Is this variable occurrence punned, i.e. is there a variable with the same
+-- 'occNameFS' but a different 'occNameSpace' in the context?
+--
+-- This is used to reject punned variable occurrences when converting required
+-- type arguments from HsExpr to HsType (see the "T2T-Mapping" section of GHC Proposal #281).
data IsPunnedVarOcc =
DistinctVarOcc
- | PunnedVarOcc Name Name
+ | PunnedVarOcc
+ Name -- how the variable was actually resolved
+ Name -- how it could have been resolved if we were to look in a different namespace
deriving (Eq, Data)
type instance XVar GhcPs = NoExtField
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/96bbea260945576e201a4931e79ec7db755cc821
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/96bbea260945576e201a4931e79ec7db755cc821
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/20231002/d16e5e31/attachment.html>
More information about the ghc-commits
mailing list