mirror of
https://github.com/GaloisInc/cryptol.git
synced 2024-12-16 11:22:33 +03:00
Allow ":set <boolean-flag> = false" and ":set <boolean-flag> = true".
Previously we only allowed enable/disable, on/off, or yes/no.
This commit is contained in:
parent
9e3f7ec13f
commit
3a4bc6a2af
@ -597,9 +597,9 @@ setUser name val = case lookupTrieExact name userOptions of
|
||||
_ -> rPutStrLn ("Failed to parse number for field, `" ++ name ++ "`")
|
||||
|
||||
EnvBool _
|
||||
| any (`isPrefixOf` val) ["enable","on","yes"] ->
|
||||
| any (`isPrefixOf` val) ["enable", "on", "yes", "true"] ->
|
||||
writeEnv (EnvBool True)
|
||||
| any (`isPrefixOf` val) ["disable","off","no"] ->
|
||||
| any (`isPrefixOf` val) ["disable", "off", "no", "false"] ->
|
||||
writeEnv (EnvBool False)
|
||||
| otherwise ->
|
||||
rPutStrLn ("Failed to parse boolean for field, `" ++ name ++ "`")
|
||||
|
Loading…
Reference in New Issue
Block a user