[Haskell-cafe] Implicit concatenation in list comprehensions

Roel van Dijk vandijk.roel at gmail.com
Mon Jul 20 09:22:24 EDT 2009


On Mon, Jul 20, 2009 at 1:27 PM, Roel van Dijk<vandijk.roel at gmail.com> wrote:
> I think the tuple sections are a great idea! It also makes tuple types
> and constructors more alike:
>
> x :: (,) String Double
> x = (,) "Pi" 3.14159

I just realised this is already in GHC :-) But does you patch also add
the equivalent for tuple type annotations?

x :: (String, ) Double
x = ("Pi", ) 3.14159

I am also wondering what the following would/should mean:

  (1, , ( , 2), ) 'a' 'b' 'c'

Should this mean
  (1, 'a', ('b', 2), 'c')
or
  (1, 'a', ('c', 2), 'b')

Intuitively I would expect the first option. Just reading from left to
right. But it doesn't look entirely trivial.


More information about the Haskell-Cafe mailing list