Skip to main content
7 events
when toggle format what by license comment
Apr 27 at 1:34 vote accept DylanSp
Mar 25 at 16:20 answer added Robert Long timeline score: 7
May 8, 2018 at 18:15 comment added Jon Purdy 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.
May 1, 2018 at 16:21 history tweeted twitter.com/StackSoftEng/status/991351913475133446
Apr 30, 2018 at 15:25 review Close votes
May 15, 2018 at 3:04
Apr 30, 2018 at 15:03 comment added cHao Why shouldn't it?
Apr 30, 2018 at 14:03 history asked DylanSp CC BY-SA 3.0