Module Syncom.Fixity

Description for the fixity of user-defined operators.

type t = private
  1. | Prefix
    (*

    The annotation for prefix operators.

    *)
  2. | Infix
    (*

    The annotation for infix operators.

    *)
  3. | Postfix
    (*

    The annotation for postfix operators.

    *)

The type of annotation for the fixity of an operator.

Let f be an operator and a, a1, a2 be arguments. Then,

  • if f is prefix, then it is called as f a
  • if f is infix, then it is called as a1 f a2
  • if f is postfix, then it is called as a f

Constructors

val prefix : t

prefix is Prefix.

val infix : t

infix is Infix

val postfix : t

postfix is Postfix

Predicates and Comparisons

val is_prefix : t -> bool

is_prefix f is true if and only if f is Prefix.

val is_infix : t -> bool

is_infix f is true if and only if f is Infix.

val is_postfix : t -> bool

is_postfix f is true if and only if f is Postfix.

Instances

include Support.Eq.EQ with type t := t
val equal : t -> t -> bool

equal a b is true if and only if a and b are equal. This should satisfy the following properties:

  • Reflexivity: equal a a = true
  • Symmetry: equal a b is equivalent to equal b a
  • Transitivity: if equal a b = true and equal b c = true, then equal a c = true
val (=) : t -> t -> bool

Operator alias of equal.

val (<>) : t -> t -> bool

Negation of operator (=).