RnTypes

ghc-7.10.3: The GHC API

Safe Haskell | None
Language | Haskell2010

RnTypes

Synopsis

- rnHsType :: HsDocContext -> HsType RdrName -> RnM (HsType Name, FreeVars)
- rnLHsType :: HsDocContext -> LHsType RdrName -> RnM (LHsType Name, FreeVars)
- rnLHsTypes :: HsDocContext -> [LHsType RdrName] -> RnM ([LHsType Name], FreeVars)
- rnContext :: HsDocContext -> LHsContext RdrName -> RnM (LHsContext Name, FreeVars)
- rnHsKind :: HsDocContext -> HsKind RdrName -> RnM (HsKind Name, FreeVars)
- rnLHsKind :: HsDocContext -> LHsKind RdrName -> RnM (LHsKind Name, FreeVars)
- rnLHsMaybeKind :: HsDocContext -> Maybe (LHsKind RdrName) -> RnM (Maybe (LHsKind Name), FreeVars)
- rnHsSigType :: SDoc -> LHsType RdrName -> RnM (LHsType Name, FreeVars)
- rnLHsInstType :: SDoc -> LHsType RdrName -> RnM (LHsType Name, FreeVars)
- rnConDeclFields :: HsDocContext -> [LConDeclField RdrName] -> RnM ([LConDeclField Name], FreeVars)
- newTyVarNameRn :: Maybe a -> LocalRdrEnv -> SrcSpan -> RdrName -> RnM Name
- mkOpAppRn :: LHsExpr Name -> LHsExpr Name -> Fixity -> LHsExpr Name -> RnM (HsExpr Name)
- mkNegAppRn :: LHsExpr id -> SyntaxExpr id -> RnM (HsExpr id)
- mkOpFormRn :: LHsCmdTop Name -> LHsExpr Name -> Fixity -> LHsCmdTop Name -> RnM (HsCmd Name)
- mkConOpPatRn :: Located Name -> Fixity -> LPat Name -> LPat Name -> RnM (Pat Name)
- checkPrecMatch :: Name -> MatchGroup Name body -> RnM ()
- checkSectionPrec :: FixityDirection -> HsExpr RdrName -> LHsExpr Name -> LHsExpr Name -> RnM ()
- warnContextQuantification :: SDoc -> [LHsTyVarBndr RdrName] -> TcM ()
- warnUnusedForAlls :: SDoc -> LHsTyVarBndrs RdrName -> [RdrName] -> TcM ()
- bindSigTyVarsFV :: [Name] -> RnM (a, FreeVars) -> RnM (a, FreeVars)
- bindHsTyVars :: HsDocContext -> Maybe a -> [RdrName] -> LHsTyVarBndrs RdrName -> (LHsTyVarBndrs Name -> RnM (b, FreeVars)) -> RnM (b, FreeVars)
- rnHsBndrSig :: HsDocContext -> HsWithBndrs RdrName (LHsType RdrName) -> (HsWithBndrs Name (LHsType Name) -> RnM (a, FreeVars)) -> RnM (a, FreeVars)
- extractHsTyRdrTyVars :: LHsType RdrName -> FreeKiTyVars
- extractHsTysRdrTyVars :: [LHsType RdrName] -> FreeKiTyVars
- extractRdrKindSigVars :: Maybe (LHsKind RdrName) -> [RdrName]
- extractDataDefnKindVars :: HsDataDefn RdrName -> [RdrName]
- extractWildcards :: LHsType RdrName -> RnM ([Located RdrName], LHsType RdrName)
- filterInScope :: LocalRdrEnv -> FreeKiTyVars -> FreeKiTyVars

# Documentation

rnHsType :: HsDocContext -> HsType RdrName -> RnM (HsType Name, FreeVars)

rnLHsType :: HsDocContext -> LHsType RdrName -> RnM (LHsType Name, FreeVars)

rnLHsTypes :: HsDocContext -> [LHsType RdrName] -> RnM ([LHsType Name], FreeVars)

rnContext :: HsDocContext -> LHsContext RdrName -> RnM (LHsContext Name, FreeVars)

rnHsKind :: HsDocContext -> HsKind RdrName -> RnM (HsKind Name, FreeVars)

rnLHsKind :: HsDocContext -> LHsKind RdrName -> RnM (LHsKind Name, FreeVars)

rnLHsMaybeKind :: HsDocContext -> Maybe (LHsKind RdrName) -> RnM (Maybe (LHsKind Name), FreeVars)

rnHsSigType :: SDoc -> LHsType RdrName -> RnM (LHsType Name, FreeVars)

rnLHsInstType :: SDoc -> LHsType RdrName -> RnM (LHsType Name, FreeVars)

rnConDeclFields :: HsDocContext -> [LConDeclField RdrName] -> RnM ([LConDeclField Name], FreeVars)

newTyVarNameRn :: Maybe a -> LocalRdrEnv -> SrcSpan -> RdrName -> RnM Name

mkOpAppRn :: LHsExpr Name -> LHsExpr Name -> Fixity -> LHsExpr Name -> RnM (HsExpr Name)

mkNegAppRn :: LHsExpr id -> SyntaxExpr id -> RnM (HsExpr id)

mkOpFormRn :: LHsCmdTop Name -> LHsExpr Name -> Fixity -> LHsCmdTop Name -> RnM (HsCmd Name)

mkConOpPatRn :: Located Name -> Fixity -> LPat Name -> LPat Name -> RnM (Pat Name)

checkPrecMatch :: Name -> MatchGroup Name body -> RnM ()

checkSectionPrec :: FixityDirection -> HsExpr RdrName -> LHsExpr Name -> LHsExpr Name -> RnM ()

warnContextQuantification :: SDoc -> [LHsTyVarBndr RdrName] -> TcM ()

warnUnusedForAlls :: SDoc -> LHsTyVarBndrs RdrName -> [RdrName] -> TcM ()

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

bindHsTyVars :: HsDocContext -> Maybe a -> [RdrName] -> LHsTyVarBndrs RdrName -> (LHsTyVarBndrs Name -> RnM (b, FreeVars)) -> RnM (b, FreeVars)

rnHsBndrSig :: HsDocContext -> HsWithBndrs RdrName (LHsType RdrName) -> (HsWithBndrs Name (LHsType Name) -> RnM (a, FreeVars)) -> RnM (a, FreeVars)

extractHsTyRdrTyVars :: LHsType RdrName -> FreeKiTyVars

extractHsTysRdrTyVars :: [LHsType RdrName] -> FreeKiTyVars

extractRdrKindSigVars :: Maybe (LHsKind RdrName) -> [RdrName]

extractDataDefnKindVars :: HsDataDefn RdrName -> [RdrName]

extractWildcards :: LHsType RdrName -> RnM ([Located RdrName], LHsType RdrName)

Replace all unnamed wildcards in the given type with named wildcards. These names are freshly generated, based on "_". Return a tuple of the named wildcards that weren't already in scope (amongst them the named wildcards the unnamed ones were converted into), and the type in which the unnamed wildcards are replaced by named wildcards.

filterInScope :: LocalRdrEnv -> FreeKiTyVars -> FreeKiTyVars