HaRe-0.8.3.0: the Haskell Refactorer.

Safe HaskellNone
LanguageHaskell98

Language.Haskell.Refact.Utils.MonadFunctions

Contents

Description

 

Synopsis

Conveniences for state access

fetchAnnsFinal :: RefactGhc Anns Source #

fetch the final annotations

Annotations

setRefactAnns :: Anns -> RefactGhc () Source #

Internal low level interface to access the current annotations from the RefactGhc state.

New ghc-exactprint interfacing

liftT :: HasTransform m => forall a. Transform a -> m a #

State flags for managing generic traversals

Parsing source

Utility

nameSybQuery :: (Typeable a, Typeable t) => (Located a -> Maybe r) -> t -> Maybe r Source #

For use by the tests only

initRdrNameMap :: TypecheckedModule -> NameMap Source #

We need the ParsedSource because it more closely reflects the actual source code, but must be able to work with the renamed representation of the names involved. This function constructs a map from every Located RdrName in the ParsedSource to its corresponding name in the RenamedSource. It also deals with the wrinkle that we need to Location of the RdrName to make sure we have the right Name, but not all RdrNames have a Location. This function is called before the RefactGhc monad is active.

Orphan instances