fast-tags-1.2.1: Fast incremental vi and emacs tags.

Safe HaskellNone
LanguageHaskell98

FastTags

Synopsis

Documentation

isHsFile :: FilePath -> Bool Source #

Crude predicate for Haskell files

merge :: Ord a => [a] -> [a] -> [a] Source #

data TagVal Source #

Constructors

TagVal !Text !Type 

data Type Source #

Instances

Eq Type Source # 

Methods

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

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

Ord Type Source # 

Methods

compare :: Type -> Type -> Ordering #

(<) :: Type -> Type -> Bool #

(<=) :: Type -> Type -> Bool #

(>) :: Type -> Type -> Bool #

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

max :: Type -> Type -> Type #

min :: Type -> Type -> Type #

Show Type Source # 

Methods

showsPrec :: Int -> Type -> ShowS #

show :: Type -> String #

showList :: [Type] -> ShowS #

NFData Type Source # 

Methods

rnf :: Type -> () #

data Tag Source #

Instances

Eq Tag Source # 

Methods

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

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

Ord Tag Source # 

Methods

compare :: Tag -> Tag -> Ordering #

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

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

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

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

max :: Tag -> Tag -> Tag #

min :: Tag -> Tag -> Tag #

Show Tag Source # 

Methods

showsPrec :: Int -> Tag -> ShowS #

show :: Tag -> String #

showList :: [Tag] -> ShowS #

data Pos a Source #

Constructors

Pos 

Fields

Instances

Eq a => Eq (Pos a) Source # 

Methods

(==) :: Pos a -> Pos a -> Bool #

(/=) :: Pos a -> Pos a -> Bool #

Ord a => Ord (Pos a) Source # 

Methods

compare :: Pos a -> Pos a -> Ordering #

(<) :: Pos a -> Pos a -> Bool #

(<=) :: Pos a -> Pos a -> Bool #

(>) :: Pos a -> Pos a -> Bool #

(>=) :: Pos a -> Pos a -> Bool #

max :: Pos a -> Pos a -> Pos a #

min :: Pos a -> Pos a -> Pos a #

Show a => Show (Pos a) Source # 

Methods

showsPrec :: Int -> Pos a -> ShowS #

show :: Pos a -> String #

showList :: [Pos a] -> ShowS #

NFData a => NFData (Pos a) Source # 

Methods

rnf :: Pos a -> () #

data SrcPos Source #

Constructors

SrcPos 

Fields

newtype UnstrippedTokens Source #

Newlines have to remain in the tokens because breakBlocks relies on them. But they make pattern matching on the tokens unreliable because newlines might be anywhere. A newtype makes sure that the tokens only get stripped once and that I don't do any pattern matching on unstripped tokens.

Constructors

UnstrippedTokens [Token] 

processFile :: FilePath -> Bool -> IO ([Pos TagVal], [String]) Source #

Read tags from one file.

processAll :: [[Pos TagVal]] -> [Pos TagVal] Source #

Global processing for when all tags are together.

process :: FilePath -> Bool -> Text -> ([Pos TagVal], [String]) Source #

Process one file's worth of tags.

stripCpp :: Text -> Text Source #

Strip cpp lines starting with #. Also strips out hsc detritus.

stripNewlines :: UnstrippedTokens -> [Token] Source #

It's easier to scan for tokens without pesky newlines popping up everywhere. But I need to keep the newlines in in case I hit a where and need to call breakBlocks again.

breakBlocks :: UnstrippedTokens -> [UnstrippedTokens] Source #

Break the input up into blocks based on indentation.

split :: Eq a => a -> [a] -> [[a]] Source #

Split list into chunks delimited by specified element.