Module Miniml_lib.Ast

type flag =
  1. | Rec
    (*

    Recursive

    *)
  2. | Nonrec
    (*

    Non recursive

    *)

recursive and not recursive flag

val equal_flag : flag -> flag -> Ppx_deriving_runtime.bool
val pp_flag : Ppx_deriving_runtime.Format.formatter -> flag -> Ppx_deriving_runtime.unit
val show_flag : flag -> Ppx_deriving_runtime.string
type bop =
  1. | Plus
    (*

    Addition +

    *)
  2. | Minus
    (*

    Subtraction -

    *)
  3. | Times
    (*

    Multiplication *

    *)
  4. | Divide
    (*

    Division /

    *)
  5. | Eq
    (*

    Equal =

    *)
  6. | Neq
    (*

    Not equal <>

    *)
  7. | Lt
    (*

    Less than <

    *)
  8. | Gt
    (*

    Greater than >

    *)
  9. | Le
    (*

    Less or equal <=

    *)
  10. | Ge
    (*

    Greater or equal >=

    *)

binary operators

val equal_bop : bop -> bop -> Ppx_deriving_runtime.bool
val pp_bop : Ppx_deriving_runtime.Format.formatter -> bop -> Ppx_deriving_runtime.unit
val show_bop : bop -> Ppx_deriving_runtime.string
type name = string
type 'name t =
  1. | Int of int
    (*

    Integer literal

    *)
  2. | Var of 'name
    (*

    Variable x

    *)
  3. | Abs of 'name * 'name t
    (*

    Abstraction fun x -> t

    *)
  4. | App of 'name t * 'name t
    (*

    Application f g

    *)
  5. | Binop of bop * 'name t * 'name t
    (*

    Binary operator a op b

    *)
  6. | Neg of 'name t
    (*

    Negative operator -e

    *)
  7. | If of 'name t * 'name t * 'name t
    (*

    Condition if c then t else e

    *)
  8. | Let of flag * 'name * 'name t * 'name t
    (*

    Let binding let [rec] p = e1 in e2

    *)

The main type for our abstract syntax tree

val equal : ('name -> 'name -> Ppx_deriving_runtime.bool) -> 'name t -> 'name t -> Ppx_deriving_runtime.bool
val pp : (Ppx_deriving_runtime.Format.formatter -> 'name -> Ppx_deriving_runtime.unit) -> Ppx_deriving_runtime.Format.formatter -> 'name t -> Ppx_deriving_runtime.unit
val show : (Ppx_deriving_runtime.Format.formatter -> 'name -> Ppx_deriving_runtime.unit) -> 'name t -> Ppx_deriving_runtime.string