From b565bb91802982ee67b4b580b68d6fb4c7f93335 Mon Sep 17 00:00:00 2001 From: Arnaud Spiwack Date: Mon, 24 Feb 2014 16:57:04 +0100 Subject: IStream: a concat_map primitive. --- tactics/tacticMatching.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tactics') diff --git a/tactics/tacticMatching.ml b/tactics/tacticMatching.ml index 1c67d4b01c..8ac193fa58 100644 --- a/tactics/tacticMatching.ml +++ b/tactics/tacticMatching.ml @@ -167,7 +167,7 @@ module PatternMatching (E:StaticEnvironment) = struct coherent. *) let (>>=) (type a) (type b) (x:a m) (f:a -> b m) : b m = let open IStream in - concat (map begin fun { subst=substx; context=contextx; terms=termsx; lhs=lhsx } -> + concat_map begin fun { subst=substx; context=contextx; terms=termsx; lhs=lhsx } -> map_filter begin fun { subst=substf; context=contextf; terms=termsf; lhs=lhsf } -> try Some { @@ -178,7 +178,7 @@ module PatternMatching (E:StaticEnvironment) = struct } with Not_coherent_metas -> None end (f lhsx) - end x) + end x (** A variant of [(>>=)] when the first argument returns [unit]. *) let (<*>) (type a) (x:unit m) (y:a m) : a m = -- cgit v1.2.3