package lascar

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type ident = string

The type of identifiers occuring in expressions

val pp_ident : Ppx_deriving_runtime.Format.formatter -> ident -> Ppx_deriving_runtime.unit
type value

The type of expression values

val pp_value : Ppx_deriving_runtime.Format.formatter -> value -> Ppx_deriving_runtime.unit
type t =
  1. | EConst of value
    (*

    Constants

    *)
  2. | EVar of ident
    (*

    Input, output or local variable

    *)
  3. | EBinop of string * t * t
    (*

    Binary operation

    *)
  4. | EUnop of char * t
    (*

    Unary operation

    *)

The type of expressions

val pp : Ppx_deriving_runtime.Format.formatter -> t -> Ppx_deriving_runtime.unit
type env = (ident * value option) list
exception Unknown of ident
exception Unknown_op of string
exception Unbound of ident
exception Illegal_expr
val test_ops : (string * (value -> value -> bool)) list

name, fun

val to_string : t -> string
val of_string : string -> t
val lookup : env -> ident -> value
val eval : env -> t -> value
val lexer : string -> Stdlib.Genlex.token Stdlib.Stream.t
val parse : Stdlib.Genlex.token Stdlib.Stream.t -> t
val keywords : string list
val mk_unaries : string -> string
OCaml

Innovation. Community. Security.