rerefined-0.5.0: Refinement types, again
Safe HaskellSafe-Inferred
LanguageGHC2021

Rerefined.Predicates.Operators

Description

Predicate re-exports using operators.

We stick with non-operators for base predicate definitions because, very simply, there aren't enough symbols to go around. The operators we would want to use for logical predicates are already being used on the term level, and I forsee a future full of promoted functions, so I wouldn't want to take up the type-level name.

Instead, I'm providing operators in separate modules. It's not ideal, because predicates already have operators defined in their pretty printing, and they may not coincide with available Haskell symbols. I'm not really sure how to do all this, it's very tentative for now.

Synopsis

Logical

Awkward mix of Boolean and propositional operators. Sorry. Let me know if you have a better idea.

type (.&&) = And infixr 3 Source #

type (.||) = Or infixr 2 Source #

type (.<->) = Iff infixr 4 Source #

type (.->) = If infixr 4 Source #

type (.!&) = Nand infixr 3 Source #

type (.!|) = Nor infixr 2 Source #

type (.!) = Not infix 9 Source #

type (.!=) = Xor infixr 4 Source #

Relational

type (.<) = LT infix 4 Source #

type (.<=) = LTE infix 4 Source #

type (.==) = EQ infix 4 Source #

type (./=) = NEQ infix 4 Source #

type (.>=) = GTE infix 4 Source #

type (.>) = GT infix 4 Source #