lib: Hledger.Data.RawOptions: add unsetboolopt
This commit is contained in:
parent
d98dfedb9e
commit
7408bc02df
@ -11,6 +11,7 @@ module Hledger.Data.RawOptions (
|
|||||||
RawOpts,
|
RawOpts,
|
||||||
setopt,
|
setopt,
|
||||||
setboolopt,
|
setboolopt,
|
||||||
|
unsetboolopt,
|
||||||
appendopts,
|
appendopts,
|
||||||
inRawOpts,
|
inRawOpts,
|
||||||
boolopt,
|
boolopt,
|
||||||
@ -49,6 +50,9 @@ setopt name val = overRawOpts (++ [(name, val)])
|
|||||||
setboolopt :: String -> RawOpts -> RawOpts
|
setboolopt :: String -> RawOpts -> RawOpts
|
||||||
setboolopt name = overRawOpts (++ [(name,"")])
|
setboolopt name = overRawOpts (++ [(name,"")])
|
||||||
|
|
||||||
|
unsetboolopt :: String -> RawOpts -> RawOpts
|
||||||
|
unsetboolopt name = overRawOpts (filter ((/=name).fst))
|
||||||
|
|
||||||
appendopts :: [(String,String)] -> RawOpts -> RawOpts
|
appendopts :: [(String,String)] -> RawOpts -> RawOpts
|
||||||
appendopts new = overRawOpts (++new)
|
appendopts new = overRawOpts (++new)
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user