Safe Haskell | None |
---|---|
Language | Haskell2010 |
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))
- lookupLocalOccRn :: RdrName -> RnM Name
- lookupTypeOccRn :: RdrName -> RnM Name
- lookupGlobalOccRn :: RdrName -> RnM Name
- lookupGlobalOccRn_maybe :: RdrName -> RnM (Maybe Name)
- lookupOccRn_overloaded :: Bool -> RdrName -> RnM (Maybe (Either Name [Name]))
- lookupGlobalOccRn_overloaded :: Bool -> RdrName -> RnM (Maybe (Either Name [Name]))
- data ChildLookupResult
- = NameNotFound
- | IncorrectParent Name Name SDoc [Name]
- | FoundName Parent Name
- | FoundFL FieldLabel
- lookupSubBndrOcc_helper :: Bool -> Bool -> Name -> RdrName -> RnM ChildLookupResult
- combineChildLookupResult :: [RnM ChildLookupResult] -> RnM ChildLookupResult
- data HsSigCtxt
- = TopSigCtxt NameSet
- | LocalBindCtxt NameSet
- | ClsDeclCtxt Name
- | InstDeclCtxt NameSet
- | HsBootCtxt NameSet
- | RoleAnnotCtxt NameSet
- lookupLocalTcNames :: HsSigCtxt -> SDoc -> RdrName -> RnM [(RdrName, Name)]
- lookupSigOccRn :: HsSigCtxt -> Sig GhcPs -> Located RdrName -> RnM (Located Name)
- lookupSigCtxtOccRn :: HsSigCtxt -> SDoc -> Located RdrName -> RnM (Located Name)
- lookupInstDeclBndr :: Name -> SDoc -> RdrName -> RnM Name
- lookupRecFieldOcc :: Maybe Name -> RdrName -> RnM Name
- lookupFamInstName :: Maybe Name -> Located RdrName -> RnM (Located Name)
- lookupConstructorFields :: Name -> RnM [FieldLabel]
- lookupGreAvailRn :: RdrName -> RnM (Name, AvailInfo)
- lookupSyntax :: Name -> RnM (SyntaxExpr GhcRn, FreeVars)
- lookupSyntaxExpr :: Name -> RnM (HsExpr GhcRn, FreeVars)
- lookupSyntaxName :: Name -> RnM (Name, FreeVars)
- lookupSyntaxNames :: [Name] -> RnM ([HsExpr GhcRn], FreeVars)
- lookupIfThenElse :: Bool -> RnM (SyntaxExpr GhcRn, FreeVars)
- lookupReboundIf :: RnM (Maybe (Located Name))
- lookupQualifiedDoExpr :: HsStmtContext p -> Name -> RnM (HsExpr GhcRn, FreeVars)
- lookupQualifiedDo :: HsStmtContext p -> Name -> RnM (SyntaxExpr GhcRn, FreeVars)
- lookupQualifiedDoName :: HsStmtContext p -> Name -> RnM (Name, FreeVars)
- lookupNameWithQualifier :: Name -> ModuleName -> RnM (Name, FreeVars)
- addUsedGRE :: Bool -> GlobalRdrElt -> RnM ()
- addUsedGREs :: [GlobalRdrElt] -> RnM ()
- addUsedDataCons :: GlobalRdrEnv -> TyCon -> RnM ()
- dataTcOccs :: RdrName -> [RdrName]
Documentation
lookupTopBndrRn :: RdrName -> RnM Name Source #
lookupOccRn :: RdrName -> RnM Name Source #
lookupInfoOccRn :: RdrName -> RnM [Name] Source #
lookupLocalOccThLvl_maybe :: Name -> RnM (Maybe (TopLevelFlag, ThLevel)) Source #
lookupLocalOccRn :: RdrName -> RnM Name Source #
lookupTypeOccRn :: RdrName -> RnM Name Source #
lookupGlobalOccRn :: RdrName -> RnM Name Source #
lookupGlobalOccRn_overloaded :: Bool -> RdrName -> RnM (Maybe (Either Name [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.
data ChildLookupResult Source #
NameNotFound | |
IncorrectParent Name Name SDoc [Name] | |
FoundName Parent Name | |
FoundFL FieldLabel |
Instances
Outputable ChildLookupResult Source # | |
Defined in GHC.Rename.Env ppr :: ChildLookupResult -> SDoc pprPrec :: Rational -> ChildLookupResult -> SDoc |
lookupSubBndrOcc_helper :: Bool -> Bool -> Name -> RdrName -> RnM ChildLookupResult Source #
Used in export lists to lookup the children.
combineChildLookupResult :: [RnM ChildLookupResult] -> RnM ChildLookupResult Source #
Specialised version of msum for RnM ChildLookupResult
TopSigCtxt NameSet | |
LocalBindCtxt NameSet | |
ClsDeclCtxt Name | |
InstDeclCtxt NameSet | |
HsBootCtxt NameSet | |
RoleAnnotCtxt NameSet |
:: 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
lookupRecFieldOcc :: Maybe Name -> RdrName -> RnM Name Source #
Look up an occurrence of a field in record construction or pattern matching (but not update). When the -XDisambiguateRecordFields flag is on, take account of the data constructor name to disambiguate which field to use.
See Note [DisambiguateRecordFields].
lookupConstructorFields :: Name -> RnM [FieldLabel] Source #
lookupGreAvailRn :: RdrName -> RnM (Name, AvailInfo) Source #
lookupSyntax :: Name -> RnM (SyntaxExpr GhcRn, FreeVars) Source #
:: Name | The standard name |
-> RnM (HsExpr GhcRn, FreeVars) | Possibly a non-standard name |
lookupSyntaxNames :: [Name] -> RnM ([HsExpr GhcRn], FreeVars) Source #
lookupIfThenElse :: Bool -> RnM (SyntaxExpr GhcRn, FreeVars) Source #
lookupReboundIf :: RnM (Maybe (Located Name)) Source #
Lookup an ifThenElse
binding (see lookupRebound
).
lookupQualifiedDoExpr :: HsStmtContext p -> Name -> RnM (HsExpr GhcRn, FreeVars) Source #
lookupQualifiedDo :: HsStmtContext p -> Name -> RnM (SyntaxExpr GhcRn, FreeVars) Source #
lookupQualifiedDoName :: HsStmtContext p -> Name -> RnM (Name, FreeVars) Source #
lookupNameWithQualifier :: Name -> ModuleName -> RnM (Name, FreeVars) Source #
addUsedGRE :: Bool -> GlobalRdrElt -> RnM () Source #
addUsedGREs :: [GlobalRdrElt] -> RnM () Source #
addUsedDataCons :: GlobalRdrEnv -> TyCon -> RnM () Source #
dataTcOccs :: RdrName -> [RdrName] Source #