| Safe Haskell | None |
|---|
HERMIT.GHC
Contents
- module GhcPlugins
- ppIdInfo :: Id -> IdInfo -> SDoc
- zapVarOccInfo :: Var -> Var
- var2String :: Var -> String
- thRdrNameGuesses :: Name -> [RdrName]
- name2THName :: Name -> Name
- var2THName :: Var -> Name
- cmpTHName2Name :: Name -> Name -> Bool
- cmpString2Name :: String -> Name -> Bool
- cmpTHName2Var :: Name -> Var -> Bool
- cmpString2Var :: String -> Var -> Bool
- fqName :: Name -> String
- uqName :: NamedThing nm => nm -> String
- findNamesFromString :: GlobalRdrEnv -> String -> [Name]
- findNamesFromTH :: GlobalRdrEnv -> Name -> [Name]
- alphaTyVars :: [TyVar]
- data Type
- data TyLit
- data GhcException = ProgramError String
- throwGhcException :: GhcException -> a
- exprArity :: CoreExpr -> Arity
- occurAnalyseExpr :: CoreExpr -> CoreExpr
- isKind :: Kind -> Bool
- isLiftedTypeKindCon :: TyCon -> Bool
- exprType :: CoreExpr -> Type
- notElemVarSet :: Var -> VarSet -> Bool
- varSetToStrings :: VarSet -> [String]
- showVarSet :: VarSet -> String
- data Pair a = Pair {}
- bndrRuleAndUnfoldingVars :: Var -> VarSet
- liftIO :: MonadIO m => forall a. IO a -> m a
GHC Imports
Things that have been copied from GHC, or imported directly, for various reasons.
module GhcPlugins
zapVarOccInfo :: Var -> VarSource
var2String :: Var -> StringSource
Convert a variable to a neat string for printing (unqualfied name).
thRdrNameGuesses :: Name -> [RdrName]
name2THName :: Name -> NameSource
cmpTHName2Name :: Name -> Name -> BoolSource
Compare a Name to a Name for equality. See cmpString2Name.
cmpString2Name :: String -> Name -> BoolSource
cmpTHName2Var :: Name -> Var -> BoolSource
Compare a Name to a Var for equality. See cmpString2Name.
cmpString2Var :: String -> Var -> BoolSource
Compare a String to a Var for equality. See cmpString2Name.
uqName :: NamedThing nm => nm -> StringSource
Get the unqualified name from a NamedThing.
findNamesFromString :: GlobalRdrEnv -> String -> [Name]Source
Find Names matching a given fully qualified or unqualified name.
If given name is fully qualified, will only return first result, which is assumed unique.
findNamesFromTH :: GlobalRdrEnv -> Name -> [Name]Source
Find Names matching a Name. See findNamesFromString.
alphaTyVars :: [TyVar]
data Type
The key representation of types within the compiler
Constructors
| TyVarTy Var | Vanilla type or kind variable (*never* a coercion variable) |
| AppTy Type Type | Type application to something other than a 1) Function: must not be a 2) Argument type |
| TyConApp TyCon [KindOrType] | Application of a 1) Type constructor being applied to. 2) Type arguments. Might not have enough type arguments here to saturate the constructor. Even type synonyms are not necessarily saturated; for example unsaturated type synonyms can appear as the right hand side of a type synonym. |
| FunTy Type Type | Special case of |
| ForAllTy Var Type | A polymorphic type |
| LitTy TyLit | Type literals are simillar to type constructors. |
data TyLit
Constructors
| NumTyLit Integer | |
| StrTyLit FastString |
data GhcException
GHC's own exception type error messages all take the form:
location: error
If the location is on the command line, or in GHC itself, then location=ghc. All of the error types below correspond to a location of ghc, except for ProgramError (where the string is assumed to contain a location already, so we don't print one).
Constructors
| ProgramError String | An error in the user's code, probably. |
throwGhcException :: GhcException -> a
exprArity :: CoreExpr -> Arity
An approximate, fast, version of exprEtaExpandArity
occurAnalyseExpr :: CoreExpr -> CoreExpr
isLiftedTypeKindCon :: TyCon -> Bool
exprType :: CoreExpr -> TypeSource
Recover the type of a well-typed Core expression. Fails when
applied to the actual Type expression as it cannot
really be said to have a type
varSetToStrings :: VarSet -> [String]Source
Convert a VarSet to a list of user-readable strings.
showVarSet :: VarSet -> StringSource
Show a human-readable version of a VarSet.
data Pair a
Instances