mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-20 01:07:18 +03:00
parent
a9d5367dbf
commit
3968bcf216
@ -178,8 +178,8 @@ reduce (Disjunction ds) =
|
||||
in foldl work false xs
|
||||
|
||||
-- | `isBool` attempts to convert a formula to a bool. It satisfies
|
||||
-- `isBool true == Right True` and `toBool false == Right False`.
|
||||
-- Otherwise, it returns `Left x`, where `x` is the input.
|
||||
-- `isBool true == Some True` and `isBool false == Some False`.
|
||||
-- Otherwise, it returns `None`.
|
||||
isBool : Formula t -> Optional Bool
|
||||
isBool x = case x of
|
||||
Conjunction [] -> Some True
|
||||
|
Loading…
Reference in New Issue
Block a user