diff options
author | Sébastien Dailly <sebastien@dailly.me> | 2025-03-18 21:49:55 +0100 |
---|---|---|
committer | Sébastien Dailly <sebastien@dailly.me> | 2025-03-18 21:49:55 +0100 |
commit | 0bdc640331b903532fb345930e7078752ba54a2d (patch) | |
tree | 0fecadb244647ec4cb29982cfea4237f51487cad /lib/analysers/filters.ml | |
parent | 8b8b730d3ba98d6c9e4e6274844641043b5fefbb (diff) |
Evaluate each predicate in a () blockmain
Diffstat (limited to 'lib/analysers/filters.ml')
-rw-r--r-- | lib/analysers/filters.ml | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/lib/analysers/filters.ml b/lib/analysers/filters.ml index 7044798..6b1d843 100644 --- a/lib/analysers/filters.ml +++ b/lib/analysers/filters.ml @@ -5,15 +5,23 @@ module Expression = ImportExpression open StdLabels (** Add a list of expressions into the group *) -let rec add_filters : +let add_filters : conf:ImporterSyntax.t -> Chunk.t -> Path.t Expression.T.t list -> unit = fun ~conf group -> function | [] -> () - | hd :: [] -> Chunk.add_expression ~conf group hd - | hd :: tl -> - Chunk.add_expression ~conf group hd; - Chunk.add_string group "\nAND "; - add_filters ~conf group tl + | any -> + let rec f ~conf group = function + | [] -> () + | hd :: [] -> + Chunk.add_expression ~conf group hd; + Chunk.add_string group ")" + | hd :: tl -> + Chunk.add_expression ~conf group hd; + Chunk.add_string group ")\nAND ("; + f ~conf group tl + in + Chunk.add_string group "("; + f ~conf group any type 'a cte_acc = { n : int; |