refactor
This commit is contained in:
parent
aded00c5f0
commit
5d9c7a1164
1 changed files with 4 additions and 3 deletions
|
@ -79,9 +79,9 @@ parseToken matchstandard matchgroupwanted checkpresent checkpreferreddir getgrou
|
||||||
"groupwanted" -> call matchgroupwanted
|
"groupwanted" -> call matchgroupwanted
|
||||||
"present" -> use checkpresent
|
"present" -> use checkpresent
|
||||||
"inpreferreddir" -> use checkpreferreddir
|
"inpreferreddir" -> use checkpreferreddir
|
||||||
"unused" -> Right $ Operation limitUnused
|
"unused" -> simply limitUnused
|
||||||
"anything" -> Right $ Operation limitAnything
|
"anything" -> simply limitAnything
|
||||||
"nothing" -> Right $ Operation limitNothing
|
"nothing" -> simply limitNothing
|
||||||
_ -> case k of
|
_ -> case k of
|
||||||
"include" -> use limitInclude
|
"include" -> use limitInclude
|
||||||
"exclude" -> use limitExclude
|
"exclude" -> use limitExclude
|
||||||
|
@ -96,6 +96,7 @@ parseToken matchstandard matchgroupwanted checkpresent checkpreferreddir getgrou
|
||||||
_ -> Left $ "near " ++ show t
|
_ -> Left $ "near " ++ show t
|
||||||
where
|
where
|
||||||
(k, v) = separate (== '=') t
|
(k, v) = separate (== '=') t
|
||||||
|
simply = Right . Operation
|
||||||
use a = Operation <$> a v
|
use a = Operation <$> a v
|
||||||
call sub = Right $ Operation $ \notpresent mi ->
|
call sub = Right $ Operation $ \notpresent mi ->
|
||||||
matchMrun sub $ \a -> a notpresent mi
|
matchMrun sub $ \a -> a notpresent mi
|
||||||
|
|
Loading…
Add table
Reference in a new issue