Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data Namer = Namer {
- nameTerm :: Referent -> Set (HashQualified Name)
- nameType :: TypeReference -> Set (HashQualified Name)
- hqNamer :: Int -> Names -> Namer
- namer :: Names -> Namer
- data Suffixifier
- dontSuffixify :: Suffixifier
- suffixifyByHash :: Names -> Suffixifier
- suffixifyByHashName :: Names -> Suffixifier
- suffixifyByName :: Names -> Suffixifier
- suffixifyByHashWithUnhashedTermsInScope :: Set Name -> Names -> Suffixifier
- makePPE :: Namer -> Suffixifier -> PrettyPrintEnv
- makeTermNames :: Namer -> Suffixifier -> Referent -> [(HashQualified Name, HashQualified Name)]
- makeTypeNames :: Namer -> Suffixifier -> TypeReference -> [(HashQualified Name, HashQualified Name)]
Namer
A "namer" associates a set of (possibly hash-qualified) names with a referent / type reference.
Namer | |
|
hqNamer :: Int -> Names -> Namer Source #
Make a "namer" out of a collection of names, respecting conflicted names. That is, if references #foo and #bar are both associated with name "baz", then the returned namer maps #foo too "baz"#foo and #bar to "baz"#bar, but otherwise if a reference #qux has a single name "qux", then the returned namer maps #qux to "qux" (not "qux"#qux).
namer :: Names -> Namer Source #
Make a "namer" out of a collection of names, ignoring conflicted names. That is, if references #foo and #bar are both associated with name "baz", then the returned namer maps #foo too "baz" (not "baz"#foo) and #bar to "baz" (not "baz"#bar).
Suffixifier
data Suffixifier Source #
suffixifyByHash :: Names -> Suffixifier Source #
suffixifyByName :: Names -> Suffixifier Source #
Pretty-print env
makePPE :: Namer -> Suffixifier -> PrettyPrintEnv Source #
makeTermNames :: Namer -> Suffixifier -> Referent -> [(HashQualified Name, HashQualified Name)] Source #
makeTypeNames :: Namer -> Suffixifier -> TypeReference -> [(HashQualified Name, HashQualified Name)] Source #