rename <&&>/<||> to andM/orM

This commit is contained in:
rhiannon morris 2023-03-03 12:19:15 +01:00
parent 841564f69f
commit 95a6644a6c
2 changed files with 6 additions and 6 deletions

View File

@ -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

View File

@ -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