summaryrefslogtreecommitdiff
path: root/Utility
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-09-20 00:58:18 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-09-20 00:59:13 -0400
commitb62123c378e7d134914f1479fbfa3409d94aa209 (patch)
treea1885e7b1252c8ef069cc3f35cd8886d4a0bd2f1 /Utility
parent52533799535ebe1c133e2687ff1c5612d5bdb51d (diff)
simplify
Diffstat (limited to 'Utility')
-rw-r--r--Utility/Matcher.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/Utility/Matcher.hs b/Utility/Matcher.hs
index 323a84bfd..69b78be4a 100644
--- a/Utility/Matcher.hs
+++ b/Utility/Matcher.hs
@@ -50,10 +50,10 @@ token t = error $ "unknown token " ++ t
{- Converts a list of Tokens into a Matcher. -}
generate :: [Token op] -> Matcher op
-generate ts = generate' MAny ts
-generate' :: Matcher op -> [Token op] -> Matcher op
-generate' m [] = m
-generate' m ts = uncurry generate' $ consume m ts
+generate = go MAny
+ where
+ go m [] = m
+ go m ts = uncurry go $ consume m ts
{- Consumes one or more Tokens, constructs a new Matcher,
- and returns unconsumed Tokens. -}