[bitc-dev] Opinions wanted: Infix shift operators

Ben Karel eschew at gmail.com
Mon Aug 9 22:16:02 PDT 2010


"and all but the rightmost in the function type implicitly correspond to
tuple/pair-forming commas."

I was describing a possible alternate syntax, not describing Haskell ;-)

So bar would be written in Haskell as

bar :: (a, c) -> c
bar (a, c) = c

Clearer now?

On Tue, Aug 10, 2010 at 12:08 AM, wren ng thornton <wren at freegeek.org>wrote:

> Ben Karel wrote:
> > Another way of looking at the hypothetical syntax is that fn type arrows
> > become left-associative instead of right-associative,
>
> Ah, no.
>
>     foo :: (a -> c) -> c
>     foo f = f a
>
>     bar :: a -> c -> c
>     bar a c = c
>
> No matter what syntax you put that through, they mean very different
> things.
>
> --
> Live well,
> ~wren
> _______________________________________________
> bitc-dev mailing list
> bitc-dev at coyotos.org
> http://www.coyotos.org/mailman/listinfo/bitc-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.coyotos.org/pipermail/bitc-dev/attachments/20100810/89c22e00/attachment.html 


More information about the bitc-dev mailing list