• Sebastian Graf's avatar
    Don't attach CPR signatures to NOINLINE data structures (#18154) · e3655f81
    Sebastian Graf authored
    Because the generated `KindRep`s don't have an unfolding, !3230 did not
    actually stop to compute, attach and serialise unnecessary CPR
    signatures for them. As already said in
    `Note [CPR for data structures]`, that leads to bloated interface
    files which is ultimately quadratic for Nested CPR.
    
    So we don't attach any CPR signature to bindings that
    
      * Are not thunks (because thunks are not in WHNF)
      * Have arity 0 (which means the top-level constructor is not a lambda)
    
    If the data structure has an unfolding, we continue to look through it.
    If not (as is the case for `KindRep`s), we look at the unchanged CPR
    signature and see `topCprType`, as expected.
    e3655f81
T7360.stderr 7.62 KB