From e72e95625ab973648e3e4cf73cdae16cc412edb5 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Sat, 17 May 2008 12:44:55 +0000 Subject: [PATCH] Added a checkDepthM2 function to the Traversal module --- pass/Traversal.hs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pass/Traversal.hs b/pass/Traversal.hs index 7df2828..e94833e 100644 --- a/pass/Traversal.hs +++ b/pass/Traversal.hs @@ -22,7 +22,7 @@ module Traversal ( , transformToExplicitDepth, checkToTransform , baseX, extX, extD, extC, applyX , applyDepthM, applyDepthM2 - , checkDepthM + , checkDepthM, checkDepthM2 ) where import Data.Generics @@ -107,3 +107,9 @@ checkDepthM :: forall t1 s. (Data t1, Data s) => checkDepthM f1 = applyX $ baseX `extC` f1 +-- | Apply two checks, recursing depth-first. +checkDepthM2 :: forall t1 t2 s. (Data t1, Data t2, Data s) => + Check t1 -> Check t2 -> s -> PassM s +checkDepthM2 f1 f2 + = applyX $ baseX `extC` f1 `extC` f2 +