summaryrefslogtreecommitdiff
path: root/Build/EvilSplicer.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-11-06 01:18:22 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-11-06 01:18:22 -0400
commit8beaba5bff7a34ee654006247271a99b86e55dca (patch)
tree057c1caacf1ce6e7adab17c55a9449a9cf5c7f69 /Build/EvilSplicer.hs
parent821debc213a925e8f7d23246461b793eccb28e5c (diff)
use pure or return rather than (:[]) or \x -> [x]
Diffstat (limited to 'Build/EvilSplicer.hs')
-rw-r--r--Build/EvilSplicer.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Build/EvilSplicer.hs b/Build/EvilSplicer.hs
index f40d10033..35dba4968 100644
--- a/Build/EvilSplicer.hs
+++ b/Build/EvilSplicer.hs
@@ -584,7 +584,7 @@ text_builder_hack = replace "Data.Text.Lazy.Builder.Internal.fromText" "Data.Tex
parsecAndReplace :: Parser String -> String -> String
parsecAndReplace p s = case parse find "" s of
Left e -> s
- Right l -> concatMap (either (\c -> [c]) id) l
+ Right l -> concatMap (either return id) l
where
find :: Parser [Either Char String]
find = many $ try (Right <$> p) <|> (Left <$> anyChar)