package gospel

  1. Overview
  2. Docs

Module Gospel.DtermSource

Sourcetype dty =
  1. | Tvar of dtvar
  2. | Tapp of Ttypes.tysymbol * dty list
  3. | Tty of Ttypes.ty
Sourceand dtvar = {
  1. dtv_id : int;
  2. mutable dtv_def : dty option;
}
Sourceval dty_fresh : unit -> dty
Sourceval dty_of_ty : Ttypes.ty -> dty
Sourceval ty_of_dty : dty -> Ttypes.ty
Sourceval dty_integer : dty
Sourceval dty_bool : dty
Sourceval dty_float : dty
Sourceval dty_char : dty
Sourceval dty_string : dty
Sourceval specialize_ls : Tterm.lsymbol -> dty list * dty option
Sourceexception ConstructorExpected of Tterm.lsymbol
Sourceval specialize_cs : loc:Ppxlib.Location.t -> Tterm.lsymbol -> dty list * dty
Sourcemodule Mstr : sig ... end
Sourcetype dpattern = {
  1. dp_node : dpattern_node;
  2. dp_dty : dty;
  3. dp_vars : dty Mstr.t;
  4. dp_loc : Ppxlib.Location.t;
}
Sourceand dpattern_node =
  1. | DPwild
  2. | DPvar of Identifier.Preid.t
  3. | DPapp of Tterm.lsymbol * dpattern list
  4. | DPor of dpattern * dpattern
  5. | DPas of dpattern * Identifier.Preid.t
  6. | DPcast of dpattern * dty
Sourcetype dbinder = Identifier.Preid.t * dty
Sourcetype dterm = {
  1. dt_node : dterm_node;
  2. dt_dty : dty option;
  3. dt_loc : Ppxlib.Location.t;
}
Sourceand dterm_node =
  1. | DTattr of dterm * string list
  2. | DTvar of Identifier.Preid.t
  3. | DTconst of Ppxlib.Parsetree.constant
  4. | DTapp of Tterm.lsymbol * dterm list
  5. | DTif of dterm * dterm * dterm
  6. | DTlet of Identifier.Preid.t * dterm * dterm
  7. | DTcase of dterm * (dpattern * dterm) list
  8. | DTquant of Tterm.quant * dbinder list * dterm
  9. | DTbinop of Tterm.binop * dterm * dterm
  10. | DTnot of dterm
  11. | DTold of dterm
  12. | DTtrue
  13. | DTfalse
Sourceval dty_of_dterm : dterm -> dty
Sourceval head : dty -> dty
Sourceval occur : int -> dty -> bool
Sourceval unify_dty_ty : dty -> Ttypes.ty -> unit
Sourceexception PatternBadType of dty * dty
Sourceexception BadType of dty * dty
Sourceexception FmlaExpected
Sourceexception TermExpected
Sourceval app_unify : loc:Ppxlib.Location.t -> Tterm.lsymbol -> ('a -> 'b -> unit) -> 'a list -> 'b list -> unit
Sourceval app_unify_map : loc:Ppxlib.Location.t -> Tterm.lsymbol -> ('a -> 'b -> 'c) -> 'a list -> 'b list -> 'c list
Sourceval dpattern_unify : dpattern -> dty -> unit
Sourceval dty_unify : loc:Ppxlib.Location.t -> dty -> dty -> unit
Sourceval dterm_unify : dterm -> dty -> unit
Sourceval dfmla_unify : dterm -> unit
Sourceval unify : dterm -> dty option -> unit
Sourcetype denv = dty Mstr.t
Sourceexception DuplicatedVar of string
Sourceexception UnboundVar of string
Sourceval denv_find : loc:Ppxlib.Location.t -> Mstr.key -> 'a Mstr.t -> 'a
Sourceval is_in_denv : 'a Mstr.t -> Mstr.key -> bool
Sourceval denv_empty : 'a Mstr.t
Sourceval denv_get_opt : 'a Mstr.t -> Mstr.key -> 'a option
Sourceval denv_add_var : 'a Mstr.t -> Mstr.key -> 'a -> 'a Mstr.t
Sourceval denv_add_var_quant : 'a Mstr.t -> (Identifier.Preid.t * 'a) list -> 'a Mstr.t

coercions

Sourceval apply_coercion : Tterm.lsymbol list -> dterm -> dterm
Sourceval ts_of_dty : dty option -> Ttypes.tysymbol
Sourceval ty_of_dty_raw : dty option -> Ttypes.ty
Sourceval max_dty : Coercion.t -> dterm list -> dty option
Sourceval dterm_expected_op : Coercion.t -> dterm -> dty option -> dterm
Sourceval dfmla_expected : Coercion.t -> dterm -> dterm
Sourceval dterm_expected : Coercion.t -> dterm -> dty -> dterm

dterm to tterm

Sourceval term_node : Tterm.vsymbol Mstr.t -> bool -> dty option -> dterm_node -> Ppxlib.Location.t -> Tterm.term
Sourceval flatten : dty -> dty
Sourceval print_dty : dty Utils.Fmt.t
Sourceval print_dpattern : dpattern Utils.Fmt.t
Sourceval print_dterm : dterm Utils.Fmt.t
OCaml

Innovation. Community. Security.