ddc-core-0.4.3.1: Disciplined Disciple Compiler core language and type checker.

Safe HaskellSafe
LanguageHaskell98

DDC.Data.Name

Synopsis

Documentation

class StringName n where Source #

Minimal complete definition

stringName

Methods

stringName :: n -> String Source #

Produce a flat string from a name. The resulting string should be re-lexable as a bindable name.

class CompoundName n where Source #

Compound names can be extended to create new names. This is useful when generating fresh names during program transformation.

Minimal complete definition

extendName, newVarName, splitName

Methods

extendName :: n -> String -> n Source #

Build a new name based on the given one.

newVarName :: String -> n Source #

Build a new name from the given string.

splitName :: n -> Maybe (n, String) Source #

Split the extension string from a name.