[fix] identation error

This commit is contained in:
dsac 2022-12-15 20:37:05 +01:00
parent ca271eaf66
commit eceeb3c157

View File

@ -48,8 +48,8 @@ let pre2vars verbose debug main_fn =
| EApp (ty, node, arg) ->
let arg = pre_push arg in
EApp (ty, node, arg)
in
let rec aux (expr: t_expression) =
in
let rec aux (expr: t_expression) =
match expr with
| EVar _ -> expr
| EMonOp (ty, mop, expr) ->
@ -82,11 +82,11 @@ let rec aux (expr: t_expression) =
| EApp (ty, node, arg) ->
let arg = aux arg in
EApp (ty, node, arg)
in
expression_pass (somify aux)
in
expression_pass (somify aux)
let chkvar_init_unicity verbose debug main_fn : t_nodelist -> t_nodelist option =
let aux (node: t_node) : t_node option =
let aux (node: t_node) : t_node option =
let incr_aux h n =
match Hashtbl.find_opt h n with
| None -> failwith "todo, should not happened."
@ -152,11 +152,11 @@ let aux (node: t_node) : t_node option =
else None
end
(** never purge -> failwith never executed! purge_initialized h; *)
in
node_pass aux
in
node_pass aux
let pass_linearization verbose debug main_fn =
let node_lin (node: t_node): t_node option =
let node_lin (node: t_node): t_node option =
let rec tpl ((pat, exp): t_equation) =
match exp with
| ETuple (_, hexps :: texps) ->
@ -189,11 +189,11 @@ let node_lin (node: t_node): t_node option =
n_equations = new_equations;
n_automata = node.n_automata;
}
in
node_pass node_lin
in
node_pass node_lin
let pass_eq_reordering verbose debug main_fn ast =
let rec pick_equations init_vars eqs remaining_equations =
let rec pick_equations init_vars eqs remaining_equations =
match remaining_equations with
| [] -> Some eqs
| _ ->
@ -214,7 +214,7 @@ let rec pick_equations init_vars eqs remaining_equations =
(List.filter (fun eq -> List.for_all (fun e -> eq <> e) (h :: t)) remaining_equations)
end
in
let node_eq_reorganising (node: t_node): t_node option =
let node_eq_reorganising (node: t_node): t_node option =
let init_vars = List.map name_of_var (snd node.n_inputs) in
try
begin
@ -223,8 +223,8 @@ let node_eq_reorganising (node: t_node): t_node option =
| Some eqs -> Some { node with n_equations = eqs }
end
with PassExn err -> (verbose err; None)
in
node_pass node_eq_reorganising ast
in
node_pass node_eq_reorganising ast
let pass_typing verbose debug main_fn ast =
let htbl = Hashtbl.create (List.length ast) in