[Haskell-cafe] Fwd: 'let' keyword optional in do notation?
Ryan Ingram
ryani.spam at gmail.com
Mon Aug 13 22:42:39 CEST 2012
> But it would be in line with <- bindings in the do notation, so maybe it
wouldn't feel so wrong.
I was about to post this exact example.
do
x <- return 1
x <- return x
return x
seems to work just fine (the answer is 1). I'd even be ok with =-in-do
being non-recursive like <-
-- ryan
On Thu, Aug 9, 2012 at 1:35 AM, Tillmann Rendel <
rendel at informatik.uni-marburg.de> wrote:
> Hi,
>
>
> Martijn Schrage wrote:
>
>> Would expanding each let-less binding to a separate let "feel" more
>>> sound to you?
>>>
>>> That was actually my first idea, but then two declarations at the same
>> level will not be in the same binding group, so
>>
>> do x = y
>> y = 1
>>
>> would not compile. This would create a difference with all the other
>> places where bindings may appear.
>>
>
> But it would be in line with <- bindings in the do notation, so maybe it
> wouldn't feel so wrong.
>
> Tillmann
>
>
> ______________________________**_________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/**mailman/listinfo/haskell-cafe<http://www.haskell.org/mailman/listinfo/haskell-cafe>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20120813/ea3b7e09/attachment.htm>
More information about the Haskell-Cafe
mailing list