Skip to content

Changes to HsRecField'

This is a sub-task of issue #19463.

  • Rename HsRecField' to HsFieldBind
  • Change its definition to:
    type instance XXHsFieldBind (GhcPass _) = NoExtCon
    
    data HsFieldBind p lhs rhs =
        HsFieldBind {
          hfbAnn :: XHsFieldBind lhs,
          hfbLHS    :: lhs,
          hfbRHS    :: rhs,           -- ^ Filled in by renamer when punning
          hfbPun    :: Bool           -- ^ Note [Punning]
       }
       | XHsFieldBind !(XXHsFieldBind p)
    
    type HsRecField p arg = HsFieldBind p (LFieldOcc p) arg
  • This changes XHsRecField to XHsFieldBind
  • hsRecFieldLbl now renamed hfbLHS no longer includes Located in its defn
  • Update call-sites (Located) moves to the call-sites):
    • HsRecField
    • HsRecUpdField
    • RecProj p arg (for the interim until eliminated in a later pass)
    • After this one assumes these Locateds should be replaced with XRec p
Edited by Shayne Fletcher
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information