libhbb-0.4.1.0: Backend for text editors to provide better Haskell editing support.

Safe HaskellNone

Language.Haskell.HBB.OccurrencesOf

Synopsis

Documentation

occurrencesOfSource

Arguments

:: [String]

A list of ghc options (e.g. [-isrc])

-> FilePath

The file where the token to rename resides in

-> BufLoc

The location where the token to rename is

-> [FilePath]

A list of further files which possibly contain this token and which should be searched for it

-> IO [(FilePath, BufSpan)] 

This function takes a location, searches out what is at this location and then returns a list of all occurrences of this identifier. This currently works for names of function- and value bindings.

occurrencesOfM :: GhcMonad m => FilePath -> BufLoc -> [FilePath] -> m [(FilePath, BufSpan)]Source

This is the monadic version of occurrencesOf which allows to use this mode of operation from a preconfigured GHC environment.

showOccurrencesOfResultSource

Arguments

:: [(FilePath, BufSpan)]

The result that should be shown

-> String 

This Function formats the results from the occurrencesOf or occurrencesOfM function.

data BufLoc Source

This is just the combination of a line number and a column number.

Constructors

BufLoc Int Int

BufLoc line column

Instances

Eq BufLoc 
Data BufLoc 
Ord BufLoc 
Show BufLoc

BufLocs are shown by separating the line and the column number by a colon.

Typeable BufLoc 

data BufSpan Source

A BufSpan is simply defined by two times a BufLoc.

Constructors

BufSpan BufLoc BufLoc

BufSpan startLoc endLoc

Instances

Eq BufSpan 
Data BufSpan 
Show BufSpan 
Typeable BufSpan