summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornzeh <nzeh@cs.dal.ca>2009-03-24 01:16:22 +0100
committernzeh <nzeh@cs.dal.ca>2009-03-24 01:16:22 +0100
commitdf7ec92f1853c94ee37bb203c9253a57ce1dfc9a (patch)
tree2a36170a977911d548644fd6a5b3c351728de69e
parent7c3e35a866c199310417c9b900304177a718a155 (diff)
downloadxmobar-df7ec92f1853c94ee37bb203c9253a57ce1dfc9a.tar.gz
xmobar-df7ec92f1853c94ee37bb203c9253a57ce1dfc9a.tar.bz2
Replaced inside with between
Parsers.inside does the same as Text.Parsec.Combinators.between. So I switched to using this standard function. darcs-hash:20090324001622-c6b6b-11ed4dffcec239a98fd2a2caf7a4f38c725144b0.gz
-rw-r--r--Parsers.hs5
1 files changed, 1 insertions, 4 deletions
diff --git a/Parsers.hs b/Parsers.hs
index e8e0be5..c87aa99 100644
--- a/Parsers.hs
+++ b/Parsers.hs
@@ -64,7 +64,7 @@ templateStringParser c = do
templateCommandParser :: Config -> Parser String
templateCommandParser c =
let chr = char . head . sepChar
- in inside (chr c) (allTillSep c) (chr c)
+ in between (chr c) (chr c) (allTillSep c)
-- | Combines the template parsers
templateParser :: Config -> Parser [(String,String,String)]
@@ -96,6 +96,3 @@ tryString = try . string
allTillSep :: Config -> Parser String
allTillSep = many . noneOf . sepChar
-
-inside :: Parser a -> Parser b -> Parser c -> Parser b
-inside pa pb pc = pa >> pb >>= \r -> pc >> return r