logic-classes-1.5.3: Framework for propositional and first order logic, theorem proving

Safe HaskellNone
LanguageHaskell98

Data.Logic.Classes.Variable

Synopsis

Documentation

class (Ord v, IsString v, Data v, Pretty v) => Variable v where Source

Methods

variant :: v -> Set v -> v Source

Return a variable based on v but different from any set element. The result may be v itself if v is not a member of the set.

prefix :: String -> v -> v Source

Modify a variable by adding a prefix. This unfortunately assumes that v is "string-like" but at least one algorithm in Harrison currently requires this.

prettyVariable :: v -> Doc Source

Pretty print a variable

variants :: Variable v => v -> [v] Source

Return an infinite list of variations on v