diff options
author | nzeh <nzeh@cs.dal.ca> | 2009-03-24 01:16:22 +0100 |
---|---|---|
committer | nzeh <nzeh@cs.dal.ca> | 2009-03-24 01:16:22 +0100 |
commit | df7ec92f1853c94ee37bb203c9253a57ce1dfc9a (patch) | |
tree | 2a36170a977911d548644fd6a5b3c351728de69e /Parsers.hs | |
parent | 7c3e35a866c199310417c9b900304177a718a155 (diff) | |
download | xmobar-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
Diffstat (limited to 'Parsers.hs')
-rw-r--r-- | Parsers.hs | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -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 |