Stmt.Helpers
val temp_vars :
Expr.Typed.t list ->
Located.t list * Expr.Typed.t list * (unit -> unit)
val ensure_var :
(Expr.Typed.t -> 'a -> Located.t) ->
Expr.Typed.t ->
'a ->
Located.t
val internal_nrfunapp :
'a Fixed.First.t Internal_fun.t ->
'a Fixed.First.t list ->
'b ->
('a, 'b) Fixed.t
val contains_fn_kind :
('a Fixed.First.t Fun_kind.t -> bool) ->
?init:bool ->
('a, 'b) Fixed.t ->
bool
val mk_for :
Expr.Typed.t ->
(Expr.Typed.t -> Located.t) ->
Location_span.t ->
Located.t
val mk_nested_for :
Expr.Typed.t list ->
(Expr.Typed.t list -> Located.t) ->
Location_span.t ->
Located.t
val mk_for_iteratee :
Expr.Typed.t ->
(Expr.Typed.t -> Located.t) ->
Expr.Typed.t ->
Location_span.t ->
Located.t
val for_each :
(Expr.Typed.t -> Located.t) ->
Expr.Typed.t ->
Location_span.t ->
Located.t
val for_scalar :
Expr.Typed.t SizedType.t ->
(Expr.Typed.t SizedType.t -> Expr.Typed.t -> Located.t) ->
Expr.Typed.t ->
Location_span.t ->
Located.t
val for_scalar_inv :
Expr.Typed.t SizedType.t ->
(Expr.Typed.t SizedType.t -> Expr.Typed.t -> Located.t) ->
Expr.Typed.t ->
Location_span.t ->
Located.t
val assign_indexed :
UnsizedType.t ->
'b Fixed.First.t Fixed.Pattern.lvalue ->
'a ->
('b Expr.Fixed.t -> 'b Expr.Fixed.t) ->
'b Expr.Fixed.t ->
('b, 'a) Fixed.t
val get_lhs_name : 'a Fixed.Pattern.lvalue -> string
The name of the lhs. This adds "." and an index to tuple projections
val lvariable : string -> 'e Fixed.Pattern.lvalue
val lvalue_of_expr_opt :
'e Expr.Fixed.t ->
'e Expr.Fixed.t Fixed.Pattern.lvalue option
val expr_of_lvalue :
'e Expr.Fixed.t Fixed.Pattern.lvalue ->
meta:'e ->
'e Expr.Fixed.t
val map_lhs_variable :
f:(string -> string) ->
'e Fixed.Pattern.lvalue ->
'e Fixed.Pattern.lvalue
val lhs_indices : 'e Fixed.Pattern.lvalue -> 'e Index.t list
val lhs_variable : 'e Fixed.Pattern.lvalue -> string
This gets the innermost name of the variable. It differs from get_lhs_name
in that tuple projections do not add their indices here.
val lvalue_base_reference : 'e Fixed.Pattern.lvalue -> 'e Fixed.Pattern.lvalue
Reduce an lvalue down to its "base reference", which is a variable with maximum tuple indices after it. For example:
x[1,2][3] -> x
x.1[1,2].2[3].3 -> x.1
x.1.2[1,2][3].3 -> x.1.2