[Git][ghc/ghc][wip/jade/ast] attempt 2 at fixing the asssert error
Hassan Al-Awwadi (@hassan.awwadi)
gitlab at gitlab.haskell.org
Mon Sep 30 13:42:44 UTC 2024
Hassan Al-Awwadi pushed to branch wip/jade/ast at Glasgow Haskell Compiler / GHC
Commits:
484fba49 by Hassan Al-Awwadi at 2024-09-30T15:42:18+02:00
attempt 2 at fixing the asssert error
if I could manage to get the full build working on my machine I'd test it locally but alas, I wil have to make the gitlab runners do the work...
- - - - -
1 changed file:
- compiler/GHC/Rename/Pat.hs
Changes:
=====================================
compiler/GHC/Rename/Pat.hs
=====================================
@@ -902,7 +902,7 @@ rnHsRecFields ctxt mk_arg (HsRecFields { rec_flds = flds, rec_dotdot = dotdot })
; (rdr_env, lcl_env) <- getRdrEnvs
; conInfo <- lookupConstructorInfo con
; when (conFieldInfo conInfo == ConHasPositionalArgs) (addErr (TcRnIllegalWildcardsInConstructor con))
- ; let present_flds = mkOccSet $ map nameOccName (getFieldLbls flds)
+ ; let present_flds = mkOccSet $ map rdrNameOcc (getFieldRdrs flds)
-- For constructor uses (but not patterns)
-- the arg should be in scope locally;
@@ -1049,8 +1049,9 @@ rnHsRecUpdFields flds
getFieldIds :: [LHsRecField GhcRn arg] -> [Name]
getFieldIds flds = map (hsRecFieldSel . unLoc) flds
--- The call to foLabel might be partial now. Don't know enough about
--- the rest of the function chain to say if this is an issue.
+getFieldRdrs :: [LHsRecField GhcRn arg] -> [RdrName]
+getFieldRdrs flds = map (foExt . unXRec @GhcRn . hfbLHS . unLoc) flds
+
getFieldLbls :: forall p arg . UnXRec p => [LHsRecField p arg] -> [IdP p]
getFieldLbls = map (unXRec @p . foLabel . unXRec @p . hfbLHS . unXRec @p)
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/484fba49b0698a1b7c8de90d98a786d5f55b7814
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/484fba49b0698a1b7c8de90d98a786d5f55b7814
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/20240930/906b9bd8/attachment-0001.html>
More information about the ghc-commits
mailing list