Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Rerefined.Predicate.Relational.Internal
Synopsis
- data RelOp
- class Typeable op => ReifyRelOp (op :: RelOp) where
- reifyRelOp :: forall a. (Num a, Ord a) => a -> a -> Bool
- reifyRelOpPretty :: String
- type family WidenRelOp (op :: RelOp) (n :: Natural) (m :: Natural) where ...
Documentation
Relational operator.
There are three possible outcomes from compare
ing two terms, defined in
Ordering
. However, we may instead compare terms using relational operators
such as >=
, which are more specific comparisons that return a Bool
.
Constructor order is arbitrary due to NEQ
, which obstructs ordering in a
meaningful way.
class Typeable op => ReifyRelOp (op :: RelOp) where Source #
Reify a relational operator type tag.
We stuff the Typeable
constraint in here because we need it for easy
Predicate
instances, and we don't want to expose the
Typeable
constraint elsewhere.
Methods
reifyRelOp :: forall a. (Num a, Ord a) => a -> a -> Bool Source #
The term-level relational operator that op
describes.
reifyRelOpPretty :: String Source #
Pretty operator.
Instances
ReifyRelOp 'EQ' Source # | |
Defined in Rerefined.Predicate.Relational.Internal | |
ReifyRelOp 'GT' Source # | |
Defined in Rerefined.Predicate.Relational.Internal | |
ReifyRelOp 'GTE Source # | |
Defined in Rerefined.Predicate.Relational.Internal | |
ReifyRelOp 'LT' Source # | |
Defined in Rerefined.Predicate.Relational.Internal | |
ReifyRelOp 'LTE Source # | |
Defined in Rerefined.Predicate.Relational.Internal | |
ReifyRelOp 'NEQ Source # | |
Defined in Rerefined.Predicate.Relational.Internal |