Skip to content
  • Krzysztof Gogolewski's avatar
    Fixes to rubbish literals · f435d55f
    Krzysztof Gogolewski authored and Marge Bot's avatar Marge Bot committed
    * In CoreToStg, the application 'RUBBISH[rep] x' was simplified
      to 'RUBBISH[rep]'. But it is possible that the result of the function
      is represented differently than the function.
    * In Unarise, 'LitRubbish (primRepToType prep)'
      is incorrect: LitRubbish takes a RuntimeRep such as IntRep,
      while primRepToType returns a type such as Any @(TYPE IntRep). Use
      primRepToRuntimeRep instead.
      This code is never run in the testsuite.
    * In StgToByteCode, all rubbish literals were assumed to be boxed.
      This code predates representation-polymorphic RubbishLit and I think
      it was not updated.
    
    I don't have a testcase for any of those issues, but the code looks
    wrong.
    f435d55f