Module Cduce_core.Typed

module U = Encodings.Utf8
type tpat = Patterns.node
type ttyp = Cduce_types.Types.Node.t
type texpr = {
exp_loc : Cduce_loc.loc;
mutable exp_typ : Cduce_types.Types.t;
exp_descr : texpr';
}
and texpr' =
| Forget of texpr * ttyp
| Check of Cduce_types.Types.t Stdlib.ref * texpr * ttyp
| Var of Cduce_types.Ident.id
| ExtVar of Cduce_types.Compunit.t * Cduce_types.Ident.id * Cduce_types.Types.t
| Apply of texpr * texpr
| Abstraction of abstr
| Cst of Cduce_types.Types.const
| Pair of texpr * texpr
| Xml of texpr * texpr * Ns.table option
| RecordLitt of texpr Cduce_types.Ident.label_map
| String of U.uindex * U.uindex * U.t * texpr
| Abstract of Cduce_types.AbstractSet.V.t
| Match of texpr * branches
| Map of texpr * branches
| Transform of texpr * branches
| Xtrans of texpr * branches
| Validate of texpr * Cduce_types.Types.t * Schema_validator.t
| RemoveField of texpr * Cduce_types.Ident.label
| Dot of texpr * Cduce_types.Ident.label
| Try of texpr * branches
| Ref of texpr * ttyp
| External of Cduce_types.Types.t * [ `Builtin of string | `Ext of int ]
| Op of string * int * texpr list
| NsTable of Ns.table * texpr'
and abstr = {
fun_name : Cduce_types.Ident.id option;
fun_iface : (Cduce_types.Types.t * Cduce_types.Types.t) list;
fun_body : branches;
fun_typ : Cduce_types.Types.t;
fun_fv : Cduce_types.Ident.fv;
fun_is_poly : bool;
}
and let_decl = {
let_pat : tpat;
let_body : texpr;
}
and branches = {
mutable br_typ : Cduce_types.Types.t;
br_accept : Cduce_types.Types.t;
br_branches : branch list;
}
and branch = {
br_loc : Cduce_loc.loc;
mutable br_used : bool;
br_ghost : bool;
mutable br_vars_empty : Cduce_types.Ident.fv;
br_pat : tpat;
br_body : texpr;
}
val is_value : texpr -> bool
val is_value_branches : branches -> bool