[Haskell] Views in Haskell

Simon Peyton-Jones simonpj at microsoft.com
Wed Jan 24 12:37:54 EST 2007


Let me urge everyone, once more, to conduct this interesting discussion on the haskell-prime mailing list. It's quite open --- anyone can subscribe --- and we'll avoid spamming the main Haskell list.

I'll send responses there.

Simon

| -----Original Message-----
| From: haskell-bounces at haskell.org [mailto:haskell-bounces at haskell.org] On Behalf Of Duncan Coutts
| Sent: 24 January 2007 15:25
| To: Malcolm Wallace
| Cc: haskell at haskell.org
| Subject: Re: [Haskell] Views in Haskell
|
| On Wed, 2007-01-24 at 14:58 +0000, Malcolm Wallace wrote:
|
| > To add to the bikeshed discussion of syntax, did you consider and reject
| > the obvious use of '<-' rather than '->', which would more closely match
| > the pattern guard syntax?
|
| > Using the '<-' arrow does not seem to obscure
| > this feature too much:
| >       parsePacket ((n, (val,bs) <- bits n) <- bits 3) = ...
| > vs
| >       parsePacket (bits 3 -> (n, (bits n -> val bs))) = ...
|
| The main drawback to this is that we don't get the left to right binders
| and uses. That is we use 'n' as a variable binder when we extract the 3
| bits and then use that later to decide how many bits to extract. With
| the '<-' form the flow is all back and forth rather than left to right.


...etc...



More information about the Haskell mailing list