Rational for the special case in mkWWcpr_help

Dear all, The function mkWWcpr_help, which creates a wrapper and a worker after strictness analysis, has a special case when there is a single result of unlifted type: Wrapper: case (..call worker..) of x -> C x Worker: case ( ..body.. ) of C x -> x But I don't understand how it is different from using (# #) as would result from the general case: Wrapper: case (..call worker..) of (# x #) -> C x Worker: case ( ..body.. ) of C x -> (# x #) That is, my understanding of the latter is that it would yield the exact same code. I'm obviously missing something, I'd love to know what. Best, Arnaud

I think it would yield the same code in the end. Maybe it was just seeking to avoid unnecessary clutter in a particularly common case (eg returning I# x).
Seems to have been introduce in
commit 731f53de7930c38b5023a871146bd0ec066edf3a
Author: simonpj <unknown>
Fri Sep 17 09:15:44 1999 +0000
Simon
From: ghc-devs
participants (2)
-
Simon Peyton Jones
-
Spiwack, Arnaud