rename <&&>/<||> to andM/orM
This commit is contained in:
parent
841564f69f
commit
95a6644a6c
2 changed files with 6 additions and 6 deletions
|
@ -3,10 +3,10 @@ module Quox.BoolExtra
|
|||
import public Data.Bool
|
||||
|
||||
|
||||
infixr 5 <&&>
|
||||
infixr 4 <||>
|
||||
infixr 5 `andM`
|
||||
infixr 4 `orM`
|
||||
|
||||
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
|
||||
andM, orM : Monad m => m Bool -> m Bool -> m Bool
|
||||
andM a b = if !a then b else pure False
|
||||
orM a b = if not !a then b else pure True
|
||||
|
|
|
@ -92,7 +92,7 @@ parameters (defs : Definitions' q g)
|
|||
TYPE _ => pure False
|
||||
Pi {res, _} => isSubSing res.term
|
||||
Lam {} => pure False
|
||||
Sig {fst, snd} => isSubSing fst <&&> isSubSing snd.term
|
||||
Sig {fst, snd} => isSubSing fst `andM` isSubSing snd.term
|
||||
Pair {} => pure False
|
||||
Enum tags => pure $ length (SortedSet.toList tags) <= 1
|
||||
Tag {} => pure False
|
||||
|
|
Loading…
Reference in a new issue