recursion-ninja pushed to branch wip/fix-26670 at Glasgow Haskell Compiler / GHC

Commits:

1 changed file:

Changes:

  • compiler/GHC/Tc/TyCl/Instance.hs
    ... ... @@ -2283,14 +2283,8 @@ mkDefMethBind loc dfun_id clas sel_id dm_name dm_spec
    2283 2283
         (_, _, sel_tau) = tcSplitMethodTy (idType sel_id)
    
    2284 2284
         (sel_tvbs, _) = tcSplitForAllInvisTVBinders sel_tau
    
    2285 2285
     
    
    2286
    -    -- Manually change the GHC pass associated with the 'InlinePragma'.
    
    2287
    -    -- Everywhere else in the code base, 'InlinePrgamaInfo' retreived from
    
    2288
    -    -- the 'Id' data-type occurs int he "type-check" phase. The type synonym
    
    2289
    -    -- 'InlinePrgamaInfo' is monomorphic over GHC pass 'GhcTc' for improved
    
    2290
    -    -- code clarity. Here is the only call site which makes storing 'InlinePragma'
    
    2291
    -    -- monomorphically with 'IdInfo' problematic.
    
    2292
    -    -- Rather than parameterizing 'IdInfo' over GhcPass, we simply make one
    
    2293
    -    -- manual correction here at the only problematic call site.
    
    2286
    +    -- We get the 'InlinePragmaInfo' from a typechecked 'Id', but we 
    
    2287
    +    -- want to return the data in 'GhcRn'.
    
    2294 2288
         inlinePragmaToGhcRn :: InlinePragma GhcTc -> InlinePragma GhcRn
    
    2295 2289
         inlinePragmaToGhcRn prag@(InlinePragma { inl_ext = src, inl_act = act }) =
    
    2296 2290
           prag { inl_ext = src, inl_act = act }