add BoolExtra

This commit is contained in:
rhiannon morris 2023-02-22 05:42:56 +01:00
parent 1a7efc104e
commit c75f1514ba
2 changed files with 13 additions and 0 deletions

12
lib/Quox/BoolExtra.idr Normal file
View file

@ -0,0 +1,12 @@
module Quox.BoolExtra
import public Data.Bool
infixr 5 <&&>
infixr 4 <||>
public export
(<&&>), (<||>) : Monad m => m Bool -> m Bool -> m Bool
a <&&> b = if !a then b else pure False
a <||> b = if not !a then b else pure True

View file

@ -9,6 +9,7 @@ depends = base, contrib, elab-util, sop, snocvect
modules = modules =
Quox.NatExtra, Quox.NatExtra,
Quox.BoolExtra,
Quox.Decidable, Quox.Decidable,
Quox.No, Quox.No,
Quox.Pretty, Quox.Pretty,