difftodo-0.2.0: Generate todo lists from source code

Safe HaskellNone
LanguageHaskell2010

Fixme.Comment

Contents

Synopsis

Understand comments

parseComments :: Filename -> Language -> ByteString -> [Comment] Source #

Given some source code, return a list of comments.

readComments :: FilePath -> Maybe (IO [Comment]) Source #

Read the given file, and parse out any comments.

Return Nothing if we cannot determine what language the file is in. Raises exceptions on bad IO, and also if the file cannot be decoded to Text.

filename :: Located a -> Filename Source #

Generic support for things located in files

data Located a Source #

A thing that is located somewhere in a text file.

Instances

Functor Located Source # 

Methods

fmap :: (a -> b) -> Located a -> Located b #

(<$) :: a -> Located b -> Located a #

Eq a => Eq (Located a) Source # 

Methods

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

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

Show a => Show (Located a) Source # 

Methods

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

show :: Located a -> String #

showList :: [Located a] -> ShowS #

Exposed for testing

newComment :: Filename -> Int -> ByteString -> Comment Source #

Understand programming languages

type Language = Lexer Source #

Wrappers around syntax highlighting code.

Exposed for testing