rest-rewrite-0.4.3: Rewriting library with online termination checking
Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.REST.Internal.WQO

Synopsis

Documentation

insert :: (Ord a, Eq a, Hashable a) => WQO a -> (a, a, QORelation) -> ExtendOrderingResult a Source #

insertMaybe :: (Ord a, Eq a, Hashable a) => WQO a -> (a, a, QORelation) -> Maybe (WQO a) Source #

orderings :: forall a. (Ord a, Eq a, Hashable a) => Set a -> Set (WQO a) Source #

Generates all the possible orderings of the elements in the given set.

getRelation :: (Ord a, Eq a, Hashable a) => WQO a -> a -> a -> Maybe QORelation Source #

getRelation (>=) a b == QEQ iff a >= b getRelation (>=) a b == QGT iff a > b

merge :: forall a. (Ord a, Eq a, Hashable a) => WQO a -> WQO a -> Maybe (WQO a) Source #

mergeAll :: forall a. (Show a, Ord a, Eq a, Hashable a) => [WQO a] -> Maybe (WQO a) Source #

notStrongerThan :: forall a. (Ord a, Eq a, Hashable a) => WQO a -> WQO a -> Bool Source #

w1 notStrongerThan w2 if it is possible to extend w1 with additional relations to obtain w2

data WQO a Source #

Well-founded reflexive partial orders

Instances

Instances details
Generic (WQO a) Source # 
Instance details

Defined in Language.REST.Internal.WQO

Associated Types

type Rep (WQO a) :: Type -> Type #

Methods

from :: WQO a -> Rep (WQO a) x #

to :: Rep (WQO a) x -> WQO a #

(Show a, Eq a, Hashable a) => Show (WQO a) Source # 
Instance details

Defined in Language.REST.Internal.WQO

Methods

showsPrec :: Int -> WQO a -> ShowS #

show :: WQO a -> String #

showList :: [WQO a] -> ShowS #

Eq a => Eq (WQO a) Source # 
Instance details

Defined in Language.REST.Internal.WQO

Methods

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

(/=) :: WQO a -> WQO a -> Bool #

Ord a => Ord (WQO a) Source # 
Instance details

Defined in Language.REST.Internal.WQO

Methods

compare :: WQO a -> WQO a -> Ordering #

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

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

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

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

max :: WQO a -> WQO a -> WQO a #

min :: WQO a -> WQO a -> WQO a #

Hashable a => Hashable (WQO a) Source # 
Instance details

Defined in Language.REST.Internal.WQO

Methods

hashWithSalt :: Int -> WQO a -> Int #

hash :: WQO a -> Int #

ToSMTVar a Int => ToSMT (WQO a) Bool Source # 
Instance details

Defined in Language.REST.Internal.WQO

Methods

toSMT :: WQO a -> SMTExpr Bool Source #

type Rep (WQO a) Source # 
Instance details

Defined in Language.REST.Internal.WQO

type Rep (WQO a)

data QORelation Source #

Constructors

QGT 
QEQ 

Instances

Instances details
Generic QORelation Source # 
Instance details

Defined in Language.REST.Internal.WQO

Associated Types

type Rep QORelation :: Type -> Type #

Show QORelation Source # 
Instance details

Defined in Language.REST.Internal.WQO

Eq QORelation Source # 
Instance details

Defined in Language.REST.Internal.WQO

Ord QORelation Source # 
Instance details

Defined in Language.REST.Internal.WQO

Hashable QORelation Source # 
Instance details

Defined in Language.REST.Internal.WQO

type Rep QORelation Source # 
Instance details

Defined in Language.REST.Internal.WQO

type Rep QORelation = D1 ('MetaData "QORelation" "Language.REST.Internal.WQO" "rest-rewrite-0.4.3-L4CHsmDzf4PMYNf7CqgfF" 'False) (C1 ('MetaCons "QGT" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "QEQ" 'PrefixI 'False) (U1 :: Type -> Type))

relevantTo :: (Ord a, Eq a, Hashable a) => WQO a -> Set a -> Set a -> WQO a Source #

relevantTo wqo as bs returns a new WQO that contains only the necessary relations to relate elements from as with elements in bs as they are related in wqo.

singleton :: (Ord a, Eq a, Hashable a) => (a, a, QORelation) -> Maybe (WQO a) Source #

null :: Eq a => WQO a -> Bool Source #

getPO :: WQO a -> PartialOrder (EquivalenceClass a) Source #

getECs :: WQO a -> Set (EquivalenceClass a) Source #

elems :: Ord a => WQO a -> Set a Source #