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