From dcc6501f725a6d6b77cbccf80f045d384a8cab23 Mon Sep 17 00:00:00 2001 From: Types Logics Cats Date: Tue, 25 Jun 2019 16:39:42 -0400 Subject: [PATCH] Remove unused List module --- src/easy_format.ml | 31 ++++++++----------------------- 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/src/easy_format.ml b/src/easy_format.ml index a47a3da..a074de3 100644 --- a/src/easy_format.ml +++ b/src/easy_format.ml @@ -1,27 +1,12 @@ open Format -(** Shadow map and split with tailrecursive variants. *) -module List = struct - include List - - [@@@warning "-32"] - - (** Tail recursive of map *) - let map f l = List.rev_map f l |> List.rev - - (** Tail recursive version of split *) - let rev_split l = - let rec inner xs ys = function - | (x, y) :: xys -> - inner (x::xs) (y::ys) xys - | [] -> (xs, ys) - in - inner [] [] l - - let split l = rev_split (List.rev l) - - [@@@warning "+32"] -end +let rev_split l = + let rec inner xs ys = function + | (x, y) :: xys -> + inner (x::xs) (y::ys) xys + | [] -> (xs, ys) + in + inner [] [] l type wrap = [ | `Wrap_atoms @@ -131,7 +116,7 @@ let propagate_from_leaf_to_root let acc = init_acc x in map_node x acc | List (param, children) -> - let new_children, accs = List.rev_split (List.rev_map aux children) in + let new_children, accs = rev_split (List.rev_map aux children) in let acc = List.fold_left merge_acc (init_acc x) accs in map_node (List (param, new_children)) acc | Label ((x1, param), x2) ->