ghc-tags-plugin-0.1.5.0: A compiler plugin which generates tags file from GHC syntax tree.

Safe HaskellNone
LanguageHaskell2010

Plugin.GhcTags.Tag

Contents

Synopsis

Tag

data Tag Source #

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.

Constructors

Tag 
Instances
Eq Tag Source # 
Instance details

Defined in Plugin.GhcTags.Tag

Methods

(==) :: Tag -> Tag -> Bool #

(/=) :: Tag -> Tag -> Bool #

Show Tag Source # 
Instance details

Defined in Plugin.GhcTags.Tag

Methods

showsPrec :: Int -> Tag -> ShowS #

show :: Tag -> String #

showList :: [Tag] -> ShowS #

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.

newtype TagName Source #

ByteString which encodes a tag name.

Constructors

TagName 

Fields

Instances
Eq TagName Source # 
Instance details

Defined in Plugin.GhcTags.Tag

Methods

(==) :: TagName -> TagName -> Bool #

(/=) :: TagName -> TagName -> Bool #

Ord TagName Source # 
Instance details

Defined in Plugin.GhcTags.Tag

Show TagName Source # 
Instance details

Defined in Plugin.GhcTags.Tag

newtype TagFile Source #

ByteString which encodes a tag file.

Constructors

TagFile 

Fields

Instances
Eq TagFile Source # 
Instance details

Defined in Plugin.GhcTags.Tag

Methods

(==) :: TagFile -> TagFile -> Bool #

(/=) :: TagFile -> TagFile -> Bool #

Ord TagFile Source # 
Instance details

Defined in Plugin.GhcTags.Tag

Show TagFile Source # 
Instance details

Defined in Plugin.GhcTags.Tag

data TagKind Source #

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'

Constructors

GhcKind !GhcKind 
CharKind !Char 
NoKind 
Instances
Eq TagKind Source # 
Instance details

Defined in Plugin.GhcTags.Tag

Methods

(==) :: TagKind -> TagKind -> Bool #

(/=) :: TagKind -> TagKind -> Bool #

Ord TagKind Source # 
Instance details

Defined in Plugin.GhcTags.Tag

Show TagKind Source # 
Instance details

Defined in Plugin.GhcTags.Tag

data TagField Source #

Unit of data associated with a tag. Vim natively supports `file:` and `kind:` tags but it can display any other tags too.

Constructors

TagField 

Fields

combineTags :: [Tag] -> [Tag] -> [Tag] Source #