Language.Haskell.GhcMod.SrcUtils

ghc-mod-5.8.0.0: Happy Haskell Hacking

Safe Haskell | None
Language | Haskell2010

Language.Haskell.GhcMod.SrcUtils

Contents

- Orphan instances

Synopsis

- type CstGenQS = Map Var Type
- type CstGenQT a = forall m. GhcMonad m => a Id -> CstGenQS -> (m [(SrcSpan, Type)], CstGenQS)
- collectSpansTypes :: GhcMonad m => Bool -> TypecheckedModule -> (Int, Int) -> m [(SrcSpan, Type)]
- listifySpans :: Typeable a => TypecheckedSource -> (Int, Int) -> [Located a]
- listifyParsedSpans :: Typeable a => ParsedSource -> (Int, Int) -> [Located a]
- listifyRenamedSpans :: Typeable a => RenamedSource -> (Int, Int) -> [Located a]
- listifyStaged :: Typeable r => Stage -> (r -> Bool) -> GenericQ [r]
- cmp :: SrcSpan -> SrcSpan -> Ordering
- toTup :: DynFlags -> PprStyle -> (SrcSpan, Type) -> ((Int, Int, Int, Int), String)
- fourInts :: SrcSpan -> (Int, Int, Int, Int)
- fourIntsHE :: SrcSpan -> (Int, Int, Int, Int)
- typeSigInRangeHE :: Int -> Int -> Decl SrcSpanInfo -> Bool
- pretty :: DynFlags -> PprStyle -> Type -> String
- showName :: DynFlags -> PprStyle -> Name -> String
- showOccName :: DynFlags -> PprStyle -> OccName -> String

# Documentation

type CstGenQS = Map Var Type #

Stores mapping from monomorphic to polymorphic types

type CstGenQT a = forall m. GhcMonad m => a Id -> CstGenQS -> (m [(SrcSpan, Type)], CstGenQS) #

Generic type to simplify SYB definition

collectSpansTypes :: GhcMonad m => Bool -> TypecheckedModule -> (Int, Int) -> m [(SrcSpan, Type)] #

listifySpans :: Typeable a => TypecheckedSource -> (Int, Int) -> [Located a] #

listifyParsedSpans :: Typeable a => ParsedSource -> (Int, Int) -> [Located a] #

listifyRenamedSpans :: Typeable a => RenamedSource -> (Int, Int) -> [Located a] #

listifyStaged :: Typeable r => Stage -> (r -> Bool) -> GenericQ [r] #

cmp :: SrcSpan -> SrcSpan -> Ordering #

toTup :: DynFlags -> PprStyle -> (SrcSpan, Type) -> ((Int, Int, Int, Int), String) #

fourInts :: SrcSpan -> (Int, Int, Int, Int) #

fourIntsHE :: SrcSpan -> (Int, Int, Int, Int) #

typeSigInRangeHE :: Int -> Int -> Decl SrcSpanInfo -> Bool #

pretty :: DynFlags -> PprStyle -> Type -> String #

showName :: DynFlags -> PprStyle -> Name -> String #

showOccName :: DynFlags -> PprStyle -> OccName -> String #

# Orphan instances

HasType (LHsExpr Id) # |
Methods getType :: GhcMonad m => TypecheckedModule -> LHsExpr Id -> m (Maybe (SrcSpan, Type)) #
HasType (LPat Id) # |
Methods getType :: GhcMonad m => TypecheckedModule -> LPat Id -> m (Maybe (SrcSpan, Type)) #