• en

Module Lambda

type compile_time_constant =
| Big_endian
| Word_size
| Ostype_unix
| Ostype_win32
| Ostype_cygwin
type loc_kind =
| Loc_FILE
| Loc_LINE
| Loc_MODULE
| Loc_LOC
| Loc_POS
type primitive =
| Pidentity
| Pignore
| Prevapply of Location.t
| Pdirapply of Location.t
| Ploc of loc_kind
| Pgetglobal of Ident.t
| Psetglobal of Ident.t
| Pmakeblock of int * Asttypes.mutable_flag
| Pfield of int
| Psetfield of int * bool
| Pfloatfield of int
| Psetfloatfield of int
| Pduprecord of Types.record_representation * int
| Plazyforce
| Praise of raise_kind
| Psequand
| Psequor
| Pnot
| Pnegint
| Paddint
| Psubint
| Pmulint
| Pdivint
| Pmodint
| Pandint
| Porint
| Pxorint
| Plslint
| Plsrint
| Pasrint
| Pintcomp of comparison
| Poffsetint of int
| Poffsetref of int
| Pintoffloat
| Pfloatofint
| Pnegfloat
| Pabsfloat
| Paddfloat
| Psubfloat
| Pmulfloat
| Pdivfloat
| Pfloatcomp of comparison
| Pstringlength
| Pstringrefu
| Pstringsetu
| Pstringrefs
| Pstringsets
| Pmakearray of array_kind
| Parraylength of array_kind
| Parrayrefu of array_kind
| Parraysetu of array_kind
| Parrayrefs of array_kind
| Parraysets of array_kind
| Pisint
| Pisout
| Pbittest
| Pbintofint of boxed_integer
| Pintofbint of boxed_integer
| Pcvtbint of boxed_integer * boxed_integer
| Pnegbint of boxed_integer
| Paddbint of boxed_integer
| Psubbint of boxed_integer
| Pmulbint of boxed_integer
| Pdivbint of boxed_integer
| Pmodbint of boxed_integer
| Pandbint of boxed_integer
| Porbint of boxed_integer
| Pxorbint of boxed_integer
| Plslbint of boxed_integer
| Plsrbint of boxed_integer
| Pasrbint of boxed_integer
| Pbintcomp of boxed_integer * comparison
| Pbigarrayref of bool * int * bigarray_kind * bigarray_layout
| Pbigarrayset of bool * int * bigarray_kind * bigarray_layout
| Pbigarraydim of int
| Pstring_load_16 of bool
| Pstring_load_32 of bool
| Pstring_load_64 of bool
| Pstring_set_16 of bool
| Pstring_set_32 of bool
| Pstring_set_64 of bool
| Pbigstring_load_16 of bool
| Pbigstring_load_32 of bool
| Pbigstring_load_64 of bool
| Pbigstring_set_16 of bool
| Pbigstring_set_32 of bool
| Pbigstring_set_64 of bool
| Pctconst of compile_time_constant
| Pbswap16
| Pbbswap of boxed_integer
| Pint_as_pointer
type comparison =
| Ceq
| Cneq
| Clt
| Cgt
| Cle
| Cge
type array_kind =
| Pgenarray
| Paddrarray
| Pintarray
| Pfloatarray
type boxed_integer =
| Pnativeint
| Pint32
| Pint64
type bigarray_kind =
| Pbigarray_unknown
| Pbigarray_float32
| Pbigarray_float64
| Pbigarray_sint8
| Pbigarray_uint8
| Pbigarray_sint16
| Pbigarray_uint16
| Pbigarray_int32
| Pbigarray_int64
| Pbigarray_caml_int
| Pbigarray_native_int
| Pbigarray_complex32
| Pbigarray_complex64
type bigarray_layout =
| Pbigarray_unknown_layout
| Pbigarray_c_layout
| Pbigarray_fortran_layout
type raise_kind =
| Raise_regular
| Raise_reraise
| Raise_notrace
type structured_constant =
| Const_base of Asttypes.constant
| Const_pointer of int
| Const_block of int * structured_constant list
| Const_float_array of string list
| Const_immstring of string
type function_kind =
| Curried
| Tupled
type let_kind =
| Strict
| Alias
| StrictOpt
| Variable
type meth_kind =
| Self
| Public
| Cached
type shared_code = (int * int) list
type lambda =
| Lvar of Ident.t
| Lconst of structured_constant
| Lapply of lambda * lambda list * Location.t
| Lfunction of function_kind * Ident.t list * lambda
| Llet of let_kind * Ident.t * lambda * lambda
| Lletrec of (Ident.t * lambda) list * lambda
| Lprim of primitive * lambda list
| Lswitch of lambda * lambda_switch
| Lstringswitch of lambda * (string * lambda) list * lambda option
| Lstaticraise of int * lambda list
| Lstaticcatch of lambda * (int * Ident.t list) * lambda
| Ltrywith of lambda * Ident.t * lambda
| Lifthenelse of lambda * lambda * lambda
| Lsequence of lambda * lambda
| Lwhile of lambda * lambda
| Lfor of Ident.t * lambda * lambda * Asttypes.direction_flag * lambda
| Lassign of Ident.t * lambda
| Lsend of meth_kind * lambda * lambda * lambda list * Location.t
| Levent of lambda * lambda_event
| Lifused of Ident.t * lambda
type lambda_switch = {
sw_numconsts : int;
sw_consts : (int * lambda) list;
sw_numblocks : int;
sw_blocks : (int * lambda) list;
sw_failaction : lambda option;
}
type lambda_event = {
lev_loc : Location.t;
lev_kind : lambda_event_kind;
lev_repr : int Pervasives.ref option;
lev_env : Env.summary;
}
type lambda_event_kind =
| Lev_before
| Lev_after of Types.type_expr
| Lev_function
val make_key : lambda -> lambda option
val const_unit : structured_constant
val lambda_unit : lambda
val name_lambda : let_kind -> lambda -> Ident.t -> lambda -> lambda
val name_lambda_list : lambda list -> lambda list -> lambda -> lambda
val iter : lambda -> unit -> lambda -> unit
module IdentSet : sig
type elt = Ident.t
type t
val empty : t
val is_empty : t -> bool
val mem : elt -> t -> bool
val add : elt -> t -> t
val singleton : elt -> t
val remove : elt -> t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val compare : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val iter : elt -> unit -> t -> unit
val fold : elt -> 'a -> 'a -> t -> 'a -> 'a
val for_all : elt -> bool -> t -> bool
val exists : elt -> bool -> t -> bool
val filter : elt -> bool -> t -> t
val partition : elt -> bool -> t -> (t * t)
val cardinal : t -> int
val elements : t -> elt list
val min_elt : t -> elt
val max_elt : t -> elt
val choose : t -> elt
val split : elt -> t -> (t * bool * t)
val find : elt -> t -> elt
val of_list : elt list -> t
end
val free_variables : lambda -> IdentSet.t
val free_methods : lambda -> IdentSet.t
val transl_normal_path : Path.t -> lambda
val transl_path : ?loc:Location.t -> Env.t -> Path.t -> lambda
val make_sequence : 'a -> lambda -> 'a list -> lambda
val subst_lambda : lambda Ident.tbl -> lambda -> lambda
val bind : let_kind -> Ident.t -> lambda -> lambda -> lambda
val commute_comparison : comparison -> comparison
val negate_comparison : comparison -> comparison
val next_raise_count : unit -> int
val next_negative_raise_count : unit -> int
val staticfail : lambda
val is_guarded : lambda -> bool
val patch_guarded : lambda -> lambda -> lambda
val raise_kind : raise_kind -> string
val lam_of_loc : loc_kind -> Location.t -> lambda
val reset : unit -> unit