Safe Haskell | None |
---|---|
Language | Haskell98 |
Documentation
class (Ord v, IsString v, Data v, Pretty v) => Variable v where Source
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
showVariable :: Variable v => v -> String Source