From 720e9ce3a5c822dc800adc862c20f098ab602902 Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Sat, 24 Jan 2009 19:58:26 +0000 Subject: Renamed processIn -> processWith, queryIn -> queryWith. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1521 788f1e2b-df1e-0410-8736-df70ead52e1b --- Text/Pandoc/Definition.hs | 22 +++++++++++----------- Text/Pandoc/Plugins.hs | 4 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) (limited to 'Text') diff --git a/Text/Pandoc/Definition.hs b/Text/Pandoc/Definition.hs index ed58f6b75..92ce094d4 100644 --- a/Text/Pandoc/Definition.hs +++ b/Text/Pandoc/Definition.hs @@ -129,22 +129,22 @@ data Inline deriving (Show, Eq, Read, Typeable, Data) -- | Applies a transformation on @a@s to matching elements in a @b@. -processIn :: (Data a, Data b) => (a -> a) -> b -> b -processIn f = everywhere (mkT f) +processWith :: (Data a, Data b) => (a -> a) -> b -> b +processWith f = everywhere (mkT f) --- | Like 'processIn', but with monadic transformations. -processInM :: (Monad m, Data a, Data b) => (a -> m a) -> b -> m b -processInM f = everywhereM (mkM f) +-- | Like 'processWith', but with monadic transformations. +processWithM :: (Monad m, Data a, Data b) => (a -> m a) -> b -> m b +processWithM f = everywhereM (mkM f) -- | Runs a query on matching @a@ elements in a @c@. -queryIn :: (Data a, Data c) => (a -> [b]) -> c -> [b] -queryIn f = everything (++) ([] `mkQ` f) +queryWith :: (Data a, Data c) => (a -> [b]) -> c -> [b] +queryWith f = everything (++) ([] `mkQ` f) -{-# DEPRECATED processPandoc "Use processIn instead" #-} +{-# DEPRECATED processPandoc "Use processWith instead" #-} processPandoc :: Data a => (a -> a) -> Pandoc -> Pandoc -processPandoc = processIn +processPandoc = processWith -{-# DEPRECATED queryPandoc "Use queryIn instead" #-} +{-# DEPRECATED queryPandoc "Use queryWith instead" #-} queryPandoc :: Data a => (a -> [b]) -> Pandoc -> [b] -queryPandoc = queryIn +queryPandoc = queryWith diff --git a/Text/Pandoc/Plugins.hs b/Text/Pandoc/Plugins.hs index 5ba333faa..cb8ad1e11 100644 --- a/Text/Pandoc/Plugins.hs +++ b/Text/Pandoc/Plugins.hs @@ -65,5 +65,5 @@ evaluatePlugin modsrc = do throwError $ UnknownError $ "The plugin module must define a function 'transform'." transformType <- typeOf "transform" if "-> IO" `isInfixOf` transformType - then interpret "processInM transform" (as :: Pandoc -> IO Pandoc) - else interpret "return . (processIn transform)" (as :: Pandoc -> IO Pandoc) + then interpret "processWithM transform" (as :: Pandoc -> IO Pandoc) + else interpret "return . (processWith transform)" (as :: Pandoc -> IO Pandoc) -- cgit v1.2.3