[Haskell-cafe] "Assignment" in do blocks?

Anupam Jain ajnsit at gmail.com
Thu Aug 27 13:30:22 UTC 2015

On Wed, Aug 26, 2015 at 9:39 PM, Kim-Ee Yeoh <ky3 at atamo.com> wrote:
> On Wed, Aug 26, 2015 at 7:25 PM, Anupam Jain <ajnsit at gmail.com> wrote:
>> What I'd like to do instead is something like -
>>     let foo = bar foo
>> But to Haskell this is a recursive definition instead of an update to
>> the previous value.
> This is a chestnut at least two years old. Last time I remember, the
> discussion frothed under the rubric of "non-recursive let":
> https://mail.haskell.org/pipermail/haskell-cafe/2013-July/109116.html

Thanks for linking to that discussion. However that discussion seems
to be revolving around the non-recursive let. What I propose is only
an extension to the do-notation desugaring, which seems more benign.

I wrote this email yesterday when I ran into a rather hard-to-find bug
because I used `foo` where I should have used `foo'`. I think it's an
unnecessary wart that can easily go away with a little bit of
syntactic sugar.

More information about the Haskell-Cafe mailing list