Skip to content
  • Simon Peyton Jones's avatar
    Fix an ASSERT failure with profiling · 9e6ca39b
    Simon Peyton Jones authored
    The problem arose with this kind of thing
    
       x = (,) (scc "blah" Nothing)
    
    Then 'x' is marked NoCafRefs by CoreTidy, becuase it has 
    arity 1, and doesn't mention any caffy things.
    
    That in turns means that CorePrep must not float out the
    sat binding to give
    
      sat = scc "blah" Nothing
      x = (,) sat
    
    Rather we must generate
    
      x = \eta. let sat = scc "blah" Nothing 
                in (,) sat eta
    
    URGH! This Caf stuff is such a mess.
    9e6ca39b