rerefined-0.8.0: Refinement types, again
Safe HaskellNone
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 :: k -> k1 -> Type infixr 3 Source #

type (.||) = Or :: k -> k1 -> Type infixr 2 Source #

type (.<->) = Iff :: k -> k1 -> Type infixr 4 Source #

type (.->) = If :: k -> k1 -> Type infixr 4 Source #

type (.!&) = Nand :: k -> k1 -> Type infixr 3 Source #

type (.!|) = Nor :: k -> k1 -> Type infixr 2 Source #

type (.!) = Not :: k -> Type infix 9 Source #

type (.!=) = Xor :: k -> k1 -> Type infixr 4 Source #

Relational

type (.<) = 'RelOpLT infix 4 Source #

type (.<=) = 'RelOpLTE infix 4 Source #

type (.==) = 'RelOpEQ infix 4 Source #

type (./=) = 'RelOpNEQ infix 4 Source #

type (.>=) = 'RelOpGTE infix 4 Source #

type (.>) = 'RelOpGT infix 4 Source #