It is all explained here:

https://github.com/githwxi/ATS-Xanadu/blob/master/docgen/SYNTAX/fixity.txt

#infix0 : infix with no associativity
#infixl : infix with left associativity
#infixr : infix with right associativity

The way I handle fixity is very similar to that of Haskell. But a bit more
general.
For instance, I allow an operator to be both infix and prefix (or infix and
postfix).
Also, you can do

#infixl ++ of +(-1) //  ++ is infixl and its precedence value is 1 less
than that of +

On Sun, Oct 21, 2018 at 10:43 PM Kiwamu Okabe <kiw...@debian.or.jp> wrote:

> I have question: what is different on following?:
>
> * #infix0
> * #infixl
> * #infixr
>
> How about introduce your infix syntax such like Haskell?
>
> "Infix Functions In Haskell"
>
> https://wuciawe.github.io/functional%20programming/haskell/2016/07/03/infix-functions-in-haskell.html
>
> The infix syntax in Haskell has:
>
> A. order such like `infixl 7 *`
> B. way on left or right
>
> I believe that you already have B on your infix syntax, but not A.
>
> --
> You received this message because you are subscribed to the Google Groups
> "ats-lang-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ats-lang-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ats-lang-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/ats-lang-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ats-lang-users/CAEvX6dm-6B-QuHqDz6u-1RYp%2BjT9y-YCb47VwPPgN5cfdsNq%3DQ%40mail.gmail.com
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"ats-lang-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ats-lang-users+unsubscr...@googlegroups.com.
To post to this group, send email to ats-lang-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ats-lang-users/CAPPSPLopDtVet-sxcOF4NH4GQUiO1Czs2npAFfFyC9nXCsSiGw%40mail.gmail.com.

Reply via email to