
29 Oct
2017
29 Oct
'17
9:06 p.m.
Hi folks, I was debugging a Core-to-Core transform for TEST=spec-inline https://github.com/ghc/ghc/blob/fe04f3783b662c52c4a0ff36b2d62a7a575998a5/tes... and was wondering (yet again) why GHC produces unlifted `let` bindings in Core like it seems supposed to be doing https://github.com/ghc/ghc/blob/fe04f3783b662c52c4a0ff36b2d62a7a575998a5/tes... . - Why doesn't this use `case` instead? - Is there a semantic difference? - Can `case` be used with unlifted types? - And if not, why can `let`? Unlifted `let` seems much close to `case` than to `let`. Some GHC passes seem to agree. https://github.com/ghc/ghc/search?l=Haskell&q=%22strict+let%22&type=&utf8=%E2%9C%93 Cheers, Sebastian