Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- type Module = Located HsModule
- type Stmt = ExprLStmt GhcPs
- type Expr = LHsExpr GhcPs
- type Decl = LHsDecl GhcPs
- type Name = LocatedN RdrName
- type Pat = LPat GhcPs
- type Type = LHsType GhcPs
- type Import = LImportDecl GhcPs
- type FunBind = HsMatchContext GhcPs
- pattern RealSrcLoc' :: RealSrcLoc -> SrcLoc
- pattern RealSrcSpan' :: RealSrcSpan -> SrcSpan
- type M a = StateT () IO a
- modifyAnnKey :: (Data mod, Data t, Data old, Data new, Monoid t, Typeable t) => mod -> LocatedAn t old -> LocatedAn t new -> M (LocatedAn t new)
- getAnnSpan :: forall a. Located a -> AnnSpan
- getAnnSpanA :: forall an a. LocatedAn an a -> AnnSpan
- toGhcSrcSpan :: FilePath -> SrcSpan -> SrcSpan
- toGhcSrcSpan' :: FastString -> SrcSpan -> SrcSpan
- annSpanToSrcSpan :: AnnSpan -> SrcSpan
- srcSpanToAnnSpan :: SrcSpan -> AnnSpan
- setAnnSpanFile :: FastString -> AnnSpan -> AnnSpan
- setSrcSpanFile :: FastString -> SrcSpan -> SrcSpan
- setRealSrcSpanFile :: FastString -> RealSrcSpan -> RealSrcSpan
Synonyms
type Import = LImportDecl GhcPs Source #
type FunBind = HsMatchContext GhcPs Source #
pattern RealSrcLoc' :: RealSrcLoc -> SrcLoc Source #
pattern RealSrcSpan' :: RealSrcSpan -> SrcSpan Source #
Monad
Utility
modifyAnnKey :: (Data mod, Data t, Data old, Data new, Monoid t, Typeable t) => mod -> LocatedAn t old -> LocatedAn t new -> M (LocatedAn t 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. modifyAnnKey :: (Data old, Data new, Data mod) => mod -> GHC.Located old -> GHC.Located new -> M (GHC.Located new)
getAnnSpan :: forall a. Located a -> AnnSpan Source #
getAnnSpanA :: forall an a. LocatedAn an a -> AnnSpan Source #
toGhcSrcSpan :: FilePath -> SrcSpan -> SrcSpan Source #
Convert a Refact.Types.SrcSpan
to a SrcLoc.SrcSpan
toGhcSrcSpan' :: FastString -> SrcSpan -> SrcSpan Source #
Convert a Refact.Types.SrcSpan
to a SrcLoc.SrcSpan
annSpanToSrcSpan :: AnnSpan -> SrcSpan Source #
srcSpanToAnnSpan :: SrcSpan -> AnnSpan Source #
setAnnSpanFile :: FastString -> AnnSpan -> AnnSpan Source #
setSrcSpanFile :: FastString -> SrcSpan -> SrcSpan Source #