[Haskell-cafe] Implicit concatenation in list comprehensions

Max Bolingbroke batterseapower at hotmail.com
Mon Jul 20 15:14:30 EDT 2009


2009/7/20 Roel van Dijk <vandijk.roel at gmail.com>:
> 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

It doesn't, and indeed it would only work in the special case where
your only missing type arguments are on the right (since we lack
type-level lambda, we can only accept eta-reduced forms). So it
probably wouldn't be worth it - it wouldn't allow you to write
anything significantly shorter than the existing form "(,) String".

Cheers,
Max


More information about the Haskell-Cafe mailing list