clafer-0.3.7: clafer compiles Clafer models to other formats, such as Alloy, XML, HTML, Dot.

Safe HaskellNone

Language.Clafer.QNameUID

Description

Support for dealing with unique IDs (UIDs), fully- and least-partially qualified names.

Synopsis

Documentation

type QName = StringSource

a fully- or partially-qualified name

type FQName = StringSource

fully-qualified name, must begin with :: | e.g., `::Person::name`, `::Company::Department::chair`

type PQName = StringSource

partially-qualified name, must not begin with :: | e.g., `Person::name`, chair

data QNameMaps Source

maps between fully-, least-partially-qualified names and UIDs

type UID = StringSource

unique identifier of a clafer

deriveQNameMaps :: IModule -> QNameMapsSource

derive maps between fully-, partially-qualified names, and UIDs

getUIDs :: QNameMaps -> QName -> [UID]Source

get the UID of a clafer given a fully qualifed name or potentially many UIDs given a partially qualified name

getFQName :: QNameMaps -> UID -> Maybe FQNameSource

get the fully-qualified name of a clafer given its UID

getLPQName :: QNameMaps -> UID -> Maybe PQNameSource

get the least-partially-qualified name of a clafer given its UID