[Git][ghc/ghc][wip/fix-26670] Apply 1 suggestion(s) to 1 file(s)
recursion-ninja pushed to branch wip/fix-26670 at Glasgow Haskell Compiler / GHC Commits: d9324f72 by recursion-ninja at 2025-12-24T01:34:08+00:00 Apply 1 suggestion(s) to 1 file(s) Co-authored-by: Rodrigo Mesquita <rodrigo.m.mesquita@gmail.com> - - - - - 1 changed file: - compiler/GHC/Tc/TyCl/Instance.hs Changes: ===================================== compiler/GHC/Tc/TyCl/Instance.hs ===================================== @@ -2283,14 +2283,8 @@ mkDefMethBind loc dfun_id clas sel_id dm_name dm_spec (_, _, sel_tau) = tcSplitMethodTy (idType sel_id) (sel_tvbs, _) = tcSplitForAllInvisTVBinders sel_tau - -- Manually change the GHC pass associated with the 'InlinePragma'. - -- Everywhere else in the code base, 'InlinePrgamaInfo' retreived from - -- the 'Id' data-type occurs int he "type-check" phase. The type synonym - -- 'InlinePrgamaInfo' is monomorphic over GHC pass 'GhcTc' for improved - -- code clarity. Here is the only call site which makes storing 'InlinePragma' - -- monomorphically with 'IdInfo' problematic. - -- Rather than parameterizing 'IdInfo' over GhcPass, we simply make one - -- manual correction here at the only problematic call site. + -- We get the 'InlinePragmaInfo' from a typechecked 'Id', but we + -- want to return the data in 'GhcRn'. inlinePragmaToGhcRn :: InlinePragma GhcTc -> InlinePragma GhcRn inlinePragmaToGhcRn prag@(InlinePragma { inl_ext = src, inl_act = act }) = prag { inl_ext = src, inl_act = act } View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d9324f725fcc367387b9ecacf1f3376a... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d9324f725fcc367387b9ecacf1f3376a... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
recursion-ninja (@recursion-ninja)