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
Author: simonpj <unknown>
Fri Sep 17 09:15:44 1999 +0000
From: ghc-devs <[hidden email]>
On Behalf Of Spiwack, Arnaud
Sent: 05 September 2018 15:02
To: [hidden email]
Subject: Rational for the special case in mkWWcpr_help
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.