[Haskell-cafe] Re: Suggestion: Syntactic sugar for Maps!

Luke Palmer lrpalmer at gmail.com
Fri Nov 28 02:06:56 EST 2008


On Fri, Nov 28, 2008 at 12:04 AM, Jules Bean <jules at jellybean.co.uk> wrote:
> I can't see the context of the beginning of this thread, but I've always
> found:
>
> fromList [("hello",1),("there",2)]
>
> to be a relatively simple syntax, and still checked at compile time.

I never liked that.  Too much syntax overhead.  But this clears it right up:

    foo = fromList [ "hello" >: 1, "there" >: 2 ]
      where (:>) = (,)

And also I haven't been following the thread, so this may not be any
kind of answer.

Luke


More information about the Haskell-Cafe mailing list