twee-lib-2.1.3: An equational theorem prover

Safe HaskellNone
LanguageHaskell2010

Twee.Rule.Index

Synopsis

Documentation

data RuleIndex f a Source #

Constructors

RuleIndex 

Fields

Instances

Show a => Show (RuleIndex f a) Source # 

Methods

showsPrec :: Int -> RuleIndex f a -> ShowS #

show :: RuleIndex f a -> String #

showList :: [RuleIndex f a] -> ShowS #

insert :: forall f a. Has a (Rule f) => Term f -> a -> RuleIndex f a -> RuleIndex f a Source #

delete :: forall f a. (Eq a, Has a (Rule f)) => Term f -> a -> RuleIndex f a -> RuleIndex f a Source #

approxMatches :: Term f -> Index f a -> [a] Source #

Look up a term in the index, possibly returning spurious extra results.

matches :: Has a (Term f) => Term f -> Index f a -> [(Subst f, a)] Source #

Look up a term in the index. Like lookup, but returns the exact value that was inserted into the index, not an instance. Also returns a substitution which when applied to the value gives you the matching instance.

lookup :: (Has a b, Symbolic b, Has b (TermOf b)) => TermOf b -> Index (ConstantOf b) a -> [b] Source #

Look up a term in the index. Finds all key-value such that the search term is an instance of the key, and returns an instance of the the value which makes the search term exactly equal to the key.