purescript-0.15.7: PureScript Programming Language Compiler
Safe HaskellSafe-Inferred
LanguageHaskell2010

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 Source #

Constructors

Equal a a 
LessThan a a 

Instances

Instances details
Functor Relation Source # 
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) Source # 
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) Source # 
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) Source # 
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] Source #

solveRelation :: forall a. Ord a => Context a -> a -> a -> Maybe PSOrdering Source #

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

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