[Git][ghc/ghc][wip/jade/ast] remove resolved comments
Hassan Al-Awwadi (@hassan.awwadi)
gitlab at gitlab.haskell.org
Wed Sep 25 16:23:51 UTC 2024
Hassan Al-Awwadi pushed to branch wip/jade/ast at Glasgow Haskell Compiler / GHC
Commits:
5d80a324 by Hassan Al-Awwadi at 2024-09-25T18:23:27+02:00
remove resolved comments
- - - - -
3 changed files:
- compiler/GHC/Hs/Type.hs
- compiler/GHC/Rename/Bind.hs
- compiler/GHC/Rename/Pat.hs
Changes:
=====================================
compiler/GHC/Hs/Type.hs
=====================================
@@ -1115,10 +1115,8 @@ updFieldOccLRdrName (UpdFieldOcc _ (L _ fo)) = fieldOccLRdrName fo
updFieldOccLRdrName (XUpdFieldOcc xfo) = case ghcPass @p of
GhcRn -> case xfo of
Ambiguous l -> l
- -- Are these cases required? I don't get a hint that they aren't so
- -- they are included for now.
- GhcPs -> case xfo of
- GhcTc -> case xfo of
+ GhcPs -> dataConCantHappen xfo
+ GhcTc -> dataConCantHappen xfo
fieldOccRdrName :: forall p. IsPass p => FieldOcc (GhcPass p) -> RdrName
fieldOccRdrName fo = case ghcPass @p of
=====================================
compiler/GHC/Rename/Bind.hs
=====================================
@@ -823,10 +823,8 @@ rnPatSynBind sig_fn bind@(PSB { psb_id = L l name
, psb_dir = dir'
, psb_ext = fvs' }
selector_names = case details' of
- RecCon names ->
- -- I don't actually know if its fine or not
- -- that foLabel is partial.
- map (unLoc . foLabel . recordPatSynField) names
+ RecCon names ->
+ map (unLoc . foLabel . recordPatSynField) names
_ -> []
; fvs' `seq` -- See Note [Free-variable space leak]
=====================================
compiler/GHC/Rename/Pat.hs
=====================================
@@ -1043,10 +1043,8 @@ rnHsRecUpdFields flds
, hfbPun = pun })
; (flds', fvs') <- rn_flds pun_ok (tail <$> mb_unambig_lbls) flds
; return (fld' : flds', fvs `plusFV` fvs') }
- -- I have been told this datacon isn't necessary and yet my ghc gets mad at me
- -- when I don't add it.
rn_flds _ _ ((L _ (HsFieldBind { hfbLHS = L _ (XUpdFieldOcc impossible ) })):_)
- = case impossible of
+ = dataConCantHappen impossible
getFieldIds :: [LHsRecField GhcRn arg] -> [Name]
getFieldIds flds = map (hsRecFieldSel . unLoc) flds
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/5d80a32415fc4397aa39e701bb08a77731a6e46c
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/5d80a32415fc4397aa39e701bb08a77731a6e46c
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/20240925/47c1da37/attachment-0001.html>
More information about the ghc-commits
mailing list