diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-02-03 13:01:44 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-02-03 13:08:15 -0400 |
commit | af197c7fc387794d3a558b4f8f23ebd9d5554aa0 (patch) | |
tree | ac163e829114b7a08c59ece40123d2aeb1ea739e /Annex | |
parent | 67078adb077257c81270f7e17064f0b40919d3de (diff) |
refactor
Diffstat (limited to 'Annex')
-rw-r--r-- | Annex/FileMatcher.hs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Annex/FileMatcher.hs b/Annex/FileMatcher.hs index fba26a898..641fe49c9 100644 --- a/Annex/FileMatcher.hs +++ b/Annex/FileMatcher.hs @@ -79,9 +79,9 @@ parseToken matchstandard matchgroupwanted checkpresent checkpreferreddir getgrou "groupwanted" -> call matchgroupwanted "present" -> use checkpresent "inpreferreddir" -> use checkpreferreddir - "unused" -> Right $ Operation limitUnused - "anything" -> Right $ Operation limitAnything - "nothing" -> Right $ Operation limitNothing + "unused" -> simply limitUnused + "anything" -> simply limitAnything + "nothing" -> simply limitNothing _ -> case k of "include" -> use limitInclude "exclude" -> use limitExclude @@ -96,6 +96,7 @@ parseToken matchstandard matchgroupwanted checkpresent checkpreferreddir getgrou _ -> Left $ "near " ++ show t where (k, v) = separate (== '=') t + simply = Right . Operation use a = Operation <$> a v call sub = Right $ Operation $ \notpresent mi -> matchMrun sub $ \a -> a notpresent mi |