File tree Expand file tree Collapse file tree
spectec/src/backend-prose Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -66,18 +66,6 @@ let extract_rel_hint relid hintid =
6666
6767let swap = function `LtOp -> `GtOp | `GtOp -> `LtOp | `LeOp -> `GeOp | `GeOp -> `LeOp | op -> op
6868
69- (* CASE (?(())) ~> CASE
70- CASE (?()) ~> () *)
71- let recover_optional_singleton_constructor e =
72- match e.it with
73- | Al.Ast. CaseE (Mixop. (Seq [Atom atom ; Arg () ]), [{it = OptE opt ; _ } ]) ->
74- (
75- match opt with
76- | Some _ -> Al.Ast. CaseE (Mixop. Atom atom, [] )
77- | None -> Al.Ast. CaseE (Mixop. Seq [] , [] )
78- ) |> (fun it -> {e with it})
79- | _ -> e
80-
8169(* l ->_ [] r ~> l -> r *)
8270let remove_empty_arrow_sub e =
8371 match e.it with
@@ -181,7 +169,6 @@ let transpile_expr =
181169 let post_expr =
182170 Il2al.Transpile. simplify_record_concat
183171 >> Il2al.Transpile. reduce_comp
184- >> recover_optional_singleton_constructor
185172 >> remove_empty_arrow_sub
186173 in
187174 let walk_expr walker expr =
You can’t perform that action at this time.
0 commit comments