Displaying 1 result from an estimated 1 matches for "list_out".
2016 Jul 19
2
[PATCH v2 1/2] v2v: register also aliases of input/output modules
...s name output_modules
+and register ?alias name l =
+ push_front (name, false) l;
+ (match alias with
+ | None -> ()
+ | Some alias -> push_front (alias, true) l
+ )
-let input_modules () = List.sort compare !input_modules
-and output_modules () = List.sort compare !output_modules
+let list_out ~with_alias l =
+ let l =
+ if with_alias then l
+ else
+ List.filter (
+ fun (_, is_alias) ->
+ not is_alias
+ ) l in
+ let l = List.map fst l in
+ List.sort compare l
+
+let input_modules ?(with_alias = false) () = list_out ~with_alias !input_modules
+and out...