Skip to content
  • Andreas Klebinger's avatar
    49bd7584
    Fix a shadowing issue in StgUnarise. · 49bd7584
    Andreas Klebinger authored and Marge Bot's avatar Marge Bot committed
    For I assume performance reasons we don't record no-op replacements
    during unarise. This lead to problems with code like this:
    
        f = \(Eta_B0 :: VoidType) x1 x2 ->
           ... let foo = \(Eta_B0 :: LiftedType) -> g x y Eta_B0
               in ...
    
    Here we would record the outer Eta_B0 as void rep, but would not
    shadow Eta_B0 inside `foo` because this arg is single-rep and so
    doesn't need to replaced. But this means when looking at occurence
    sites we would check the env and assume it's void rep based on the
    entry we made for the (no longer in scope) outer `Eta_B0`.
    
    Fixes #21396 and the ticket has a few more details.
    49bd7584
    Fix a shadowing issue in StgUnarise.
    Andreas Klebinger authored and Marge Bot's avatar Marge Bot committed
    For I assume performance reasons we don't record no-op replacements
    during unarise. This lead to problems with code like this:
    
        f = \(Eta_B0 :: VoidType) x1 x2 ->
           ... let foo = \(Eta_B0 :: LiftedType) -> g x y Eta_B0
               in ...
    
    Here we would record the outer Eta_B0 as void rep, but would not
    shadow Eta_B0 inside `foo` because this arg is single-rep and so
    doesn't need to replaced. But this means when looking at occurence
    sites we would check the env and assume it's void rep based on the
    entry we made for the (no longer in scope) outer `Eta_B0`.
    
    Fixes #21396 and the ticket has a few more details.
Loading