Module Ast_builder.Make

Parameters

module F : Features.T

Signature

module AST : sig ... end
module type SPAN = sig ... end
val expr_If : span:Ast.span -> typ:Hax_engine__Ast.Make(F).ty -> cond:Hax_engine__Ast.Make(F).expr -> then_:Hax_engine__Ast.Make(F).expr -> else_:Hax_engine__Ast.Make(F).expr Prelude.option -> Hax_engine__Ast.Make(F).expr
val expr_App : span:Ast.span -> typ:Hax_engine__Ast.Make(F).ty -> f:Hax_engine__Ast.Make(F).expr -> args:Hax_engine__Ast.Make(F).expr Prelude.list -> generic_args:Hax_engine__Ast.Make(F).generic_value Prelude.list -> bounds_impls:Hax_engine__Ast.Make(F).impl_expr Prelude.list -> trait: (Hax_engine__Ast.Make(F).impl_expr * Hax_engine__Ast.Make(F).generic_value Prelude.list) Prelude.option -> Hax_engine__Ast.Make(F).expr
val expr_Literal : span:Ast.span -> typ:Hax_engine__Ast.Make(F).ty -> Ast.literal -> Hax_engine__Ast.Make(F).expr
val expr_Array : span:Ast.span -> typ:Hax_engine__Ast.Make(F).ty -> Hax_engine__Ast.Make(F).expr Prelude.list -> Hax_engine__Ast.Make(F).expr
val expr_Construct : span:Ast.span -> typ:Hax_engine__Ast.Make(F).ty -> constructor:Ast.global_ident -> is_record:Prelude.bool -> is_struct:Prelude.bool -> fields:(Ast.global_ident * Hax_engine__Ast.Make(F).expr) Prelude.list -> base:(Hax_engine__Ast.Make(F).expr * F.construct_base) Prelude.option -> Hax_engine__Ast.Make(F).expr
val expr_Match : span:Ast.span -> typ:Hax_engine__Ast.Make(F).ty -> scrutinee:Hax_engine__Ast.Make(F).expr -> arms:Hax_engine__Ast.Make(F).arm Prelude.list -> Hax_engine__Ast.Make(F).expr
val expr_Let : span:Ast.span -> typ:Hax_engine__Ast.Make(F).ty -> monadic: (Hax_engine__Ast.Make(F).supported_monads * F.monadic_binding) Prelude.option -> lhs:Hax_engine__Ast.Make(F).pat -> rhs:Hax_engine__Ast.Make(F).expr -> body:Hax_engine__Ast.Make(F).expr -> Hax_engine__Ast.Make(F).expr
val expr_Block : span:Ast.span -> typ:Hax_engine__Ast.Make(F).ty -> inner_e:Hax_engine__Ast.Make(F).expr -> safety_mode:Hax_engine__Ast.Make(F).safety_kind -> witness:F.block -> Hax_engine__Ast.Make(F).expr
val expr_LocalVar : span:Ast.span -> typ:Hax_engine__Ast.Make(F).ty -> Ast.local_ident -> Hax_engine__Ast.Make(F).expr
val expr_GlobalVar : span:Ast.span -> typ:Hax_engine__Ast.Make(F).ty -> Ast.global_ident -> Hax_engine__Ast.Make(F).expr
val expr_Ascription : span:Ast.span -> typ:Hax_engine__Ast.Make(F).ty -> inner_e:Hax_engine__Ast.Make(F).expr -> inner_typ:Hax_engine__Ast.Make(F).ty -> Hax_engine__Ast.Make(F).expr
val expr_MacroInvokation : span:Ast.span -> typ:Hax_engine__Ast.Make(F).ty -> macro:Ast.global_ident -> args:Prelude.string -> witness:F.macro -> Hax_engine__Ast.Make(F).expr
val expr_Assign : span:Ast.span -> typ:Hax_engine__Ast.Make(F).ty -> lhs:Hax_engine__Ast.Make(F).lhs -> inner_e:Hax_engine__Ast.Make(F).expr -> witness:F.mutable_variable -> Hax_engine__Ast.Make(F).expr
val expr_Loop : span:Ast.span -> typ:Hax_engine__Ast.Make(F).ty -> body:Hax_engine__Ast.Make(F).expr -> kind:Hax_engine__Ast.Make(F).loop_kind -> state:Hax_engine__Ast.Make(F).loop_state Prelude.option -> control_flow: (Hax_engine__Ast.Make(F).cf_kind * F.fold_like_loop) Prelude.option -> label:Prelude.string Prelude.option -> witness:F.loop -> Hax_engine__Ast.Make(F).expr
val expr_Break : span:Ast.span -> typ:Hax_engine__Ast.Make(F).ty -> inner_e:Hax_engine__Ast.Make(F).expr -> acc:(Hax_engine__Ast.Make(F).expr * F.state_passing_loop) Prelude.option -> label:Prelude.string Prelude.option -> witness:(F.break * F.loop) -> Hax_engine__Ast.Make(F).expr
val expr_Return : span:Ast.span -> typ:Hax_engine__Ast.Make(F).ty -> inner_e:Hax_engine__Ast.Make(F).expr -> witness:F.early_exit -> Hax_engine__Ast.Make(F).expr
val expr_QuestionMark : span:Ast.span -> typ:Hax_engine__Ast.Make(F).ty -> inner_e:Hax_engine__Ast.Make(F).expr -> return_typ:Hax_engine__Ast.Make(F).ty -> witness:F.question_mark -> Hax_engine__Ast.Make(F).expr
val expr_Continue : span:Ast.span -> typ:Hax_engine__Ast.Make(F).ty -> acc:(Hax_engine__Ast.Make(F).expr * F.state_passing_loop) Prelude.option -> label:Prelude.string Prelude.option -> witness:(F.continue * F.loop) -> Hax_engine__Ast.Make(F).expr
val expr_Borrow : span:Ast.span -> typ:Hax_engine__Ast.Make(F).ty -> kind:Hax_engine__Ast.Make(F).borrow_kind -> inner_e:Hax_engine__Ast.Make(F).expr -> witness:F.reference -> Hax_engine__Ast.Make(F).expr
val expr_AddressOf : span:Ast.span -> typ:Hax_engine__Ast.Make(F).ty -> mut:F.mutable_pointer Ast.mutability -> inner_e:Hax_engine__Ast.Make(F).expr -> witness:F.raw_pointer -> Hax_engine__Ast.Make(F).expr
val expr_Closure : span:Ast.span -> typ:Hax_engine__Ast.Make(F).ty -> params:Hax_engine__Ast.Make(F).pat Prelude.list -> body:Hax_engine__Ast.Make(F).expr -> captures:Hax_engine__Ast.Make(F).expr Prelude.list -> Hax_engine__Ast.Make(F).expr
val expr_EffectAction : span:Ast.span -> typ:Hax_engine__Ast.Make(F).ty -> action:F.monadic_action -> argument:Hax_engine__Ast.Make(F).expr -> Hax_engine__Ast.Make(F).expr
val expr_Quote : span:Ast.span -> typ:Hax_engine__Ast.Make(F).ty -> Hax_engine__Ast.Make(F).quote -> Hax_engine__Ast.Make(F).expr
val pat_PWild : span:Ast.span -> typ:Hax_engine__Ast.Make(F).ty -> Hax_engine__Ast.Make(F).pat
val pat_PAscription : span:Ast.span -> typ:Hax_engine__Ast.Make(F).ty -> inner_typ:Hax_engine__Ast.Make(F).ty -> typ_span:Ast.span -> pat:Hax_engine__Ast.Make(F).pat -> Hax_engine__Ast.Make(F).pat
val pat_PConstruct : span:Ast.span -> typ:Hax_engine__Ast.Make(F).ty -> constructor:Ast.global_ident -> is_record:Prelude.bool -> is_struct:Prelude.bool -> fields:Hax_engine__Ast.Make(F).field_pat Prelude.list -> Hax_engine__Ast.Make(F).pat
val pat_POr : span:Ast.span -> typ:Hax_engine__Ast.Make(F).ty -> subpats:Hax_engine__Ast.Make(F).pat Prelude.list -> Hax_engine__Ast.Make(F).pat
val pat_PArray : span:Ast.span -> typ:Hax_engine__Ast.Make(F).ty -> args:Hax_engine__Ast.Make(F).pat Prelude.list -> Hax_engine__Ast.Make(F).pat
val pat_PDeref : span:Ast.span -> typ:Hax_engine__Ast.Make(F).ty -> subpat:Hax_engine__Ast.Make(F).pat -> witness:F.reference -> Hax_engine__Ast.Make(F).pat
val pat_PConstant : span:Ast.span -> typ:Hax_engine__Ast.Make(F).ty -> lit:Ast.literal -> Hax_engine__Ast.Make(F).pat
val item_Fn : span:Ast.span -> ident:Ast.concrete_ident -> attrs:Ast.attrs -> name:Ast.concrete_ident -> generics:Hax_engine__Ast.Make(F).generics -> body:Hax_engine__Ast.Make(F).expr -> params:Hax_engine__Ast.Make(F).param Prelude.list -> safety:Hax_engine__Ast.Make(F).safety_kind -> Hax_engine__Ast.Make(F).item
val item_TyAlias : span:Ast.span -> ident:Ast.concrete_ident -> attrs:Ast.attrs -> name:Ast.concrete_ident -> generics:Hax_engine__Ast.Make(F).generics -> ty:Hax_engine__Ast.Make(F).ty -> Hax_engine__Ast.Make(F).item
val item_Type : span:Ast.span -> ident:Ast.concrete_ident -> attrs:Ast.attrs -> name:Ast.concrete_ident -> generics:Hax_engine__Ast.Make(F).generics -> variants:Hax_engine__Ast.Make(F).variant Prelude.list -> is_struct:Prelude.bool -> Hax_engine__Ast.Make(F).item
val item_IMacroInvokation : span:Ast.span -> ident:Ast.concrete_ident -> attrs:Ast.attrs -> macro:Ast.concrete_ident -> argument:Prelude.string -> inner_span:Ast.span -> witness:F.macro -> Hax_engine__Ast.Make(F).item
val item_Trait : span:Ast.span -> ident:Ast.concrete_ident -> attrs:Ast.attrs -> name:Ast.concrete_ident -> generics:Hax_engine__Ast.Make(F).generics -> items:Hax_engine__Ast.Make(F).trait_item Prelude.list -> safety:Hax_engine__Ast.Make(F).safety_kind -> Hax_engine__Ast.Make(F).item
val item_Impl : span:Ast.span -> ident:Ast.concrete_ident -> attrs:Ast.attrs -> generics:Hax_engine__Ast.Make(F).generics -> self_ty:Hax_engine__Ast.Make(F).ty -> of_trait: (Ast.concrete_ident * Hax_engine__Ast.Make(F).generic_value Prelude.list) -> items:Hax_engine__Ast.Make(F).impl_item Prelude.list -> parent_bounds: (Hax_engine__Ast.Make(F).impl_expr * Hax_engine__Ast.Make(F).impl_ident) Prelude.list -> safety:Hax_engine__Ast.Make(F).safety_kind -> Hax_engine__Ast.Make(F).item
val item_Alias : span:Ast.span -> ident:Ast.concrete_ident -> attrs:Ast.attrs -> name:Ast.concrete_ident -> item:Ast.concrete_ident -> Hax_engine__Ast.Make(F).item
val item_Use : span:Ast.span -> ident:Ast.concrete_ident -> attrs:Ast.attrs -> path:Prelude.string Prelude.list -> is_external:Prelude.bool -> rename:Prelude.string Prelude.option -> Hax_engine__Ast.Make(F).item
val item_Quote : span:Ast.span -> ident:Ast.concrete_ident -> attrs:Ast.attrs -> quote:Hax_engine__Ast.Make(F).quote -> origin:Ast.item_quote_origin -> Hax_engine__Ast.Make(F).item
val item_HaxError : span:Ast.span -> ident:Ast.concrete_ident -> attrs:Ast.attrs -> Prelude.string -> Hax_engine__Ast.Make(F).item
val item_NotImplementedYet : span:Ast.span -> ident:Ast.concrete_ident -> attrs:Ast.attrs -> Hax_engine__Ast.Make(F).item
val guard_IfLet : span:Ast.span -> lhs:Hax_engine__Ast.Make(F).pat -> rhs:Hax_engine__Ast.Make(F).expr -> witness:F.match_guard -> Hax_engine__Ast.Make(F).guard
val trait_item_TIType : ti_span:Ast.span -> ti_generics:Hax_engine__Ast.Make(F).generics -> ti_ident:Ast.concrete_ident -> ti_attrs:Ast.attrs -> Hax_engine__Ast.Make(F).impl_ident Prelude.list -> Hax_engine__Ast.Make(F).trait_item
val trait_item_TIFn : ti_span:Ast.span -> ti_generics:Hax_engine__Ast.Make(F).generics -> ti_ident:Ast.concrete_ident -> ti_attrs:Ast.attrs -> Hax_engine__Ast.Make(F).ty -> Hax_engine__Ast.Make(F).trait_item
val trait_item_TIDefault : ti_span:Ast.span -> ti_generics:Hax_engine__Ast.Make(F).generics -> ti_ident:Ast.concrete_ident -> ti_attrs:Ast.attrs -> params:Hax_engine__Ast.Make(F).param Prelude.list -> body:Hax_engine__Ast.Make(F).expr -> witness:F.trait_item_default -> Hax_engine__Ast.Make(F).trait_item
val impl_expr_Self : goal:Hax_engine__Ast.Make(F).trait_goal -> Hax_engine__Ast.Make(F).impl_expr
val impl_expr_Concrete : goal:Hax_engine__Ast.Make(F).trait_goal -> Hax_engine__Ast.Make(F).trait_goal -> Hax_engine__Ast.Make(F).impl_expr
val impl_expr_LocalBound : goal:Hax_engine__Ast.Make(F).trait_goal -> id:Prelude.string -> Hax_engine__Ast.Make(F).impl_expr
val impl_expr_Parent : goal:Hax_engine__Ast.Make(F).trait_goal -> impl:Hax_engine__Ast.Make(F).impl_expr -> ident:Hax_engine__Ast.Make(F).impl_ident -> Hax_engine__Ast.Make(F).impl_expr
val impl_expr_Projection : goal:Hax_engine__Ast.Make(F).trait_goal -> impl:Hax_engine__Ast.Make(F).impl_expr -> item:Ast.concrete_ident -> ident:Hax_engine__Ast.Make(F).impl_ident -> Hax_engine__Ast.Make(F).impl_expr
val impl_expr_ImplApp : goal:Hax_engine__Ast.Make(F).trait_goal -> impl:Hax_engine__Ast.Make(F).impl_expr -> args:Hax_engine__Ast.Make(F).impl_expr Prelude.list -> Hax_engine__Ast.Make(F).impl_expr
val impl_expr_Dyn : goal:Hax_engine__Ast.Make(F).trait_goal -> Hax_engine__Ast.Make(F).impl_expr
val impl_expr_Builtin : goal:Hax_engine__Ast.Make(F).trait_goal -> Hax_engine__Ast.Make(F).trait_goal -> Hax_engine__Ast.Make(F).impl_expr
module NoSpan : sig ... end
include module type of struct include NoSpan end
val ty_tuple : AST.ty Prelude.list -> AST.ty
val ty_tuple_or_id : AST.ty Prelude.list -> AST.ty
val ty_cf : continue_type:AST.ty -> break_type:AST.ty -> AST.ty

This gives the type of a value in the `ControlFlow` enum

val ty_cf_return : acc_type:AST.ty -> break_type:AST.ty -> return_type:AST.ty Prelude.option -> AST.ty

This gives the type of a value encoded in the `ControlFlow` enum. In case a `return_type` is provided the encoding is nested: `return v` is `Break (Break v)` `break v` is `Break (Continue (v, acc))`

module Explicit : sig ... end
include module type of struct include Explicit end
val ty_unit : AST.ty
val expr_unit : span:Ast.span -> Hax_engine__Ast.Make(F).expr
val expr_tuple : span:Ast.span -> AST.expr Prelude.list -> AST.expr
val pat_PBinding : typ:Hax_engine__Ast.Make(F).ty -> span:Ast.span -> mut:F.mutable_variable Ast.mutability -> mode:Hax_engine__Ast.Make(F).binding_mode -> var:Ast.local_ident -> subpat:(Hax_engine__Ast.Make(F).pat * F.as_pattern) Prelude.option -> Hax_engine__Ast.Make(F).pat
val arm : span:Span.t -> AST.pat -> ?guard:AST.guard Prelude.option -> AST.expr -> AST.arm
val pat_Constructor_CF : span:Ast.span -> typ:AST.ty -> [ `Break | `Continue ] -> AST.pat -> AST.pat
val expr'_Constructor_CF : span:Ast.span -> break_type:AST.ty -> ?continue_type:AST.ty -> [ `Break | `Continue ] -> AST.expr -> AST.expr
val expr_Constructor_CF : span:Ast.span -> break_type:AST.ty Prelude.option -> return_type:AST.ty Prelude.option -> acc:AST.expr -> ?e:AST.expr -> [ `Break | `Continue | `Return ] -> AST.expr

We use the following encoding of return, break and continue in the `ControlFlow` enum: Return e -> Break (Break e) Break e -> Break ((Continue(e, acc))) Continue -> Continue(acc)

In case there is no return we simplify to: Break e -> (Break (e, acc)) Continue -> (continue (acc))

module Make0 (Span : sig ... end) : sig ... end
module type S = sig ... end
module Make (Span : sig ... end) : S
val make : Ast.span -> (module S)