ghc-7.10.3: The GHC API

Safe Haskell | None
Language | Haskell2010

RnEnv

Synopsis

- newTopSrcBinder :: Located RdrName -> RnM Name
- lookupLocatedTopBndrRn :: Located RdrName -> RnM (Located Name)
- lookupTopBndrRn :: RdrName -> RnM Name
- lookupLocatedOccRn :: Located RdrName -> RnM (Located Name)
- lookupOccRn :: RdrName -> RnM Name
- lookupOccRn_maybe :: RdrName -> RnM (Maybe Name)
- lookupLocalOccRn_maybe :: RdrName -> RnM (Maybe Name)
- lookupInfoOccRn :: RdrName -> RnM [Name]
- lookupLocalOccThLvl_maybe :: Name -> RnM (Maybe (TopLevelFlag, ThLevel))
- lookupTypeOccRn :: RdrName -> RnM Name
- lookupKindOccRn :: RdrName -> RnM Name
- lookupGlobalOccRn :: RdrName -> RnM Name
- lookupGlobalOccRn_maybe :: RdrName -> RnM (Maybe Name)
- reportUnboundName :: RdrName -> RnM Name
- data HsSigCtxt
  - = TopSigCtxt NameSet Bool
  - | LocalBindCtxt NameSet
  - | ClsDeclCtxt Name
  - | InstDeclCtxt Name
  - | HsBootCtxt
  - | RoleAnnotCtxt NameSet
- lookupLocalTcNames :: HsSigCtxt -> SDoc -> RdrName -> RnM [Name]
- lookupSigOccRn :: HsSigCtxt -> Sig RdrName -> Located RdrName -> RnM (Located Name)
- lookupSigCtxtOccRn :: HsSigCtxt -> SDoc -> Located RdrName -> RnM (Located Name)
- lookupFixityRn :: Name -> RnM Fixity
- lookupTyFixityRn :: Located Name -> RnM Fixity
- lookupInstDeclBndr :: Name -> SDoc -> RdrName -> RnM Name
- lookupSubBndrOcc :: Bool -> Parent -> SDoc -> RdrName -> RnM Name
- lookupFamInstName :: Maybe Name -> Located RdrName -> RnM (Located Name)
- greRdrName :: GlobalRdrElt -> RdrName
- lookupSubBndrGREs :: GlobalRdrEnv -> Parent -> RdrName -> [GlobalRdrElt]
- lookupConstructorFields :: Name -> RnM [Name]
- lookupSyntaxName :: Name -> RnM (SyntaxExpr Name, FreeVars)
- lookupSyntaxNames :: [Name] -> RnM ([HsExpr Name], FreeVars)
- lookupIfThenElse :: RnM (Maybe (SyntaxExpr Name), FreeVars)
- lookupGreRn :: RdrName -> RnM GlobalRdrElt
- lookupGreRn_maybe :: RdrName -> RnM (Maybe GlobalRdrElt)
- lookupGreLocalRn_maybe :: RdrName -> RnM (Maybe GlobalRdrElt)
- getLookupOccRn :: RnM (Name -> Maybe Name)
- addUsedRdrNames :: [RdrName] -> RnM ()
- newLocalBndrRn :: Located RdrName -> RnM Name
- newLocalBndrsRn :: [Located RdrName] -> RnM [Name]
- bindLocalNames :: [Name] -> RnM a -> RnM a
- bindLocalNamesFV :: [Name] -> RnM (a, FreeVars) -> RnM (a, FreeVars)
- type MiniFixityEnv = FastStringEnv (Located Fixity)
- addLocalFixities :: MiniFixityEnv -> [Name] -> RnM a -> RnM a
- bindLocatedLocalsFV :: [Located RdrName] -> ([Name] -> RnM (a, FreeVars)) -> RnM (a, FreeVars)
- bindLocatedLocalsRn :: [Located RdrName] -> ([Name] -> RnM a) -> RnM a
- extendTyVarEnvFVRn :: [Name] -> RnM (a, FreeVars) -> RnM (a, FreeVars)
- checkDupRdrNames :: [Located RdrName] -> RnM ()
- checkShadowedRdrNames :: [Located RdrName] -> RnM ()
- checkDupNames :: [Name] -> RnM ()
- checkDupAndShadowedNames :: (GlobalRdrEnv, LocalRdrEnv) -> [Name] -> RnM ()
- checkTupSize :: Int -> RnM ()
- addFvRn :: FreeVars -> RnM (thing, FreeVars) -> RnM (thing, FreeVars)
- mapFvRn :: (a -> RnM (b, FreeVars)) -> [a] -> RnM ([b], FreeVars)
- mapMaybeFvRn :: (a -> RnM (b, FreeVars)) -> Maybe a -> RnM (Maybe b, FreeVars)
- mapFvRnCPS :: (a -> (b -> RnM c) -> RnM c) -> [a] -> ([b] -> RnM c) -> RnM c
- warnUnusedMatches :: [Name] -> FreeVars -> RnM ()
- warnUnusedTopBinds :: [GlobalRdrElt] -> RnM ()
- warnUnusedLocalBinds :: [Name] -> FreeVars -> RnM ()
- dataTcOccs :: RdrName -> [RdrName]
- kindSigErr :: Outputable a => a -> SDoc
- perhapsForallMsg :: SDoc
- data HsDocContext
  - = TypeSigCtx SDoc
  - | PatCtx
  - | SpecInstSigCtx
  - | DefaultDeclCtx
  - | ForeignDeclCtx (Located RdrName)
  - | DerivDeclCtx
  - | RuleCtx FastString
  - | TyDataCtx (Located RdrName)
  - | TySynCtx (Located RdrName)
  - | TyFamilyCtx (Located RdrName)
  - | ConDeclCtx [Located RdrName]
  - | ClassDeclCtx (Located RdrName)
  - | ExprWithTySigCtx
  - | TypBrCtx
  - | HsTypeCtx
  - | GHCiCtx
  - | SpliceTypeCtx (LHsType RdrName)
  - | ClassInstanceCtx
  - | VectDeclCtx (Located RdrName)
  - | GenericCtx SDoc
- docOfHsDocContext :: HsDocContext -> SDoc

# Documentation

newTopSrcBinder :: Located RdrName -> RnM Name

lookupLocatedTopBndrRn :: Located RdrName -> RnM (Located Name)

lookupTopBndrRn :: RdrName -> RnM Name

lookupLocatedOccRn :: Located RdrName -> RnM (Located Name)

lookupOccRn :: RdrName -> RnM Name

lookupOccRn_maybe :: RdrName -> RnM (Maybe Name)

lookupLocalOccRn_maybe :: RdrName -> RnM (Maybe Name)

lookupInfoOccRn :: RdrName -> RnM [Name]

lookupLocalOccThLvl_maybe :: Name -> RnM (Maybe (TopLevelFlag, ThLevel))

lookupTypeOccRn :: RdrName -> RnM Name

lookupKindOccRn :: RdrName -> RnM Name

lookupGlobalOccRn :: RdrName -> RnM Name

lookupGlobalOccRn_maybe :: RdrName -> RnM (Maybe Name)

reportUnboundName :: RdrName -> RnM Name

data HsSigCtxt

Constructors

TopSigCtxt NameSet Bool |
LocalBindCtxt NameSet |
ClsDeclCtxt Name |
InstDeclCtxt Name |
HsBootCtxt |
RoleAnnotCtxt NameSet |

lookupLocalTcNames :: HsSigCtxt -> SDoc -> RdrName -> RnM [Name]

lookupSigOccRn :: HsSigCtxt -> Sig RdrName -> Located RdrName -> RnM (Located Name)

lookupSigCtxtOccRn

Arguments

:: HsSigCtxt |
-> SDoc | description of thing we're looking up, like "type family"
-> Located RdrName |
-> RnM (Located Name) |

Lookup a name in relation to the names in a `HsSigCtxt`

lookupFixityRn :: Name -> RnM Fixity

lookupTyFixityRn :: Located Name -> RnM Fixity

lookupInstDeclBndr :: Name -> SDoc -> RdrName -> RnM Name

lookupSubBndrOcc :: Bool -> Parent -> SDoc -> RdrName -> RnM Name

lookupFamInstName :: Maybe Name -> Located RdrName -> RnM (Located Name)

greRdrName :: GlobalRdrElt -> RdrName

lookupSubBndrGREs :: GlobalRdrEnv -> Parent -> RdrName -> [GlobalRdrElt]

lookupConstructorFields :: Name -> RnM [Name]

lookupSyntaxName :: Name -> RnM (SyntaxExpr Name, FreeVars)

lookupSyntaxNames :: [Name] -> RnM ([HsExpr Name], FreeVars)

lookupIfThenElse :: RnM (Maybe (SyntaxExpr Name), FreeVars)

lookupGreRn :: RdrName -> RnM GlobalRdrElt

lookupGreRn_maybe :: RdrName -> RnM (Maybe GlobalRdrElt)

lookupGreLocalRn_maybe :: RdrName -> RnM (Maybe GlobalRdrElt)

getLookupOccRn :: RnM (Name -> Maybe Name)

addUsedRdrNames :: [RdrName] -> RnM ()

newLocalBndrRn :: Located RdrName -> RnM Name

newLocalBndrsRn :: [Located RdrName] -> RnM [Name]

bindLocalNames :: [Name] -> RnM a -> RnM a

bindLocalNamesFV :: [Name] -> RnM (a, FreeVars) -> RnM (a, FreeVars)

type MiniFixityEnv = FastStringEnv (Located Fixity)

addLocalFixities :: MiniFixityEnv -> [Name] -> RnM a -> RnM a

bindLocatedLocalsFV :: [Located RdrName] -> ([Name] -> RnM (a, FreeVars)) -> RnM (a, FreeVars)

bindLocatedLocalsRn :: [Located RdrName] -> ([Name] -> RnM a) -> RnM a

extendTyVarEnvFVRn :: [Name] -> RnM (a, FreeVars) -> RnM (a, FreeVars)

checkDupRdrNames :: [Located RdrName] -> RnM ()

checkShadowedRdrNames :: [Located RdrName] -> RnM ()

checkDupNames :: [Name] -> RnM ()

checkDupAndShadowedNames :: (GlobalRdrEnv, LocalRdrEnv) -> [Name] -> RnM ()

checkTupSize :: Int -> RnM ()

addFvRn :: FreeVars -> RnM (thing, FreeVars) -> RnM (thing, FreeVars)

mapFvRn :: (a -> RnM (b, FreeVars)) -> [a] -> RnM ([b], FreeVars)

mapMaybeFvRn :: (a -> RnM (b, FreeVars)) -> Maybe a -> RnM (Maybe b, FreeVars)

mapFvRnCPS :: (a -> (b -> RnM c) -> RnM c) -> [a] -> ([b] -> RnM c) -> RnM c

warnUnusedMatches :: [Name] -> FreeVars -> RnM ()

warnUnusedTopBinds :: [GlobalRdrElt] -> RnM ()

warnUnusedLocalBinds :: [Name] -> FreeVars -> RnM ()

dataTcOccs :: RdrName -> [RdrName]

kindSigErr :: Outputable a => a -> SDoc

perhapsForallMsg :: SDoc

data HsDocContext

Constructors

TypeSigCtx SDoc |
PatCtx |
SpecInstSigCtx |
DefaultDeclCtx |
ForeignDeclCtx (Located RdrName) |
DerivDeclCtx |
RuleCtx FastString |
TyDataCtx (Located RdrName) |
TySynCtx (Located RdrName) |
TyFamilyCtx (Located RdrName) |
ConDeclCtx [Located RdrName] |
ClassDeclCtx (Located RdrName) |
ExprWithTySigCtx |
TypBrCtx |
HsTypeCtx |
GHCiCtx |
SpliceTypeCtx (LHsType RdrName) |
ClassInstanceCtx |
VectDeclCtx (Located RdrName) |
GenericCtx SDoc |

docOfHsDocContext :: HsDocContext -> SDoc