[Haskell-cafe] Fwd: 'let' keyword optional in do notation?
Martijn Schrage
martijn at oblomov.com
Wed Aug 8 19:50:14 CEST 2012
On 08-08-12 19:01, Simon Hengel wrote:
> On Wed, Aug 08, 2012 at 12:22:39PM -0400, David Feuer wrote:
>> Changing scoping rules based on whether things are right next to each
>> other? No thanks.
> 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.
However, having scope depend on things being next to each other (or
rather, not having anything in between) is not new. Template Haskell
declaration splices already cause separate binding groups for top-level
declarations. Moreover, the new scope rule only holds for let-less
bindings. If you use explicit lets nothing changes.
-- Martijn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20120808/c2daa353/attachment.htm>
More information about the Haskell-Cafe
mailing list