new_infix : string * hol_type * int -> unit
$, ---> 50 RIGHT $= ---> 100 NONASSOC $==> ---> 200 RIGHT $\/ ---> 300 RIGHT $/\ ---> 400 RIGHT $>, $< ---> 450 RIGHT $>=, $<= ---> 450 RIGHT $+, $- ---> 500 LEFT $*, $DIV ---> 600 LEFT $MOD ---> 650 LEFT $EXP ---> 700 RIGHT $o ---> 800 RIGHT
Note that the arithmetic operators +, -, *, DIV and MOD are left associative in hol98 releases from Taupo onwards. Non-associative infixes (= above, for example) will cause parse errors if an attempt is made to group them (e.g., x = y = z).
- new_infix("orelse", Type`:bool->bool->bool`, 50); val it = () : unit - Term`T \/ T orelse F`; val it = `T \/ T orelse F` : term - --`$orelse T F`--; val it = `T orelse F` : term - dest_comb (--`T \/ T orelse F`--); > val it = (`$orelse (T \/ T)`, `F`) : term * term