Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
The type RDualBool
is like Bool
, but allows recursive definitions:
>>>
:{
let x = RDB.true y = x RDB.&& z z = y RDB.|| RDB.false in RDB.get x :} True
This finds the greatest solution, i.e. prefers True
over False
:
>>>
:{
let x = x RDB.&& y y = y RDB.&& x in (RDB.get x, RDB.get y) :} (True,True)
Use RBool
from Data.Recursive.Bool if you want the least solution.
Synopsis
Documentation
Like Bool
, but admits recursive definitions, preferring the greatest solution.
(&&) :: RDualBool -> RDualBool -> RDualBool Source #
RDB.get (r1 RDB.&& r2) === (RDB.get r1 && RDB.get r2)