[bitc-dev] mixfix meets syntactic categories

Jonathan S. Shapiro shap at eros-os.org
Tue Oct 19 09:34:25 PDT 2010

On Mon, Oct 18, 2010 at 6:12 PM, Mark P. Jones <mpj at cs.pdx.edu> wrote:

> > In Haskell, the precedence of type annotation is very low. This has the
> consequence that type annotation lacks a certain symmetry:
> >
> >   a:int + b => (a:int) + b
> I think you've misunderstood the Haskell grammar.  The first of
> your examples, even after replacing : with ::, is a syntax error.

Mark is (as usual) correct. I had mis-read the grammar. In Haskell, that
annotation needs to be written as:

  (a:int) + b

So I suppose the question now is: where should type annotation be in the
BitC precedence hierarchy? I prefer that it bind tightly, but this probably
just reflects the fact that I'm coming from C, and that is what is familiar.
Is there a strong or compelling reason to have it bind loosely (other than
the mixfix complications)?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.coyotos.org/pipermail/bitc-dev/attachments/20101019/d6aa6d4e/attachment.html 

More information about the bitc-dev mailing list