Safe Haskell | None |
---|---|
Language | Haskell2010 |
- type Module = Located (HsModule RdrName)
- type Stmt = ExprLStmt RdrName
- type Expr = Located (HsExpr RdrName)
- type Decl = Located (HsDecl RdrName)
- type Name = Located RdrName
- type Pat = LPat RdrName
- type Type = Located (HsType RdrName)
- type Import = LImportDecl RdrName
- type M a = State Anns a
- mergeAnns :: Anns -> Anns -> Anns
- modifyAnnKey :: (Data old, Data new, Data mod) => mod -> Located old -> Located new -> M (Located new)
- replaceAnnKey :: Anns -> AnnKey -> AnnKey -> AnnKey -> AnnKey -> Anns
- toGhcSrcSpan :: FilePath -> SrcSpan -> SrcSpan
- findParent :: Data a => SrcSpan -> a -> Maybe AnnKey
Synonyms
type Import = LImportDecl RdrName Source
Monad
Utility
modifyAnnKey :: (Data old, Data new, Data mod) => mod -> Located old -> Located new -> M (Located new) Source
Perform the necessary adjustments to annotations when replacing one Located thing with another Located thing.
For example, this function will ensure the correct relative position and make sure that any trailing semi colons or commas are transferred.
replaceAnnKey :: Anns -> AnnKey -> AnnKey -> AnnKey -> AnnKey -> Anns Source
Lower level version of modifyAnnKey
toGhcSrcSpan :: FilePath -> SrcSpan -> SrcSpan Source
Convert a Refact.Types.SrcSpan
to a SrcLoc.SrcSpan