purescript-0.15.15: PureScript Programming Language Compiler

Safe Haskell | None
Language | Haskell2010

Language.PureScript.TypeChecker.Entailment.IntCompare

Description

Graph-based solver for comparing type-level numbers with respect to reflexivity, symmetry, and transitivity properties.

# Documentation

data Relation a #

Constructors

Equal a a |
LessThan a a |

#### Instances

Instances details

Functor Relation # |
Instance details Defined in Language.PureScript.TypeChecker.Entailment.IntCompare Methods fmap :: (a -> b) -> Relation a -> Relation b # (<$) :: a -> Relation b -> Relation a #
Show a => Show (Relation a) # |
Instance details Defined in Language.PureScript.TypeChecker.Entailment.IntCompare Methods showsPrec :: Int -> Relation a -> ShowS # show :: Relation a -> String # showList :: [Relation a] -> ShowS #
Eq a => Eq (Relation a) # |
Instance details Defined in Language.PureScript.TypeChecker.Entailment.IntCompare Methods (==) :: Relation a -> Relation a -> Bool # (/=) :: Relation a -> Relation a -> Bool #
Ord a => Ord (Relation a) # |

Instance details

Defined in Language.PureScript.TypeChecker.Entailment.IntCompare

Methods

compare :: Relation a -> Relation a -> Ordering #

(<) :: Relation a -> Relation a -> Bool #

(<=) :: Relation a -> Relation a -> Bool #

(>) :: Relation a -> Relation a -> Bool #

(>=) :: Relation a -> Relation a -> Bool #

max :: Relation a -> Relation a -> Relation a #

min :: Relation a -> Relation a -> Relation a #

type Context a = [Relation a] #

type PSOrdering = Qualified (ProperName 'TypeName) #

solveRelation :: Ord a => Context a -> a -> a -> Maybe PSOrdering #

mkRelation :: Type a -> Type a -> Type a -> Maybe (Relation (Type a)) #

mkFacts :: [[Type a]] -> [Relation (Type a)] #