Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • Why shouldn't it? Commented Apr 30, 2018 at 15:03
  • 2
    Not sure why GHC specifically does this, but I’ll take a wild guess that it’s just about making it convenient to implement efficiently. If you have let ones = 1 : ones you can compile it directly to something like ones = { push ones; push 1; jump (:) }, while with the desugared version, let ones = fix (\ self -> 1 : self), you have to recognise that you can inline the lambda and avoid the allocation of a thunk for the application of the lambda to its own application. Presumably it’s also more convenient to work with a group of recursive let bindings than the same in terms of fix. Commented May 8, 2018 at 18:15