#7157 closed feature request (wontfix)

'let' keyword optional in do notation

Reported by: Oblosys Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.6.1-rc1
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

Would it be possible to make the 'let' keyword in a do block optional? So instead of

do ...
   let x = exp1
       y = exp2
   z <- exp3
   ...


you could simply write

do ...
   x = exp1
   y = exp2
   z <- exp3    
   ...

Where each sequence of let-less bindings is put in a separate binding group. I'm no parsing wizard, but I couldn't come up with any situations in which this would cause ambiguity. To me, the let-less version is easier on the eyes, more consistent with <- bindings, and also makes it less of a hassle to move stuff around.

The above probably also holds for list/monad comprehensions, but the explicit let has never really bothered me there.

I've also posted the idea on Haskell cafe:
http://www.mail-archive.com/haskell-cafe@haskell.org/msg100541.html

Change History (1)

comment:1 Changed 20 months ago by igloo

  • Difficulty set to Unknown
  • Resolution set to wontfix
  • Status changed from new to closed

Thanks for the suggestion.

However, looking at http://www.haskell.org/pipermail/haskell-cafe/2012-August/102744.html this proposal seems to me to make the language more complex (in particular, which bindings share a scope is less transparent), for little or no gain, so I'm closing as wontfix.

Note: See TracTickets for help on using tickets.