Safe Haskell | None |
---|---|
Language | Haskell2010 |
- 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)
- lookupOccRn_overloaded :: Bool -> RdrName -> RnM (Maybe (Either Name [FieldOcc Name]))
- lookupGlobalOccRn_overloaded :: Bool -> RdrName -> RnM (Maybe (Either Name [FieldOcc Name]))
- lookupExactOcc :: Name -> RnM Name
- reportUnboundName :: RdrName -> RnM Name
- unknownNameSuggestions :: DynFlags -> GlobalRdrEnv -> LocalRdrEnv -> ImportAvails -> RdrName -> SDoc
- addNameClashErrRn :: RdrName -> [GlobalRdrElt] -> RnM ()
- data HsSigCtxt
- lookupLocalTcNames :: HsSigCtxt -> SDoc -> RdrName -> RnM [(RdrName, Name)]
- lookupSigOccRn :: HsSigCtxt -> Sig RdrName -> Located RdrName -> RnM (Located Name)
- lookupSigCtxtOccRn :: HsSigCtxt -> SDoc -> Located RdrName -> RnM (Located Name)
- lookupFixityRn :: Name -> RnM Fixity
- lookupFixityRn_help :: Name -> RnM (Bool, Fixity)
- lookupFieldFixityRn :: AmbiguousFieldOcc Name -> RnM Fixity
- lookupTyFixityRn :: Located Name -> RnM Fixity
- lookupInstDeclBndr :: Name -> SDoc -> RdrName -> RnM Name
- lookupRecFieldOcc :: Maybe Name -> SDoc -> RdrName -> RnM Name
- lookupFamInstName :: Maybe Name -> Located RdrName -> RnM (Located Name)
- lookupConstructorFields :: Name -> RnM [FieldLabel]
- lookupSyntaxName :: Name -> RnM (SyntaxExpr Name, FreeVars)
- lookupSyntaxName' :: Name -> RnM Name
- lookupSyntaxNames :: [Name] -> RnM ([HsExpr Name], FreeVars)
- lookupIfThenElse :: RnM (Maybe (SyntaxExpr Name), FreeVars)
- lookupGreAvailRn :: RdrName -> RnM (Name, AvailInfo)
- getLookupOccRn :: RnM (Name -> Maybe Name)
- mkUnboundName :: OccName -> Name
- mkUnboundNameRdr :: RdrName -> Name
- isUnboundName :: Name -> Bool
- addUsedGRE :: Bool -> GlobalRdrElt -> RnM ()
- addUsedGREs :: [GlobalRdrElt] -> RnM ()
- addUsedDataCons :: GlobalRdrEnv -> TyCon -> 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)
- type RoleAnnotEnv = NameEnv (LRoleAnnotDecl Name)
- emptyRoleAnnotEnv :: RoleAnnotEnv
- mkRoleAnnotEnv :: [LRoleAnnotDecl Name] -> RoleAnnotEnv
- lookupRoleAnnot :: RoleAnnotEnv -> Name -> Maybe (LRoleAnnotDecl Name)
- getRoleAnnots :: [Name] -> RoleAnnotEnv -> ([LRoleAnnotDecl Name], RoleAnnotEnv)
- checkDupRdrNames :: [Located RdrName] -> RnM ()
- checkShadowedRdrNames :: [Located RdrName] -> RnM ()
- checkDupNames :: [Name] -> RnM ()
- checkDupAndShadowedNames :: (GlobalRdrEnv, LocalRdrEnv) -> [Name] -> RnM ()
- dupNamesErr :: Outputable n => (n -> SrcSpan) -> [n] -> 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 ()
- warnUnusedTypePatterns :: [Name] -> FreeVars -> RnM ()
- warnUnusedTopBinds :: [GlobalRdrElt] -> RnM ()
- warnUnusedLocalBinds :: [Name] -> FreeVars -> RnM ()
- mkFieldEnv :: GlobalRdrEnv -> NameEnv (FieldLabelString, Name)
- dataTcOccs :: RdrName -> [RdrName]
- kindSigErr :: Outputable a => a -> SDoc
- perhapsForallMsg :: SDoc
- unknownSubordinateErr :: SDoc -> RdrName -> SDoc
- data HsDocContext
- = TypeSigCtx SDoc
- | PatCtx
- | SpecInstSigCtx
- | DefaultDeclCtx
- | ForeignDeclCtx (Located RdrName)
- | DerivDeclCtx
- | RuleCtx FastString
- | TyDataCtx (Located RdrName)
- | TySynCtx (Located RdrName)
- | TyFamilyCtx (Located RdrName)
- | FamPatCtx (Located RdrName)
- | ConDeclCtx [Located Name]
- | ClassDeclCtx (Located RdrName)
- | ExprWithTySigCtx
- | TypBrCtx
- | HsTypeCtx
- | GHCiCtx
- | SpliceTypeCtx (LHsType RdrName)
- | ClassInstanceCtx
- | VectDeclCtx (Located RdrName)
- | GenericCtx SDoc
- pprHsDocContext :: HsDocContext -> SDoc
- inHsDocContext :: HsDocContext -> SDoc
- withHsDocContext :: HsDocContext -> SDoc -> SDoc
Documentation
lookupLocalOccThLvl_maybe :: Name -> RnM (Maybe (TopLevelFlag, ThLevel)) Source #
lookupOccRn_overloaded :: Bool -> RdrName -> RnM (Maybe (Either Name [FieldOcc Name])) Source #
Like lookupOccRn_maybe
, but with a more informative result if
the RdrName
happens to be a record selector:
- Nothing -> name not in scope (no error reported)
- Just (Left x) -> name uniquely refers to x, or there is a name clash (reported)
- Just (Right xs) -> name refers to one or more record selectors; if overload_ok was False, this list will be a singleton.
lookupGlobalOccRn_overloaded :: Bool -> RdrName -> RnM (Maybe (Either Name [FieldOcc Name])) Source #
lookupExactOcc :: Name -> RnM Name Source #
Lookup an Exact
RdrName
. See Note [Looking up Exact RdrNames].
This adds an error if the name cannot be found.
unknownNameSuggestions :: DynFlags -> GlobalRdrEnv -> LocalRdrEnv -> ImportAvails -> RdrName -> SDoc Source #
Called from the typechecker (TcErrors) when we find an unbound variable
addNameClashErrRn :: RdrName -> [GlobalRdrElt] -> RnM () Source #
:: 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_help :: Name -> RnM (Bool, Fixity) Source #
lookupFixityRn_help
returns (True, fixity)
if it finds a Fixity
in a local environment or from an interface file. Otherwise, it returns
(False, fixity)
(e.g., for unbound Name
s or Name
s without
user-supplied fixity declarations).
lookupFieldFixityRn :: AmbiguousFieldOcc Name -> RnM Fixity Source #
Look up the fixity of a (possibly ambiguous) occurrence of a record field
selector. We use lookupFixityRn'
so that we can specifiy the OccName
as
the field label, which might be different to the OccName
of the selector
Name
if DuplicateRecordFields
is in use (Trac #1173). If there are
multiple possible selectors with different fixities, generate an error.
lookupConstructorFields :: Name -> RnM [FieldLabel] Source #
lookupSyntaxName :: Name -> RnM (SyntaxExpr Name, FreeVars) Source #
lookupIfThenElse :: RnM (Maybe (SyntaxExpr Name), FreeVars) Source #
mkUnboundName :: OccName -> Name Source #
mkUnboundNameRdr :: RdrName -> Name Source #
isUnboundName :: Name -> Bool Source #
addUsedGRE :: Bool -> GlobalRdrElt -> RnM () Source #
addUsedGREs :: [GlobalRdrElt] -> RnM () Source #
addUsedDataCons :: GlobalRdrEnv -> TyCon -> RnM () Source #
type MiniFixityEnv = FastStringEnv (Located Fixity) Source #
addLocalFixities :: MiniFixityEnv -> [Name] -> RnM a -> RnM a Source #
bindLocatedLocalsFV :: [Located RdrName] -> ([Name] -> RnM (a, FreeVars)) -> RnM (a, FreeVars) Source #
type RoleAnnotEnv = NameEnv (LRoleAnnotDecl Name) Source #
mkRoleAnnotEnv :: [LRoleAnnotDecl Name] -> RoleAnnotEnv Source #
lookupRoleAnnot :: RoleAnnotEnv -> Name -> Maybe (LRoleAnnotDecl Name) Source #
getRoleAnnots :: [Name] -> RoleAnnotEnv -> ([LRoleAnnotDecl Name], RoleAnnotEnv) Source #
checkDupNames :: [Name] -> RnM () Source #
checkDupAndShadowedNames :: (GlobalRdrEnv, LocalRdrEnv) -> [Name] -> RnM () Source #
dupNamesErr :: Outputable n => (n -> SrcSpan) -> [n] -> RnM () Source #
checkTupSize :: Int -> RnM () Source #
warnUnusedTopBinds :: [GlobalRdrElt] -> RnM () Source #
mkFieldEnv :: GlobalRdrEnv -> NameEnv (FieldLabelString, Name) Source #
Make a map from selector names to field labels and parent tycon names, to be used when reporting unused record fields.
dataTcOccs :: RdrName -> [RdrName] Source #
kindSigErr :: Outputable a => a -> SDoc Source #
data HsDocContext Source #
pprHsDocContext :: HsDocContext -> SDoc Source #
inHsDocContext :: HsDocContext -> SDoc Source #
withHsDocContext :: HsDocContext -> SDoc -> SDoc Source #