Fix the implementation of lazyId
'lazy' was doing part of its job, but not all! In particular, an application f (lazy e) where f is strict, was still being compiled using call-by-value in CorePrep. This defeated the purpose of defining catch as catch a b = catch# (lazy a) b See Trac #11555, and Neil Mitchell's test case in comment:14 This patch makes 'lazy' behave properly. I updated Note [lazyId magic] in MkId, but all the action is in CorePrep. I can't say I really like this, but it does the job.
Showing with 68 additions and 37 deletions