Skip to content

Commit f0b6de9

Browse files
committed
do not use unavailable fn
1 parent c64b65b commit f0b6de9

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

compiler/ext/ext_list.ml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -774,3 +774,7 @@ let filter lst p =
774774
| x :: l -> if p x then find (x :: accu) l ~p else find accu l ~p
775775
in
776776
find [] lst ~p
777+
778+
let is_empty = function
779+
| [] -> true
780+
| _ :: _ -> false

compiler/ext/ext_list.mli

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,3 +231,5 @@ val filter : 'a list -> ('a -> bool) -> 'a list
231231

232232
val array_list_filter_map :
233233
'a array -> 'b list -> ('a -> 'b -> 'c option) -> 'c list
234+
235+
val is_empty : 'a list -> bool

tools/src/tools.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1625,7 +1625,7 @@ module Migrate = struct
16251625
MapperUtils.get_template_args_to_insert mapper template_args
16261626
[]
16271627
in
1628-
if List.is_empty template_args_to_insert then
1628+
if Ext_list.is_empty template_args_to_insert then
16291629
{
16301630
exp with
16311631
pexp_desc =

0 commit comments

Comments
 (0)