
See Note [CoreSyn let/app invariant] in CoreSyn.
Briefly, you can write
let x::Int# = e in …
if e is “ok-for-speculation”. See extensive comments in CoreUtils on what that means.
You could also use case, but let-bindings “float” more easily than cases, because they are not worried about preserving exception behaviour.
Simon
From: ghc-devs [mailto:ghc-devs-bounces@haskell.org] On Behalf Of Sebastian Graf
Sent: 29 October 2017 21:07
To: ghc-devs