Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Tag = Tag {}
- compareTags :: Tag -> Tag -> Ordering
- tagFilePath :: Tag -> FilePath
- newtype TagName = TagName {
- getTagName :: Text
- newtype TagFile = TagFile {
- getTagFile :: String
- data TagKind
- data GhcKind
- = TkTerm
- | TkFunction
- | TkTypeConstructor
- | TkDataConstructor
- | TkGADTConstructor
- | TkRecordField
- | TkTypeSynonym
- | TkTypeSignature
- | TkPatternSynonym
- | TkTypeClass
- | TkTypeClassMember
- | TkTypeClassInstance
- | TkTypeFamily
- | TkTypeFamilyInstance
- | TkDataTypeFamily
- | TkDataTypeFamilyInstance
- | TkForeignImport
- | TkForeignExport
- charToGhcKind :: Char -> Maybe GhcKind
- ghcKindToChar :: GhcKind -> Char
- data TagField = TagField {
- fieldName :: Text
- fieldValue :: Text
- ghcTagToTag :: GhcTag -> Maybe Tag
- combineTags :: [Tag] -> [Tag] -> [Tag]
Tag
Simple Tag record. For the moment on tag name, tag file and line numbers are supported.
TODO: expand to support column numbers and extra information.
compareTags :: Tag -> Tag -> Ordering Source #
Total order relation on Tag
elements.
It sorts type classes / type families (TkTypeClass
, TkTypeFamily
,
TkDataTypeFamily
) before instances (TkTypeClassInstance
,
TkTypeFamilyInstance
, TkDataTypeFamilyInstance
); but also (as a side
effect of keeping transitivity property) it will put type classes and their
instances before other kinds.
tagFilePath :: Tag -> FilePath Source #
ByteString
which encodes a tag name.
ByteString
which encodes a tag file.
When we parse a tags
file we can eithera find no kind or recognize the
kind of GhcKind or we store the found character kind. This allows us to
preserve information from parsed tags files which were not created by
`ghc-tags-plugin'
ctags
can generate tags kinds, so do we.
ghcKindToChar :: GhcKind -> Char Source #