| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
GhcApi.GhcPlugins
Synopsis
- trace :: String -> a -> a
- data Plugin = Plugin {
- installCoreToDos :: CorePlugin
- tcPlugin :: TcPlugin
- holeFitPlugin :: HoleFitPlugin
- dynflagsPlugin :: [CommandLineOption] -> DynFlags -> IO DynFlags
- pluginRecompile :: [CommandLineOption] -> IO PluginRecompile
- parsedResultAction :: [CommandLineOption] -> ModSummary -> HsParsedModule -> Hsc HsParsedModule
- renamedResultAction :: [CommandLineOption] -> TcGblEnv -> HsGroup GhcRn -> TcM (TcGblEnv, HsGroup GhcRn)
- typeCheckResultAction :: [CommandLineOption] -> ModSummary -> TcGblEnv -> TcM TcGblEnv
- spliceRunAction :: [CommandLineOption] -> LHsExpr GhcTc -> TcM (LHsExpr GhcTc)
- interfaceLoadAction :: forall lcl. [CommandLineOption] -> ModIface -> IfM lcl ModIface
- data FrontendPlugin = FrontendPlugin {}
- sortWith :: Ord b => (a -> b) -> [a] -> [a]
- mkNoRepType :: String -> DataType
- liftIO :: MonadIO m => IO a -> m a
- data Version = Version {
- versionBranch :: [Int]
- versionTags :: [String]
- foldl1' :: (a -> a -> a) -> [a] -> a
- type HasCallStack = ?callStack :: CallStack
- data Serialized = Serialized TypeRep [Word8]
- toSerialized :: Typeable a => (a -> [Word8]) -> a -> Serialized
- fromSerialized :: Typeable a => ([Word8] -> a) -> Serialized -> Maybe a
- serializeWithData :: Data a => a -> [Word8]
- deserializeWithData :: Data a => [Word8] -> a
- thNameToGhcName :: Name -> CoreM (Maybe Name)
- defaultFrontendPlugin :: FrontendPlugin
- withPlugins_ :: Monad m => DynFlags -> ConstPluginOperation m a -> a -> m ()
- mapPlugins :: DynFlags -> (Plugin -> [CommandLineOption] -> a) -> [a]
- withPlugins :: Monad m => DynFlags -> PluginOperation m a -> a -> m a
- plugins :: DynFlags -> [PluginWithArgs]
- keepRenamedSource :: [CommandLineOption] -> TcGblEnv -> HsGroup GhcRn -> TcM (TcGblEnv, HsGroup GhcRn)
- defaultPlugin :: Plugin
- flagRecompile :: [CommandLineOption] -> IO PluginRecompile
- impurePlugin :: [CommandLineOption] -> IO PluginRecompile
- purePlugin :: [CommandLineOption] -> IO PluginRecompile
- pluginRecompile' :: PluginWithArgs -> IO PluginRecompile
- lpModuleName :: LoadedPlugin -> ModuleName
- type CommandLineOption = String
- data PluginWithArgs = PluginWithArgs {}
- data PluginRecompile
- type CorePlugin = [CommandLineOption] -> [CoreToDo] -> CoreM [CoreToDo]
- type FrontendPluginAction = [String] -> [(String, Maybe Phase)] -> Ghc ()
- data HoleFitPluginR
- ruleCheckProgram :: CompilerPhase -> String -> (Id -> [CoreRule]) -> CoreProgram -> SDoc
- lookupRule :: DynFlags -> InScopeEnv -> (Activation -> Bool) -> Id -> [CoreExpr] -> [CoreRule] -> Maybe (CoreRule, CoreExpr)
- pprRuleBase :: RuleBase -> SDoc
- unionRuleBase :: RuleBase -> RuleBase -> RuleBase
- extendRuleBaseList :: RuleBase -> [CoreRule] -> RuleBase
- mkRuleBase :: [CoreRule] -> RuleBase
- emptyRuleBase :: RuleBase
- getRules :: RuleEnv -> Id -> [CoreRule]
- rulesOfBinds :: [CoreBind] -> [CoreRule]
- addIdSpecialisations :: Id -> [CoreRule] -> Id
- addRuleInfo :: RuleInfo -> RuleInfo -> RuleInfo
- extendRuleInfo :: RuleInfo -> [CoreRule] -> RuleInfo
- mkRuleInfo :: [CoreRule] -> RuleInfo
- pprRulesForUser :: DynFlags -> [CoreRule] -> SDoc
- roughTopNames :: [CoreExpr] -> [Maybe Name]
- mkRule :: Module -> Bool -> Bool -> RuleName -> Activation -> Name -> [CoreBndr] -> [CoreExpr] -> CoreExpr -> CoreRule
- substTickish :: Subst -> Tickish Id -> Tickish Id
- substDVarSet :: Subst -> DVarSet -> DVarSet
- substRulesForImportedIds :: Subst -> [CoreRule] -> [CoreRule]
- substSpec :: Subst -> Id -> RuleInfo -> RuleInfo
- substIdOcc :: Subst -> Id -> Id
- substUnfolding :: Subst -> Unfolding -> Unfolding
- substUnfoldingSC :: Subst -> Unfolding -> Unfolding
- substIdInfo :: Subst -> Id -> IdInfo -> Maybe IdInfo
- substIdType :: Subst -> Id -> Id
- substCo :: HasCallStack => Subst -> Coercion -> Coercion
- getTCvSubst :: Subst -> TCvSubst
- substTy :: Subst -> Type -> Type
- cloneRecIdBndrs :: Subst -> UniqSupply -> [Id] -> (Subst, [Id])
- cloneBndr :: Subst -> Unique -> Var -> (Subst, Var)
- cloneBndrs :: Subst -> UniqSupply -> [Var] -> (Subst, [Var])
- cloneIdBndrs :: Subst -> UniqSupply -> [Id] -> (Subst, [Id])
- cloneIdBndr :: Subst -> UniqSupply -> Id -> (Subst, Id)
- substRecBndrs :: Subst -> [Id] -> (Subst, [Id])
- substBndrs :: Subst -> [Var] -> (Subst, [Var])
- substBndr :: Subst -> Var -> (Subst, Var)
- deShadowBinds :: CoreProgram -> CoreProgram
- substBind :: Subst -> CoreBind -> (Subst, CoreBind)
- substBindSC :: Subst -> CoreBind -> (Subst, CoreBind)
- substExpr :: SDoc -> Subst -> CoreExpr -> CoreExpr
- substExprSC :: SDoc -> Subst -> CoreExpr -> CoreExpr
- setInScope :: Subst -> InScopeSet -> Subst
- extendInScopeIds :: Subst -> [Id] -> Subst
- extendInScopeList :: Subst -> [Var] -> Subst
- extendInScope :: Subst -> Var -> Subst
- addInScopeSet :: Subst -> VarSet -> Subst
- isInScope :: Var -> Subst -> Bool
- mkOpenSubst :: InScopeSet -> [(Var, CoreArg)] -> Subst
- delBndrs :: Subst -> [Var] -> Subst
- delBndr :: Subst -> Var -> Subst
- lookupTCvSubst :: Subst -> TyVar -> Type
- lookupIdSubst :: SDoc -> Subst -> Id -> CoreExpr
- extendSubstList :: Subst -> [(Var, CoreArg)] -> Subst
- extendSubstWithVar :: Subst -> Var -> Var -> Subst
- extendSubst :: Subst -> Var -> CoreArg -> Subst
- extendTvSubstList :: Subst -> [(TyVar, Type)] -> Subst
- extendTvSubst :: Subst -> TyVar -> Type -> Subst
- extendIdSubstList :: Subst -> [(Id, CoreExpr)] -> Subst
- extendIdSubst :: Subst -> Id -> CoreExpr -> Subst
- zapSubstEnv :: Subst -> Subst
- substInScope :: Subst -> InScopeSet
- mkEmptySubst :: InScopeSet -> Subst
- emptySubst :: Subst
- isEmptySubst :: Subst -> Bool
- data Subst = Subst InScopeSet IdSubstEnv TvSubstEnv CvSubstEnv
- type IdSubstEnv = IdEnv CoreExpr
- mkAbsentErrorApp :: Type -> String -> CoreExpr
- aBSENT_ERROR_ID :: Id
- aBSENT_SUM_FIELD_ERROR_ID :: Id
- tYPE_ERROR_ID :: Id
- nON_EXHAUSTIVE_GUARDS_ERROR_ID :: Id
- nO_METHOD_BINDING_ERROR_ID :: Id
- pAT_ERROR_ID :: Id
- rEC_CON_ERROR_ID :: Id
- rUNTIME_ERROR_ID :: Id
- rEC_SEL_ERROR_ID :: Id
- errorIds :: [Id]
- mkImpossibleExpr :: Type -> CoreExpr
- mkRuntimeErrorApp :: Id -> Type -> String -> CoreExpr
- mkJustExpr :: Type -> CoreExpr -> CoreExpr
- mkNothingExpr :: Type -> CoreExpr
- mkBuildExpr :: (MonadFail m, MonadThings m, MonadUnique m) => Type -> ((Id, Type) -> (Id, Type) -> m CoreExpr) -> m CoreExpr
- mkFoldrExpr :: MonadThings m => Type -> Type -> CoreExpr -> CoreExpr -> CoreExpr -> m CoreExpr
- mkListExpr :: Type -> [CoreExpr] -> CoreExpr
- mkConsExpr :: Type -> CoreExpr -> CoreExpr -> CoreExpr
- mkNilExpr :: Type -> CoreExpr
- floatBindings :: FloatBind -> [Var]
- wrapFloats :: [FloatBind] -> CoreExpr -> CoreExpr
- wrapFloat :: FloatBind -> CoreExpr -> CoreExpr
- mkSmallTupleCase :: [Id] -> CoreExpr -> Id -> CoreExpr -> CoreExpr
- mkTupleCase :: UniqSupply -> [Id] -> CoreExpr -> Id -> CoreExpr -> CoreExpr
- mkSmallTupleSelector :: [Id] -> Id -> Id -> CoreExpr -> CoreExpr
- mkTupleSelector1 :: [Id] -> Id -> Id -> CoreExpr -> CoreExpr
- mkTupleSelector :: [Id] -> Id -> Id -> CoreExpr -> CoreExpr
- unitExpr :: CoreExpr
- mkBigCoreTupTy :: [Type] -> Type
- mkBigCoreTup :: [CoreExpr] -> CoreExpr
- mkBigCoreVarTupTy :: [Id] -> Type
- mkBigCoreVarTup1 :: [Id] -> CoreExpr
- mkBigCoreVarTup :: [Id] -> CoreExpr
- mkCoreTupBoxity :: Boxity -> [CoreExpr] -> CoreExpr
- mkCoreUbxTup :: [Type] -> [CoreExpr] -> CoreExpr
- mkCoreTup :: [CoreExpr] -> CoreExpr
- mkCoreVarTupTy :: [Id] -> Type
- mkStringExprFSWith :: Monad m => (Name -> m Id) -> FastString -> m CoreExpr
- mkStringExprFS :: MonadThings m => FastString -> m CoreExpr
- mkStringExpr :: MonadThings m => String -> m CoreExpr
- mkCharExpr :: Char -> CoreExpr
- mkDoubleExpr :: Double -> CoreExpr
- mkFloatExpr :: Float -> CoreExpr
- mkNaturalExpr :: MonadThings m => Integer -> m CoreExpr
- mkIntegerExpr :: MonadThings m => Integer -> m CoreExpr
- mkWordExprWord :: DynFlags -> Word -> CoreExpr
- mkWordExpr :: DynFlags -> Integer -> CoreExpr
- mkIntExprInt :: DynFlags -> Int -> CoreExpr
- mkIntExpr :: DynFlags -> Integer -> CoreExpr
- castBottomExpr :: CoreExpr -> Type -> CoreExpr
- mkIfThenElse :: CoreExpr -> CoreExpr -> CoreExpr -> CoreExpr
- mkWildCase :: CoreExpr -> Type -> Type -> [CoreAlt] -> CoreExpr
- mkWildValBinder :: Type -> Id
- mkWildEvBinder :: PredType -> EvVar
- mkCoreApp :: SDoc -> CoreExpr -> CoreExpr -> CoreExpr
- mkCoreApps :: CoreExpr -> [CoreExpr] -> CoreExpr
- mkCoreConApps :: DataCon -> [CoreExpr] -> CoreExpr
- mkCoreLets :: [CoreBind] -> CoreExpr -> CoreExpr
- mkCoreLams :: [CoreBndr] -> CoreExpr -> CoreExpr
- mkCoreLet :: CoreBind -> CoreExpr -> CoreExpr
- sortQuantVars :: [Var] -> [Var]
- data FloatBind
- isJoinBind :: CoreBind -> Bool
- collectMakeStaticArgs :: CoreExpr -> Maybe (CoreExpr, Type, CoreExpr, CoreExpr)
- isEmptyTy :: Type -> Bool
- rhsIsStatic :: Platform -> (Name -> Bool) -> (LitNumType -> Integer -> Maybe CoreExpr) -> CoreExpr -> Bool
- tryEtaReduce :: [Var] -> CoreExpr -> Maybe CoreExpr
- diffBinds :: Bool -> RnEnv2 -> [(Var, CoreExpr)] -> [(Var, CoreExpr)] -> ([SDoc], RnEnv2)
- diffExpr :: Bool -> RnEnv2 -> CoreExpr -> CoreExpr -> [SDoc]
- eqExpr :: InScopeSet -> CoreExpr -> CoreExpr -> Bool
- exprIsBig :: Expr b -> Bool
- cheapEqExpr' :: (Tickish Id -> Bool) -> Expr b -> Expr b -> Bool
- cheapEqExpr :: Expr b -> Expr b -> Bool
- dataConRepFSInstPat :: [FastString] -> [Unique] -> DataCon -> [Type] -> ([TyCoVar], [Id])
- dataConRepInstPat :: [Unique] -> DataCon -> [Type] -> ([TyCoVar], [Id])
- exprIsTickedString_maybe :: CoreExpr -> Maybe ByteString
- exprIsTickedString :: CoreExpr -> Bool
- exprIsTopLevelBindable :: CoreExpr -> Type -> Bool
- exprIsConLike :: CoreExpr -> Bool
- exprIsHNF :: CoreExpr -> Bool
- altsAreExhaustive :: [Alt b] -> Bool
- exprOkForSideEffects :: CoreExpr -> Bool
- exprOkForSpeculation :: CoreExpr -> Bool
- isExpandableApp :: CheapAppFun
- isCheapApp :: CheapAppFun
- exprIsExpandable :: CoreExpr -> Bool
- exprIsCheapX :: CheapAppFun -> CoreExpr -> Bool
- exprIsCheap :: CoreExpr -> Bool
- exprIsWorkFree :: CoreExpr -> Bool
- exprIsDupable :: DynFlags -> CoreExpr -> Bool
- exprIsBottom :: CoreExpr -> Bool
- getIdFromTrivialExpr_maybe :: CoreExpr -> Maybe Id
- getIdFromTrivialExpr :: HasDebugCallStack => CoreExpr -> Id
- exprIsTrivial :: CoreExpr -> Bool
- combineIdenticalAlts :: [AltCon] -> [CoreAlt] -> (Bool, [AltCon], [CoreAlt])
- refineDefaultAlt :: [Unique] -> TyCon -> [Type] -> [AltCon] -> [CoreAlt] -> (Bool, [CoreAlt])
- filterAlts :: TyCon -> [Type] -> [AltCon] -> [(AltCon, [Var], a)] -> ([AltCon], [(AltCon, [Var], a)])
- trimConArgs :: AltCon -> [CoreArg] -> [CoreArg]
- mergeAlts :: [(AltCon, a, b)] -> [(AltCon, a, b)] -> [(AltCon, a, b)]
- findAlt :: AltCon -> [(AltCon, a, b)] -> Maybe (AltCon, a, b)
- isDefaultAlt :: (AltCon, a, b) -> Bool
- addDefault :: [(AltCon, [a], b)] -> Maybe b -> [(AltCon, [a], b)]
- findDefault :: [(AltCon, [a], b)] -> ([(AltCon, [a], b)], Maybe b)
- mkSingleAltCase :: CoreExpr -> Id -> AltCon -> [Var] -> CoreExpr -> CoreExpr
- mkDefaultCase :: CoreExpr -> Id -> CoreExpr -> CoreExpr
- mkAltExpr :: AltCon -> [CoreBndr] -> [Type] -> CoreExpr
- needsCaseBinding :: Type -> CoreExpr -> Bool
- bindNonRec :: Id -> CoreExpr -> CoreExpr -> CoreExpr
- stripTicksT :: (Tickish Id -> Bool) -> Expr b -> [Tickish Id]
- stripTicksE :: (Tickish Id -> Bool) -> Expr b -> Expr b
- stripTicksTopT :: (Tickish Id -> Bool) -> Expr b -> [Tickish Id]
- stripTicksTopE :: (Tickish Id -> Bool) -> Expr b -> Expr b
- stripTicksTop :: (Tickish Id -> Bool) -> Expr b -> ([Tickish Id], Expr b)
- tickHNFArgs :: Tickish Id -> CoreExpr -> CoreExpr
- mkTickNoHNF :: Tickish Id -> CoreExpr -> CoreExpr
- mkTicks :: [Tickish Id] -> CoreExpr -> CoreExpr
- mkTick :: Tickish Id -> CoreExpr -> CoreExpr
- mkCast :: CoreExpr -> CoercionR -> CoreExpr
- applyTypeToArgs :: CoreExpr -> Type -> [CoreExpr] -> Type
- isExprLevPoly :: CoreExpr -> Bool
- coreAltsType :: [CoreAlt] -> Type
- coreAltType :: CoreAlt -> Type
- exprType :: CoreExpr -> Type
- type CheapAppFun = Id -> Arity -> Bool
- dumpIfSet_dyn :: DumpFlag -> String -> SDoc -> CoreM ()
- debugTraceMsg :: SDoc -> CoreM ()
- debugTraceMsgS :: String -> CoreM ()
- fatalErrorMsg :: SDoc -> CoreM ()
- fatalErrorMsgS :: String -> CoreM ()
- warnMsg :: WarnReason -> SDoc -> CoreM ()
- errorMsg :: SDoc -> CoreM ()
- errorMsgS :: String -> CoreM ()
- putMsg :: SDoc -> CoreM ()
- putMsgS :: String -> CoreM ()
- getFirstAnnotations :: Typeable a => ([Word8] -> a) -> ModGuts -> CoreM (UniqFM a)
- getAnnotations :: Typeable a => ([Word8] -> a) -> ModGuts -> CoreM (UniqFM [a])
- getPackageFamInstEnv :: CoreM PackageFamInstEnv
- getOrigNameCache :: CoreM OrigNameCache
- getUniqMask :: CoreM Char
- addSimplCount :: SimplCount -> CoreM ()
- getSrcSpanM :: CoreM SrcSpan
- getPrintUnqualified :: CoreM PrintUnqualified
- getVisibleOrphanMods :: CoreM ModuleSet
- getRuleBase :: CoreM RuleBase
- getHscEnv :: CoreM HscEnv
- liftIOWithCount :: IO (SimplCount, a) -> CoreM a
- runCoreM :: HscEnv -> RuleBase -> Char -> Module -> ModuleSet -> PrintUnqualified -> SrcSpan -> CoreM a -> IO (a, SimplCount)
- pprSimplCount :: SimplCount -> SDoc
- plusSimplCount :: SimplCount -> SimplCount -> SimplCount
- doSimplTick :: DynFlags -> Tick -> SimplCount -> SimplCount
- doFreeSimplTick :: Tick -> SimplCount -> SimplCount
- hasDetailedCounts :: SimplCount -> Bool
- isZeroSimplCount :: SimplCount -> Bool
- zeroSimplCount :: DynFlags -> SimplCount
- simplCountN :: SimplCount -> Int
- bindsOnlyPass :: (CoreProgram -> CoreM CoreProgram) -> ModGuts -> CoreM ModGuts
- runMaybe :: Maybe a -> (a -> CoreToDo) -> CoreToDo
- runWhen :: Bool -> CoreToDo -> CoreToDo
- pprPassDetails :: CoreToDo -> SDoc
- data SimplMode = SimplMode {
- sm_names :: [String]
- sm_phase :: CompilerPhase
- sm_dflags :: DynFlags
- sm_rules :: Bool
- sm_inline :: Bool
- sm_case_case :: Bool
- sm_eta_expand :: Bool
- data FloatOutSwitches = FloatOutSwitches {}
- type CorePluginPass = ModGuts -> CoreM ModGuts
- data Tick
- phaseForeignLanguage :: Phase -> Maybe ForeignSrcLang
- extendCompleteMatchMap :: CompleteMatchMap -> [CompleteMatch] -> CompleteMatchMap
- mkCompleteMatchMap :: [CompleteMatch] -> CompleteMatchMap
- byteCodeOfObject :: Unlinked -> CompiledByteCode
- nameOfObject :: Unlinked -> FilePath
- isInterpretable :: Unlinked -> Bool
- isObject :: Unlinked -> Bool
- linkableObjs :: Linkable -> [FilePath]
- isObjectLinkable :: Linkable -> Bool
- numToTrustInfo :: Word8 -> IfaceTrustInfo
- trustInfoToNum :: IfaceTrustInfo -> Word8
- noIfaceTrustInfo :: IfaceTrustInfo
- setSafeMode :: SafeHaskellMode -> IfaceTrustInfo
- getSafeMode :: IfaceTrustInfo -> SafeHaskellMode
- isHpcUsed :: HpcInfo -> AnyHpcUsage
- emptyHpcInfo :: AnyHpcUsage -> HpcInfo
- showModMsg :: DynFlags -> HscTarget -> Bool -> ModSummary -> String
- isBootSummary :: ModSummary -> Bool
- msObjFilePath :: ModSummary -> FilePath
- msHiFilePath :: ModSummary -> FilePath
- msHsFilePath :: ModSummary -> FilePath
- ms_home_imps :: ModSummary -> [Located ModuleName]
- ms_home_srcimps :: ModSummary -> [Located ModuleName]
- ms_home_allimps :: ModSummary -> [ModuleName]
- home_imps :: [(Maybe FastString, Located ModuleName)] -> [Located ModuleName]
- ms_imps :: ModSummary -> [(Maybe FastString, Located ModuleName)]
- ms_mod_name :: ModSummary -> ModuleName
- ms_installed_mod :: ModSummary -> InstalledModule
- mkModuleGraph :: [ModSummary] -> ModuleGraph
- extendMG :: ModuleGraph -> ModSummary -> ModuleGraph
- isTemplateHaskellOrQQNonBoot :: ModSummary -> Bool
- emptyMG :: ModuleGraph
- mgLookupModule :: ModuleGraph -> Module -> Maybe ModSummary
- mgElemModule :: ModuleGraph -> Module -> Bool
- mgModSummaries :: ModuleGraph -> [ModSummary]
- mgBootModules :: ModuleGraph -> ModuleSet
- mapMG :: (ModSummary -> ModSummary) -> ModuleGraph -> ModuleGraph
- needsTemplateHaskellOrQQ :: ModuleGraph -> Bool
- soExt :: Platform -> FilePath
- mkHsSOName :: Platform -> FilePath -> FilePath
- mkSOName :: Platform -> FilePath -> FilePath
- updNameCache :: IORef NameCache -> (NameCache -> (NameCache, c)) -> IO c
- addEpsInStats :: EpsStats -> Int -> Int -> Int -> EpsStats
- noDependencies :: Dependencies
- lookupFixity :: FixityEnv -> Name -> Fixity
- emptyFixityEnv :: FixityEnv
- mkIfaceFixCache :: [(OccName, Fixity)] -> OccName -> Maybe Fixity
- plusWarns :: Warnings -> Warnings -> Warnings
- emptyIfaceWarnCache :: OccName -> Maybe WarningTxt
- mkIfaceWarnCache :: Warnings -> OccName -> Maybe WarningTxt
- tyThingId :: TyThing -> Id
- tyThingConLike :: TyThing -> ConLike
- tyThingDataCon :: TyThing -> DataCon
- tyThingCoAxiom :: TyThing -> CoAxiom Branched
- tyThingTyCon :: TyThing -> TyCon
- lookupTypeHscEnv :: HscEnv -> Name -> IO (Maybe TyThing)
- lookupType :: DynFlags -> HomePackageTable -> PackageTypeEnv -> Name -> Maybe TyThing
- plusTypeEnv :: TypeEnv -> TypeEnv -> TypeEnv
- extendTypeEnvWithIds :: TypeEnv -> [Id] -> TypeEnv
- extendTypeEnvList :: TypeEnv -> [TyThing] -> TypeEnv
- extendTypeEnv :: TypeEnv -> TyThing -> TypeEnv
- lookupTypeEnv :: TypeEnv -> Name -> Maybe TyThing
- typeEnvFromEntities :: [Id] -> [TyCon] -> [FamInst] -> TypeEnv
- mkTypeEnvWithImplicits :: [TyThing] -> TypeEnv
- mkTypeEnv :: [TyThing] -> TypeEnv
- typeEnvClasses :: TypeEnv -> [Class]
- typeEnvDataCons :: TypeEnv -> [DataCon]
- typeEnvPatSyns :: TypeEnv -> [PatSyn]
- typeEnvIds :: TypeEnv -> [Id]
- typeEnvCoAxioms :: TypeEnv -> [CoAxiom Branched]
- typeEnvTyCons :: TypeEnv -> [TyCon]
- typeEnvElts :: TypeEnv -> [TyThing]
- emptyTypeEnv :: TypeEnv
- tyThingAvailInfo :: TyThing -> [AvailInfo]
- tyThingsTyCoVars :: [TyThing] -> TyCoVarSet
- tyThingParent_maybe :: TyThing -> Maybe TyThing
- isImplicitTyThing :: TyThing -> Bool
- implicitTyConThings :: TyCon -> [TyThing]
- implicitClassThings :: Class -> [TyThing]
- implicitTyThings :: TyThing -> [TyThing]
- pkgQual :: DynFlags -> PrintUnqualified
- mkQualPackage :: DynFlags -> QueryQualifyPackage
- mkQualModule :: DynFlags -> QueryQualifyModule
- mkPrintUnqualified :: DynFlags -> GlobalRdrEnv -> PrintUnqualified
- substInteractiveContext :: InteractiveContext -> TCvSubst -> InteractiveContext
- icExtendGblRdrEnv :: GlobalRdrEnv -> [TyThing] -> GlobalRdrEnv
- setInteractivePrintName :: InteractiveContext -> Name -> InteractiveContext
- setInteractivePackage :: HscEnv -> HscEnv
- extendInteractiveContextWithIds :: InteractiveContext -> [Id] -> InteractiveContext
- extendInteractiveContext :: InteractiveContext -> [TyThing] -> [ClsInst] -> [FamInst] -> Maybe [Type] -> FixityEnv -> InteractiveContext
- icPrintUnqual :: DynFlags -> InteractiveContext -> PrintUnqualified
- icInScopeTTs :: InteractiveContext -> [TyThing]
- icInteractiveModule :: InteractiveContext -> Module
- emptyInteractiveContext :: DynFlags -> InteractiveContext
- appendStubC :: ForeignStubs -> SDoc -> ForeignStubs
- importedByUser :: [ImportedBy] -> [ImportedModsVal]
- emptyModDetails :: ModDetails
- mkIfaceHashCache :: [(Fingerprint, IfaceDecl)] -> OccName -> Maybe (OccName, Fingerprint)
- emptyFullModIface :: Module -> ModIface
- emptyPartialModIface :: Module -> PartialModIface
- renameFreeHoles :: UniqDSet ModuleName -> [(ModuleName, Module)] -> UniqDSet ModuleName
- mi_free_holes :: ModIface -> UniqDSet ModuleName
- mi_semantic_module :: forall (a :: ModIfacePhase). ModIface_ a -> Module
- mi_fix :: ModIface -> OccName -> Fixity
- mi_boot :: ModIface -> Bool
- prepareAnnotations :: HscEnv -> Maybe ModGuts -> IO AnnEnv
- metaRequestAW :: Functor f => MetaHook f -> LHsExpr GhcTc -> f Serialized
- metaRequestD :: Functor f => MetaHook f -> LHsExpr GhcTc -> f [LHsDecl GhcPs]
- metaRequestT :: Functor f => MetaHook f -> LHsExpr GhcTc -> f (LHsType GhcPs)
- metaRequestP :: Functor f => MetaHook f -> LHsExpr GhcTc -> f (LPat GhcPs)
- metaRequestE :: Functor f => MetaHook f -> LHsExpr GhcTc -> f (LHsExpr GhcPs)
- hptRules :: HscEnv -> [(ModuleName, IsBootInterface)] -> [CoreRule]
- hptInstances :: HscEnv -> (ModuleName -> Bool) -> ([ClsInst], [FamInst])
- hptCompleteSigs :: HscEnv -> [CompleteMatch]
- lookupIfaceByModule :: HomePackageTable -> PackageIfaceTable -> Module -> Maybe ModIface
- lookupHptByModule :: HomePackageTable -> Module -> Maybe HomeModInfo
- listToHpt :: [(ModuleName, HomeModInfo)] -> HomePackageTable
- addListToHpt :: HomePackageTable -> [(ModuleName, HomeModInfo)] -> HomePackageTable
- addToHpt :: HomePackageTable -> ModuleName -> HomeModInfo -> HomePackageTable
- delFromHpt :: HomePackageTable -> ModuleName -> HomePackageTable
- mapHpt :: (HomeModInfo -> HomeModInfo) -> HomePackageTable -> HomePackageTable
- allHpt :: (HomeModInfo -> Bool) -> HomePackageTable -> Bool
- filterHpt :: (HomeModInfo -> Bool) -> HomePackageTable -> HomePackageTable
- eltsHpt :: HomePackageTable -> [HomeModInfo]
- lookupHptDirectly :: HomePackageTable -> Unique -> Maybe HomeModInfo
- lookupHpt :: HomePackageTable -> ModuleName -> Maybe HomeModInfo
- pprHPT :: HomePackageTable -> SDoc
- emptyPackageIfaceTable :: PackageIfaceTable
- emptyHomePackageTable :: HomePackageTable
- pprTargetId :: TargetId -> SDoc
- pprTarget :: Target -> SDoc
- hscEPS :: HscEnv -> IO ExternalPackageState
- handleFlagWarnings :: DynFlags -> [Warn] -> IO ()
- printOrThrowWarnings :: DynFlags -> Bag WarnMsg -> IO ()
- handleSourceError :: ExceptionMonad m => (SourceError -> m a) -> m a -> m a
- throwOneError :: MonadIO io => ErrMsg -> io a
- throwErrors :: MonadIO io => ErrorMessages -> io a
- mkApiErr :: DynFlags -> SDoc -> GhcApiError
- srcErrorMessages :: SourceError -> ErrorMessages
- mkSrcErr :: ErrorMessages -> SourceError
- runInteractiveHsc :: HscEnv -> Hsc a -> IO a
- mkInteractiveHscEnv :: HscEnv -> HscEnv
- runHsc :: HscEnv -> Hsc a -> IO a
- data HscStatus
- newtype Hsc a = Hsc (HscEnv -> WarningMessages -> IO (a, WarningMessages))
- data SourceError
- data GhcApiError
- data HscEnv = HscEnv {
- hsc_dflags :: DynFlags
- hsc_targets :: [Target]
- hsc_mod_graph :: ModuleGraph
- hsc_IC :: InteractiveContext
- hsc_HPT :: HomePackageTable
- hsc_EPS :: !(IORef ExternalPackageState)
- hsc_NC :: !(IORef NameCache)
- hsc_FC :: !(IORef FinderCache)
- hsc_type_env_var :: Maybe (Module, IORef TypeEnv)
- hsc_iserv :: MVar (Maybe IServ)
- hsc_dynLinker :: DynLinker
- data IServ = IServ {
- iservPipe :: Pipe
- iservProcess :: ProcessHandle
- iservLookupSymbolCache :: IORef (UniqFM (Ptr ()))
- iservPendingFrees :: [HValueRef]
- data Target = Target {}
- data TargetId
- type InputFileBuffer = StringBuffer
- type HomePackageTable = DModuleNameEnv HomeModInfo
- type PackageIfaceTable = ModuleEnv ModIface
- data HomeModInfo = HomeModInfo {
- hm_iface :: !ModIface
- hm_details :: !ModDetails
- hm_linkable :: !(Maybe Linkable)
- data MetaRequest
- = MetaE (LHsExpr GhcPs -> MetaResult)
- | MetaP (LPat GhcPs -> MetaResult)
- | MetaT (LHsType GhcPs -> MetaResult)
- | MetaD ([LHsDecl GhcPs] -> MetaResult)
- | MetaAW (Serialized -> MetaResult)
- data MetaResult
- type MetaHook (f :: Type -> Type) = MetaRequest -> LHsExpr GhcTc -> f MetaResult
- type FinderCache = InstalledModuleEnv InstalledFindResult
- data InstalledFindResult
- data FindResult
- = Found ModLocation Module
- | NoPackage UnitId
- | FoundMultiple [(Module, ModuleOrigin)]
- | NotFound {
- fr_paths :: [FilePath]
- fr_pkg :: Maybe UnitId
- fr_mods_hidden :: [UnitId]
- fr_pkgs_hidden :: [UnitId]
- fr_unusables :: [(UnitId, UnusablePackageReason)]
- fr_suggestions :: [ModuleSuggestion]
- type PartialModIface = ModIface_ 'ModIfaceCore
- type ModIface = ModIface_ 'ModIfaceFinal
- data ModIfaceBackend = ModIfaceBackend {
- mi_iface_hash :: !Fingerprint
- mi_mod_hash :: !Fingerprint
- mi_flag_hash :: !Fingerprint
- mi_opt_hash :: !Fingerprint
- mi_hpc_hash :: !Fingerprint
- mi_plugin_hash :: !Fingerprint
- mi_orphan :: !WhetherHasOrphans
- mi_finsts :: !WhetherHasFamInst
- mi_exp_hash :: !Fingerprint
- mi_orphan_hash :: !Fingerprint
- mi_warn_fn :: !(OccName -> Maybe WarningTxt)
- mi_fix_fn :: !(OccName -> Maybe Fixity)
- mi_hash_fn :: !(OccName -> Maybe (OccName, Fingerprint))
- data ModIface_ (phase :: ModIfacePhase) = ModIface {
- mi_module :: !Module
- mi_sig_of :: !(Maybe Module)
- mi_hsc_src :: !HscSource
- mi_deps :: Dependencies
- mi_usages :: [Usage]
- mi_exports :: ![IfaceExport]
- mi_used_th :: !Bool
- mi_fixities :: [(OccName, Fixity)]
- mi_warns :: Warnings
- mi_anns :: [IfaceAnnotation]
- mi_decls :: [IfaceDeclExts phase]
- mi_globals :: !(Maybe GlobalRdrEnv)
- mi_insts :: [IfaceClsInst]
- mi_fam_insts :: [IfaceFamInst]
- mi_rules :: [IfaceRule]
- mi_hpc :: !AnyHpcUsage
- mi_trust :: !IfaceTrustInfo
- mi_trust_pkg :: !Bool
- mi_complete_sigs :: [IfaceCompleteMatch]
- mi_doc_hdr :: Maybe HsDocString
- mi_decl_docs :: DeclDocMap
- mi_arg_docs :: ArgDocMap
- mi_final_exts :: !(IfaceBackendExts phase)
- type IfaceExport = AvailInfo
- data ModDetails = ModDetails {
- md_exports :: [AvailInfo]
- md_types :: !TypeEnv
- md_insts :: ![ClsInst]
- md_fam_insts :: ![FamInst]
- md_rules :: ![CoreRule]
- md_anns :: ![Annotation]
- md_complete_sigs :: [CompleteMatch]
- type ImportedMods = ModuleEnv [ImportedBy]
- data ImportedBy
- data ImportedModsVal = ImportedModsVal {}
- data ModGuts = ModGuts {
- mg_module :: !Module
- mg_hsc_src :: HscSource
- mg_loc :: SrcSpan
- mg_exports :: ![AvailInfo]
- mg_deps :: !Dependencies
- mg_usages :: ![Usage]
- mg_used_th :: !Bool
- mg_rdr_env :: !GlobalRdrEnv
- mg_fix_env :: !FixityEnv
- mg_tcs :: ![TyCon]
- mg_insts :: ![ClsInst]
- mg_fam_insts :: ![FamInst]
- mg_patsyns :: ![PatSyn]
- mg_rules :: ![CoreRule]
- mg_binds :: !CoreProgram
- mg_foreign :: !ForeignStubs
- mg_foreign_files :: ![(ForeignSrcLang, FilePath)]
- mg_warns :: !Warnings
- mg_anns :: [Annotation]
- mg_complete_sigs :: [CompleteMatch]
- mg_hpc_info :: !HpcInfo
- mg_modBreaks :: !(Maybe ModBreaks)
- mg_inst_env :: InstEnv
- mg_fam_inst_env :: FamInstEnv
- mg_safe_haskell :: SafeHaskellMode
- mg_trust_pkg :: Bool
- mg_doc_hdr :: !(Maybe HsDocString)
- mg_decl_docs :: !DeclDocMap
- mg_arg_docs :: !ArgDocMap
- data CgGuts = CgGuts {
- cg_module :: !Module
- cg_tycons :: [TyCon]
- cg_binds :: CoreProgram
- cg_foreign :: !ForeignStubs
- cg_foreign_files :: ![(ForeignSrcLang, FilePath)]
- cg_dep_pkgs :: ![InstalledUnitId]
- cg_hpc_info :: !HpcInfo
- cg_modBreaks :: !(Maybe ModBreaks)
- cg_spt_entries :: [SptEntry]
- data ForeignStubs
- data InteractiveContext = InteractiveContext {
- ic_dflags :: DynFlags
- ic_mod_index :: Int
- ic_imports :: [InteractiveImport]
- ic_tythings :: [TyThing]
- ic_rn_gbl_env :: GlobalRdrEnv
- ic_instances :: ([ClsInst], [FamInst])
- ic_fix_env :: FixityEnv
- ic_default :: Maybe [Type]
- ic_resume :: [Resume]
- ic_monad :: Name
- ic_int_print :: Name
- ic_cwd :: Maybe FilePath
- data InteractiveImport
- type TypeEnv = NameEnv TyThing
- class Monad m => MonadThings (m :: Type -> Type) where
- lookupThing :: Name -> m TyThing
- lookupId :: Name -> m Id
- lookupDataCon :: Name -> m DataCon
- lookupTyCon :: Name -> m TyCon
- data Warnings
- = NoWarnings
- | WarnAll WarningTxt
- | WarnSome [(OccName, WarningTxt)]
- type FixityEnv = NameEnv FixItem
- data FixItem = FixItem OccName Fixity
- type WhetherHasOrphans = Bool
- type IsBootInterface = Bool
- data Dependencies = Deps {
- dep_mods :: [(ModuleName, IsBootInterface)]
- dep_pkgs :: [(InstalledUnitId, Bool)]
- dep_orphs :: [Module]
- dep_finsts :: [Module]
- dep_plgins :: [ModuleName]
- data Usage
- = UsagePackageModule { }
- | UsageHomeModule { }
- | UsageFile { }
- | UsageMergedRequirement { }
- type PackageTypeEnv = TypeEnv
- type PackageRuleBase = RuleBase
- type PackageInstEnv = InstEnv
- type PackageFamInstEnv = FamInstEnv
- type PackageCompleteMatchMap = CompleteMatchMap
- data ExternalPackageState = EPS {
- eps_is_boot :: !(ModuleNameEnv (ModuleName, IsBootInterface))
- eps_PIT :: !PackageIfaceTable
- eps_free_holes :: InstalledModuleEnv (UniqDSet ModuleName)
- eps_PTE :: !PackageTypeEnv
- eps_inst_env :: !PackageInstEnv
- eps_fam_inst_env :: !PackageFamInstEnv
- eps_rule_base :: !PackageRuleBase
- eps_ann_env :: !PackageAnnEnv
- eps_complete_matches :: !PackageCompleteMatchMap
- eps_mod_fam_inst_env :: !(ModuleEnv FamInstEnv)
- eps_stats :: !EpsStats
- data EpsStats = EpsStats {
- n_ifaces_in :: !Int
- n_decls_in :: !Int
- n_decls_out :: !Int
- n_rules_in :: !Int
- n_rules_out :: !Int
- n_insts_in :: !Int
- n_insts_out :: !Int
- data ModuleGraph
- data ModSummary = ModSummary {
- ms_mod :: Module
- ms_hsc_src :: HscSource
- ms_location :: ModLocation
- ms_hs_date :: UTCTime
- ms_obj_date :: Maybe UTCTime
- ms_iface_date :: Maybe UTCTime
- ms_hie_date :: Maybe UTCTime
- ms_srcimps :: [(Maybe FastString, Located ModuleName)]
- ms_textual_imps :: [(Maybe FastString, Located ModuleName)]
- ms_parsed_mod :: Maybe HsParsedModule
- ms_hspp_file :: FilePath
- ms_hspp_opts :: DynFlags
- ms_hspp_buf :: Maybe StringBuffer
- data SourceModified
- data HpcInfo
- type AnyHpcUsage = Bool
- type IsSafeImport = Bool
- data IfaceTrustInfo
- data HsParsedModule = HsParsedModule {}
- data CompleteMatch = CompleteMatch {}
- type CompleteMatchMap = UniqFM [CompleteMatch]
- freeVars :: CoreExpr -> CoreExprWithFVs
- freeVarsBind :: CoreBind -> DVarSet -> (CoreBindWithFVs, DVarSet)
- stableUnfoldingVars :: Unfolding -> Maybe VarSet
- idUnfoldingVars :: Id -> VarSet
- idRuleVars :: Id -> VarSet
- bndrRuleAndUnfoldingVarsDSet :: Id -> DVarSet
- idFVs :: Id -> FV
- dIdFreeVars :: Id -> DVarSet
- idFreeVars :: Id -> VarSet
- varTypeTyCoFVs :: Var -> FV
- varTypeTyCoVars :: Var -> TyCoVarSet
- freeVarsOfAnn :: FVAnn -> DIdSet
- freeVarsOf :: CoreExprWithFVs -> DIdSet
- ruleLhsFreeIdsList :: CoreRule -> [Var]
- ruleLhsFreeIds :: CoreRule -> VarSet
- rulesFreeVars :: [CoreRule] -> VarSet
- idRuleRhsVars :: (Activation -> Bool) -> Id -> VarSet
- rulesFreeVarsDSet :: [CoreRule] -> DVarSet
- ruleFreeVars :: CoreRule -> VarSet
- ruleRhsFreeVars :: CoreRule -> VarSet
- orphNamesOfFamInst :: FamInst -> NameSet
- orphNamesOfAxiom :: forall (br :: BranchFlag). CoAxiom br -> NameSet
- orphNamesOfCoCon :: forall (br :: BranchFlag). CoAxiom br -> NameSet
- orphNamesOfCo :: Coercion -> NameSet
- orphNamesOfTypes :: [Type] -> NameSet
- orphNamesOfType :: Type -> NameSet
- exprsOrphNames :: [CoreExpr] -> NameSet
- expr_fvs :: CoreExpr -> FV
- exprsSomeFreeVarsList :: InterestingVarFun -> [CoreExpr] -> [Var]
- exprsSomeFreeVars :: InterestingVarFun -> [CoreExpr] -> VarSet
- exprSomeFreeVarsList :: InterestingVarFun -> CoreExpr -> [Var]
- exprSomeFreeVars :: InterestingVarFun -> CoreExpr -> VarSet
- bindFreeVars :: CoreBind -> VarSet
- exprsFreeVarsList :: [CoreExpr] -> [Var]
- exprsFreeVars :: [CoreExpr] -> VarSet
- exprsFreeIdsList :: [CoreExpr] -> [Id]
- exprsFreeIdsDSet :: [CoreExpr] -> DIdSet
- exprFreeIdsList :: CoreExpr -> [Id]
- exprFreeIdsDSet :: CoreExpr -> DIdSet
- exprFreeIds :: CoreExpr -> IdSet
- exprFreeVarsList :: CoreExpr -> [Var]
- exprFreeVarsDSet :: CoreExpr -> DVarSet
- exprFreeVars :: CoreExpr -> VarSet
- type FVAnn = DVarSet
- type CoreBindWithFVs = AnnBind Id FVAnn
- type CoreExprWithFVs = AnnExpr Id FVAnn
- type CoreExprWithFVs' = AnnExpr' Id FVAnn
- type CoreAltWithFVs = AnnAlt Id FVAnn
- data Linkable = LM {}
- data Unlinked
- data SptEntry = SptEntry Id Fingerprint
- emptyModBreaks :: ModBreaks
- data CompiledByteCode
- data ModBreaks = ModBreaks {}
- promotedNilDataCon :: TyCon
- promotedConsDataCon :: TyCon
- promotedGTDataCon :: TyCon
- promotedEQDataCon :: TyCon
- promotedLTDataCon :: TyCon
- promotedJustDataCon :: TyCon
- promotedNothingDataCon :: TyCon
- promotedFalseDataCon :: TyCon
- promotedTrueDataCon :: TyCon
- mkSumTy :: [Type] -> Type
- mkTupleTy1 :: Boxity -> [Type] -> Type
- mkTupleTy :: Boxity -> [Type] -> Type
- justDataCon :: DataCon
- nothingDataCon :: DataCon
- maybeTyCon :: TyCon
- consDataCon :: DataCon
- nilDataCon :: DataCon
- mkListTy :: Type -> Type
- ordGTDataConId :: Id
- ordEQDataConId :: Id
- ordLTDataConId :: Id
- ordGTDataCon :: DataCon
- ordEQDataCon :: DataCon
- ordLTDataCon :: DataCon
- orderingTyCon :: TyCon
- trueDataConId :: Id
- falseDataConId :: Id
- trueDataCon :: DataCon
- falseDataCon :: DataCon
- boolTyCon :: TyCon
- boolTy :: Type
- doubleDataCon :: DataCon
- doubleTyCon :: TyCon
- doubleTy :: Type
- floatDataCon :: DataCon
- floatTyCon :: TyCon
- floatTy :: Type
- word8DataCon :: DataCon
- word8TyCon :: TyCon
- word8Ty :: Type
- wordDataCon :: DataCon
- wordTyCon :: TyCon
- wordTy :: Type
- intDataCon :: DataCon
- intTyCon :: TyCon
- intTy :: Type
- stringTy :: Type
- charDataCon :: DataCon
- charTyCon :: TyCon
- charTy :: Type
- boxingDataCon_maybe :: TyCon -> Maybe DataCon
- liftedRepTy :: Type
- liftedRepDataCon :: DataCon
- sumRepDataConTyCon :: TyCon
- liftedTypeKindTyCon :: TyCon
- coercibleDataCon :: DataCon
- coercibleClass :: Class
- heqDataCon :: DataCon
- heqClass :: Class
- eqDataCon :: DataCon
- eqClass :: Class
- eqTyCon :: TyCon
- unboxedSumKind :: [Type] -> Kind
- sumDataCon :: ConTag -> Arity -> DataCon
- sumTyCon :: Arity -> TyCon
- unboxedUnitDataCon :: DataCon
- unboxedUnitTyCon :: TyCon
- pairTyCon :: TyCon
- unitDataConId :: Id
- unitDataCon :: DataCon
- unitTyConKey :: Unique
- unitTyCon :: TyCon
- tupleDataConName :: Boxity -> Arity -> Name
- tupleDataCon :: Boxity -> Arity -> DataCon
- promotedTupleDataCon :: Boxity -> Arity -> TyCon
- tupleTyCon :: Boxity -> Arity -> TyCon
- cTupleDataConNames :: [Name]
- cTupleDataConName :: Arity -> Name
- cTupleTyConNameArity_maybe :: Name -> Maybe Arity
- isCTupleTyConName :: Name -> Bool
- cTupleTyConNames :: [Name]
- cTupleTyConName :: Arity -> Name
- mkTupleStr :: Boxity -> Arity -> String
- isBuiltInOcc_maybe :: OccName -> Maybe Name
- typeToTypeKind :: Kind
- constraintKindTyCon :: TyCon
- typeSymbolKindCon :: TyCon
- typeNatKindCon :: TyCon
- consDataCon_RDR :: RdrName
- listTyCon_RDR :: RdrName
- intDataCon_RDR :: RdrName
- charTyCon_RDR :: RdrName
- intTyCon_RDR :: RdrName
- true_RDR :: RdrName
- false_RDR :: RdrName
- boolTyCon_RDR :: RdrName
- liftedTypeKindTyConName :: Name
- constraintKindTyConName :: Name
- makeRecoveryTyCon :: TyCon -> TyCon
- anyTy :: Type
- anyTyCon :: TyCon
- doubleTyConName :: Name
- floatTyConName :: Name
- word8TyConName :: Name
- wordTyConName :: Name
- justDataConName :: Name
- nothingDataConName :: Name
- maybeTyConName :: Name
- consDataConName :: Name
- nilDataConName :: Name
- listTyConName :: Name
- boolTyConName :: Name
- intTyConName :: Name
- charTyConName :: Name
- coercibleTyConName :: Name
- heqTyConName :: Name
- eqTyCon_RDR :: RdrName
- eqTyConName :: Name
- mkWiredInIdName :: Module -> FastString -> Unique -> Id -> Name
- mkWiredInTyConName :: BuiltInSyntax -> Module -> FastString -> Unique -> TyCon -> Name
- wiredInTyCons :: [TyCon]
- isNeverLevPolyId :: Id -> Bool
- transferPolyIdInfo :: Id -> [Var] -> Id -> Id
- zapStableUnfolding :: Id -> Id
- zapIdTailCallInfo :: Id -> Id
- zapIdUsedOnceInfo :: Id -> Id
- zapIdUsageEnvInfo :: Id -> Id
- zapIdUsageInfo :: Id -> Id
- zapIdDemandInfo :: Id -> Id
- zapFragileIdInfo :: Id -> Id
- zapLamIdInfo :: Id -> Id
- updOneShotInfo :: Id -> OneShotInfo -> Id
- setIdOneShotInfo :: Id -> OneShotInfo -> Id
- clearOneShotLambda :: Id -> Id
- setOneShotLambda :: Id -> Id
- isProbablyOneShotLambda :: Id -> Bool
- isStateHackType :: Type -> Bool
- typeOneShot :: Type -> OneShotInfo
- stateHackOneShot :: OneShotInfo
- isOneShotBndr :: Var -> Bool
- idStateHackOneShotInfo :: Id -> OneShotInfo
- idOneShotInfo :: Id -> OneShotInfo
- isConLikeId :: Id -> Bool
- idRuleMatchInfo :: Id -> RuleMatchInfo
- setInlineActivation :: Id -> Activation -> Id
- idInlineActivation :: Id -> Activation
- modifyInlinePragma :: Id -> (InlinePragma -> InlinePragma) -> Id
- setInlinePragma :: Id -> InlinePragma -> Id
- idInlinePragma :: Id -> InlinePragma
- zapIdOccInfo :: Id -> Id
- setIdOccInfo :: Id -> OccInfo -> Id
- idOccInfo :: Id -> OccInfo
- setIdCafInfo :: Id -> CafInfo -> Id
- idCafInfo :: Id -> CafInfo
- setIdSpecialisation :: Id -> RuleInfo -> Id
- idHasRules :: Id -> Bool
- idCoreRules :: Id -> [CoreRule]
- idSpecialisation :: Id -> RuleInfo
- setCaseBndrEvald :: StrictnessMark -> Id -> Id
- setIdDemandInfo :: Id -> Demand -> Id
- idDemandInfo :: Id -> Demand
- setIdUnfolding :: Id -> Unfolding -> Id
- realIdUnfolding :: Id -> Unfolding
- idUnfolding :: Id -> Unfolding
- isStrictId :: Id -> Bool
- zapIdStrictness :: Id -> Id
- setIdStrictness :: Id -> StrictSig -> Id
- idStrictness :: Id -> StrictSig
- isBottomingId :: Var -> Bool
- idFunRepArity :: Id -> RepArity
- setIdCallArity :: Id -> Arity -> Id
- idCallArity :: Id -> Arity
- setIdArity :: Id -> Arity -> Id
- idArity :: Id -> Arity
- asJoinId_maybe :: Id -> Maybe JoinArity -> Id
- zapJoinId :: Id -> Id
- asJoinId :: Id -> JoinArity -> JoinId
- idJoinArity :: JoinId -> JoinArity
- isDeadBinder :: Id -> Bool
- idIsFrom :: Module -> Id -> Bool
- isImplicitId :: Id -> Bool
- hasNoBinding :: Id -> Bool
- idDataCon :: Id -> DataCon
- isJoinId_maybe :: Var -> Maybe JoinArity
- isJoinId :: Var -> Bool
- isDataConId_maybe :: Id -> Maybe DataCon
- isDataConWrapId_maybe :: Id -> Maybe DataCon
- isDataConWrapId :: Id -> Bool
- isDataConWorkId_maybe :: Id -> Maybe DataCon
- isDataConWorkId :: Id -> Bool
- isFCallId_maybe :: Id -> Maybe ForeignCall
- isFCallId :: Id -> Bool
- isPrimOpId_maybe :: Id -> Maybe PrimOp
- isDFunId :: Id -> Bool
- isPrimOpId :: Id -> Bool
- isClassOpId_maybe :: Id -> Maybe Class
- isNaughtyRecordSelector :: Id -> Bool
- isPatSynRecordSelector :: Id -> Bool
- isDataConRecordSelector :: Id -> Bool
- isRecordSelector :: Id -> Bool
- recordSelectorTyCon :: Id -> RecSelParent
- mkTemplateLocalsNum :: Int -> [Type] -> [Id]
- mkTemplateLocals :: [Type] -> [Id]
- mkTemplateLocal :: Int -> Type -> Id
- mkWorkerId :: Unique -> Id -> Type -> Id
- mkUserLocalOrCoVar :: OccName -> Unique -> Type -> SrcSpan -> Id
- mkUserLocal :: OccName -> Unique -> Type -> SrcSpan -> Id
- mkSysLocalOrCoVarM :: MonadUnique m => FastString -> Type -> m Id
- mkSysLocalM :: MonadUnique m => FastString -> Type -> m Id
- mkSysLocalOrCoVar :: FastString -> Unique -> Type -> Id
- mkSysLocal :: FastString -> Unique -> Type -> Id
- mkExportedVanillaId :: Name -> Type -> Id
- mkExportedLocalId :: IdDetails -> Name -> Type -> Id
- mkLocalIdWithInfo :: Name -> Type -> IdInfo -> Id
- mkLocalIdOrCoVarWithInfo :: Name -> Type -> IdInfo -> Id
- mkLocalIdOrCoVar :: Name -> Type -> Id
- mkLocalCoVar :: Name -> Type -> CoVar
- mkLocalId :: Name -> Type -> Id
- mkVanillaGlobalWithInfo :: Name -> Type -> IdInfo -> Id
- mkVanillaGlobal :: Name -> Type -> Id
- mkGlobalId :: IdDetails -> Name -> Type -> IdInfo -> Id
- maybeModifyIdInfo :: Maybe IdInfo -> Id -> Id
- modifyIdInfo :: HasDebugCallStack => (IdInfo -> IdInfo) -> Id -> Id
- setIdInfo :: Id -> IdInfo -> Id
- localiseId :: Id -> Id
- setIdType :: Id -> Type -> Id
- setIdUnique :: Id -> Unique -> Id
- setIdName :: Id -> Name -> Id
- idType :: Id -> Kind
- idUnique :: Id -> Unique
- idName :: Id -> Name
- isNeverLevPolyIdInfo :: IdInfo -> Bool
- setLevityInfoWithType :: IdInfo -> Type -> IdInfo
- setNeverLevPoly :: HasDebugCallStack => IdInfo -> Type -> IdInfo
- zapCallArityInfo :: IdInfo -> IdInfo
- zapTailCallInfo :: IdInfo -> Maybe IdInfo
- zapUnfolding :: Unfolding -> Unfolding
- zapFragileInfo :: IdInfo -> Maybe IdInfo
- zapUsedOnceInfo :: IdInfo -> Maybe IdInfo
- zapUsageEnvInfo :: IdInfo -> Maybe IdInfo
- zapUsageInfo :: IdInfo -> Maybe IdInfo
- zapDemandInfo :: IdInfo -> Maybe IdInfo
- zapLamInfo :: IdInfo -> Maybe IdInfo
- ppCafInfo :: CafInfo -> SDoc
- mayHaveCafRefs :: CafInfo -> Bool
- setRuleInfoHead :: Name -> RuleInfo -> RuleInfo
- ruleInfoRules :: RuleInfo -> [CoreRule]
- ruleInfoFreeVars :: RuleInfo -> DVarSet
- isEmptyRuleInfo :: RuleInfo -> Bool
- emptyRuleInfo :: RuleInfo
- pprStrictness :: StrictSig -> SDoc
- ppArityInfo :: Int -> SDoc
- unknownArity :: Arity
- noCafIdInfo :: IdInfo
- setStrictnessInfo :: IdInfo -> StrictSig -> IdInfo
- setDemandInfo :: IdInfo -> Demand -> IdInfo
- setOneShotInfo :: IdInfo -> OneShotInfo -> IdInfo
- setCafInfo :: IdInfo -> CafInfo -> IdInfo
- setCallArityInfo :: IdInfo -> ArityInfo -> IdInfo
- setArityInfo :: IdInfo -> ArityInfo -> IdInfo
- setUnfoldingInfo :: IdInfo -> Unfolding -> IdInfo
- setOccInfo :: IdInfo -> OccInfo -> IdInfo
- setInlinePragInfo :: IdInfo -> InlinePragma -> IdInfo
- setRuleInfo :: IdInfo -> RuleInfo -> IdInfo
- isJoinIdDetails_maybe :: IdDetails -> Maybe JoinArity
- data RecSelParent
- type ArityInfo = Arity
- type InlinePragInfo = InlinePragma
- data RuleInfo = RuleInfo [CoreRule] DVarSet
- data CafInfo
- type TickBoxId = Int
- data TickBoxOp = TickBox Module !TickBoxId
- data LevityInfo
- collectNAnnBndrs :: Int -> AnnExpr bndr annot -> ([bndr], AnnExpr bndr annot)
- collectAnnBndrs :: AnnExpr bndr annot -> ([bndr], AnnExpr bndr annot)
- deAnnBind :: AnnBind b annot -> Bind b
- deAnnAlt :: AnnAlt bndr annot -> Alt bndr
- deAnnotate' :: AnnExpr' bndr annot -> Expr bndr
- deAnnotate :: AnnExpr bndr annot -> Expr bndr
- collectAnnArgsTicks :: (Tickish Var -> Bool) -> AnnExpr b a -> (AnnExpr b a, [AnnExpr b a], [Tickish Var])
- collectAnnArgs :: AnnExpr b a -> (AnnExpr b a, [AnnExpr b a])
- valArgCount :: [Arg b] -> Int
- valBndrCount :: [CoreBndr] -> Int
- isTypeArg :: Expr b -> Bool
- isCoArg :: Expr b -> Bool
- isTyCoArg :: Expr b -> Bool
- isValArg :: Expr b -> Bool
- isRuntimeArg :: CoreExpr -> Bool
- isRuntimeVar :: Var -> Bool
- collectArgsTicks :: (Tickish Id -> Bool) -> Expr b -> (Expr b, [Arg b], [Tickish Id])
- stripNArgs :: Word -> Expr a -> Maybe (Expr a)
- collectArgs :: Expr b -> (Expr b, [Arg b])
- collectNBinders :: Int -> Expr b -> ([b], Expr b)
- collectTyAndValBinders :: CoreExpr -> ([TyVar], [Id], CoreExpr)
- collectTyBinders :: CoreExpr -> ([TyVar], CoreExpr)
- collectBinders :: Expr b -> ([b], Expr b)
- flattenBinds :: [Bind b] -> [(b, Expr b)]
- rhssOfAlts :: [Alt b] -> [Expr b]
- rhssOfBind :: Bind b -> [Expr b]
- bindersOfBinds :: [Bind b] -> [b]
- bindersOf :: Bind b -> [b]
- exprToCoercion_maybe :: CoreExpr -> Maybe Coercion
- exprToType :: CoreExpr -> Type
- applyTypeToArg :: Type -> CoreExpr -> Type
- varsToCoreExprs :: [CoreBndr] -> [Expr b]
- varToCoreExpr :: CoreBndr -> Expr b
- mkCoBind :: CoVar -> Coercion -> CoreBind
- mkTyBind :: TyVar -> Type -> CoreBind
- mkLetRec :: [(b, Expr b)] -> Expr b -> Expr b
- mkLetNonRec :: b -> Expr b -> Expr b -> Expr b
- mkLet :: Bind b -> Expr b -> Expr b
- mkLets :: [Bind b] -> Expr b -> Expr b
- mkLams :: [b] -> Expr b -> Expr b
- mkDoubleLitDouble :: Double -> Expr b
- mkDoubleLit :: Rational -> Expr b
- mkFloatLitFloat :: Float -> Expr b
- mkFloatLit :: Rational -> Expr b
- mkStringLit :: String -> Expr b
- mkCharLit :: Char -> Expr b
- mkInt64LitInt64 :: Int64 -> Expr b
- mkWord64LitWord64 :: Word64 -> Expr b
- mkWordLitWord :: DynFlags -> Word -> Expr b
- mkWordLit :: DynFlags -> Integer -> Expr b
- mkIntLitInt :: DynFlags -> Int -> Expr b
- mkIntLit :: DynFlags -> Integer -> Expr b
- mkTyArg :: Type -> Expr b
- mkConApp2 :: DataCon -> [Type] -> [Var] -> Expr b
- mkTyApps :: Expr b -> [Type] -> Expr b
- mkConApp :: DataCon -> [Arg b] -> Expr b
- mkVarApps :: Expr b -> [Var] -> Expr b
- mkCoApps :: Expr b -> [Coercion] -> Expr b
- mkApps :: Expr b -> [Arg b] -> Expr b
- deTagExpr :: TaggedExpr t -> CoreExpr
- cmpAltCon :: AltCon -> AltCon -> Ordering
- ltAlt :: (AltCon, a, b) -> (AltCon, a, b) -> Bool
- cmpAlt :: (AltCon, a, b) -> (AltCon, a, b) -> Ordering
- canUnfold :: Unfolding -> Bool
- isFragileUnfolding :: Unfolding -> Bool
- neverUnfoldGuidance :: UnfoldingGuidance -> Bool
- isBootUnfolding :: Unfolding -> Bool
- hasSomeUnfolding :: Unfolding -> Bool
- isStableUnfolding :: Unfolding -> Bool
- isCompulsoryUnfolding :: Unfolding -> Bool
- expandUnfolding_maybe :: Unfolding -> Maybe CoreExpr
- isExpandableUnfolding :: Unfolding -> Bool
- isCheapUnfolding :: Unfolding -> Bool
- isConLikeUnfolding :: Unfolding -> Bool
- isEvaldUnfolding :: Unfolding -> Bool
- isValueUnfolding :: Unfolding -> Bool
- otherCons :: Unfolding -> [AltCon]
- maybeUnfoldingTemplate :: Unfolding -> Maybe CoreExpr
- unfoldingTemplate :: Unfolding -> CoreExpr
- isStableSource :: UnfoldingSource -> Bool
- mkOtherCon :: [AltCon] -> Unfolding
- bootUnfolding :: Unfolding
- evaldUnfolding :: Unfolding
- noUnfolding :: Unfolding
- boringCxtNotOk :: Bool
- boringCxtOk :: Bool
- unSaturatedOk :: Bool
- needSaturated :: Bool
- setRuleIdName :: Name -> CoreRule -> CoreRule
- isLocalRule :: CoreRule -> Bool
- ruleIdName :: CoreRule -> Name
- ruleActivation :: CoreRule -> Activation
- ruleModule :: CoreRule -> Maybe Module
- ruleName :: CoreRule -> RuleName
- ruleArity :: CoreRule -> Int
- isAutoRule :: CoreRule -> Bool
- isBuiltinRule :: CoreRule -> Bool
- emptyRuleEnv :: RuleEnv
- mkRuleEnv :: RuleBase -> [Module] -> RuleEnv
- chooseOrphanAnchor :: NameSet -> IsOrphan
- notOrphan :: IsOrphan -> Bool
- isOrphan :: IsOrphan -> Bool
- tickishContains :: Eq b => Tickish b -> Tickish b -> Bool
- tickishPlace :: Tickish id -> TickishPlacement
- tickishIsCode :: Tickish id -> Bool
- mkNoScope :: Tickish id -> Tickish id
- mkNoCount :: Tickish id -> Tickish id
- tickishCanSplit :: Tickish id -> Bool
- tickishFloatable :: Tickish id -> Bool
- tickishScopesLike :: Tickish id -> TickishScoping -> Bool
- tickishScoped :: Tickish id -> TickishScoping
- tickishCounts :: Tickish id -> Bool
- data Expr b
- type Arg b = Expr b
- type Alt b = (AltCon, [b], Expr b)
- data AltCon
- data Bind b
- type InBndr = CoreBndr
- type InType = Type
- type InKind = Kind
- type InBind = CoreBind
- type InExpr = CoreExpr
- type InAlt = CoreAlt
- type InArg = CoreArg
- type InCoercion = Coercion
- type OutBndr = CoreBndr
- type OutType = Type
- type OutKind = Kind
- type OutCoercion = Coercion
- type OutBind = CoreBind
- type OutExpr = CoreExpr
- type OutAlt = CoreAlt
- type OutArg = CoreArg
- type MOutCoercion = MCoercion
- data Tickish id
- = ProfNote {
- profNoteCC :: CostCentre
- profNoteCount :: !Bool
- profNoteScope :: !Bool
- | HpcTick {
- tickModule :: Module
- tickId :: !Int
- | Breakpoint {
- breakpointId :: !Int
- breakpointFVs :: [id]
- | SourceNote { }
- = ProfNote {
- data TickishScoping
- data TickishPlacement
- data IsOrphan
- type RuleBase = NameEnv [CoreRule]
- data RuleEnv = RuleEnv {}
- data CoreRule
- = Rule { }
- | BuiltinRule { }
- type RuleFun = DynFlags -> InScopeEnv -> Id -> [CoreExpr] -> Maybe CoreExpr
- type InScopeEnv = (InScopeSet, IdUnfoldingFun)
- type IdUnfoldingFun = Id -> Unfolding
- data Unfolding
- = NoUnfolding
- | BootUnfolding
- | OtherCon [AltCon]
- | DFunUnfolding { }
- | CoreUnfolding { }
- data UnfoldingSource
- data UnfoldingGuidance
- = UnfWhen {
- ug_arity :: Arity
- ug_unsat_ok :: Bool
- ug_boring_ok :: Bool
- | UnfIfGoodArgs { }
- | UnfNever
- = UnfWhen {
- type CoreProgram = [CoreBind]
- type CoreBndr = Var
- type CoreExpr = Expr CoreBndr
- type CoreArg = Arg CoreBndr
- type CoreBind = Bind CoreBndr
- type CoreAlt = Alt CoreBndr
- data TaggedBndr t = TB CoreBndr t
- type TaggedBind t = Bind (TaggedBndr t)
- type TaggedExpr t = Expr (TaggedBndr t)
- type TaggedArg t = Arg (TaggedBndr t)
- type TaggedAlt t = Alt (TaggedBndr t)
- type AnnExpr bndr annot = (annot, AnnExpr' bndr annot)
- data AnnExpr' bndr annot
- = AnnVar Id
- | AnnLit Literal
- | AnnLam bndr (AnnExpr bndr annot)
- | AnnApp (AnnExpr bndr annot) (AnnExpr bndr annot)
- | AnnCase (AnnExpr bndr annot) bndr Type [AnnAlt bndr annot]
- | AnnLet (AnnBind bndr annot) (AnnExpr bndr annot)
- | AnnCast (AnnExpr bndr annot) (annot, Coercion)
- | AnnTick (Tickish Id) (AnnExpr bndr annot)
- | AnnType Type
- | AnnCoercion Coercion
- type AnnAlt bndr annot = (AltCon, [bndr], AnnExpr bndr annot)
- data AnnBind bndr annot
- buildSynTyCon :: Name -> [KnotTied TyConBinder] -> Kind -> [Role] -> KnotTied Type -> TyCon
- buildAlgTyCon :: Name -> [TyVar] -> [Role] -> Maybe CType -> ThetaType -> AlgTyConRhs -> Bool -> AlgTyConFlav -> TyCon
- splitDataProductType_maybe :: Type -> Maybe (TyCon, [Type], DataCon, [Type])
- promoteDataCon :: DataCon -> TyCon
- dataConUserTyVarsArePermuted :: DataCon -> Bool
- dataConCannotMatch :: [Type] -> DataCon -> Bool
- classDataCon :: Class -> DataCon
- specialPromotedDc :: DataCon -> Bool
- isVanillaDataCon :: DataCon -> Bool
- isUnboxedTupleCon :: DataCon -> Bool
- isTupleDataCon :: DataCon -> Bool
- dataConIdentity :: DataCon -> ByteString
- dataConRepArgTys :: DataCon -> [Type]
- dataConOrigArgTys :: DataCon -> [Type]
- dataConInstArgTys :: DataCon -> [Type] -> [Type]
- dataConUserType :: DataCon -> Type
- dataConOrigResTy :: DataCon -> Type
- dataConInstSig :: DataCon -> [Type] -> ([TyCoVar], ThetaType, [Type])
- dataConSig :: DataCon -> ([TyCoVar], ThetaType, [Type], Type)
- dataConBoxer :: DataCon -> Maybe DataConBoxer
- dataConImplBangs :: DataCon -> [HsImplBang]
- dataConRepStrictness :: DataCon -> [StrictnessMark]
- isNullaryRepDataCon :: DataCon -> Bool
- isNullarySrcDataCon :: DataCon -> Bool
- dataConRepArity :: DataCon -> Arity
- dataConSrcBangs :: DataCon -> [HsSrcBang]
- dataConFieldType_maybe :: DataCon -> FieldLabelString -> Maybe (FieldLabel, Type)
- dataConFieldType :: DataCon -> FieldLabelString -> Type
- dataConImplicitTyThings :: DataCon -> [TyThing]
- dataConWrapId :: DataCon -> Id
- dataConWrapId_maybe :: DataCon -> Maybe Id
- dataConWorkId :: DataCon -> Id
- dataConTheta :: DataCon -> ThetaType
- dataConEqSpec :: DataCon -> [EqSpec]
- dataConUnivAndExTyCoVars :: DataCon -> [TyCoVar]
- dataConUnivTyVars :: DataCon -> [TyVar]
- dataConIsInfix :: DataCon -> Bool
- dataConRepType :: DataCon -> Type
- dataConOrigTyCon :: DataCon -> TyCon
- dataConTagZ :: DataCon -> ConTagZ
- dataConTag :: DataCon -> ConTag
- mkDataCon :: Name -> Bool -> TyConRepName -> [HsSrcBang] -> [FieldLabel] -> [TyVar] -> [TyCoVar] -> [TyVarBinder] -> [EqSpec] -> KnotTied ThetaType -> [KnotTied Type] -> KnotTied Type -> RuntimeRepInfo -> KnotTied TyCon -> ConTag -> ThetaType -> Id -> DataConRep -> DataCon
- isMarkedStrict :: StrictnessMark -> Bool
- isSrcUnpacked :: SrcUnpackedness -> Bool
- isSrcStrict :: SrcStrictness -> Bool
- isBanged :: HsImplBang -> Bool
- eqHsBang :: HsImplBang -> HsImplBang -> Bool
- filterEqSpec :: [EqSpec] -> [TyVar] -> [TyVar]
- substEqSpec :: TCvSubst -> EqSpec -> EqSpec
- eqSpecPreds :: [EqSpec] -> ThetaType
- eqSpecPair :: EqSpec -> (TyVar, Type)
- eqSpecType :: EqSpec -> Type
- eqSpecTyVar :: EqSpec -> TyVar
- mkEqSpec :: TyVar -> Type -> EqSpec
- data HsSrcBang = HsSrcBang SourceText SrcUnpackedness SrcStrictness
- data HsImplBang
- data SrcStrictness
- data SrcUnpackedness
- data StrictnessMark
- simplifyArgsWorker :: [TyCoBinder] -> Kind -> TyCoVarSet -> [Role] -> [(Type, Coercion)] -> ([Type], [Coercion], CoercionN)
- buildCoercion :: Type -> Type -> CoercionN
- mkReprPrimEqPred :: Type -> Type -> Type
- mkHeteroReprPrimEqPred :: Kind -> Kind -> Type -> Type -> Type
- mkHeteroPrimEqPred :: Kind -> Kind -> Type -> Type -> Type
- mkPrimEqPredRole :: Role -> Type -> Type -> PredType
- mkPrimEqPred :: Type -> Type -> Type
- mkHeteroCoercionType :: Role -> Kind -> Kind -> Type -> Type -> Type
- coercionRole :: Coercion -> Role
- coercionKindRole :: Coercion -> (Pair Type, Role)
- coercionKinds :: [Coercion] -> Pair [Type]
- lcInScopeSet :: LiftingContext -> InScopeSet
- lcTCvSubst :: LiftingContext -> TCvSubst
- liftEnvSubstRight :: TCvSubst -> LiftCoEnv -> TCvSubst
- liftEnvSubstLeft :: TCvSubst -> LiftCoEnv -> TCvSubst
- lcSubstRight :: LiftingContext -> TCvSubst
- lcSubstLeft :: LiftingContext -> TCvSubst
- swapLiftCoEnv :: LiftCoEnv -> LiftCoEnv
- substRightCo :: LiftingContext -> Coercion -> Coercion
- substLeftCo :: LiftingContext -> Coercion -> Coercion
- isMappedByLC :: TyCoVar -> LiftingContext -> Bool
- liftCoSubstVarBndrUsing :: (LiftingContext -> Type -> (CoercionN, a)) -> LiftingContext -> TyCoVar -> (LiftingContext, TyCoVar, CoercionN, a)
- liftCoSubstTyVar :: LiftingContext -> Role -> TyVar -> Maybe Coercion
- substForAllCoBndrUsingLC :: Bool -> (Coercion -> Coercion) -> LiftingContext -> TyCoVar -> Coercion -> (LiftingContext, TyCoVar, Coercion)
- zapLiftingContext :: LiftingContext -> LiftingContext
- extendLiftingContextAndInScope :: LiftingContext -> TyCoVar -> Coercion -> LiftingContext
- extendLiftingContext :: LiftingContext -> TyCoVar -> Coercion -> LiftingContext
- mkSubstLiftingContext :: TCvSubst -> LiftingContext
- emptyLiftingContext :: InScopeSet -> LiftingContext
- liftCoSubstWith :: Role -> [TyCoVar] -> [Coercion] -> Type -> Coercion
- liftCoSubstWithEx :: Role -> [TyVar] -> [Coercion] -> [TyCoVar] -> [Type] -> (Type -> Coercion, [Type])
- eqCoercionX :: RnEnv2 -> Coercion -> Coercion -> Bool
- eqCoercion :: Coercion -> Coercion -> Bool
- topNormaliseNewType_maybe :: Type -> Maybe (Coercion, Type)
- topNormaliseTypeX :: NormaliseStepper ev -> (ev -> ev -> ev) -> Type -> Maybe (ev, Type)
- unwrapNewTypeStepper :: NormaliseStepper Coercion
- composeSteppers :: NormaliseStepper ev -> NormaliseStepper ev -> NormaliseStepper ev
- mapStepResult :: (ev1 -> ev2) -> NormaliseStepResult ev1 -> NormaliseStepResult ev2
- instNewTyCon_maybe :: TyCon -> [Type] -> Maybe (Type, Coercion)
- mkCoCast :: Coercion -> CoercionR -> Coercion
- mkPiCo :: Role -> Var -> Coercion -> Coercion
- mkPiCos :: Role -> [Var] -> Coercion -> Coercion
- castCoercionKindI :: Coercion -> CoercionN -> CoercionN -> Coercion
- castCoercionKind :: Coercion -> Role -> Type -> Type -> CoercionN -> CoercionN -> Coercion
- promoteCoercion :: Coercion -> CoercionN
- ltRole :: Role -> Role -> Bool
- nthRole :: Role -> TyCon -> Int -> Role
- tyConRolesRepresentational :: TyCon -> [Role]
- tyConRolesX :: Role -> TyCon -> [Role]
- setNominalRole_maybe :: Role -> Coercion -> Maybe Coercion
- downgradeRole :: Role -> Role -> Coercion -> Coercion
- mkCoherenceRightCo :: Role -> Type -> CoercionN -> Coercion -> Coercion
- mkCoherenceLeftCo :: Role -> Type -> CoercionN -> Coercion -> Coercion
- mkGReflLeftCo :: Role -> Type -> CoercionN -> Coercion
- mkGReflRightCo :: Role -> Type -> CoercionN -> Coercion
- nthCoRole :: Int -> Coercion -> Role
- mkTransMCo :: MCoercion -> MCoercion -> MCoercion
- mkHoleCo :: CoercionHole -> Coercion
- mkUnbranchedAxInstLHS :: CoAxiom Unbranched -> [Type] -> [Coercion] -> Type
- mkAxInstLHS :: forall (br :: BranchFlag). CoAxiom br -> BranchIndex -> [Type] -> [Coercion] -> Type
- mkUnbranchedAxInstRHS :: CoAxiom Unbranched -> [Type] -> [Coercion] -> Type
- mkAxInstRHS :: forall (br :: BranchFlag). CoAxiom br -> BranchIndex -> [Type] -> [Coercion] -> Type
- mkUnbranchedAxInstCo :: Role -> CoAxiom Unbranched -> [Type] -> [Coercion] -> Coercion
- mkAxInstCo :: forall (br :: BranchFlag). Role -> CoAxiom br -> BranchIndex -> [Type] -> [Coercion] -> Coercion
- isCoVar_maybe :: Coercion -> Maybe CoVar
- mkCoVarCos :: [CoVar] -> [Coercion]
- mkHomoForAllCos :: [TyCoVar] -> Coercion -> Coercion
- mkForAllCos :: [(TyCoVar, CoercionN)] -> Coercion -> Coercion
- mkAppCos :: Coercion -> [Coercion] -> Coercion
- mkRepReflCo :: Type -> Coercion
- coToMCo :: Coercion -> MCoercion
- isReflexiveCo_maybe :: Coercion -> Maybe (Type, Role)
- isReflCo_maybe :: Coercion -> Maybe (Type, Role)
- isGReflCo_maybe :: Coercion -> Maybe (Type, Role)
- isGReflMCo :: MCoercion -> Bool
- isReflCoVar_maybe :: Var -> Maybe Coercion
- coVarKind :: CoVar -> Type
- coVarTypes :: HasDebugCallStack => CoVar -> Pair Type
- splitForAllCo_co_maybe :: Coercion -> Maybe (CoVar, Coercion, Coercion)
- splitForAllCo_ty_maybe :: Coercion -> Maybe (TyVar, Coercion, Coercion)
- splitForAllCo_maybe :: Coercion -> Maybe (TyCoVar, Coercion, Coercion)
- splitFunCo_maybe :: Coercion -> Maybe (Coercion, Coercion)
- splitAppCo_maybe :: Coercion -> Maybe (Coercion, Coercion)
- splitTyConAppCo_maybe :: Coercion -> Maybe (TyCon, [Coercion])
- getCoVar_maybe :: Coercion -> Maybe CoVar
- decomposeFunCo :: HasDebugCallStack => Role -> Coercion -> (Coercion, Coercion)
- decomposeCo :: Arity -> Coercion -> [Role] -> [Coercion]
- tidyCoAxBndrsForUser :: TidyEnv -> [Var] -> (TidyEnv, [Var])
- pprCoAxBranch :: TyCon -> CoAxBranch -> SDoc
- pprCoAxBranchLHS :: TyCon -> CoAxBranch -> SDoc
- pprCoAxBranchUser :: TyCon -> CoAxBranch -> SDoc
- pprCoAxiom :: forall (br :: BranchFlag). CoAxiom br -> SDoc
- etaExpandCoAxBranch :: CoAxBranch -> ([TyVar], [Type], Type)
- setCoVarName :: CoVar -> Name -> CoVar
- setCoVarUnique :: CoVar -> Unique -> CoVar
- coVarName :: CoVar -> Name
- type NormaliseStepper ev = RecTcChecker -> TyCon -> [Type] -> NormaliseStepResult ev
- data NormaliseStepResult ev
- = NS_Done
- | NS_Abort
- | NS_Step RecTcChecker Type ev
- type LiftCoEnv = VarEnv Coercion
- pprLiteral :: (SDoc -> SDoc) -> Literal -> SDoc
- absentLiteralOf :: TyCon -> Maybe Literal
- literalType :: Literal -> Type
- litIsLifted :: Literal -> Bool
- litFitsInChar :: Literal -> Bool
- litIsDupable :: DynFlags -> Literal -> Bool
- litIsTrivial :: Literal -> Bool
- rubbishLit :: Literal
- nullAddrLit :: Literal
- double2FloatLit :: Literal -> Literal
- float2DoubleLit :: Literal -> Literal
- int2DoubleLit :: Literal -> Literal
- double2IntLit :: Literal -> Literal
- int2FloatLit :: Literal -> Literal
- float2IntLit :: Literal -> Literal
- int2CharLit :: Literal -> Literal
- char2IntLit :: Literal -> Literal
- narrow32WordLit :: Literal -> Literal
- narrow16WordLit :: Literal -> Literal
- narrow8WordLit :: Literal -> Literal
- narrow32IntLit :: Literal -> Literal
- narrow16IntLit :: Literal -> Literal
- narrow8IntLit :: Literal -> Literal
- narrowLit :: Integral a => Proxy a -> Literal -> Literal
- int2WordLit :: DynFlags -> Literal -> Literal
- word2IntLit :: DynFlags -> Literal -> Literal
- isLitValue :: Literal -> Bool
- mapLitValue :: DynFlags -> (Integer -> Integer) -> Literal -> Literal
- isLitValue_maybe :: Literal -> Maybe Integer
- litValue :: Literal -> Integer
- isZeroLit :: Literal -> Bool
- inCharRange :: Char -> Bool
- inWordRange :: DynFlags -> Integer -> Bool
- inIntRange :: DynFlags -> Integer -> Bool
- mkLitNatural :: Integer -> Type -> Literal
- mkLitInteger :: Integer -> Type -> Literal
- mkLitString :: String -> Literal
- mkLitChar :: Char -> Literal
- mkLitDouble :: Rational -> Literal
- mkLitFloat :: Rational -> Literal
- mkLitWord64Wrap :: DynFlags -> Integer -> Literal
- mkLitWord64 :: Integer -> Literal
- mkLitInt64Wrap :: DynFlags -> Integer -> Literal
- mkLitInt64 :: Integer -> Literal
- mkLitWordWrapC :: DynFlags -> Integer -> (Literal, Bool)
- mkLitWordWrap :: DynFlags -> Integer -> Literal
- mkLitWord :: DynFlags -> Integer -> Literal
- mkLitIntWrapC :: DynFlags -> Integer -> (Literal, Bool)
- mkLitIntWrap :: DynFlags -> Integer -> Literal
- mkLitInt :: DynFlags -> Integer -> Literal
- mkLitNumber :: DynFlags -> LitNumType -> Integer -> Type -> Literal
- litNumCheckRange :: DynFlags -> LitNumType -> Integer -> Bool
- mkLitNumberWrap :: DynFlags -> LitNumType -> Integer -> Type -> Literal
- litNumIsSigned :: LitNumType -> Bool
- data Literal
- data LitNumType
- tyConAppNeedsKindSig :: Bool -> TyCon -> Int -> Bool
- classifiesTypeWithValues :: Kind -> Bool
- isKindLevPoly :: Kind -> Bool
- isConstraintKindCon :: TyCon -> Bool
- setJoinResTy :: Int -> Type -> Type -> Type
- modifyJoinResTy :: Int -> (Type -> Type) -> Type -> Type
- splitVisVarsOfTypes :: [Type] -> Pair TyCoVarSet
- splitVisVarsOfType :: Type -> Pair TyCoVarSet
- synTyConResKind :: TyCon -> Kind
- tyConsOfType :: Type -> UniqSet TyCon
- occCheckExpand :: [Var] -> Type -> Maybe Type
- resultIsLevPoly :: Type -> Bool
- isTypeLevPoly :: Type -> Bool
- tcReturnsConstraintKind :: Kind -> Bool
- tcIsRuntimeTypeKind :: Kind -> Bool
- tcIsLiftedTypeKind :: Kind -> Bool
- tcIsConstraintKind :: Kind -> Bool
- tcTypeKind :: HasDebugCallStack => Type -> Kind
- typeKind :: HasDebugCallStack => Type -> Kind
- nonDetCmpTc :: TyCon -> TyCon -> Ordering
- nonDetCmpTypesX :: RnEnv2 -> [Type] -> [Type] -> Ordering
- nonDetCmpTypeX :: RnEnv2 -> Type -> Type -> Ordering
- nonDetCmpTypes :: [Type] -> [Type] -> Ordering
- nonDetCmpType :: Type -> Type -> Ordering
- eqVarBndrs :: RnEnv2 -> [Var] -> [Var] -> Maybe RnEnv2
- eqTypes :: [Type] -> [Type] -> Bool
- eqTypeX :: RnEnv2 -> Type -> Type -> Bool
- seqTypes :: [Type] -> ()
- seqType :: Type -> ()
- isValidJoinPointType :: JoinArity -> Type -> Bool
- isPrimitiveType :: Type -> Bool
- isStrictType :: HasDebugCallStack => Type -> Bool
- isDataFamilyAppType :: Type -> Bool
- isAlgType :: Type -> Bool
- isUnboxedSumType :: Type -> Bool
- isUnboxedTupleType :: Type -> Bool
- getRuntimeRep :: HasDebugCallStack => Type -> Type
- getRuntimeRep_maybe :: HasDebugCallStack => Type -> Maybe Type
- dropRuntimeRepArgs :: [Type] -> [Type]
- isRuntimeRepKindedTy :: Type -> Bool
- mightBeUnliftedType :: Type -> Bool
- isUnliftedType :: HasDebugCallStack => Type -> Bool
- isLiftedType_maybe :: HasDebugCallStack => Type -> Maybe Bool
- isCoVarType :: Type -> Bool
- isFamFreeTy :: Type -> Bool
- coAxNthLHS :: forall (br :: BranchFlag). CoAxiom br -> Int -> Type
- mkFamilyTyConApp :: TyCon -> [Type] -> Type
- closeOverKindsDSet :: DTyVarSet -> DTyVarSet
- closeOverKindsList :: [TyVar] -> [TyVar]
- closeOverKindsFV :: [TyVar] -> FV
- closeOverKinds :: TyVarSet -> TyVarSet
- binderRelevantType_maybe :: TyCoBinder -> Maybe Type
- tyBinderType :: TyBinder -> Type
- tyCoBinderType :: TyCoBinder -> Type
- tyCoBinderVar_maybe :: TyCoBinder -> Maybe TyCoVar
- isAnonTyCoBinder :: TyCoBinder -> Bool
- mkAnonBinder :: AnonArgFlag -> Type -> TyCoBinder
- isTauTy :: Type -> Bool
- appTyArgFlags :: Type -> [Type] -> [ArgFlag]
- tyConArgFlags :: TyCon -> [Type] -> [ArgFlag]
- partitionInvisibles :: [(a, ArgFlag)] -> ([a], [a])
- filterOutInferredTypes :: TyCon -> [Type] -> [Type]
- filterOutInvisibleTypes :: TyCon -> [Type] -> [Type]
- splitPiTysInvisibleN :: Int -> Type -> ([TyCoBinder], Type)
- splitPiTysInvisible :: Type -> ([TyCoBinder], Type)
- invisibleTyBndrCount :: Type -> Int
- splitForAllVarBndrs :: Type -> ([TyCoVarBinder], Type)
- splitPiTys :: Type -> ([TyCoBinder], Type)
- splitPiTy :: Type -> (TyCoBinder, Type)
- splitPiTy_maybe :: Type -> Maybe (TyCoBinder, Type)
- splitForAllTy_co_maybe :: Type -> Maybe (TyCoVar, Type)
- splitForAllTy_ty_maybe :: Type -> Maybe (TyCoVar, Type)
- splitForAllTy_maybe :: Type -> Maybe (TyCoVar, Type)
- dropForAlls :: Type -> Type
- splitForAllTy :: Type -> (TyCoVar, Type)
- isFunTy :: Type -> Bool
- isPiTy :: Type -> Bool
- isForAllTy_co :: Type -> Bool
- isForAllTy_ty :: Type -> Bool
- isForAllTy :: Type -> Bool
- splitForAllTysSameVis :: ArgFlag -> Type -> ([TyCoVar], Type)
- splitForAllTys :: Type -> ([TyCoVar], Type)
- mkTyConBindersPreferAnon :: [TyVar] -> TyCoVarSet -> [TyConBinder]
- mkLamTypes :: [Var] -> Type -> Type
- mkLamType :: Var -> Type -> Type
- mkVisForAllTys :: [TyVar] -> Type -> Type
- mkSpecForAllTys :: [TyVar] -> Type -> Type
- mkSpecForAllTy :: TyVar -> Type -> Type
- mkInvForAllTys :: [TyVar] -> Type -> Type
- mkTyCoInvForAllTys :: [TyCoVar] -> Type -> Type
- mkInvForAllTy :: TyVar -> Type -> Type
- mkTyCoInvForAllTy :: TyCoVar -> Type -> Type
- stripCoercionTy :: Type -> Coercion
- isCoercionTy_maybe :: Type -> Maybe Coercion
- mkCoercionTy :: Coercion -> Type
- discardCast :: Type -> Type
- tyConBindersTyCoBinders :: [TyConBinder] -> [TyCoBinder]
- splitCastTy_maybe :: Type -> Maybe (Type, Coercion)
- newTyConInstRhs :: TyCon -> [Type] -> Type
- nextRole :: Type -> Role
- splitListTyConApp_maybe :: Type -> Maybe Type
- repSplitTyConApp_maybe :: HasDebugCallStack => Type -> Maybe (TyCon, [Type])
- tcSplitTyConApp_maybe :: HasCallStack => Type -> Maybe (TyCon, [Type])
- splitTyConApp :: Type -> (TyCon, [Type])
- tyConAppArgN :: Int -> Type -> Type
- tyConAppArgs :: Type -> [Type]
- tyConAppArgs_maybe :: Type -> Maybe [Type]
- tyConAppTyCon :: Type -> TyCon
- tyConAppTyCon_maybe :: Type -> Maybe TyCon
- tyConAppTyConPicky_maybe :: Type -> Maybe TyCon
- mkTyConApp :: TyCon -> [Type] -> Type
- applyTysX :: [TyVar] -> Type -> [Type] -> Type
- piResultTys :: HasDebugCallStack => Type -> [Type] -> Type
- funArgTy :: Type -> Type
- funResultTy :: Type -> Type
- splitFunTys :: Type -> ([Type], Type)
- splitFunTy_maybe :: Type -> Maybe (Type, Type)
- splitFunTy :: Type -> (Type, Type)
- pprUserTypeErrorTy :: Type -> SDoc
- userTypeError_maybe :: Type -> Maybe Type
- isLitTy :: Type -> Maybe TyLit
- isStrLitTy :: Type -> Maybe FastString
- mkStrLitTy :: FastString -> Type
- isNumLitTy :: Type -> Maybe Integer
- mkNumLitTy :: Integer -> Type
- repSplitAppTys :: HasDebugCallStack => Type -> (Type, [Type])
- splitAppTys :: Type -> (Type, [Type])
- splitAppTy :: Type -> (Type, Type)
- tcRepSplitAppTy_maybe :: Type -> Maybe (Type, Type)
- repSplitAppTy_maybe :: HasDebugCallStack => Type -> Maybe (Type, Type)
- splitAppTy_maybe :: Type -> Maybe (Type, Type)
- mkAppTys :: Type -> [Type] -> Type
- repGetTyVar_maybe :: Type -> Maybe TyVar
- getCastedTyVar_maybe :: Type -> Maybe (TyVar, CoercionN)
- getTyVar_maybe :: Type -> Maybe TyVar
- isTyVarTy :: Type -> Bool
- getTyVar :: String -> Type -> TyVar
- mapCoercion :: Monad m => TyCoMapper env m -> env -> Coercion -> m Coercion
- mapType :: Monad m => TyCoMapper env m -> env -> Type -> m Type
- isRuntimeRepVar :: TyVar -> Bool
- isUnliftedRuntimeRep :: Type -> Bool
- isUnliftedTypeKind :: Kind -> Bool
- isLiftedRuntimeRep :: Type -> Bool
- kindRep_maybe :: HasDebugCallStack => Kind -> Maybe Type
- kindRep :: HasDebugCallStack => Kind -> Type
- expandTypeSynonyms :: Type -> Type
- data TyCoMapper env (m :: Type -> Type) = TyCoMapper {}
- cloneTyVarBndrs :: TCvSubst -> [TyVar] -> UniqSupply -> (TCvSubst, [TyVar])
- cloneTyVarBndr :: TCvSubst -> TyVar -> Unique -> (TCvSubst, TyVar)
- substCoVarBndr :: HasCallStack => TCvSubst -> CoVar -> (TCvSubst, CoVar)
- substVarBndrs :: HasCallStack => TCvSubst -> [TyCoVar] -> (TCvSubst, [TyCoVar])
- substVarBndr :: HasCallStack => TCvSubst -> TyCoVar -> (TCvSubst, TyCoVar)
- substTyVarBndrs :: HasCallStack => TCvSubst -> [TyVar] -> (TCvSubst, [TyVar])
- substTyVarBndr :: HasCallStack => TCvSubst -> TyVar -> (TCvSubst, TyVar)
- lookupCoVar :: TCvSubst -> Var -> Maybe Coercion
- substCoVars :: TCvSubst -> [CoVar] -> [Coercion]
- substCoVar :: TCvSubst -> CoVar -> Coercion
- substCos :: HasCallStack => TCvSubst -> [Coercion] -> [Coercion]
- substCoUnchecked :: TCvSubst -> Coercion -> Coercion
- lookupTyVar :: TCvSubst -> TyVar -> Maybe Type
- substTyVars :: TCvSubst -> [TyVar] -> [Type]
- substTyVar :: TCvSubst -> TyVar -> Type
- substThetaUnchecked :: TCvSubst -> ThetaType -> ThetaType
- substTheta :: HasCallStack => TCvSubst -> ThetaType -> ThetaType
- substTysUnchecked :: TCvSubst -> [Type] -> [Type]
- substTys :: HasCallStack => TCvSubst -> [Type] -> [Type]
- substTyUnchecked :: TCvSubst -> Type -> Type
- substTyAddInScope :: TCvSubst -> Type -> Type
- substTysWith :: [TyVar] -> [Type] -> [Type] -> [Type]
- substCoWithUnchecked :: [TyVar] -> [Type] -> Coercion -> Coercion
- substCoWith :: HasCallStack => [TyVar] -> [Type] -> Coercion -> Coercion
- substTyWithUnchecked :: [TyVar] -> [Type] -> Type -> Type
- substTyWith :: HasCallStack => [TyVar] -> [Type] -> Type -> Type
- zipCoEnv :: HasDebugCallStack => [CoVar] -> [Coercion] -> CvSubstEnv
- zipTyEnv :: HasDebugCallStack => [TyVar] -> [Type] -> TvSubstEnv
- mkTvSubstPrs :: [(TyVar, Type)] -> TCvSubst
- zipTCvSubst :: HasDebugCallStack => [TyCoVar] -> [Type] -> TCvSubst
- zipTvSubst :: HasDebugCallStack => [TyVar] -> [Type] -> TCvSubst
- unionTCvSubst :: TCvSubst -> TCvSubst -> TCvSubst
- extendTCvSubstList :: TCvSubst -> [Var] -> [Type] -> TCvSubst
- extendTvSubstAndInScope :: TCvSubst -> TyVar -> Type -> TCvSubst
- extendCvSubst :: TCvSubst -> CoVar -> Coercion -> TCvSubst
- extendTvSubstWithClone :: TCvSubst -> TyVar -> TyVar -> TCvSubst
- extendTvSubstBinderAndInScope :: TCvSubst -> TyCoBinder -> Type -> TCvSubst
- extendTCvSubstWithClone :: TCvSubst -> TyCoVar -> TyCoVar -> TCvSubst
- extendTCvSubst :: TCvSubst -> TyCoVar -> Type -> TCvSubst
- extendTCvInScopeSet :: TCvSubst -> VarSet -> TCvSubst
- extendTCvInScopeList :: TCvSubst -> [Var] -> TCvSubst
- extendTCvInScope :: TCvSubst -> Var -> TCvSubst
- zapTCvSubst :: TCvSubst -> TCvSubst
- setTvSubstEnv :: TCvSubst -> TvSubstEnv -> TCvSubst
- notElemTCvSubst :: Var -> TCvSubst -> Bool
- getTCvSubstRangeFVs :: TCvSubst -> VarSet
- getTCvInScope :: TCvSubst -> InScopeSet
- getCvSubstEnv :: TCvSubst -> CvSubstEnv
- getTvSubstEnv :: TCvSubst -> TvSubstEnv
- mkTCvSubst :: InScopeSet -> (TvSubstEnv, CvSubstEnv) -> TCvSubst
- isEmptyTCvSubst :: TCvSubst -> Bool
- mkEmptyTCvSubst :: InScopeSet -> TCvSubst
- emptyTCvSubst :: TCvSubst
- composeTCvSubst :: TCvSubst -> TCvSubst -> TCvSubst
- composeTCvSubstEnv :: InScopeSet -> (TvSubstEnv, CvSubstEnv) -> (TvSubstEnv, CvSubstEnv) -> (TvSubstEnv, CvSubstEnv)
- emptyCvSubstEnv :: CvSubstEnv
- emptyTvSubstEnv :: TvSubstEnv
- data TCvSubst = TCvSubst InScopeSet TvSubstEnv CvSubstEnv
- type TvSubstEnv = TyVarEnv Type
- type CvSubstEnv = CoVarEnv Coercion
- pprParendCo :: Coercion -> SDoc
- tidyCos :: TidyEnv -> [Coercion] -> [Coercion]
- tidyCo :: TidyEnv -> Coercion -> Coercion
- tidyKind :: TidyEnv -> Kind -> Kind
- tidyOpenKind :: TidyEnv -> Kind -> (TidyEnv, Kind)
- tidyTopType :: Type -> Type
- tidyOpenType :: TidyEnv -> Type -> (TidyEnv, Type)
- tidyOpenTypes :: TidyEnv -> [Type] -> (TidyEnv, [Type])
- tidyType :: TidyEnv -> Type -> Type
- tidyTypes :: TidyEnv -> [Type] -> [Type]
- tidyTyCoVarOcc :: TidyEnv -> TyCoVar -> TyCoVar
- tidyOpenTyCoVar :: TidyEnv -> TyCoVar -> (TidyEnv, TyCoVar)
- tidyOpenTyCoVars :: TidyEnv -> [TyCoVar] -> (TidyEnv, [TyCoVar])
- tidyFreeTyCoVars :: TidyEnv -> [TyCoVar] -> TidyEnv
- tidyTyCoVarBinders :: TidyEnv -> [VarBndr TyCoVar vis] -> (TidyEnv, [VarBndr TyCoVar vis])
- tidyTyCoVarBinder :: TidyEnv -> VarBndr TyCoVar vis -> (TidyEnv, VarBndr TyCoVar vis)
- tidyVarBndr :: TidyEnv -> TyCoVar -> (TidyEnv, TyCoVar)
- tidyVarBndrs :: TidyEnv -> [TyCoVar] -> (TidyEnv, [TyCoVar])
- tyCoVarsOfTypesWellScoped :: [Type] -> [TyVar]
- tyCoVarsOfTypeWellScoped :: Type -> [TyVar]
- scopedSort :: [TyCoVar] -> [TyCoVar]
- noFreeVarsOfType :: Type -> Bool
- coVarsOfCo :: Coercion -> CoVarSet
- coVarsOfTypes :: [Type] -> TyCoVarSet
- coVarsOfType :: Type -> CoVarSet
- tyCoFVsOfCos :: [Coercion] -> FV
- tyCoFVsOfCo :: Coercion -> FV
- tyCoVarsOfCoDSet :: Coercion -> DTyCoVarSet
- tyCoFVsVarBndr :: Var -> FV -> FV
- tyCoFVsVarBndrs :: [Var] -> FV -> FV
- tyCoFVsBndr :: TyCoVarBinder -> FV -> FV
- tyCoFVsOfType :: Type -> FV
- tyCoVarsOfTypeDSet :: Type -> DTyCoVarSet
- tyCoVarsOfCos :: [Coercion] -> TyCoVarSet
- tyCoVarsOfCo :: Coercion -> TyCoVarSet
- tyCoVarsOfTypes :: [Type] -> TyCoVarSet
- tyCoVarsOfType :: Type -> TyCoVarSet
- type InterestingVarFun = Var -> Bool
- funTyCon :: TyCon
- coercionSize :: Coercion -> Int
- typeSize :: Type -> Int
- setCoHoleCoVar :: CoercionHole -> CoVar -> CoercionHole
- coHoleCoVar :: CoercionHole -> CoVar
- mkTyConTy :: TyCon -> Type
- mkPiTys :: [TyCoBinder] -> Type -> Type
- mkPiTy :: TyCoBinder -> Type -> Type
- mkForAllTys :: [TyCoVarBinder] -> Type -> Type
- mkInvisFunTys :: [Type] -> Type -> Type
- mkVisFunTys :: [Type] -> Type -> Type
- mkInvisFunTy :: Type -> Type -> Type
- mkVisFunTy :: Type -> Type -> Type
- mkTyVarTys :: [TyVar] -> [Type]
- mkTyVarTy :: TyVar -> Type
- isNamedBinder :: TyCoBinder -> Bool
- isVisibleBinder :: TyCoBinder -> Bool
- isInvisibleBinder :: TyCoBinder -> Bool
- type KindOrType = Type
- type KnotTied ty = ty
- type CoercionR = Coercion
- type CoercionP = Coercion
- type MCoercionR = MCoercion
- data CoercionHole = CoercionHole {}
- isPredTy :: HasDebugCallStack => Type -> Bool
- isCoercionTy :: Type -> Bool
- mkAppTy :: Type -> Type -> Type
- mkCastTy :: Type -> Coercion -> Type
- piResultTy :: HasDebugCallStack => Type -> Type -> Type
- eqType :: Type -> Type -> Bool
- coreView :: Type -> Maybe Type
- tcView :: Type -> Maybe Type
- isRuntimeRepTy :: Type -> Bool
- isLiftedTypeKind :: Kind -> Bool
- splitTyConApp_maybe :: HasDebugCallStack => Type -> Maybe (TyCon, [Type])
- partitionInvisibleTypes :: TyCon -> [Type] -> ([Type], [Type])
- tyConSkolem :: TyCon -> Bool
- checkRecTc :: RecTcChecker -> TyCon -> Maybe RecTcChecker
- setRecTcMaxBound :: Int -> RecTcChecker -> RecTcChecker
- defaultRecTcMaxBound :: Int
- initRecTc :: RecTcChecker
- pprPromotionQuote :: TyCon -> SDoc
- tcFlavourIsOpen :: TyConFlavour -> Bool
- tyConFlavour :: TyCon -> TyConFlavour
- mkTyConTagMap :: TyCon -> NameEnv ConTag
- tyConRuntimeRepInfo :: TyCon -> RuntimeRepInfo
- tyConFamilyCoercion_maybe :: TyCon -> Maybe (CoAxiom Unbranched)
- tyConFamInst_maybe :: TyCon -> Maybe (TyCon, [Type])
- tyConFamInstSig_maybe :: TyCon -> Maybe (TyCon, [Type], CoAxiom Unbranched)
- isFamInstTyCon :: TyCon -> Bool
- tyConATs :: TyCon -> [TyCon]
- tyConClass_maybe :: TyCon -> Maybe Class
- isClassTyCon :: TyCon -> Bool
- famTyConFlav_maybe :: TyCon -> Maybe FamTyConFlav
- synTyConRhs_maybe :: TyCon -> Maybe Type
- synTyConDefn_maybe :: TyCon -> Maybe ([TyVar], Type)
- tyConStupidTheta :: TyCon -> [PredType]
- newTyConDataCon_maybe :: TyCon -> Maybe DataCon
- newTyConCo :: TyCon -> CoAxiom Unbranched
- newTyConCo_maybe :: TyCon -> Maybe (CoAxiom Unbranched)
- newTyConEtadRhs :: TyCon -> ([TyVar], Type)
- newTyConEtadArity :: TyCon -> Int
- newTyConRhs :: TyCon -> ([TyVar], Type)
- tyConRoles :: TyCon -> [Role]
- tyConFamilyResVar_maybe :: TyCon -> Maybe Name
- algTyConRhs :: TyCon -> AlgTyConRhs
- tyConFamilySize :: TyCon -> Int
- tyConSingleAlgDataCon_maybe :: TyCon -> Maybe DataCon
- tyConSingleDataCon :: TyCon -> DataCon
- tyConSingleDataCon_maybe :: TyCon -> Maybe DataCon
- tyConDataCons_maybe :: TyCon -> Maybe [DataCon]
- tyConDataCons :: TyCon -> [DataCon]
- isTyConWithSrcDataCons :: TyCon -> Bool
- expandSynTyCon_maybe :: TyCon -> [tyco] -> Maybe ([(TyVar, tyco)], Type, [tyco])
- isTcLevPoly :: TyCon -> Bool
- setTcTyConKind :: TyCon -> Kind -> TyCon
- isTcTyCon :: TyCon -> Bool
- tyConCType_maybe :: TyCon -> Maybe CType
- isImplicitTyCon :: TyCon -> Bool
- isLiftedTypeKindTyConName :: Name -> Bool
- isKindTyCon :: TyCon -> Bool
- isPromotedDataCon_maybe :: TyCon -> Maybe DataCon
- isPromotedDataCon :: TyCon -> Bool
- isPromotedTupleTyCon :: TyCon -> Bool
- isUnboxedSumTyCon :: TyCon -> Bool
- isBoxedTupleTyCon :: TyCon -> Bool
- tyConTuple_maybe :: TyCon -> Maybe TupleSort
- tyConFlavourAssoc_maybe :: TyConFlavour -> Maybe TyCon
- tyConAssoc_maybe :: TyCon -> Maybe TyCon
- isTyConAssoc :: TyCon -> Bool
- isBuiltInSynFamTyCon_maybe :: TyCon -> Maybe BuiltInSynFamily
- tyConInjectivityInfo :: TyCon -> Injectivity
- isClosedSynFamilyTyConWithAxiom_maybe :: TyCon -> Maybe (CoAxiom Branched)
- isOpenTypeFamilyTyCon :: TyCon -> Bool
- isDataFamilyTyCon :: TyCon -> Bool
- isTypeFamilyTyCon :: TyCon -> Bool
- isOpenFamilyTyCon :: TyCon -> Bool
- isFamilyTyCon :: TyCon -> Bool
- isEnumerationTyCon :: TyCon -> Bool
- isGadtSyntaxTyCon :: TyCon -> Bool
- mustBeSaturated :: TyCon -> Bool
- isFamFreeTyCon :: TyCon -> Bool
- isTauTyCon :: TyCon -> Bool
- isTypeSynonymTyCon :: TyCon -> Bool
- isDataSumTyCon_maybe :: TyCon -> Maybe [DataCon]
- isDataProductTyCon_maybe :: TyCon -> Maybe DataCon
- isProductTyCon :: TyCon -> Bool
- unwrapNewTyConEtad_maybe :: TyCon -> Maybe ([TyVar], Type, CoAxiom Unbranched)
- unwrapNewTyCon_maybe :: TyCon -> Maybe ([TyVar], Type, CoAxiom Unbranched)
- isNewTyCon :: TyCon -> Bool
- isGenInjAlgRhs :: AlgTyConRhs -> Bool
- isGenerativeTyCon :: TyCon -> Role -> Bool
- isInjectiveTyCon :: TyCon -> Role -> Bool
- isDataTyCon :: TyCon -> Bool
- isVanillaAlgTyCon :: TyCon -> Bool
- isAlgTyCon :: TyCon -> Bool
- isUnliftedTyCon :: TyCon -> Bool
- isPrimTyCon :: TyCon -> Bool
- isAbstractTyCon :: TyCon -> Bool
- mkPromotedDataCon :: DataCon -> Name -> TyConRepName -> [TyConTyCoBinder] -> Kind -> [Role] -> RuntimeRepInfo -> TyCon
- mkFamilyTyCon :: Name -> [TyConBinder] -> Kind -> Maybe Name -> FamTyConFlav -> Maybe Class -> Injectivity -> TyCon
- mkSynonymTyCon :: Name -> [TyConBinder] -> Kind -> [Role] -> Type -> Bool -> Bool -> TyCon
- mkLiftedPrimTyCon :: Name -> [TyConBinder] -> Kind -> [Role] -> TyCon
- mkKindTyCon :: Name -> [TyConBinder] -> Kind -> [Role] -> Name -> TyCon
- mkPrimTyCon :: Name -> [TyConBinder] -> Kind -> [Role] -> TyCon
- noTcTyConScopedTyVars :: [(Name, TcTyVar)]
- mkTcTyCon :: Name -> [TyConBinder] -> Kind -> [(Name, TcTyVar)] -> Bool -> TyConFlavour -> TyCon
- mkSumTyCon :: Name -> [TyConBinder] -> Kind -> Arity -> [TyVar] -> [DataCon] -> AlgTyConFlav -> TyCon
- mkTupleTyCon :: Name -> [TyConBinder] -> Kind -> Arity -> DataCon -> TupleSort -> AlgTyConFlav -> TyCon
- mkClassTyCon :: Name -> [TyConBinder] -> [Role] -> AlgTyConRhs -> Class -> Name -> TyCon
- mkAlgTyCon :: Name -> [TyConBinder] -> Kind -> [Role] -> Maybe CType -> [PredType] -> AlgTyConRhs -> AlgTyConFlav -> Bool -> TyCon
- mkFunTyCon :: Name -> [TyConBinder] -> Name -> TyCon
- lookupTyConFieldLabel :: FieldLabelString -> TyCon -> Maybe FieldLabel
- tyConFieldLabels :: TyCon -> [FieldLabel]
- primRepIsFloat :: PrimRep -> Maybe Bool
- primElemRepSizeB :: PrimElemRep -> Int
- primRepSizeB :: DynFlags -> PrimRep -> Int
- primRepsCompatible :: DynFlags -> [PrimRep] -> [PrimRep] -> Bool
- primRepCompatible :: DynFlags -> PrimRep -> PrimRep -> Bool
- isGcPtrRep :: PrimRep -> Bool
- isVoidRep :: PrimRep -> Bool
- tyConRepModOcc :: Module -> OccName -> (Module, OccName)
- mkPrelTyConRepName :: Name -> TyConRepName
- tyConRepName_maybe :: TyCon -> Maybe TyConRepName
- isNoParent :: AlgTyConFlav -> Bool
- visibleDataCons :: AlgTyConRhs -> [DataCon]
- mkDataTyConRhs :: [DataCon] -> AlgTyConRhs
- tyConVisibleTyVars :: TyCon -> [TyVar]
- tyConTyVarBinders :: [TyConBinder] -> [TyVarBinder]
- mkTyConKind :: [TyConBinder] -> Kind -> Kind
- isInvisibleTyConBinder :: VarBndr tv TyConBndrVis -> Bool
- isVisibleTyConBinder :: VarBndr tv TyConBndrVis -> Bool
- isNamedTyConBinder :: TyConBinder -> Bool
- tyConBndrVisArgFlag :: TyConBndrVis -> ArgFlag
- tyConBinderArgFlag :: TyConBinder -> ArgFlag
- mkRequiredTyConBinder :: TyCoVarSet -> TyVar -> TyConBinder
- mkNamedTyConBinders :: ArgFlag -> [TyVar] -> [TyConBinder]
- mkNamedTyConBinder :: ArgFlag -> TyVar -> TyConBinder
- mkAnonTyConBinders :: AnonArgFlag -> [TyVar] -> [TyConBinder]
- mkAnonTyConBinder :: AnonArgFlag -> TyVar -> TyConBinder
- type TyConBinder = VarBndr TyVar TyConBndrVis
- type TyConTyCoBinder = VarBndr TyCoVar TyConBndrVis
- data TyConBndrVis
- data AlgTyConRhs
- = AbstractTyCon
- | DataTyCon { }
- | TupleTyCon { }
- | SumTyCon {
- data_cons :: [DataCon]
- data_cons_size :: Int
- | NewTyCon {
- data_con :: DataCon
- nt_rhs :: Type
- nt_etad_rhs :: ([TyVar], Type)
- nt_co :: CoAxiom Unbranched
- nt_lev_poly :: Bool
- data RuntimeRepInfo
- = NoRRI
- | RuntimeRep ([Type] -> [PrimRep])
- | VecCount Int
- | VecElem PrimElemRep
- data AlgTyConFlav
- data Injectivity
- = NotInjective
- | Injective [Bool]
- data FamTyConFlav
- type TyConRepName = Name
- data PrimRep
- data PrimElemRep
- data TyConFlavour
- data RecTcChecker
- anyDVarEnv :: (a -> Bool) -> DVarEnv a -> Bool
- extendDVarEnvList :: DVarEnv a -> [(Var, a)] -> DVarEnv a
- partitionDVarEnv :: (a -> Bool) -> DVarEnv a -> (DVarEnv a, DVarEnv a)
- modifyDVarEnv :: (a -> a) -> DVarEnv a -> Var -> DVarEnv a
- extendDVarEnv_C :: (a -> a -> a) -> DVarEnv a -> Var -> a -> DVarEnv a
- elemDVarEnv :: Var -> DVarEnv a -> Bool
- isEmptyDVarEnv :: DVarEnv a -> Bool
- delDVarEnvList :: DVarEnv a -> [Var] -> DVarEnv a
- delDVarEnv :: DVarEnv a -> Var -> DVarEnv a
- unitDVarEnv :: Var -> a -> DVarEnv a
- plusDVarEnv_C :: (a -> a -> a) -> DVarEnv a -> DVarEnv a -> DVarEnv a
- plusDVarEnv :: DVarEnv a -> DVarEnv a -> DVarEnv a
- alterDVarEnv :: (Maybe a -> Maybe a) -> DVarEnv a -> Var -> DVarEnv a
- filterDVarEnv :: (a -> Bool) -> DVarEnv a -> DVarEnv a
- mapDVarEnv :: (a -> b) -> DVarEnv a -> DVarEnv b
- foldDVarEnv :: (a -> b -> b) -> b -> DVarEnv a -> b
- lookupDVarEnv :: DVarEnv a -> Var -> Maybe a
- minusDVarEnv :: DVarEnv a -> DVarEnv a' -> DVarEnv a
- extendDVarEnv :: DVarEnv a -> Var -> a -> DVarEnv a
- mkDVarEnv :: [(Var, a)] -> DVarEnv a
- dVarEnvElts :: DVarEnv a -> [a]
- emptyDVarEnv :: DVarEnv a
- modifyVarEnv_Directly :: (a -> a) -> UniqFM a -> Unique -> UniqFM a
- modifyVarEnv :: (a -> a) -> VarEnv a -> Var -> VarEnv a
- lookupVarEnv_NF :: VarEnv a -> Var -> a
- zipVarEnv :: [Var] -> [a] -> VarEnv a
- restrictVarEnv :: VarEnv a -> VarSet -> VarEnv a
- partitionVarEnv :: (a -> Bool) -> VarEnv a -> (VarEnv a, VarEnv a)
- delVarEnv_Directly :: VarEnv a -> Unique -> VarEnv a
- filterVarEnv_Directly :: (Unique -> a -> Bool) -> VarEnv a -> VarEnv a
- lookupVarEnv_Directly :: VarEnv a -> Unique -> Maybe a
- isEmptyVarEnv :: VarEnv a -> Bool
- unitVarEnv :: Var -> a -> VarEnv a
- emptyVarEnv :: VarEnv a
- mkVarEnv_Directly :: [(Unique, a)] -> VarEnv a
- mkVarEnv :: [(Var, a)] -> VarEnv a
- mapVarEnv :: (a -> b) -> VarEnv a -> VarEnv b
- lookupWithDefaultVarEnv :: VarEnv a -> a -> Var -> a
- filterVarEnv :: (a -> Bool) -> VarEnv a -> VarEnv a
- lookupVarEnv :: VarEnv a -> Var -> Maybe a
- plusVarEnvList :: [VarEnv a] -> VarEnv a
- plusVarEnv :: VarEnv a -> VarEnv a -> VarEnv a
- intersectsVarEnv :: VarEnv a -> VarEnv a -> Bool
- minusVarEnv :: VarEnv a -> VarEnv b -> VarEnv a
- delVarEnv :: VarEnv a -> Var -> VarEnv a
- delVarEnvList :: VarEnv a -> [Var] -> VarEnv a
- plusMaybeVarEnv_C :: (a -> a -> Maybe a) -> VarEnv a -> VarEnv a -> VarEnv a
- plusVarEnv_CD :: (a -> a -> a) -> VarEnv a -> a -> VarEnv a -> a -> VarEnv a
- plusVarEnv_C :: (a -> a -> a) -> VarEnv a -> VarEnv a -> VarEnv a
- extendVarEnvList :: VarEnv a -> [(Var, a)] -> VarEnv a
- extendVarEnv_Directly :: VarEnv a -> Unique -> a -> VarEnv a
- extendVarEnv_Acc :: (a -> b -> b) -> (a -> b) -> VarEnv b -> Var -> a -> VarEnv b
- extendVarEnv_C :: (a -> a -> a) -> VarEnv a -> Var -> a -> VarEnv a
- extendVarEnv :: VarEnv a -> Var -> a -> VarEnv a
- alterVarEnv :: (Maybe a -> Maybe a) -> VarEnv a -> Var -> VarEnv a
- disjointVarEnv :: VarEnv a -> VarEnv a -> Bool
- elemVarEnvByKey :: Unique -> VarEnv a -> Bool
- elemVarEnv :: Var -> VarEnv a -> Bool
- mkEmptyTidyEnv :: TidyOccEnv -> TidyEnv
- emptyTidyEnv :: TidyEnv
- rnSwap :: RnEnv2 -> RnEnv2
- nukeRnEnvR :: RnEnv2 -> RnEnv2
- nukeRnEnvL :: RnEnv2 -> RnEnv2
- lookupRnInScope :: RnEnv2 -> Var -> Var
- inRnEnvR :: RnEnv2 -> Var -> Bool
- inRnEnvL :: RnEnv2 -> Var -> Bool
- rnOccR_maybe :: RnEnv2 -> Var -> Maybe Var
- rnOccL_maybe :: RnEnv2 -> Var -> Maybe Var
- rnOccR :: RnEnv2 -> Var -> Var
- rnOccL :: RnEnv2 -> Var -> Var
- delBndrsR :: RnEnv2 -> [Var] -> RnEnv2
- delBndrsL :: RnEnv2 -> [Var] -> RnEnv2
- delBndrR :: RnEnv2 -> Var -> RnEnv2
- delBndrL :: RnEnv2 -> Var -> RnEnv2
- rnEtaR :: RnEnv2 -> Var -> (RnEnv2, Var)
- rnEtaL :: RnEnv2 -> Var -> (RnEnv2, Var)
- rnBndrR :: RnEnv2 -> Var -> (RnEnv2, Var)
- rnBndrL :: RnEnv2 -> Var -> (RnEnv2, Var)
- rnBndr2_var :: RnEnv2 -> Var -> Var -> (RnEnv2, Var)
- rnBndr2 :: RnEnv2 -> Var -> Var -> RnEnv2
- rnBndrs2 :: RnEnv2 -> [Var] -> [Var] -> RnEnv2
- rnEnvR :: RnEnv2 -> VarEnv Var
- rnEnvL :: RnEnv2 -> VarEnv Var
- rnInScopeSet :: RnEnv2 -> InScopeSet
- rnInScope :: Var -> RnEnv2 -> Bool
- addRnInScopeSet :: RnEnv2 -> VarSet -> RnEnv2
- mkRnEnv2 :: InScopeSet -> RnEnv2
- uniqAway :: InScopeSet -> Var -> Var
- varSetInScope :: VarSet -> InScopeSet -> Bool
- unionInScope :: InScopeSet -> InScopeSet -> InScopeSet
- lookupInScope_Directly :: InScopeSet -> Unique -> Maybe Var
- lookupInScope :: InScopeSet -> Var -> Maybe Var
- elemInScopeSet :: Var -> InScopeSet -> Bool
- delInScopeSet :: InScopeSet -> Var -> InScopeSet
- extendInScopeSetSet :: InScopeSet -> VarSet -> InScopeSet
- extendInScopeSetList :: InScopeSet -> [Var] -> InScopeSet
- extendInScopeSet :: InScopeSet -> Var -> InScopeSet
- mkInScopeSet :: VarSet -> InScopeSet
- getInScopeVars :: InScopeSet -> VarSet
- emptyInScopeSet :: InScopeSet
- data InScopeSet
- data RnEnv2
- type TidyEnv = (TidyOccEnv, VarEnv Var)
- type VarEnv elt = UniqFM elt
- type IdEnv elt = VarEnv elt
- type TyVarEnv elt = VarEnv elt
- type TyCoVarEnv elt = VarEnv elt
- type CoVarEnv elt = VarEnv elt
- type DVarEnv elt = UniqDFM elt
- type DIdEnv elt = DVarEnv elt
- type DTyVarEnv elt = DVarEnv elt
- transCloDVarSet :: (DVarSet -> DVarSet) -> DVarSet -> DVarSet
- dVarSetToVarSet :: DVarSet -> VarSet
- extendDVarSetList :: DVarSet -> [Var] -> DVarSet
- seqDVarSet :: DVarSet -> ()
- delDVarSetList :: DVarSet -> [Var] -> DVarSet
- partitionDVarSet :: (Var -> Bool) -> DVarSet -> (DVarSet, DVarSet)
- sizeDVarSet :: DVarSet -> Int
- filterDVarSet :: (Var -> Bool) -> DVarSet -> DVarSet
- mapDVarSet :: Uniquable b => (a -> b) -> UniqDSet a -> UniqDSet b
- allDVarSet :: (Var -> Bool) -> DVarSet -> Bool
- anyDVarSet :: (Var -> Bool) -> DVarSet -> Bool
- foldDVarSet :: (Var -> a -> a) -> a -> DVarSet -> a
- dVarSetMinusVarSet :: DVarSet -> VarSet -> DVarSet
- minusDVarSet :: DVarSet -> DVarSet -> DVarSet
- delDVarSet :: DVarSet -> Var -> DVarSet
- isEmptyDVarSet :: DVarSet -> Bool
- intersectsDVarSet :: DVarSet -> DVarSet -> Bool
- disjointDVarSet :: DVarSet -> DVarSet -> Bool
- dVarSetIntersectVarSet :: DVarSet -> VarSet -> DVarSet
- intersectDVarSet :: DVarSet -> DVarSet -> DVarSet
- mapUnionDVarSet :: (a -> DVarSet) -> [a] -> DVarSet
- unionDVarSets :: [DVarSet] -> DVarSet
- unionDVarSet :: DVarSet -> DVarSet -> DVarSet
- subDVarSet :: DVarSet -> DVarSet -> Bool
- dVarSetElems :: DVarSet -> [Var]
- elemDVarSet :: Var -> DVarSet -> Bool
- extendDVarSet :: DVarSet -> Var -> DVarSet
- mkDVarSet :: [Var] -> DVarSet
- unitDVarSet :: Var -> DVarSet
- emptyDVarSet :: DVarSet
- pprVarSet :: VarSet -> ([Var] -> SDoc) -> SDoc
- pluralVarSet :: VarSet -> SDoc
- seqVarSet :: VarSet -> ()
- transCloVarSet :: (VarSet -> VarSet) -> VarSet -> VarSet
- fixVarSet :: (VarSet -> VarSet) -> VarSet -> VarSet
- mapVarSet :: Uniquable b => (a -> b) -> UniqSet a -> UniqSet b
- allVarSet :: (Var -> Bool) -> VarSet -> Bool
- anyVarSet :: (Var -> Bool) -> VarSet -> Bool
- subVarSet :: VarSet -> VarSet -> Bool
- disjointVarSet :: VarSet -> VarSet -> Bool
- intersectsVarSet :: VarSet -> VarSet -> Bool
- mapUnionVarSet :: (a -> VarSet) -> [a] -> VarSet
- partitionVarSet :: (Var -> Bool) -> VarSet -> (VarSet, VarSet)
- elemVarSetByKey :: Unique -> VarSet -> Bool
- delVarSetByKey :: VarSet -> Unique -> VarSet
- filterVarSet :: (Var -> Bool) -> VarSet -> VarSet
- sizeVarSet :: VarSet -> Int
- lookupVarSetByName :: VarSet -> Name -> Maybe Var
- lookupVarSet :: VarSet -> Var -> Maybe Var
- lookupVarSet_Directly :: VarSet -> Unique -> Maybe Var
- mkVarSet :: [Var] -> VarSet
- isEmptyVarSet :: VarSet -> Bool
- delVarSetList :: VarSet -> [Var] -> VarSet
- delVarSet :: VarSet -> Var -> VarSet
- minusVarSet :: VarSet -> VarSet -> VarSet
- elemVarSet :: Var -> VarSet -> Bool
- unionVarSets :: [VarSet] -> VarSet
- unionVarSet :: VarSet -> VarSet -> VarSet
- intersectVarSet :: VarSet -> VarSet -> VarSet
- extendVarSetList :: VarSet -> [Var] -> VarSet
- extendVarSet :: VarSet -> Var -> VarSet
- unitVarSet :: Var -> VarSet
- emptyVarSet :: VarSet
- type VarSet = UniqSet Var
- type IdSet = UniqSet Id
- type TyVarSet = UniqSet TyVar
- type CoVarSet = UniqSet CoVar
- type TyCoVarSet = UniqSet TyCoVar
- type DVarSet = UniqDSet Var
- type DIdSet = UniqDSet Id
- type DTyVarSet = UniqDSet TyVar
- type DTyCoVarSet = UniqDSet TyCoVar
- mkReflCo :: Role -> Type -> Coercion
- mkTyConAppCo :: HasDebugCallStack => Role -> TyCon -> [Coercion] -> Coercion
- mkAppCo :: Coercion -> Coercion -> Coercion
- mkForAllCo :: TyCoVar -> CoercionN -> Coercion -> Coercion
- mkFunCo :: Role -> Coercion -> Coercion -> Coercion
- mkCoVarCo :: CoVar -> Coercion
- mkAxiomInstCo :: CoAxiom Branched -> BranchIndex -> [Coercion] -> Coercion
- mkPhantomCo :: Coercion -> Type -> Type -> Coercion
- mkUnsafeCo :: Role -> Type -> Type -> Coercion
- mkUnivCo :: UnivCoProvenance -> Role -> Type -> Type -> Coercion
- mkSymCo :: Coercion -> Coercion
- mkTransCo :: Coercion -> Coercion -> Coercion
- mkNthCo :: HasDebugCallStack => Role -> Int -> Coercion -> Coercion
- mkLRCo :: LeftOrRight -> Coercion -> Coercion
- mkInstCo :: Coercion -> Coercion -> Coercion
- mkGReflCo :: Role -> Type -> MCoercionN -> Coercion
- mkNomReflCo :: Type -> Coercion
- mkKindCo :: Coercion -> Coercion
- mkSubCo :: Coercion -> Coercion
- mkProofIrrelCo :: Role -> Coercion -> Coercion -> Coercion -> Coercion
- mkAxiomRuleCo :: CoAxiomRule -> [Coercion] -> Coercion
- isGReflCo :: Coercion -> Bool
- isReflCo :: Coercion -> Bool
- isReflexiveCo :: Coercion -> Bool
- decomposePiCos :: HasDebugCallStack => CoercionN -> Pair Type -> [Type] -> ([CoercionN], CoercionN)
- coVarKindsTypesRole :: HasDebugCallStack => CoVar -> (Kind, Kind, Type, Type, Role)
- coVarRole :: CoVar -> Role
- mkCoercionType :: Role -> Type -> Type -> Type
- liftCoSubst :: HasDebugCallStack => Role -> LiftingContext -> Type -> Coercion
- seqCo :: Coercion -> ()
- coercionKind :: Coercion -> Pair Type
- coercionType :: Coercion -> Type
- data LiftingContext = LC TCvSubst LiftCoEnv
- data Role
- dataConName :: DataCon -> Name
- dataConTyCon :: DataCon -> TyCon
- dataConExTyCoVars :: DataCon -> [TyCoVar]
- dataConUserTyVars :: DataCon -> [TyVar]
- dataConUserTyVarBinders :: DataCon -> [TyVarBinder]
- dataConSourceArity :: DataCon -> Arity
- dataConFieldLabels :: DataCon -> [FieldLabel]
- dataConInstOrigArgTys :: DataCon -> [Type] -> [Type]
- dataConStupidTheta :: DataCon -> ThetaType
- dataConFullSig :: DataCon -> ([TyVar], [TyCoVar], [EqSpec], ThetaType, [Type], Type)
- isUnboxedSumCon :: DataCon -> Bool
- data DataCon
- data DataConRep
- = NoDataConRep
- | DCR {
- dcr_wrap_id :: Id
- dcr_boxer :: DataConBoxer
- dcr_arg_tys :: [Type]
- dcr_stricts :: [StrictnessMark]
- dcr_bangs :: [HsImplBang]
- data EqSpec
- isExportedId :: Var -> Bool
- mustHaveLocalBinding :: Var -> Bool
- isGlobalId :: Var -> Bool
- isLocalVar :: Var -> Bool
- isLocalId :: Var -> Bool
- isNonCoVarId :: Var -> Bool
- isCoVar :: Var -> Bool
- isId :: Var -> Bool
- isTyCoVar :: Var -> Bool
- isTcTyVar :: Var -> Bool
- isTyVar :: Var -> Bool
- setIdNotExported :: Id -> Id
- setIdExported :: Id -> Id
- globaliseId :: Id -> Id
- setIdDetails :: Id -> IdDetails -> Id
- lazySetIdInfo :: Id -> IdInfo -> Var
- mkExportedLocalVar :: IdDetails -> Name -> Type -> IdInfo -> Id
- mkCoVar :: Name -> Type -> CoVar
- mkLocalVar :: IdDetails -> Name -> Type -> IdInfo -> Id
- mkGlobalVar :: IdDetails -> Name -> Type -> IdInfo -> Id
- idDetails :: Id -> IdDetails
- idInfo :: HasDebugCallStack => Id -> IdInfo
- setTcTyVarDetails :: TyVar -> TcTyVarDetails -> TyVar
- tcTyVarDetails :: TyVar -> TcTyVarDetails
- mkTcTyVar :: Name -> Kind -> TcTyVarDetails -> TyVar
- mkTyVar :: Name -> Kind -> TyVar
- updateTyVarKindM :: Monad m => (Kind -> m Kind) -> TyVar -> m TyVar
- updateTyVarKind :: (Kind -> Kind) -> TyVar -> TyVar
- setTyVarKind :: TyVar -> Kind -> TyVar
- setTyVarName :: TyVar -> Name -> TyVar
- setTyVarUnique :: TyVar -> Unique -> TyVar
- tyVarKind :: TyVar -> Kind
- tyVarName :: TyVar -> Name
- isTyVarBinder :: TyCoVarBinder -> Bool
- mkTyVarBinders :: ArgFlag -> [TyVar] -> [TyVarBinder]
- mkTyCoVarBinders :: ArgFlag -> [TyCoVar] -> [TyCoVarBinder]
- mkTyVarBinder :: ArgFlag -> TyVar -> TyVarBinder
- mkTyCoVarBinder :: ArgFlag -> TyCoVar -> TyCoVarBinder
- binderType :: VarBndr TyCoVar argf -> Type
- binderArgFlag :: VarBndr tv argf -> argf
- binderVars :: [VarBndr tv argf] -> [tv]
- binderVar :: VarBndr tv argf -> tv
- argToForallVisFlag :: ArgFlag -> ForallVisFlag
- sameVis :: ArgFlag -> ArgFlag -> Bool
- isInvisibleArgFlag :: ArgFlag -> Bool
- isVisibleArgFlag :: ArgFlag -> Bool
- updateVarTypeM :: Monad m => (Type -> m Type) -> Id -> m Id
- updateVarType :: (Type -> Type) -> Id -> Id
- setVarType :: Id -> Type -> Id
- setVarName :: Var -> Name -> Var
- setVarUnique :: Var -> Unique -> Var
- varUnique :: Var -> Unique
- nonDetCmpVar :: Var -> Var -> Ordering
- type Id = Var
- type CoVar = Id
- type NcId = Id
- type TyVar = Var
- type TKVar = Var
- type TcTyVar = Var
- type TypeVar = Var
- type KindVar = Var
- type EvId = Id
- type EvVar = EvId
- type DFunId = Id
- type DictId = EvId
- type IpId = EvId
- type EqVar = EvId
- type JoinId = Id
- type TyCoVar = Id
- type InVar = Var
- type InTyVar = TyVar
- type InCoVar = CoVar
- type InId = Id
- type OutVar = Var
- type OutTyVar = TyVar
- type OutCoVar = CoVar
- type OutId = Id
- data ForallVisFlag
- data VarBndr var argf = Bndr var argf
- type TyCoVarBinder = VarBndr TyCoVar ArgFlag
- type TyVarBinder = VarBndr TyVar ArgFlag
- deserializeAnns :: Typeable a => ([Word8] -> a) -> AnnEnv -> UniqFM [a]
- findAnnsByTypeRep :: AnnEnv -> CoreAnnTarget -> TypeRep -> [[Word8]]
- findAnns :: Typeable a => ([Word8] -> a) -> AnnEnv -> CoreAnnTarget -> [a]
- plusAnnEnv :: AnnEnv -> AnnEnv -> AnnEnv
- extendAnnEnvList :: AnnEnv -> [Annotation] -> AnnEnv
- mkAnnEnv :: [Annotation] -> AnnEnv
- emptyAnnEnv :: AnnEnv
- getAnnTargetName_maybe :: AnnTarget name -> Maybe name
- data Annotation = Annotation {}
- type AnnPayload = Serialized
- data AnnTarget name
- = NamedTarget name
- | ModuleTarget Module
- type CoreAnnTarget = AnnTarget Name
- data AnnEnv
- nilDataConKey :: Unique
- listTyConKey :: Unique
- starInfo :: Bool -> RdrName -> SDoc
- pprNameProvenance :: GlobalRdrElt -> SDoc
- isExplicitItem :: ImpItemSpec -> Bool
- importSpecModule :: ImportSpec -> ModuleName
- importSpecLoc :: ImportSpec -> SrcSpan
- qualSpecOK :: ModuleName -> ImportSpec -> Bool
- unQualSpecOK :: ImportSpec -> Bool
- bestImport :: [ImportSpec] -> ImportSpec
- shadowNames :: GlobalRdrEnv -> [Name] -> GlobalRdrEnv
- extendGlobalRdrEnv :: GlobalRdrEnv -> GlobalRdrElt -> GlobalRdrEnv
- transformGREs :: (GlobalRdrElt -> GlobalRdrElt) -> [OccName] -> GlobalRdrEnv -> GlobalRdrEnv
- mkGlobalRdrEnv :: [GlobalRdrElt] -> GlobalRdrEnv
- plusGlobalRdrEnv :: GlobalRdrEnv -> GlobalRdrEnv -> GlobalRdrEnv
- pickGREsModExp :: ModuleName -> [GlobalRdrElt] -> [(GlobalRdrElt, GlobalRdrElt)]
- pickGREs :: RdrName -> [GlobalRdrElt] -> [GlobalRdrElt]
- unQualOK :: GlobalRdrElt -> Bool
- greLabel :: GlobalRdrElt -> Maybe FieldLabelString
- isOverloadedRecFldGRE :: GlobalRdrElt -> Bool
- isRecFldGRE :: GlobalRdrElt -> Bool
- isLocalGRE :: GlobalRdrElt -> Bool
- getGRE_NameQualifier_maybes :: GlobalRdrEnv -> Name -> [Maybe [ModuleName]]
- lookupGRE_Name_OccName :: GlobalRdrEnv -> Name -> OccName -> Maybe GlobalRdrElt
- lookupGRE_FieldLabel :: GlobalRdrEnv -> FieldLabel -> Maybe GlobalRdrElt
- lookupGRE_Name :: GlobalRdrEnv -> Name -> Maybe GlobalRdrElt
- lookupGRE_RdrName :: RdrName -> GlobalRdrEnv -> [GlobalRdrElt]
- greOccName :: GlobalRdrElt -> OccName
- lookupGlobalRdrEnv :: GlobalRdrEnv -> OccName -> [GlobalRdrElt]
- pprGlobalRdrEnv :: Bool -> GlobalRdrEnv -> SDoc
- globalRdrEnvElts :: GlobalRdrEnv -> [GlobalRdrElt]
- emptyGlobalRdrEnv :: GlobalRdrEnv
- availFromGRE :: GlobalRdrElt -> AvailInfo
- gresToAvailInfo :: [GlobalRdrElt] -> [AvailInfo]
- greParent_maybe :: GlobalRdrElt -> Maybe Name
- greSrcSpan :: GlobalRdrElt -> SrcSpan
- greRdrNames :: GlobalRdrElt -> [RdrName]
- greQualModName :: GlobalRdrElt -> ModuleName
- gresFromAvail :: (Name -> Maybe ImportSpec) -> AvailInfo -> [GlobalRdrElt]
- localGREsFromAvail :: AvailInfo -> [GlobalRdrElt]
- gresFromAvails :: Maybe ImportSpec -> [AvailInfo] -> [GlobalRdrElt]
- delLocalRdrEnvList :: LocalRdrEnv -> [OccName] -> LocalRdrEnv
- inLocalRdrEnvScope :: Name -> LocalRdrEnv -> Bool
- localRdrEnvElts :: LocalRdrEnv -> [Name]
- elemLocalRdrEnv :: RdrName -> LocalRdrEnv -> Bool
- lookupLocalRdrOcc :: LocalRdrEnv -> OccName -> Maybe Name
- lookupLocalRdrEnv :: LocalRdrEnv -> RdrName -> Maybe Name
- extendLocalRdrEnvList :: LocalRdrEnv -> [Name] -> LocalRdrEnv
- extendLocalRdrEnv :: LocalRdrEnv -> Name -> LocalRdrEnv
- emptyLocalRdrEnv :: LocalRdrEnv
- isExact_maybe :: RdrName -> Maybe Name
- isExact :: RdrName -> Bool
- isOrig_maybe :: RdrName -> Maybe (Module, OccName)
- isOrig :: RdrName -> Bool
- isQual_maybe :: RdrName -> Maybe (ModuleName, OccName)
- isQual :: RdrName -> Bool
- isUnqual :: RdrName -> Bool
- isSrcRdrName :: RdrName -> Bool
- isRdrTc :: RdrName -> Bool
- isRdrTyVar :: RdrName -> Bool
- isRdrDataCon :: RdrName -> Bool
- nameRdrName :: Name -> RdrName
- getRdrName :: NamedThing thing => thing -> RdrName
- mkQual :: NameSpace -> (FastString, FastString) -> RdrName
- mkVarUnqual :: FastString -> RdrName
- mkUnqual :: NameSpace -> FastString -> RdrName
- mkOrig :: Module -> OccName -> RdrName
- mkRdrQual :: ModuleName -> OccName -> RdrName
- mkRdrUnqual :: OccName -> RdrName
- demoteRdrName :: RdrName -> Maybe RdrName
- rdrNameSpace :: RdrName -> NameSpace
- rdrNameOcc :: RdrName -> OccName
- data RdrName
- data LocalRdrEnv
- type GlobalRdrEnv = OccEnv [GlobalRdrElt]
- data GlobalRdrElt = GRE {}
- data Parent
- data ImportSpec = ImpSpec {}
- data ImpDeclSpec = ImpDeclSpec {
- is_mod :: ModuleName
- is_as :: ModuleName
- is_qual :: Bool
- is_dloc :: SrcSpan
- data ImpItemSpec
- type FieldLabelString = FastString
- type FieldLabel = FieldLbl Name
- data FieldLbl a = FieldLabel {
- flLabel :: FieldLabelString
- flIsOverloaded :: Bool
- flSelector :: a
- extendDNameEnv :: DNameEnv a -> Name -> a -> DNameEnv a
- alterDNameEnv :: (Maybe a -> Maybe a) -> DNameEnv a -> Name -> DNameEnv a
- adjustDNameEnv :: (a -> a) -> DNameEnv a -> Name -> DNameEnv a
- mapDNameEnv :: (a -> b) -> DNameEnv a -> DNameEnv b
- filterDNameEnv :: (a -> Bool) -> DNameEnv a -> DNameEnv a
- delFromDNameEnv :: DNameEnv a -> Name -> DNameEnv a
- lookupDNameEnv :: DNameEnv a -> Name -> Maybe a
- emptyDNameEnv :: DNameEnv a
- lookupNameEnv_NF :: NameEnv a -> Name -> a
- disjointNameEnv :: NameEnv a -> NameEnv a -> Bool
- anyNameEnv :: (elt -> Bool) -> NameEnv elt -> Bool
- filterNameEnv :: (elt -> Bool) -> NameEnv elt -> NameEnv elt
- delListFromNameEnv :: NameEnv a -> [Name] -> NameEnv a
- delFromNameEnv :: NameEnv a -> Name -> NameEnv a
- extendNameEnvList_C :: (a -> a -> a) -> NameEnv a -> [(Name, a)] -> NameEnv a
- extendNameEnv_Acc :: (a -> b -> b) -> (a -> b) -> NameEnv b -> Name -> a -> NameEnv b
- mapNameEnv :: (elt1 -> elt2) -> NameEnv elt1 -> NameEnv elt2
- extendNameEnv_C :: (a -> a -> a) -> NameEnv a -> Name -> a -> NameEnv a
- plusNameEnv_C :: (a -> a -> a) -> NameEnv a -> NameEnv a -> NameEnv a
- plusNameEnv :: NameEnv a -> NameEnv a -> NameEnv a
- elemNameEnv :: Name -> NameEnv a -> Bool
- mkNameEnvWith :: (a -> Name) -> [a] -> NameEnv a
- mkNameEnv :: [(Name, a)] -> NameEnv a
- alterNameEnv :: (Maybe a -> Maybe a) -> NameEnv a -> Name -> NameEnv a
- lookupNameEnv :: NameEnv a -> Name -> Maybe a
- extendNameEnvList :: NameEnv a -> [(Name, a)] -> NameEnv a
- extendNameEnv :: NameEnv a -> Name -> a -> NameEnv a
- unitNameEnv :: Name -> a -> NameEnv a
- isEmptyNameEnv :: NameEnv a -> Bool
- emptyNameEnv :: NameEnv a
- nameEnvElts :: NameEnv a -> [a]
- depAnal :: (node -> [Name]) -> (node -> [Name]) -> [node] -> [SCC node]
- type NameEnv a = UniqFM a
- type DNameEnv a = UniqDFM a
- findUses :: DefUses -> Uses -> Uses
- duUses :: DefUses -> Uses
- allUses :: DefUses -> Uses
- duDefs :: DefUses -> Defs
- plusDU :: DefUses -> DefUses -> DefUses
- mkDUs :: [(Defs, Uses)] -> DefUses
- usesOnly :: Uses -> DefUses
- emptyDUs :: DefUses
- intersectFVs :: FreeVars -> FreeVars -> FreeVars
- delFVs :: [Name] -> FreeVars -> FreeVars
- delFV :: Name -> FreeVars -> FreeVars
- unitFV :: Name -> FreeVars
- addOneFV :: FreeVars -> Name -> FreeVars
- mkFVs :: [Name] -> FreeVars
- plusFV :: FreeVars -> FreeVars -> FreeVars
- plusFVs :: [FreeVars] -> FreeVars
- emptyFVs :: FreeVars
- isEmptyFVs :: NameSet -> Bool
- nameSetElemsStable :: NameSet -> [Name]
- nameSetAll :: (Name -> Bool) -> NameSet -> Bool
- nameSetAny :: (Name -> Bool) -> NameSet -> Bool
- intersectsNameSet :: NameSet -> NameSet -> Bool
- delListFromNameSet :: NameSet -> [Name] -> NameSet
- intersectNameSet :: NameSet -> NameSet -> NameSet
- filterNameSet :: (Name -> Bool) -> NameSet -> NameSet
- delFromNameSet :: NameSet -> Name -> NameSet
- elemNameSet :: Name -> NameSet -> Bool
- minusNameSet :: NameSet -> NameSet -> NameSet
- unionNameSets :: [NameSet] -> NameSet
- unionNameSet :: NameSet -> NameSet -> NameSet
- extendNameSet :: NameSet -> Name -> NameSet
- extendNameSetList :: NameSet -> [Name] -> NameSet
- mkNameSet :: [Name] -> NameSet
- unitNameSet :: Name -> NameSet
- emptyNameSet :: NameSet
- isEmptyNameSet :: NameSet -> Bool
- type NameSet = UniqSet Name
- type FreeVars = NameSet
- type Defs = NameSet
- type Uses = NameSet
- type DefUse = (Maybe Defs, Uses)
- type DefUses = OrdList DefUse
- pprModuleMap :: ModuleToPkgConfAll -> SDoc
- pprPackagesSimple :: DynFlags -> SDoc
- pprPackages :: DynFlags -> SDoc
- isDllName :: DynFlags -> Module -> Name -> Bool
- getPreloadPackagesAnd :: DynFlags -> [PreloadUnitId] -> IO [PackageConfig]
- listVisibleModuleNames :: DynFlags -> [ModuleName]
- lookupPluginModuleWithSuggestions :: DynFlags -> ModuleName -> Maybe FastString -> LookupResult
- lookupModuleWithSuggestions :: DynFlags -> ModuleName -> Maybe FastString -> LookupResult
- lookupModuleInAllPackages :: DynFlags -> ModuleName -> [(Module, PackageConfig)]
- getPackageFrameworks :: DynFlags -> [PreloadUnitId] -> IO [String]
- getPackageFrameworkPath :: DynFlags -> [PreloadUnitId] -> IO [String]
- getPackageExtraCcOpts :: DynFlags -> [PreloadUnitId] -> IO [String]
- packageHsLibs :: DynFlags -> PackageConfig -> [String]
- getLibs :: DynFlags -> [PreloadUnitId] -> IO [(String, String)]
- collectArchives :: DynFlags -> PackageConfig -> IO [FilePath]
- collectLinkOpts :: DynFlags -> [PackageConfig] -> ([String], [String], [String])
- getPackageLinkOpts :: DynFlags -> [PreloadUnitId] -> IO ([String], [String], [String])
- collectLibraryPaths :: DynFlags -> [PackageConfig] -> [FilePath]
- getPackageLibraryPath :: DynFlags -> [PreloadUnitId] -> IO [String]
- collectIncludeDirs :: [PackageConfig] -> [FilePath]
- getPackageIncludePath :: DynFlags -> [PreloadUnitId] -> IO [String]
- unwireUnitId :: DynFlags -> UnitId -> UnitId
- pprReason :: SDoc -> UnusablePackageReason -> SDoc
- pprFlag :: PackageFlag -> SDoc
- isIndefinite :: DynFlags -> Bool
- readPackageConfig :: DynFlags -> FilePath -> IO (FilePath, [PackageConfig])
- resolvePackageConfig :: DynFlags -> PkgConfRef -> IO (Maybe FilePath)
- getPackageConfRefs :: DynFlags -> IO [PkgConfRef]
- readPackageConfigs :: DynFlags -> IO [(FilePath, [PackageConfig])]
- initPackages :: DynFlags -> IO (DynFlags, [PreloadUnitId])
- listPackageConfigMap :: DynFlags -> [PackageConfig]
- getInstalledPackageDetails :: DynFlags -> InstalledUnitId -> PackageConfig
- lookupInstalledPackage :: DynFlags -> InstalledUnitId -> Maybe PackageConfig
- getPackageDetails :: DynFlags -> UnitId -> PackageConfig
- searchPackageId :: DynFlags -> SourcePackageId -> [PackageConfig]
- lookupPackageName :: DynFlags -> PackageName -> Maybe ComponentId
- lookupPackage' :: Bool -> PackageConfigMap -> UnitId -> Maybe PackageConfig
- lookupPackage :: DynFlags -> UnitId -> Maybe PackageConfig
- data ModuleOrigin
- data UnusablePackageReason
- data LookupResult
- = LookupFound Module PackageConfig
- | LookupMultiple [(Module, ModuleOrigin)]
- | LookupHidden [(Module, ModuleOrigin)] [(Module, ModuleOrigin)]
- | LookupUnusable [(Module, ModuleOrigin)]
- | LookupNotFound [ModuleSuggestion]
- data ModuleSuggestion
- listTyCon :: TyCon
- typeSymbolKind :: Kind
- typeNatKind :: Kind
- mkBoxedTupleTy :: [Type] -> Type
- heqTyCon :: TyCon
- coercibleTyCon :: TyCon
- unitTy :: Type
- liftedTypeKind :: Kind
- constraintKind :: Kind
- vecElemTyCon :: TyCon
- vecCountTyCon :: TyCon
- runtimeRepTyCon :: TyCon
- runtimeRepTy :: Type
- tupleRepDataConTyCon :: TyCon
- vecRepDataConTyCon :: TyCon
- liftedRepDataConTyCon :: TyCon
- doubleRepDataConTy :: Type
- floatRepDataConTy :: Type
- addrRepDataConTy :: Type
- word64RepDataConTy :: Type
- word32RepDataConTy :: Type
- word16RepDataConTy :: Type
- word8RepDataConTy :: Type
- wordRepDataConTy :: Type
- int64RepDataConTy :: Type
- int32RepDataConTy :: Type
- int16RepDataConTy :: Type
- int8RepDataConTy :: Type
- intRepDataConTy :: Type
- unliftedRepDataConTy :: Type
- liftedRepDataConTy :: Type
- vec64DataConTy :: Type
- vec32DataConTy :: Type
- vec16DataConTy :: Type
- vec8DataConTy :: Type
- vec4DataConTy :: Type
- vec2DataConTy :: Type
- doubleElemRepDataConTy :: Type
- floatElemRepDataConTy :: Type
- word64ElemRepDataConTy :: Type
- word32ElemRepDataConTy :: Type
- word16ElemRepDataConTy :: Type
- word8ElemRepDataConTy :: Type
- int64ElemRepDataConTy :: Type
- int32ElemRepDataConTy :: Type
- int16ElemRepDataConTy :: Type
- int8ElemRepDataConTy :: Type
- anyTypeOfKind :: Kind -> Type
- unboxedTupleKind :: [Type] -> Kind
- mkPromotedListTy :: Kind -> [Type] -> Type
- tupleTyConName :: TupleSort -> Arity -> Name
- pprPrefixName :: NamedThing a => a -> SDoc
- pprInfixName :: (Outputable a, NamedThing a) => a -> SDoc
- getOccFS :: NamedThing a => a -> FastString
- getOccString :: NamedThing a => a -> String
- getSrcSpan :: NamedThing a => a -> SrcSpan
- getSrcLoc :: NamedThing a => a -> SrcLoc
- nameStableString :: Name -> String
- pprNameDefnLoc :: Name -> SDoc
- pprDefinedAt :: Name -> SDoc
- pprModulePrefix :: PprStyle -> Module -> OccName -> SDoc
- pprNameUnqualified :: Name -> SDoc
- stableNameCmp :: Name -> Name -> Ordering
- localiseName :: Name -> Name
- tidyNameOcc :: Name -> OccName -> Name
- setNameLoc :: Name -> SrcSpan -> Name
- setNameUnique :: Name -> Unique -> Name
- mkFCallName :: Unique -> String -> Name
- mkSysTvName :: Unique -> FastString -> Name
- mkSystemVarName :: Unique -> FastString -> Name
- mkSystemNameAt :: Unique -> OccName -> SrcSpan -> Name
- mkSystemName :: Unique -> OccName -> Name
- mkWiredInName :: Module -> OccName -> Unique -> TyThing -> BuiltInSyntax -> Name
- mkExternalName :: Unique -> Module -> OccName -> SrcSpan -> Name
- mkDerivedInternalName :: (OccName -> OccName) -> Unique -> Name -> Name
- mkClonedInternalName :: Unique -> Name -> Name
- mkInternalName :: Unique -> OccName -> SrcSpan -> Name
- isSystemName :: Name -> Bool
- isVarName :: Name -> Bool
- isValName :: Name -> Bool
- isDataConName :: Name -> Bool
- isTyConName :: Name -> Bool
- isTyVarName :: Name -> Bool
- nameIsFromExternalPackage :: UnitId -> Name -> Bool
- nameIsHomePackageImport :: Module -> Name -> Bool
- nameIsHomePackage :: Module -> Name -> Bool
- nameIsLocalOrFrom :: Module -> Name -> Bool
- nameModule_maybe :: Name -> Maybe Module
- nameModule :: HasDebugCallStack => Name -> Module
- isHoleName :: Name -> Bool
- isInternalName :: Name -> Bool
- isExternalName :: Name -> Bool
- isBuiltInSyntax :: Name -> Bool
- wiredInNameTyThing_maybe :: Name -> Maybe TyThing
- isWiredInName :: Name -> Bool
- nameSrcSpan :: Name -> SrcSpan
- nameSrcLoc :: Name -> SrcLoc
- nameNameSpace :: Name -> NameSpace
- nameOccName :: Name -> OccName
- nameUnique :: Name -> Unique
- data BuiltInSyntax
- class NamedThing a where
- getOccName :: a -> OccName
- getName :: a -> Name
- pprCo :: Coercion -> SDoc
- mkForAllTy :: TyCoVar -> ArgFlag -> Type -> Type
- data Type
- data TyThing
- data Coercion
- data UnivCoProvenance
- data TyCoBinder
- data MCoercion
- type PredType = Type
- type Kind = Type
- type ThetaType = [PredType]
- type CoercionN = Coercion
- data ArgFlag
- data AnonArgFlag
- data Var
- data SimplCount
- data CoreM a
- data CoreToDo
- = CoreDoSimplify Int SimplMode
- | CoreDoPluginPass String CorePluginPass
- | CoreDoFloatInwards
- | CoreDoFloatOutwards FloatOutSwitches
- | CoreLiberateCase
- | CoreDoPrintCore
- | CoreDoStaticArgs
- | CoreDoCallArity
- | CoreDoExitify
- | CoreDoStrictness
- | CoreDoWorkerWrapper
- | CoreDoSpecialising
- | CoreDoSpecConstr
- | CoreCSE
- | CoreDoRuleCheck CompilerPhase String
- | CoreDoNothing
- | CoreDoPasses [CoreToDo]
- | CoreDesugar
- | CoreDesugarOpt
- | CoreTidy
- | CorePrep
- | CoreOccurAnal
- tidyOccName :: TidyOccEnv -> OccName -> (TidyOccEnv, OccName)
- avoidClashesOccEnv :: TidyOccEnv -> [OccName] -> TidyOccEnv
- initTidyOccEnv :: [OccName] -> TidyOccEnv
- emptyTidyOccEnv :: TidyOccEnv
- mkMethodOcc :: OccName -> OccName
- mkDataCOcc :: OccName -> OccSet -> OccName
- mkDataTOcc :: OccName -> OccSet -> OccName
- mkDFunOcc :: String -> Bool -> OccSet -> OccName
- mkInstTyTcOcc :: String -> OccSet -> OccName
- mkLocalOcc :: Unique -> OccName -> OccName
- mkSuperDictSelOcc :: Int -> OccName -> OccName
- mkSuperDictAuxOcc :: Int -> OccName -> OccName
- mkDataConWorkerOcc :: OccName -> OccName
- mkRecFldSelOcc :: String -> OccName
- mkGen1R :: OccName -> OccName
- mkGenR :: OccName -> OccName
- mkTyConRepOcc :: OccName -> OccName
- mkMaxTagOcc :: OccName -> OccName
- mkTag2ConOcc :: OccName -> OccName
- mkCon2TagOcc :: OccName -> OccName
- mkEqPredCoOcc :: OccName -> OccName
- mkInstTyCoOcc :: OccName -> OccName
- mkNewTyCoOcc :: OccName -> OccName
- mkClassDataConOcc :: OccName -> OccName
- mkRepEqOcc :: OccName -> OccName
- mkForeignExportOcc :: OccName -> OccName
- mkSpecOcc :: OccName -> OccName
- mkIPOcc :: OccName -> OccName
- mkDictOcc :: OccName -> OccName
- mkClassOpAuxOcc :: OccName -> OccName
- mkDefaultMethodOcc :: OccName -> OccName
- mkBuilderOcc :: OccName -> OccName
- mkMatcherOcc :: OccName -> OccName
- mkWorkerOcc :: OccName -> OccName
- mkDataConWrapperOcc :: OccName -> OccName
- isTypeableBindOcc :: OccName -> Bool
- isDefaultMethodOcc :: OccName -> Bool
- isDerivedOccName :: OccName -> Bool
- startsWithUnderscore :: OccName -> Bool
- parenSymOcc :: OccName -> SDoc -> SDoc
- isSymOcc :: OccName -> Bool
- isDataSymOcc :: OccName -> Bool
- isDataOcc :: OccName -> Bool
- isValOcc :: OccName -> Bool
- isTcOcc :: OccName -> Bool
- isTvOcc :: OccName -> Bool
- isVarOcc :: OccName -> Bool
- setOccNameSpace :: NameSpace -> OccName -> OccName
- occNameString :: OccName -> String
- filterOccSet :: (OccName -> Bool) -> OccSet -> OccSet
- intersectsOccSet :: OccSet -> OccSet -> Bool
- intersectOccSet :: OccSet -> OccSet -> OccSet
- isEmptyOccSet :: OccSet -> Bool
- elemOccSet :: OccName -> OccSet -> Bool
- minusOccSet :: OccSet -> OccSet -> OccSet
- unionManyOccSets :: [OccSet] -> OccSet
- unionOccSets :: OccSet -> OccSet -> OccSet
- extendOccSetList :: OccSet -> [OccName] -> OccSet
- extendOccSet :: OccSet -> OccName -> OccSet
- mkOccSet :: [OccName] -> OccSet
- unitOccSet :: OccName -> OccSet
- emptyOccSet :: OccSet
- pprOccEnv :: (a -> SDoc) -> OccEnv a -> SDoc
- alterOccEnv :: (Maybe elt -> Maybe elt) -> OccEnv elt -> OccName -> OccEnv elt
- filterOccEnv :: (elt -> Bool) -> OccEnv elt -> OccEnv elt
- delListFromOccEnv :: OccEnv a -> [OccName] -> OccEnv a
- delFromOccEnv :: OccEnv a -> OccName -> OccEnv a
- mkOccEnv_C :: (a -> a -> a) -> [(OccName, a)] -> OccEnv a
- mapOccEnv :: (a -> b) -> OccEnv a -> OccEnv b
- extendOccEnv_Acc :: (a -> b -> b) -> (a -> b) -> OccEnv b -> OccName -> a -> OccEnv b
- extendOccEnv_C :: (a -> a -> a) -> OccEnv a -> OccName -> a -> OccEnv a
- plusOccEnv_C :: (a -> a -> a) -> OccEnv a -> OccEnv a -> OccEnv a
- plusOccEnv :: OccEnv a -> OccEnv a -> OccEnv a
- occEnvElts :: OccEnv a -> [a]
- foldOccEnv :: (a -> b -> b) -> b -> OccEnv a -> b
- elemOccEnv :: OccName -> OccEnv a -> Bool
- mkOccEnv :: [(OccName, a)] -> OccEnv a
- lookupOccEnv :: OccEnv a -> OccName -> Maybe a
- extendOccEnvList :: OccEnv a -> [(OccName, a)] -> OccEnv a
- extendOccEnv :: OccEnv a -> OccName -> a -> OccEnv a
- unitOccEnv :: OccName -> a -> OccEnv a
- emptyOccEnv :: OccEnv a
- nameSpacesRelated :: NameSpace -> NameSpace -> Bool
- demoteOccName :: OccName -> Maybe OccName
- mkClsOccFS :: FastString -> OccName
- mkClsOcc :: String -> OccName
- mkTcOccFS :: FastString -> OccName
- mkTcOcc :: String -> OccName
- mkTyVarOccFS :: FastString -> OccName
- mkTyVarOcc :: String -> OccName
- mkDataOccFS :: FastString -> OccName
- mkDataOcc :: String -> OccName
- mkVarOccFS :: FastString -> OccName
- mkVarOcc :: String -> OccName
- mkOccNameFS :: NameSpace -> FastString -> OccName
- mkOccName :: NameSpace -> String -> OccName
- pprOccName :: OccName -> SDoc
- pprNameSpaceBrief :: NameSpace -> SDoc
- pprNonVarNameSpace :: NameSpace -> SDoc
- pprNameSpace :: NameSpace -> SDoc
- isValNameSpace :: NameSpace -> Bool
- isVarNameSpace :: NameSpace -> Bool
- isTvNameSpace :: NameSpace -> Bool
- isTcClsNameSpace :: NameSpace -> Bool
- isDataConNameSpace :: NameSpace -> Bool
- tvName :: NameSpace
- srcDataName :: NameSpace
- dataName :: NameSpace
- tcClsName :: NameSpace
- clsName :: NameSpace
- tcName :: NameSpace
- data NameSpace
- class HasOccName name where
- data OccEnv a
- type OccSet = UniqSet OccName
- type TidyOccEnv = UniqFM Int
- emptyFilesToClean :: FilesToClean
- isBmi2Enabled :: DynFlags -> Bool
- isBmiEnabled :: DynFlags -> Bool
- isAvx512pfEnabled :: DynFlags -> Bool
- isAvx512fEnabled :: DynFlags -> Bool
- isAvx512erEnabled :: DynFlags -> Bool
- isAvx512cdEnabled :: DynFlags -> Bool
- isAvx2Enabled :: DynFlags -> Bool
- isAvxEnabled :: DynFlags -> Bool
- isSse4_2Enabled :: DynFlags -> Bool
- isSse2Enabled :: DynFlags -> Bool
- isSseEnabled :: DynFlags -> Bool
- setUnsafeGlobalDynFlags :: DynFlags -> IO ()
- makeDynFlagsConsistent :: DynFlags -> (DynFlags, [Located String])
- tARGET_MAX_WORD :: DynFlags -> Integer
- tARGET_MAX_INT :: DynFlags -> Integer
- tARGET_MIN_INT :: DynFlags -> Integer
- mAX_PTR_TAG :: DynFlags -> Int
- tAG_MASK :: DynFlags -> Int
- wordAlignment :: DynFlags -> Alignment
- wORD_SIZE_IN_BITS :: DynFlags -> Int
- bLOCK_SIZE_W :: DynFlags -> Int
- iLDV_STATE_USE :: DynFlags -> Integer
- iLDV_STATE_CREATE :: DynFlags -> Integer
- iLDV_CREATE_MASK :: DynFlags -> Integer
- lDV_SHIFT :: DynFlags -> Int
- dYNAMIC_BY_DEFAULT :: DynFlags -> Bool
- wORDS_BIGENDIAN :: DynFlags -> Bool
- tAG_BITS :: DynFlags -> Int
- bITMAP_BITS_SHIFT :: DynFlags -> Int
- cLONG_LONG_SIZE :: DynFlags -> Int
- cLONG_SIZE :: DynFlags -> Int
- cINT_SIZE :: DynFlags -> Int
- dOUBLE_SIZE :: DynFlags -> Int
- wORD_SIZE :: DynFlags -> Int
- aP_STACK_SPLIM :: DynFlags -> Int
- rESERVED_STACK_WORDS :: DynFlags -> Int
- rESERVED_C_STACK_BYTES :: DynFlags -> Int
- mAX_Real_Long_REG :: DynFlags -> Int
- mAX_Real_XMM_REG :: DynFlags -> Int
- mAX_Real_Double_REG :: DynFlags -> Int
- mAX_Real_Float_REG :: DynFlags -> Int
- mAX_Real_Vanilla_REG :: DynFlags -> Int
- mAX_XMM_REG :: DynFlags -> Int
- mAX_Long_REG :: DynFlags -> Int
- mAX_Double_REG :: DynFlags -> Int
- mAX_Float_REG :: DynFlags -> Int
- mAX_Vanilla_REG :: DynFlags -> Int
- mUT_ARR_PTRS_CARD_BITS :: DynFlags -> Int
- mAX_CHARLIKE :: DynFlags -> Int
- mIN_CHARLIKE :: DynFlags -> Int
- mAX_INTLIKE :: DynFlags -> Int
- mIN_INTLIKE :: DynFlags -> Int
- mIN_PAYLOAD_SIZE :: DynFlags -> Int
- mAX_SPEC_AP_SIZE :: DynFlags -> Int
- mAX_SPEC_SELECTEE_SIZE :: DynFlags -> Int
- oFFSET_StgFunInfoExtraRev_arity :: DynFlags -> Int
- sIZEOF_StgFunInfoExtraRev :: DynFlags -> Int
- oFFSET_StgFunInfoExtraFwd_arity :: DynFlags -> Int
- oFFSET_StgUpdateFrame_updatee :: DynFlags -> Int
- oFFSET_StgStack_stack :: DynFlags -> Int
- oFFSET_StgStack_sp :: DynFlags -> Int
- oFFSET_StgTSO_stackobj :: DynFlags -> Int
- oFFSET_StgTSO_cccs :: DynFlags -> Int
- oFFSET_StgTSO_alloc_limit :: DynFlags -> Int
- oFFSET_StgArrBytes_bytes :: DynFlags -> Int
- sIZEOF_StgArrBytes_NoHdr :: DynFlags -> Int
- oFFSET_StgSmallMutArrPtrs_ptrs :: DynFlags -> Int
- sIZEOF_StgSmallMutArrPtrs_NoHdr :: DynFlags -> Int
- oFFSET_StgMutArrPtrs_size :: DynFlags -> Int
- oFFSET_StgMutArrPtrs_ptrs :: DynFlags -> Int
- sIZEOF_StgMutArrPtrs_NoHdr :: DynFlags -> Int
- sIZEOF_StgUpdateFrame_NoHdr :: DynFlags -> Int
- oFFSET_StgEntCounter_entry_count :: DynFlags -> Int
- oFFSET_StgEntCounter_link :: DynFlags -> Int
- oFFSET_StgEntCounter_registeredp :: DynFlags -> Int
- oFFSET_StgEntCounter_allocd :: DynFlags -> Int
- oFFSET_StgEntCounter_allocs :: DynFlags -> Int
- sIZEOF_StgSMPThunkHeader :: DynFlags -> Int
- oFFSET_StgHeader_ldvw :: DynFlags -> Int
- oFFSET_StgHeader_ccs :: DynFlags -> Int
- oFFSET_CostCentreStack_scc_count :: DynFlags -> Int
- oFFSET_CostCentreStack_mem_alloc :: DynFlags -> Int
- sIZEOF_CostCentreStack :: DynFlags -> Int
- oFFSET_bdescr_flags :: DynFlags -> Int
- oFFSET_bdescr_blocks :: DynFlags -> Int
- oFFSET_bdescr_free :: DynFlags -> Int
- oFFSET_bdescr_start :: DynFlags -> Int
- oFFSET_Capability_r :: DynFlags -> Int
- oFFSET_stgGCFun :: DynFlags -> Int
- oFFSET_stgGCEnter1 :: DynFlags -> Int
- oFFSET_stgEagerBlackholeInfo :: DynFlags -> Int
- oFFSET_StgRegTable_rHpAlloc :: DynFlags -> Int
- oFFSET_StgRegTable_rCurrentNursery :: DynFlags -> Int
- oFFSET_StgRegTable_rCurrentTSO :: DynFlags -> Int
- oFFSET_StgRegTable_rCCCS :: DynFlags -> Int
- oFFSET_StgRegTable_rHpLim :: DynFlags -> Int
- oFFSET_StgRegTable_rHp :: DynFlags -> Int
- oFFSET_StgRegTable_rSpLim :: DynFlags -> Int
- oFFSET_StgRegTable_rSp :: DynFlags -> Int
- oFFSET_StgRegTable_rL1 :: DynFlags -> Int
- oFFSET_StgRegTable_rZMM6 :: DynFlags -> Int
- oFFSET_StgRegTable_rZMM5 :: DynFlags -> Int
- oFFSET_StgRegTable_rZMM4 :: DynFlags -> Int
- oFFSET_StgRegTable_rZMM3 :: DynFlags -> Int
- oFFSET_StgRegTable_rZMM2 :: DynFlags -> Int
- oFFSET_StgRegTable_rZMM1 :: DynFlags -> Int
- oFFSET_StgRegTable_rYMM6 :: DynFlags -> Int
- oFFSET_StgRegTable_rYMM5 :: DynFlags -> Int
- oFFSET_StgRegTable_rYMM4 :: DynFlags -> Int
- oFFSET_StgRegTable_rYMM3 :: DynFlags -> Int
- oFFSET_StgRegTable_rYMM2 :: DynFlags -> Int
- oFFSET_StgRegTable_rYMM1 :: DynFlags -> Int
- oFFSET_StgRegTable_rXMM6 :: DynFlags -> Int
- oFFSET_StgRegTable_rXMM5 :: DynFlags -> Int
- oFFSET_StgRegTable_rXMM4 :: DynFlags -> Int
- oFFSET_StgRegTable_rXMM3 :: DynFlags -> Int
- oFFSET_StgRegTable_rXMM2 :: DynFlags -> Int
- oFFSET_StgRegTable_rXMM1 :: DynFlags -> Int
- oFFSET_StgRegTable_rD6 :: DynFlags -> Int
- oFFSET_StgRegTable_rD5 :: DynFlags -> Int
- oFFSET_StgRegTable_rD4 :: DynFlags -> Int
- oFFSET_StgRegTable_rD3 :: DynFlags -> Int
- oFFSET_StgRegTable_rD2 :: DynFlags -> Int
- oFFSET_StgRegTable_rD1 :: DynFlags -> Int
- oFFSET_StgRegTable_rF6 :: DynFlags -> Int
- oFFSET_StgRegTable_rF5 :: DynFlags -> Int
- oFFSET_StgRegTable_rF4 :: DynFlags -> Int
- oFFSET_StgRegTable_rF3 :: DynFlags -> Int
- oFFSET_StgRegTable_rF2 :: DynFlags -> Int
- oFFSET_StgRegTable_rF1 :: DynFlags -> Int
- oFFSET_StgRegTable_rR10 :: DynFlags -> Int
- oFFSET_StgRegTable_rR9 :: DynFlags -> Int
- oFFSET_StgRegTable_rR8 :: DynFlags -> Int
- oFFSET_StgRegTable_rR7 :: DynFlags -> Int
- oFFSET_StgRegTable_rR6 :: DynFlags -> Int
- oFFSET_StgRegTable_rR5 :: DynFlags -> Int
- oFFSET_StgRegTable_rR4 :: DynFlags -> Int
- oFFSET_StgRegTable_rR3 :: DynFlags -> Int
- oFFSET_StgRegTable_rR2 :: DynFlags -> Int
- oFFSET_StgRegTable_rR1 :: DynFlags -> Int
- tICKY_BIN_COUNT :: DynFlags -> Int
- bLOCKS_PER_MBLOCK :: DynFlags -> Int
- bLOCK_SIZE :: DynFlags -> Int
- pROF_HDR_SIZE :: DynFlags -> Int
- sTD_HDR_SIZE :: DynFlags -> Int
- cONTROL_GROUP_CONST_291 :: DynFlags -> Int
- compilerInfo :: DynFlags -> [(String, String)]
- picPOpts :: DynFlags -> [String]
- picCCOpts :: DynFlags -> [String]
- setTmpDir :: FilePath -> DynFlags -> DynFlags
- setFlagsFromEnvFile :: FilePath -> String -> DynP ()
- canonicalizeModuleIfHome :: DynFlags -> Module -> Module
- canonicalizeHomeModule :: DynFlags -> ModuleName -> Module
- setUnitId :: String -> DynFlags -> DynFlags
- unSetGeneralFlag' :: GeneralFlag -> DynFlags -> DynFlags
- setGeneralFlag' :: GeneralFlag -> DynFlags -> DynFlags
- addWay' :: Way -> DynFlags -> DynFlags
- dynamicGhc :: Bool
- rtsIsProfiled :: Bool
- glasgowExtsFlags :: [Extension]
- warningHierarchies :: [[String]]
- warningGroups :: [(String, [WarningFlag])]
- xFlags :: [FlagSpec Extension]
- supportedLanguagesAndExtensions :: PlatformMini -> [String]
- fLangFlags :: [FlagSpec Extension]
- fFlags :: [FlagSpec GeneralFlag]
- wWarningFlags :: [FlagSpec WarningFlag]
- flagsForCompletion :: Bool -> [String]
- flagsPackage :: [Flag (CmdLineP DynFlags)]
- flagsDynamic :: [Flag (CmdLineP DynFlags)]
- flagsAll :: [Flag (CmdLineP DynFlags)]
- allNonDeprecatedFlags :: [String]
- updateWays :: DynFlags -> DynFlags
- putLogMsg :: DynFlags -> WarnReason -> Severity -> SrcSpan -> PprStyle -> MsgDoc -> IO ()
- parseDynamicFlagsFull :: MonadIO m => [Flag (CmdLineP DynFlags)] -> Bool -> DynFlags -> [Located String] -> m (DynFlags, [Located String], [Warn])
- parseDynamicFilePragma :: MonadIO m => DynFlags -> [Located String] -> m (DynFlags, [Located String], [Warn])
- parseDynamicFlagsCmdLine :: MonadIO m => DynFlags -> [Located String] -> m (DynFlags, [Located String], [Warn])
- updOptLevel :: Int -> DynFlags -> DynFlags
- addPluginModuleName :: String -> DynFlags -> DynFlags
- thisPackage :: DynFlags -> UnitId
- thisUnitIdInsts :: DynFlags -> [(ModuleName, Module)]
- thisComponentId :: DynFlags -> ComponentId
- getVerbFlags :: DynFlags -> [String]
- getOpts :: DynFlags -> (DynFlags -> [a]) -> [a]
- unsafeFlagsForInfer :: [(String, DynFlags -> SrcSpan, DynFlags -> Bool, DynFlags -> DynFlags)]
- unsafeFlags :: [(String, DynFlags -> SrcSpan, DynFlags -> Bool, DynFlags -> DynFlags)]
- safeImplicitImpsReq :: DynFlags -> Bool
- safeDirectImpsReq :: DynFlags -> Bool
- safeImportsOn :: DynFlags -> Bool
- safeInferOn :: DynFlags -> Bool
- safeLanguageOn :: DynFlags -> Bool
- safeHaskellModeEnabled :: DynFlags -> Bool
- safeHaskellOn :: DynFlags -> Bool
- packageTrustOn :: DynFlags -> Bool
- dynFlagDependencies :: DynFlags -> [ModuleName]
- lang_set :: DynFlags -> Maybe Language -> DynFlags
- xopt_set_unlessExplSpec :: Extension -> (DynFlags -> Extension -> DynFlags) -> DynFlags -> DynFlags
- xopt_unset :: DynFlags -> Extension -> DynFlags
- xopt_set :: DynFlags -> Extension -> DynFlags
- xopt :: Extension -> DynFlags -> Bool
- wopt_unset_fatal :: DynFlags -> WarningFlag -> DynFlags
- wopt_set_fatal :: DynFlags -> WarningFlag -> DynFlags
- wopt_fatal :: WarningFlag -> DynFlags -> Bool
- wopt_unset :: DynFlags -> WarningFlag -> DynFlags
- wopt_set :: DynFlags -> WarningFlag -> DynFlags
- wopt :: WarningFlag -> DynFlags -> Bool
- gopt_unset :: DynFlags -> GeneralFlag -> DynFlags
- gopt_set :: DynFlags -> GeneralFlag -> DynFlags
- gopt :: GeneralFlag -> DynFlags -> Bool
- dopt_unset :: DynFlags -> DumpFlag -> DynFlags
- dopt_set :: DynFlags -> DumpFlag -> DynFlags
- dopt :: DumpFlag -> DynFlags -> Bool
- hasNoOptCoercion :: DynFlags -> Bool
- hasNoStateHack :: DynFlags -> Bool
- languageExtensions :: Maybe Language -> [Extension]
- defaultFlushErr :: FlushErr
- defaultFlushOut :: FlushOut
- defaultLogActionHPutStrDoc :: DynFlags -> Handle -> SDoc -> PprStyle -> IO ()
- defaultLogActionHPrintDoc :: DynFlags -> Handle -> SDoc -> PprStyle -> IO ()
- defaultLogAction :: LogAction
- defaultFatalMessager :: FatalMessager
- interpreterDynamic :: DynFlags -> Bool
- interpreterProfiled :: DynFlags -> Bool
- interpWays :: [Way]
- defaultWays :: Settings -> [Way]
- defaultDynFlags :: Settings -> LlvmConfig -> DynFlags
- initDynFlags :: DynFlags -> IO DynFlags
- dynamicOutputFile :: DynFlags -> FilePath -> FilePath
- dynamicTooMkDynamicDynFlags :: DynFlags -> DynFlags
- whenCannotGenerateDynamicToo :: MonadIO m => DynFlags -> m () -> m ()
- ifGeneratingDynamicToo :: MonadIO m => DynFlags -> m a -> m a -> m a
- whenGeneratingDynamicToo :: MonadIO m => DynFlags -> m () -> m ()
- wayUnsetGeneralFlags :: Platform -> Way -> [GeneralFlag]
- wayGeneralFlags :: Platform -> Way -> [GeneralFlag]
- wayRTSOnly :: Way -> Bool
- mkBuildTag :: [Way] -> String
- positionIndependent :: DynFlags -> Bool
- defaultObjectTarget :: DynFlags -> HscTarget
- packageFlagsChanged :: DynFlags -> DynFlags -> Bool
- isNoLink :: GhcLink -> Bool
- isOneShot :: GhcMode -> Bool
- targetRetainsAllBindings :: HscTarget -> Bool
- isObjectTarget :: HscTarget -> Bool
- versionedFilePath :: DynFlags -> FilePath
- versionedAppDir :: DynFlags -> MaybeT IO FilePath
- tablesNextToCode :: DynFlags -> Bool
- opt_i :: DynFlags -> [String]
- opt_lc :: DynFlags -> [String]
- opt_lo :: DynFlags -> [String]
- opt_lcc :: DynFlags -> [String]
- opt_windres :: DynFlags -> [String]
- opt_lm :: DynFlags -> [String]
- opt_l :: DynFlags -> [String]
- opt_a :: DynFlags -> [String]
- opt_cxx :: DynFlags -> [String]
- opt_c :: DynFlags -> [String]
- opt_F :: DynFlags -> [String]
- opt_P_signature :: DynFlags -> ([String], Fingerprint)
- opt_P :: DynFlags -> [String]
- opt_L :: DynFlags -> [String]
- pgm_i :: DynFlags -> String
- pgm_lc :: DynFlags -> (String, [Option])
- pgm_lo :: DynFlags -> (String, [Option])
- pgm_ranlib :: DynFlags -> String
- pgm_ar :: DynFlags -> String
- pgm_lcc :: DynFlags -> (String, [Option])
- pgm_libtool :: DynFlags -> String
- pgm_windres :: DynFlags -> String
- pgm_T :: DynFlags -> String
- pgm_dll :: DynFlags -> (String, [Option])
- pgm_lm :: DynFlags -> (String, [Option])
- pgm_l :: DynFlags -> (String, [Option])
- pgm_a :: DynFlags -> (String, [Option])
- pgm_c :: DynFlags -> String
- pgm_F :: DynFlags -> String
- pgm_P :: DynFlags -> (String, [Option])
- pgm_L :: DynFlags -> String
- systemPackageConfig :: DynFlags -> FilePath
- extraGccViaCFlags :: DynFlags -> [String]
- tmpDir :: DynFlags -> String
- topDir :: DynFlags -> FilePath
- ghciUsagePath :: DynFlags -> FilePath
- ghcUsagePath :: DynFlags -> FilePath
- projectVersion :: DynFlags -> String
- programName :: DynFlags -> String
- settings :: DynFlags -> Settings
- backendMaintainsCfg :: DynFlags -> Bool
- flattenIncludes :: IncludeSpecs -> [String]
- addQuoteInclude :: IncludeSpecs -> [String] -> IncludeSpecs
- addGlobalInclude :: IncludeSpecs -> [String] -> IncludeSpecs
- optimisationFlags :: EnumSet GeneralFlag
- data WarnReason
- = NoReason
- | Reason !WarningFlag
- | ErrReason !(Maybe WarningFlag)
- data IncludeSpecs = IncludeSpecs {
- includePathsQuote :: [String]
- includePathsGlobal :: [String]
- data WarningFlag
- = Opt_WarnDuplicateExports
- | Opt_WarnDuplicateConstraints
- | Opt_WarnRedundantConstraints
- | Opt_WarnHiShadows
- | Opt_WarnImplicitPrelude
- | Opt_WarnIncompletePatterns
- | Opt_WarnIncompleteUniPatterns
- | Opt_WarnIncompletePatternsRecUpd
- | Opt_WarnOverflowedLiterals
- | Opt_WarnEmptyEnumerations
- | Opt_WarnMissingFields
- | Opt_WarnMissingImportList
- | Opt_WarnMissingMethods
- | Opt_WarnMissingSignatures
- | Opt_WarnMissingLocalSignatures
- | Opt_WarnNameShadowing
- | Opt_WarnOverlappingPatterns
- | Opt_WarnTypeDefaults
- | Opt_WarnMonomorphism
- | Opt_WarnUnusedTopBinds
- | Opt_WarnUnusedLocalBinds
- | Opt_WarnUnusedPatternBinds
- | Opt_WarnUnusedImports
- | Opt_WarnUnusedMatches
- | Opt_WarnUnusedTypePatterns
- | Opt_WarnUnusedForalls
- | Opt_WarnUnusedRecordWildcards
- | Opt_WarnRedundantRecordWildcards
- | Opt_WarnWarningsDeprecations
- | Opt_WarnDeprecatedFlags
- | Opt_WarnMissingMonadFailInstances
- | Opt_WarnSemigroup
- | Opt_WarnDodgyExports
- | Opt_WarnDodgyImports
- | Opt_WarnOrphans
- | Opt_WarnAutoOrphans
- | Opt_WarnIdentities
- | Opt_WarnTabs
- | Opt_WarnUnrecognisedPragmas
- | Opt_WarnDodgyForeignImports
- | Opt_WarnUnusedDoBind
- | Opt_WarnWrongDoBind
- | Opt_WarnAlternativeLayoutRuleTransitional
- | Opt_WarnUnsafe
- | Opt_WarnSafe
- | Opt_WarnTrustworthySafe
- | Opt_WarnMissedSpecs
- | Opt_WarnAllMissedSpecs
- | Opt_WarnUnsupportedCallingConventions
- | Opt_WarnUnsupportedLlvmVersion
- | Opt_WarnMissedExtraSharedLib
- | Opt_WarnInlineRuleShadowing
- | Opt_WarnTypedHoles
- | Opt_WarnPartialTypeSignatures
- | Opt_WarnMissingExportedSignatures
- | Opt_WarnUntickedPromotedConstructors
- | Opt_WarnDerivingTypeable
- | Opt_WarnDeferredTypeErrors
- | Opt_WarnDeferredOutOfScopeVariables
- | Opt_WarnNonCanonicalMonadInstances
- | Opt_WarnNonCanonicalMonadFailInstances
- | Opt_WarnNonCanonicalMonoidInstances
- | Opt_WarnMissingPatternSynonymSignatures
- | Opt_WarnUnrecognisedWarningFlags
- | Opt_WarnSimplifiableClassConstraints
- | Opt_WarnCPPUndef
- | Opt_WarnUnbangedStrictPatterns
- | Opt_WarnMissingHomeModules
- | Opt_WarnPartialFields
- | Opt_WarnMissingExportList
- | Opt_WarnInaccessibleCode
- | Opt_WarnStarIsType
- | Opt_WarnStarBinder
- | Opt_WarnImplicitKindVars
- | Opt_WarnSpaceAfterBang
- | Opt_WarnMissingDerivingStrategies
- | Opt_WarnPrepositiveQualifiedModule
- | Opt_WarnUnusedPackages
- | Opt_WarnInferredSafeImports
- | Opt_WarnMissingSafeHaskellMode
- | Opt_WarnCompatUnqualifiedImports
- | Opt_WarnDerivingDefaults
- data Language
- data SafeHaskellMode
- data CfgWeights = CFGWeights {}
- class HasDynFlags (m :: Type -> Type) where
- getDynFlags :: m DynFlags
- class ContainsDynFlags t where
- extractDynFlags :: t -> DynFlags
- data ProfAuto
- data LlvmTarget = LlvmTarget {
- lDataLayout :: String
- lCPU :: String
- lAttributes :: [String]
- data LlvmConfig = LlvmConfig {
- llvmTargets :: [(String, LlvmTarget)]
- llvmPasses :: [(Int, String)]
- data HscTarget
- data GhcMode
- data GhcLink
- data PackageArg
- data ModRenaming = ModRenaming {}
- newtype IgnorePackageFlag = IgnorePackage String
- data TrustFlag
- data PackageFlag
- data PackageDBFlag
- data DynLibLoader
- data RtsOptsEnabled
- data Way
- type FatalMessager = String -> IO ()
- type LogAction = DynFlags -> WarnReason -> Severity -> SrcSpan -> PprStyle -> MsgDoc -> IO ()
- newtype FlushOut = FlushOut (IO ())
- newtype FlushErr = FlushErr (IO ())
- data FlagSpec flag = FlagSpec {
- flagSpecName :: String
- flagSpecFlag :: flag
- flagSpecAction :: TurnOnFlag -> DynP ()
- flagSpecGhcMode :: GhcFlagMode
- data PkgConfRef
- data LinkerInfo
- data CompilerInfo
- = GCC
- | Clang
- | AppleClang
- | AppleClang51
- | UnknownCC
- data FilesToClean = FilesToClean {
- ftcGhcSession :: !(Set FilePath)
- ftcCurrentModule :: !(Set FilePath)
- isHsigFile :: HscSource -> Bool
- isHsBootOrSig :: HscSource -> Bool
- hscSourceString :: HscSource -> String
- data HscSource
- definitePackageConfigId :: PackageConfig -> Maybe DefUnitId
- expandedPackageConfigId :: PackageConfig -> UnitId
- packageConfigId :: PackageConfig -> UnitId
- installedPackageConfigId :: PackageConfig -> InstalledUnitId
- pprPackageConfig :: PackageConfig -> SDoc
- packageNameString :: PackageConfig -> String
- sourcePackageIdString :: PackageConfig -> String
- defaultPackageConfig :: PackageConfig
- type PackageConfig = InstalledPackageInfo ComponentId SourcePackageId PackageName InstalledUnitId UnitId ModuleName Module
- newtype SourcePackageId = SourcePackageId FastString
- newtype PackageName = PackageName FastString
- unitModuleSet :: Module -> ModuleSet
- unionModuleSet :: ModuleSet -> ModuleSet -> ModuleSet
- delModuleSet :: ModuleSet -> Module -> ModuleSet
- minusModuleSet :: ModuleSet -> ModuleSet -> ModuleSet
- intersectModuleSet :: ModuleSet -> ModuleSet -> ModuleSet
- elemModuleSet :: Module -> ModuleSet -> Bool
- moduleSetElts :: ModuleSet -> [Module]
- emptyModuleSet :: ModuleSet
- extendModuleSetList :: ModuleSet -> [Module] -> ModuleSet
- extendModuleSet :: ModuleSet -> Module -> ModuleSet
- mkModuleSet :: [Module] -> ModuleSet
- isEmptyModuleEnv :: ModuleEnv a -> Bool
- unitModuleEnv :: Module -> a -> ModuleEnv a
- moduleEnvToList :: ModuleEnv a -> [(Module, a)]
- moduleEnvElts :: ModuleEnv a -> [a]
- moduleEnvKeys :: ModuleEnv a -> [Module]
- emptyModuleEnv :: ModuleEnv a
- mkModuleEnv :: [(Module, a)] -> ModuleEnv a
- mapModuleEnv :: (a -> b) -> ModuleEnv a -> ModuleEnv b
- lookupWithDefaultModuleEnv :: ModuleEnv a -> a -> Module -> a
- lookupModuleEnv :: ModuleEnv a -> Module -> Maybe a
- plusModuleEnv :: ModuleEnv a -> ModuleEnv a -> ModuleEnv a
- delModuleEnv :: ModuleEnv a -> Module -> ModuleEnv a
- delModuleEnvList :: ModuleEnv a -> [Module] -> ModuleEnv a
- plusModuleEnv_C :: (a -> a -> a) -> ModuleEnv a -> ModuleEnv a -> ModuleEnv a
- extendModuleEnvList_C :: (a -> a -> a) -> ModuleEnv a -> [(Module, a)] -> ModuleEnv a
- extendModuleEnvList :: ModuleEnv a -> [(Module, a)] -> ModuleEnv a
- extendModuleEnvWith :: (a -> a -> a) -> ModuleEnv a -> Module -> a -> ModuleEnv a
- extendModuleEnv :: ModuleEnv a -> Module -> a -> ModuleEnv a
- elemModuleEnv :: Module -> ModuleEnv a -> Bool
- filterModuleEnv :: (Module -> a -> Bool) -> ModuleEnv a -> ModuleEnv a
- wiredInUnitIds :: [UnitId]
- isHoleModule :: Module -> Bool
- isInteractiveModule :: Module -> Bool
- mainUnitId :: UnitId
- interactiveUnitId :: UnitId
- thisGhcUnitId :: UnitId
- thUnitId :: UnitId
- rtsUnitId :: UnitId
- baseUnitId :: UnitId
- integerUnitId :: UnitId
- primUnitId :: UnitId
- parseModSubst :: ReadP [(ModuleName, Module)]
- parseModuleId :: ReadP Module
- parseComponentId :: ReadP ComponentId
- parseUnitId :: ReadP UnitId
- parseModuleName :: ReadP ModuleName
- generalizeIndefModule :: IndefModule -> IndefModule
- generalizeIndefUnitId :: IndefUnitId -> IndefUnitId
- splitUnitIdInsts :: UnitId -> (InstalledUnitId, Maybe IndefUnitId)
- splitModuleInsts :: Module -> (InstalledModule, Maybe IndefModule)
- renameHoleUnitId' :: PackageConfigMap -> ShHoleSubst -> UnitId -> UnitId
- renameHoleModule' :: PackageConfigMap -> ShHoleSubst -> Module -> Module
- renameHoleUnitId :: DynFlags -> ShHoleSubst -> UnitId -> UnitId
- renameHoleModule :: DynFlags -> ShHoleSubst -> Module -> Module
- stringToUnitId :: String -> UnitId
- fsToUnitId :: FastString -> UnitId
- newSimpleUnitId :: ComponentId -> UnitId
- stableUnitIdCmp :: UnitId -> UnitId -> Ordering
- newUnitId :: ComponentId -> [(ModuleName, Module)] -> UnitId
- hashUnitId :: ComponentId -> [(ModuleName, Module)] -> FastString
- unitIdIsDefinite :: UnitId -> Bool
- unitIdFreeHoles :: UnitId -> UniqDSet ModuleName
- delInstalledModuleEnv :: InstalledModuleEnv a -> InstalledModule -> InstalledModuleEnv a
- filterInstalledModuleEnv :: (InstalledModule -> a -> Bool) -> InstalledModuleEnv a -> InstalledModuleEnv a
- extendInstalledModuleEnv :: InstalledModuleEnv a -> InstalledModule -> a -> InstalledModuleEnv a
- lookupInstalledModuleEnv :: InstalledModuleEnv a -> InstalledModule -> Maybe a
- emptyInstalledModuleEnv :: InstalledModuleEnv a
- installedUnitIdEq :: InstalledUnitId -> UnitId -> Bool
- installedModuleEq :: InstalledModule -> Module -> Bool
- stringToInstalledUnitId :: String -> InstalledUnitId
- componentIdToInstalledUnitId :: ComponentId -> InstalledUnitId
- fsToInstalledUnitId :: FastString -> InstalledUnitId
- installedUnitIdString :: InstalledUnitId -> String
- toInstalledUnitId :: UnitId -> InstalledUnitId
- indefModuleToModule :: DynFlags -> IndefModule -> Module
- indefUnitIdToUnitId :: DynFlags -> IndefUnitId -> UnitId
- newIndefUnitId :: ComponentId -> [(ModuleName, Module)] -> IndefUnitId
- unitIdKey :: UnitId -> Unique
- unitIdFS :: UnitId -> FastString
- pprModule :: Module -> SDoc
- mkModule :: UnitId -> ModuleName -> Module
- stableModuleCmp :: Module -> Module -> Ordering
- mkHoleModule :: ModuleName -> Module
- moduleIsDefinite :: Module -> Bool
- moduleFreeHoles :: Module -> UniqDSet ModuleName
- moduleNameColons :: ModuleName -> String
- moduleNameSlashes :: ModuleName -> String
- mkModuleNameFS :: FastString -> ModuleName
- mkModuleName :: String -> ModuleName
- moduleStableString :: Module -> String
- moduleNameString :: ModuleName -> String
- moduleNameFS :: ModuleName -> FastString
- pprModuleName :: ModuleName -> SDoc
- stableModuleNameCmp :: ModuleName -> ModuleName -> Ordering
- addBootSuffixLocnOut :: ModLocation -> ModLocation
- addBootSuffixLocn :: ModLocation -> ModLocation
- addBootSuffix_maybe :: Bool -> FilePath -> FilePath
- addBootSuffix :: FilePath -> FilePath
- data ModLocation = ModLocation {}
- class ContainsModule t where
- extractModule :: t -> Module
- class HasModule (m :: Type -> Type) where
- data IndefUnitId = IndefUnitId {}
- data IndefModule = IndefModule {}
- data InstalledModule = InstalledModule {}
- newtype DefUnitId = DefUnitId {}
- data InstalledModuleEnv elt
- type ShHoleSubst = ModuleNameEnv Module
- data ModuleEnv elt
- type ModuleSet = Set NDModule
- type ModuleNameEnv elt = UniqFM elt
- type DModuleNameEnv elt = UniqDFM elt
- mkFsEnv :: [(FastString, a)] -> FastStringEnv a
- lookupFsEnv :: FastStringEnv a -> FastString -> Maybe a
- extendFsEnv :: FastStringEnv a -> FastString -> a -> FastStringEnv a
- emptyFsEnv :: FastStringEnv a
- type FastStringEnv a = UniqFM a
- pprUniqSet :: (a -> SDoc) -> UniqSet a -> SDoc
- unsafeUFMToUniqSet :: UniqFM a -> UniqSet a
- getUniqSet :: UniqSet a -> UniqFM a
- mapUniqSet :: Uniquable b => (a -> b) -> UniqSet a -> UniqSet b
- nonDetFoldUniqSet_Directly :: (Unique -> elt -> a -> a) -> a -> UniqSet elt -> a
- nonDetFoldUniqSet :: (elt -> a -> a) -> a -> UniqSet elt -> a
- nonDetKeysUniqSet :: UniqSet elt -> [Unique]
- nonDetEltsUniqSet :: UniqSet elt -> [elt]
- lookupUniqSet_Directly :: UniqSet a -> Unique -> Maybe a
- lookupUniqSet :: Uniquable a => UniqSet b -> a -> Maybe b
- isEmptyUniqSet :: UniqSet a -> Bool
- sizeUniqSet :: UniqSet a -> Int
- uniqSetAll :: (a -> Bool) -> UniqSet a -> Bool
- uniqSetAny :: (a -> Bool) -> UniqSet a -> Bool
- partitionUniqSet :: (a -> Bool) -> UniqSet a -> (UniqSet a, UniqSet a)
- filterUniqSet_Directly :: (Unique -> elt -> Bool) -> UniqSet elt -> UniqSet elt
- filterUniqSet :: (a -> Bool) -> UniqSet a -> UniqSet a
- elemUniqSet_Directly :: Unique -> UniqSet a -> Bool
- elementOfUniqSet :: Uniquable a => a -> UniqSet a -> Bool
- uniqSetMinusUFM :: UniqSet a -> UniqFM b -> UniqSet a
- restrictUniqSetToUFM :: UniqSet a -> UniqFM b -> UniqSet a
- intersectUniqSets :: UniqSet a -> UniqSet a -> UniqSet a
- minusUniqSet :: UniqSet a -> UniqSet a -> UniqSet a
- unionManyUniqSets :: [UniqSet a] -> UniqSet a
- unionUniqSets :: UniqSet a -> UniqSet a -> UniqSet a
- delListFromUniqSet_Directly :: UniqSet a -> [Unique] -> UniqSet a
- delListFromUniqSet :: Uniquable a => UniqSet a -> [a] -> UniqSet a
- delOneFromUniqSet_Directly :: UniqSet a -> Unique -> UniqSet a
- delOneFromUniqSet :: Uniquable a => UniqSet a -> a -> UniqSet a
- addListToUniqSet :: Uniquable a => UniqSet a -> [a] -> UniqSet a
- addOneToUniqSet :: Uniquable a => UniqSet a -> a -> UniqSet a
- mkUniqSet :: Uniquable a => [a] -> UniqSet a
- unitUniqSet :: Uniquable a => a -> UniqSet a
- emptyUniqSet :: UniqSet a
- data UniqSet a
- pluralUFM :: UniqFM a -> SDoc
- pprUFMWithKeys :: UniqFM a -> ([(Unique, a)] -> SDoc) -> SDoc
- pprUFM :: UniqFM a -> ([a] -> SDoc) -> SDoc
- pprUniqFM :: (a -> SDoc) -> UniqFM a -> SDoc
- equalKeysUFM :: UniqFM a -> UniqFM b -> Bool
- ufmToIntMap :: UniqFM elt -> IntMap elt
- nonDetUFMToList :: UniqFM elt -> [(Unique, elt)]
- nonDetFoldUFM_Directly :: (Unique -> elt -> a -> a) -> a -> UniqFM elt -> a
- nonDetFoldUFM :: (elt -> a -> a) -> a -> UniqFM elt -> a
- nonDetKeysUFM :: UniqFM elt -> [Unique]
- nonDetEltsUFM :: UniqFM elt -> [elt]
- seqEltsUFM :: ([elt] -> ()) -> UniqFM elt -> ()
- allUFM :: (elt -> Bool) -> UniqFM elt -> Bool
- anyUFM :: (elt -> Bool) -> UniqFM elt -> Bool
- ufmToSet_Directly :: UniqFM elt -> IntSet
- eltsUFM :: UniqFM elt -> [elt]
- lookupWithDefaultUFM_Directly :: UniqFM elt -> elt -> Unique -> elt
- lookupWithDefaultUFM :: Uniquable key => UniqFM elt -> elt -> key -> elt
- lookupUFM_Directly :: UniqFM elt -> Unique -> Maybe elt
- lookupUFM :: Uniquable key => UniqFM elt -> key -> Maybe elt
- elemUFM_Directly :: Unique -> UniqFM elt -> Bool
- elemUFM :: Uniquable key => key -> UniqFM elt -> Bool
- sizeUFM :: UniqFM elt -> Int
- partitionUFM :: (elt -> Bool) -> UniqFM elt -> (UniqFM elt, UniqFM elt)
- filterUFM_Directly :: (Unique -> elt -> Bool) -> UniqFM elt -> UniqFM elt
- filterUFM :: (elt -> Bool) -> UniqFM elt -> UniqFM elt
- mapUFM_Directly :: (Unique -> elt1 -> elt2) -> UniqFM elt1 -> UniqFM elt2
- mapUFM :: (elt1 -> elt2) -> UniqFM elt1 -> UniqFM elt2
- foldUFM :: (elt -> a -> a) -> a -> UniqFM elt -> a
- disjointUFM :: UniqFM elt1 -> UniqFM elt2 -> Bool
- intersectUFM_C :: (elt1 -> elt2 -> elt3) -> UniqFM elt1 -> UniqFM elt2 -> UniqFM elt3
- intersectUFM :: UniqFM elt1 -> UniqFM elt2 -> UniqFM elt1
- minusUFM :: UniqFM elt1 -> UniqFM elt2 -> UniqFM elt1
- plusUFMList :: [UniqFM elt] -> UniqFM elt
- plusMaybeUFM_C :: (elt -> elt -> Maybe elt) -> UniqFM elt -> UniqFM elt -> UniqFM elt
- plusUFM_CD :: (elt -> elt -> elt) -> UniqFM elt -> elt -> UniqFM elt -> elt -> UniqFM elt
- plusUFM_C :: (elt -> elt -> elt) -> UniqFM elt -> UniqFM elt -> UniqFM elt
- plusUFM :: UniqFM elt -> UniqFM elt -> UniqFM elt
- delFromUFM_Directly :: UniqFM elt -> Unique -> UniqFM elt
- delListFromUFM_Directly :: UniqFM elt -> [Unique] -> UniqFM elt
- delListFromUFM :: Uniquable key => UniqFM elt -> [key] -> UniqFM elt
- delFromUFM :: Uniquable key => UniqFM elt -> key -> UniqFM elt
- adjustUFM_Directly :: (elt -> elt) -> UniqFM elt -> Unique -> UniqFM elt
- adjustUFM :: Uniquable key => (elt -> elt) -> UniqFM elt -> key -> UniqFM elt
- addListToUFM_C :: Uniquable key => (elt -> elt -> elt) -> UniqFM elt -> [(key, elt)] -> UniqFM elt
- alterUFM :: Uniquable key => (Maybe elt -> Maybe elt) -> UniqFM elt -> key -> UniqFM elt
- addToUFM_Acc :: Uniquable key => (elt -> elts -> elts) -> (elt -> elts) -> UniqFM elts -> key -> elt -> UniqFM elts
- addToUFM_C :: Uniquable key => (elt -> elt -> elt) -> UniqFM elt -> key -> elt -> UniqFM elt
- addToUFM_Directly :: UniqFM elt -> Unique -> elt -> UniqFM elt
- addListToUFM_Directly :: UniqFM elt -> [(Unique, elt)] -> UniqFM elt
- addListToUFM :: Uniquable key => UniqFM elt -> [(key, elt)] -> UniqFM elt
- addToUFM :: Uniquable key => UniqFM elt -> key -> elt -> UniqFM elt
- listToUFM_C :: Uniquable key => (elt -> elt -> elt) -> [(key, elt)] -> UniqFM elt
- listToUFM_Directly :: [(Unique, elt)] -> UniqFM elt
- listToUFM :: Uniquable key => [(key, elt)] -> UniqFM elt
- unitDirectlyUFM :: Unique -> elt -> UniqFM elt
- unitUFM :: Uniquable key => key -> elt -> UniqFM elt
- isNullUFM :: UniqFM elt -> Bool
- emptyUFM :: UniqFM elt
- data UniqFM ele
- newtype NonDetUniqFM ele = NonDetUniqFM {}
- initUs_ :: UniqSupply -> UniqSM a -> a
- initUs :: UniqSupply -> UniqSM a -> (a, UniqSupply)
- takeUniqFromSupply :: UniqSupply -> (Unique, UniqSupply)
- uniqsFromSupply :: UniqSupply -> [Unique]
- uniqFromSupply :: UniqSupply -> Unique
- listSplitUniqSupply :: UniqSupply -> [UniqSupply]
- splitUniqSupply :: UniqSupply -> (UniqSupply, UniqSupply)
- mkSplitUniqSupply :: Char -> IO UniqSupply
- uniqFromMask :: Char -> IO Unique
- initUniqSupply :: Int -> Int -> IO ()
- data UniqSupply
- data UniqSM result
- class Monad m => MonadUnique (m :: Type -> Type) where
- getUniqueSupplyM :: m UniqSupply
- getUniqueM :: m Unique
- getUniquesM :: m [Unique]
- data Unique
- class Uniquable a where
- isKindLevel :: TypeOrKind -> Bool
- isTypeLevel :: TypeOrKind -> Bool
- mkIntWithInf :: Int -> IntWithInf
- treatZeroAsInf :: Int -> IntWithInf
- intGtLimit :: Int -> IntWithInf -> Bool
- infinity :: IntWithInf
- integralFractionalLit :: Bool -> Integer -> FractionalLit
- negateFractionalLit :: FractionalLit -> FractionalLit
- mkFractionalLit :: Real a => a -> FractionalLit
- negateIntegralLit :: IntegralLit -> IntegralLit
- mkIntegralLit :: Integral a => a -> IntegralLit
- isEarlyActive :: Activation -> Bool
- isAlwaysActive :: Activation -> Bool
- isNeverActive :: Activation -> Bool
- competesWith :: Activation -> Activation -> Bool
- isActiveIn :: PhaseNum -> Activation -> Bool
- isActive :: CompilerPhase -> Activation -> Bool
- pprInlineDebug :: InlinePragma -> SDoc
- pprInline :: InlinePragma -> SDoc
- setInlinePragmaRuleMatchInfo :: InlinePragma -> RuleMatchInfo -> InlinePragma
- setInlinePragmaActivation :: InlinePragma -> Activation -> InlinePragma
- inlinePragmaRuleMatchInfo :: InlinePragma -> RuleMatchInfo
- inlinePragmaActivation :: InlinePragma -> Activation
- inlinePragmaSat :: InlinePragma -> Maybe Arity
- isAnyInlinePragma :: InlinePragma -> Bool
- isInlinablePragma :: InlinePragma -> Bool
- isInlinePragma :: InlinePragma -> Bool
- isDefaultInlinePragma :: InlinePragma -> Bool
- dfunInlinePragma :: InlinePragma
- inlinePragmaSpec :: InlinePragma -> InlineSpec
- neverInlinePragma :: InlinePragma
- alwaysInlinePragma :: InlinePragma
- defaultInlinePragma :: InlinePragma
- noUserInlineSpec :: InlineSpec -> Bool
- isFunLike :: RuleMatchInfo -> Bool
- isConLike :: RuleMatchInfo -> Bool
- activeDuringFinal :: Activation
- activeAfterInitial :: Activation
- pprWithSourceText :: SourceText -> SDoc -> SDoc
- failed :: SuccessFlag -> Bool
- succeeded :: SuccessFlag -> Bool
- successIf :: Bool -> SuccessFlag
- zapFragileOcc :: OccInfo -> OccInfo
- isOneOcc :: OccInfo -> Bool
- isDeadOcc :: OccInfo -> Bool
- isStrongLoopBreaker :: OccInfo -> Bool
- isWeakLoopBreaker :: OccInfo -> Bool
- weakLoopBreaker :: OccInfo
- strongLoopBreaker :: OccInfo
- isAlwaysTailCalled :: OccInfo -> Bool
- zapOccTailCallInfo :: OccInfo -> OccInfo
- tailCallInfo :: OccInfo -> TailCallInfo
- notOneBranch :: OneBranch
- oneBranch :: OneBranch
- notInsideLam :: InsideLam
- insideLam :: InsideLam
- seqOccInfo :: OccInfo -> ()
- isManyOccs :: OccInfo -> Bool
- noOccInfo :: OccInfo
- pprAlternative :: (a -> SDoc) -> a -> ConTag -> Arity -> SDoc
- sumParens :: SDoc -> SDoc
- tupleParens :: TupleSort -> SDoc -> SDoc
- boxityTupleSort :: Boxity -> TupleSort
- tupleSortBoxity :: TupleSort -> Boxity
- maybeParen :: PprPrec -> PprPrec -> SDoc -> SDoc
- appPrec :: PprPrec
- opPrec :: PprPrec
- funPrec :: PprPrec
- sigPrec :: PprPrec
- topPrec :: PprPrec
- hasOverlappingFlag :: OverlapMode -> Bool
- hasOverlappableFlag :: OverlapMode -> Bool
- hasIncoherentFlag :: OverlapMode -> Bool
- setOverlapModeMaybe :: OverlapFlag -> Maybe OverlapMode -> OverlapFlag
- isGenerated :: Origin -> Bool
- boolToRecFlag :: Bool -> RecFlag
- isNonRec :: RecFlag -> Bool
- isRec :: RecFlag -> Bool
- isBoxed :: Boxity -> Bool
- isTopLevel :: TopLevelFlag -> Bool
- isNotTopLevel :: TopLevelFlag -> Bool
- compareFixity :: Fixity -> Fixity -> (Bool, Bool)
- funTyFixity :: Fixity
- negateFixity :: Fixity
- defaultFixity :: Fixity
- minPrecedence :: Int
- maxPrecedence :: Int
- pprRuleName :: RuleName -> SDoc
- pprWarningTxtForMsg :: WarningTxt -> SDoc
- initialVersion :: Version
- bumpVersion :: Version -> Version
- isPromoted :: PromotionFlag -> Bool
- unSwap :: SwapFlag -> (a -> a -> b) -> a -> a -> b
- isSwapped :: SwapFlag -> Bool
- flipSwap :: SwapFlag -> SwapFlag
- bestOneShot :: OneShotInfo -> OneShotInfo -> OneShotInfo
- worstOneShot :: OneShotInfo -> OneShotInfo -> OneShotInfo
- hasNoOneShotInfo :: OneShotInfo -> Bool
- isOneShotInfo :: OneShotInfo -> Bool
- noOneShotInfo :: OneShotInfo
- alignmentOf :: Int -> Alignment
- mkAlignment :: Int -> Alignment
- fIRST_TAG :: ConTag
- pickLR :: LeftOrRight -> (a, a) -> a
- data LeftOrRight
- type Arity = Int
- type RepArity = Int
- type JoinArity = Int
- type ConTag = Int
- type ConTagZ = Int
- data Alignment
- data OneShotInfo
- data SwapFlag
- data PromotionFlag
- data FunctionOrData
- = IsFunction
- | IsData
- data StringLiteral = StringLiteral {
- sl_st :: SourceText
- sl_fs :: FastString
- data WarningTxt
- type RuleName = FastString
- data Fixity = Fixity SourceText Int FixityDirection
- data FixityDirection
- data LexicalFixity
- data TopLevelFlag
- data Boxity
- data RecFlag
- data Origin
- data OverlapFlag = OverlapFlag {}
- data OverlapMode
- newtype PprPrec = PprPrec Int
- data TupleSort
- data EP a = EP {}
- data OccInfo
- = ManyOccs {
- occ_tail :: !TailCallInfo
- | IAmDead
- | OneOcc { }
- | IAmALoopBreaker {
- occ_rules_only :: !RulesOnly
- occ_tail :: !TailCallInfo
- = ManyOccs {
- type InterestingCxt = Bool
- type InsideLam = Bool
- type OneBranch = Bool
- data TailCallInfo
- data DefMethSpec ty
- data SuccessFlag
- data SourceText
- type PhaseNum = Int
- data CompilerPhase
- data Activation
- data RuleMatchInfo
- data InlinePragma = InlinePragma {}
- data InlineSpec
- data IntegralLit = IL {}
- data FractionalLit = FL {}
- data IntWithInf
- data SpliceExplicitFlag
- data TypeOrKind
- vanillaIdInfo :: IdInfo
- coVarDetails :: IdDetails
- isCoVarDetails :: IdDetails -> Bool
- pprIdDetails :: IdDetails -> SDoc
- data IdInfo
- data IdDetails
- unRealSrcSpan :: RealLocated a -> a
- getRealSrcSpan :: RealLocated a -> RealSrcSpan
- liftL :: (HasSrcSpan a, HasSrcSpan b, Monad m) => (SrcSpanLess a -> m (SrcSpanLess b)) -> a -> m b
- onHasSrcSpan :: (HasSrcSpan a, HasSrcSpan b) => (SrcSpanLess a -> SrcSpanLess b) -> a -> b
- cL :: HasSrcSpan a => SrcSpan -> SrcSpanLess a -> a
- dL :: HasSrcSpan a => a -> Located (SrcSpanLess a)
- isSubspanOf :: SrcSpan -> SrcSpan -> Bool
- spans :: SrcSpan -> (Int, Int) -> Bool
- leftmost_largest :: SrcSpan -> SrcSpan -> Ordering
- leftmost_smallest :: SrcSpan -> SrcSpan -> Ordering
- rightmost :: SrcSpan -> SrcSpan -> Ordering
- cmpLocated :: (HasSrcSpan a, Ord (SrcSpanLess a)) => a -> a -> Ordering
- eqLocated :: (HasSrcSpan a, Eq (SrcSpanLess a)) => a -> a -> Bool
- addCLoc :: (HasSrcSpan a, HasSrcSpan b, HasSrcSpan c) => a -> b -> SrcSpanLess c -> c
- combineLocs :: (HasSrcSpan a, HasSrcSpan b) => a -> b -> SrcSpan
- mkGeneralLocated :: HasSrcSpan e => String -> SrcSpanLess e -> e
- noLoc :: HasSrcSpan a => SrcSpanLess a -> a
- getLoc :: HasSrcSpan a => a -> SrcSpan
- unLoc :: HasSrcSpan a => a -> SrcSpanLess a
- mapLoc :: (a -> b) -> GenLocated l a -> GenLocated l b
- pprUserRealSpan :: Bool -> RealSrcSpan -> SDoc
- srcSpanFileName_maybe :: SrcSpan -> Maybe FastString
- realSrcSpanEnd :: RealSrcSpan -> RealSrcLoc
- realSrcSpanStart :: RealSrcSpan -> RealSrcLoc
- srcSpanEnd :: SrcSpan -> SrcLoc
- srcSpanStart :: SrcSpan -> SrcLoc
- srcSpanEndCol :: RealSrcSpan -> Int
- srcSpanStartCol :: RealSrcSpan -> Int
- srcSpanEndLine :: RealSrcSpan -> Int
- srcSpanStartLine :: RealSrcSpan -> Int
- containsSpan :: RealSrcSpan -> RealSrcSpan -> Bool
- isOneLineSpan :: SrcSpan -> Bool
- isGoodSrcSpan :: SrcSpan -> Bool
- srcSpanFirstCharacter :: SrcSpan -> SrcSpan
- combineSrcSpans :: SrcSpan -> SrcSpan -> SrcSpan
- mkSrcSpan :: SrcLoc -> SrcLoc -> SrcSpan
- mkRealSrcSpan :: RealSrcLoc -> RealSrcLoc -> RealSrcSpan
- realSrcLocSpan :: RealSrcLoc -> RealSrcSpan
- srcLocSpan :: SrcLoc -> SrcSpan
- mkGeneralSrcSpan :: FastString -> SrcSpan
- interactiveSrcSpan :: SrcSpan
- wiredInSrcSpan :: SrcSpan
- noSrcSpan :: SrcSpan
- sortLocated :: HasSrcSpan a => [a] -> [a]
- advanceSrcLoc :: RealSrcLoc -> Char -> RealSrcLoc
- srcLocCol :: RealSrcLoc -> Int
- srcLocLine :: RealSrcLoc -> Int
- srcLocFile :: RealSrcLoc -> FastString
- mkGeneralSrcLoc :: FastString -> SrcLoc
- interactiveSrcLoc :: SrcLoc
- generatedSrcLoc :: SrcLoc
- noSrcLoc :: SrcLoc
- mkRealSrcLoc :: FastString -> Int -> Int -> RealSrcLoc
- mkSrcLoc :: FastString -> Int -> Int -> SrcLoc
- pattern LL :: HasSrcSpan a => SrcSpan -> SrcSpanLess a -> a
- data RealSrcLoc
- data SrcLoc
- data RealSrcSpan
- data SrcSpan
- data GenLocated l e = L l e
- type Located = GenLocated SrcSpan
- type RealLocated = GenLocated RealSrcSpan
- type family SrcSpanLess a
- class HasSrcSpan a where
- composeSrcSpan :: Located (SrcSpanLess a) -> a
- decomposeSrcSpan :: a -> Located (SrcSpanLess a)
- pprDebugAndThen :: DynFlags -> (String -> a) -> SDoc -> SDoc -> a
- assertPprPanic :: HasCallStack => String -> Int -> SDoc -> a
- pprSTrace :: HasCallStack => SDoc -> a -> a
- pprTraceException :: ExceptionMonad m => String -> SDoc -> m a -> m a
- pprTraceIt :: Outputable a => String -> a -> a
- pprTraceWith :: String -> (a -> SDoc) -> a -> a
- pprTraceM :: Applicative f => String -> SDoc -> f ()
- pprTrace :: String -> SDoc -> a -> a
- pprTraceDebug :: String -> SDoc -> a -> a
- pprPgmError :: String -> SDoc -> a
- pprSorry :: String -> SDoc -> a
- pprPanic :: HasCallStack => String -> SDoc -> a
- callStackDoc :: HasCallStack => SDoc
- doOrDoes :: [a] -> SDoc
- isOrAre :: [a] -> SDoc
- plural :: [a] -> SDoc
- speakNOf :: Int -> SDoc -> SDoc
- speakN :: Int -> SDoc
- speakNth :: Int -> SDoc
- intWithCommas :: Integral a => a -> SDoc
- quotedListWithNor :: [SDoc] -> SDoc
- quotedListWithOr :: [SDoc] -> SDoc
- pprQuotedList :: Outputable a => [a] -> SDoc
- interpp'SP :: Outputable a => [a] -> SDoc
- interppSP :: Outputable a => [a] -> SDoc
- pprWithBars :: (a -> SDoc) -> [a] -> SDoc
- pprWithCommas :: (a -> SDoc) -> [a] -> SDoc
- pprFilePathString :: FilePath -> SDoc
- pprFastFilePath :: FastString -> SDoc
- pprInfixVar :: Bool -> SDoc -> SDoc
- pprPrefixVar :: Bool -> SDoc -> SDoc
- pprPrimWord64 :: Integer -> SDoc
- pprPrimInt64 :: Integer -> SDoc
- pprPrimWord :: Integer -> SDoc
- pprPrimInt :: Integer -> SDoc
- pprPrimChar :: Char -> SDoc
- primWord64Suffix :: SDoc
- primInt64Suffix :: SDoc
- primWordSuffix :: SDoc
- primDoubleSuffix :: SDoc
- primIntSuffix :: SDoc
- primFloatSuffix :: SDoc
- primCharSuffix :: SDoc
- pprHsBytes :: ByteString -> SDoc
- pprHsString :: FastString -> SDoc
- pprHsChar :: Char -> SDoc
- keyword :: SDoc -> SDoc
- coloured :: PprColour -> SDoc -> SDoc
- ppUnless :: Bool -> SDoc -> SDoc
- ppWhen :: Bool -> SDoc -> SDoc
- punctuate :: SDoc -> [SDoc] -> [SDoc]
- hangNotEmpty :: SDoc -> Int -> SDoc -> SDoc
- hang :: SDoc -> Int -> SDoc -> SDoc
- fcat :: [SDoc] -> SDoc
- fsep :: [SDoc] -> SDoc
- cat :: [SDoc] -> SDoc
- sep :: [SDoc] -> SDoc
- vcat :: [SDoc] -> SDoc
- hsep :: [SDoc] -> SDoc
- hcat :: [SDoc] -> SDoc
- ($+$) :: SDoc -> SDoc -> SDoc
- ($$) :: SDoc -> SDoc -> SDoc
- (<+>) :: SDoc -> SDoc -> SDoc
- (<>) :: SDoc -> SDoc -> SDoc
- nest :: Int -> SDoc -> SDoc
- unicodeSyntax :: SDoc -> SDoc -> SDoc
- bullet :: SDoc
- kindType :: SDoc
- forAllLit :: SDoc
- rbrace :: SDoc
- lbrace :: SDoc
- rbrack :: SDoc
- lbrack :: SDoc
- rparen :: SDoc
- lparen :: SDoc
- vbar :: SDoc
- dot :: SDoc
- underscore :: SDoc
- space :: SDoc
- equals :: SDoc
- colon :: SDoc
- comma :: SDoc
- semi :: SDoc
- larrowtt :: SDoc
- arrowtt :: SDoc
- larrowt :: SDoc
- arrowt :: SDoc
- darrow :: SDoc
- larrow :: SDoc
- arrow :: SDoc
- dcolon :: SDoc
- blankLine :: SDoc
- quotes :: SDoc -> SDoc
- cparen :: Bool -> SDoc -> SDoc
- angleBrackets :: SDoc -> SDoc
- doubleQuotes :: SDoc -> SDoc
- quote :: SDoc -> SDoc
- brackets :: SDoc -> SDoc
- braces :: SDoc -> SDoc
- parens :: SDoc -> SDoc
- doublePrec :: Int -> Double -> SDoc
- word :: Integer -> SDoc
- rational :: Rational -> SDoc
- double :: Double -> SDoc
- float :: Float -> SDoc
- integer :: Integer -> SDoc
- int :: Int -> SDoc
- ztext :: FastZString -> SDoc
- ptext :: PtrString -> SDoc
- ftext :: FastString -> SDoc
- char :: Char -> SDoc
- empty :: SDoc
- docToSDoc :: Doc -> SDoc
- isEmpty :: DynFlags -> SDoc -> Bool
- showSDocDumpOneLine :: DynFlags -> SDoc -> String
- showSDocOneLine :: DynFlags -> SDoc -> String
- renderWithStyle :: DynFlags -> SDoc -> PprStyle -> String
- showSDocDebug :: DynFlags -> SDoc -> String
- showSDocDump :: DynFlags -> SDoc -> String
- showSDocForUser :: DynFlags -> PrintUnqualified -> SDoc -> String
- showSDocUnqual :: DynFlags -> SDoc -> String
- showPpr :: Outputable a => DynFlags -> a -> String
- showSDoc :: DynFlags -> SDoc -> String
- mkCodeStyle :: CodeStyle -> PprStyle
- pprCode :: CodeStyle -> SDoc -> SDoc
- bufLeftRenderSDoc :: DynFlags -> BufHandle -> PprStyle -> SDoc -> IO ()
- printForC :: DynFlags -> Handle -> SDoc -> IO ()
- printForUserPartWay :: DynFlags -> Handle -> Int -> PrintUnqualified -> SDoc -> IO ()
- printForUser :: DynFlags -> Handle -> PrintUnqualified -> SDoc -> IO ()
- printSDocLn :: Mode -> DynFlags -> Handle -> PprStyle -> SDoc -> IO ()
- printSDoc :: Mode -> DynFlags -> Handle -> PprStyle -> SDoc -> IO ()
- whenPprDebug :: SDoc -> SDoc
- ifPprDebug :: SDoc -> SDoc -> SDoc
- getPprDebug :: (Bool -> SDoc) -> SDoc
- userStyle :: PprStyle -> Bool
- debugStyle :: PprStyle -> Bool
- dumpStyle :: PprStyle -> Bool
- asmStyle :: PprStyle -> Bool
- codeStyle :: PprStyle -> Bool
- queryQual :: PprStyle -> PrintUnqualified
- qualPackage :: PprStyle -> QueryQualifyPackage
- qualModule :: PprStyle -> QueryQualifyModule
- qualName :: PprStyle -> QueryQualifyName
- updSDocDynFlags :: (DynFlags -> DynFlags) -> SDoc -> SDoc
- sdocWithPlatform :: (Platform -> SDoc) -> SDoc
- sdocWithDynFlags :: (DynFlags -> SDoc) -> SDoc
- getPprStyle :: (PprStyle -> SDoc) -> SDoc
- pprSetDepth :: Depth -> SDoc -> SDoc
- pprDeeperList :: ([SDoc] -> SDoc) -> [SDoc] -> SDoc
- pprDeeper :: SDoc -> SDoc
- withPprStyleDoc :: DynFlags -> PprStyle -> SDoc -> Doc
- withPprStyle :: PprStyle -> SDoc -> SDoc
- initSDocContext :: DynFlags -> PprStyle -> SDocContext
- setStyleColoured :: Bool -> PprStyle -> PprStyle
- mkUserStyle :: DynFlags -> PrintUnqualified -> Depth -> PprStyle
- cmdlineParserStyle :: DynFlags -> PprStyle
- mkErrStyle :: DynFlags -> PrintUnqualified -> PprStyle
- defaultErrStyle :: DynFlags -> PprStyle
- mkDumpStyle :: DynFlags -> PrintUnqualified -> PprStyle
- defaultDumpStyle :: DynFlags -> PprStyle
- defaultUserStyle :: DynFlags -> PprStyle
- neverQualify :: PrintUnqualified
- alwaysQualify :: PrintUnqualified
- reallyAlwaysQualify :: PrintUnqualified
- neverQualifyPackages :: QueryQualifyPackage
- alwaysQualifyPackages :: QueryQualifyPackage
- neverQualifyModules :: QueryQualifyModule
- alwaysQualifyModules :: QueryQualifyModule
- neverQualifyNames :: QueryQualifyName
- alwaysQualifyNames :: QueryQualifyName
- reallyAlwaysQualifyNames :: QueryQualifyName
- data PprStyle
- data CodeStyle
- data Depth
- data PrintUnqualified = QueryQualify {}
- type QueryQualifyName = Module -> OccName -> QualifyName
- type QueryQualifyModule = Module -> Bool
- type QueryQualifyPackage = UnitId -> Bool
- data QualifyName
- class Outputable a where
- data BindingSite
- class Outputable a => OutputableBndr a where
- pprBndr :: BindingSite -> a -> SDoc
- pprPrefixOcc :: a -> SDoc
- pprInfixOcc :: a -> SDoc
- bndrIsJoin_maybe :: a -> Maybe Int
- emptyPackageState :: PackageState
- componentIdString :: DynFlags -> ComponentId -> Maybe String
- displayInstalledUnitId :: DynFlags -> InstalledUnitId -> Maybe String
- improveUnitId :: PackageConfigMap -> UnitId -> UnitId
- getPackageConfigMap :: DynFlags -> PackageConfigMap
- data PackageState
- data PackageConfigMap
- unitIdString :: UnitId -> String
- data Module = Module {
- moduleUnitId :: !UnitId
- moduleName :: !ModuleName
- data ModuleName
- data UnitId
- newtype InstalledUnitId = InstalledUnitId {}
- newtype ComponentId = ComponentId FastString
- fsLit :: String -> FastString
- sLit :: String -> PtrString
- lengthPS :: PtrString -> Int
- unpackPtrString :: PtrString -> String
- mkPtrString :: String -> PtrString
- mkPtrString# :: Addr# -> PtrString
- hPutFS :: Handle -> FastString -> IO ()
- getFastStringZEncCounter :: IO Int
- getFastStringTable :: IO [[[FastString]]]
- isUnderscoreFS :: FastString -> Bool
- nilFS :: FastString
- uniqueOfFS :: FastString -> Int
- consFS :: Char -> FastString -> FastString
- tailFS :: FastString -> FastString
- headFS :: FastString -> Char
- concatFS :: [FastString] -> FastString
- appendFS :: FastString -> FastString -> FastString
- zEncodeFS :: FastString -> FastZString
- unpackFS :: FastString -> String
- nullFS :: FastString -> Bool
- lengthFS :: FastString -> Int
- mkFastStringByteList :: [Word8] -> FastString
- mkFastString :: String -> FastString
- mkFastStringByteString :: ByteString -> FastString
- mkFastStringForeignPtr :: Ptr Word8 -> ForeignPtr Word8 -> Int -> IO FastString
- mkFastStringBytes :: Ptr Word8 -> Int -> FastString
- mkFastString# :: Addr# -> FastString
- lengthFZS :: FastZString -> Int
- zString :: FastZString -> String
- hPutFZS :: Handle -> FastZString -> IO ()
- unsafeMkByteString :: String -> ByteString
- fastZStringToByteString :: FastZString -> ByteString
- fastStringToByteString :: FastString -> ByteString
- bytesFS :: FastString -> ByteString
- data FastZString
- data FastString = FastString {
- uniq :: !Int
- n_chars :: !Int
- fs_bs :: !ByteString
- fs_zenc :: FastZString
- data PtrString = PtrString !(Ptr Word8) !Int
- overrideWith :: Bool -> OverridingBool -> Bool
- hashString :: String -> Int32
- charToC :: Word8 -> String
- abstractDataType :: String -> DataType
- abstractConstr :: String -> Constr
- makeRelativeTo :: FilePath -> FilePath -> FilePath
- reslash :: Direction -> FilePath -> FilePath
- escapeSpaces :: String -> String
- splitLongestPrefix :: String -> (Char -> Bool) -> (String, String)
- withAtomicRename :: MonadIO m => FilePath -> (FilePath -> m a) -> m a
- modificationTimeIfExists :: FilePath -> IO (Maybe UTCTime)
- getModificationUTCTime :: FilePath -> IO UTCTime
- doesDirNameExist :: FilePath -> IO Bool
- readHexRational :: String -> Rational
- readRational :: String -> Rational
- exactLog2 :: Integer -> Maybe Integer
- toArgs :: String -> Either String [String]
- toCmdArgs :: String -> Either String (String, [String])
- getCmd :: String -> Either String (String, String)
- looksLikePackageName :: String -> Bool
- looksLikeModuleName :: String -> Bool
- sharedGlobalM :: IO a -> (Ptr (IORef a) -> IO (Ptr (IORef a))) -> IORef a
- sharedGlobal :: a -> (Ptr (IORef a) -> IO (Ptr (IORef a))) -> IORef a
- globalM :: IO a -> IORef a
- consIORef :: IORef [a] -> a -> IO ()
- global :: a -> IORef a
- seqList :: [a] -> b -> b
- unzipWith :: (a -> b -> c) -> [(a, b)] -> [c]
- fuzzyLookup :: String -> [(String, a)] -> [a]
- fuzzyMatch :: String -> [String] -> [String]
- (<||>) :: Applicative f => f Bool -> f Bool -> f Bool
- (<&&>) :: Applicative f => f Bool -> f Bool -> f Bool
- removeSpaces :: String -> String
- cmpList :: (a -> a -> Ordering) -> [a] -> [a] -> Ordering
- eqMaybeBy :: (a -> a -> Bool) -> Maybe a -> Maybe a -> Bool
- eqListBy :: (a -> a -> Bool) -> [a] -> [a] -> Bool
- thenCmp :: Ordering -> Ordering -> Ordering
- isEqual :: Ordering -> Bool
- capitalise :: String -> String
- split :: Char -> String -> [String]
- snocView :: [a] -> Maybe ([a], a)
- lastMaybe :: [a] -> Maybe a
- last2 :: [a] -> (a, a)
- spanEnd :: (a -> Bool) -> [a] -> ([a], [a])
- dropWhileEndLE :: (a -> Bool) -> [a] -> [a]
- dropTail :: Int -> [a] -> [a]
- splitAtList :: [b] -> [a] -> ([a], [a])
- dropList :: [b] -> [a] -> [a]
- takeList :: [b] -> [a] -> [a]
- countWhile :: (a -> Bool) -> [a] -> Int
- count :: (a -> Bool) -> [a] -> Int
- all2 :: (a -> b -> Bool) -> [a] -> [b] -> Bool
- foldl2 :: (acc -> a -> b -> acc) -> acc -> [a] -> [b] -> acc
- transitiveClosure :: (a -> [a]) -> (a -> a -> Bool) -> [a] -> [a]
- ordNub :: Ord a => [a] -> [a]
- nubSort :: Ord a => [a] -> [a]
- minWith :: Ord b => (a -> b) -> [a] -> a
- whenNonEmpty :: Applicative m => [a] -> (NonEmpty a -> m ()) -> m ()
- changeLast :: [a] -> a -> [a]
- chunkList :: Int -> [a] -> [[a]]
- isn'tIn :: Eq a => String -> a -> [a] -> Bool
- isIn :: Eq a => String -> a -> [a] -> Bool
- only :: [a] -> a
- notNull :: [a] -> Bool
- isSingleton :: [a] -> Bool
- singleton :: a -> [a]
- ltLength :: [a] -> [b] -> Bool
- leLength :: [a] -> [b] -> Bool
- compareLength :: [a] -> [b] -> Ordering
- equalLength :: [a] -> [b] -> Bool
- listLengthCmp :: [a] -> Int -> Ordering
- lengthLessThan :: [a] -> Int -> Bool
- lengthAtMost :: [a] -> Int -> Bool
- lengthIsNot :: [a] -> Int -> Bool
- lengthIs :: [a] -> Int -> Bool
- lengthAtLeast :: [a] -> Int -> Bool
- lengthExceeds :: [a] -> Int -> Bool
- atLength :: ([a] -> b) -> b -> [a] -> Int -> b
- mapAccumL2 :: (s1 -> s2 -> a -> (s1, s2, b)) -> s1 -> s2 -> [a] -> (s1, s2, [b])
- zipAndUnzip :: [a] -> [b] -> ([a], [b])
- zipWithAndUnzip :: (a -> b -> (c, d)) -> [a] -> [b] -> ([c], [d])
- mapAndUnzip3 :: (a -> (b, c, d)) -> [a] -> ([b], [c], [d])
- mapAndUnzip :: (a -> (b, c)) -> [a] -> ([b], [c])
- mapSnd :: (b -> c) -> [(a, b)] -> [(a, c)]
- mapFst :: (a -> c) -> [(a, b)] -> [(c, b)]
- stretchZipWith :: (a -> Bool) -> b -> (a -> b -> c) -> [a] -> [b] -> [c]
- partitionByList :: [Bool] -> [a] -> ([a], [a])
- filterByLists :: [Bool] -> [a] -> [a] -> [a]
- filterByList :: [Bool] -> [a] -> [a]
- zipWith3Lazy :: (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d]
- zipWithLazy :: (a -> b -> c) -> [a] -> [b] -> [c]
- zipLazy :: [a] -> [b] -> [(a, b)]
- zipWith4Equal :: String -> (a -> b -> c -> d -> e) -> [a] -> [b] -> [c] -> [d] -> [e]
- zipWith3Equal :: String -> (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d]
- zipWithEqual :: String -> (a -> b -> c) -> [a] -> [b] -> [c]
- zipEqual :: String -> [a] -> [b] -> [(a, b)]
- chkAppend :: [a] -> [a] -> [a]
- partitionWith :: (a -> Either b c) -> [a] -> ([b], [c])
- filterOut :: (a -> Bool) -> [a] -> [a]
- secondM :: Monad m => (b -> m c) -> (a, b) -> m (a, c)
- first3M :: Monad m => (a -> m d) -> (a, b, c) -> m (d, b, c)
- firstM :: Monad m => (a -> m c) -> (a, b) -> m (c, b)
- liftSnd :: (a -> b) -> (c, a) -> (c, b)
- liftFst :: (a -> b) -> (a, c) -> (b, c)
- uncurry3 :: (a -> b -> c -> d) -> (a, b, c) -> d
- third3 :: (c -> d) -> (a, b, c) -> (a, b, d)
- snd3 :: (b -> d) -> (a, b, c) -> (a, d, c)
- fst3 :: (a -> d) -> (a, b, c) -> (d, b, c)
- thdOf3 :: (a, b, c) -> c
- sndOf3 :: (a, b, c) -> b
- fstOf3 :: (a, b, c) -> a
- nTimes :: Int -> (a -> a) -> a -> a
- applyWhen :: Bool -> (a -> a) -> a -> a
- isDarwinHost :: Bool
- isWindowsHost :: Bool
- ghciTablesNextToCode :: Bool
- debugIsOn :: Bool
- ghciSupported :: Bool
- type Suffix = String
- data Direction
- type HasDebugCallStack = ()
- data OverridingBool
- isTupleTyCon :: TyCon -> Bool
- isUnboxedTupleTyCon :: TyCon -> Bool
- isFunTyCon :: TyCon -> Bool
- data TyCon
- sGhcRtsWithLibdw :: Settings -> Bool
- sGhcDebugged :: Settings -> Bool
- sGhcThreaded :: Settings -> Bool
- sLibFFI :: Settings -> Bool
- sLeadingUnderscore :: Settings -> Bool
- sTablesNextToCode :: Settings -> Bool
- sGhcRTSWays :: Settings -> String
- sGhcWithSMP :: Settings -> Bool
- sGhcWithNativeCodeGen :: Settings -> Bool
- sGhcWithInterpreter :: Settings -> Bool
- sIntegerLibraryType :: Settings -> IntegerLibrary
- sIntegerLibrary :: Settings -> String
- sTargetPlatformString :: Settings -> String
- sExtraGccViaCFlags :: Settings -> [String]
- sOpt_i :: Settings -> [String]
- sOpt_lcc :: Settings -> [String]
- sOpt_lc :: Settings -> [String]
- sOpt_lo :: Settings -> [String]
- sOpt_windres :: Settings -> [String]
- sOpt_lm :: Settings -> [String]
- sOpt_l :: Settings -> [String]
- sOpt_a :: Settings -> [String]
- sOpt_cxx :: Settings -> [String]
- sOpt_c :: Settings -> [String]
- sOpt_F :: Settings -> [String]
- sOpt_P_fingerprint :: Settings -> Fingerprint
- sOpt_P :: Settings -> [String]
- sOpt_L :: Settings -> [String]
- sPgm_i :: Settings -> String
- sPgm_lcc :: Settings -> (String, [Option])
- sPgm_lc :: Settings -> (String, [Option])
- sPgm_lo :: Settings -> (String, [Option])
- sPgm_ranlib :: Settings -> String
- sPgm_ar :: Settings -> String
- sPgm_libtool :: Settings -> String
- sPgm_windres :: Settings -> String
- sPgm_T :: Settings -> String
- sPgm_dll :: Settings -> (String, [Option])
- sPgm_lm :: Settings -> (String, [Option])
- sPgm_l :: Settings -> (String, [Option])
- sPgm_a :: Settings -> (String, [Option])
- sPgm_c :: Settings -> String
- sPgm_F :: Settings -> String
- sPgm_P :: Settings -> (String, [Option])
- sPgm_L :: Settings -> String
- sGccSupportsNoPie :: Settings -> Bool
- sLdIsGnuLd :: Settings -> Bool
- sLdSupportsFilelist :: Settings -> Bool
- sLdSupportsBuildId :: Settings -> Bool
- sLdSupportsCompactUnwind :: Settings -> Bool
- sSystemPackageConfig :: Settings -> FilePath
- sTmpDir :: Settings -> String
- sTopDir :: Settings -> FilePath
- sToolDir :: Settings -> Maybe FilePath
- sGhciUsagePath :: Settings -> FilePath
- sGhcUsagePath :: Settings -> FilePath
- sProjectVersion :: Settings -> String
- sProgramName :: Settings -> String
- data Settings = Settings {}
- data LoadedPlugin = LoadedPlugin {}
- data StaticPlugin = StaticPlugin {}
- data PlatformConstants = PlatformConstants {
- pc_CONTROL_GROUP_CONST_291 :: Int
- pc_STD_HDR_SIZE :: Int
- pc_PROF_HDR_SIZE :: Int
- pc_BLOCK_SIZE :: Int
- pc_BLOCKS_PER_MBLOCK :: Int
- pc_TICKY_BIN_COUNT :: Int
- pc_OFFSET_StgRegTable_rR1 :: Int
- pc_OFFSET_StgRegTable_rR2 :: Int
- pc_OFFSET_StgRegTable_rR3 :: Int
- pc_OFFSET_StgRegTable_rR4 :: Int
- pc_OFFSET_StgRegTable_rR5 :: Int
- pc_OFFSET_StgRegTable_rR6 :: Int
- pc_OFFSET_StgRegTable_rR7 :: Int
- pc_OFFSET_StgRegTable_rR8 :: Int
- pc_OFFSET_StgRegTable_rR9 :: Int
- pc_OFFSET_StgRegTable_rR10 :: Int
- pc_OFFSET_StgRegTable_rF1 :: Int
- pc_OFFSET_StgRegTable_rF2 :: Int
- pc_OFFSET_StgRegTable_rF3 :: Int
- pc_OFFSET_StgRegTable_rF4 :: Int
- pc_OFFSET_StgRegTable_rF5 :: Int
- pc_OFFSET_StgRegTable_rF6 :: Int
- pc_OFFSET_StgRegTable_rD1 :: Int
- pc_OFFSET_StgRegTable_rD2 :: Int
- pc_OFFSET_StgRegTable_rD3 :: Int
- pc_OFFSET_StgRegTable_rD4 :: Int
- pc_OFFSET_StgRegTable_rD5 :: Int
- pc_OFFSET_StgRegTable_rD6 :: Int
- pc_OFFSET_StgRegTable_rXMM1 :: Int
- pc_OFFSET_StgRegTable_rXMM2 :: Int
- pc_OFFSET_StgRegTable_rXMM3 :: Int
- pc_OFFSET_StgRegTable_rXMM4 :: Int
- pc_OFFSET_StgRegTable_rXMM5 :: Int
- pc_OFFSET_StgRegTable_rXMM6 :: Int
- pc_OFFSET_StgRegTable_rYMM1 :: Int
- pc_OFFSET_StgRegTable_rYMM2 :: Int
- pc_OFFSET_StgRegTable_rYMM3 :: Int
- pc_OFFSET_StgRegTable_rYMM4 :: Int
- pc_OFFSET_StgRegTable_rYMM5 :: Int
- pc_OFFSET_StgRegTable_rYMM6 :: Int
- pc_OFFSET_StgRegTable_rZMM1 :: Int
- pc_OFFSET_StgRegTable_rZMM2 :: Int
- pc_OFFSET_StgRegTable_rZMM3 :: Int
- pc_OFFSET_StgRegTable_rZMM4 :: Int
- pc_OFFSET_StgRegTable_rZMM5 :: Int
- pc_OFFSET_StgRegTable_rZMM6 :: Int
- pc_OFFSET_StgRegTable_rL1 :: Int
- pc_OFFSET_StgRegTable_rSp :: Int
- pc_OFFSET_StgRegTable_rSpLim :: Int
- pc_OFFSET_StgRegTable_rHp :: Int
- pc_OFFSET_StgRegTable_rHpLim :: Int
- pc_OFFSET_StgRegTable_rCCCS :: Int
- pc_OFFSET_StgRegTable_rCurrentTSO :: Int
- pc_OFFSET_StgRegTable_rCurrentNursery :: Int
- pc_OFFSET_StgRegTable_rHpAlloc :: Int
- pc_OFFSET_stgEagerBlackholeInfo :: Int
- pc_OFFSET_stgGCEnter1 :: Int
- pc_OFFSET_stgGCFun :: Int
- pc_OFFSET_Capability_r :: Int
- pc_OFFSET_bdescr_start :: Int
- pc_OFFSET_bdescr_free :: Int
- pc_OFFSET_bdescr_blocks :: Int
- pc_OFFSET_bdescr_flags :: Int
- pc_SIZEOF_CostCentreStack :: Int
- pc_OFFSET_CostCentreStack_mem_alloc :: Int
- pc_REP_CostCentreStack_mem_alloc :: Int
- pc_OFFSET_CostCentreStack_scc_count :: Int
- pc_REP_CostCentreStack_scc_count :: Int
- pc_OFFSET_StgHeader_ccs :: Int
- pc_OFFSET_StgHeader_ldvw :: Int
- pc_SIZEOF_StgSMPThunkHeader :: Int
- pc_OFFSET_StgEntCounter_allocs :: Int
- pc_REP_StgEntCounter_allocs :: Int
- pc_OFFSET_StgEntCounter_allocd :: Int
- pc_REP_StgEntCounter_allocd :: Int
- pc_OFFSET_StgEntCounter_registeredp :: Int
- pc_OFFSET_StgEntCounter_link :: Int
- pc_OFFSET_StgEntCounter_entry_count :: Int
- pc_SIZEOF_StgUpdateFrame_NoHdr :: Int
- pc_SIZEOF_StgMutArrPtrs_NoHdr :: Int
- pc_OFFSET_StgMutArrPtrs_ptrs :: Int
- pc_OFFSET_StgMutArrPtrs_size :: Int
- pc_SIZEOF_StgSmallMutArrPtrs_NoHdr :: Int
- pc_OFFSET_StgSmallMutArrPtrs_ptrs :: Int
- pc_SIZEOF_StgArrBytes_NoHdr :: Int
- pc_OFFSET_StgArrBytes_bytes :: Int
- pc_OFFSET_StgTSO_alloc_limit :: Int
- pc_OFFSET_StgTSO_cccs :: Int
- pc_OFFSET_StgTSO_stackobj :: Int
- pc_OFFSET_StgStack_sp :: Int
- pc_OFFSET_StgStack_stack :: Int
- pc_OFFSET_StgUpdateFrame_updatee :: Int
- pc_OFFSET_StgFunInfoExtraFwd_arity :: Int
- pc_REP_StgFunInfoExtraFwd_arity :: Int
- pc_SIZEOF_StgFunInfoExtraRev :: Int
- pc_OFFSET_StgFunInfoExtraRev_arity :: Int
- pc_REP_StgFunInfoExtraRev_arity :: Int
- pc_MAX_SPEC_SELECTEE_SIZE :: Int
- pc_MAX_SPEC_AP_SIZE :: Int
- pc_MIN_PAYLOAD_SIZE :: Int
- pc_MIN_INTLIKE :: Int
- pc_MAX_INTLIKE :: Int
- pc_MIN_CHARLIKE :: Int
- pc_MAX_CHARLIKE :: Int
- pc_MUT_ARR_PTRS_CARD_BITS :: Int
- pc_MAX_Vanilla_REG :: Int
- pc_MAX_Float_REG :: Int
- pc_MAX_Double_REG :: Int
- pc_MAX_Long_REG :: Int
- pc_MAX_XMM_REG :: Int
- pc_MAX_Real_Vanilla_REG :: Int
- pc_MAX_Real_Float_REG :: Int
- pc_MAX_Real_Double_REG :: Int
- pc_MAX_Real_XMM_REG :: Int
- pc_MAX_Real_Long_REG :: Int
- pc_RESERVED_C_STACK_BYTES :: Int
- pc_RESERVED_STACK_WORDS :: Int
- pc_AP_STACK_SPLIM :: Int
- pc_WORD_SIZE :: Int
- pc_DOUBLE_SIZE :: Int
- pc_CINT_SIZE :: Int
- pc_CLONG_SIZE :: Int
- pc_CLONG_LONG_SIZE :: Int
- pc_BITMAP_BITS_SHIFT :: Int
- pc_TAG_BITS :: Int
- pc_WORDS_BIGENDIAN :: Bool
- pc_DYNAMIC_BY_DEFAULT :: Bool
- pc_LDV_SHIFT :: Int
- pc_ILDV_CREATE_MASK :: Integer
- pc_ILDV_STATE_CREATE :: Integer
- pc_ILDV_STATE_USE :: Integer
- assertPanic :: String -> Int -> a
- pgmError :: String -> a
- sorry :: String -> a
- panic :: String -> a
- showSDocUnsafe :: SDoc -> String
- warnPprTrace :: HasCallStack => Bool -> String -> Int -> SDoc -> a -> a
- text :: String -> SDoc
- data SDoc
- data OccName
- data Name
- showOpt :: Option -> String
- data Option
- unsafeGlobalDynFlags :: DynFlags
- useUnicodeSyntax :: DynFlags -> Bool
- useStarIsType :: DynFlags -> Bool
- shouldUseColor :: DynFlags -> Bool
- shouldUseHexWordLiterals :: DynFlags -> Bool
- hasPprDebug :: DynFlags -> Bool
- hasNoDebugOutput :: DynFlags -> Bool
- data DynFlags = DynFlags {
- ghcMode :: GhcMode
- ghcLink :: GhcLink
- hscTarget :: HscTarget
- ghcNameVersion :: !GhcNameVersion
- fileSettings :: !FileSettings
- targetPlatform :: Platform
- toolSettings :: !ToolSettings
- platformMisc :: !PlatformMisc
- platformConstants :: PlatformConstants
- rawSettings :: [(String, String)]
- integerLibrary :: IntegerLibrary
- llvmConfig :: LlvmConfig
- verbosity :: Int
- optLevel :: Int
- debugLevel :: Int
- simplPhases :: Int
- maxSimplIterations :: Int
- ruleCheck :: Maybe String
- inlineCheck :: Maybe String
- strictnessBefore :: [Int]
- parMakeCount :: Maybe Int
- enableTimeStats :: Bool
- ghcHeapSize :: Maybe Int
- maxRelevantBinds :: Maybe Int
- maxValidHoleFits :: Maybe Int
- maxRefHoleFits :: Maybe Int
- refLevelHoleFits :: Maybe Int
- maxUncoveredPatterns :: Int
- maxPmCheckModels :: Int
- simplTickFactor :: Int
- specConstrThreshold :: Maybe Int
- specConstrCount :: Maybe Int
- specConstrRecursive :: Int
- binBlobThreshold :: Word
- liberateCaseThreshold :: Maybe Int
- floatLamArgs :: Maybe Int
- liftLamsRecArgs :: Maybe Int
- liftLamsNonRecArgs :: Maybe Int
- liftLamsKnown :: Bool
- cmmProcAlignment :: Maybe Int
- historySize :: Int
- importPaths :: [FilePath]
- mainModIs :: Module
- mainFunIs :: Maybe String
- reductionDepth :: IntWithInf
- solverIterations :: IntWithInf
- thisInstalledUnitId :: InstalledUnitId
- thisComponentId_ :: Maybe ComponentId
- thisUnitIdInsts_ :: Maybe [(ModuleName, Module)]
- ways :: [Way]
- buildTag :: String
- splitInfo :: Maybe (String, Int)
- objectDir :: Maybe String
- dylibInstallName :: Maybe String
- hiDir :: Maybe String
- hieDir :: Maybe String
- stubDir :: Maybe String
- dumpDir :: Maybe String
- objectSuf :: String
- hcSuf :: String
- hiSuf :: String
- hieSuf :: String
- canGenerateDynamicToo :: IORef Bool
- dynObjectSuf :: String
- dynHiSuf :: String
- outputFile :: Maybe String
- dynOutputFile :: Maybe String
- outputHi :: Maybe String
- dynLibLoader :: DynLibLoader
- dumpPrefix :: Maybe FilePath
- dumpPrefixForce :: Maybe FilePath
- ldInputs :: [Option]
- includePaths :: IncludeSpecs
- libraryPaths :: [String]
- frameworkPaths :: [String]
- cmdlineFrameworks :: [String]
- rtsOpts :: Maybe String
- rtsOptsEnabled :: RtsOptsEnabled
- rtsOptsSuggestions :: Bool
- hpcDir :: String
- pluginModNames :: [ModuleName]
- pluginModNameOpts :: [(ModuleName, String)]
- frontendPluginOpts :: [String]
- cachedPlugins :: [LoadedPlugin]
- staticPlugins :: [StaticPlugin]
- hooks :: Hooks
- depMakefile :: FilePath
- depIncludePkgDeps :: Bool
- depIncludeCppDeps :: Bool
- depExcludeMods :: [ModuleName]
- depSuffixes :: [String]
- packageDBFlags :: [PackageDBFlag]
- ignorePackageFlags :: [IgnorePackageFlag]
- packageFlags :: [PackageFlag]
- pluginPackageFlags :: [PackageFlag]
- trustFlags :: [TrustFlag]
- packageEnv :: Maybe FilePath
- pkgDatabase :: Maybe [(FilePath, [PackageConfig])]
- pkgState :: PackageState
- filesToClean :: IORef FilesToClean
- dirsToClean :: IORef (Map FilePath FilePath)
- nextTempSuffix :: IORef Int
- generatedDumps :: IORef (Set FilePath)
- dumpFlags :: EnumSet DumpFlag
- generalFlags :: EnumSet GeneralFlag
- warningFlags :: EnumSet WarningFlag
- fatalWarningFlags :: EnumSet WarningFlag
- language :: Maybe Language
- safeHaskell :: SafeHaskellMode
- safeInfer :: Bool
- safeInferred :: Bool
- thOnLoc :: SrcSpan
- newDerivOnLoc :: SrcSpan
- overlapInstLoc :: SrcSpan
- incoherentOnLoc :: SrcSpan
- pkgTrustOnLoc :: SrcSpan
- warnSafeOnLoc :: SrcSpan
- warnUnsafeOnLoc :: SrcSpan
- trustworthyOnLoc :: SrcSpan
- extensions :: [OnOff Extension]
- extensionFlags :: EnumSet Extension
- ufCreationThreshold :: Int
- ufUseThreshold :: Int
- ufFunAppDiscount :: Int
- ufDictDiscount :: Int
- ufKeenessFactor :: Float
- ufDearOp :: Int
- ufVeryAggressive :: Bool
- maxWorkerArgs :: Int
- ghciHistSize :: Int
- log_action :: LogAction
- flushOut :: FlushOut
- flushErr :: FlushErr
- ghcVersionFile :: Maybe FilePath
- haddockOptions :: Maybe String
- ghciScripts :: [String]
- pprUserLength :: Int
- pprCols :: Int
- useUnicode :: Bool
- useColor :: OverridingBool
- canUseColor :: Bool
- colScheme :: Scheme
- profAuto :: ProfAuto
- interactivePrint :: Maybe String
- nextWrapperNum :: IORef (ModuleEnv Int)
- sseVersion :: Maybe SseVersion
- bmiVersion :: Maybe BmiVersion
- avx :: Bool
- avx2 :: Bool
- avx512cd :: Bool
- avx512er :: Bool
- avx512f :: Bool
- avx512pf :: Bool
- rtldInfo :: IORef (Maybe LinkerInfo)
- rtccInfo :: IORef (Maybe CompilerInfo)
- maxInlineAllocSize :: Int
- maxInlineMemcpyInsns :: Int
- maxInlineMemsetInsns :: Int
- reverseErrors :: Bool
- maxErrors :: Maybe Int
- initialUnique :: Int
- uniqueIncrement :: Int
- cfgWeightInfo :: CfgWeights
- data DumpFlag
- = Opt_D_dump_cmm
- | Opt_D_dump_cmm_from_stg
- | Opt_D_dump_cmm_raw
- | Opt_D_dump_cmm_verbose_by_proc
- | Opt_D_dump_cmm_verbose
- | Opt_D_dump_cmm_cfg
- | Opt_D_dump_cmm_cbe
- | Opt_D_dump_cmm_switch
- | Opt_D_dump_cmm_proc
- | Opt_D_dump_cmm_sp
- | Opt_D_dump_cmm_sink
- | Opt_D_dump_cmm_caf
- | Opt_D_dump_cmm_procmap
- | Opt_D_dump_cmm_split
- | Opt_D_dump_cmm_info
- | Opt_D_dump_cmm_cps
- | Opt_D_dump_cfg_weights
- | Opt_D_dump_asm
- | Opt_D_dump_asm_native
- | Opt_D_dump_asm_liveness
- | Opt_D_dump_asm_regalloc
- | Opt_D_dump_asm_regalloc_stages
- | Opt_D_dump_asm_conflicts
- | Opt_D_dump_asm_stats
- | Opt_D_dump_asm_expanded
- | Opt_D_dump_llvm
- | Opt_D_dump_core_stats
- | Opt_D_dump_deriv
- | Opt_D_dump_ds
- | Opt_D_dump_ds_preopt
- | Opt_D_dump_foreign
- | Opt_D_dump_inlinings
- | Opt_D_dump_rule_firings
- | Opt_D_dump_rule_rewrites
- | Opt_D_dump_simpl_trace
- | Opt_D_dump_occur_anal
- | Opt_D_dump_parsed
- | Opt_D_dump_parsed_ast
- | Opt_D_dump_rn
- | Opt_D_dump_rn_ast
- | Opt_D_dump_simpl
- | Opt_D_dump_simpl_iterations
- | Opt_D_dump_spec
- | Opt_D_dump_prep
- | Opt_D_dump_stg
- | Opt_D_dump_stg_unarised
- | Opt_D_dump_stg_final
- | Opt_D_dump_call_arity
- | Opt_D_dump_exitify
- | Opt_D_dump_stranal
- | Opt_D_dump_str_signatures
- | Opt_D_dump_tc
- | Opt_D_dump_tc_ast
- | Opt_D_dump_types
- | Opt_D_dump_rules
- | Opt_D_dump_cse
- | Opt_D_dump_worker_wrapper
- | Opt_D_dump_rn_trace
- | Opt_D_dump_rn_stats
- | Opt_D_dump_opt_cmm
- | Opt_D_dump_simpl_stats
- | Opt_D_dump_cs_trace
- | Opt_D_dump_tc_trace
- | Opt_D_dump_ec_trace
- | Opt_D_dump_if_trace
- | Opt_D_dump_vt_trace
- | Opt_D_dump_splices
- | Opt_D_th_dec_file
- | Opt_D_dump_BCOs
- | Opt_D_dump_ticked
- | Opt_D_dump_rtti
- | Opt_D_source_stats
- | Opt_D_verbose_stg2stg
- | Opt_D_dump_hi
- | Opt_D_dump_hi_diffs
- | Opt_D_dump_mod_cycles
- | Opt_D_dump_mod_map
- | Opt_D_dump_timings
- | Opt_D_dump_view_pattern_commoning
- | Opt_D_verbose_core2core
- | Opt_D_dump_debug
- | Opt_D_dump_json
- | Opt_D_ppr_debug
- | Opt_D_no_debug_output
- data GeneralFlag
- = Opt_DumpToFile
- | Opt_D_faststring_stats
- | Opt_D_dump_minimal_imports
- | Opt_DoCoreLinting
- | Opt_DoStgLinting
- | Opt_DoCmmLinting
- | Opt_DoAsmLinting
- | Opt_DoAnnotationLinting
- | Opt_NoLlvmMangler
- | Opt_FastLlvm
- | Opt_NoTypeableBinds
- | Opt_WarnIsError
- | Opt_ShowWarnGroups
- | Opt_HideSourcePaths
- | Opt_PrintExplicitForalls
- | Opt_PrintExplicitKinds
- | Opt_PrintExplicitCoercions
- | Opt_PrintExplicitRuntimeReps
- | Opt_PrintEqualityRelations
- | Opt_PrintAxiomIncomps
- | Opt_PrintUnicodeSyntax
- | Opt_PrintExpandedSynonyms
- | Opt_PrintPotentialInstances
- | Opt_PrintTypecheckerElaboration
- | Opt_CallArity
- | Opt_Exitification
- | Opt_Strictness
- | Opt_LateDmdAnal
- | Opt_KillAbsence
- | Opt_KillOneShot
- | Opt_FullLaziness
- | Opt_FloatIn
- | Opt_LateSpecialise
- | Opt_Specialise
- | Opt_SpecialiseAggressively
- | Opt_CrossModuleSpecialise
- | Opt_StaticArgumentTransformation
- | Opt_CSE
- | Opt_StgCSE
- | Opt_StgLiftLams
- | Opt_LiberateCase
- | Opt_SpecConstr
- | Opt_SpecConstrKeen
- | Opt_DoLambdaEtaExpansion
- | Opt_IgnoreAsserts
- | Opt_DoEtaReduction
- | Opt_CaseMerge
- | Opt_CaseFolding
- | Opt_UnboxStrictFields
- | Opt_UnboxSmallStrictFields
- | Opt_DictsCheap
- | Opt_EnableRewriteRules
- | Opt_EnableThSpliceWarnings
- | Opt_RegsGraph
- | Opt_RegsIterative
- | Opt_PedanticBottoms
- | Opt_LlvmTBAA
- | Opt_LlvmFillUndefWithGarbage
- | Opt_IrrefutableTuples
- | Opt_CmmSink
- | Opt_CmmElimCommonBlocks
- | Opt_AsmShortcutting
- | Opt_OmitYields
- | Opt_FunToThunk
- | Opt_DictsStrict
- | Opt_DmdTxDictSel
- | Opt_Loopification
- | Opt_CfgBlocklayout
- | Opt_WeightlessBlocklayout
- | Opt_CprAnal
- | Opt_WorkerWrapper
- | Opt_SolveConstantDicts
- | Opt_AlignmentSanitisation
- | Opt_CatchBottoms
- | Opt_NumConstantFolding
- | Opt_SimplPreInlining
- | Opt_IgnoreInterfacePragmas
- | Opt_OmitInterfacePragmas
- | Opt_ExposeAllUnfoldings
- | Opt_WriteInterface
- | Opt_WriteHie
- | Opt_AutoSccsOnIndividualCafs
- | Opt_ProfCountEntries
- | Opt_Pp
- | Opt_ForceRecomp
- | Opt_IgnoreOptimChanges
- | Opt_IgnoreHpcChanges
- | Opt_ExcessPrecision
- | Opt_EagerBlackHoling
- | Opt_NoHsMain
- | Opt_SplitSections
- | Opt_StgStats
- | Opt_HideAllPackages
- | Opt_HideAllPluginPackages
- | Opt_PrintBindResult
- | Opt_Haddock
- | Opt_HaddockOptions
- | Opt_BreakOnException
- | Opt_BreakOnError
- | Opt_PrintEvldWithShow
- | Opt_PrintBindContents
- | Opt_GenManifest
- | Opt_EmbedManifest
- | Opt_SharedImplib
- | Opt_BuildingCabalPackage
- | Opt_IgnoreDotGhci
- | Opt_GhciSandbox
- | Opt_GhciHistory
- | Opt_GhciLeakCheck
- | Opt_ValidateHie
- | Opt_LocalGhciHistory
- | Opt_NoIt
- | Opt_HelpfulErrors
- | Opt_DeferTypeErrors
- | Opt_DeferTypedHoles
- | Opt_DeferOutOfScopeVariables
- | Opt_PIC
- | Opt_PIE
- | Opt_PICExecutable
- | Opt_ExternalDynamicRefs
- | Opt_SccProfilingOn
- | Opt_Ticky
- | Opt_Ticky_Allocd
- | Opt_Ticky_LNE
- | Opt_Ticky_Dyn_Thunk
- | Opt_RPath
- | Opt_RelativeDynlibPaths
- | Opt_Hpc
- | Opt_FlatCache
- | Opt_ExternalInterpreter
- | Opt_OptimalApplicativeDo
- | Opt_VersionMacros
- | Opt_WholeArchiveHsLibs
- | Opt_SingleLibFolder
- | Opt_KeepCAFs
- | Opt_KeepGoing
- | Opt_ByteCode
- | Opt_ErrorSpans
- | Opt_DeferDiagnostics
- | Opt_DiagnosticsShowCaret
- | Opt_PprCaseAsLet
- | Opt_PprShowTicks
- | Opt_ShowHoleConstraints
- | Opt_ShowValidHoleFits
- | Opt_SortValidHoleFits
- | Opt_SortBySizeHoleFits
- | Opt_SortBySubsumHoleFits
- | Opt_AbstractRefHoleFits
- | Opt_UnclutterValidHoleFits
- | Opt_ShowTypeAppOfHoleFits
- | Opt_ShowTypeAppVarsOfHoleFits
- | Opt_ShowDocsOfHoleFits
- | Opt_ShowTypeOfHoleFits
- | Opt_ShowProvOfHoleFits
- | Opt_ShowMatchesOfHoleFits
- | Opt_ShowLoadedModules
- | Opt_HexWordLiterals
- | Opt_SuppressCoercions
- | Opt_SuppressVarKinds
- | Opt_SuppressModulePrefixes
- | Opt_SuppressTypeApplications
- | Opt_SuppressIdInfo
- | Opt_SuppressUnfoldings
- | Opt_SuppressTypeSignatures
- | Opt_SuppressUniques
- | Opt_SuppressStgExts
- | Opt_SuppressTicks
- | Opt_SuppressTimestamps
- | Opt_AutoLinkPackages
- | Opt_ImplicitImportQualified
- | Opt_KeepHscppFiles
- | Opt_KeepHiDiffs
- | Opt_KeepHcFiles
- | Opt_KeepSFiles
- | Opt_KeepTmpFiles
- | Opt_KeepRawTokenStream
- | Opt_KeepLlvmFiles
- | Opt_KeepHiFiles
- | Opt_KeepOFiles
- | Opt_BuildDynamicToo
- | Opt_DistrustAllPackages
- | Opt_PackageTrust
- | Opt_PluginTrustworthy
- | Opt_G_NoStateHack
- | Opt_G_NoOptCoercion
- data FileSettings = FileSettings {}
- foldRightWithKey :: (key -> elt -> a -> a) -> a -> Map key elt -> a
- foldRight :: (elt -> a -> a) -> a -> Map key elt -> a
- deleteList :: Ord key => [key] -> Map key elt -> Map key elt
- insertListWith :: Ord key => (elt -> elt -> elt) -> [(key, elt)] -> Map key elt -> Map key elt
- insertList :: Ord key => [(key, elt)] -> Map key elt -> Map key elt
- data GhcNameVersion = GhcNameVersion {}
- data InstalledPackageInfo compid srcpkgid srcpkgname instunitid unitid modulename mod = InstalledPackageInfo {
- unitId :: instunitid
- componentId :: compid
- instantiatedWith :: [(modulename, mod)]
- sourcePackageId :: srcpkgid
- packageName :: srcpkgname
- packageVersion :: Version
- sourceLibName :: Maybe srcpkgname
- abiHash :: String
- depends :: [instunitid]
- abiDepends :: [(instunitid, String)]
- importDirs :: [FilePath]
- hsLibraries :: [String]
- extraLibraries :: [String]
- extraGHCiLibraries :: [String]
- libraryDirs :: [FilePath]
- libraryDynDirs :: [FilePath]
- frameworks :: [String]
- frameworkDirs :: [FilePath]
- ldOptions :: [String]
- ccOptions :: [String]
- includes :: [String]
- includeDirs :: [FilePath]
- haddockInterfaces :: [FilePath]
- haddockHTMLs :: [FilePath]
- exposedModules :: [(modulename, Maybe mod)]
- hiddenModules :: [modulename]
- indefinite :: Bool
- exposed :: Bool
- trusted :: Bool
- data IntegerLibrary
- data PlatformMisc = PlatformMisc {
- platformMisc_targetPlatformString :: String
- platformMisc_integerLibrary :: String
- platformMisc_integerLibraryType :: IntegerLibrary
- platformMisc_ghcWithInterpreter :: Bool
- platformMisc_ghcWithNativeCodeGen :: Bool
- platformMisc_ghcWithSMP :: Bool
- platformMisc_ghcRTSWays :: String
- platformMisc_tablesNextToCode :: Bool
- platformMisc_leadingUnderscore :: Bool
- platformMisc_libFFI :: Bool
- platformMisc_ghcThreaded :: Bool
- platformMisc_ghcDebugged :: Bool
- platformMisc_ghcRtsWithLibdw :: Bool
- platformMisc_llvmTarget :: String
- data ForeignSrcLang
Documentation
The trace function outputs the trace message given as its first argument,
before returning the second argument as its result.
For example, this returns the value of f x but first outputs the message.
>>>let x = 123; f = show>>>trace ("calling f with x = " ++ show x) (f x)"calling f with x = 123 123"
The trace function should only be used for debugging, or for monitoring
execution. The function is not referentially transparent: its type indicates
that it is a pure function but it has the side effect of outputting the
trace message.
Plugin is the compiler plugin data type. Try to avoid
constructing one of these directly, and just modify some fields of
defaultPlugin instead: this is to try and preserve source-code
compatibility when we add fields to this.
Nonetheless, this API is preliminary and highly likely to change in the future.
Constructors
| Plugin | |
Fields
| |
data FrontendPlugin #
Constructors
| FrontendPlugin | |
Fields | |
sortWith :: Ord b => (a -> b) -> [a] -> [a] #
The sortWith function sorts a list of elements using the
user supplied function to project something out of each element
mkNoRepType :: String -> DataType #
Constructs a non-representation for a non-representable type
A Version represents the version of a software entity.
An instance of Eq is provided, which implements exact equality
modulo reordering of the tags in the versionTags field.
An instance of Ord is also provided, which gives lexicographic
ordering on the versionBranch fields (i.e. 2.1 > 2.0, 1.2.3 > 1.2.2,
etc.). This is expected to be sufficient for many uses, but note that
you may need to use a more specific ordering for your versioning
scheme. For example, some versioning schemes may include pre-releases
which have tags "pre1", "pre2", and so on, and these would need to
be taken into account when determining ordering. In some cases, date
ordering may be more appropriate, so the application would have to
look for date tags in the versionTags field and compare those.
The bottom line is, don't always assume that compare and other Ord
operations are the right thing for every Version.
Similarly, concrete representations of versions may differ. One
possible concrete representation is provided (see showVersion and
parseVersion), but depending on the application a different concrete
representation may be more appropriate.
Constructors
| Version | |
Fields
| |
Instances
| IsList Version | Since: base-4.8.0.0 |
| Eq Version | Since: base-2.1 |
| Data Version | Since: base-4.7.0.0 |
Defined in Data.Data Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Version -> c Version # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Version # toConstr :: Version -> Constr # dataTypeOf :: Version -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Version) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Version) # gmapT :: (forall b. Data b => b -> b) -> Version -> Version # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Version -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Version -> r # gmapQ :: (forall d. Data d => d -> u) -> Version -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Version -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Version -> m Version # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Version -> m Version # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Version -> m Version # | |
| Ord Version | Since: base-2.1 |
| Read Version | Since: base-2.1 |
| Show Version | Since: base-2.1 |
| Generic Version | Since: base-4.9.0.0 |
| type Rep Version | |
Defined in Data.Version type Rep Version = D1 ('MetaData "Version" "Data.Version" "base" 'False) (C1 ('MetaCons "Version" 'PrefixI 'True) (S1 ('MetaSel ('Just "versionBranch") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Int]) :*: S1 ('MetaSel ('Just "versionTags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [String]))) | |
| type Item Version | |
type HasCallStack = ?callStack :: CallStack #
Request a CallStack.
NOTE: The implicit parameter ?callStack :: CallStack is an
implementation detail and should not be considered part of the
CallStack API, we may decide to change the implementation in the
future.
Since: base-4.9.0.0
data Serialized #
Represents a serialized value of a particular type. Attempts can be made to deserialize it at certain types
Constructors
| Serialized TypeRep [Word8] |
Instances
| Outputable Serialized | |
Defined in Outputable | |
toSerialized :: Typeable a => (a -> [Word8]) -> a -> Serialized #
Put a Typeable value that we are able to actually turn into bytes into a Serialized value ready for deserialization later
fromSerialized :: Typeable a => ([Word8] -> a) -> Serialized -> Maybe a #
If the Serialized value contains something of the given type, then use the specified deserializer to return Just that.
Otherwise return Nothing.
serializeWithData :: Data a => a -> [Word8] #
Use a Data instance to implement a serialization scheme dual to that of deserializeWithData
deserializeWithData :: Data a => [Word8] -> a #
Use a Data instance to implement a deserialization scheme dual to that of serializeWithData
thNameToGhcName :: Name -> CoreM (Maybe Name) #
Attempt to convert a Template Haskell name to one that GHC can
understand. Original TH names such as those you get when you use
the 'foo syntax will be translated to their equivalent GHC name
exactly. Qualified or unqualified TH names will be dynamically bound
to names in the module being compiled, if possible. Exact TH names
will be bound to the name they represent, exactly.
withPlugins_ :: Monad m => DynFlags -> ConstPluginOperation m a -> a -> m () #
Perform a constant operation by using all of the plugins in turn.
mapPlugins :: DynFlags -> (Plugin -> [CommandLineOption] -> a) -> [a] #
withPlugins :: Monad m => DynFlags -> PluginOperation m a -> a -> m a #
Perform an operation by using all of the plugins in turn.
plugins :: DynFlags -> [PluginWithArgs] #
keepRenamedSource :: [CommandLineOption] -> TcGblEnv -> HsGroup GhcRn -> TcM (TcGblEnv, HsGroup GhcRn) #
A renamer plugin which mades the renamed source available in a typechecker plugin.
defaultPlugin :: Plugin #
Default plugin: does nothing at all, except for marking that safe
inference has failed unless -fplugin-trustworthy is passed. For
compatibility reaso you should base all your plugin definitions on this
default value.
flagRecompile :: [CommandLineOption] -> IO PluginRecompile #
impurePlugin :: [CommandLineOption] -> IO PluginRecompile #
purePlugin :: [CommandLineOption] -> IO PluginRecompile #
lpModuleName :: LoadedPlugin -> ModuleName #
type CommandLineOption = String #
Command line options gathered from the -PModule.Name:stuff syntax are given to you as this type
data PluginWithArgs #
Constructors
| PluginWithArgs | |
Fields
| |
data PluginRecompile #
Constructors
| ForceRecompile | |
| NoForceRecompile | |
| MaybeRecompile Fingerprint |
Instances
| Semigroup PluginRecompile | |
Defined in Plugins Methods (<>) :: PluginRecompile -> PluginRecompile -> PluginRecompile # sconcat :: NonEmpty PluginRecompile -> PluginRecompile # stimes :: Integral b => b -> PluginRecompile -> PluginRecompile # | |
| Monoid PluginRecompile | |
Defined in Plugins Methods mappend :: PluginRecompile -> PluginRecompile -> PluginRecompile # mconcat :: [PluginRecompile] -> PluginRecompile # | |
| Outputable PluginRecompile | |
Defined in Plugins | |
type CorePlugin = [CommandLineOption] -> [CoreToDo] -> CoreM [CoreToDo] #
data HoleFitPluginR #
HoleFitPluginR adds a TcRef to hole fit plugins so that plugins can track internal state. Note the existential quantification, ensuring that the state cannot be modified from outside the plugin.
Arguments
| :: CompilerPhase | Rule activation test |
| -> String | Rule pattern |
| -> (Id -> [CoreRule]) | Rules for an Id |
| -> CoreProgram | Bindings to check in |
| -> SDoc | Resulting check message |
Report partial matches for rules beginning with the specified string for the purposes of error reporting
lookupRule :: DynFlags -> InScopeEnv -> (Activation -> Bool) -> Id -> [CoreExpr] -> [CoreRule] -> Maybe (CoreRule, CoreExpr) #
The main rule matching function. Attempts to apply all (active) supplied rules to this instance of an application in a given context, returning the rule applied and the resulting expression if successful.
pprRuleBase :: RuleBase -> SDoc #
unionRuleBase :: RuleBase -> RuleBase -> RuleBase #
extendRuleBaseList :: RuleBase -> [CoreRule] -> RuleBase #
mkRuleBase :: [CoreRule] -> RuleBase #
rulesOfBinds :: [CoreBind] -> [CoreRule] #
Gather all the rules for locally bound identifiers from the supplied bindings
addIdSpecialisations :: Id -> [CoreRule] -> Id #
addRuleInfo :: RuleInfo -> RuleInfo -> RuleInfo #
extendRuleInfo :: RuleInfo -> [CoreRule] -> RuleInfo #
mkRuleInfo :: [CoreRule] -> RuleInfo #
pprRulesForUser :: DynFlags -> [CoreRule] -> SDoc #
roughTopNames :: [CoreExpr] -> [Maybe Name] #
Find the "top" free names of several expressions. Such names are either:
- The function finally being applied to in an application chain (if that name is a GlobalId: see Var), or
- The
TyConif the expression is aType
This is used for the fast-match-check for rules; if the top names don't match, the rest can't
mkRule :: Module -> Bool -> Bool -> RuleName -> Activation -> Name -> [CoreBndr] -> [CoreExpr] -> CoreExpr -> CoreRule #
substDVarSet :: Subst -> DVarSet -> DVarSet #
substRulesForImportedIds :: Subst -> [CoreRule] -> [CoreRule] #
substIdOcc :: Subst -> Id -> Id #
substIdType :: Subst -> Id -> Id #
getTCvSubst :: Subst -> TCvSubst #
cloneRecIdBndrs :: Subst -> UniqSupply -> [Id] -> (Subst, [Id]) #
Clone a mutually recursive group of Ids
cloneBndrs :: Subst -> UniqSupply -> [Var] -> (Subst, [Var]) #
cloneIdBndrs :: Subst -> UniqSupply -> [Id] -> (Subst, [Id]) #
Applies cloneIdBndr to a number of Ids, accumulating a final
substitution from left to right
cloneIdBndr :: Subst -> UniqSupply -> Id -> (Subst, Id) #
deShadowBinds :: CoreProgram -> CoreProgram #
De-shadowing the program is sometimes a useful pre-pass. It can be done simply by running over the bindings with an empty substitution, because substitution returns a result that has no-shadowing guaranteed.
(Actually, within a single type there might still be shadowing, because
substTy is a no-op for the empty substitution, but that's probably OK.)
- Aug 09
- This function is not used in GHC at the moment, but seems so short and simple that I'm going to leave it here
substExprSC :: SDoc -> Subst -> CoreExpr -> CoreExpr #
Apply a substitution to an entire CoreExpr. Remember, you may only
apply the substitution once:
See Note [Substitutions apply only once] in TyCoSubst
Do *not* attempt to short-cut in the case of an empty substitution! See Note [Extending the Subst]
setInScope :: Subst -> InScopeSet -> Subst #
extendInScopeIds :: Subst -> [Id] -> Subst #
Optimized version of extendInScopeList that can be used if you are certain
all the things being added are Ids and hence none are TyVars or CoVars
extendInScopeList :: Subst -> [Var] -> Subst #
Add the Vars to the in-scope set: see also extendInScope
extendInScope :: Subst -> Var -> Subst #
Add the Var to the in-scope set: as a side effect,
and remove any existing substitutions for it
addInScopeSet :: Subst -> VarSet -> Subst #
Add the Var to the in-scope set, but do not remove
any existing substitutions for it
mkOpenSubst :: InScopeSet -> [(Var, CoreArg)] -> Subst #
Simultaneously substitute for a bunch of variables No left-right shadowing ie the substitution for (x y. e) a1 a2 so neither x nor y scope over a1 a2
extendSubstList :: Subst -> [(Var, CoreArg)] -> Subst #
Add a substitution as appropriate to each of the terms being
substituted (whether expressions, types, or coercions). See also
extendSubst.
extendSubst :: Subst -> Var -> CoreArg -> Subst #
Add a substitution appropriate to the thing being substituted
(whether an expression, type, or coercion). See also
extendIdSubst, extendTvSubst, extendCvSubst
extendTvSubstList :: Subst -> [(TyVar, Type)] -> Subst #
Adds multiple TyVar substitutions to the Subst: see also extendTvSubst
extendIdSubstList :: Subst -> [(Id, CoreExpr)] -> Subst #
Adds multiple Id substitutions to the Subst: see also extendIdSubst
zapSubstEnv :: Subst -> Subst #
substInScope :: Subst -> InScopeSet #
Find the in-scope set: see TyCoSubst Note [The substitution invariant]
mkEmptySubst :: InScopeSet -> Subst #
emptySubst :: Subst #
isEmptySubst :: Subst -> Bool #
A substitution environment, containing Id, TyVar, and CoVar
substitutions.
Some invariants apply to how you use the substitution:
- Note [The substitution invariant] in TyCoSubst
- Note [Substitutions apply only once] in TyCoSubst
Constructors
| Subst InScopeSet IdSubstEnv TvSubstEnv CvSubstEnv |
type IdSubstEnv = IdEnv CoreExpr #
An environment for substituting for Ids
mkAbsentErrorApp :: Type -> String -> CoreExpr #
aBSENT_ERROR_ID :: Id #
tYPE_ERROR_ID :: Id #
pAT_ERROR_ID :: Id #
rEC_CON_ERROR_ID :: Id #
rUNTIME_ERROR_ID :: Id #
rEC_SEL_ERROR_ID :: Id #
mkImpossibleExpr :: Type -> CoreExpr #
mkJustExpr :: Type -> CoreExpr -> CoreExpr #
Makes a Just from a value of the specified type
mkNothingExpr :: Type -> CoreExpr #
Makes a Nothing for the specified type
Arguments
| :: (MonadFail m, MonadThings m, MonadUnique m) | |
| => Type | Type of list elements to be built |
| -> ((Id, Type) -> (Id, Type) -> m CoreExpr) | Function that, given information about the |
| -> m CoreExpr |
Make a build expression applied to a locally-bound worker function
Arguments
| :: MonadThings m | |
| => Type | Element type of the list |
| -> Type | Fold result type |
| -> CoreExpr | Cons function expression for the fold |
| -> CoreExpr | Nil expression for the fold |
| -> CoreExpr | List expression being folded acress |
| -> m CoreExpr |
Make a fully applied foldr expression
mkListExpr :: Type -> [CoreExpr] -> CoreExpr #
Make a list containing the given expressions, where the list has the given type
mkConsExpr :: Type -> CoreExpr -> CoreExpr -> CoreExpr #
Makes a list (:) for lists of the specified type
floatBindings :: FloatBind -> [Var] #
wrapFloats :: [FloatBind] -> CoreExpr -> CoreExpr #
Applies the floats from right to left. That is wrapFloats [b1, b2, …, bn]
u = let b1 in let b2 in … in let bn in u
Arguments
| :: [Id] | The tuple args |
| -> CoreExpr | Body of the case |
| -> Id | A variable of the same type as the scrutinee |
| -> CoreExpr | Scrutinee |
| -> CoreExpr |
As mkTupleCase, but for a tuple that is small enough to be guaranteed
not to need nesting.
Arguments
| :: UniqSupply | For inventing names of intermediate variables |
| -> [Id] | The tuple identifiers to pattern match on |
| -> CoreExpr | Body of the case |
| -> Id | A variable of the same type as the scrutinee |
| -> CoreExpr | Scrutinee |
| -> CoreExpr |
A generalization of mkTupleSelector, allowing the body
of the case to be an arbitrary expression.
To avoid shadowing, we use uniques to invent new variables.
If necessary we pattern match on a "big" tuple.
mkSmallTupleSelector :: [Id] -> Id -> Id -> CoreExpr -> CoreExpr #
mkSmallTupleSelector1 is like mkSmallTupleSelector
but one-tuples are NOT flattened (see Note [Flattening one-tuples])
Like mkTupleSelector but for tuples that are guaranteed
never to be "big".
mkSmallTupleSelector [x] x v e = [| e |]
mkSmallTupleSelector [x,y,z] x v e = [| case e of v { (x,y,z) -> x } |]Arguments
| :: [Id] | The |
| -> Id | The |
| -> Id | A variable of the same type as the scrutinee |
| -> CoreExpr | Scrutinee |
| -> CoreExpr | Selector expression |
Builds a selector which scrutises the given expression and extracts the one name from the list given. If you want the no-shadowing rule to apply, the caller is responsible for making sure that none of these names are in scope.
If there is just one Id in the tuple, then the selector is
just the identity.
If necessary, we pattern match on a "big" tuple.
Arguments
| :: [Id] | The |
| -> Id | The |
| -> Id | A variable of the same type as the scrutinee |
| -> CoreExpr | Scrutinee |
| -> CoreExpr | Selector expression |
mkTupleSelector1 is like mkTupleSelector
but one-tuples are NOT flattened (see Note [Flattening one-tuples])
Builds a selector which scrutises the given expression and extracts the one name from the list given. If you want the no-shadowing rule to apply, the caller is responsible for making sure that none of these names are in scope.
If there is just one Id in the tuple, then the selector is
just the identity.
If necessary, we pattern match on a "big" tuple.
mkBigCoreTupTy :: [Type] -> Type #
Build the type of a big tuple that holds the specified type of thing One-tuples are flattened; see Note [Flattening one-tuples]
mkBigCoreTup :: [CoreExpr] -> CoreExpr #
Build a big tuple holding the specified expressions One-tuples are flattened; see Note [Flattening one-tuples]
mkBigCoreVarTupTy :: [Id] -> Type #
Build the type of a big tuple that holds the specified variables One-tuples are flattened; see Note [Flattening one-tuples]
mkBigCoreVarTup1 :: [Id] -> CoreExpr #
mkBigCoreVarTup :: [Id] -> CoreExpr #
Build a big tuple holding the specified variables One-tuples are flattened; see Note [Flattening one-tuples]
mkCoreTupBoxity :: Boxity -> [CoreExpr] -> CoreExpr #
Make a core tuple of the given boxity; don't flatten 1-tuples
mkCoreUbxTup :: [Type] -> [CoreExpr] -> CoreExpr #
Build a small unboxed tuple holding the specified expressions, with the given types. The types must be the types of the expressions. Do not include the RuntimeRep specifiers; this function calculates them for you. Does not flatten one-tuples; see Note [Flattening one-tuples]
mkCoreTup :: [CoreExpr] -> CoreExpr #
Build a small tuple holding the specified expressions One-tuples are flattened; see Note [Flattening one-tuples]
mkCoreVarTupTy :: [Id] -> Type #
Build the type of a small tuple that holds the specified variables One-tuples are flattened; see Note [Flattening one-tuples]
mkStringExprFSWith :: Monad m => (Name -> m Id) -> FastString -> m CoreExpr #
mkStringExprFS :: MonadThings m => FastString -> m CoreExpr #
Create a CoreExpr which will evaluate to a string morally equivalent to the given FastString
mkStringExpr :: MonadThings m => String -> m CoreExpr #
Create a CoreExpr which will evaluate to the given String
mkCharExpr :: Char -> CoreExpr #
Create a CoreExpr which will evaluate to the given Char
mkDoubleExpr :: Double -> CoreExpr #
Create a CoreExpr which will evaluate to the given Double
mkFloatExpr :: Float -> CoreExpr #
Create a CoreExpr which will evaluate to the given Float
mkNaturalExpr :: MonadThings m => Integer -> m CoreExpr #
Create a CoreExpr which will evaluate to the given Natural
mkIntegerExpr :: MonadThings m => Integer -> m CoreExpr #
Create a CoreExpr which will evaluate to the given Integer
mkWordExprWord :: DynFlags -> Word -> CoreExpr #
Create a CoreExpr which will evaluate to the given Word
mkWordExpr :: DynFlags -> Integer -> CoreExpr #
Create a CoreExpr which will evaluate to the a Word with the given value
mkIntExpr :: DynFlags -> Integer -> CoreExpr #
Create a CoreExpr which will evaluate to the given Int
castBottomExpr :: CoreExpr -> Type -> CoreExpr #
mkWildValBinder :: Type -> Id #
Make a wildcard binder. This is typically used when you need a binder that you expect to use only at a *binding* site. Do not use it at occurrence sites because it has a single, fixed unique, and it's very easy to get into difficulties with shadowing. That's why it is used so little. See Note [WildCard binders] in SimplEnv
mkWildEvBinder :: PredType -> EvVar #
mkCoreApp :: SDoc -> CoreExpr -> CoreExpr -> CoreExpr infixl 4 #
Construct an expression which represents the application of one expression to the other Respects the let/app invariant by building a case expression where necessary See CoreSyn Note [CoreSyn let/app invariant]
mkCoreApps :: CoreExpr -> [CoreExpr] -> CoreExpr infixl 4 #
Construct an expression which represents the application of a number of expressions to another. The leftmost expression in the list is applied first Respects the let/app invariant by building a case expression where necessary See CoreSyn Note [CoreSyn let/app invariant]
mkCoreConApps :: DataCon -> [CoreExpr] -> CoreExpr #
Construct an expression which represents the application of a number of expressions to that of a data constructor expression. The leftmost expression in the list is applied first
mkCoreLets :: [CoreBind] -> CoreExpr -> CoreExpr #
Bind a list of binding groups over an expression. The leftmost binding group becomes the outermost group in the resulting expression
mkCoreLams :: [CoreBndr] -> CoreExpr -> CoreExpr #
Create a lambda where the given expression has a number of variables bound over it. The leftmost binder is that bound by the outermost lambda in the result
mkCoreLet :: CoreBind -> CoreExpr -> CoreExpr #
Bind a binding group over an expression, using a let or case as
appropriate (see CoreSyn)
sortQuantVars :: [Var] -> [Var] #
isJoinBind :: CoreBind -> Bool #
Does this binding bind a join point (or a recursive group of join points)?
collectMakeStaticArgs :: CoreExpr -> Maybe (CoreExpr, Type, CoreExpr, CoreExpr) #
collectMakeStaticArgs (makeStatic t srcLoc e) yields
Just (makeStatic, t, srcLoc, e).
Returns Nothing for every other expression.
True if the type has no non-bottom elements, e.g. when it is an empty datatype, or a GADT with non-satisfiable type parameters, e.g. Int :~: Bool. See Note [Bottoming expressions]
See Note [No alternatives lint check] for another use of this function.
rhsIsStatic :: Platform -> (Name -> Bool) -> (LitNumType -> Integer -> Maybe CoreExpr) -> CoreExpr -> Bool #
This function is called only on *top-level* right-hand sides.
Returns True if the RHS can be allocated statically in the output,
with no thunks involved at all.
diffBinds :: Bool -> RnEnv2 -> [(Var, CoreExpr)] -> [(Var, CoreExpr)] -> ([SDoc], RnEnv2) #
Finds differences between core bindings, see diffExpr.
The main problem here is that while we expect the binds to have the same order in both lists, this is not guaranteed. To do this properly we'd either have to do some sort of unification or check all possible mappings, which would be seriously expensive. So instead we simply match single bindings as far as we can. This leaves us just with mutually recursive and/or mismatching bindings, which we then speculatively match by ordering them. It's by no means perfect, but gets the job done well enough.
diffExpr :: Bool -> RnEnv2 -> CoreExpr -> CoreExpr -> [SDoc] #
Finds differences between core expressions, modulo alpha and
renaming. Setting top means that the IdInfo of bindings will be
checked for differences as well.
Returns True of expressions that are too big to be compared by cheapEqExpr
cheapEqExpr' :: (Tickish Id -> Bool) -> Expr b -> Expr b -> Bool #
Cheap expression equality test, can ignore ticks by type.
cheapEqExpr :: Expr b -> Expr b -> Bool #
A cheap equality test which bales out fast!
If it returns True the arguments are definitely equal,
otherwise, they may or may not be equal.
See also exprIsBig
dataConRepFSInstPat :: [FastString] -> [Unique] -> DataCon -> [Type] -> ([TyCoVar], [Id]) #
exprIsTickedString_maybe :: CoreExpr -> Maybe ByteString #
Extract a literal string from an expression that is zero or more Ticks wrapped around a literal string. Returns Nothing if the expression has a different shape. Used to "look through" Ticks in places that need to handle literal strings.
exprIsTickedString :: CoreExpr -> Bool #
Check if the expression is zero or more Ticks wrapped around a literal string.
exprIsConLike :: CoreExpr -> Bool #
Similar to exprIsHNF but includes CONLIKE functions as well as
data constructors. Conlike arguments are considered interesting by the
inliner.
exprIsHNF :: CoreExpr -> Bool #
exprIsHNF returns true for expressions that are certainly already evaluated to head normal form. This is used to decide whether it's ok to change:
case x of _ -> e
into:
e
and to decide whether it's safe to discard a seq.
So, it does not treat variables as evaluated, unless they say they are. However, it does treat partial applications and constructor applications as values, even if their arguments are non-trivial, provided the argument type is lifted. For example, both of these are values:
(:) (f x) (map f xs) map (...redex...)
because seq on such things completes immediately.
For unlifted argument types, we have to be careful:
C (f x :: Int#)
Suppose f x diverges; then C (f x) is not a value. However this can't
happen: see CoreSyn. This invariant states that arguments of
unboxed type must be ok-for-speculation (or trivial).
altsAreExhaustive :: [Alt b] -> Bool #
exprOkForSideEffects :: CoreExpr -> Bool #
exprOkForSpeculation returns True of an expression that is:
- Safe to evaluate even if normal order eval might not evaluate the expression at all, or
- Safe not to evaluate even if normal order would do so
It is usually called on arguments of unlifted type, but not always
In particular, Simplify.rebuildCase calls it on lifted types
when a 'case' is a plain seq. See the example in
Note [exprOkForSpeculation: case expressions] below
Precisely, it returns True iff:
a) The expression guarantees to terminate,
b) soon,
c) without causing a write side effect (e.g. writing a mutable variable)
d) without throwing a Haskell exception
e) without risking an unchecked runtime exception (array out of bounds,
divide by zero)
For exprOkForSideEffects the list is the same, but omitting (e).
Note that exprIsHNF implies exprOkForSpeculation exprOkForSpeculation implies exprOkForSideEffects
See Note [PrimOp can_fail and has_side_effects] in PrimOp and Note [Transformations affected by can_fail and has_side_effects]
As an example of the considerations in this test, consider:
let x = case y# +# 1# of { r# -> I# r# }
in Ebeing translated to:
case y# +# 1# of { r# ->
let x = I# r#
in E
}We can only do this if the y + 1 is ok for speculation: it has no
side effects, and can't diverge or raise an exception.
exprOkForSpeculation :: CoreExpr -> Bool #
exprOkForSpeculation returns True of an expression that is:
- Safe to evaluate even if normal order eval might not evaluate the expression at all, or
- Safe not to evaluate even if normal order would do so
It is usually called on arguments of unlifted type, but not always
In particular, Simplify.rebuildCase calls it on lifted types
when a 'case' is a plain seq. See the example in
Note [exprOkForSpeculation: case expressions] below
Precisely, it returns True iff:
a) The expression guarantees to terminate,
b) soon,
c) without causing a write side effect (e.g. writing a mutable variable)
d) without throwing a Haskell exception
e) without risking an unchecked runtime exception (array out of bounds,
divide by zero)
For exprOkForSideEffects the list is the same, but omitting (e).
Note that exprIsHNF implies exprOkForSpeculation exprOkForSpeculation implies exprOkForSideEffects
See Note [PrimOp can_fail and has_side_effects] in PrimOp and Note [Transformations affected by can_fail and has_side_effects]
As an example of the considerations in this test, consider:
let x = case y# +# 1# of { r# -> I# r# }
in Ebeing translated to:
case y# +# 1# of { r# ->
let x = I# r#
in E
}We can only do this if the y + 1 is ok for speculation: it has no
side effects, and can't diverge or raise an exception.
exprIsExpandable :: CoreExpr -> Bool #
exprIsCheapX :: CheapAppFun -> CoreExpr -> Bool #
exprIsCheap :: CoreExpr -> Bool #
exprIsWorkFree :: CoreExpr -> Bool #
exprIsDupable :: DynFlags -> CoreExpr -> Bool #
exprIsBottom :: CoreExpr -> Bool #
getIdFromTrivialExpr :: HasDebugCallStack => CoreExpr -> Id #
exprIsTrivial :: CoreExpr -> Bool #
Arguments
| :: [Unique] | Uniques for constructing new binders |
| -> TyCon | Type constructor of scrutinee's type |
| -> [Type] | Type arguments of scrutinee's type |
| -> [AltCon] | Constructors that cannot match the DEFAULT (if any) |
| -> [CoreAlt] | |
| -> (Bool, [CoreAlt]) |
Refine the default alternative to a DataAlt, if there is a unique way to do so.
See Note [Refine Default Alts]
trimConArgs :: AltCon -> [CoreArg] -> [CoreArg] #
Given:
case (C a b x y) of
C b x y -> ...We want to drop the leading type argument of the scrutinee leaving the arguments to match against the pattern
mergeAlts :: [(AltCon, a, b)] -> [(AltCon, a, b)] -> [(AltCon, a, b)] #
Merge alternatives preserving order; alternatives in the first argument shadow ones in the second
findAlt :: AltCon -> [(AltCon, a, b)] -> Maybe (AltCon, a, b) #
Find the case alternative corresponding to a particular constructor: panics if no such constructor exists
isDefaultAlt :: (AltCon, a, b) -> Bool #
addDefault :: [(AltCon, [a], b)] -> Maybe b -> [(AltCon, [a], b)] #
findDefault :: [(AltCon, [a], b)] -> ([(AltCon, [a], b)], Maybe b) #
Extract the default case alternative
Arguments
| :: AltCon | Case alternative constructor |
| -> [CoreBndr] | Things bound by the pattern match |
| -> [Type] | The type arguments to the case alternative |
| -> CoreExpr |
This guy constructs the value that the scrutinee must have given that you are in one particular branch of a case
needsCaseBinding :: Type -> CoreExpr -> Bool #
bindNonRec :: Id -> CoreExpr -> CoreExpr -> CoreExpr #
bindNonRec x r b produces either:
let x = r in b
or:
case r of x { _DEFAULT_ -> b }depending on whether we have to use a case or let
binding for the expression (see needsCaseBinding).
It's used by the desugarer to avoid building bindings
that give Core Lint a heart attack, although actually
the simplifier deals with them perfectly well. See
also mkCoreLet
stripTicksE :: (Tickish Id -> Bool) -> Expr b -> Expr b #
Completely strip ticks satisfying a predicate from an expression. Note this is O(n) in the size of the expression!
stripTicksTopT :: (Tickish Id -> Bool) -> Expr b -> [Tickish Id] #
Strip ticks satisfying a predicate from top of an expression, returning the ticks
stripTicksTopE :: (Tickish Id -> Bool) -> Expr b -> Expr b #
Strip ticks satisfying a predicate from top of an expression, returning the remaining expression
stripTicksTop :: (Tickish Id -> Bool) -> Expr b -> ([Tickish Id], Expr b) #
Strip ticks satisfying a predicate from top of an expression
mkTick :: Tickish Id -> CoreExpr -> CoreExpr #
Wraps the given expression in the source annotation, dropping the annotation if possible.
mkCast :: CoreExpr -> CoercionR -> CoreExpr #
Wrap the given expression in the coercion safely, dropping identity coercions and coalescing nested coercions
applyTypeToArgs :: CoreExpr -> Type -> [CoreExpr] -> Type #
A more efficient version of applyTypeToArg when we have several arguments.
The first argument is just for debugging, and gives some context
isExprLevPoly :: CoreExpr -> Bool #
Is this expression levity polymorphic? This should be the same as saying (isKindLevPoly . typeKind . exprType) but much faster.
coreAltsType :: [CoreAlt] -> Type #
Returns the type of the first alternative, which should be the same as for all alternatives
coreAltType :: CoreAlt -> Type #
Returns the type of the alternatives right hand side
exprType :: CoreExpr -> Type #
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
type CheapAppFun = Id -> Arity -> Bool #
dumpIfSet_dyn :: DumpFlag -> String -> SDoc -> CoreM () #
Show some labelled SDoc if a particular flag is set or at a verbosity level of -v -ddump-most or higher
debugTraceMsg :: SDoc -> CoreM () #
Outputs a debugging message at verbosity level of -v or higher
debugTraceMsgS :: String -> CoreM () #
Output a string debugging message at verbosity level of -v or higher
fatalErrorMsg :: SDoc -> CoreM () #
Output a fatal error to the screen. Does not cause the compiler to die.
fatalErrorMsgS :: String -> CoreM () #
Output a fatal error to the screen. Does not cause the compiler to die.
warnMsg :: WarnReason -> SDoc -> CoreM () #
getFirstAnnotations :: Typeable a => ([Word8] -> a) -> ModGuts -> CoreM (UniqFM a) #
Get at most one annotation of a given type per Unique.
getAnnotations :: Typeable a => ([Word8] -> a) -> ModGuts -> CoreM (UniqFM [a]) #
Get all annotations of a given type. This happens lazily, that is no deserialization will take place until the [a] is actually demanded and the [a] can also be empty (the UniqFM is not filtered).
This should be done once at the start of a Core-to-Core pass that uses annotations.
See Note [Annotations]
getOrigNameCache :: CoreM OrigNameCache #
The original name cache is the current mapping from Module and
OccName to a compiler-wide unique Name
getUniqMask :: CoreM Char #
addSimplCount :: SimplCount -> CoreM () #
getSrcSpanM :: CoreM SrcSpan #
liftIOWithCount :: IO (SimplCount, a) -> CoreM a #
Lift an IO operation into CoreM while consuming its SimplCount
Arguments
| :: HscEnv | |
| -> RuleBase | |
| -> Char | Mask |
| -> Module | |
| -> ModuleSet | |
| -> PrintUnqualified | |
| -> SrcSpan | |
| -> CoreM a | |
| -> IO (a, SimplCount) |
pprSimplCount :: SimplCount -> SDoc #
plusSimplCount :: SimplCount -> SimplCount -> SimplCount #
doSimplTick :: DynFlags -> Tick -> SimplCount -> SimplCount #
doFreeSimplTick :: Tick -> SimplCount -> SimplCount #
hasDetailedCounts :: SimplCount -> Bool #
isZeroSimplCount :: SimplCount -> Bool #
zeroSimplCount :: DynFlags -> SimplCount #
simplCountN :: SimplCount -> Int #
bindsOnlyPass :: (CoreProgram -> CoreM CoreProgram) -> ModGuts -> CoreM ModGuts #
pprPassDetails :: CoreToDo -> SDoc #
Constructors
| SimplMode | |
Fields
| |
data FloatOutSwitches #
Constructors
| FloatOutSwitches | |
Fields
| |
Instances
| Outputable FloatOutSwitches | |
Defined in CoreMonad | |
type CorePluginPass = ModGuts -> CoreM ModGuts #
A description of the plugin pass itself
Constructors
phaseForeignLanguage :: Phase -> Maybe ForeignSrcLang #
Foreign language of the phase if the phase deals with a foreign code
byteCodeOfObject :: Unlinked -> CompiledByteCode #
Retrieve the compiled byte-code if possible. Panic if it is a file-based linkable
nameOfObject :: Unlinked -> FilePath #
Retrieve the filename of the linkable if possible. Panic if it is a byte-code object
isInterpretable :: Unlinked -> Bool #
Is this a bytecode linkable with no file on disk?
linkableObjs :: Linkable -> [FilePath] #
isObjectLinkable :: Linkable -> Bool #
numToTrustInfo :: Word8 -> IfaceTrustInfo #
trustInfoToNum :: IfaceTrustInfo -> Word8 #
isHpcUsed :: HpcInfo -> AnyHpcUsage #
Find out if HPC is used by this module or any of the modules it depends upon
emptyHpcInfo :: AnyHpcUsage -> HpcInfo #
showModMsg :: DynFlags -> HscTarget -> Bool -> ModSummary -> String #
isBootSummary :: ModSummary -> Bool #
Did this ModSummary originate from a hs-boot file?
msObjFilePath :: ModSummary -> FilePath #
msHiFilePath :: ModSummary -> FilePath #
msHsFilePath :: ModSummary -> FilePath #
ms_home_imps :: ModSummary -> [Located ModuleName] #
All of the (possibly) home module imports from a
ModSummary; that is to say, each of these module names
could be a home import if an appropriately named file
existed. (This is in contrast to package qualified
imports, which are guaranteed not to be home imports.)
ms_home_srcimps :: ModSummary -> [Located ModuleName] #
Like ms_home_imps, but for SOURCE imports.
ms_home_allimps :: ModSummary -> [ModuleName] #
home_imps :: [(Maybe FastString, Located ModuleName)] -> [Located ModuleName] #
ms_imps :: ModSummary -> [(Maybe FastString, Located ModuleName)] #
ms_mod_name :: ModSummary -> ModuleName #
mkModuleGraph :: [ModSummary] -> ModuleGraph #
extendMG :: ModuleGraph -> ModSummary -> ModuleGraph #
Add a ModSummary to ModuleGraph. Assumes that the new ModSummary is not an element of the ModuleGraph.
emptyMG :: ModuleGraph #
mgLookupModule :: ModuleGraph -> Module -> Maybe ModSummary #
Look up a ModSummary in the ModuleGraph
mgElemModule :: ModuleGraph -> Module -> Bool #
mgModSummaries :: ModuleGraph -> [ModSummary] #
mgBootModules :: ModuleGraph -> ModuleSet #
mapMG :: (ModSummary -> ModSummary) -> ModuleGraph -> ModuleGraph #
Map a function f over all the ModSummaries.
To preserve invariants f can't change the isBoot status.
needsTemplateHaskellOrQQ :: ModuleGraph -> Bool #
Determines whether a set of modules requires Template Haskell or Quasi Quotes
Note that if the session's DynFlags enabled Template Haskell when
depanal was called, then each module in the returned module graph will
have Template Haskell enabled whether it is actually needed or not.
mkHsSOName :: Platform -> FilePath -> FilePath #
lookupFixity :: FixityEnv -> Name -> Fixity #
mkIfaceWarnCache :: Warnings -> OccName -> Maybe WarningTxt #
Constructs the cache for the mi_warn_fn field of a ModIface
tyThingConLike :: TyThing -> ConLike #
tyThingDataCon :: TyThing -> DataCon #
tyThingCoAxiom :: TyThing -> CoAxiom Branched #
tyThingTyCon :: TyThing -> TyCon #
lookupTypeHscEnv :: HscEnv -> Name -> IO (Maybe TyThing) #
As lookupType, but with a marginally easier-to-use interface
if you have a HscEnv
lookupType :: DynFlags -> HomePackageTable -> PackageTypeEnv -> Name -> Maybe TyThing #
Find the TyThing for the given Name by using all the resources
at our disposal: the compiled modules in the HomePackageTable and the
compiled modules in other packages that live in PackageTypeEnv. Note
that this does NOT look up the TyThing in the module being compiled: you
have to do that yourself, if desired
plusTypeEnv :: TypeEnv -> TypeEnv -> TypeEnv #
extendTypeEnvWithIds :: TypeEnv -> [Id] -> TypeEnv #
extendTypeEnvList :: TypeEnv -> [TyThing] -> TypeEnv #
extendTypeEnv :: TypeEnv -> TyThing -> TypeEnv #
mkTypeEnvWithImplicits :: [TyThing] -> TypeEnv #
typeEnvClasses :: TypeEnv -> [Class] #
typeEnvDataCons :: TypeEnv -> [DataCon] #
typeEnvPatSyns :: TypeEnv -> [PatSyn] #
typeEnvIds :: TypeEnv -> [Id] #
typeEnvCoAxioms :: TypeEnv -> [CoAxiom Branched] #
typeEnvTyCons :: TypeEnv -> [TyCon] #
typeEnvElts :: TypeEnv -> [TyThing] #
emptyTypeEnv :: TypeEnv #
tyThingAvailInfo :: TyThing -> [AvailInfo] #
The Names that a TyThing should bring into scope. Used to build the GlobalRdrEnv for the InteractiveContext.
tyThingsTyCoVars :: [TyThing] -> TyCoVarSet #
tyThingParent_maybe :: TyThing -> Maybe TyThing #
tyThingParent_maybe x returns (Just p) when pprTyThingInContext should print a declaration for p (albeit with some "..." in it) when asked to show x It returns the *immediate* parent. So a datacon returns its tycon but the tycon could be the associated type of a class, so it in turn might have a parent.
isImplicitTyThing :: TyThing -> Bool #
Returns True if there should be no interface-file declaration
for this thing on its own: either it is built-in, or it is part
of some other declaration, or it is generated implicitly by some
other declaration.
implicitTyConThings :: TyCon -> [TyThing] #
implicitClassThings :: Class -> [TyThing] #
implicitTyThings :: TyThing -> [TyThing] #
pkgQual :: DynFlags -> PrintUnqualified #
A function which only qualifies package names if necessary; but qualifies all other identifiers.
mkQualPackage :: DynFlags -> QueryQualifyPackage #
Creates a function for formatting packages based on two heuristics: (1) don't qualify if the package in question is "main", and (2) only qualify with a unit id if the package ID would be ambiguous.
mkQualModule :: DynFlags -> QueryQualifyModule #
Creates a function for formatting modules based on two heuristics: (1) if the module is the current module, don't qualify, and (2) if there is only one exposed package which exports this module, don't qualify.
mkPrintUnqualified :: DynFlags -> GlobalRdrEnv -> PrintUnqualified #
Creates some functions that work out the best ways to format names for the user according to a set of heuristics.
icExtendGblRdrEnv :: GlobalRdrEnv -> [TyThing] -> GlobalRdrEnv #
Add TyThings to the GlobalRdrEnv, earlier ones in the list shadowing later ones, and shadowing existing entries in the GlobalRdrEnv.
setInteractivePackage :: HscEnv -> HscEnv #
extendInteractiveContext :: InteractiveContext -> [TyThing] -> [ClsInst] -> [FamInst] -> Maybe [Type] -> FixityEnv -> InteractiveContext #
extendInteractiveContext is called with new TyThings recently defined to update the InteractiveContext to include them. Ids are easily removed when shadowed, but Classes and TyCons are not. Some work could be done to determine whether they are entirely shadowed, but as you could still have references to them (e.g. instances for classes or values of the type for TyCons), it's not clear whether removing them is even the appropriate behavior.
icPrintUnqual :: DynFlags -> InteractiveContext -> PrintUnqualified #
Get the PrintUnqualified function based on the flags and this InteractiveContext
icInScopeTTs :: InteractiveContext -> [TyThing] #
This function returns the list of visible TyThings (useful for e.g. showBindings)
emptyInteractiveContext :: DynFlags -> InteractiveContext #
Constructs an empty InteractiveContext.
appendStubC :: ForeignStubs -> SDoc -> ForeignStubs #
importedByUser :: [ImportedBy] -> [ImportedModsVal] #
emptyModDetails :: ModDetails #
Constructs an empty ModDetails
mkIfaceHashCache :: [(Fingerprint, IfaceDecl)] -> OccName -> Maybe (OccName, Fingerprint) #
Constructs cache for the mi_hash_fn field of a ModIface
emptyFullModIface :: Module -> ModIface #
renameFreeHoles :: UniqDSet ModuleName -> [(ModuleName, Module)] -> UniqDSet ModuleName #
Given a set of free holes, and a unit identifier, rename
the free holes according to the instantiation of the unit
identifier. For example, if we have A and B free, and
our unit identity is p[A=C,B=impl:B], the renamed free
holes are just C.
mi_free_holes :: ModIface -> UniqDSet ModuleName #
The "precise" free holes, e.g., the signatures that this
ModIface depends on.
mi_semantic_module :: forall (a :: ModIfacePhase). ModIface_ a -> Module #
The semantic module for this interface; e.g., if it's a interface
for a signature, if mi_module is p[A=A]:A, mi_semantic_module
will be A.
mi_fix :: ModIface -> OccName -> Fixity #
Lookups up a (possibly cached) fixity from a ModIface. If one cannot be
found, defaultFixity is returned instead.
Old-style accessor for whether or not the ModIface came from an hs-boot file.
prepareAnnotations :: HscEnv -> Maybe ModGuts -> IO AnnEnv #
Deal with gathering annotations in from all possible places
and combining them into a single AnnEnv
metaRequestAW :: Functor f => MetaHook f -> LHsExpr GhcTc -> f Serialized #
hptRules :: HscEnv -> [(ModuleName, IsBootInterface)] -> [CoreRule] #
Get rules from modules "below" this one (in the dependency sense)
hptInstances :: HscEnv -> (ModuleName -> Bool) -> ([ClsInst], [FamInst]) #
Find all the instance declarations (of classes and families) from
the Home Package Table filtered by the provided predicate function.
Used in tcRnImports, to select the instances that are in the
transitive closure of imports from the currently compiled module.
hptCompleteSigs :: HscEnv -> [CompleteMatch] #
lookupIfaceByModule :: HomePackageTable -> PackageIfaceTable -> Module -> Maybe ModIface #
lookupHptByModule :: HomePackageTable -> Module -> Maybe HomeModInfo #
listToHpt :: [(ModuleName, HomeModInfo)] -> HomePackageTable #
addListToHpt :: HomePackageTable -> [(ModuleName, HomeModInfo)] -> HomePackageTable #
addToHpt :: HomePackageTable -> ModuleName -> HomeModInfo -> HomePackageTable #
mapHpt :: (HomeModInfo -> HomeModInfo) -> HomePackageTable -> HomePackageTable #
allHpt :: (HomeModInfo -> Bool) -> HomePackageTable -> Bool #
filterHpt :: (HomeModInfo -> Bool) -> HomePackageTable -> HomePackageTable #
eltsHpt :: HomePackageTable -> [HomeModInfo] #
lookupHptDirectly :: HomePackageTable -> Unique -> Maybe HomeModInfo #
lookupHpt :: HomePackageTable -> ModuleName -> Maybe HomeModInfo #
pprHPT :: HomePackageTable -> SDoc #
emptyPackageIfaceTable :: PackageIfaceTable #
Constructs an empty PackageIfaceTable
emptyHomePackageTable :: HomePackageTable #
Constructs an empty HomePackageTable
pprTargetId :: TargetId -> SDoc #
hscEPS :: HscEnv -> IO ExternalPackageState #
Retrieve the ExternalPackageState cache.
handleFlagWarnings :: DynFlags -> [Warn] -> IO () #
printOrThrowWarnings :: DynFlags -> Bag WarnMsg -> IO () #
Given a bag of warnings, turn them into an exception if -Werror is enabled, or print them out otherwise.
Arguments
| :: ExceptionMonad m | |
| => (SourceError -> m a) | exception handler |
| -> m a | action to perform |
| -> m a |
Perform the given action and call the exception handler if the action
throws a SourceError. See SourceError for more information.
throwOneError :: MonadIO io => ErrMsg -> io a #
throwErrors :: MonadIO io => ErrorMessages -> io a #
mkApiErr :: DynFlags -> SDoc -> GhcApiError #
mkSrcErr :: ErrorMessages -> SourceError #
runInteractiveHsc :: HscEnv -> Hsc a -> IO a #
mkInteractiveHscEnv :: HscEnv -> HscEnv #
Status of a compilation to hard-code
Constructors
| HscNotGeneratingCode ModIface | Nothing to do. |
| HscUpToDate ModIface | Nothing to do because code already exists. |
| HscUpdateBoot ModIface | Update boot file result. |
| HscUpdateSig ModIface | Generate signature file (backpack) |
| HscRecomp | Recompile this module. |
Fields
| |
Constructors
| Hsc (HscEnv -> WarningMessages -> IO (a, WarningMessages)) |
Instances
| Monad Hsc | |
| Functor Hsc | |
| Applicative Hsc | |
| MonadIO Hsc | |
| HasDynFlags Hsc | |
Defined in HscTypes Methods getDynFlags :: Hsc DynFlags # | |
data SourceError #
A source error is an error that is caused by one or more errors in the
source code. A SourceError is thrown by many functions in the
compilation pipeline. Inside GHC these errors are merely printed via
log_action, but API clients may treat them differently, for example,
insert them into a list box. If you want the default behaviour, use the
idiom:
handleSourceError printExceptionAndWarnings $ do ... api calls that may fail ...
The SourceErrors error messages can be accessed via srcErrorMessages.
This list may be empty if the compiler failed due to -Werror
(Opt_WarnIsError).
See printExceptionAndWarnings for more information on what to take care
of when writing a custom error handler.
Instances
| Show SourceError | |
Defined in HscTypes Methods showsPrec :: Int -> SourceError -> ShowS # show :: SourceError -> String # showList :: [SourceError] -> ShowS # | |
| Exception SourceError | |
Defined in HscTypes Methods toException :: SourceError -> SomeException # fromException :: SomeException -> Maybe SourceError # displayException :: SourceError -> String # | |
data GhcApiError #
An error thrown if the GHC API is used in an incorrect fashion.
Instances
| Show GhcApiError | |
Defined in HscTypes Methods showsPrec :: Int -> GhcApiError -> ShowS # show :: GhcApiError -> String # showList :: [GhcApiError] -> ShowS # | |
| Exception GhcApiError | |
Defined in HscTypes Methods toException :: GhcApiError -> SomeException # fromException :: SomeException -> Maybe GhcApiError # displayException :: GhcApiError -> String # | |
HscEnv is like Session, except that some of the fields are immutable.
An HscEnv is used to compile a single module from plain Haskell source
code (after preprocessing) to either C, assembly or C--. It's also used
to store the dynamic linker state to allow for multiple linkers in the
same address space.
Things like the module graph don't change during a single compilation.
Historical note: "hsc" used to be the name of the compiler binary, when there was a separate driver and compiler. To compile a single module, the driver would invoke hsc on the source code... so nowadays we think of hsc as the layer of the compiler that deals with compiling a single module.
Constructors
| HscEnv | |
Fields
| |
Constructors
| IServ | |
Fields
| |
A compilation target.
A target may be supplied with the actual text of the module. If so, use this instead of the file contents (this is for use in an IDE where the file hasn't been saved by the user yet).
Constructors
| Target | |
Fields
| |
Constructors
| TargetModule ModuleName | A module name: search for the file |
| TargetFile FilePath (Maybe Phase) | A filename: preprocess & parse it to find the module name. If specified, the Phase indicates how to compile this file (which phase to start from). Nothing indicates the starting phase should be determined from the suffix of the filename. |
type InputFileBuffer = StringBuffer #
type HomePackageTable = DModuleNameEnv HomeModInfo #
Helps us find information about modules in the home package
type PackageIfaceTable = ModuleEnv ModIface #
Helps us find information about modules in the imported packages
data HomeModInfo #
Information about modules in the package being compiled
Constructors
| HomeModInfo | |
Fields
| |
data MetaRequest #
The supported metaprogramming result types
Constructors
| MetaE (LHsExpr GhcPs -> MetaResult) | |
| MetaP (LPat GhcPs -> MetaResult) | |
| MetaT (LHsType GhcPs -> MetaResult) | |
| MetaD ([LHsDecl GhcPs] -> MetaResult) | |
| MetaAW (Serialized -> MetaResult) |
data MetaResult #
data constructors not exported to ensure correct result type
type MetaHook (f :: Type -> Type) = MetaRequest -> LHsExpr GhcTc -> f MetaResult #
type FinderCache = InstalledModuleEnv InstalledFindResult #
The FinderCache maps modules to the result of
searching for that module. It records the results of searching for
modules along the search path. On :load, we flush the entire
contents of this cache.
data InstalledFindResult #
data FindResult #
The result of searching for an imported module.
NB: FindResult manages both user source-import lookups
(which can result in Module) as well as direct imports
for interfaces (which always result in InstalledModule).
Constructors
| Found ModLocation Module | The module was found |
| NoPackage UnitId | The requested package was not found |
| FoundMultiple [(Module, ModuleOrigin)] | _Error_: both in multiple packages |
| NotFound | Not found |
Fields
| |
type PartialModIface = ModIface_ 'ModIfaceCore #
data ModIfaceBackend #
Extends a PartialModIface with information which is either: * Computed after codegen * Or computed just before writing the iface to disk. (Hashes) In order to fully instantiate it.
Constructors
| ModIfaceBackend | |
Fields
| |
data ModIface_ (phase :: ModIfacePhase) #
A ModIface plus a ModDetails summarises everything we know
about a compiled module. The ModIface is the stuff *before* linking,
and can be written out to an interface file. The 'ModDetails is after
linking and can be completely recovered from just the ModIface.
When we read an interface file, we also construct a ModIface from it,
except that we explicitly make the mi_decls and a few other fields empty;
as when reading we consolidate the declarations etc. into a number of indexed
maps and environments in the ExternalPackageState.
Constructors
| ModIface | |
Fields
| |
type IfaceExport = AvailInfo #
The original names declared of a certain module that are exported
data ModDetails #
The ModDetails is essentially a cache for information in the ModIface
for home modules only. Information relating to packages will be loaded into
global environments in ExternalPackageState.
Constructors
| ModDetails | |
Fields
| |
type ImportedMods = ModuleEnv [ImportedBy] #
Records the modules directly imported by a module for extracting e.g. usage information, and also to give better error message
data ImportedBy #
If a module was "imported" by the user, we associate it with
more detailed usage information ImportedModsVal; a module
imported by the system only gets used for usage information.
Constructors
| ImportedByUser ImportedModsVal | |
| ImportedBySystem |
data ImportedModsVal #
Constructors
| ImportedModsVal | |
Fields
| |
A ModGuts is carried through the compiler, accumulating stuff as it goes
There is only one ModGuts at any time, the one for the module
being compiled right now. Once it is compiled, a ModIface and
ModDetails are extracted and the ModGuts is discarded.
Constructors
| ModGuts | |
Fields
| |
A restricted form of ModGuts for code generation purposes
Constructors
| CgGuts | |
Fields
| |
data ForeignStubs #
Foreign export stubs
Constructors
| NoStubs | We don't have any stubs |
| ForeignStubs SDoc SDoc | There are some stubs. Parameters: 1) Header file prototypes for "foreign exported" functions 2) C stubs to use when calling "foreign exported" functions |
data InteractiveContext #
Interactive context, recording information about the state of the context in which statements are executed in a GHCi session.
Constructors
| InteractiveContext | |
Fields
| |
data InteractiveImport #
Constructors
| IIDecl (ImportDecl GhcPs) | Bring the exports of a particular module (filtered by an import decl) into scope |
| IIModule ModuleName | Bring into scope the entire top-level envt of of this module, including the things imported into it. |
Instances
| Outputable InteractiveImport | |
Defined in HscTypes | |
class Monad m => MonadThings (m :: Type -> Type) where #
Class that abstracts out the common ability of the monads in GHC
to lookup a TyThing in the monadic environment by Name. Provides
a number of related convenience functions for accessing particular
kinds of TyThing
Minimal complete definition
Warning information for a module
Constructors
| NoWarnings | Nothing deprecated |
| WarnAll WarningTxt | Whole module deprecated |
| WarnSome [(OccName, WarningTxt)] | Some specific things deprecated |
Fixity information for an Name. We keep the OccName in the range
so that we can generate an interface from it
type WhetherHasOrphans = Bool #
Records whether a module has orphans. An "orphan" is one of:
- An instance declaration in a module other than the definition module for one of the type constructors or classes in the instance head
- A transformation rule in a module other than the one defining the function in the head of the rule
type IsBootInterface = Bool #
Did this module originate from a *-boot file?
data Dependencies #
Dependency information about ALL modules and packages below this one in the import hierarchy.
Invariant: the dependencies of a module M never includes M.
Invariant: none of the lists contain duplicates.
Constructors
| Deps | |
Fields
| |
Instances
| Eq Dependencies | |
Defined in HscTypes | |
| Binary Dependencies | |
Defined in HscTypes Methods put_ :: BinHandle -> Dependencies -> IO () # put :: BinHandle -> Dependencies -> IO (Bin Dependencies) # get :: BinHandle -> IO Dependencies # | |
Records modules for which changes may force recompilation of this module See wiki: https://gitlab.haskell.org/ghc/ghc/wikis/commentary/compiler/recompilation-avoidance
This differs from Dependencies. A module X may be in the dep_mods of this module (via an import chain) but if we don't use anything from X it won't appear in our Usage
Constructors
| UsagePackageModule | Module from another package |
Fields
| |
| UsageHomeModule | Module from the current package
| A file upon which the module depends, e.g. a CPP #include, or using TH's
|
Fields
| |
| UsageFile | |
Fields
| |
| UsageMergedRequirement | A requirement which was merged into this one. |
Fields
| |
type PackageTypeEnv = TypeEnv #
type PackageRuleBase = RuleBase #
type PackageInstEnv = InstEnv #
type PackageFamInstEnv = FamInstEnv #
data ExternalPackageState #
Information about other packages that we have slurped in by reading their interface files
Constructors
| EPS | |
Fields
| |
Accumulated statistics about what we are putting into the ExternalPackageState.
"In" means stuff that is just read from interface files,
"Out" means actually sucked in and type-checked
Constructors
| EpsStats | |
Fields
| |
data ModuleGraph #
A ModuleGraph contains all the nodes from the home package (only). There will be a node for each source module, plus a node for each hi-boot module.
The graph is not necessarily stored in topologically-sorted order. Use
topSortModuleGraph and flattenSCC to achieve this.
data ModSummary #
A single node in a ModuleGraph. The nodes of the module graph
are one of:
- A regular Haskell source module
- A hi-boot source module
Constructors
| ModSummary | |
Fields
| |
Instances
| Outputable ModSummary | |
Defined in HscTypes | |
data SourceModified #
Indicates whether a given module's source has been modified since it was last compiled.
Constructors
| SourceModified | the source has been modified |
| SourceUnmodified | the source has not been modified. Compilation may or may not be necessary, depending on whether any dependencies have changed since we last compiled. |
| SourceUnmodifiedAndStable | the source has not been modified, and furthermore all of its (transitive) dependencies are up to date; it definitely does not need to be recompiled. This is important for two reasons: (a) we can omit the version check in checkOldIface, and (b) if the module used TH splices we don't need to force recompilation. |
Information about a modules use of Haskell Program Coverage
Constructors
| HpcInfo | |
Fields
| |
| NoHpcInfo | |
Fields
| |
type AnyHpcUsage = Bool #
This is used to signal if one of my imports used HPC instrumentation even if there is no module-local HPC usage
type IsSafeImport = Bool #
Is an import a safe import?
data IfaceTrustInfo #
Safe Haskell information for ModIface
Simply a wrapper around SafeHaskellMode to sepperate iface and flags
Instances
| Binary IfaceTrustInfo | |
Defined in HscTypes Methods put_ :: BinHandle -> IfaceTrustInfo -> IO () # put :: BinHandle -> IfaceTrustInfo -> IO (Bin IfaceTrustInfo) # get :: BinHandle -> IO IfaceTrustInfo # | |
| Outputable IfaceTrustInfo | |
Defined in HscTypes | |
data HsParsedModule #
Constructors
| HsParsedModule | |
Fields
| |
data CompleteMatch #
A list of conlikes which represents a complete pattern match.
These arise from COMPLETE signatures.
Constructors
| CompleteMatch | |
Fields
| |
Instances
| Outputable CompleteMatch | |
Defined in HscTypes | |
type CompleteMatchMap = UniqFM [CompleteMatch] #
A map keyed by the completeMatchTyCon.
freeVars :: CoreExpr -> CoreExprWithFVs #
Annotate a CoreExpr with its (non-global) free type
and value variables at every tree node.
freeVarsBind :: CoreBind -> DVarSet -> (CoreBindWithFVs, DVarSet) #
stableUnfoldingVars :: Unfolding -> Maybe VarSet #
idUnfoldingVars :: Id -> VarSet #
idRuleVars :: Id -> VarSet #
dIdFreeVars :: Id -> DVarSet #
idFreeVars :: Id -> VarSet #
varTypeTyCoFVs :: Var -> FV #
varTypeTyCoVars :: Var -> TyCoVarSet #
freeVarsOfAnn :: FVAnn -> DIdSet #
Extract the vars reported in a FVAnn
freeVarsOf :: CoreExprWithFVs -> DIdSet #
Inverse function to freeVars
ruleLhsFreeIdsList :: CoreRule -> [Var] #
This finds all locally-defined free Ids on the left hand side of a rule and returns them as a determinisitcally ordered list
ruleLhsFreeIds :: CoreRule -> VarSet #
This finds all locally-defined free Ids on the left hand side of a rule and returns them as a non-deterministic set
rulesFreeVars :: [CoreRule] -> VarSet #
Those variables free in the right hand side of several rules
idRuleRhsVars :: (Activation -> Bool) -> Id -> VarSet #
rulesFreeVarsDSet :: [CoreRule] -> DVarSet #
Those variables free in the both the left right hand sides of rules returned as a deterministic set
ruleFreeVars :: CoreRule -> VarSet #
Those variables free in the both the left right hand sides of a rule returned as a non-deterministic set
ruleRhsFreeVars :: CoreRule -> VarSet #
Those variables free in the right hand side of a rule returned as a non-deterministic set
orphNamesOfFamInst :: FamInst -> NameSet #
orphNamesOfAxiom collects the names of the concrete types and type constructors that make up the LHS of a type family instance, including the family name itself.
For instance, given `type family Foo a b`: `type instance Foo (F (G (H a))) b = ...` would yield [Foo,F,G,H]
Used in the implementation of ":info" in GHCi.
orphNamesOfAxiom :: forall (br :: BranchFlag). CoAxiom br -> NameSet #
orphNamesOfCoCon :: forall (br :: BranchFlag). CoAxiom br -> NameSet #
orphNamesOfCo :: Coercion -> NameSet #
orphNamesOfTypes :: [Type] -> NameSet #
orphNamesOfType :: Type -> NameSet #
exprsOrphNames :: [CoreExpr] -> NameSet #
Finds the free external names of several expressions: see exprOrphNames for details
exprsSomeFreeVarsList :: InterestingVarFun -> [CoreExpr] -> [Var] #
Finds free variables in several expressions selected by a predicate returning a deterministically ordered list.
exprsSomeFreeVars :: InterestingVarFun -> [CoreExpr] -> VarSet #
Finds free variables in several expressions selected by a predicate
Arguments
| :: InterestingVarFun | Says which |
| -> CoreExpr | |
| -> [Var] |
Finds free variables in an expression selected by a predicate returning a deterministically ordered list.
Arguments
| :: InterestingVarFun | Says which |
| -> CoreExpr | |
| -> VarSet |
Finds free variables in an expression selected by a predicate
bindFreeVars :: CoreBind -> VarSet #
Find all locally defined free Ids in a binding group
exprsFreeVarsList :: [CoreExpr] -> [Var] #
Find all locally-defined free Ids or type variables in several expressions returning a deterministically ordered list.
exprsFreeVars :: [CoreExpr] -> VarSet #
Find all locally-defined free Ids or type variables in several expressions returning a non-deterministic set.
exprsFreeIdsList :: [CoreExpr] -> [Id] #
Find all locally-defined free Ids in several expressions returning a deterministically ordered list.
exprsFreeIdsDSet :: [CoreExpr] -> DIdSet #
Find all locally-defined free Ids in several expressions returning a deterministic set.
exprFreeIdsList :: CoreExpr -> [Id] #
Find all locally-defined free Ids in an expression returning a deterministically ordered list.
exprFreeIdsDSet :: CoreExpr -> DIdSet #
Find all locally-defined free Ids in an expression returning a deterministic set.
exprFreeIds :: CoreExpr -> IdSet #
Find all locally-defined free Ids in an expression
exprFreeVarsList :: CoreExpr -> [Var] #
Find all locally-defined free Ids or type variables in an expression returning a deterministically ordered list.
exprFreeVarsDSet :: CoreExpr -> DVarSet #
Find all locally-defined free Ids or type variables in an expression returning a deterministic set.
exprFreeVars :: CoreExpr -> VarSet #
Find all locally-defined free Ids or type variables in an expression returning a non-deterministic set.
type CoreBindWithFVs = AnnBind Id FVAnn #
Every node in a binding group annotated with its (non-global) free variables, both Ids and TyVars, and type.
type CoreExprWithFVs = AnnExpr Id FVAnn #
Every node in an expression annotated with its (non-global) free variables, both Ids and TyVars, and type. NB: see Note [The FVAnn invariant]
type CoreExprWithFVs' = AnnExpr' Id FVAnn #
type CoreAltWithFVs = AnnAlt Id FVAnn #
Every node in an expression annotated with its (non-global) free variables, both Ids and TyVars, and type.
Information we can use to dynamically link modules into the compiler
Constructors
| LM | |
Fields
| |
Objects which have yet to be linked by the compiler
Constructors
| DotO FilePath | An object file (.o) |
| DotA FilePath | Static archive file (.a) |
| DotDLL FilePath | Dynamically linked library file (.so, .dll, .dylib) |
| BCOs CompiledByteCode [SptEntry] | A byte-code object, lives only in memory. Also carries some static pointer table entries which should be loaded along with the BCOs. See Note [Grant plan for static forms] in StaticPtrTable. |
An entry to be inserted into a module's static pointer table. See Note [Grand plan for static forms] in StaticPtrTable.
Constructors
| SptEntry Id Fingerprint |
Construct an empty ModBreaks
data CompiledByteCode #
Instances
| Outputable CompiledByteCode | |
Defined in ByteCodeTypes | |
All the information about the breakpoints for a module
Constructors
| ModBreaks | |
Fields
| |
mkTupleTy1 :: Boxity -> [Type] -> Type #
Make a tuple type. The list of types should not include any RuntimeRep specifications. Boxed 1-tuples are *not* flattened. See Note [One-tuples] and Note [Don't flatten tuples from HsSyn] in MkCore
mkTupleTy :: Boxity -> [Type] -> Type #
Make a tuple type. The list of types should not include any RuntimeRep specifications. Boxed 1-tuples are flattened. See Note [One-tuples]
justDataCon :: DataCon #
maybeTyCon :: TyCon #
consDataCon :: DataCon #
nilDataCon :: DataCon #
ordGTDataConId :: Id #
ordEQDataConId :: Id #
ordLTDataConId :: Id #
ordGTDataCon :: DataCon #
ordEQDataCon :: DataCon #
ordLTDataCon :: DataCon #
orderingTyCon :: TyCon #
trueDataConId :: Id #
falseDataConId :: Id #
trueDataCon :: DataCon #
falseDataCon :: DataCon #
doubleTyCon :: TyCon #
floatDataCon :: DataCon #
floatTyCon :: TyCon #
word8DataCon :: DataCon #
word8TyCon :: TyCon #
wordDataCon :: DataCon #
intDataCon :: DataCon #
charDataCon :: DataCon #
boxingDataCon_maybe :: TyCon -> Maybe DataCon #
liftedRepTy :: Type #
coercibleClass :: Class #
heqDataCon :: DataCon #
unboxedSumKind :: [Type] -> Kind #
Specialization of unboxedTupleSumKind for sums
sumDataCon :: ConTag -> Arity -> DataCon #
Data constructor for i-th alternative of a n-ary unboxed sum.
unitDataConId :: Id #
unitDataCon :: DataCon #
unitTyConKey :: Unique #
tupleDataConName :: Boxity -> Arity -> Name #
tupleDataCon :: Boxity -> Arity -> DataCon #
promotedTupleDataCon :: Boxity -> Arity -> TyCon #
tupleTyCon :: Boxity -> Arity -> TyCon #
cTupleDataConNames :: [Name] #
cTupleDataConName :: Arity -> Name #
cTupleTyConNameArity_maybe :: Name -> Maybe Arity #
If the given name is that of a constraint tuple, return its arity. Note that this is inefficient.
isCTupleTyConName :: Name -> Bool #
cTupleTyConNames :: [Name] #
cTupleTyConName :: Arity -> Name #
mkTupleStr :: Boxity -> Arity -> String #
isBuiltInOcc_maybe :: OccName -> Maybe Name #
Built-in syntax isn't "in scope" so these OccNames map to wired-in Names with BuiltInSyntax. However, this should only be necessary while resolving names produced by Template Haskell splices since we take care to encode built-in syntax names specially in interface files. See Note [Symbol table representation of names].
Moreover, there is no need to include names of things that the user can't write (e.g. type representation bindings like $tc(,,,)).
typeToTypeKind :: Kind #
typeNatKindCon :: TyCon #
intTyCon_RDR :: RdrName #
makeRecoveryTyCon :: TyCon -> TyCon #
Make a fake, recovery TyCon from an existing one.
Used when recovering from errors in type declarations
doubleTyConName :: Name #
floatTyConName :: Name #
word8TyConName :: Name #
wordTyConName :: Name #
justDataConName :: Name #
maybeTyConName :: Name #
consDataConName :: Name #
nilDataConName :: Name #
listTyConName :: Name #
boolTyConName :: Name #
intTyConName :: Name #
charTyConName :: Name #
heqTyConName :: Name #
eqTyCon_RDR :: RdrName #
eqTyConName :: Name #
mkWiredInIdName :: Module -> FastString -> Unique -> Id -> Name #
mkWiredInTyConName :: BuiltInSyntax -> Module -> FastString -> Unique -> TyCon -> Name #
wiredInTyCons :: [TyCon] #
isNeverLevPolyId :: Id -> Bool #
zapStableUnfolding :: Id -> Id #
zapIdTailCallInfo :: Id -> Id #
zapIdUsedOnceInfo :: Id -> Id #
zapIdUsageEnvInfo :: Id -> Id #
zapIdUsageInfo :: Id -> Id #
zapIdDemandInfo :: Id -> Id #
zapFragileIdInfo :: Id -> Id #
zapLamIdInfo :: Id -> Id #
updOneShotInfo :: Id -> OneShotInfo -> Id #
setIdOneShotInfo :: Id -> OneShotInfo -> Id infixl 1 #
clearOneShotLambda :: Id -> Id #
setOneShotLambda :: Id -> Id #
isProbablyOneShotLambda :: Id -> Bool #
isStateHackType :: Type -> Bool #
typeOneShot :: Type -> OneShotInfo #
stateHackOneShot :: OneShotInfo #
Should we apply the state hack to values of this Type?
isOneShotBndr :: Var -> Bool #
Returns whether the lambda associated with the Id is certainly applied at most once
This one is the "business end", called externally.
It works on type variables as well as Ids, returning True
Its main purpose is to encapsulate the Horrible State Hack
See Note [The state-transformer hack] in CoreArity
idStateHackOneShotInfo :: Id -> OneShotInfo #
Like idOneShotInfo, but taking the Horrible State Hack in to account
See Note [The state-transformer hack] in CoreArity
idOneShotInfo :: Id -> OneShotInfo #
isConLikeId :: Id -> Bool #
idRuleMatchInfo :: Id -> RuleMatchInfo #
setInlineActivation :: Id -> Activation -> Id infixl 1 #
idInlineActivation :: Id -> Activation #
modifyInlinePragma :: Id -> (InlinePragma -> InlinePragma) -> Id #
setInlinePragma :: Id -> InlinePragma -> Id infixl 1 #
idInlinePragma :: Id -> InlinePragma #
zapIdOccInfo :: Id -> Id #
setIdOccInfo :: Id -> OccInfo -> Id infixl 1 #
setIdCafInfo :: Id -> CafInfo -> Id #
setIdSpecialisation :: Id -> RuleInfo -> Id infixl 1 #
idHasRules :: Id -> Bool #
idCoreRules :: Id -> [CoreRule] #
idSpecialisation :: Id -> RuleInfo #
setCaseBndrEvald :: StrictnessMark -> Id -> Id #
setIdDemandInfo :: Id -> Demand -> Id infixl 1 #
idDemandInfo :: Id -> Demand #
setIdUnfolding :: Id -> Unfolding -> Id infixl 1 #
realIdUnfolding :: Id -> Unfolding #
idUnfolding :: Id -> Unfolding #
isStrictId :: Id -> Bool #
This predicate says whether the Id has a strict demand placed on it or
has a type such that it can always be evaluated strictly (i.e an
unlifted type, as of GHC 7.6). We need to
check separately whether the Id has a so-called "strict type" because if
the demand for the given id hasn't been computed yet but id has a strict
type, we still want isStrictId id to be True.
zapIdStrictness :: Id -> Id #
setIdStrictness :: Id -> StrictSig -> Id infixl 1 #
idStrictness :: Id -> StrictSig #
Accesses the Id's strictnessInfo.
isBottomingId :: Var -> Bool #
Returns true if an application to n args would diverge
idFunRepArity :: Id -> RepArity #
setIdCallArity :: Id -> Arity -> Id infixl 1 #
idCallArity :: Id -> Arity #
setIdArity :: Id -> Arity -> Id infixl 1 #
idJoinArity :: JoinId -> JoinArity #
isDeadBinder :: Id -> Bool #
isImplicitId :: Id -> Bool #
isImplicitId tells whether an Ids info is implied by other
declarations, so we don't need to put its signature in an interface
file, even if it's mentioned in some other interface unfolding.
hasNoBinding :: Id -> Bool #
Returns True of an Id which may not have a
binding, even though it is defined in this module.
Get from either the worker or the wrapper Id to the DataCon. Currently used only in the desugarer.
INVARIANT: idDataCon (dataConWrapId d) = d: remember, dataConWrapId can return either the wrapper or the worker
isJoinId_maybe :: Var -> Maybe JoinArity #
isDataConId_maybe :: Id -> Maybe DataCon #
isDataConWrapId_maybe :: Id -> Maybe DataCon #
isDataConWrapId :: Id -> Bool #
isDataConWorkId_maybe :: Id -> Maybe DataCon #
isDataConWorkId :: Id -> Bool #
isFCallId_maybe :: Id -> Maybe ForeignCall #
isPrimOpId_maybe :: Id -> Maybe PrimOp #
isPrimOpId :: Id -> Bool #
isClassOpId_maybe :: Id -> Maybe Class #
isNaughtyRecordSelector :: Id -> Bool #
isPatSynRecordSelector :: Id -> Bool #
isDataConRecordSelector :: Id -> Bool #
isRecordSelector :: Id -> Bool #
recordSelectorTyCon :: Id -> RecSelParent #
mkTemplateLocalsNum :: Int -> [Type] -> [Id] #
Create a template local for a series of type, but start from a specified template local
mkTemplateLocals :: [Type] -> [Id] #
Create a template local for a series of types
mkTemplateLocal :: Int -> Type -> Id #
Create a template local: a family of system local Ids in bijection with Ints, typically used in unfoldings
mkWorkerId :: Unique -> Id -> Type -> Id #
Workers get local names. CoreTidy will externalise these if necessary
mkUserLocalOrCoVar :: OccName -> Unique -> Type -> SrcSpan -> Id #
Like mkUserLocal, but checks if we have a coercion type
mkSysLocalOrCoVarM :: MonadUnique m => FastString -> Type -> m Id #
mkSysLocalM :: MonadUnique m => FastString -> Type -> m Id #
mkSysLocalOrCoVar :: FastString -> Unique -> Type -> Id #
Like mkSysLocal, but checks to see if we have a covar type
mkSysLocal :: FastString -> Unique -> Type -> Id #
mkExportedVanillaId :: Name -> Type -> Id #
mkExportedLocalId :: IdDetails -> Name -> Type -> Id #
Create a local Id that is marked as exported.
This prevents things attached to it from being removed as dead code.
See Note [Exported LocalIds]
mkLocalIdOrCoVarWithInfo :: Name -> Type -> IdInfo -> Id #
Make a local id, with the IdDetails set to CoVarId if the type indicates so.
mkLocalIdOrCoVar :: Name -> Type -> Id #
Like mkLocalId, but checks the type to see if it should make a covar
mkLocalCoVar :: Name -> Type -> CoVar #
Make a local CoVar
modifyIdInfo :: HasDebugCallStack => (IdInfo -> IdInfo) -> Id -> Id #
localiseId :: Id -> Id #
setIdUnique :: Id -> Unique -> Id #
isNeverLevPolyIdInfo :: IdInfo -> Bool #
setLevityInfoWithType :: IdInfo -> Type -> IdInfo infixl 1 #
setNeverLevPoly :: HasDebugCallStack => IdInfo -> Type -> IdInfo infixl 1 #
Marks an IdInfo describing an Id that is never levity polymorphic (even when applied). The Type is only there for checking that it's really never levity polymorphic
zapCallArityInfo :: IdInfo -> IdInfo #
zapTailCallInfo :: IdInfo -> Maybe IdInfo #
zapUnfolding :: Unfolding -> Unfolding #
zapFragileInfo :: IdInfo -> Maybe IdInfo #
Zap info that depends on free variables
zapUsedOnceInfo :: IdInfo -> Maybe IdInfo #
zapUsageEnvInfo :: IdInfo -> Maybe IdInfo #
Remove usage environment info from the strictness signature on the IdInfo
zapLamInfo :: IdInfo -> Maybe IdInfo #
This is used to remove information on lambda binders that we have setup as part of a lambda group, assuming they will be applied all at once, but turn out to be part of an unsaturated lambda as in e.g:
(\x1. \x2. e) arg1
mayHaveCafRefs :: CafInfo -> Bool #
setRuleInfoHead :: Name -> RuleInfo -> RuleInfo #
Change the name of the function the rule is keyed on on all of the CoreRules
ruleInfoRules :: RuleInfo -> [CoreRule] #
ruleInfoFreeVars :: RuleInfo -> DVarSet #
Retrieve the locally-defined free variables of both the left and right hand sides of the specialization rules
isEmptyRuleInfo :: RuleInfo -> Bool #
Assume that no specilizations exist: always safe
pprStrictness :: StrictSig -> SDoc #
ppArityInfo :: Int -> SDoc #
unknownArity :: Arity #
It is always safe to assume that an Id has an arity of 0
noCafIdInfo :: IdInfo #
More informative IdInfo we can use when we know the Id has no CAF references
setStrictnessInfo :: IdInfo -> StrictSig -> IdInfo infixl 1 #
setDemandInfo :: IdInfo -> Demand -> IdInfo infixl 1 #
setOneShotInfo :: IdInfo -> OneShotInfo -> IdInfo infixl 1 #
setCafInfo :: IdInfo -> CafInfo -> IdInfo infixl 1 #
setCallArityInfo :: IdInfo -> ArityInfo -> IdInfo #
setArityInfo :: IdInfo -> ArityInfo -> IdInfo infixl 1 #
setUnfoldingInfo :: IdInfo -> Unfolding -> IdInfo infixl 1 #
setOccInfo :: IdInfo -> OccInfo -> IdInfo infixl 1 #
setInlinePragInfo :: IdInfo -> InlinePragma -> IdInfo infixl 1 #
setRuleInfo :: IdInfo -> RuleInfo -> IdInfo infixl 1 #
data RecSelParent #
Recursive Selector Parent
Constructors
| RecSelData TyCon | |
| RecSelPatSyn PatSyn |
Instances
| Eq RecSelParent | |
Defined in IdInfo | |
| Outputable RecSelParent | |
Defined in IdInfo | |
Arity Information
An ArityInfo of n tells us that partial application of this
Id to up to n-1 value arguments does essentially no work.
That is not necessarily the same as saying that it has n leading
lambdas, because coerces may get in the way.
The arity might increase later in the compilation process, if an extra lambda floats up to the binding site.
type InlinePragInfo = InlinePragma #
Inline Pragma Information
Tells when the inlining is active. When it is active the thing may be inlined, depending on how big it is.
If there was an INLINE pragma, then as a separate matter, the
RHS will have been made to look small with a Core inline Note
The default InlinePragInfo is AlwaysActive, so the info serves
entirely as a way to inhibit inlining until we want it
Rule Information
Records the specializations of this Id that we know about
in the form of rewrite CoreRules that target them
Constant applicative form Information
Records whether an Id makes Constant Applicative Form references
Constructors
| MayHaveCafRefs | Indicates that the
|
| NoCafRefs | A function or static constructor that refers to no CAFs. |
Tick box for Hpc-style coverage
data LevityInfo #
Instances
| Eq LevityInfo | |
Defined in IdInfo | |
| Outputable LevityInfo | |
Defined in IdInfo | |
collectNAnnBndrs :: Int -> AnnExpr bndr annot -> ([bndr], AnnExpr bndr annot) #
As collectNBinders but for AnnExpr rather than Expr
collectAnnBndrs :: AnnExpr bndr annot -> ([bndr], AnnExpr bndr annot) #
As collectBinders but for AnnExpr rather than Expr
deAnnotate' :: AnnExpr' bndr annot -> Expr bndr #
deAnnotate :: AnnExpr bndr annot -> Expr bndr #
collectAnnArgsTicks :: (Tickish Var -> Bool) -> AnnExpr b a -> (AnnExpr b a, [AnnExpr b a], [Tickish Var]) #
collectAnnArgs :: AnnExpr b a -> (AnnExpr b a, [AnnExpr b a]) #
Takes a nested application expression and returns the function being applied and the arguments to which it is applied
valArgCount :: [Arg b] -> Int #
The number of argument expressions that are values rather than types at their top level
valBndrCount :: [CoreBndr] -> Int #
The number of binders that bind values rather than types
Returns True iff the expression is a Coercion
expression at its top level
Returns True for value arguments, false for type args
NB: coercions are value arguments (zero width, to be sure,
like State#, but still value args).
isRuntimeArg :: CoreExpr -> Bool #
Will this argument expression exist at runtime?
isRuntimeVar :: Var -> Bool #
Will this variable exist at runtime?
collectArgsTicks :: (Tickish Id -> Bool) -> Expr b -> (Expr b, [Arg b], [Tickish Id]) #
Like collectArgs, but also collects looks through floatable
ticks if it means that we can find more arguments.
stripNArgs :: Word -> Expr a -> Maybe (Expr a) #
Attempt to remove the last N arguments of a function call. Strip off any ticks or coercions encountered along the way and any at the end.
collectArgs :: Expr b -> (Expr b, [Arg b]) #
Takes a nested application expression and returns the function being applied and the arguments to which it is applied
collectNBinders :: Int -> Expr b -> ([b], Expr b) #
Strip off exactly N leading lambdas (type or value). Good for use with join points.
collectTyBinders :: CoreExpr -> ([TyVar], CoreExpr) #
collectBinders :: Expr b -> ([b], Expr b) #
We often want to strip off leading lambdas before getting down to
business. Variants are collectTyBinders, collectValBinders,
and collectTyAndValBinders
flattenBinds :: [Bind b] -> [(b, Expr b)] #
Collapse all the bindings in the supplied groups into a single
list of lhs/rhs pairs suitable for binding in a Rec binding group
rhssOfAlts :: [Alt b] -> [Expr b] #
rhssOfBind :: Bind b -> [Expr b] #
bindersOfBinds :: [Bind b] -> [b] #
bindersOf applied to a list of binding groups
exprToType :: CoreExpr -> Type #
applyTypeToArg :: Type -> CoreExpr -> Type #
Determines the type resulting from applying an expression with given type to a given argument expression
varsToCoreExprs :: [CoreBndr] -> [Expr b] #
mkCoBind :: CoVar -> Coercion -> CoreBind #
Create a binding group where a type variable is bound to a type. Per CoreSyn,
this can only be used to bind something in a non-recursive let expression
mkTyBind :: TyVar -> Type -> CoreBind #
Create a binding group where a type variable is bound to a type. Per CoreSyn,
this can only be used to bind something in a non-recursive let expression
mkLetRec :: [(b, Expr b)] -> Expr b -> Expr b #
mkLetRec binds body wraps body in a let rec with the given set of
binds if binds is non-empty.
mkLetNonRec :: b -> Expr b -> Expr b -> Expr b #
mkLetNonRec bndr rhs body wraps body in a let binding bndr.
mkLets :: [Bind b] -> Expr b -> Expr b #
Bind all supplied binding groups over an expression in a nested let expression. Assumes
that the rhs satisfies the let/app invariant. Prefer to use mkCoreLets if
possible, which does guarantee the invariant
mkLams :: [b] -> Expr b -> Expr b #
Bind all supplied binders over an expression in a nested lambda expression. Prefer to
use mkCoreLams if possible
mkDoubleLitDouble :: Double -> Expr b #
Create a machine double precision literal expression of type Double# from a Double.
If you want an expression of type Double use mkDoubleExpr
mkDoubleLit :: Rational -> Expr b #
Create a machine double precision literal expression of type Double# from a Rational.
If you want an expression of type Double use mkDoubleExpr
mkFloatLitFloat :: Float -> Expr b #
Create a machine single precision literal expression of type Float# from a Float.
If you want an expression of type Float use mkFloatExpr
mkFloatLit :: Rational -> Expr b #
Create a machine single precision literal expression of type Float# from a Rational.
If you want an expression of type Float use mkFloatExpr
mkStringLit :: String -> Expr b #
Create a machine string literal expression of type Addr#.
If you want an expression of type String use mkStringExpr
Create a machine character literal expression of type Char#.
If you want an expression of type Char use mkCharExpr
mkInt64LitInt64 :: Int64 -> Expr b #
mkWord64LitWord64 :: Word64 -> Expr b #
mkWordLitWord :: DynFlags -> Word -> Expr b #
Create a machine word literal expression of type Word# from a Word.
If you want an expression of type Word use mkWordExpr
mkWordLit :: DynFlags -> Integer -> Expr b #
Create a machine word literal expression of type Word# from an Integer.
If you want an expression of type Word use mkWordExpr
mkIntLitInt :: DynFlags -> Int -> Expr b #
Create a machine integer literal expression of type Int# from an Int.
If you want an expression of type Int use mkIntExpr
mkIntLit :: DynFlags -> Integer -> Expr b #
Create a machine integer literal expression of type Int# from an Integer.
If you want an expression of type Int use mkIntExpr
mkTyApps :: Expr b -> [Type] -> Expr b infixl 4 #
Apply a list of type argument expressions to a function expression in a nested fashion
mkConApp :: DataCon -> [Arg b] -> Expr b #
Apply a list of argument expressions to a data constructor in a nested fashion. Prefer to
use mkCoreConApps if possible
mkVarApps :: Expr b -> [Var] -> Expr b infixl 4 #
Apply a list of type or value variables to a function expression in a nested fashion
mkCoApps :: Expr b -> [Coercion] -> Expr b infixl 4 #
Apply a list of coercion argument expressions to a function expression in a nested fashion
mkApps :: Expr b -> [Arg b] -> Expr b infixl 4 #
Apply a list of argument expressions to a function expression in a nested fashion. Prefer to
use mkCoreApps if possible
deTagExpr :: TaggedExpr t -> CoreExpr #
cmpAltCon :: AltCon -> AltCon -> Ordering #
Compares AltCons within a single list of alternatives
DEFAULT comes out smallest, so that sorting by AltCon puts
alternatives in the order required: see Note [Case expression invariants]
isFragileUnfolding :: Unfolding -> Bool #
isBootUnfolding :: Unfolding -> Bool #
hasSomeUnfolding :: Unfolding -> Bool #
Only returns False if there is no unfolding information available at all
isStableUnfolding :: Unfolding -> Bool #
isCompulsoryUnfolding :: Unfolding -> Bool #
isExpandableUnfolding :: Unfolding -> Bool #
isCheapUnfolding :: Unfolding -> Bool #
Is the thing we will unfold into certainly cheap?
isConLikeUnfolding :: Unfolding -> Bool #
True if the unfolding is a constructor application, the application
of a CONLIKE function or OtherCon
isEvaldUnfolding :: Unfolding -> Bool #
Determines if it possibly the case that the unfolding will
yield a value. Unlike isValueUnfolding it returns True
for OtherCon
isValueUnfolding :: Unfolding -> Bool #
Determines if it is certainly the case that the unfolding will
yield a value (something in HNF): returns False if unsure
otherCons :: Unfolding -> [AltCon] #
The constructors that the unfolding could never be:
returns [] if no information is available
maybeUnfoldingTemplate :: Unfolding -> Maybe CoreExpr #
Retrieves the template of an unfolding if possible maybeUnfoldingTemplate is used mainly wnen specialising, and we do want to specialise DFuns, so it's important to return a template for DFunUnfoldings
unfoldingTemplate :: Unfolding -> CoreExpr #
Retrieves the template of an unfolding: panics if none is known
isStableSource :: UnfoldingSource -> Bool #
mkOtherCon :: [AltCon] -> Unfolding #
There is no known Unfolding, because this came from an
hi-boot file.
This unfolding marks the associated thing as being evaluated
There is no known Unfolding
boringCxtNotOk :: Bool #
boringCxtOk :: Bool #
unSaturatedOk :: Bool #
needSaturated :: Bool #
setRuleIdName :: Name -> CoreRule -> CoreRule #
isLocalRule :: CoreRule -> Bool #
ruleActivation :: CoreRule -> Activation #
ruleModule :: CoreRule -> Maybe Module #
ruleArity :: CoreRule -> Int #
The number of arguments the ru_fn must be applied
to before the rule can match on it
isAutoRule :: CoreRule -> Bool #
isBuiltinRule :: CoreRule -> Bool #
emptyRuleEnv :: RuleEnv #
chooseOrphanAnchor :: NameSet -> IsOrphan #
tickishContains :: Eq b => Tickish b -> Tickish b -> Bool #
Returns whether one tick "contains" the other one, therefore making the second tick redundant.
tickishPlace :: Tickish id -> TickishPlacement #
Placement behaviour we want for the ticks
tickishIsCode :: Tickish id -> Bool #
Return True if this source annotation compiles to some backend
code. Without this flag, the tickish is seen as a simple annotation
that does not have any associated evaluation code.
What this means that we are allowed to disregard the tick if doing so means that we can skip generating any code in the first place. A typical example is top-level bindings:
foo = tick... y -> ... ==> foo = y -> tick... ...
Here there is just no operational difference between the first and the second version. Therefore code generation should simply translate the code as if it found the latter.
tickishCanSplit :: Tickish id -> Bool #
Returns True for a tick that is both counting and scoping and
can be split into its (tick, scope) parts using mkNoScope and
mkNoTick respectively.
tickishFloatable :: Tickish id -> Bool #
Returns True for ticks that can be floated upwards easily even
where it might change execution counts, such as:
Just (tick... foo) ==> tick... (Just foo)
This is a combination of tickishSoftScope and
tickishCounts. Note that in principle splittable ticks can become
floatable using mkNoTick -- even though there's currently no
tickish for which that is the case.
tickishScopesLike :: Tickish id -> TickishScoping -> Bool #
Returns whether the tick scoping rule is at least as permissive as the given scoping rule.
tickishScoped :: Tickish id -> TickishScoping #
Returns the intended scoping rule for a Tickish
tickishCounts :: Tickish id -> Bool #
A "counting tick" (where tickishCounts is True) is one that counts evaluations in some way. We cannot discard a counting tick, and the compiler should preserve the number of counting ticks as far as possible.
However, we still allow the simplifier to increase or decrease sharing, so in practice the actual number of ticks may vary, except that we never change the value from zero to non-zero or vice versa.
This is the data type that represents GHCs core intermediate language. Currently GHC uses System FC https://www.microsoft.com/en-us/research/publication/system-f-with-type-equality-coercions/ for this purpose, which is closely related to the simpler and better known System F http://en.wikipedia.org/wiki/System_F.
We get from Haskell source to this Core language in a number of stages:
- The source code is parsed into an abstract syntax tree, which is represented
by the data type
HsExprwith the names beingRdrNames - This syntax tree is renamed, which attaches a
Uniqueto everyRdrName(yielding aName) to disambiguate identifiers which are lexically identical. For example, this program:
f x = let f x = x + 1
in f (x - 2)
Would be renamed by having Uniques attached so it looked something like this:
f_1 x_2 = let f_3 x_4 = x_4 + 1
in f_3 (x_2 - 2)
But see Note [Shadowing] below.
- The resulting syntax tree undergoes type checking (which also deals with instantiating
type class arguments) to yield a
HsExprtype that hasIdas it's names. - Finally the syntax tree is desugared from the expressive
HsExprtype into thisExprtype, which has far fewer constructors and hence is easier to perform optimization, analysis and code generation on.
The type parameter b is for the type of binders in the expression tree.
The language consists of the following elements:
- Variables See Note [Variable occurrences in Core]
- Primitive literals
- Applications: note that the argument may be a
Type. See Note [CoreSyn let/app invariant] See Note [Levity polymorphism invariants] - Lambda abstraction See Note [Levity polymorphism invariants]
- Recursive and non recursive
lets. Operationally this corresponds to allocating a thunk for the things bound and then executing the sub-expression.
See Note [CoreSyn letrec invariant] See Note [CoreSyn let/app invariant] See Note [Levity polymorphism invariants] See Note [CoreSyn type and coercion invariant]
- Case expression. Operationally this corresponds to evaluating the scrutinee (expression examined) to weak head normal form and then examining at most one level of resulting constructor (i.e. you cannot do nested pattern matching directly with this).
The binder gets bound to the value of the scrutinee,
and the Type must be that of all the case alternatives
IMPORTANT: see Note [Case expression invariants]
- Cast an expression to a particular type.
This is used to implement
newtypes (anewtypeconstructor or destructor just becomes aCastin Core) and GADTs. - Notes. These allow general information to be added to expressions in the syntax tree
- A type: this should only show up at the top level of an Arg
- A coercion
Constructors
| Var Id | |
| Lit Literal | |
| App (Expr b) (Arg b) infixl 4 | |
| Lam b (Expr b) | |
| Let (Bind b) (Expr b) | |
| Case (Expr b) b Type [Alt b] | |
| Cast (Expr b) Coercion | |
| Tick (Tickish Id) (Expr b) | |
| Type Type | |
| Coercion Coercion |
Instances
| Data b => Data (Expr b) | |
Defined in CoreSyn Methods gfoldl :: (forall d b0. Data d => c (d -> b0) -> d -> c b0) -> (forall g. g -> c g) -> Expr b -> c (Expr b) # gunfold :: (forall b0 r. Data b0 => c (b0 -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Expr b) # toConstr :: Expr b -> Constr # dataTypeOf :: Expr b -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Expr b)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Expr b)) # gmapT :: (forall b0. Data b0 => b0 -> b0) -> Expr b -> Expr b # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Expr b -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Expr b -> r # gmapQ :: (forall d. Data d => d -> u) -> Expr b -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Expr b -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Expr b -> m (Expr b) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Expr b -> m (Expr b) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Expr b -> m (Expr b) # | |
type Alt b = (AltCon, [b], Expr b) #
A case split alternative. Consists of the constructor leading to the alternative,
the variables bound from the constructor, and the expression to be executed given that binding.
The default alternative is (DEFAULT, [], rhs)
A case alternative constructor (i.e. pattern match)
Constructors
| DataAlt DataCon | |
| LitAlt Literal | A literal: |
| DEFAULT | Trivial alternative: |
Instances
| Eq AltCon | |
| Data AltCon | |
Defined in CoreSyn Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AltCon -> c AltCon # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AltCon # toConstr :: AltCon -> Constr # dataTypeOf :: AltCon -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c AltCon) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AltCon) # gmapT :: (forall b. Data b => b -> b) -> AltCon -> AltCon # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AltCon -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AltCon -> r # gmapQ :: (forall d. Data d => d -> u) -> AltCon -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> AltCon -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> AltCon -> m AltCon # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AltCon -> m AltCon # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AltCon -> m AltCon # | |
| Ord AltCon | |
| Outputable AltCon | |
Binding, used for top level bindings in a module and local bindings in a let.
Instances
| Data b => Data (Bind b) | |
Defined in CoreSyn Methods gfoldl :: (forall d b0. Data d => c (d -> b0) -> d -> c b0) -> (forall g. g -> c g) -> Bind b -> c (Bind b) # gunfold :: (forall b0 r. Data b0 => c (b0 -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Bind b) # toConstr :: Bind b -> Constr # dataTypeOf :: Bind b -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Bind b)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Bind b)) # gmapT :: (forall b0. Data b0 => b0 -> b0) -> Bind b -> Bind b # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Bind b -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Bind b -> r # gmapQ :: (forall d. Data d => d -> u) -> Bind b -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Bind b -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Bind b -> m (Bind b) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Bind b -> m (Bind b) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Bind b -> m (Bind b) # | |
type InCoercion = Coercion #
type OutCoercion = Coercion #
type MOutCoercion = MCoercion #
Allows attaching extra information to points in expressions
Constructors
| ProfNote | An |
Fields
| |
| HpcTick | A "tick" used by HPC to track the execution of each subexpression in the original source code. |
Fields
| |
| Breakpoint | A breakpoint for the GHCi debugger. This behaves like an HPC tick, but has a list of free variables which will be available for inspection in GHCi when the program stops at the breakpoint. NB. we must take account of these Ids when (a) counting free variables, and (b) substituting (don't substitute for them) |
Fields
| |
| SourceNote | A source note. Source notes are pure annotations: Their presence should neither influence compilation nor execution. The semantics are given by causality: The presence of a source note means that a local change in the referenced source code span will possibly provoke the generated code to change. On the flip-side, the functionality of annotated code *must* be invariant against changes to all source code *except* the spans referenced in the source notes (see "Causality of optimized Haskell" paper for details). Therefore extending the scope of any given source note is always valid. Note that it is still undesirable though, as this reduces their usefulness for debugging and profiling. Therefore we will generally try only to make use of this property where it is necessary to enable optimizations. |
Fields
| |
Instances
| Eq id => Eq (Tickish id) | |
| Data id => Data (Tickish id) | |
Defined in CoreSyn Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Tickish id -> c (Tickish id) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Tickish id) # toConstr :: Tickish id -> Constr # dataTypeOf :: Tickish id -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Tickish id)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Tickish id)) # gmapT :: (forall b. Data b => b -> b) -> Tickish id -> Tickish id # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Tickish id -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Tickish id -> r # gmapQ :: (forall d. Data d => d -> u) -> Tickish id -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Tickish id -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Tickish id -> m (Tickish id) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Tickish id -> m (Tickish id) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Tickish id -> m (Tickish id) # | |
| Ord id => Ord (Tickish id) | |
data TickishScoping #
Specifies the scoping behaviour of ticks. This governs the behaviour of ticks that care about the covered code and the cost associated with it. Important for ticks relating to profiling.
Constructors
| NoScope | No scoping: The tick does not care about what code it covers. Transformations can freely move code inside as well as outside without any additional annotation obligations |
| SoftScope | Soft scoping: We want all code that is covered to stay covered. Note that this scope type does not forbid transformations from happening, as long as all results of the transformations are still covered by this tick or a copy of it. For example let x = tick... (let y = foo in bar) in baz ===> let x = tick... bar; y = tick... foo in baz Is a valid transformation as far as "bar" and "foo" is concerned, because both still are scoped over by the tick. Note though that one might object to the "let" not being covered by the tick any more. However, we are generally lax with this - constant costs don't matter too much, and given that the "let" was effectively merged we can view it as having lost its identity anyway. Also note that this scoping behaviour allows floating a tick "upwards" in pretty much any situation. For example: case foo of x -> tick... bar ==> tick... case foo of x -> bar While this is always leagl, we want to make a best effort to only make us of this where it exposes transformation opportunities. |
| CostCentreScope | Cost centre scoping: We don't want any costs to move to other cost-centre stacks. This means we not only want no code or cost to get moved out of their cost centres, but we also object to code getting associated with new cost-centre ticks - or changing the order in which they get applied. A rule of thumb is that we don't want any code to gain new annotations. However, there are notable exceptions, for example: let f = y -> foo in tick... ... (f x) ... ==> tick... ... foo[x/y] ... In-lining lambdas like this is always legal, because inlining a function does not change the cost-centre stack when the function is called. |
Instances
| Eq TickishScoping | |
Defined in CoreSyn Methods (==) :: TickishScoping -> TickishScoping -> Bool # (/=) :: TickishScoping -> TickishScoping -> Bool # | |
data TickishPlacement #
Governs the kind of expression that the tick gets placed on when
annotating for example using mkTick. If we find that we want to
put a tickish on an expression ruled out here, we try to float it
inwards until we find a suitable expression.
Constructors
| PlaceRuntime | Place ticks exactly on run-time expressions. We can still move the tick through pure compile-time constructs such as other ticks, casts or type lambdas. This is the most restrictive placement rule for ticks, as all tickishs have in common that they want to track runtime processes. The only legal placement rule for counting ticks. |
| PlaceNonLam | As |
| PlaceCostCentre | In addition to floating through lambdas, cost-centre style tickishs can also be moved from constructors, non-function variables and literals. For example: let x = scc... C (scc... y) (scc... 3) in ... Neither the constructor application, the variable or the literal are likely to have any cost worth mentioning. And even if y names a thunk, the call would not care about the evaluation context. Therefore removing all annotations in the above example is safe. |
Instances
| Eq TickishPlacement | |
Defined in CoreSyn Methods (==) :: TickishPlacement -> TickishPlacement -> Bool # (/=) :: TickishPlacement -> TickishPlacement -> Bool # | |
Is this instance an orphan? If it is not an orphan, contains an OccName
witnessing the instance's non-orphanhood.
See Note [Orphans]
Instances
| Data IsOrphan | |
Defined in CoreSyn Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> IsOrphan -> c IsOrphan # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c IsOrphan # toConstr :: IsOrphan -> Constr # dataTypeOf :: IsOrphan -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c IsOrphan) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c IsOrphan) # gmapT :: (forall b. Data b => b -> b) -> IsOrphan -> IsOrphan # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> IsOrphan -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> IsOrphan -> r # gmapQ :: (forall d. Data d => d -> u) -> IsOrphan -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> IsOrphan -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> IsOrphan -> m IsOrphan # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> IsOrphan -> m IsOrphan # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> IsOrphan -> m IsOrphan # | |
| Binary IsOrphan | |
A full rule environment which we can apply rules from. Like a RuleBase,
but it also includes the set of visible orphans we use to filter out orphan
rules which are not visible (even though we can see them...)
Constructors
| RuleEnv | |
Fields | |
A CoreRule is:
- "Local" if the function it is a rule for is defined in the same module as the rule itself.
- "Orphan" if nothing on the LHS is defined in the same module as the rule itself
Constructors
| Rule | |
Fields
| |
| BuiltinRule | Built-in rules are used for constant folding and suchlike. They have no free variables. A built-in rule is always visible (there is no such thing as an orphan built-in rule.) |
Fields | |
type InScopeEnv = (InScopeSet, IdUnfoldingFun) #
type IdUnfoldingFun = Id -> Unfolding #
Records the unfolding of an identifier, which is approximately the form the identifier would have if we substituted its definition in for the identifier. This type should be treated as abstract everywhere except in CoreUnfold
Constructors
| NoUnfolding | We have no information about the unfolding. |
| BootUnfolding | We have no information about the unfolding, because
this |
| OtherCon [AltCon] | It ain't one of these constructors.
data C = C !(Int -> Int)
case x of { C f -> ... }Here, |
| DFunUnfolding | |
| CoreUnfolding | An unfolding with redundant cached information. Parameters: uf_tmpl: Template used to perform unfolding; NB: Occurrence info is guaranteed correct: see Note [OccInfo in unfoldings and rules] uf_is_top: Is this a top level binding? uf_is_value: uf_is_work_free: Does this waste only a little work if we expand it inside an inlining?
Basically this is a cached version of uf_guidance: Tells us about the size of the unfolding template |
Fields
| |
data UnfoldingSource #
Constructors
| InlineRhs | |
| InlineStable | |
| InlineCompulsory |
data UnfoldingGuidance #
UnfoldingGuidance says when unfolding should take place
Constructors
| UnfWhen | |
Fields
| |
| UnfIfGoodArgs | |
| UnfNever | |
Instances
| Eq UnfoldingGuidance | |
Defined in CoreSyn Methods (==) :: UnfoldingGuidance -> UnfoldingGuidance -> Bool # (/=) :: UnfoldingGuidance -> UnfoldingGuidance -> Bool # | |
type CoreProgram = [CoreBind] #
The common case for the type of binders and variables when we are manipulating the Core language within GHC
data TaggedBndr t #
Binders are tagged with a t
Instances
| Outputable b => Outputable (TaggedBndr b) | |
Defined in CoreSyn | |
type TaggedBind t = Bind (TaggedBndr t) #
type TaggedExpr t = Expr (TaggedBndr t) #
type TaggedArg t = Arg (TaggedBndr t) #
type TaggedAlt t = Alt (TaggedBndr t) #
type AnnExpr bndr annot = (annot, AnnExpr' bndr annot) #
Annotated core: allows annotation at every node in the tree
A clone of the Expr type but allowing annotation at every tree node
Constructors
| AnnVar Id | |
| AnnLit Literal | |
| AnnLam bndr (AnnExpr bndr annot) | |
| AnnApp (AnnExpr bndr annot) (AnnExpr bndr annot) | |
| AnnCase (AnnExpr bndr annot) bndr Type [AnnAlt bndr annot] | |
| AnnLet (AnnBind bndr annot) (AnnExpr bndr annot) | |
| AnnCast (AnnExpr bndr annot) (annot, Coercion) | |
| AnnTick (Tickish Id) (AnnExpr bndr annot) | |
| AnnType Type | |
| AnnCoercion Coercion |
type AnnAlt bndr annot = (AltCon, [bndr], AnnExpr bndr annot) #
A clone of the Alt type but allowing annotation at every tree node
A clone of the Bind type but allowing annotation at every tree node
Extract the type constructor, type argument, data constructor and it's representation argument types from a type if it is a product type.
Precisely, we return Just for any type that is all of:
- Concrete (i.e. constructors visible)
- Single-constructor
- Not existentially quantified
Whether the type is a data type or a newtype
promoteDataCon :: DataCon -> TyCon #
dataConUserTyVarsArePermuted :: DataCon -> Bool #
Were the type variables of the data con written in a different order than the regular order (universal tyvars followed by existential tyvars)?
This is not a cheap test, so we minimize its use in GHC as much as possible.
Currently, its only call site in the GHC codebase is in mkDataConRep in
MkId, and so dataConUserTyVarsArePermuted is only called at most once
during a data constructor's lifetime.
dataConCannotMatch :: [Type] -> DataCon -> Bool #
classDataCon :: Class -> DataCon #
specialPromotedDc :: DataCon -> Bool #
Should this DataCon be allowed in a type even without -XDataKinds? Currently, only Lifted & Unlifted
isVanillaDataCon :: DataCon -> Bool #
Vanilla DataCons are those that are nice boring Haskell 98 constructors
isUnboxedTupleCon :: DataCon -> Bool #
isTupleDataCon :: DataCon -> Bool #
dataConIdentity :: DataCon -> ByteString #
The string package:module.name identifying a constructor, which is attached
to its info table and used by the GHCi debugger and the heap profiler
dataConRepArgTys :: DataCon -> [Type] #
Returns the arg types of the worker, including *all* non-dependent evidence, after any flattening has been done and without substituting for any type variables
dataConOrigArgTys :: DataCon -> [Type] #
Returns the argument types of the wrapper, excluding all dictionary arguments and without substituting for any type variables
Arguments
| :: DataCon | A datacon with no existentials or equality constraints However, it can have a dcTheta (notably it can be a class dictionary, with superclasses) |
| -> [Type] | Instantiated at these types |
| -> [Type] |
Finds the instantiated types of the arguments required to construct a
DataCon representation
NB: these INCLUDE any dictionary args
but EXCLUDE the data-declaration context, which is discarded
It's all post-flattening etc; this is a representation type
dataConUserType :: DataCon -> Type #
The user-declared type of the data constructor in the nice-to-read form:
T :: forall a b. a -> b -> T [a]
rather than:
T :: forall a c. forall b. (c~[a]) => a -> b -> T c
The type variables are quantified in the order that the user wrote them.
See Note [DataCon user type variable binders].
NB: If the constructor is part of a data instance, the result type mentions the family tycon, not the internal one.
dataConOrigResTy :: DataCon -> Type #
dataConInstSig :: DataCon -> [Type] -> ([TyCoVar], ThetaType, [Type]) #
Instantiate the universal tyvars of a data con, returning ( instantiated existentials , instantiated constraints including dependent GADT equalities which are *also* listed in the instantiated existentials , instantiated args)
dataConSig :: DataCon -> ([TyCoVar], ThetaType, [Type], Type) #
The "signature" of the DataCon returns, in order:
1) The result of dataConUnivAndExTyCoVars,
2) All the ThetaTypes relating to the DataCon (coercion, dictionary,
implicit parameter - whatever), including dependent GADT equalities.
Dependent GADT equalities are *also* listed in return value (1), so be
careful!
3) The type arguments to the constructor
4) The original result type of the DataCon
dataConBoxer :: DataCon -> Maybe DataConBoxer #
dataConImplBangs :: DataCon -> [HsImplBang] #
dataConRepStrictness :: DataCon -> [StrictnessMark] #
Give the demands on the arguments of a Core constructor application (Con dc args)
isNullaryRepDataCon :: DataCon -> Bool #
Return whether there are any argument types for this DataCons runtime representation type
See Note [DataCon arities]
isNullarySrcDataCon :: DataCon -> Bool #
Return whether there are any argument types for this DataCons original source type
See Note [DataCon arities]
dataConRepArity :: DataCon -> Arity #
Gives the number of actual fields in the representation of the data constructor. This may be more than appear in the source code; the extra ones are the existentially quantified dictionaries
dataConSrcBangs :: DataCon -> [HsSrcBang] #
Strictness/unpack annotations, from user; or, for imported
DataCons, from the interface file
The list is in one-to-one correspondence with the arity of the DataCon
dataConFieldType_maybe :: DataCon -> FieldLabelString -> Maybe (FieldLabel, Type) #
dataConFieldType :: DataCon -> FieldLabelString -> Type #
Extract the type for any given labelled field of the DataCon
dataConImplicitTyThings :: DataCon -> [TyThing] #
Find all the Ids implicitly brought into scope by the data constructor. Currently,
the union of the dataConWorkId and the dataConWrapId
dataConWrapId :: DataCon -> Id #
Returns an Id which looks like the Haskell-source constructor by using
the wrapper if it exists (see dataConWrapId_maybe) and failing over to
the worker (see dataConWorkId)
dataConWrapId_maybe :: DataCon -> Maybe Id #
Get the Id of the DataCon wrapper: a function that wraps the "actual"
constructor so it has the type visible in the source program: c.f.
dataConWorkId.
Returns Nothing if there is no wrapper, which occurs for an algebraic data
constructor and also for a newtype (whose constructor is inlined
compulsorily)
dataConWorkId :: DataCon -> Id #
dataConTheta :: DataCon -> ThetaType #
The *full* constraints on the constructor type, including dependent GADT equalities.
dataConEqSpec :: DataCon -> [EqSpec] #
Equalities derived from the result type of the data constructor, as written by the programmer in any GADT declaration. This includes *all* GADT-like equalities, including those written in by hand by the programmer.
dataConUnivAndExTyCoVars :: DataCon -> [TyCoVar] #
Both the universal and existential type/coercion variables of the constructor
dataConUnivTyVars :: DataCon -> [TyVar] #
The universally-quantified type variables of the constructor
dataConIsInfix :: DataCon -> Bool #
Should the DataCon be presented infix?
dataConRepType :: DataCon -> Type #
The representation type of the data constructor, i.e. the sort type that will represent values of this type at runtime
dataConOrigTyCon :: DataCon -> TyCon #
The original type constructor used in the definition of this data constructor. In case of a data family instance, that will be the family type constructor.
dataConTagZ :: DataCon -> ConTagZ #
dataConTag :: DataCon -> ConTag #
The tag used for ordering DataCons
Arguments
| :: Name | |
| -> Bool | Is the constructor declared infix? |
| -> TyConRepName | TyConRepName for the promoted TyCon |
| -> [HsSrcBang] | Strictness/unpack annotations, from user |
| -> [FieldLabel] | Field labels for the constructor, if it is a record, otherwise empty |
| -> [TyVar] | Universals. |
| -> [TyCoVar] | Existentials. |
| -> [TyVarBinder] | User-written |
| -> [EqSpec] | GADT equalities |
| -> KnotTied ThetaType | Theta-type occurring before the arguments proper |
| -> [KnotTied Type] | Original argument types |
| -> KnotTied Type | Original result type |
| -> RuntimeRepInfo | See comments on |
| -> KnotTied TyCon | Representation type constructor |
| -> ConTag | Constructor tag |
| -> ThetaType | The "stupid theta", context of the data
declaration e.g. |
| -> Id | Worker Id |
| -> DataConRep | Representation |
| -> DataCon |
Build a new data constructor
isMarkedStrict :: StrictnessMark -> Bool #
isSrcUnpacked :: SrcUnpackedness -> Bool #
isSrcStrict :: SrcStrictness -> Bool #
isBanged :: HsImplBang -> Bool #
eqHsBang :: HsImplBang -> HsImplBang -> Bool #
Compare strictness annotations
substEqSpec :: TCvSubst -> EqSpec -> EqSpec #
Substitute in an EqSpec. Precondition: if the LHS of the EqSpec
is mapped in the substitution, it is mapped to a type variable, not
a full type.
eqSpecPreds :: [EqSpec] -> ThetaType #
eqSpecPair :: EqSpec -> (TyVar, Type) #
eqSpecType :: EqSpec -> Type #
eqSpecTyVar :: EqSpec -> TyVar #
Haskell Source Bang
Bangs on data constructor arguments as the user wrote them in the source code.
(HsSrcBang _ SrcUnpack SrcLazy) and
(HsSrcBang _ SrcUnpack NoSrcStrict) (without StrictData) makes no sense, we
emit a warning (in checkValidDataCon) and treat it like
(HsSrcBang _ NoSrcUnpack SrcLazy)
Constructors
| HsSrcBang SourceText SrcUnpackedness SrcStrictness |
Instances
| Data HsSrcBang | |
Defined in DataCon Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsSrcBang -> c HsSrcBang # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HsSrcBang # toConstr :: HsSrcBang -> Constr # dataTypeOf :: HsSrcBang -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c HsSrcBang) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HsSrcBang) # gmapT :: (forall b. Data b => b -> b) -> HsSrcBang -> HsSrcBang # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsSrcBang -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsSrcBang -> r # gmapQ :: (forall d. Data d => d -> u) -> HsSrcBang -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsSrcBang -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsSrcBang -> m HsSrcBang # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsSrcBang -> m HsSrcBang # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsSrcBang -> m HsSrcBang # | |
| Outputable HsSrcBang | |
data HsImplBang #
Haskell Implementation Bang
Bangs of data constructor arguments as generated by the compiler after consulting HsSrcBang, flags, etc.
Constructors
| HsLazy | Lazy field, or one with an unlifted type |
| HsStrict | Strict but not unpacked field |
| HsUnpack (Maybe Coercion) | Strict and unpacked field co :: arg-ty ~ product-ty HsBang |
Instances
| Data HsImplBang | |
Defined in DataCon Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsImplBang -> c HsImplBang # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HsImplBang # toConstr :: HsImplBang -> Constr # dataTypeOf :: HsImplBang -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c HsImplBang) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HsImplBang) # gmapT :: (forall b. Data b => b -> b) -> HsImplBang -> HsImplBang # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsImplBang -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsImplBang -> r # gmapQ :: (forall d. Data d => d -> u) -> HsImplBang -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsImplBang -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsImplBang -> m HsImplBang # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsImplBang -> m HsImplBang # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsImplBang -> m HsImplBang # | |
| Outputable HsImplBang | |
Defined in DataCon | |
data SrcStrictness #
Source Strictness
What strictness annotation the user wrote
Constructors
| SrcLazy | Lazy, ie '~' |
| SrcStrict | Strict, ie |
| NoSrcStrict | no strictness annotation |
Instances
| Eq SrcStrictness | |
Defined in DataCon Methods (==) :: SrcStrictness -> SrcStrictness -> Bool # (/=) :: SrcStrictness -> SrcStrictness -> Bool # | |
| Data SrcStrictness | |
Defined in DataCon Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SrcStrictness -> c SrcStrictness # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SrcStrictness # toConstr :: SrcStrictness -> Constr # dataTypeOf :: SrcStrictness -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SrcStrictness) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SrcStrictness) # gmapT :: (forall b. Data b => b -> b) -> SrcStrictness -> SrcStrictness # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SrcStrictness -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SrcStrictness -> r # gmapQ :: (forall d. Data d => d -> u) -> SrcStrictness -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> SrcStrictness -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> SrcStrictness -> m SrcStrictness # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SrcStrictness -> m SrcStrictness # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SrcStrictness -> m SrcStrictness # | |
| Binary SrcStrictness | |
Defined in DataCon Methods put_ :: BinHandle -> SrcStrictness -> IO () # put :: BinHandle -> SrcStrictness -> IO (Bin SrcStrictness) # get :: BinHandle -> IO SrcStrictness # | |
| Outputable SrcStrictness | |
Defined in DataCon | |
data SrcUnpackedness #
Source Unpackedness
What unpackedness the user requested
Constructors
| SrcUnpack | |
| SrcNoUnpack | |
| NoSrcUnpack | no unpack pragma |
Instances
| Eq SrcUnpackedness | |
Defined in DataCon Methods (==) :: SrcUnpackedness -> SrcUnpackedness -> Bool # (/=) :: SrcUnpackedness -> SrcUnpackedness -> Bool # | |
| Data SrcUnpackedness | |
Defined in DataCon Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SrcUnpackedness -> c SrcUnpackedness # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SrcUnpackedness # toConstr :: SrcUnpackedness -> Constr # dataTypeOf :: SrcUnpackedness -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SrcUnpackedness) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SrcUnpackedness) # gmapT :: (forall b. Data b => b -> b) -> SrcUnpackedness -> SrcUnpackedness # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SrcUnpackedness -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SrcUnpackedness -> r # gmapQ :: (forall d. Data d => d -> u) -> SrcUnpackedness -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> SrcUnpackedness -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> SrcUnpackedness -> m SrcUnpackedness # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SrcUnpackedness -> m SrcUnpackedness # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SrcUnpackedness -> m SrcUnpackedness # | |
| Binary SrcUnpackedness | |
Defined in DataCon Methods put_ :: BinHandle -> SrcUnpackedness -> IO () # put :: BinHandle -> SrcUnpackedness -> IO (Bin SrcUnpackedness) # get :: BinHandle -> IO SrcUnpackedness # | |
| Outputable SrcUnpackedness | |
Defined in DataCon | |
data StrictnessMark #
Constructors
| MarkedStrict | |
| NotMarkedStrict |
Instances
| Outputable StrictnessMark | |
Defined in DataCon | |
simplifyArgsWorker :: [TyCoBinder] -> Kind -> TyCoVarSet -> [Role] -> [(Type, Coercion)] -> ([Type], [Coercion], CoercionN) #
buildCoercion :: Type -> Type -> CoercionN #
Assuming that two types are the same, ignoring coercions, find a nominal coercion between the types. This is useful when optimizing transitivity over coercion applications, where splitting two AppCos might yield different kinds. See Note [EtaAppCo] in OptCoercion.
mkReprPrimEqPred :: Type -> Type -> Type #
mkHeteroReprPrimEqPred :: Kind -> Kind -> Type -> Type -> Type #
Creates a primitive representational type equality predicate with explicit kinds
mkHeteroPrimEqPred :: Kind -> Kind -> Type -> Type -> Type #
Creates a primite type equality predicate with explicit kinds
mkPrimEqPredRole :: Role -> Type -> Type -> PredType #
Makes a lifted equality predicate at the given role
mkPrimEqPred :: Type -> Type -> Type #
Creates a primitive type equality predicate. Invariant: the types are not Coercions
coercionRole :: Coercion -> Role #
Retrieve the role from a coercion.
coercionKinds :: [Coercion] -> Pair [Type] #
Apply coercionKind to multiple Coercions
lcInScopeSet :: LiftingContext -> InScopeSet #
Get the InScopeSet from a LiftingContext
lcTCvSubst :: LiftingContext -> TCvSubst #
Extract the underlying substitution from the LiftingContext
liftEnvSubstRight :: TCvSubst -> LiftCoEnv -> TCvSubst #
liftEnvSubstLeft :: TCvSubst -> LiftCoEnv -> TCvSubst #
lcSubstRight :: LiftingContext -> TCvSubst #
lcSubstLeft :: LiftingContext -> TCvSubst #
swapLiftCoEnv :: LiftCoEnv -> LiftCoEnv #
Apply "sym" to all coercions in a LiftCoEnv
substRightCo :: LiftingContext -> Coercion -> Coercion #
substLeftCo :: LiftingContext -> Coercion -> Coercion #
isMappedByLC :: TyCoVar -> LiftingContext -> Bool #
Is a var in the domain of a lifting context?
liftCoSubstVarBndrUsing :: (LiftingContext -> Type -> (CoercionN, a)) -> LiftingContext -> TyCoVar -> (LiftingContext, TyCoVar, CoercionN, a) #
liftCoSubstTyVar :: LiftingContext -> Role -> TyVar -> Maybe Coercion #
substForAllCoBndrUsingLC :: Bool -> (Coercion -> Coercion) -> LiftingContext -> TyCoVar -> Coercion -> (LiftingContext, TyCoVar, Coercion) #
Like substForAllCoBndr, but works on a lifting context
zapLiftingContext :: LiftingContext -> LiftingContext #
Erase the environments in a lifting context
extendLiftingContextAndInScope #
Arguments
| :: LiftingContext | Original LC |
| -> TyCoVar | new variable to map... |
| -> Coercion | to this coercion |
| -> LiftingContext |
Extend a lifting context with a new mapping, and extend the in-scope set
Arguments
| :: LiftingContext | original LC |
| -> TyCoVar | new variable to map... |
| -> Coercion | ...to this lifted version |
| -> LiftingContext |
Extend a lifting context with a new mapping.
liftCoSubstWithEx :: Role -> [TyVar] -> [Coercion] -> [TyCoVar] -> [Type] -> (Type -> Coercion, [Type]) #
eqCoercionX :: RnEnv2 -> Coercion -> Coercion -> Bool #
Compare two Coercions, with respect to an RnEnv2
eqCoercion :: Coercion -> Coercion -> Bool #
Syntactic equality of coercions
topNormaliseNewType_maybe :: Type -> Maybe (Coercion, Type) #
Sometimes we want to look through a newtype and get its associated coercion.
This function strips off newtype layers enough to reveal something that isn't
a newtype. Specifically, here's the invariant:
topNormaliseNewType_maybe rec_nts ty = Just (co, ty')
then (a) co : ty0 ~ ty'.
(b) ty' is not a newtype.
The function returns Nothing for non-newtypes,
or unsaturated applications
This function does *not* look through type families, because it has no access to the type family environment. If you do have that at hand, consider to use topNormaliseType_maybe, which should be a drop-in replacement for topNormaliseNewType_maybe If topNormliseNewType_maybe ty = Just (co, ty'), then co : ty ~R ty'
topNormaliseTypeX :: NormaliseStepper ev -> (ev -> ev -> ev) -> Type -> Maybe (ev, Type) #
A general function for normalising the top-level of a type. It continues
to use the provided NormaliseStepper until that function fails, and then
this function returns. The roles of the coercions produced by the
NormaliseStepper must all be the same, which is the role returned from
the call to topNormaliseTypeX.
Typically ev is Coercion.
If topNormaliseTypeX step plus ty = Just (ev, ty')
then ty ~ev1~ t1 ~ev2~ t2 ... ~evn~ ty'
and ev = ev1 plus ev2 plus ... plus evn
If it returns Nothing then no newtype unwrapping could happen
unwrapNewTypeStepper :: NormaliseStepper Coercion #
A NormaliseStepper that unwraps newtypes, careful not to fall into
a loop. If it would fall into a loop, it produces NS_Abort.
composeSteppers :: NormaliseStepper ev -> NormaliseStepper ev -> NormaliseStepper ev #
Try one stepper and then try the next, if the first doesn't make progress. So if it returns NS_Done, it means that both steppers are satisfied
mapStepResult :: (ev1 -> ev2) -> NormaliseStepResult ev1 -> NormaliseStepResult ev2 #
instNewTyCon_maybe :: TyCon -> [Type] -> Maybe (Type, Coercion) #
If co :: T ts ~ rep_ty then:
instNewTyCon_maybe T ts = Just (rep_ty, co)
Checks for a newtype, and for being saturated
mkPiCo :: Role -> Var -> Coercion -> Coercion #
Make a forall Coercion, where both types related by the coercion
are quantified over the same variable.
castCoercionKindI :: Coercion -> CoercionN -> CoercionN -> Coercion #
Creates a new coercion with both of its types casted by different casts
castCoercionKind g h1 h2, where g :: t1 ~r t2,
has type (t1 |> h1) ~r (t2 |> h2).
h1 and h2 must be nominal.
It calls coercionKindRole, so it's quite inefficient (which I stands for)
Use castCoercionKind instead if t1, t2, and r are known beforehand.
castCoercionKind :: Coercion -> Role -> Type -> Type -> CoercionN -> CoercionN -> Coercion #
Creates a new coercion with both of its types casted by different casts
castCoercionKind g r t1 t2 h1 h2, where g :: t1 ~r t2,
has type (t1 |> h1) ~r (t2 |> h2).
h1 and h2 must be nominal.
promoteCoercion :: Coercion -> CoercionN #
like mkKindCo, but aggressively & recursively optimizes to avoid using a KindCo constructor. The output role is nominal.
tyConRolesRepresentational :: TyCon -> [Role] #
tyConRolesX :: Role -> TyCon -> [Role] #
setNominalRole_maybe :: Role -> Coercion -> Maybe Coercion #
Converts a coercion to be nominal, if possible. See Note [Role twiddling functions]
downgradeRole :: Role -> Role -> Coercion -> Coercion #
Like downgradeRole_maybe, but panics if the change isn't a downgrade.
See Note [Role twiddling functions]
mkCoherenceRightCo :: Role -> Type -> CoercionN -> Coercion -> Coercion #
Given ty :: k1, co :: k1 ~ k2, co2:: ty' ~r ty,
produces @co' :: ty' ~r (ty |> co)
It is not only a utility function, but it saves allocation when co
is a GRefl coercion.
mkCoherenceLeftCo :: Role -> Type -> CoercionN -> Coercion -> Coercion #
Given ty :: k1, co :: k1 ~ k2, co2:: ty ~r ty',
produces @co' :: (ty |> co) ~r ty'
It is not only a utility function, but it saves allocation when co
is a GRefl coercion.
mkGReflLeftCo :: Role -> Type -> CoercionN -> Coercion #
Given ty :: k1, co :: k1 ~ k2,
produces co' :: (ty |> co) ~r ty
mkGReflRightCo :: Role -> Type -> CoercionN -> Coercion #
Given ty :: k1, co :: k1 ~ k2,
produces co' :: ty ~r (ty |> co)
nthCoRole :: Int -> Coercion -> Role #
If you're about to call mkNthCo r n co, then r should be
whatever nthCoRole n co returns.
mkTransMCo :: MCoercion -> MCoercion -> MCoercion #
Compose two MCoercions via transitivity
mkHoleCo :: CoercionHole -> Coercion #
Make a coercion from a coercion hole
mkUnbranchedAxInstLHS :: CoAxiom Unbranched -> [Type] -> [Coercion] -> Type #
Instantiate the left-hand side of an unbranched axiom
mkAxInstLHS :: forall (br :: BranchFlag). CoAxiom br -> BranchIndex -> [Type] -> [Coercion] -> Type #
Return the left-hand type of the axiom, when the axiom is instantiated at the types given.
mkUnbranchedAxInstRHS :: CoAxiom Unbranched -> [Type] -> [Coercion] -> Type #
mkAxInstRHS :: forall (br :: BranchFlag). CoAxiom br -> BranchIndex -> [Type] -> [Coercion] -> Type #
mkUnbranchedAxInstCo :: Role -> CoAxiom Unbranched -> [Type] -> [Coercion] -> Coercion #
mkAxInstCo :: forall (br :: BranchFlag). Role -> CoAxiom br -> BranchIndex -> [Type] -> [Coercion] -> Coercion #
isCoVar_maybe :: Coercion -> Maybe CoVar #
Extract a covar, if possible. This check is dirty. Be ashamed of yourself. (It's dirty because it cares about the structure of a coercion, which is morally reprehensible.)
mkCoVarCos :: [CoVar] -> [Coercion] #
mkHomoForAllCos :: [TyCoVar] -> Coercion -> Coercion #
Make a Coercion quantified over a type/coercion variable; the variable has the same type in both sides of the coercion
mkRepReflCo :: Type -> Coercion #
Make a representational reflexive coercion
isReflexiveCo_maybe :: Coercion -> Maybe (Type, Role) #
Extracts the coerced type from a reflexive coercion. This potentially walks over the entire coercion, so avoid doing this in a loop.
isReflCo_maybe :: Coercion -> Maybe (Type, Role) #
Returns the type coerced if this coercion is reflexive. Guaranteed
to work very quickly. Sometimes a coercion can be reflexive, but not
obviously so. c.f. isReflexiveCo_maybe
isGReflCo_maybe :: Coercion -> Maybe (Type, Role) #
Returns the type coerced if this coercion is a generalized reflexive coercion. Guaranteed to work very quickly.
isGReflMCo :: MCoercion -> Bool #
Tests if this MCoercion is obviously generalized reflexive Guaranteed to work very quickly.
isReflCoVar_maybe :: Var -> Maybe Coercion #
coVarTypes :: HasDebugCallStack => CoVar -> Pair Type #
splitForAllCo_co_maybe :: Coercion -> Maybe (CoVar, Coercion, Coercion) #
Like splitForAllCo_maybe, but only returns Just for covar binder
splitForAllCo_ty_maybe :: Coercion -> Maybe (TyVar, Coercion, Coercion) #
Like splitForAllCo_maybe, but only returns Just for tyvar binder
splitAppCo_maybe :: Coercion -> Maybe (Coercion, Coercion) #
Attempt to take a coercion application apart.
splitTyConAppCo_maybe :: Coercion -> Maybe (TyCon, [Coercion]) #
Attempts to tease a coercion apart into a type constructor and the application of a number of coercion arguments to that constructor
getCoVar_maybe :: Coercion -> Maybe CoVar #
Attempts to obtain the type variable underlying a Coercion
decomposeFunCo :: HasDebugCallStack => Role -> Coercion -> (Coercion, Coercion) #
pprCoAxBranch :: TyCon -> CoAxBranch -> SDoc #
pprCoAxBranchLHS :: TyCon -> CoAxBranch -> SDoc #
pprCoAxBranchUser :: TyCon -> CoAxBranch -> SDoc #
pprCoAxiom :: forall (br :: BranchFlag). CoAxiom br -> SDoc #
etaExpandCoAxBranch :: CoAxBranch -> ([TyVar], [Type], Type) #
setCoVarName :: CoVar -> Name -> CoVar #
setCoVarUnique :: CoVar -> Unique -> CoVar #
type NormaliseStepper ev = RecTcChecker -> TyCon -> [Type] -> NormaliseStepResult ev #
A function to check if we can reduce a type by one step. Used
with topNormaliseTypeX.
data NormaliseStepResult ev #
The result of stepping in a normalisation function.
See topNormaliseTypeX.
Constructors
| NS_Done | Nothing more to do |
| NS_Abort | Utter failure. The outer function should fail too. |
| NS_Step RecTcChecker Type ev | We stepped, yielding new bits; ^ ev is evidence; Usually a co :: old type ~ new type |
absentLiteralOf :: TyCon -> Maybe Literal #
literalType :: Literal -> Type #
Find the Haskell Type the literal occupies
litIsLifted :: Literal -> Bool #
litFitsInChar :: Literal -> Bool #
litIsDupable :: DynFlags -> Literal -> Bool #
True if code space does not go bad if we duplicate this literal
litIsTrivial :: Literal -> Bool #
True if there is absolutely no penalty to duplicating the literal. False principally of strings.
"Why?", you say? I'm glad you asked. Well, for one duplicating strings would blow up code sizes. Not only this, it's also unsafe.
Consider a program that wants to traverse a string. One way it might do this is to first compute the Addr# pointing to the end of the string, and then, starting from the beginning, bump a pointer using eqAddr# to determine the end. For instance,
-- Given pointers to the start and end of a string, count how many zeros -- the string contains. countZeros :: Addr -> -> Int countZeros start end = go start 0 where go off n | off `addrEq#` end = n | otherwise = go (off `plusAddr#` 1) n' where n' | isTrue off 0 0#) = n + 1 | otherwise = n
Consider what happens if we considered strings to be trivial (and therefore
duplicable) and emitted a call like countZeros "hello"
. The beginning and end pointers do not belong to the same
string, meaning that an iteration like the above would blow up terribly.
This is what happened in #12757.plusAddr# 5)
Ultimately the solution here is to make primitive strings a bit more structured, ensuring that the compiler can't inline in ways that will break user code. One approach to this is described in #8472.
rubbishLit :: Literal #
A nonsense literal of type forall (a :: .TYPE UnliftedRep). a
nullAddrLit :: Literal #
double2FloatLit :: Literal -> Literal #
float2DoubleLit :: Literal -> Literal #
int2DoubleLit :: Literal -> Literal #
double2IntLit :: Literal -> Literal #
int2FloatLit :: Literal -> Literal #
float2IntLit :: Literal -> Literal #
int2CharLit :: Literal -> Literal #
char2IntLit :: Literal -> Literal #
narrow32WordLit :: Literal -> Literal #
narrow16WordLit :: Literal -> Literal #
narrow8WordLit :: Literal -> Literal #
narrow32IntLit :: Literal -> Literal #
narrow16IntLit :: Literal -> Literal #
narrow8IntLit :: Literal -> Literal #
narrowLit :: Integral a => Proxy a -> Literal -> Literal #
Narrow a literal number (unchecked result range)
int2WordLit :: DynFlags -> Literal -> Literal #
word2IntLit :: DynFlags -> Literal -> Literal #
isLitValue :: Literal -> Bool #
isLitValue_maybe :: Literal -> Maybe Integer #
inCharRange :: Char -> Bool #
inWordRange :: DynFlags -> Integer -> Bool #
inIntRange :: DynFlags -> Integer -> Bool #
mkLitNatural :: Integer -> Type -> Literal #
mkLitInteger :: Integer -> Type -> Literal #
mkLitString :: String -> Literal #
Creates a Literal of type Addr#, which is appropriate for passing to
e.g. some of the "error" functions in GHC.Err such as GHC.Err.runtimeError
mkLitDouble :: Rational -> Literal #
Creates a Literal of type Double#
mkLitFloat :: Rational -> Literal #
Creates a Literal of type Float#
mkLitWord64Wrap :: DynFlags -> Integer -> Literal #
Creates a Literal of type Word64#.
If the argument is out of the range, it is wrapped.
mkLitWord64 :: Integer -> Literal #
Creates a Literal of type Word64#
mkLitInt64Wrap :: DynFlags -> Integer -> Literal #
Creates a Literal of type Int64#.
If the argument is out of the range, it is wrapped.
mkLitInt64 :: Integer -> Literal #
Creates a Literal of type Int64#
mkLitWordWrap :: DynFlags -> Integer -> Literal #
Creates a Literal of type Word#.
If the argument is out of the (target-dependent) range, it is wrapped.
See Note [WordInt underflowoverflow]
mkLitIntWrap :: DynFlags -> Integer -> Literal #
Creates a Literal of type Int#.
If the argument is out of the (target-dependent) range, it is wrapped.
See Note [WordInt underflowoverflow]
mkLitNumber :: DynFlags -> LitNumType -> Integer -> Type -> Literal #
Create a numeric Literal of the given type
litNumCheckRange :: DynFlags -> LitNumType -> Integer -> Bool #
Check that a given number is in the range of a numeric literal
mkLitNumberWrap :: DynFlags -> LitNumType -> Integer -> Type -> Literal #
Create a numeric Literal of the given type
litNumIsSigned :: LitNumType -> Bool #
Indicate if a numeric literal type supports negative numbers
So-called Literals are one of:
- An unboxed numeric literal or floating-point literal which is presumed
to be surrounded by appropriate constructors (
Int#, etc.), so that the overall thing makes sense.
We maintain the invariant that the Integer in the LitNumber
constructor is actually in the (possibly target-dependent) range.
The mkLit{Int,Word}*Wrap smart constructors ensure this by applying
the target machine's wrapping semantics. Use these in situations
where you know the wrapping semantics are correct.
- The literal derived from the label mentioned in a "foreign label"
declaration (
LitLabel) - A
LitRubbishto be used in place of values ofUnliftedRep(i.e. 'MutVar#') when the the value is never used. - A character
- A string
- The NULL pointer
Constructors
| LitChar Char |
|
| LitNumber !LitNumType !Integer Type | Any numeric literal that can be internally represented with an Integer. See Note [Types of LitNumbers] below for the Type field. |
| LitString ByteString | A string-literal: stored and emitted
UTF-8 encoded, we'll arrange to decode it
at runtime. Also emitted with a |
| LitNullAddr | The |
| LitRubbish | A nonsense value, used when an unlifted
binding is absent and has type
|
| LitFloat Rational |
|
| LitDouble Rational |
|
| LitLabel FastString (Maybe Int) FunctionOrData | A label literal. Parameters: 1) The name of the symbol mentioned in the declaration 2) The size (in bytes) of the arguments
the label expects. Only applicable with
3) Flag indicating whether the symbol references a function or a data |
Instances
| Eq Literal | |
| Data Literal | |
Defined in Literal Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Literal -> c Literal # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Literal # toConstr :: Literal -> Constr # dataTypeOf :: Literal -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Literal) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Literal) # gmapT :: (forall b. Data b => b -> b) -> Literal -> Literal # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Literal -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Literal -> r # gmapQ :: (forall d. Data d => d -> u) -> Literal -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Literal -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Literal -> m Literal # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Literal -> m Literal # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Literal -> m Literal # | |
| Ord Literal | Needed for the |
| Binary Literal | |
| Outputable Literal | |
data LitNumType #
Numeric literal type
Constructors
| LitNumInteger |
|
| LitNumNatural |
|
| LitNumInt |
|
| LitNumInt64 |
|
| LitNumWord |
|
| LitNumWord64 |
|
Instances
Arguments
| :: Bool | Should specified binders count towards injective positions in the kind of the TyCon? (If you're using visible kind applications, then you want True here. |
| -> TyCon | |
| -> Int | The number of args the |
| -> Bool | Does |
Does a TyCon (that is applied to some number of arguments) need to be
ascribed with an explicit kind signature to resolve ambiguity if rendered as
a source-syntax type?
(See Note [When does a tycon application need an explicit kind signature?]
for a full explanation of what this function checks for.)
classifiesTypeWithValues :: Kind -> Bool #
Does this classify a type allowed to have values? Responds True to things like *, #, TYPE Lifted, TYPE v, Constraint.
True of any sub-kind of OpenTypeKind
isKindLevPoly :: Kind -> Bool #
Tests whether the given kind (which should look like TYPE x)
is something other than a constructor tree (that is, constructors at every node).
E.g. True of TYPE k, TYPE (F Int)
False of TYPE 'LiftedRep
isConstraintKindCon :: TyCon -> Bool #
splitVisVarsOfTypes :: [Type] -> Pair TyCoVarSet #
splitVisVarsOfType :: Type -> Pair TyCoVarSet #
Retrieve the free variables in this type, splitting them based on whether they are used visibly or invisibly. Invisible ones come first.
synTyConResKind :: TyCon -> Kind #
tyConsOfType :: Type -> UniqSet TyCon #
All type constructors occurring in the type; looking through type synonyms, but not newtypes. When it finds a Class, it returns the class TyCon.
resultIsLevPoly :: Type -> Bool #
Looking past all pi-types, is the end result potentially levity polymorphic? Example: True for (forall r (a :: TYPE r). String -> a) Example: False for (forall r1 r2 (a :: TYPE r1) (b :: TYPE r2). a -> b -> Type)
isTypeLevPoly :: Type -> Bool #
Returns True if a type is levity polymorphic. Should be the same as (isKindLevPoly . typeKind) but much faster. Precondition: The type has kind (TYPE blah)
tcReturnsConstraintKind :: Kind -> Bool #
tcIsRuntimeTypeKind :: Kind -> Bool #
Is this kind equivalent to TYPE r (for some unknown r)?
This considers Constraint to be distinct from *.
tcIsLiftedTypeKind :: Kind -> Bool #
Is this kind equivalent to *?
This considers Constraint to be distinct from *. For a version that
treats them as the same type, see isLiftedTypeKind.
tcIsConstraintKind :: Kind -> Bool #
tcTypeKind :: HasDebugCallStack => Type -> Kind #
typeKind :: HasDebugCallStack => Type -> Kind #
nonDetCmpTc :: TyCon -> TyCon -> Ordering #
nonDetCmpTypes :: [Type] -> [Type] -> Ordering #
nonDetCmpType :: Type -> Type -> Ordering #
eqTypes :: [Type] -> [Type] -> Bool #
Type equality on lists of types, looking through type synonyms but not newtypes.
eqTypeX :: RnEnv2 -> Type -> Type -> Bool #
Compare types with respect to a (presumably) non-empty RnEnv2.
isValidJoinPointType :: JoinArity -> Type -> Bool #
Determine whether a type could be the type of a join point of given total
arity, according to the polymorphism rule. A join point cannot be polymorphic
in its return type, since given
join j a b x y z = e1 in e2,
the types of e1 and e2 must be the same, and a and b are not in scope for e2.
(See Note [The polymorphism rule of join points] in CoreSyn.) Returns False
also if the type simply doesn't have enough arguments.
Note that we need to know how many arguments (type *and* value) the putative join point takes; for instance, if j :: forall a. a -> Int then j could be a binary join point returning an Int, but it could *not* be a unary join point returning a -> Int.
TODO: See Note [Excess polymorphism and join points]
isPrimitiveType :: Type -> Bool #
Returns true of types that are opaque to Haskell.
isStrictType :: HasDebugCallStack => Type -> Bool #
Computes whether an argument (or let right hand side) should
be computed strictly or lazily, based only on its type.
Currently, it's just isUnliftedType. Panics on levity-polymorphic types.
isDataFamilyAppType :: Type -> Bool #
Check whether a type is a data family type
See Type for what an algebraic type is. Should only be applied to types, as opposed to e.g. partially saturated type constructors
isUnboxedSumType :: Type -> Bool #
isUnboxedTupleType :: Type -> Bool #
getRuntimeRep :: HasDebugCallStack => Type -> Type #
Extract the RuntimeRep classifier of a type. For instance,
getRuntimeRep_maybe Int = LiftedRep. Panics if this is not possible.
getRuntimeRep_maybe :: HasDebugCallStack => Type -> Maybe Type #
Extract the RuntimeRep classifier of a type. For instance,
getRuntimeRep_maybe Int = LiftedRep. Returns Nothing if this is not
possible.
dropRuntimeRepArgs :: [Type] -> [Type] #
Drops prefix of RuntimeRep constructors in TyConApps. Useful for e.g.
dropping 'LiftedRep arguments of unboxed tuple TyCon applications:
isRuntimeRepKindedTy :: Type -> Bool #
Is this a type of kind RuntimeRep? (e.g. LiftedRep)
mightBeUnliftedType :: Type -> Bool #
isUnliftedType :: HasDebugCallStack => Type -> Bool #
See Type for what an unlifted type is.
Panics on levity polymorphic types; See mightBeUnliftedType for
a more approximate predicate that behaves better in the presence of
levity polymorphism.
isLiftedType_maybe :: HasDebugCallStack => Type -> Maybe Bool #
Returns Just True if this type is surely lifted, Just False if it is surely unlifted, Nothing if we can't be sure (i.e., it is levity polymorphic), and panics if the kind does not have the shape TYPE r.
isCoVarType :: Type -> Bool #
isFamFreeTy :: Type -> Bool #
coAxNthLHS :: forall (br :: BranchFlag). CoAxiom br -> Int -> Type #
Get the type on the LHS of a coercion induced by a type/data family instance.
mkFamilyTyConApp :: TyCon -> [Type] -> Type #
Given a family instance TyCon and its arg types, return the corresponding family type. E.g:
data family T a data instance T (Maybe b) = MkT b
Where the instance tycon is :RTL, so:
mkFamilyTyConApp :RTL Int = T (Maybe Int)
closeOverKindsDSet :: DTyVarSet -> DTyVarSet #
Add the kind variables free in the kinds of the tyvars in the given set. Returns a deterministic set.
closeOverKindsList :: [TyVar] -> [TyVar] #
Add the kind variables free in the kinds of the tyvars in the given set. Returns a deterministically ordered list.
closeOverKindsFV :: [TyVar] -> FV #
Given a list of tyvars returns a deterministic FV computation that returns the given tyvars with the kind variables free in the kinds of the given tyvars.
closeOverKinds :: TyVarSet -> TyVarSet #
Add the kind variables free in the kinds of the tyvars in the given set. Returns a non-deterministic set.
binderRelevantType_maybe :: TyCoBinder -> Maybe Type #
Extract a relevant type, if there is one.
tyBinderType :: TyBinder -> Type #
tyCoBinderType :: TyCoBinder -> Type #
isAnonTyCoBinder :: TyCoBinder -> Bool #
Does this binder bind a variable that is not erased? Returns
True for anonymous binders.
mkAnonBinder :: AnonArgFlag -> Type -> TyCoBinder #
Make an anonymous binder
appTyArgFlags :: Type -> [Type] -> [ArgFlag] #
Given a Type and a list of argument types to which the Type is
applied, determine each argument's visibility
(Inferred, Specified, or Required).
Most of the time, the arguments will be Required, but not always. Consider
f :: forall a. a -> Type. In f Type Bool, the first argument (Type) is
Specified and the second argument (Bool) is Required. It is precisely
this sort of higher-rank situation in which appTyArgFlags comes in handy,
since f Type Bool would be represented in Core using AppTys.
(See also #15792).
tyConArgFlags :: TyCon -> [Type] -> [ArgFlag] #
Given a TyCon and a list of argument types to which the TyCon is
applied, determine each argument's visibility
(Inferred, Specified, or Required).
Wrinkle: consider the following scenario:
T :: forall k. k -> k tyConArgFlags T [forall m. m -> m -> m, S, R, Q]
After substituting, we get
T (forall m. m -> m -> m) :: (forall m. m -> m -> m) -> forall n. n -> n -> n
Thus, the first argument is invisible, S is visible, R is invisible again,
and Q is visible.
partitionInvisibles :: [(a, ArgFlag)] -> ([a], [a]) #
Given a list of things paired with their visibilities, partition the things into (invisible things, visible things).
filterOutInferredTypes :: TyCon -> [Type] -> [Type] #
filterOutInvisibleTypes :: TyCon -> [Type] -> [Type] #
splitPiTysInvisibleN :: Int -> Type -> ([TyCoBinder], Type) #
splitPiTysInvisible :: Type -> ([TyCoBinder], Type) #
invisibleTyBndrCount :: Type -> Int #
splitForAllVarBndrs :: Type -> ([TyCoVarBinder], Type) #
Like splitPiTys but split off only named binders
and returns TyCoVarBinders rather than TyCoBinders
splitPiTys :: Type -> ([TyCoBinder], Type) #
Split off all TyCoBinders to a type, splitting both proper foralls and functions
splitPiTy :: Type -> (TyCoBinder, Type) #
Takes a forall type apart, or panics
splitPiTy_maybe :: Type -> Maybe (TyCoBinder, Type) #
Attempts to take a forall type apart; works with proper foralls and functions
splitForAllTy_co_maybe :: Type -> Maybe (TyCoVar, Type) #
Like splitForAllTy_maybe, but only returns Just if it is a covar binder.
splitForAllTy_ty_maybe :: Type -> Maybe (TyCoVar, Type) #
Like splitForAllTy_maybe, but only returns Just if it is a tyvar binder.
splitForAllTy_maybe :: Type -> Maybe (TyCoVar, Type) #
Attempts to take a forall type apart, but only if it's a proper forall, with a named binder
dropForAlls :: Type -> Type #
Drops all ForAllTys
splitForAllTy :: Type -> (TyCoVar, Type) #
Take a forall type apart, or panics if that is not possible.
isForAllTy_co :: Type -> Bool #
Like isForAllTy, but returns True only if it is a covar binder
isForAllTy_ty :: Type -> Bool #
Like isForAllTy, but returns True only if it is a tyvar binder
isForAllTy :: Type -> Bool #
Checks whether this is a proper forall (with a named binder)
splitForAllTysSameVis :: ArgFlag -> Type -> ([TyCoVar], Type) #
Like splitForAllTys, but only splits a ForAllTy if
is sameVis argf supplied_argfTrue, where argf is the visibility
of the ForAllTy's binder and supplied_argf is the visibility provided
as an argument to this function.
splitForAllTys :: Type -> ([TyCoVar], Type) #
Take a ForAllTy apart, returning the list of tycovars and the result type. This always succeeds, even if it returns only an empty list. Note that the result type returned may have free variables that were bound by a forall.
Arguments
| :: [TyVar] | binders |
| -> TyCoVarSet | free variables of result |
| -> [TyConBinder] |
Given a list of type-level vars and the free vars of a result kind, makes TyCoBinders, preferring anonymous binders if the variable is, in fact, not dependent. e.g. mkTyConBindersPreferAnon (k:*),(b:k),(c:k) We want (k:*) Named, (b:k) Anon, (c:k) Anon
All non-coercion binders are visible.
mkLamType :: Var -> Type -> Type #
Makes a (->) type or an implicit forall type, depending
on whether it is given a type variable or a term variable.
This is used, for example, when producing the type of a lambda.
Always uses Inferred binders.
mkVisForAllTys :: [TyVar] -> Type -> Type #
Like mkForAllTys, but assumes all variables are dependent and visible
mkSpecForAllTys :: [TyVar] -> Type -> Type #
Like mkForAllTys, but assumes all variables are dependent and
Specified, a common case
mkSpecForAllTy :: TyVar -> Type -> Type #
Like mkForAllTy, but assumes the variable is dependent and Specified,
a common case
mkInvForAllTys :: [TyVar] -> Type -> Type #
Like mkTyCoInvForAllTys, but tvs should be a list of tyvar
mkTyCoInvForAllTys :: [TyCoVar] -> Type -> Type #
Like mkForAllTys, but assumes all variables are dependent and
Inferred, a common case
mkInvForAllTy :: TyVar -> Type -> Type #
Like mkTyCoInvForAllTy, but tv should be a tyvar
stripCoercionTy :: Type -> Coercion #
isCoercionTy_maybe :: Type -> Maybe Coercion #
mkCoercionTy :: Coercion -> Type #
discardCast :: Type -> Type #
Drop the cast on a type, if any. If there is no cast, just return the original type. This is rarely what you want. The CastTy data constructor (in TyCoRep) has the invariant that another CastTy is not inside. See the data constructor for a full description of this invariant. Since CastTy cannot be nested, the result of discardCast cannot be a CastTy.
tyConBindersTyCoBinders :: [TyConBinder] -> [TyCoBinder] #
newTyConInstRhs :: TyCon -> [Type] -> Type #
Unwrap one layer of newtype on a type constructor and its
arguments, using an eta-reduced version of the newtype if possible.
This requires tys to have at least newTyConInstArity tycon elements.
splitListTyConApp_maybe :: Type -> Maybe Type #
Attempts to tease a list type apart and gives the type of the elements if successful (looks through type synonyms)
repSplitTyConApp_maybe :: HasDebugCallStack => Type -> Maybe (TyCon, [Type]) #
Like splitTyConApp_maybe, but doesn't look through synonyms. This
assumes the synonyms have already been dealt with.
Moreover, for a FunTy, it only succeeds if the argument types have enough info to extract the runtime-rep arguments that the funTyCon requires. This will usually be true; but may be temporarily false during canonicalization: see Note [FunTy and decomposing tycon applications] in TcCanonical
tcSplitTyConApp_maybe :: HasCallStack => Type -> Maybe (TyCon, [Type]) #
Split a type constructor application into its type constructor and
applied types. Note that this may fail in the case of a FunTy with an
argument of unknown kind FunTy (e.g. FunTy (a :: k) Int. since the kind
of a isn't of the form TYPE rep). Consequently, you may need to zonk your
type before using this function.
If you only need the TyCon, consider using tcTyConAppTyCon_maybe.
splitTyConApp :: Type -> (TyCon, [Type]) #
Attempts to tease a type apart into a type constructor and the application
of a number of arguments to that constructor. Panics if that is not possible.
See also splitTyConApp_maybe
tyConAppArgN :: Int -> Type -> Type #
tyConAppArgs :: Type -> [Type] #
tyConAppArgs_maybe :: Type -> Maybe [Type] #
The same as snd . splitTyConApp
tyConAppTyCon :: Type -> TyCon #
tyConAppTyCon_maybe :: Type -> Maybe TyCon #
The same as fst . splitTyConApp
tyConAppTyConPicky_maybe :: Type -> Maybe TyCon #
Retrieve the tycon heading this type, if there is one. Does not look through synonyms.
mkTyConApp :: TyCon -> [Type] -> Type #
piResultTys :: HasDebugCallStack => Type -> [Type] -> Type #
(piResultTys f_ty [ty1, .., tyn]) gives the type of (f ty1 .. tyn)
where f :: f_ty
piResultTys is interesting because:
1. f_ty may have more for-alls than there are args
2. Less obviously, it may have fewer for-alls
For case 2. think of:
piResultTys (forall a.a) [forall b.b, Int]
This really can happen, but only (I think) in situations involving
undefined. For example:
undefined :: forall a. a
Term: undefined (forall b. b->b) Int
This term should have type (Int -> Int), but notice that
there are more type args than foralls in undefineds type.
Just like piResultTys but for a single argument
Try not to iterate piResultTy, because it's inefficient to substitute
one variable at a time; instead use 'piResultTys"
Extract the function argument type and panic if that is not possible
funResultTy :: Type -> Type #
Extract the function result type and panic if that is not possible
splitFunTys :: Type -> ([Type], Type) #
splitFunTy_maybe :: Type -> Maybe (Type, Type) #
Attempts to extract the argument and result types from a type
splitFunTy :: Type -> (Type, Type) #
Attempts to extract the argument and result types from a type, and
panics if that is not possible. See also splitFunTy_maybe
pprUserTypeErrorTy :: Type -> SDoc #
Render a type corresponding to a user type error into a SDoc.
userTypeError_maybe :: Type -> Maybe Type #
Is this type a custom user error? If so, give us the kind and the error message.
isStrLitTy :: Type -> Maybe FastString #
Is this a symbol literal. We also look through type synonyms.
mkStrLitTy :: FastString -> Type #
isNumLitTy :: Type -> Maybe Integer #
Is this a numeric literal. We also look through type synonyms.
mkNumLitTy :: Integer -> Type #
repSplitAppTys :: HasDebugCallStack => Type -> (Type, [Type]) #
Like splitAppTys, but doesn't look through type synonyms
splitAppTys :: Type -> (Type, [Type]) #
Recursively splits a type as far as is possible, leaving a residual type being applied to and the type arguments applied to it. Never fails, even if that means returning an empty list of type applications.
splitAppTy :: Type -> (Type, Type) #
Attempts to take a type application apart, as in splitAppTy_maybe,
and panics if this is not possible
tcRepSplitAppTy_maybe :: Type -> Maybe (Type, Type) #
Does the AppTy split as in tcSplitAppTy_maybe, but assumes that
any coreView stuff is already done. Refuses to look through (c => t)
repSplitAppTy_maybe :: HasDebugCallStack => Type -> Maybe (Type, Type) #
Does the AppTy split as in splitAppTy_maybe, but assumes that
any Core view stuff is already done
splitAppTy_maybe :: Type -> Maybe (Type, Type) #
Attempt to take a type application apart, whether it is a function, type constructor, or plain type application. Note that type family applications are NEVER unsaturated by this!
repGetTyVar_maybe :: Type -> Maybe TyVar #
Attempts to obtain the type variable underlying a Type, without
any expansion
getCastedTyVar_maybe :: Type -> Maybe (TyVar, CoercionN) #
If the type is a tyvar, possibly under a cast, returns it, along with the coercion. Thus, the co is :: kind tv ~N kind ty
getTyVar :: String -> Type -> TyVar #
Attempts to obtain the type variable underlying a Type, and panics with the
given message if this is not a type variable type. See also getTyVar_maybe
mapCoercion :: Monad m => TyCoMapper env m -> env -> Coercion -> m Coercion #
isRuntimeRepVar :: TyVar -> Bool #
Is a tyvar of type RuntimeRep?
isUnliftedRuntimeRep :: Type -> Bool #
isUnliftedTypeKind :: Kind -> Bool #
Returns True if the kind classifies unlifted types and False otherwise. Note that this returns False for levity-polymorphic kinds, which may be specialized to a kind that classifies unlifted types.
isLiftedRuntimeRep :: Type -> Bool #
kindRep_maybe :: HasDebugCallStack => Kind -> Maybe Type #
Given a kind (TYPE rr), extract its RuntimeRep classifier rr.
For example, kindRep_maybe * = Just LiftedRep
Returns Nothing if the kind is not of form (TYPE rr)
Treats * and Constraint as the same
kindRep :: HasDebugCallStack => Kind -> Type #
Extract the RuntimeRep classifier of a type from its kind. For example,
kindRep * = LiftedRep; Panics if this is not possible.
Treats * and Constraint as the same
expandTypeSynonyms :: Type -> Type #
Expand out all type synonyms. Actually, it'd suffice to expand out just the ones that discard type variables (e.g. type Funny a = Int) But we don't know which those are currently, so we just expand all.
expandTypeSynonyms only expands out type synonyms mentioned in the type,
not in the kinds of any TyCon or TyVar mentioned in the type.
Keep this synchronized with synonymTyConsOfType
data TyCoMapper env (m :: Type -> Type) #
This describes how a "map" operation over a type/coercion should behave
Constructors
| TyCoMapper | |
Fields
| |
cloneTyVarBndrs :: TCvSubst -> [TyVar] -> UniqSupply -> (TCvSubst, [TyVar]) #
substCoVarBndr :: HasCallStack => TCvSubst -> CoVar -> (TCvSubst, CoVar) #
substVarBndrs :: HasCallStack => TCvSubst -> [TyCoVar] -> (TCvSubst, [TyCoVar]) #
substVarBndr :: HasCallStack => TCvSubst -> TyCoVar -> (TCvSubst, TyCoVar) #
substTyVarBndrs :: HasCallStack => TCvSubst -> [TyVar] -> (TCvSubst, [TyVar]) #
substTyVarBndr :: HasCallStack => TCvSubst -> TyVar -> (TCvSubst, TyVar) #
substCoVars :: TCvSubst -> [CoVar] -> [Coercion] #
substCoVar :: TCvSubst -> CoVar -> Coercion #
substCos :: HasCallStack => TCvSubst -> [Coercion] -> [Coercion] #
Substitute within several Coercions
The substitution has to satisfy the invariants described in
Note [The substitution invariant].
substCoUnchecked :: TCvSubst -> Coercion -> Coercion #
Substitute within a Coercion disabling sanity checks.
The problems that the sanity checks in substCo catch are described in
Note [The substitution invariant].
The goal of #11371 is to migrate all the calls of substCoUnchecked to
substCo and remove this function. Please don't use in new code.
substTyVars :: TCvSubst -> [TyVar] -> [Type] #
substTyVar :: TCvSubst -> TyVar -> Type #
substThetaUnchecked :: TCvSubst -> ThetaType -> ThetaType #
Substitute within a ThetaType disabling the sanity checks.
The problems that the sanity checks in substTys catch are described in
Note [The substitution invariant].
The goal of #11371 is to migrate all the calls of substThetaUnchecked to
substTheta and remove this function. Please don't use in new code.
substTheta :: HasCallStack => TCvSubst -> ThetaType -> ThetaType #
Substitute within a ThetaType
The substitution has to satisfy the invariants described in
Note [The substitution invariant].
substTysUnchecked :: TCvSubst -> [Type] -> [Type] #
Substitute within several Types disabling the sanity checks.
The problems that the sanity checks in substTys catch are described in
Note [The substitution invariant].
The goal of #11371 is to migrate all the calls of substTysUnchecked to
substTys and remove this function. Please don't use in new code.
substTys :: HasCallStack => TCvSubst -> [Type] -> [Type] #
Substitute within several Types
The substitution has to satisfy the invariants described in
Note [The substitution invariant].
substTyUnchecked :: TCvSubst -> Type -> Type #
Substitute within a Type disabling the sanity checks.
The problems that the sanity checks in substTy catch are described in
Note [The substitution invariant].
The goal of #11371 is to migrate all the calls of substTyUnchecked to
substTy and remove this function. Please don't use in new code.
substTyAddInScope :: TCvSubst -> Type -> Type #
Substitute within a Type after adding the free variables of the type
to the in-scope set. This is useful for the case when the free variables
aren't already in the in-scope set or easily available.
See also Note [The substitution invariant].
substTysWith :: [TyVar] -> [Type] -> [Type] -> [Type] #
Type substitution, see zipTvSubst
substCoWithUnchecked :: [TyVar] -> [Type] -> Coercion -> Coercion #
Coercion substitution, see zipTvSubst. Disables sanity checks.
The problems that the sanity checks in substCo catch are described in
Note [The substitution invariant].
The goal of #11371 is to migrate all the calls of substCoUnchecked to
substCo and remove this function. Please don't use in new code.
substCoWith :: HasCallStack => [TyVar] -> [Type] -> Coercion -> Coercion #
Coercion substitution, see zipTvSubst
substTyWithUnchecked :: [TyVar] -> [Type] -> Type -> Type #
Type substitution, see zipTvSubst. Disables sanity checks.
The problems that the sanity checks in substTy catch are described in
Note [The substitution invariant].
The goal of #11371 is to migrate all the calls of substTyUnchecked to
substTy and remove this function. Please don't use in new code.
substTyWith :: HasCallStack => [TyVar] -> [Type] -> Type -> Type #
Type substitution, see zipTvSubst
zipCoEnv :: HasDebugCallStack => [CoVar] -> [Coercion] -> CvSubstEnv #
zipTyEnv :: HasDebugCallStack => [TyVar] -> [Type] -> TvSubstEnv #
mkTvSubstPrs :: [(TyVar, Type)] -> TCvSubst #
Generates the in-scope set for the TCvSubst from the types in the
incoming environment. No CoVars, please!
zipTCvSubst :: HasDebugCallStack => [TyCoVar] -> [Type] -> TCvSubst #
zipTvSubst :: HasDebugCallStack => [TyVar] -> [Type] -> TCvSubst #
Generates the in-scope set for the TCvSubst from the types in the incoming
environment. No CoVars, please!
unionTCvSubst :: TCvSubst -> TCvSubst -> TCvSubst #
extendTvSubstBinderAndInScope :: TCvSubst -> TyCoBinder -> Type -> TCvSubst #
extendTCvInScopeSet :: TCvSubst -> VarSet -> TCvSubst #
extendTCvInScopeList :: TCvSubst -> [Var] -> TCvSubst #
extendTCvInScope :: TCvSubst -> Var -> TCvSubst #
zapTCvSubst :: TCvSubst -> TCvSubst #
setTvSubstEnv :: TCvSubst -> TvSubstEnv -> TCvSubst #
notElemTCvSubst :: Var -> TCvSubst -> Bool #
getTCvSubstRangeFVs :: TCvSubst -> VarSet #
Returns the free variables of the types in the range of a substitution as a non-deterministic set.
getTCvInScope :: TCvSubst -> InScopeSet #
getCvSubstEnv :: TCvSubst -> CvSubstEnv #
getTvSubstEnv :: TCvSubst -> TvSubstEnv #
mkTCvSubst :: InScopeSet -> (TvSubstEnv, CvSubstEnv) -> TCvSubst #
isEmptyTCvSubst :: TCvSubst -> Bool #
mkEmptyTCvSubst :: InScopeSet -> TCvSubst #
composeTCvSubst :: TCvSubst -> TCvSubst -> TCvSubst #
Composes two substitutions, applying the second one provided first, like in function composition.
composeTCvSubstEnv :: InScopeSet -> (TvSubstEnv, CvSubstEnv) -> (TvSubstEnv, CvSubstEnv) -> (TvSubstEnv, CvSubstEnv) #
(compose env1 env2)(x) is env1(env2(x)); i.e. apply env2 then env1.
It assumes that both are idempotent.
Typically, env1 is the refinement to a base substitution env2
Type & coercion substitution
The following invariants must hold of a TCvSubst:
- The in-scope set is needed only to guide the generation of fresh uniques
- In particular, the kind of the type variables in the in-scope set is not relevant
- The substitution is only applied ONCE! This is because in general such application will not reach a fixed point.
Constructors
| TCvSubst InScopeSet TvSubstEnv CvSubstEnv |
pprParendCo :: Coercion -> SDoc #
tidyTopType :: Type -> Type #
Calls tidyType on a top-level type (i.e. with an empty tidying environment)
tidyOpenTypes :: TidyEnv -> [Type] -> (TidyEnv, [Type]) #
Grabs the free type variables, tidies them
and then uses tidyType to work over the type itself
tidyTyCoVarOcc :: TidyEnv -> TyCoVar -> TyCoVar #
tidyOpenTyCoVar :: TidyEnv -> TyCoVar -> (TidyEnv, TyCoVar) #
Treat a new TyCoVar as a binder, and give it a fresh tidy name
using the environment if one has not already been allocated. See
also tidyVarBndr
tidyFreeTyCoVars :: TidyEnv -> [TyCoVar] -> TidyEnv #
Add the free TyVars to the env in tidy form,
so that we can tidy the type they are free in
tidyVarBndrs :: TidyEnv -> [TyCoVar] -> (TidyEnv, [TyCoVar]) #
This tidies up a type for printing in an error message, or in an interface file.
It doesn't change the uniques at all, just the print names.
tyCoVarsOfTypesWellScoped :: [Type] -> [TyVar] #
Get the free vars of types in scoped order
tyCoVarsOfTypeWellScoped :: Type -> [TyVar] #
Get the free vars of a type in scoped order
scopedSort :: [TyCoVar] -> [TyCoVar] #
Do a topological sort on a list of tyvars, so that binders occur before occurrences E.g. given [ a::k, k::*, b::k ] it'll return a well-scoped list [ k::*, a::k, b::k ]
This is a deterministic sorting operation (that is, doesn't depend on Uniques).
It is also meant to be stable: that is, variables should not be reordered unnecessarily. This is specified in Note [ScopedSort] See also Note [Ordering of implicit variables] in RnTypes
noFreeVarsOfType :: Type -> Bool #
Returns True if this type has no free variables. Should be the same as isEmptyVarSet . tyCoVarsOfType, but faster in the non-forall case.
coVarsOfCo :: Coercion -> CoVarSet #
coVarsOfTypes :: [Type] -> TyCoVarSet #
coVarsOfType :: Type -> CoVarSet #
tyCoFVsOfCos :: [Coercion] -> FV #
tyCoFVsOfCo :: Coercion -> FV #
tyCoVarsOfCoDSet :: Coercion -> DTyCoVarSet #
Get a deterministic set of the vars free in a coercion
tyCoFVsVarBndr :: Var -> FV -> FV #
tyCoFVsVarBndrs :: [Var] -> FV -> FV #
tyCoFVsBndr :: TyCoVarBinder -> FV -> FV #
tyCoFVsOfType :: Type -> FV #
The worker for tyCoFVsOfType and tyCoFVsOfTypeList.
The previous implementation used unionVarSet which is O(n+m) and can
make the function quadratic.
It's exported, so that it can be composed with
other functions that compute free variables.
See Note [FV naming conventions] in FV.
Eta-expanded because that makes it run faster (apparently) See Note [FV eta expansion] in FV for explanation.
tyCoVarsOfTypeDSet :: Type -> DTyCoVarSet #
tyCoFVsOfType that returns free variables of a type in a deterministic
set. For explanation of why using VarSet is not deterministic see
Note [Deterministic FV] in FV.
tyCoVarsOfCos :: [Coercion] -> TyCoVarSet #
tyCoVarsOfCo :: Coercion -> TyCoVarSet #
tyCoVarsOfTypes :: [Type] -> TyCoVarSet #
tyCoVarsOfType :: Type -> TyCoVarSet #
type InterestingVarFun = Var -> Bool #
Predicate on possible free variables: returns True iff the variable is
interesting
The (->) type constructor.
(->) :: forall (rep1 :: RuntimeRep) (rep2 :: RuntimeRep).
TYPE rep1 -> TYPE rep2 -> *
coercionSize :: Coercion -> Int #
setCoHoleCoVar :: CoercionHole -> CoVar -> CoercionHole #
coHoleCoVar :: CoercionHole -> CoVar #
Create the plain type constructor type which has been applied to no type arguments at all.
mkPiTys :: [TyCoBinder] -> Type -> Type #
mkPiTy :: TyCoBinder -> Type -> Type #
mkForAllTys :: [TyCoVarBinder] -> Type -> Type #
Wraps foralls over the type using the provided TyCoVars from left to right
mkInvisFunTys :: [Type] -> Type -> Type #
Make nested arrow types
mkVisFunTys :: [Type] -> Type -> Type #
Make nested arrow types
mkInvisFunTy :: Type -> Type -> Type infixr 3 #
mkVisFunTy :: Type -> Type -> Type infixr 3 #
mkTyVarTys :: [TyVar] -> [Type] #
isNamedBinder :: TyCoBinder -> Bool #
isVisibleBinder :: TyCoBinder -> Bool #
Does this binder bind a visible argument?
isInvisibleBinder :: TyCoBinder -> Bool #
Does this binder bind an invisible argument?
type KindOrType = Type #
The key representation of types within the compiler
A type labeled KnotTied might have knot-tied tycons in it. See
Note [Type checking recursive type and class declarations] in
TcTyClsDecls
type MCoercionR = MCoercion #
data CoercionHole #
A coercion to be filled in by the type-checker. See Note [Coercion holes]
Instances
| Data CoercionHole | |
Defined in TyCoRep Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CoercionHole -> c CoercionHole # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CoercionHole # toConstr :: CoercionHole -> Constr # dataTypeOf :: CoercionHole -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c CoercionHole) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CoercionHole) # gmapT :: (forall b. Data b => b -> b) -> CoercionHole -> CoercionHole # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CoercionHole -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CoercionHole -> r # gmapQ :: (forall d. Data d => d -> u) -> CoercionHole -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> CoercionHole -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> CoercionHole -> m CoercionHole # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CoercionHole -> m CoercionHole # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CoercionHole -> m CoercionHole # | |
| Outputable CoercionHole | |
Defined in TyCoRep | |
isPredTy :: HasDebugCallStack => Type -> Bool #
isCoercionTy :: Type -> Bool #
mkCastTy :: Type -> Coercion -> Type #
Make a CastTy. The Coercion must be nominal. Checks the
Coercion for reflexivity, dropping it if it's reflexive.
See Note [Respecting definitional equality] in TyCoRep
piResultTy :: HasDebugCallStack => Type -> Type -> Type #
eqType :: Type -> Type -> Bool #
Type equality on source types. Does not look through newtypes or
PredTypes, but it does look through type synonyms.
This first checks that the kinds of the types are equal and then
checks whether the types are equal, ignoring casts and coercions.
(The kind check is a recursive call, but since all kinds have type
Type, there is no need to check the types of kinds.)
See also Note [Non-trivial definitional equality] in TyCoRep.
coreView :: Type -> Maybe Type #
This function Strips off the top layer only of a type synonym
application (if any) its underlying representation type.
Returns Nothing if there is nothing to look through.
This function considers Constraint to be a synonym of TYPE LiftedRep.
By being non-recursive and inlined, this case analysis gets efficiently joined onto the case analysis that the caller is already doing
tcView :: Type -> Maybe Type #
Gives the typechecker view of a type. This unwraps synonyms but
leaves Constraint alone. c.f. coreView, which turns Constraint into
TYPE LiftedRep. Returns Nothing if no unwrapping happens.
See also Note [coreView vs tcView]
isRuntimeRepTy :: Type -> Bool #
Is this the type RuntimeRep?
isLiftedTypeKind :: Kind -> Bool #
This version considers Constraint to be the same as *. Returns True if the argument is equivalent to Type/Constraint and False otherwise. See Note [Kind Constraint and kind Type]
splitTyConApp_maybe :: HasDebugCallStack => Type -> Maybe (TyCon, [Type]) #
Attempts to tease a type apart into a type constructor and the application of a number of arguments to that constructor
tyConSkolem :: TyCon -> Bool #
Returns whether or not this TyCon is definite, or a hole
that may be filled in at some later point. See Note [Skolem abstract data]
checkRecTc :: RecTcChecker -> TyCon -> Maybe RecTcChecker #
setRecTcMaxBound :: Int -> RecTcChecker -> RecTcChecker #
Change the upper bound for the number of times a RecTcChecker is allowed
to encounter each TyCon.
The default upper bound (100) for the number of times a RecTcChecker is
allowed to encounter each TyCon.
Initialise a RecTcChecker with defaultRecTcMaxBound.
pprPromotionQuote :: TyCon -> SDoc #
tcFlavourIsOpen :: TyConFlavour -> Bool #
Is this flavour of TyCon an open type family or a data family?
tyConFlavour :: TyCon -> TyConFlavour #
mkTyConTagMap :: TyCon -> NameEnv ConTag #
tyConRuntimeRepInfo :: TyCon -> RuntimeRepInfo #
Extract any RuntimeRepInfo from this TyCon
tyConFamInst_maybe :: TyCon -> Maybe (TyCon, [Type]) #
If this TyCon is that of a data family instance, return the family in question
and the instance types. Otherwise, return Nothing
tyConFamInstSig_maybe :: TyCon -> Maybe (TyCon, [Type], CoAxiom Unbranched) #
isFamInstTyCon :: TyCon -> Bool #
Is this TyCon that for a data family instance?
tyConClass_maybe :: TyCon -> Maybe Class #
If this TyCon is that for a class instance, return the class it is for.
Otherwise returns Nothing
isClassTyCon :: TyCon -> Bool #
Is this TyCon that for a class instance?
famTyConFlav_maybe :: TyCon -> Maybe FamTyConFlav #
Extract the flavour of a type family (with all the extra information that it carries)
synTyConRhs_maybe :: TyCon -> Maybe Type #
Extract the information pertaining to the right hand side of a type synonym
(type) declaration.
synTyConDefn_maybe :: TyCon -> Maybe ([TyVar], Type) #
Extract the TyVars bound by a vanilla type synonym
and the corresponding (unsubstituted) right hand side.
tyConStupidTheta :: TyCon -> [PredType] #
Find the "stupid theta" of the TyCon. A "stupid theta" is the context
to the left of an algebraic type declaration, e.g. Eq a in the declaration
data Eq a => T a ...
newTyConDataCon_maybe :: TyCon -> Maybe DataCon #
newTyConCo :: TyCon -> CoAxiom Unbranched #
newTyConCo_maybe :: TyCon -> Maybe (CoAxiom Unbranched) #
newTyConEtadRhs :: TyCon -> ([TyVar], Type) #
newTyConEtadArity :: TyCon -> Int #
The number of type parameters that need to be passed to a newtype to resolve it. May be less than in the definition if it can be eta-contracted.
newTyConRhs :: TyCon -> ([TyVar], Type) #
tyConRoles :: TyCon -> [Role] #
Get the list of roles for the type parameters of a TyCon
tyConFamilyResVar_maybe :: TyCon -> Maybe Name #
Extract type variable naming the result of injective type family
algTyConRhs :: TyCon -> AlgTyConRhs #
Extract an AlgTyConRhs with information about data constructors from an
algebraic or tuple TyCon. Panics for any other sort of TyCon
tyConFamilySize :: TyCon -> Int #
tyConSingleDataCon :: TyCon -> DataCon #
tyConSingleDataCon_maybe :: TyCon -> Maybe DataCon #
If the given TyCon has a single data constructor, i.e. it is a data
type with one alternative, a tuple type or a newtype then that constructor
is returned. If the TyCon has more than one constructor, or represents a
primitive or function type constructor then Nothing is returned. In any
other case, the function panics
tyConDataCons_maybe :: TyCon -> Maybe [DataCon] #
tyConDataCons :: TyCon -> [DataCon] #
As tyConDataCons_maybe, but returns the empty list of constructors if no
constructors could be found
isTyConWithSrcDataCons :: TyCon -> Bool #
Check if the tycon actually refers to a proper `data` or `newtype` with user defined constructors rather than one from a class or other construction.
Arguments
| :: TyCon | |
| -> [tyco] | Arguments to |
| -> Maybe ([(TyVar, tyco)], Type, [tyco]) | Returns a |
Expand a type synonym application, if any
isTcLevPoly :: TyCon -> Bool #
Could this TyCon ever be levity-polymorphic when fully applied? True is safe. False means we're sure. Does only a quick check based on the TyCon's category. Precondition: The fully-applied TyCon has kind (TYPE blah)
setTcTyConKind :: TyCon -> Kind -> TyCon #
tyConCType_maybe :: TyCon -> Maybe CType #
isImplicitTyCon :: TyCon -> Bool #
Identifies implicit tycons that, in particular, do not go into interface files (because they are implicitly reconstructed when the interface is read).
Note that:
- Associated families are implicit, as they are re-constructed from the class declaration in which they reside, and
- Family instances are not implicit as they represent the instance body
(similar to a
dfundoes that for a class instance). - Tuples are implicit iff they have a wired-in name (namely: boxed and unboxed tuples are wired-in and implicit, but constraint tuples are not)
isLiftedTypeKindTyConName :: Name -> Bool #
isKindTyCon :: TyCon -> Bool #
Is this tycon really meant for use at the kind level? That is, should it be permitted without -XDataKinds?
isPromotedDataCon_maybe :: TyCon -> Maybe DataCon #
Retrieves the promoted DataCon if this is a PromotedDataCon;
isPromotedDataCon :: TyCon -> Bool #
Is this a PromotedDataCon?
isPromotedTupleTyCon :: TyCon -> Bool #
Is this the TyCon for a promoted tuple?
isUnboxedSumTyCon :: TyCon -> Bool #
Is this the TyCon for an unboxed sum?
isBoxedTupleTyCon :: TyCon -> Bool #
Is this the TyCon for a boxed tuple?
tyConTuple_maybe :: TyCon -> Maybe TupleSort #
tyConFlavourAssoc_maybe :: TyConFlavour -> Maybe TyCon #
Get the enclosing class TyCon (if there is one) for the given TyConFlavour
tyConAssoc_maybe :: TyCon -> Maybe TyCon #
Get the enclosing class TyCon (if there is one) for the given TyCon.
isTyConAssoc :: TyCon -> Bool #
Is this TyCon for an associated type?
tyConInjectivityInfo :: TyCon -> Injectivity #
returns tyConInjectivityInfo tc is Injective istc is an
injective tycon (where is states for which tyConBinders tc is
injective), or NotInjective otherwise.
isClosedSynFamilyTyConWithAxiom_maybe :: TyCon -> Maybe (CoAxiom Branched) #
Is this a non-empty closed type family? Returns Nothing for
abstract or empty closed families.
isOpenTypeFamilyTyCon :: TyCon -> Bool #
Is this an open type family TyCon?
isDataFamilyTyCon :: TyCon -> Bool #
Is this a synonym TyCon that can have may have further instances appear?
isTypeFamilyTyCon :: TyCon -> Bool #
Is this a synonym TyCon that can have may have further instances appear?
isOpenFamilyTyCon :: TyCon -> Bool #
Is this a TyCon, synonym or otherwise, that defines a family with
instances?
isFamilyTyCon :: TyCon -> Bool #
Is this a TyCon, synonym or otherwise, that defines a family?
isEnumerationTyCon :: TyCon -> Bool #
Is this an algebraic TyCon which is just an enumeration of values?
isGadtSyntaxTyCon :: TyCon -> Bool #
Is this an algebraic TyCon declared with the GADT syntax?
mustBeSaturated :: TyCon -> Bool #
True iff we can decompose (T a b c) into ((T a b) c) I.e. is it injective and generative w.r.t nominal equality? That is, if (T a b) ~N d e f, is it always the case that (T ~N d), (a ~N e) and (b ~N f)? Specifically NOT true of synonyms (open and otherwise)
It'd be unusual to call mustBeSaturated on a regular H98 type synonym, because you should probably have expanded it first But regardless, it's not decomposable
isFamFreeTyCon :: TyCon -> Bool #
isTauTyCon :: TyCon -> Bool #
isTypeSynonymTyCon :: TyCon -> Bool #
Is this a TyCon representing a regular H98 type synonym (type)?
isDataSumTyCon_maybe :: TyCon -> Maybe [DataCon] #
isProductTyCon :: TyCon -> Bool #
unwrapNewTyConEtad_maybe :: TyCon -> Maybe ([TyVar], Type, CoAxiom Unbranched) #
unwrapNewTyCon_maybe :: TyCon -> Maybe ([TyVar], Type, CoAxiom Unbranched) #
isNewTyCon :: TyCon -> Bool #
Is this TyCon that for a newtype
isGenInjAlgRhs :: AlgTyConRhs -> Bool #
Is this an AlgTyConRhs of a TyCon that is generative and injective
with respect to representational equality?
isGenerativeTyCon :: TyCon -> Role -> Bool #
isGenerativeTyCon is true of TyCons for which this property holds
(where X is the role passed in):
If (T tys ~X t), then (t's head ~X T).
See also Note [Decomposing equality] in TcCanonical
isInjectiveTyCon :: TyCon -> Role -> Bool #
isInjectiveTyCon is true of TyCons for which this property holds
(where X is the role passed in):
If (T a1 b1 c1) ~X (T a2 b2 c2), then (a1 ~X1 a2), (b1 ~X2 b2), and (c1 ~X3 c2)
(where X1, X2, and X3, are the roles given by tyConRolesX tc X)
See also Note [Decomposing equality] in TcCanonical
isDataTyCon :: TyCon -> Bool #
Returns True for data types that are definitely represented by
heap-allocated constructors. These are scrutinised by Core-level
case expressions, and they get info tables allocated for them.
Generally, the function will be true for all data types and false
for newtypes, unboxed tuples, unboxed sums and type family
TyCons. But it is not guaranteed to return True in all cases
that it could.
NB: for a data type family, only the instance TyCons
get an info table. The family declaration TyCon does not
isVanillaAlgTyCon :: TyCon -> Bool #
Returns True for vanilla AlgTyCons -- that is, those created
with a data or newtype declaration.
isAlgTyCon :: TyCon -> Bool #
Returns True if the supplied TyCon resulted from either a
data or newtype declaration
isUnliftedTyCon :: TyCon -> Bool #
isPrimTyCon :: TyCon -> Bool #
Does this TyCon represent something that cannot be defined in Haskell?
isAbstractTyCon :: TyCon -> Bool #
Test if the TyCon is algebraic but abstract (invisible data constructors)
mkPromotedDataCon :: DataCon -> Name -> TyConRepName -> [TyConTyCoBinder] -> Kind -> [Role] -> RuntimeRepInfo -> TyCon #
Create a promoted data constructor TyCon
Somewhat dodgily, we give it the same Name
as the data constructor itself; when we pretty-print
the TyCon we add a quote; see the Outputable TyCon instance
Arguments
| :: Name | |
| -> [TyConBinder] | |
| -> Kind | result kind |
| -> Maybe Name | |
| -> FamTyConFlav | |
| -> Maybe Class | |
| -> Injectivity | |
| -> TyCon |
Create a type family TyCon
Create a type synonym TyCon
Arguments
| :: Name | |
| -> [TyConBinder] | |
| -> Kind | result kind |
| -> [Role] | |
| -> TyCon |
Create a lifted primitive TyCon such as RealWorld
Kind constructors
Arguments
| :: Name | |
| -> [TyConBinder] | |
| -> Kind | result kind, never levity-polymorphic |
| -> [Role] | |
| -> TyCon |
Create an unlifted primitive TyCon, such as Int#.
noTcTyConScopedTyVars :: [(Name, TcTyVar)] #
No scoped type variables (to be used with mkTcTyCon).
Arguments
| :: Name | |
| -> [TyConBinder] | |
| -> Kind | result kind only |
| -> [(Name, TcTyVar)] | Scoped type variables; see Note [How TcTyCons work] in TcTyClsDecls |
| -> Bool | Is this TcTyCon generalised already? |
| -> TyConFlavour | What sort of |
| -> TyCon |
Makes a tycon suitable for use during type-checking. It stores a variety of details about the definition of the TyCon, but no right-hand side. It lives only during the type-checking of a mutually-recursive group of tycons; it is then zonked to a proper TyCon in zonkTcTyCon. See also Note [Kind checking recursive type and class declarations] in TcTyClsDecls.
Arguments
| :: Name | |
| -> [TyConBinder] | |
| -> Kind | Kind of the resulting |
| -> Arity | Arity of the sum |
| -> [TyVar] |
|
| -> [DataCon] | |
| -> AlgTyConFlav | |
| -> TyCon |
Arguments
| :: Name | |
| -> [TyConBinder] | |
| -> Kind | Result kind of the |
| -> Arity | Arity of the tuple |
| -> DataCon | |
| -> TupleSort | Whether the tuple is boxed or unboxed |
| -> AlgTyConFlav | |
| -> TyCon |
mkClassTyCon :: Name -> [TyConBinder] -> [Role] -> AlgTyConRhs -> Class -> Name -> TyCon #
Simpler specialization of mkAlgTyCon for classes
Arguments
| :: Name | |
| -> [TyConBinder] | Binders of the |
| -> Kind | Result kind |
| -> [Role] | The roles for each TyVar |
| -> Maybe CType | The C type this type corresponds to when using the CAPI FFI |
| -> [PredType] | Stupid theta: see |
| -> AlgTyConRhs | Information about data constructors |
| -> AlgTyConFlav | What flavour is it? (e.g. vanilla, type family) |
| -> Bool | Was the |
| -> TyCon |
This is the making of an algebraic TyCon. Notably, you have to
pass in the generic (in the -XGenerics sense) information about the
type constructor - you can get hold of it easily (see Generics
module)
mkFunTyCon :: Name -> [TyConBinder] -> Name -> TyCon #
lookupTyConFieldLabel :: FieldLabelString -> TyCon -> Maybe FieldLabel #
Look up a field label belonging to this TyCon
tyConFieldLabels :: TyCon -> [FieldLabel] #
The labels for the fields of this particular TyCon
primRepIsFloat :: PrimRep -> Maybe Bool #
Return if Rep stands for floating type, returns Nothing for vector types.
primElemRepSizeB :: PrimElemRep -> Int #
primRepSizeB :: DynFlags -> PrimRep -> Int #
The size of a PrimRep in bytes.
This applies also when used in a constructor, where we allow packing the
fields. For instance, in data Foo = Foo Float the two fields will
take only 8 bytes, which for 64-bit arch will be equal to 1 word.
See also mkVirtHeapOffsetsWithPadding for details of how data fields are
layed out.
isGcPtrRep :: PrimRep -> Bool #
tyConRepModOcc :: Module -> OccName -> (Module, OccName) #
The name (and defining module) for the Typeable representation (TyCon) of a type constructor.
See Note [Grand plan for Typeable] in TcTypeable in TcTypeable.
mkPrelTyConRepName :: Name -> TyConRepName #
Make a Name for the Typeable representation of the given wired-in type
isNoParent :: AlgTyConFlav -> Bool #
visibleDataCons :: AlgTyConRhs -> [DataCon] #
Both type classes as well as family instances imply implicit type constructors. These implicit type constructors refer to their parent structure (ie, the class or family from which they derive) using a type of the following form.
Extract those DataCons that we are able to learn about. Note
that visibility in this sense does not correspond to visibility in
the context of any particular user program!
mkDataTyConRhs :: [DataCon] -> AlgTyConRhs #
tyConVisibleTyVars :: TyCon -> [TyVar] #
tyConTyVarBinders :: [TyConBinder] -> [TyVarBinder] #
mkTyConKind :: [TyConBinder] -> Kind -> Kind #
isInvisibleTyConBinder :: VarBndr tv TyConBndrVis -> Bool #
isVisibleTyConBinder :: VarBndr tv TyConBndrVis -> Bool #
isNamedTyConBinder :: TyConBinder -> Bool #
mkRequiredTyConBinder :: TyCoVarSet -> TyVar -> TyConBinder #
Make a Required TyConBinder. It chooses between NamedTCB and AnonTCB based on whether the tv is mentioned in the dependent set
mkNamedTyConBinders :: ArgFlag -> [TyVar] -> [TyConBinder] #
mkNamedTyConBinder :: ArgFlag -> TyVar -> TyConBinder #
mkAnonTyConBinders :: AnonArgFlag -> [TyVar] -> [TyConBinder] #
mkAnonTyConBinder :: AnonArgFlag -> TyVar -> TyConBinder #
type TyConBinder = VarBndr TyVar TyConBndrVis #
type TyConTyCoBinder = VarBndr TyCoVar TyConBndrVis #
data TyConBndrVis #
Constructors
| NamedTCB ArgFlag | |
| AnonTCB AnonArgFlag |
Instances
| Binary TyConBndrVis | |
Defined in TyCon Methods put_ :: BinHandle -> TyConBndrVis -> IO () # put :: BinHandle -> TyConBndrVis -> IO (Bin TyConBndrVis) # get :: BinHandle -> IO TyConBndrVis # | |
| Outputable TyConBndrVis | |
Defined in TyCon | |
| OutputableBndr tv => Outputable (VarBndr tv TyConBndrVis) | |
data AlgTyConRhs #
Represents right-hand-sides of TyCons for algebraic types
Constructors
| AbstractTyCon | Says that we know nothing about this data type, except that it's represented by a pointer. Used when we export a data type abstractly into an .hi file. |
| DataTyCon | Information about those |
Fields
| |
| TupleTyCon | |
| SumTyCon | An unboxed sum type. |
Fields
| |
| NewTyCon | Information about those |
Fields
| |
data RuntimeRepInfo #
Some promoted datacons signify extra info relevant to GHC. For example,
the IntRep constructor of RuntimeRep corresponds to the IntRep
constructor of PrimRep. This data structure allows us to store this
information right in the TyCon. The other approach would be to look
up things like RuntimeRep's PrimRep by known-key every time.
See also Note [Getting from RuntimeRep to PrimRep] in RepType
Constructors
| NoRRI | an ordinary promoted data con |
| RuntimeRep ([Type] -> [PrimRep]) | A constructor of |
| VecCount Int | A constructor of |
| VecElem PrimElemRep | A constructor of |
data AlgTyConFlav #
Constructors
| VanillaAlgTyCon TyConRepName | An ordinary type constructor has no parent. |
| UnboxedAlgTyCon (Maybe TyConRepName) | An unboxed type constructor. The TyConRepName is a Maybe since we currently don't allow unboxed sums to be Typeable since there are too many of them. See #13276. |
| ClassTyCon Class TyConRepName | Type constructors representing a class dictionary. See Note [ATyCon for classes] in TyCoRep |
| DataFamInstTyCon (CoAxiom Unbranched) TyCon [Type] | Type constructors representing an *instance* of a *data* family. Parameters: 1) The type family in question 2) Instance types; free variables are the 3) A |
Instances
| Outputable AlgTyConFlav | |
Defined in TyCon | |
data Injectivity #
Constructors
| NotInjective | |
| Injective [Bool] |
Instances
| Eq Injectivity | |
Defined in TyCon | |
| Binary Injectivity | |
Defined in TyCon Methods put_ :: BinHandle -> Injectivity -> IO () # put :: BinHandle -> Injectivity -> IO (Bin Injectivity) # get :: BinHandle -> IO Injectivity # | |
data FamTyConFlav #
Information pertaining to the expansion of a type synonym (type)
Constructors
| DataFamilyTyCon TyConRepName | Represents an open type family without a fixed right hand side. Additional instances can appear at any time. These are introduced by either a top level declaration: data family T a :: * Or an associated data type declaration, within a class declaration: class C a b where data T b :: * |
| OpenSynFamilyTyCon | An open type synonym family e.g. |
| ClosedSynFamilyTyCon (Maybe (CoAxiom Branched)) | A closed type synonym family e.g.
|
| AbstractClosedSynFamilyTyCon | A closed type synonym family declared in an hs-boot file with type family F a where .. |
| BuiltInSynFamTyCon BuiltInSynFamily | Built-in type family used by the TypeNats solver |
Instances
| Outputable FamTyConFlav | |
Defined in TyCon | |
type TyConRepName = Name #
A PrimRep is an abstraction of a type. It contains information that
the code generator needs in order to pass arguments, return results,
and store values of this type. See also Note [RuntimeRep and PrimRep] in RepType
and Note [VoidRep] in RepType.
Constructors
| VoidRep | |
| LiftedRep | |
| UnliftedRep | Unlifted pointer |
| Int8Rep | Signed, 8-bit value |
| Int16Rep | Signed, 16-bit value |
| Int32Rep | Signed, 32-bit value |
| Int64Rep | Signed, 64 bit value (with 32-bit words only) |
| IntRep | Signed, word-sized value |
| Word8Rep | Unsigned, 8 bit value |
| Word16Rep | Unsigned, 16 bit value |
| Word32Rep | Unsigned, 32 bit value |
| Word64Rep | Unsigned, 64 bit value (with 32-bit words only) |
| WordRep | Unsigned, word-sized value |
| AddrRep | A pointer, but not to a Haskell value (use '(Un)liftedRep') |
| FloatRep | |
| DoubleRep | |
| VecRep Int PrimElemRep | A vector |
data PrimElemRep #
Constructors
| Int8ElemRep | |
| Int16ElemRep | |
| Int32ElemRep | |
| Int64ElemRep | |
| Word8ElemRep | |
| Word16ElemRep | |
| Word32ElemRep | |
| Word64ElemRep | |
| FloatElemRep | |
| DoubleElemRep |
Instances
| Eq PrimElemRep | |
Defined in TyCon | |
| Show PrimElemRep | |
Defined in TyCon Methods showsPrec :: Int -> PrimElemRep -> ShowS # show :: PrimElemRep -> String # showList :: [PrimElemRep] -> ShowS # | |
| Outputable PrimElemRep | |
Defined in TyCon | |
data TyConFlavour #
Paints a picture of what a TyCon represents, in broad strokes.
This is used towards more informative error messages.
Constructors
Instances
| Eq TyConFlavour | |
Defined in TyCon | |
| Outputable TyConFlavour | |
Defined in TyCon | |
data RecTcChecker #
anyDVarEnv :: (a -> Bool) -> DVarEnv a -> Bool #
extendDVarEnvList :: DVarEnv a -> [(Var, a)] -> DVarEnv a #
modifyDVarEnv :: (a -> a) -> DVarEnv a -> Var -> DVarEnv a #
extendDVarEnv_C :: (a -> a -> a) -> DVarEnv a -> Var -> a -> DVarEnv a #
elemDVarEnv :: Var -> DVarEnv a -> Bool #
isEmptyDVarEnv :: DVarEnv a -> Bool #
delDVarEnvList :: DVarEnv a -> [Var] -> DVarEnv a #
delDVarEnv :: DVarEnv a -> Var -> DVarEnv a #
unitDVarEnv :: Var -> a -> DVarEnv a #
plusDVarEnv_C :: (a -> a -> a) -> DVarEnv a -> DVarEnv a -> DVarEnv a #
plusDVarEnv :: DVarEnv a -> DVarEnv a -> DVarEnv a #
filterDVarEnv :: (a -> Bool) -> DVarEnv a -> DVarEnv a #
mapDVarEnv :: (a -> b) -> DVarEnv a -> DVarEnv b #
foldDVarEnv :: (a -> b -> b) -> b -> DVarEnv a -> b #
lookupDVarEnv :: DVarEnv a -> Var -> Maybe a #
minusDVarEnv :: DVarEnv a -> DVarEnv a' -> DVarEnv a #
extendDVarEnv :: DVarEnv a -> Var -> a -> DVarEnv a #
dVarEnvElts :: DVarEnv a -> [a] #
emptyDVarEnv :: DVarEnv a #
modifyVarEnv_Directly :: (a -> a) -> UniqFM a -> Unique -> UniqFM a #
modifyVarEnv :: (a -> a) -> VarEnv a -> Var -> VarEnv a #
lookupVarEnv_NF :: VarEnv a -> Var -> a #
restrictVarEnv :: VarEnv a -> VarSet -> VarEnv a #
delVarEnv_Directly :: VarEnv a -> Unique -> VarEnv a #
lookupVarEnv_Directly :: VarEnv a -> Unique -> Maybe a #
isEmptyVarEnv :: VarEnv a -> Bool #
unitVarEnv :: Var -> a -> VarEnv a #
emptyVarEnv :: VarEnv a #
mkVarEnv_Directly :: [(Unique, a)] -> VarEnv a #
lookupWithDefaultVarEnv :: VarEnv a -> a -> Var -> a #
filterVarEnv :: (a -> Bool) -> VarEnv a -> VarEnv a #
lookupVarEnv :: VarEnv a -> Var -> Maybe a #
plusVarEnvList :: [VarEnv a] -> VarEnv a #
plusVarEnv :: VarEnv a -> VarEnv a -> VarEnv a #
intersectsVarEnv :: VarEnv a -> VarEnv a -> Bool #
minusVarEnv :: VarEnv a -> VarEnv b -> VarEnv a #
delVarEnvList :: VarEnv a -> [Var] -> VarEnv a #
plusVarEnv_CD :: (a -> a -> a) -> VarEnv a -> a -> VarEnv a -> a -> VarEnv a #
plusVarEnv_C :: (a -> a -> a) -> VarEnv a -> VarEnv a -> VarEnv a #
extendVarEnvList :: VarEnv a -> [(Var, a)] -> VarEnv a #
extendVarEnv_Directly :: VarEnv a -> Unique -> a -> VarEnv a #
extendVarEnv_Acc :: (a -> b -> b) -> (a -> b) -> VarEnv b -> Var -> a -> VarEnv b #
extendVarEnv_C :: (a -> a -> a) -> VarEnv a -> Var -> a -> VarEnv a #
extendVarEnv :: VarEnv a -> Var -> a -> VarEnv a #
disjointVarEnv :: VarEnv a -> VarEnv a -> Bool #
elemVarEnvByKey :: Unique -> VarEnv a -> Bool #
elemVarEnv :: Var -> VarEnv a -> Bool #
mkEmptyTidyEnv :: TidyOccEnv -> TidyEnv #
emptyTidyEnv :: TidyEnv #
nukeRnEnvR :: RnEnv2 -> RnEnv2 #
Wipe the left or right side renaming
nukeRnEnvL :: RnEnv2 -> RnEnv2 #
Wipe the left or right side renaming
lookupRnInScope :: RnEnv2 -> Var -> Var #
rnOccR_maybe :: RnEnv2 -> Var -> Maybe Var #
Look up the renaming of an occurrence in the left or right term
rnOccL_maybe :: RnEnv2 -> Var -> Maybe Var #
Look up the renaming of an occurrence in the left or right term
rnEtaR :: RnEnv2 -> Var -> (RnEnv2, Var) #
Similar to rnBndr2 but used for eta expansion
See Note [Eta expansion]
rnEtaL :: RnEnv2 -> Var -> (RnEnv2, Var) #
Similar to rnBndrL but used for eta expansion
See Note [Eta expansion]
rnBndrR :: RnEnv2 -> Var -> (RnEnv2, Var) #
Similar to rnBndr2 but used when there's a binder on the right
side only.
rnBndrL :: RnEnv2 -> Var -> (RnEnv2, Var) #
Similar to rnBndr2 but used when there's a binder on the left
side only.
rnBndr2_var :: RnEnv2 -> Var -> Var -> (RnEnv2, Var) #
Similar to rnBndr2 but returns the new variable as well as the
new environment
rnBndr2 :: RnEnv2 -> Var -> Var -> RnEnv2 #
rnBndr2 env bL bR goes under a binder bL in the Left term,
and binder bR in the Right term.
It finds a new binder, new_b,
and returns an environment mapping bL -> new_b and bR -> new_b
rnBndrs2 :: RnEnv2 -> [Var] -> [Var] -> RnEnv2 #
Applies rnBndr2 to several variables: the two variable lists must be of equal length
rnInScopeSet :: RnEnv2 -> InScopeSet #
addRnInScopeSet :: RnEnv2 -> VarSet -> RnEnv2 #
mkRnEnv2 :: InScopeSet -> RnEnv2 #
uniqAway :: InScopeSet -> Var -> Var #
uniqAway in_scope v finds a unique that is not used in the
in-scope set, and gives that to v.
varSetInScope :: VarSet -> InScopeSet -> Bool #
unionInScope :: InScopeSet -> InScopeSet -> InScopeSet #
lookupInScope_Directly :: InScopeSet -> Unique -> Maybe Var #
lookupInScope :: InScopeSet -> Var -> Maybe Var #
Look up a variable the InScopeSet. This lets you map from
the variable's identity (unique) to its full value.
elemInScopeSet :: Var -> InScopeSet -> Bool #
delInScopeSet :: InScopeSet -> Var -> InScopeSet #
extendInScopeSetSet :: InScopeSet -> VarSet -> InScopeSet #
extendInScopeSetList :: InScopeSet -> [Var] -> InScopeSet #
extendInScopeSet :: InScopeSet -> Var -> InScopeSet #
mkInScopeSet :: VarSet -> InScopeSet #
getInScopeVars :: InScopeSet -> VarSet #
data InScopeSet #
A set of variables that are in scope at some point "Secrets of the Glasgow Haskell Compiler inliner" Section 3.2 provides the motivation for this abstraction.
Instances
| Outputable InScopeSet | |
Defined in VarEnv | |
Rename Environment 2
When we are comparing (or matching) types or terms, we are faced with "going under" corresponding binders. E.g. when comparing:
\x. e1 ~ \y. e2
Basically we want to rename [x -> y] or [y -> x], but there are lots of
things we must be careful of. In particular, x might be free in e2, or
y in e1. So the idea is that we come up with a fresh binder that is free
in neither, and rename x and y respectively. That means we must maintain:
- A renaming for the left-hand expression
- A renaming for the right-hand expressions
- An in-scope set
Furthermore, when matching, we want to be able to have an 'occurs check', to prevent:
\x. f ~ \y. y
matching with [f -> y]. So for each expression we want to know that set of
locally-bound variables. That is precisely the domain of the mappings 1.
and 2., but we must ensure that we always extend the mappings as we go in.
All of this information is bundled up in the RnEnv2
type TidyEnv = (TidyOccEnv, VarEnv Var) #
Tidy Environment
When tidying up print names, we keep a mapping of in-scope occ-names
(the TidyOccEnv) and a Var-to-Var of the current renamings
type TyCoVarEnv elt = VarEnv elt #
Type or Coercion Variable Environment
dVarSetToVarSet :: DVarSet -> VarSet #
Convert a DVarSet to a VarSet by forgeting the order of insertion
extendDVarSetList :: DVarSet -> [Var] -> DVarSet #
Add a list of variables to DVarSet
seqDVarSet :: DVarSet -> () #
delDVarSetList :: DVarSet -> [Var] -> DVarSet #
Delete a list of variables from DVarSet
partitionDVarSet :: (Var -> Bool) -> DVarSet -> (DVarSet, DVarSet) #
Partition DVarSet according to the predicate given
sizeDVarSet :: DVarSet -> Int #
mapDVarSet :: Uniquable b => (a -> b) -> UniqDSet a -> UniqDSet b #
foldDVarSet :: (Var -> a -> a) -> a -> DVarSet -> a #
dVarSetMinusVarSet :: DVarSet -> VarSet -> DVarSet #
minusDVarSet :: DVarSet -> DVarSet -> DVarSet #
delDVarSet :: DVarSet -> Var -> DVarSet #
isEmptyDVarSet :: DVarSet -> Bool #
intersectsDVarSet :: DVarSet -> DVarSet -> Bool #
True if non-empty intersection
disjointDVarSet :: DVarSet -> DVarSet -> Bool #
True if empty intersection
dVarSetIntersectVarSet :: DVarSet -> VarSet -> DVarSet #
intersectDVarSet :: DVarSet -> DVarSet -> DVarSet #
mapUnionDVarSet :: (a -> DVarSet) -> [a] -> DVarSet #
Map the function over the list, and union the results
unionDVarSets :: [DVarSet] -> DVarSet #
unionDVarSet :: DVarSet -> DVarSet -> DVarSet #
subDVarSet :: DVarSet -> DVarSet -> Bool #
dVarSetElems :: DVarSet -> [Var] #
elemDVarSet :: Var -> DVarSet -> Bool #
extendDVarSet :: DVarSet -> Var -> DVarSet #
unitDVarSet :: Var -> DVarSet #
emptyDVarSet :: DVarSet #
Arguments
| :: VarSet | The things to be pretty printed |
| -> ([Var] -> SDoc) | The pretty printing function to use on the elements |
| -> SDoc |
|
Pretty-print a non-deterministic set. The order of variables is non-deterministic and for pretty-printing that shouldn't be a problem. Having this function helps contain the non-determinism created with nonDetEltsUFM. Passing a list to the pretty-printing function allows the caller to decide on the order of Vars (eg. toposort them) without them having to use nonDetEltsUFM at the call site. This prevents from let-binding non-deterministically ordered lists and reusing them where determinism matters.
pluralVarSet :: VarSet -> SDoc #
Determines the pluralisation suffix appropriate for the length of a set in the same way that plural from Outputable does for lists.
disjointVarSet :: VarSet -> VarSet -> Bool #
intersectsVarSet :: VarSet -> VarSet -> Bool #
mapUnionVarSet :: (a -> VarSet) -> [a] -> VarSet #
map the function over the list, and union the results
elemVarSetByKey :: Unique -> VarSet -> Bool #
delVarSetByKey :: VarSet -> Unique -> VarSet #
sizeVarSet :: VarSet -> Int #
isEmptyVarSet :: VarSet -> Bool #
delVarSetList :: VarSet -> [Var] -> VarSet #
minusVarSet :: VarSet -> VarSet -> VarSet #
elemVarSet :: Var -> VarSet -> Bool #
unionVarSets :: [VarSet] -> VarSet #
unionVarSet :: VarSet -> VarSet -> VarSet #
intersectVarSet :: VarSet -> VarSet -> VarSet #
extendVarSetList :: VarSet -> [Var] -> VarSet #
extendVarSet :: VarSet -> Var -> VarSet #
unitVarSet :: Var -> VarSet #
emptyVarSet :: VarSet #
A non-deterministic Variable Set
A non-deterministic set of variables. See Note [Deterministic UniqFM] in UniqDFM for explanation why it's not deterministic and why it matters. Use DVarSet if the set eventually gets converted into a list or folded over in a way where the order changes the generated code, for example when abstracting variables.
type TyCoVarSet = UniqSet TyCoVar #
Type or Coercion Variable Set
type DTyCoVarSet = UniqDSet TyCoVar #
Deterministic Type or Coercion Variable Set
mkTyConAppCo :: HasDebugCallStack => Role -> TyCon -> [Coercion] -> Coercion #
Apply a type constructor to a list of coercions. It is the caller's responsibility to get the roles correct on argument coercions.
mkForAllCo :: TyCoVar -> CoercionN -> Coercion -> Coercion #
Make a Coercion from a tycovar, a kind coercion, and a body coercion. The kind of the tycovar should be the left-hand kind of the kind coercion. See Note [Unused coercion variable in ForAllCo]
mkAxiomInstCo :: CoAxiom Branched -> BranchIndex -> [Coercion] -> Coercion #
mkPhantomCo :: Coercion -> Type -> Type -> Coercion #
Make a phantom coercion between two types. The coercion passed in must be a nominal coercion between the kinds of the types.
mkUnsafeCo :: Role -> Type -> Type -> Coercion #
Manufacture an unsafe coercion from thin air.
Currently (May 14) this is used only to implement the
unsafeCoerce# primitive. Optimise by pushing
down through type constructors.
Arguments
| :: UnivCoProvenance | |
| -> Role | role of the built coercion, "r" |
| -> Type | t1 :: k1 |
| -> Type | t2 :: k2 |
| -> Coercion | :: t1 ~r t2 |
Make a universal coercion between two arbitrary types.
mkSymCo :: Coercion -> Coercion #
Create a symmetric version of the given Coercion that asserts
equality between the same types but in the other "direction", so
a kind of t1 ~ t2 becomes the kind t2 ~ t1.
mkLRCo :: LeftOrRight -> Coercion -> Coercion #
mkNomReflCo :: Type -> Coercion #
Make a nominal reflexive coercion
Arguments
| :: Role | role of the created coercion, "r" |
| -> Coercion | :: phi1 ~N phi2 |
| -> Coercion | g1 :: phi1 |
| -> Coercion | g2 :: phi2 |
| -> Coercion | :: g1 ~r g2 |
Make a "coercion between coercions".
mkAxiomRuleCo :: CoAxiomRule -> [Coercion] -> Coercion #
isGReflCo :: Coercion -> Bool #
Tests if this coercion is obviously a generalized reflexive coercion. Guaranteed to work very quickly.
isReflCo :: Coercion -> Bool #
Tests if this coercion is obviously reflexive. Guaranteed to work
very quickly. Sometimes a coercion can be reflexive, but not obviously
so. c.f. isReflexiveCo
isReflexiveCo :: Coercion -> Bool #
Slowly checks if the coercion is reflexive. Don't call this in a loop, as it walks over the entire coercion.
decomposePiCos :: HasDebugCallStack => CoercionN -> Pair Type -> [Type] -> ([CoercionN], CoercionN) #
coVarKindsTypesRole :: HasDebugCallStack => CoVar -> (Kind, Kind, Type, Type, Role) #
mkCoercionType :: Role -> Type -> Type -> Type #
Makes a coercion type from two types: the types whose equality
is proven by the relevant Coercion
liftCoSubst :: HasDebugCallStack => Role -> LiftingContext -> Type -> Coercion #
liftCoSubst role lc ty produces a coercion (at role role)
that coerces between lc_left(ty) and lc_right(ty), where
lc_left is a substitution mapping type variables to the left-hand
types of the mapped coercions in lc, and similar for lc_right.
coercionKind :: Coercion -> Pair Type #
If it is the case that
c :: (t1 ~ t2)
i.e. the kind of c relates t1 and t2, then coercionKind c = Pair t1 t2.
coercionType :: Coercion -> Type #
data LiftingContext #
Instances
| Outputable LiftingContext | |
Defined in Coercion | |
Constructors
| Nominal | |
| Representational | |
| Phantom |
Instances
| Eq Role | |
| Data Role | |
Defined in CoAxiom Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Role -> c Role # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Role # dataTypeOf :: Role -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Role) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Role) # gmapT :: (forall b. Data b => b -> b) -> Role -> Role # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Role -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Role -> r # gmapQ :: (forall d. Data d => d -> u) -> Role -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Role -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Role -> m Role # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Role -> m Role # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Role -> m Role # | |
| Ord Role | |
| Binary Role | |
| Outputable Role | |
dataConTyCon :: DataCon -> TyCon #
The type constructor that we are building via this data constructor
dataConExTyCoVars :: DataCon -> [TyCoVar] #
The existentially-quantified type/coercion variables of the constructor including dependent (kind-) GADT equalities
dataConUserTyVars :: DataCon -> [TyVar] #
The type variables of the constructor, in the order the user wrote them
dataConUserTyVarBinders :: DataCon -> [TyVarBinder] #
TyCoVarBinders for the type variables of the constructor, in the order the
user wrote them
dataConSourceArity :: DataCon -> Arity #
Source-level arity of the data constructor
dataConFieldLabels :: DataCon -> [FieldLabel] #
The labels for the fields of this particular DataCon
dataConInstOrigArgTys :: DataCon -> [Type] -> [Type] #
Returns just the instantiated value argument types of a DataCon,
(excluding dictionary args)
dataConStupidTheta :: DataCon -> ThetaType #
The "stupid theta" of the DataCon, such as data Eq a in:
data Eq a => T a = ...
dataConFullSig :: DataCon -> ([TyVar], [TyCoVar], [EqSpec], ThetaType, [Type], Type) #
The "full signature" of the DataCon returns, in order:
1) The result of dataConUnivTyVars
2) The result of dataConExTyCoVars
3) The non-dependent GADT equalities. Dependent GADT equalities are implied by coercion variables in return value (2).
4) The other constraints of the data constructor type, excluding GADT equalities
5) The original argument types to the DataCon (i.e. before
any change of the representation of the type)
6) The original result type of the DataCon
isUnboxedSumCon :: DataCon -> Bool #
A data constructor
Instances
| Eq DataCon | |
| Data DataCon | |
Defined in DataCon Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DataCon -> c DataCon # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DataCon # toConstr :: DataCon -> Constr # dataTypeOf :: DataCon -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DataCon) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DataCon) # gmapT :: (forall b. Data b => b -> b) -> DataCon -> DataCon # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DataCon -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DataCon -> r # gmapQ :: (forall d. Data d => d -> u) -> DataCon -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> DataCon -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> DataCon -> m DataCon # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DataCon -> m DataCon # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DataCon -> m DataCon # | |
| NamedThing DataCon | |
| Uniquable DataCon | |
| Outputable DataCon | |
| OutputableBndr DataCon | |
Defined in DataCon Methods pprBndr :: BindingSite -> DataCon -> SDoc # pprPrefixOcc :: DataCon -> SDoc # pprInfixOcc :: DataCon -> SDoc # bndrIsJoin_maybe :: DataCon -> Maybe Int # | |
data DataConRep #
Data Constructor Representation See Note [Data constructor workers and wrappers]
Constructors
| NoDataConRep | |
| DCR | |
Fields
| |
An EqSpec is a tyvar/type pair representing an equality made in
rejigging a GADT constructor
isExportedId :: Var -> Bool #
isExportedIdVar means "don't throw this away"
mustHaveLocalBinding :: Var -> Bool #
mustHaveLocalBinding returns True of Ids and TyVars
that must have a binding in this module. The converse
is not quite right: there are some global Ids that must have
bindings, such as record selectors. But that doesn't matter,
because it's only used for assertions
isGlobalId :: Var -> Bool #
isLocalVar :: Var -> Bool #
isLocalVar returns True for type variables as well as local Ids
These are the variables that we need to pay attention to when finding free
variables, or doing dependency analysis.
isNonCoVarId :: Var -> Bool #
Is this a term variable (Id) that is not a coercion variable?
Satisfies .isId v ==> isCoVar v == not (isNonCoVarId v)
Is this a coercion variable?
Satisfies .isId v ==> isCoVar v == not (isNonCoVarId v)
Is this a value-level (i.e., computationally relevant) Identifier?
Satisfies isId = not . isTyVar.
Is this a type-level (i.e., computationally irrelevant, thus erasable)
variable? Satisfies isTyVar = not . isId.
setIdNotExported :: Id -> Id #
We can only do this to LocalIds
setIdExported :: Id -> Id #
globaliseId :: Id -> Id #
If it's a local, make it global
setIdDetails :: Id -> IdDetails -> Id #
lazySetIdInfo :: Id -> IdInfo -> Var #
mkExportedLocalVar :: IdDetails -> Name -> Type -> IdInfo -> Id #
Exported Vars will not be removed as dead code
idInfo :: HasDebugCallStack => Id -> IdInfo #
setTcTyVarDetails :: TyVar -> TcTyVarDetails -> TyVar #
tcTyVarDetails :: TyVar -> TcTyVarDetails #
setTyVarKind :: TyVar -> Kind -> TyVar #
setTyVarName :: TyVar -> Name -> TyVar #
setTyVarUnique :: TyVar -> Unique -> TyVar #
isTyVarBinder :: TyCoVarBinder -> Bool #
mkTyVarBinders :: ArgFlag -> [TyVar] -> [TyVarBinder] #
Make many named binders Input vars should be type variables
mkTyCoVarBinders :: ArgFlag -> [TyCoVar] -> [TyCoVarBinder] #
Make many named binders
mkTyVarBinder :: ArgFlag -> TyVar -> TyVarBinder #
Make a named binder
var should be a type variable
mkTyCoVarBinder :: ArgFlag -> TyCoVar -> TyCoVarBinder #
Make a named binder
binderType :: VarBndr TyCoVar argf -> Type #
binderArgFlag :: VarBndr tv argf -> argf #
binderVars :: [VarBndr tv argf] -> [tv] #
argToForallVisFlag :: ArgFlag -> ForallVisFlag #
Convert an ArgFlag to its corresponding ForallVisFlag.
isInvisibleArgFlag :: ArgFlag -> Bool #
Does this ArgFlag classify an argument that is not written in Haskell?
isVisibleArgFlag :: ArgFlag -> Bool #
Does this ArgFlag classify an argument that is written in Haskell?
setVarType :: Id -> Type -> Id #
setVarName :: Var -> Name -> Var #
setVarUnique :: Var -> Unique -> Var #
nonDetCmpVar :: Var -> Var -> Ordering #
Compare Vars by their Uniques. This is what Ord Var does, provided here to make it explicit at the call-site that it can introduce non-determinism. See Note [Unique Determinism]
data ForallVisFlag #
Is a forall invisible (e.g., forall a b. {...}, with a dot) or visible
(e.g., forall a b -> {...}, with an arrow)?
Constructors
| ForallVis | A visible |
| ForallInvis | An invisible |
Instances
Constructors
| Bndr var argf |
Instances
| (Data var, Data argf) => Data (VarBndr var argf) | |
Defined in Var Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> VarBndr var argf -> c (VarBndr var argf) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (VarBndr var argf) # toConstr :: VarBndr var argf -> Constr # dataTypeOf :: VarBndr var argf -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (VarBndr var argf)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (VarBndr var argf)) # gmapT :: (forall b. Data b => b -> b) -> VarBndr var argf -> VarBndr var argf # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> VarBndr var argf -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> VarBndr var argf -> r # gmapQ :: (forall d. Data d => d -> u) -> VarBndr var argf -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> VarBndr var argf -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> VarBndr var argf -> m (VarBndr var argf) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> VarBndr var argf -> m (VarBndr var argf) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> VarBndr var argf -> m (VarBndr var argf) # | |
| NamedThing tv => NamedThing (VarBndr tv flag) | |
| (Binary tv, Binary vis) => Binary (VarBndr tv vis) | |
| Outputable tv => Outputable (VarBndr tv ArgFlag) | |
| OutputableBndr tv => Outputable (VarBndr tv TyConBndrVis) | |
type TyCoVarBinder = VarBndr TyCoVar ArgFlag #
Variable Binder
A TyCoVarBinder is the binder of a ForAllTy
It's convenient to define this synonym here rather its natural
home in TyCoRep, because it's used in DataCon.hs-boot
A TyVarBinder is a binder with only TyVar
type TyVarBinder = VarBndr TyVar ArgFlag #
deserializeAnns :: Typeable a => ([Word8] -> a) -> AnnEnv -> UniqFM [a] #
Deserialize all annotations of a given type. This happens lazily, that is no deserialization will take place until the [a] is actually demanded and the [a] can also be empty (the UniqFM is not filtered).
findAnnsByTypeRep :: AnnEnv -> CoreAnnTarget -> TypeRep -> [[Word8]] #
Find the annotations attached to the given target as Typeable
values of your choice. If no deserializer is specified,
only transient annotations will be returned.
findAnns :: Typeable a => ([Word8] -> a) -> AnnEnv -> CoreAnnTarget -> [a] #
Find the annotations attached to the given target as Typeable
values of your choice. If no deserializer is specified,
only transient annotations will be returned.
plusAnnEnv :: AnnEnv -> AnnEnv -> AnnEnv #
Union two annotation environments.
extendAnnEnvList :: AnnEnv -> [Annotation] -> AnnEnv #
Add the given annotation to the environment.
mkAnnEnv :: [Annotation] -> AnnEnv #
Construct a new annotation environment that contains the list of annotations provided.
emptyAnnEnv :: AnnEnv #
An empty annotation environment.
getAnnTargetName_maybe :: AnnTarget name -> Maybe name #
Get the name of an annotation target if it exists.
data Annotation #
Represents an annotation after it has been sufficiently desugared from
it's initial form of AnnDecl
Constructors
| Annotation | |
Fields
| |
Instances
| Outputable Annotation | |
Defined in Annotations | |
type AnnPayload #
Arguments
| = Serialized | The "payload" of an annotation allows recovery of its value at a given type, and can be persisted to an interface file |
An annotation target
Constructors
| NamedTarget name | We are annotating something with a name: a type or identifier |
| ModuleTarget Module | We are annotating a particular module |
Instances
| Functor AnnTarget | |
| Binary name => Binary (AnnTarget name) | |
| Uniquable name => Uniquable (AnnTarget name) | |
Defined in Annotations | |
| Outputable name => Outputable (AnnTarget name) | |
type CoreAnnTarget = AnnTarget Name #
The kind of annotation target found in the middle end of the compiler
A collection of annotations Can't use a type synonym or we hit bug #2412 due to source import
nilDataConKey :: Unique #
listTyConKey :: Unique #
starInfo :: Bool -> RdrName -> SDoc #
Display info about the treatment of * under NoStarIsType.
With StarIsType, three properties of * hold:
(a) it is not an infix operator (b) it is always in scope (c) it is a synonym for Data.Kind.Type
However, the user might not know that he's working on a module with NoStarIsType and write code that still assumes (a), (b), and (c), which actually do not hold in that module.
Violation of (a) shows up in the parser. For instance, in the following
examples, we have * not applied to enough arguments:
data A :: * data F :: * -> *
Violation of (b) or (c) show up in the renamer and the typechecker respectively. For instance:
type K = Either * Bool
This will parse differently depending on whether StarIsType is enabled, but it will parse nonetheless. With NoStarIsType it is parsed as a type operator, thus we have ((*) Either Bool). Now there are two cases to consider:
- There is no definition of (*) in scope. In this case the renamer will fail to look it up. This is a violation of assumption (b).
- There is a definition of the (*) type operator in scope (for example coming from GHC.TypeNats). In this case the user will get a kind mismatch error. This is a violation of assumption (c).
The user might unknowingly be working on a module with NoStarIsType
or use * as Type out of habit. So it is important to give a
hint whenever an assumption about * is violated. Unfortunately, it is
somewhat difficult to deal with (c), so we limit ourselves to (a) and (b).
starInfo generates an appropriate hint to the user depending on the
extensions enabled in the module and the name that triggered the error.
That is, if we have NoStarIsType and the error is related to * or its
Unicode variant, the resulting SDoc will contain a helpful suggestion.
Otherwise it is empty.
pprNameProvenance :: GlobalRdrElt -> SDoc #
Print out one place where the name was define/imported (With -dppr-debug, print them all)
isExplicitItem :: ImpItemSpec -> Bool #
importSpecLoc :: ImportSpec -> SrcSpan #
qualSpecOK :: ModuleName -> ImportSpec -> Bool #
Is in scope qualified with the given module?
unQualSpecOK :: ImportSpec -> Bool #
Is in scope unqualified?
bestImport :: [ImportSpec] -> ImportSpec #
shadowNames :: GlobalRdrEnv -> [Name] -> GlobalRdrEnv #
transformGREs :: (GlobalRdrElt -> GlobalRdrElt) -> [OccName] -> GlobalRdrEnv -> GlobalRdrEnv #
Apply a transformation function to the GREs for these OccNames
mkGlobalRdrEnv :: [GlobalRdrElt] -> GlobalRdrEnv #
pickGREsModExp :: ModuleName -> [GlobalRdrElt] -> [(GlobalRdrElt, GlobalRdrElt)] #
Pick GREs that are in scope *both* qualified *and* unqualified Return each GRE that is, as a pair (qual_gre, unqual_gre) These two GREs are the original GRE with imports filtered to express how it is in scope qualified an unqualified respectively
Used only for the 'module M' item in export list; see RnNames.exports_from_avail
pickGREs :: RdrName -> [GlobalRdrElt] -> [GlobalRdrElt] #
Takes a list of GREs which have the right OccName x
Pick those GREs that are in scope
* Qualified, as x if want_qual is Qual M _
* Unqualified, as x if want_unqual is Unqual _
Return each such GRE, with its ImportSpecs filtered, to reflect how it is in scope qualified or unqualified respectively. See Note [GRE filtering]
unQualOK :: GlobalRdrElt -> Bool #
Test if an unqualified version of this thing would be in scope
isOverloadedRecFldGRE :: GlobalRdrElt -> Bool #
Is this a record field defined with DuplicateRecordFields? (See Note [Parents for record fields])
isRecFldGRE :: GlobalRdrElt -> Bool #
isLocalGRE :: GlobalRdrElt -> Bool #
getGRE_NameQualifier_maybes :: GlobalRdrEnv -> Name -> [Maybe [ModuleName]] #
lookupGRE_Name_OccName :: GlobalRdrEnv -> Name -> OccName -> Maybe GlobalRdrElt #
Look for precisely this Name in the environment, but with an OccName
that might differ from that of the Name. See lookupGRE_FieldLabel and
Note [Parents for record fields].
lookupGRE_FieldLabel :: GlobalRdrEnv -> FieldLabel -> Maybe GlobalRdrElt #
Look for a particular record field selector in the environment, where the selector name and field label may be different: the GlobalRdrEnv is keyed on the label. See Note [Parents for record fields] for why this happens.
lookupGRE_Name :: GlobalRdrEnv -> Name -> Maybe GlobalRdrElt #
lookupGRE_RdrName :: RdrName -> GlobalRdrEnv -> [GlobalRdrElt] #
greOccName :: GlobalRdrElt -> OccName #
lookupGlobalRdrEnv :: GlobalRdrEnv -> OccName -> [GlobalRdrElt] #
pprGlobalRdrEnv :: Bool -> GlobalRdrEnv -> SDoc #
globalRdrEnvElts :: GlobalRdrEnv -> [GlobalRdrElt] #
availFromGRE :: GlobalRdrElt -> AvailInfo #
gresToAvailInfo :: [GlobalRdrElt] -> [AvailInfo] #
Takes a list of distinct GREs and folds them
into AvailInfos. This is more efficient than mapping each individual
GRE to an AvailInfo and the folding using plusAvail but needs the
uniqueness assumption.
greParent_maybe :: GlobalRdrElt -> Maybe Name #
greSrcSpan :: GlobalRdrElt -> SrcSpan #
greRdrNames :: GlobalRdrElt -> [RdrName] #
gresFromAvail :: (Name -> Maybe ImportSpec) -> AvailInfo -> [GlobalRdrElt] #
localGREsFromAvail :: AvailInfo -> [GlobalRdrElt] #
gresFromAvails :: Maybe ImportSpec -> [AvailInfo] -> [GlobalRdrElt] #
make a GlobalRdrEnv where all the elements point to the same
Provenance (useful for "hiding" imports, or imports with no details).
delLocalRdrEnvList :: LocalRdrEnv -> [OccName] -> LocalRdrEnv #
inLocalRdrEnvScope :: Name -> LocalRdrEnv -> Bool #
localRdrEnvElts :: LocalRdrEnv -> [Name] #
elemLocalRdrEnv :: RdrName -> LocalRdrEnv -> Bool #
lookupLocalRdrOcc :: LocalRdrEnv -> OccName -> Maybe Name #
lookupLocalRdrEnv :: LocalRdrEnv -> RdrName -> Maybe Name #
extendLocalRdrEnvList :: LocalRdrEnv -> [Name] -> LocalRdrEnv #
extendLocalRdrEnv :: LocalRdrEnv -> Name -> LocalRdrEnv #
isExact_maybe :: RdrName -> Maybe Name #
isQual_maybe :: RdrName -> Maybe (ModuleName, OccName) #
isSrcRdrName :: RdrName -> Bool #
isRdrTyVar :: RdrName -> Bool #
isRdrDataCon :: RdrName -> Bool #
nameRdrName :: Name -> RdrName #
getRdrName :: NamedThing thing => thing -> RdrName #
mkQual :: NameSpace -> (FastString, FastString) -> RdrName #
Make a qualified RdrName in the given namespace and where the ModuleName and
the OccName are taken from the first and second elements of the tuple respectively
mkVarUnqual :: FastString -> RdrName #
mkUnqual :: NameSpace -> FastString -> RdrName #
mkRdrQual :: ModuleName -> OccName -> RdrName #
mkRdrUnqual :: OccName -> RdrName #
demoteRdrName :: RdrName -> Maybe RdrName #
rdrNameSpace :: RdrName -> NameSpace #
rdrNameOcc :: RdrName -> OccName #
Reader Name
Do not use the data constructors of RdrName directly: prefer the family
of functions that creates them, such as mkRdrUnqual
- Note: A Located RdrName will only have API Annotations if it is a compound one, e.g.
`bar` ( ~ )
AnnKeywordId:AnnType,AnnOpen'('or'['or'[:',AnnClose')'or']'or':]',,AnnBackquote'`',AnnValAnnTilde,
Constructors
| Unqual OccName | Unqualified name Used for ordinary, unqualified occurrences, e.g. |
| Qual ModuleName OccName | Qualified name A qualified name written by the user in
source code. The module isn't necessarily
the module where the thing is defined;
just the one from which it is imported.
Examples are |
| Orig Module OccName | Original name An original name; the module is the defining module.
This is used when GHC generates code that will be fed
into the renamer (e.g. from deriving clauses), but where
we want to say "Use Prelude.map dammit". One of these
can be created with |
| Exact Name | Exact name We know exactly the
Such a |
Instances
| Eq RdrName | |
| Data RdrName | |
Defined in RdrName Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> RdrName -> c RdrName # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c RdrName # toConstr :: RdrName -> Constr # dataTypeOf :: RdrName -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c RdrName) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c RdrName) # gmapT :: (forall b. Data b => b -> b) -> RdrName -> RdrName # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> RdrName -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> RdrName -> r # gmapQ :: (forall d. Data d => d -> u) -> RdrName -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> RdrName -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> RdrName -> m RdrName # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> RdrName -> m RdrName # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> RdrName -> m RdrName # | |
| Ord RdrName | |
| HasOccName RdrName | |
| Outputable RdrName | |
| OutputableBndr RdrName | |
Defined in RdrName Methods pprBndr :: BindingSite -> RdrName -> SDoc # pprPrefixOcc :: RdrName -> SDoc # pprInfixOcc :: RdrName -> SDoc # bndrIsJoin_maybe :: RdrName -> Maybe Int # | |
data LocalRdrEnv #
Local Reader Environment
This environment is used to store local bindings
(let, where, lambda, case).
It is keyed by OccName, because we never use it for qualified names
We keep the current mapping, *and* the set of all Names in scope
Reason: see Note [Splicing Exact names] in RnEnv
Instances
| Outputable LocalRdrEnv | |
Defined in RdrName | |
type GlobalRdrEnv = OccEnv [GlobalRdrElt] #
Global Reader Environment
Keyed by OccName; when looking up a qualified name
we look up the OccName part, and then check the Provenance
to see if the appropriate qualification is valid. This
saves routinely doubling the size of the env by adding both
qualified and unqualified names to the domain.
The list in the codomain is required because there may be name clashes These only get reported on lookup, not on construction
INVARIANT 1: All the members of the list have distinct
gre_name fields; that is, no duplicate Names
INVARIANT 2: Imported provenance => Name is an ExternalName However LocalDefs can have an InternalName. This happens only when type-checking a [d| ... |] Template Haskell quotation; see this note in RnNames Note [Top-level Names in Template Haskell decl quotes]
INVARIANT 3: If the GlobalRdrEnv maps [occ -> gre], then greOccName gre = occ
NB: greOccName gre is usually the same as nameOccName (gre_name gre), but not always in the case of record seectors; see greOccName
data GlobalRdrElt #
Global Reader Element
An element of the GlobalRdrEnv
Constructors
| GRE | |
Instances
| Eq GlobalRdrElt | |
Defined in RdrName | |
| Data GlobalRdrElt | |
Defined in RdrName Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GlobalRdrElt -> c GlobalRdrElt # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c GlobalRdrElt # toConstr :: GlobalRdrElt -> Constr # dataTypeOf :: GlobalRdrElt -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c GlobalRdrElt) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c GlobalRdrElt) # gmapT :: (forall b. Data b => b -> b) -> GlobalRdrElt -> GlobalRdrElt # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GlobalRdrElt -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GlobalRdrElt -> r # gmapQ :: (forall d. Data d => d -> u) -> GlobalRdrElt -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> GlobalRdrElt -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> GlobalRdrElt -> m GlobalRdrElt # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GlobalRdrElt -> m GlobalRdrElt # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GlobalRdrElt -> m GlobalRdrElt # | |
| Outputable GlobalRdrElt | |
Defined in RdrName | |
The children of a Name are the things that are abbreviated by the ".." notation in export lists. See Note [Parents]
Constructors
| NoParent | |
| ParentIs | |
| FldParent | See Note [Parents for record fields] |
Fields
| |
Instances
| Eq Parent | |
| Data Parent | |
Defined in RdrName Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Parent -> c Parent # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Parent # toConstr :: Parent -> Constr # dataTypeOf :: Parent -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Parent) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Parent) # gmapT :: (forall b. Data b => b -> b) -> Parent -> Parent # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Parent -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Parent -> r # gmapQ :: (forall d. Data d => d -> u) -> Parent -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Parent -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Parent -> m Parent # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Parent -> m Parent # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Parent -> m Parent # | |
| Outputable Parent | |
data ImportSpec #
Import Specification
The ImportSpec of something says how it came to be imported
It's quite elaborate so that we can give accurate unused-name warnings.
Constructors
| ImpSpec | |
Fields
| |
Instances
| Eq ImportSpec | |
Defined in RdrName | |
| Data ImportSpec | |
Defined in RdrName Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ImportSpec -> c ImportSpec # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ImportSpec # toConstr :: ImportSpec -> Constr # dataTypeOf :: ImportSpec -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ImportSpec) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ImportSpec) # gmapT :: (forall b. Data b => b -> b) -> ImportSpec -> ImportSpec # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ImportSpec -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ImportSpec -> r # gmapQ :: (forall d. Data d => d -> u) -> ImportSpec -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ImportSpec -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ImportSpec -> m ImportSpec # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ImportSpec -> m ImportSpec # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ImportSpec -> m ImportSpec # | |
| Ord ImportSpec | |
Defined in RdrName Methods compare :: ImportSpec -> ImportSpec -> Ordering # (<) :: ImportSpec -> ImportSpec -> Bool # (<=) :: ImportSpec -> ImportSpec -> Bool # (>) :: ImportSpec -> ImportSpec -> Bool # (>=) :: ImportSpec -> ImportSpec -> Bool # max :: ImportSpec -> ImportSpec -> ImportSpec # min :: ImportSpec -> ImportSpec -> ImportSpec # | |
| Outputable ImportSpec | |
Defined in RdrName | |
data ImpDeclSpec #
Import Declaration Specification
Describes a particular import declaration and is
shared among all the Provenances for that decl
Constructors
| ImpDeclSpec | |
Fields
| |
Instances
| Eq ImpDeclSpec | |
Defined in RdrName | |
| Data ImpDeclSpec | |
Defined in RdrName Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ImpDeclSpec -> c ImpDeclSpec # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ImpDeclSpec # toConstr :: ImpDeclSpec -> Constr # dataTypeOf :: ImpDeclSpec -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ImpDeclSpec) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ImpDeclSpec) # gmapT :: (forall b. Data b => b -> b) -> ImpDeclSpec -> ImpDeclSpec # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ImpDeclSpec -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ImpDeclSpec -> r # gmapQ :: (forall d. Data d => d -> u) -> ImpDeclSpec -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ImpDeclSpec -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ImpDeclSpec -> m ImpDeclSpec # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ImpDeclSpec -> m ImpDeclSpec # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ImpDeclSpec -> m ImpDeclSpec # | |
| Ord ImpDeclSpec | |
Defined in RdrName Methods compare :: ImpDeclSpec -> ImpDeclSpec -> Ordering # (<) :: ImpDeclSpec -> ImpDeclSpec -> Bool # (<=) :: ImpDeclSpec -> ImpDeclSpec -> Bool # (>) :: ImpDeclSpec -> ImpDeclSpec -> Bool # (>=) :: ImpDeclSpec -> ImpDeclSpec -> Bool # max :: ImpDeclSpec -> ImpDeclSpec -> ImpDeclSpec # min :: ImpDeclSpec -> ImpDeclSpec -> ImpDeclSpec # | |
data ImpItemSpec #
Import Item Specification
Describes import info a particular Name
Constructors
| ImpAll | The import had no import list, or had a hiding list |
| ImpSome | The import had an import list.
The import C( T(..) ) Here the constructors of |
Fields
| |
Instances
| Eq ImpItemSpec | |
Defined in RdrName | |
| Data ImpItemSpec | |
Defined in RdrName Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ImpItemSpec -> c ImpItemSpec # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ImpItemSpec # toConstr :: ImpItemSpec -> Constr # dataTypeOf :: ImpItemSpec -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ImpItemSpec) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ImpItemSpec) # gmapT :: (forall b. Data b => b -> b) -> ImpItemSpec -> ImpItemSpec # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ImpItemSpec -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ImpItemSpec -> r # gmapQ :: (forall d. Data d => d -> u) -> ImpItemSpec -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ImpItemSpec -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ImpItemSpec -> m ImpItemSpec # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ImpItemSpec -> m ImpItemSpec # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ImpItemSpec -> m ImpItemSpec # | |
| Ord ImpItemSpec | |
Defined in RdrName Methods compare :: ImpItemSpec -> ImpItemSpec -> Ordering # (<) :: ImpItemSpec -> ImpItemSpec -> Bool # (<=) :: ImpItemSpec -> ImpItemSpec -> Bool # (>) :: ImpItemSpec -> ImpItemSpec -> Bool # (>=) :: ImpItemSpec -> ImpItemSpec -> Bool # max :: ImpItemSpec -> ImpItemSpec -> ImpItemSpec # min :: ImpItemSpec -> ImpItemSpec -> ImpItemSpec # | |
type FieldLabelString = FastString #
Field labels are just represented as strings; they are not necessarily unique (even within a module)
type FieldLabel = FieldLbl Name #
Fields in an algebraic record type
Constructors
| FieldLabel | |
Fields
| |
Instances
| Functor FieldLbl | |
| Foldable FieldLbl | |
Defined in FieldLabel Methods fold :: Monoid m => FieldLbl m -> m # foldMap :: Monoid m => (a -> m) -> FieldLbl a -> m # foldMap' :: Monoid m => (a -> m) -> FieldLbl a -> m # foldr :: (a -> b -> b) -> b -> FieldLbl a -> b # foldr' :: (a -> b -> b) -> b -> FieldLbl a -> b # foldl :: (b -> a -> b) -> b -> FieldLbl a -> b # foldl' :: (b -> a -> b) -> b -> FieldLbl a -> b # foldr1 :: (a -> a -> a) -> FieldLbl a -> a # foldl1 :: (a -> a -> a) -> FieldLbl a -> a # elem :: Eq a => a -> FieldLbl a -> Bool # maximum :: Ord a => FieldLbl a -> a # minimum :: Ord a => FieldLbl a -> a # | |
| Traversable FieldLbl | |
| Eq a => Eq (FieldLbl a) | |
| Data a => Data (FieldLbl a) | |
Defined in FieldLabel Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FieldLbl a -> c (FieldLbl a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (FieldLbl a) # toConstr :: FieldLbl a -> Constr # dataTypeOf :: FieldLbl a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (FieldLbl a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (FieldLbl a)) # gmapT :: (forall b. Data b => b -> b) -> FieldLbl a -> FieldLbl a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FieldLbl a -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FieldLbl a -> r # gmapQ :: (forall d. Data d => d -> u) -> FieldLbl a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> FieldLbl a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> FieldLbl a -> m (FieldLbl a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> FieldLbl a -> m (FieldLbl a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> FieldLbl a -> m (FieldLbl a) # | |
| Binary a => Binary (FieldLbl a) | |
| Outputable a => Outputable (FieldLbl a) | |
extendDNameEnv :: DNameEnv a -> Name -> a -> DNameEnv a #
adjustDNameEnv :: (a -> a) -> DNameEnv a -> Name -> DNameEnv a #
mapDNameEnv :: (a -> b) -> DNameEnv a -> DNameEnv b #
filterDNameEnv :: (a -> Bool) -> DNameEnv a -> DNameEnv a #
delFromDNameEnv :: DNameEnv a -> Name -> DNameEnv a #
lookupDNameEnv :: DNameEnv a -> Name -> Maybe a #
emptyDNameEnv :: DNameEnv a #
lookupNameEnv_NF :: NameEnv a -> Name -> a #
disjointNameEnv :: NameEnv a -> NameEnv a -> Bool #
anyNameEnv :: (elt -> Bool) -> NameEnv elt -> Bool #
filterNameEnv :: (elt -> Bool) -> NameEnv elt -> NameEnv elt #
delListFromNameEnv :: NameEnv a -> [Name] -> NameEnv a #
delFromNameEnv :: NameEnv a -> Name -> NameEnv a #
extendNameEnvList_C :: (a -> a -> a) -> NameEnv a -> [(Name, a)] -> NameEnv a #
extendNameEnv_Acc :: (a -> b -> b) -> (a -> b) -> NameEnv b -> Name -> a -> NameEnv b #
mapNameEnv :: (elt1 -> elt2) -> NameEnv elt1 -> NameEnv elt2 #
extendNameEnv_C :: (a -> a -> a) -> NameEnv a -> Name -> a -> NameEnv a #
plusNameEnv_C :: (a -> a -> a) -> NameEnv a -> NameEnv a -> NameEnv a #
plusNameEnv :: NameEnv a -> NameEnv a -> NameEnv a #
elemNameEnv :: Name -> NameEnv a -> Bool #
mkNameEnvWith :: (a -> Name) -> [a] -> NameEnv a #
lookupNameEnv :: NameEnv a -> Name -> Maybe a #
extendNameEnvList :: NameEnv a -> [(Name, a)] -> NameEnv a #
extendNameEnv :: NameEnv a -> Name -> a -> NameEnv a #
unitNameEnv :: Name -> a -> NameEnv a #
isEmptyNameEnv :: NameEnv a -> Bool #
emptyNameEnv :: NameEnv a #
nameEnvElts :: NameEnv a -> [a] #
Deterministic Name Environment
See Note [Deterministic UniqFM] in UniqDFM for explanation why we need DNameEnv.
intersectFVs :: FreeVars -> FreeVars -> FreeVars #
isEmptyFVs :: NameSet -> Bool #
nameSetElemsStable :: NameSet -> [Name] #
Get the elements of a NameSet with some stable ordering. This only works for Names that originate in the source code or have been tidied. See Note [Deterministic UniqFM] to learn about nondeterminism
intersectsNameSet :: NameSet -> NameSet -> Bool #
True if there is a non-empty intersection.
s1 doesn't compute intersectsNameSet s2s2 if s1 is empty
delListFromNameSet :: NameSet -> [Name] -> NameSet #
intersectNameSet :: NameSet -> NameSet -> NameSet #
delFromNameSet :: NameSet -> Name -> NameSet #
elemNameSet :: Name -> NameSet -> Bool #
minusNameSet :: NameSet -> NameSet -> NameSet #
unionNameSets :: [NameSet] -> NameSet #
unionNameSet :: NameSet -> NameSet -> NameSet #
extendNameSet :: NameSet -> Name -> NameSet #
extendNameSetList :: NameSet -> [Name] -> NameSet #
unitNameSet :: Name -> NameSet #
emptyNameSet :: NameSet #
isEmptyNameSet :: NameSet -> Bool #
type DefUse = (Maybe Defs, Uses) #
(Just ds, us) => The use of any member of the ds
implies that all the us are used too.
Also, us may mention ds.
Nothing => Nothing is defined in this group, but
nevertheless all the uses are essential.
Used for instance declarations, for example
pprModuleMap :: ModuleToPkgConfAll -> SDoc #
Show the mapping of modules to where they come from.
pprPackagesSimple :: DynFlags -> SDoc #
Show simplified package info.
The idea is to only print package id, and any information that might be different from the package databases (exposure, trust)
pprPackages :: DynFlags -> SDoc #
Show (very verbose) package info
isDllName :: DynFlags -> Module -> Name -> Bool #
Will the Name come from a dynamically linked library?
getPreloadPackagesAnd :: DynFlags -> [PreloadUnitId] -> IO [PackageConfig] #
Find all the PackageConfig in both the preload packages from DynFlags and corresponding to the list of
PackageConfigs
listVisibleModuleNames :: DynFlags -> [ModuleName] #
lookupModuleInAllPackages :: DynFlags -> ModuleName -> [(Module, PackageConfig)] #
Takes a ModuleName, and if the module is in any package returns
list of modules which take that name.
getPackageFrameworks :: DynFlags -> [PreloadUnitId] -> IO [String] #
Find all the package frameworks in these and the preload packages
getPackageFrameworkPath :: DynFlags -> [PreloadUnitId] -> IO [String] #
Find all the package framework paths in these and the preload packages
getPackageExtraCcOpts :: DynFlags -> [PreloadUnitId] -> IO [String] #
Find all the C-compiler options in these and the preload packages
packageHsLibs :: DynFlags -> PackageConfig -> [String] #
collectArchives :: DynFlags -> PackageConfig -> IO [FilePath] #
collectLinkOpts :: DynFlags -> [PackageConfig] -> ([String], [String], [String]) #
getPackageLinkOpts :: DynFlags -> [PreloadUnitId] -> IO ([String], [String], [String]) #
Find all the link options in these and the preload packages, returning (package hs lib options, extra library options, other flags)
collectLibraryPaths :: DynFlags -> [PackageConfig] -> [FilePath] #
getPackageLibraryPath :: DynFlags -> [PreloadUnitId] -> IO [String] #
Find all the library paths in these and the preload packages
collectIncludeDirs :: [PackageConfig] -> [FilePath] #
getPackageIncludePath :: DynFlags -> [PreloadUnitId] -> IO [String] #
Find all the include directories in these and the preload packages
unwireUnitId :: DynFlags -> UnitId -> UnitId #
pprReason :: SDoc -> UnusablePackageReason -> SDoc #
pprFlag :: PackageFlag -> SDoc #
isIndefinite :: DynFlags -> Bool #
A little utility to tell if the thisPackage is indefinite
(if it is not, we should never use on-the-fly renaming.)
readPackageConfig :: DynFlags -> FilePath -> IO (FilePath, [PackageConfig]) #
resolvePackageConfig :: DynFlags -> PkgConfRef -> IO (Maybe FilePath) #
getPackageConfRefs :: DynFlags -> IO [PkgConfRef] #
readPackageConfigs :: DynFlags -> IO [(FilePath, [PackageConfig])] #
initPackages :: DynFlags -> IO (DynFlags, [PreloadUnitId]) #
Call this after parseDynFlags. It reads the package
database files, and sets up various internal tables of package
information, according to the package-related flags on the
command-line (-package, -hide-package etc.)
Returns a list of packages to link in if we're doing dynamic linking.
This list contains the packages that the user explicitly mentioned with
-package flags.
initPackages can be called again subsequently after updating the
packageFlags field of the DynFlags, and it will update the
pkgState in DynFlags and return a list of packages to
link in.
listPackageConfigMap :: DynFlags -> [PackageConfig] #
Get a list of entries from the package database. NB: be careful with this function, although all packages in this map are "visible", this does not imply that the exposed-modules of the package are available (they may have been thinned or renamed).
getPackageDetails :: DynFlags -> UnitId -> PackageConfig #
Looks up the package with the given id in the package state, panicing if it is not found
searchPackageId :: DynFlags -> SourcePackageId -> [PackageConfig] #
Search for packages with a given package ID (e.g. "foo-0.1")
lookupPackageName :: DynFlags -> PackageName -> Maybe ComponentId #
Find the package we know about with the given package name (e.g. foo), if any
(NB: there might be a locally defined unit name which overrides this)
lookupPackage' :: Bool -> PackageConfigMap -> UnitId -> Maybe PackageConfig #
A more specialized interface, which takes a boolean specifying
whether or not to look for on-the-fly renamed interfaces, and
just a PackageConfigMap rather than a DynFlags (so it can
be used while we're initializing DynFlags
lookupPackage :: DynFlags -> UnitId -> Maybe PackageConfig #
Find the package we know about with the given unit id, if any
data ModuleOrigin #
Package state is all stored in DynFlags, including the details of
all packages, which packages are exposed, and which modules they
provide.
The package state is computed by initPackages, and kept in DynFlags.
It is influenced by various package flags:
-package pkgand-package-id pkgcausepkgto become exposed. If-hide-all-packageswas not specified, these commands also cause all other packages with the same name to become hidden.-hide-package pkgcausespkgto become hidden.- (there are a few more flags, check below for their semantics)
The package state has the following properties.
- Let
exposedPackagesbe the set of packages thus exposed. LetdepExposedPackagesbe the transitive closure fromexposedPackagesof their dependencies. - When searching for a module from a preload import declaration,
only the exposed modules in
exposedPackagesare valid. - When searching for a module from an implicit import, all modules
from
depExposedPackagesare valid. - When linking in a compilation manager mode, we link in packages the
program depends on (the compiler knows this list by the
time it gets to the link step). Also, we link in all packages
which were mentioned with preload
-packageflags on the command-line, or are a transitive dependency of same, or are "base"/"rts". The reason for this is that we might need packages which don't contain any Haskell modules, and therefore won't be discovered by the normal mechanism of dependency tracking.
Given a module name, there may be multiple ways it came into scope, possibly simultaneously. This data type tracks all the possible ways it could have come into scope. Warning: don't use the record functions, they're partial!
Constructors
| ModHidden | Module is hidden, and thus never will be available for import. (But maybe the user didn't realize), so we'll still keep track of these modules.) |
| ModUnusable UnusablePackageReason | Module is unavailable because the package is unusable. |
| ModOrigin | Module is public, and could have come from some places. |
Fields
| |
Instances
| Semigroup ModuleOrigin | |
Defined in Packages Methods (<>) :: ModuleOrigin -> ModuleOrigin -> ModuleOrigin # sconcat :: NonEmpty ModuleOrigin -> ModuleOrigin # stimes :: Integral b => b -> ModuleOrigin -> ModuleOrigin # | |
| Monoid ModuleOrigin | |
Defined in Packages Methods mempty :: ModuleOrigin # mappend :: ModuleOrigin -> ModuleOrigin -> ModuleOrigin # mconcat :: [ModuleOrigin] -> ModuleOrigin # | |
| Outputable ModuleOrigin | |
Defined in Packages | |
data UnusablePackageReason #
The reason why a package is unusable.
Constructors
| IgnoredWithFlag | We ignored it explicitly using |
| BrokenDependencies [InstalledUnitId] | This package transitively depends on a package that was never present in any of the provided databases. |
| CyclicDependencies [InstalledUnitId] | This package transitively depends on a package involved in a cycle.
Note that the list of |
| IgnoredDependencies [InstalledUnitId] | This package transitively depends on a package which was ignored. |
| ShadowedDependencies [InstalledUnitId] | This package transitively depends on a package which was shadowed by an ABI-incompatible package. |
Instances
| Outputable UnusablePackageReason | |
Defined in Packages | |
data LookupResult #
The result of performing a lookup
Constructors
| LookupFound Module PackageConfig | Found the module uniquely, nothing else to do |
| LookupMultiple [(Module, ModuleOrigin)] | Multiple modules with the same name in scope |
| LookupHidden [(Module, ModuleOrigin)] [(Module, ModuleOrigin)] | No modules found, but there were some hidden ones with an exact name match. First is due to package hidden, second is due to module being hidden |
| LookupUnusable [(Module, ModuleOrigin)] | No modules found, but there were some unusable ones with an exact name match |
| LookupNotFound [ModuleSuggestion] | Nothing found, here are some suggested different names |
data ModuleSuggestion #
typeSymbolKind :: Kind #
typeNatKind :: Kind #
mkBoxedTupleTy :: [Type] -> Type #
Build the type of a small tuple that holds the specified type of thing Flattens 1-tuples. See Note [One-tuples].
coercibleTyCon :: TyCon #
liftedTypeKind :: Kind #
constraintKind :: Kind #
vecElemTyCon :: TyCon #
vecCountTyCon :: TyCon #
runtimeRepTy :: Type #
intRepDataConTy :: Type #
vec64DataConTy :: Type #
vec32DataConTy :: Type #
vec16DataConTy :: Type #
vec8DataConTy :: Type #
vec4DataConTy :: Type #
vec2DataConTy :: Type #
anyTypeOfKind :: Kind -> Type #
unboxedTupleKind :: [Type] -> Kind #
Specialization of unboxedTupleSumKind for tuples
Make a *promoted* list.
tupleTyConName :: TupleSort -> Arity -> Name #
pprPrefixName :: NamedThing a => a -> SDoc #
pprInfixName :: (Outputable a, NamedThing a) => a -> SDoc #
getOccFS :: NamedThing a => a -> FastString #
getOccString :: NamedThing a => a -> String #
getSrcSpan :: NamedThing a => a -> SrcSpan #
getSrcLoc :: NamedThing a => a -> SrcLoc #
nameStableString :: Name -> String #
Get a string representation of a Name that's unique and stable
across recompilations. Used for deterministic generation of binds for
derived instances.
eg. "$aeson_70dylHtv1FFGeai1IoxcQr$Data.Aeson.Types.Internal$String"
pprNameDefnLoc :: Name -> SDoc #
pprDefinedAt :: Name -> SDoc #
pprNameUnqualified :: Name -> SDoc #
Print the string of Name unqualifiedly directly.
stableNameCmp :: Name -> Name -> Ordering #
Compare Names lexicographically This only works for Names that originate in the source code or have been tidied.
localiseName :: Name -> Name #
Make the Name into an internal name, regardless of what it was to begin with
tidyNameOcc :: Name -> OccName -> Name #
setNameLoc :: Name -> SrcSpan -> Name #
setNameUnique :: Name -> Unique -> Name #
mkFCallName :: Unique -> String -> Name #
Make a name for a foreign call
mkSysTvName :: Unique -> FastString -> Name #
mkSystemVarName :: Unique -> FastString -> Name #
mkSystemName :: Unique -> OccName -> Name #
Create a name brought into being by the compiler
mkWiredInName :: Module -> OccName -> Unique -> TyThing -> BuiltInSyntax -> Name #
Create a name which is actually defined by the compiler itself
mkExternalName :: Unique -> Module -> OccName -> SrcSpan -> Name #
Create a name which definitely originates in the given module
mkClonedInternalName :: Unique -> Name -> Name #
isSystemName :: Name -> Bool #
isDataConName :: Name -> Bool #
isTyConName :: Name -> Bool #
isTyVarName :: Name -> Bool #
nameIsFromExternalPackage :: UnitId -> Name -> Bool #
Returns True if the Name comes from some other package: neither this package nor the interactive package.
nameIsHomePackageImport :: Module -> Name -> Bool #
nameIsHomePackage :: Module -> Name -> Bool #
nameIsLocalOrFrom :: Module -> Name -> Bool #
Returns True if the name is
(a) Internal
(b) External but from the specified module
(c) External but from the interactive package
The key idea is that False means: the entity is defined in some other module you can find the details (type, fixity, instances) in some interface file those details will be stored in the EPT or HPT
True means: the entity is defined in this module or earlier in the GHCi session you can find details (type, fixity, instances) in the TcGblEnv or TcLclEnv
The isInteractiveModule part is because successive interactions of a GHCi session
each give rise to a fresh module (Ghci1, Ghci2, etc), but they all come
from the magic interactive package; and all the details are kept in the
TcLclEnv, TcGblEnv, NOT in the HPT or EPT.
See Note [The interactive package] in HscTypes
nameModule_maybe :: Name -> Maybe Module #
nameModule :: HasDebugCallStack => Name -> Module #
isHoleName :: Name -> Bool #
isInternalName :: Name -> Bool #
isExternalName :: Name -> Bool #
isBuiltInSyntax :: Name -> Bool #
isWiredInName :: Name -> Bool #
nameSrcSpan :: Name -> SrcSpan #
nameSrcLoc :: Name -> SrcLoc #
nameNameSpace :: Name -> NameSpace #
nameOccName :: Name -> OccName #
nameUnique :: Name -> Unique #
data BuiltInSyntax #
BuiltInSyntax is for things like (:), [] and tuples,
which have special syntactic forms. They aren't in scope
as such.
Constructors
| BuiltInSyntax | |
| UserSyntax |
class NamedThing a where #
A class allowing convenient access to the Name of various datatypes
Minimal complete definition
Instances
| NamedThing HoleFitCandidate | |
Defined in TcHoleFitTypes | |
| NamedThing ClsInst | |
| NamedThing FamInst | |
Defined in FamInstEnv | |
| NamedThing IfaceDecl | |
| NamedThing IfaceClassOp | |
Defined in IfaceSyn | |
| NamedThing IfaceConDecl | |
Defined in IfaceSyn | |
| NamedThing Class | |
| NamedThing ConLike | |
| NamedThing DataCon | |
| NamedThing PatSyn | |
| NamedThing TyThing | |
| NamedThing Var | |
| NamedThing TyCon | |
| NamedThing Name | |
| NamedThing (HsTyVarBndr GhcRn) | |
Defined in GHC.Hs.Types | |
| NamedThing (CoAxiom br) | |
| NamedThing e => NamedThing (Located e) | |
| NamedThing tv => NamedThing (VarBndr tv flag) | |
mkForAllTy :: TyCoVar -> ArgFlag -> Type -> Type #
Like mkTyCoForAllTy, but does not check the occurrence of the binder
See Note [Unused coercion variable in ForAllTy]
Instances
| Data Type | |
Defined in TyCoRep Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Type -> c Type # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Type # dataTypeOf :: Type -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Type) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Type) # gmapT :: (forall b. Data b => b -> b) -> Type -> Type # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Type -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Type -> r # gmapQ :: (forall d. Data d => d -> u) -> Type -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Type -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Type -> m Type # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Type -> m Type # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Type -> m Type # | |
| Outputable Type | |
A Coercion is concrete evidence of the equality/convertibility
of two types.
Instances
| Data Coercion | |
Defined in TyCoRep Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Coercion -> c Coercion # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Coercion # toConstr :: Coercion -> Constr # dataTypeOf :: Coercion -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Coercion) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Coercion) # gmapT :: (forall b. Data b => b -> b) -> Coercion -> Coercion # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Coercion -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Coercion -> r # gmapQ :: (forall d. Data d => d -> u) -> Coercion -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Coercion -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Coercion -> m Coercion # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Coercion -> m Coercion # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Coercion -> m Coercion # | |
| Outputable Coercion | |
data UnivCoProvenance #
For simplicity, we have just one UnivCo that represents a coercion from
some type to some other type, with (in general) no restrictions on the
type. The UnivCoProvenance specifies more exactly what the coercion really
is and why a program should (or shouldn't!) trust the coercion.
It is reasonable to consider each constructor of UnivCoProvenance
as a totally independent coercion form; their only commonality is
that they don't tell you what types they coercion between. (That info
is in the UnivCo constructor of Coercion.
Instances
| Data UnivCoProvenance | |
Defined in TyCoRep Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UnivCoProvenance -> c UnivCoProvenance # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c UnivCoProvenance # toConstr :: UnivCoProvenance -> Constr # dataTypeOf :: UnivCoProvenance -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c UnivCoProvenance) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c UnivCoProvenance) # gmapT :: (forall b. Data b => b -> b) -> UnivCoProvenance -> UnivCoProvenance # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UnivCoProvenance -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UnivCoProvenance -> r # gmapQ :: (forall d. Data d => d -> u) -> UnivCoProvenance -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> UnivCoProvenance -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> UnivCoProvenance -> m UnivCoProvenance # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UnivCoProvenance -> m UnivCoProvenance # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UnivCoProvenance -> m UnivCoProvenance # | |
| Outputable UnivCoProvenance | |
Defined in TyCoRep | |
data TyCoBinder #
A TyCoBinder represents an argument to a function. TyCoBinders can be
dependent (Named) or nondependent (Anon). They may also be visible or
not. See Note [TyCoBinders]
Instances
| Data TyCoBinder | |
Defined in TyCoRep Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TyCoBinder -> c TyCoBinder # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TyCoBinder # toConstr :: TyCoBinder -> Constr # dataTypeOf :: TyCoBinder -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TyCoBinder) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TyCoBinder) # gmapT :: (forall b. Data b => b -> b) -> TyCoBinder -> TyCoBinder # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TyCoBinder -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TyCoBinder -> r # gmapQ :: (forall d. Data d => d -> u) -> TyCoBinder -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> TyCoBinder -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> TyCoBinder -> m TyCoBinder # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TyCoBinder -> m TyCoBinder # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TyCoBinder -> m TyCoBinder # | |
| Outputable TyCoBinder | |
Defined in TyCoRep | |
A semantically more meaningful type to represent what may or may not be a
useful Coercion.
Instances
| Data MCoercion | |
Defined in TyCoRep Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> MCoercion -> c MCoercion # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c MCoercion # toConstr :: MCoercion -> Constr # dataTypeOf :: MCoercion -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c MCoercion) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c MCoercion) # gmapT :: (forall b. Data b => b -> b) -> MCoercion -> MCoercion # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> MCoercion -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> MCoercion -> r # gmapQ :: (forall d. Data d => d -> u) -> MCoercion -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> MCoercion -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> MCoercion -> m MCoercion # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> MCoercion -> m MCoercion # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> MCoercion -> m MCoercion # | |
| Outputable MCoercion | |
A type of the form p of constraint kind represents a value whose type is
the Haskell predicate p, where a predicate is what occurs before
the => in a Haskell type.
We use PredType as documentation to mark those types that we guarantee to
have this kind.
It can be expanded into its representation, but:
- The type checker must treat it as opaque
- The rest of the compiler treats it as transparent
Consider these examples:
f :: (Eq a) => a -> Int
g :: (?x :: Int -> Int) => a -> Int
h :: (r\l) => {r} => {l::Int | r}Here the Eq a and ?x :: Int -> Int and rl are all called "predicates"
Argument Flag
Is something required to appear in source Haskell (Required),
permitted by request (Specified) (visible type application), or
prohibited entirely from appearing in source Haskell (Inferred)?
See Note [VarBndrs, TyCoVarBinders, TyConBinders, and visibility] in TyCoRep
Instances
| Eq ArgFlag | |
| Data ArgFlag | |
Defined in Var Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ArgFlag -> c ArgFlag # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ArgFlag # toConstr :: ArgFlag -> Constr # dataTypeOf :: ArgFlag -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ArgFlag) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ArgFlag) # gmapT :: (forall b. Data b => b -> b) -> ArgFlag -> ArgFlag # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ArgFlag -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ArgFlag -> r # gmapQ :: (forall d. Data d => d -> u) -> ArgFlag -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ArgFlag -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ArgFlag -> m ArgFlag # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ArgFlag -> m ArgFlag # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ArgFlag -> m ArgFlag # | |
| Ord ArgFlag | |
| Binary ArgFlag | |
| Outputable ArgFlag | |
| Outputable tv => Outputable (VarBndr tv ArgFlag) | |
data AnonArgFlag #
The non-dependent version of ArgFlag.
Constructors
| VisArg | Used for |
| InvisArg | Used for |
Instances
| Eq AnonArgFlag | |
Defined in Var | |
| Data AnonArgFlag | |
Defined in Var Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AnonArgFlag -> c AnonArgFlag # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AnonArgFlag # toConstr :: AnonArgFlag -> Constr # dataTypeOf :: AnonArgFlag -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c AnonArgFlag) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AnonArgFlag) # gmapT :: (forall b. Data b => b -> b) -> AnonArgFlag -> AnonArgFlag # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AnonArgFlag -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AnonArgFlag -> r # gmapQ :: (forall d. Data d => d -> u) -> AnonArgFlag -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> AnonArgFlag -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> AnonArgFlag -> m AnonArgFlag # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AnonArgFlag -> m AnonArgFlag # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AnonArgFlag -> m AnonArgFlag # | |
| Ord AnonArgFlag | |
Defined in Var Methods compare :: AnonArgFlag -> AnonArgFlag -> Ordering # (<) :: AnonArgFlag -> AnonArgFlag -> Bool # (<=) :: AnonArgFlag -> AnonArgFlag -> Bool # (>) :: AnonArgFlag -> AnonArgFlag -> Bool # (>=) :: AnonArgFlag -> AnonArgFlag -> Bool # max :: AnonArgFlag -> AnonArgFlag -> AnonArgFlag # min :: AnonArgFlag -> AnonArgFlag -> AnonArgFlag # | |
| Binary AnonArgFlag | |
Defined in Var Methods put_ :: BinHandle -> AnonArgFlag -> IO () # put :: BinHandle -> AnonArgFlag -> IO (Bin AnonArgFlag) # get :: BinHandle -> IO AnonArgFlag # | |
| Outputable AnonArgFlag | |
Defined in Var | |
Variable
Essentially a typed Name, that may also contain some additional information
about the Var and its use sites.
Instances
| Eq Var | |
| Data Var | |
Defined in Var Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Var -> c Var # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Var # dataTypeOf :: Var -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Var) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Var) # gmapT :: (forall b. Data b => b -> b) -> Var -> Var # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Var -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Var -> r # gmapQ :: (forall d. Data d => d -> u) -> Var -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Var -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Var -> m Var # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Var -> m Var # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Var -> m Var # | |
| Ord Var | |
| NamedThing Var | |
| HasOccName Var | |
| Uniquable Var | |
| Outputable Var | |
data SimplCount #
The monad used by Core-to-Core passes to register simplification statistics. Also used to have common state (in the form of UniqueSupply) for generating Uniques.
Instances
| Monad CoreM | |
| Functor CoreM | |
| Applicative CoreM | |
| MonadIO CoreM | |
| Alternative CoreM | |
| MonadPlus CoreM | |
| HasDynFlags CoreM | |
Defined in CoreMonad Methods | |
| HasModule CoreM | |
| MonadUnique CoreM | |
Defined in CoreMonad Methods getUniqueSupplyM :: CoreM UniqSupply # getUniqueM :: CoreM Unique # getUniquesM :: CoreM [Unique] # | |
Constructors
tidyOccName :: TidyOccEnv -> OccName -> (TidyOccEnv, OccName) #
avoidClashesOccEnv :: TidyOccEnv -> [OccName] -> TidyOccEnv #
initTidyOccEnv :: [OccName] -> TidyOccEnv #
mkMethodOcc :: OccName -> OccName #
Derive a name for the representation type constructor of a
data/newtype instance.
mkSuperDictAuxOcc :: Int -> OccName -> OccName #
mkDataConWorkerOcc :: OccName -> OccName #
mkRecFldSelOcc :: String -> OccName #
mkTyConRepOcc :: OccName -> OccName #
mkMaxTagOcc :: OccName -> OccName #
mkTag2ConOcc :: OccName -> OccName #
mkCon2TagOcc :: OccName -> OccName #
mkEqPredCoOcc :: OccName -> OccName #
mkInstTyCoOcc :: OccName -> OccName #
mkNewTyCoOcc :: OccName -> OccName #
mkClassDataConOcc :: OccName -> OccName #
mkRepEqOcc :: OccName -> OccName #
mkForeignExportOcc :: OccName -> OccName #
mkClassOpAuxOcc :: OccName -> OccName #
mkDefaultMethodOcc :: OccName -> OccName #
mkBuilderOcc :: OccName -> OccName #
mkMatcherOcc :: OccName -> OccName #
mkWorkerOcc :: OccName -> OccName #
mkDataConWrapperOcc :: OccName -> OccName #
isTypeableBindOcc :: OccName -> Bool #
Is an OccName one of a Typeable TyCon or Module binding?
This is needed as these bindings are renamed differently.
See Note [Grand plan for Typeable] in TcTypeable.
isDefaultMethodOcc :: OccName -> Bool #
isDerivedOccName :: OccName -> Bool #
Test for definitions internally generated by GHC. This predicte is used to suppress printing of internal definitions in some debug prints
startsWithUnderscore :: OccName -> Bool #
Haskell 98 encourages compilers to suppress warnings about unsed
names in a pattern if they start with _: this implements that test
parenSymOcc :: OccName -> SDoc -> SDoc #
Wrap parens around an operator
Test if the OccName is that for any operator (whether
it is a data constructor or variable or whatever)
isDataSymOcc :: OccName -> Bool #
Test if the OccName is a data constructor that starts with
a symbol (e.g. :, or [])
Value OccNamess are those that are either in
the variable or data constructor namespaces
setOccNameSpace :: NameSpace -> OccName -> OccName #
occNameString :: OccName -> String #
intersectsOccSet :: OccSet -> OccSet -> Bool #
intersectOccSet :: OccSet -> OccSet -> OccSet #
isEmptyOccSet :: OccSet -> Bool #
elemOccSet :: OccName -> OccSet -> Bool #
minusOccSet :: OccSet -> OccSet -> OccSet #
unionManyOccSets :: [OccSet] -> OccSet #
unionOccSets :: OccSet -> OccSet -> OccSet #
extendOccSetList :: OccSet -> [OccName] -> OccSet #
extendOccSet :: OccSet -> OccName -> OccSet #
unitOccSet :: OccName -> OccSet #
emptyOccSet :: OccSet #
filterOccEnv :: (elt -> Bool) -> OccEnv elt -> OccEnv elt #
delListFromOccEnv :: OccEnv a -> [OccName] -> OccEnv a #
delFromOccEnv :: OccEnv a -> OccName -> OccEnv a #
mkOccEnv_C :: (a -> a -> a) -> [(OccName, a)] -> OccEnv a #
extendOccEnv_Acc :: (a -> b -> b) -> (a -> b) -> OccEnv b -> OccName -> a -> OccEnv b #
extendOccEnv_C :: (a -> a -> a) -> OccEnv a -> OccName -> a -> OccEnv a #
plusOccEnv_C :: (a -> a -> a) -> OccEnv a -> OccEnv a -> OccEnv a #
plusOccEnv :: OccEnv a -> OccEnv a -> OccEnv a #
occEnvElts :: OccEnv a -> [a] #
foldOccEnv :: (a -> b -> b) -> b -> OccEnv a -> b #
elemOccEnv :: OccName -> OccEnv a -> Bool #
lookupOccEnv :: OccEnv a -> OccName -> Maybe a #
extendOccEnvList :: OccEnv a -> [(OccName, a)] -> OccEnv a #
extendOccEnv :: OccEnv a -> OccName -> a -> OccEnv a #
unitOccEnv :: OccName -> a -> OccEnv a #
emptyOccEnv :: OccEnv a #
nameSpacesRelated :: NameSpace -> NameSpace -> Bool #
demoteOccName :: OccName -> Maybe OccName #
mkClsOccFS :: FastString -> OccName #
mkTcOccFS :: FastString -> OccName #
mkTyVarOccFS :: FastString -> OccName #
mkTyVarOcc :: String -> OccName #
mkDataOccFS :: FastString -> OccName #
mkVarOccFS :: FastString -> OccName #
mkOccNameFS :: NameSpace -> FastString -> OccName #
pprOccName :: OccName -> SDoc #
pprNameSpaceBrief :: NameSpace -> SDoc #
pprNonVarNameSpace :: NameSpace -> SDoc #
pprNameSpace :: NameSpace -> SDoc #
isValNameSpace :: NameSpace -> Bool #
isVarNameSpace :: NameSpace -> Bool #
isTvNameSpace :: NameSpace -> Bool #
isTcClsNameSpace :: NameSpace -> Bool #
isDataConNameSpace :: NameSpace -> Bool #
Instances
| Eq NameSpace | |
| Ord NameSpace | |
| Binary NameSpace | |
class HasOccName name where #
Other names in the compiler add additional information to an OccName. This class provides a consistent way to access the underlying OccName.
Instances
| HasOccName HoleFitCandidate | |
Defined in TcHoleFitTypes Methods occName :: HoleFitCandidate -> OccName # | |
| HasOccName TcBinder | |
| HasOccName IfaceDecl | |
| HasOccName IfaceClassOp | |
Defined in IfaceSyn Methods occName :: IfaceClassOp -> OccName # | |
| HasOccName IfaceConDecl | |
Defined in IfaceSyn Methods occName :: IfaceConDecl -> OccName # | |
| HasOccName RdrName | |
| HasOccName Var | |
| HasOccName OccName | |
| HasOccName Name | |
| HasOccName name => HasOccName (IEWrappedName name) | |
Defined in GHC.Hs.ImpExp Methods occName :: IEWrappedName name -> OccName # | |
Instances
| Data a => Data (OccEnv a) | |
Defined in OccName Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> OccEnv a -> c (OccEnv a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (OccEnv a) # toConstr :: OccEnv a -> Constr # dataTypeOf :: OccEnv a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (OccEnv a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (OccEnv a)) # gmapT :: (forall b. Data b => b -> b) -> OccEnv a -> OccEnv a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> OccEnv a -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> OccEnv a -> r # gmapQ :: (forall d. Data d => d -> u) -> OccEnv a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> OccEnv a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> OccEnv a -> m (OccEnv a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> OccEnv a -> m (OccEnv a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> OccEnv a -> m (OccEnv a) # | |
| Outputable a => Outputable (OccEnv a) | |
type TidyOccEnv = UniqFM Int #
emptyFilesToClean :: FilesToClean #
An empty FilesToClean
isBmi2Enabled :: DynFlags -> Bool #
isBmiEnabled :: DynFlags -> Bool #
isAvx512pfEnabled :: DynFlags -> Bool #
isAvx512fEnabled :: DynFlags -> Bool #
isAvx512erEnabled :: DynFlags -> Bool #
isAvx512cdEnabled :: DynFlags -> Bool #
isAvx2Enabled :: DynFlags -> Bool #
isAvxEnabled :: DynFlags -> Bool #
isSse4_2Enabled :: DynFlags -> Bool #
isSse2Enabled :: DynFlags -> Bool #
isSseEnabled :: DynFlags -> Bool #
setUnsafeGlobalDynFlags :: DynFlags -> IO () #
tARGET_MAX_WORD :: DynFlags -> Integer #
tARGET_MAX_INT :: DynFlags -> Integer #
tARGET_MIN_INT :: DynFlags -> Integer #
mAX_PTR_TAG :: DynFlags -> Int #
wordAlignment :: DynFlags -> Alignment #
wORD_SIZE_IN_BITS :: DynFlags -> Int #
bLOCK_SIZE_W :: DynFlags -> Int #
iLDV_STATE_USE :: DynFlags -> Integer #
iLDV_STATE_CREATE :: DynFlags -> Integer #
iLDV_CREATE_MASK :: DynFlags -> Integer #
dYNAMIC_BY_DEFAULT :: DynFlags -> Bool #
wORDS_BIGENDIAN :: DynFlags -> Bool #
bITMAP_BITS_SHIFT :: DynFlags -> Int #
cLONG_LONG_SIZE :: DynFlags -> Int #
cLONG_SIZE :: DynFlags -> Int #
dOUBLE_SIZE :: DynFlags -> Int #
aP_STACK_SPLIM :: DynFlags -> Int #
rESERVED_STACK_WORDS :: DynFlags -> Int #
rESERVED_C_STACK_BYTES :: DynFlags -> Int #
mAX_Real_Long_REG :: DynFlags -> Int #
mAX_Real_XMM_REG :: DynFlags -> Int #
mAX_Real_Double_REG :: DynFlags -> Int #
mAX_Real_Float_REG :: DynFlags -> Int #
mAX_Real_Vanilla_REG :: DynFlags -> Int #
mAX_XMM_REG :: DynFlags -> Int #
mAX_Long_REG :: DynFlags -> Int #
mAX_Double_REG :: DynFlags -> Int #
mAX_Float_REG :: DynFlags -> Int #
mAX_Vanilla_REG :: DynFlags -> Int #
mUT_ARR_PTRS_CARD_BITS :: DynFlags -> Int #
mAX_CHARLIKE :: DynFlags -> Int #
mIN_CHARLIKE :: DynFlags -> Int #
mAX_INTLIKE :: DynFlags -> Int #
mIN_INTLIKE :: DynFlags -> Int #
mIN_PAYLOAD_SIZE :: DynFlags -> Int #
mAX_SPEC_AP_SIZE :: DynFlags -> Int #
mAX_SPEC_SELECTEE_SIZE :: DynFlags -> Int #
oFFSET_StgStack_stack :: DynFlags -> Int #
oFFSET_StgStack_sp :: DynFlags -> Int #
oFFSET_StgTSO_stackobj :: DynFlags -> Int #
oFFSET_StgTSO_cccs :: DynFlags -> Int #
oFFSET_StgArrBytes_bytes :: DynFlags -> Int #
sIZEOF_StgArrBytes_NoHdr :: DynFlags -> Int #
sIZEOF_StgSMPThunkHeader :: DynFlags -> Int #
oFFSET_StgHeader_ldvw :: DynFlags -> Int #
oFFSET_StgHeader_ccs :: DynFlags -> Int #
sIZEOF_CostCentreStack :: DynFlags -> Int #
oFFSET_bdescr_flags :: DynFlags -> Int #
oFFSET_bdescr_blocks :: DynFlags -> Int #
oFFSET_bdescr_free :: DynFlags -> Int #
oFFSET_bdescr_start :: DynFlags -> Int #
oFFSET_Capability_r :: DynFlags -> Int #
oFFSET_stgGCFun :: DynFlags -> Int #
oFFSET_stgGCEnter1 :: DynFlags -> Int #
oFFSET_StgRegTable_rCCCS :: DynFlags -> Int #
oFFSET_StgRegTable_rHp :: DynFlags -> Int #
oFFSET_StgRegTable_rSp :: DynFlags -> Int #
oFFSET_StgRegTable_rL1 :: DynFlags -> Int #
oFFSET_StgRegTable_rZMM6 :: DynFlags -> Int #
oFFSET_StgRegTable_rZMM5 :: DynFlags -> Int #
oFFSET_StgRegTable_rZMM4 :: DynFlags -> Int #
oFFSET_StgRegTable_rZMM3 :: DynFlags -> Int #
oFFSET_StgRegTable_rZMM2 :: DynFlags -> Int #
oFFSET_StgRegTable_rZMM1 :: DynFlags -> Int #
oFFSET_StgRegTable_rYMM6 :: DynFlags -> Int #
oFFSET_StgRegTable_rYMM5 :: DynFlags -> Int #
oFFSET_StgRegTable_rYMM4 :: DynFlags -> Int #
oFFSET_StgRegTable_rYMM3 :: DynFlags -> Int #
oFFSET_StgRegTable_rYMM2 :: DynFlags -> Int #
oFFSET_StgRegTable_rYMM1 :: DynFlags -> Int #
oFFSET_StgRegTable_rXMM6 :: DynFlags -> Int #
oFFSET_StgRegTable_rXMM5 :: DynFlags -> Int #
oFFSET_StgRegTable_rXMM4 :: DynFlags -> Int #
oFFSET_StgRegTable_rXMM3 :: DynFlags -> Int #
oFFSET_StgRegTable_rXMM2 :: DynFlags -> Int #
oFFSET_StgRegTable_rXMM1 :: DynFlags -> Int #
oFFSET_StgRegTable_rD6 :: DynFlags -> Int #
oFFSET_StgRegTable_rD5 :: DynFlags -> Int #
oFFSET_StgRegTable_rD4 :: DynFlags -> Int #
oFFSET_StgRegTable_rD3 :: DynFlags -> Int #
oFFSET_StgRegTable_rD2 :: DynFlags -> Int #
oFFSET_StgRegTable_rD1 :: DynFlags -> Int #
oFFSET_StgRegTable_rF6 :: DynFlags -> Int #
oFFSET_StgRegTable_rF5 :: DynFlags -> Int #
oFFSET_StgRegTable_rF4 :: DynFlags -> Int #
oFFSET_StgRegTable_rF3 :: DynFlags -> Int #
oFFSET_StgRegTable_rF2 :: DynFlags -> Int #
oFFSET_StgRegTable_rF1 :: DynFlags -> Int #
oFFSET_StgRegTable_rR10 :: DynFlags -> Int #
oFFSET_StgRegTable_rR9 :: DynFlags -> Int #
oFFSET_StgRegTable_rR8 :: DynFlags -> Int #
oFFSET_StgRegTable_rR7 :: DynFlags -> Int #
oFFSET_StgRegTable_rR6 :: DynFlags -> Int #
oFFSET_StgRegTable_rR5 :: DynFlags -> Int #
oFFSET_StgRegTable_rR4 :: DynFlags -> Int #
oFFSET_StgRegTable_rR3 :: DynFlags -> Int #
oFFSET_StgRegTable_rR2 :: DynFlags -> Int #
oFFSET_StgRegTable_rR1 :: DynFlags -> Int #
tICKY_BIN_COUNT :: DynFlags -> Int #
bLOCKS_PER_MBLOCK :: DynFlags -> Int #
bLOCK_SIZE :: DynFlags -> Int #
pROF_HDR_SIZE :: DynFlags -> Int #
sTD_HDR_SIZE :: DynFlags -> Int #
cONTROL_GROUP_CONST_291 :: DynFlags -> Int #
compilerInfo :: DynFlags -> [(String, String)] #
setFlagsFromEnvFile :: FilePath -> String -> DynP () #
canonicalizeModuleIfHome :: DynFlags -> Module -> Module #
canonicalizeHomeModule :: DynFlags -> ModuleName -> Module #
Given a ModuleName of a signature in the home library, find
out how it is instantiated. E.g., the canonical form of
A in p[A=q[]:A] is q[]:A.
unSetGeneralFlag' :: GeneralFlag -> DynFlags -> DynFlags #
setGeneralFlag' :: GeneralFlag -> DynFlags -> DynFlags #
dynamicGhc :: Bool #
rtsIsProfiled :: Bool #
Was the runtime system built with profiling enabled?
glasgowExtsFlags :: [Extension] #
warningHierarchies :: [[String]] #
Warning group hierarchies, where there is an explicit inclusion relation.
Each inner list is a hierarchy of warning groups, ordered from smallest to largest, where each group is a superset of the one before it.
Separating this from warningGroups allows for multiple
hierarchies with no inherent relation to be defined.
The special-case Weverything group is not included.
warningGroups :: [(String, [WarningFlag])] #
Warning groups.
As all warnings are in the Weverything set, it is ignored when displaying to the user which group a warning is in.
fLangFlags :: [FlagSpec Extension] #
These -f<blah> flags can all be reversed with -fno-<blah>
fFlags :: [FlagSpec GeneralFlag] #
These -f<blah> flags can all be reversed with -fno-<blah>
wWarningFlags :: [FlagSpec WarningFlag] #
These -W<blah> flags can all be reversed with -Wno-<blah>
flagsForCompletion :: Bool -> [String] #
Make a list of flags for shell completion. Filter all available flags into two groups, for interactive GHC vs all other.
flagsPackage :: [Flag (CmdLineP DynFlags)] #
flagsDynamic :: [Flag (CmdLineP DynFlags)] #
allNonDeprecatedFlags :: [String] #
All dynamic flags option strings without the deprecated ones. These are the user facing strings for enabling and disabling options.
updateWays :: DynFlags -> DynFlags #
putLogMsg :: DynFlags -> WarnReason -> Severity -> SrcSpan -> PprStyle -> MsgDoc -> IO () #
Write an error or warning to the LogOutput.
Arguments
| :: MonadIO m | |
| => [Flag (CmdLineP DynFlags)] | valid flags to match against |
| -> Bool | are the arguments from the command line? |
| -> DynFlags | current dynamic flags |
| -> [Located String] | arguments to parse |
| -> m (DynFlags, [Located String], [Warn]) |
Parses the dynamically set flags for GHC. This is the most general form of the dynamic flag parser that the other methods simply wrap. It allows saying which flags are valid flags and indicating if we are parsing arguments from the command line or from a file pragma.
Arguments
| :: MonadIO m | |
| => DynFlags | |
| -> [Located String] | |
| -> m (DynFlags, [Located String], [Warn]) | Updated |
Like parseDynamicFlagsCmdLine but does not allow the package flags
(-package, -hide-package, -ignore-package, -hide-all-packages, -package-db).
Used to parse flags set in a modules pragma.
Arguments
| :: MonadIO m | |
| => DynFlags | |
| -> [Located String] | |
| -> m (DynFlags, [Located String], [Warn]) | Updated |
Parse dynamic flags from a list of command line arguments. Returns
the parsed DynFlags, the left-over arguments, and a list of warnings.
Throws a UsageError if errors occurred during parsing (such as unknown
flags or missing arguments).
updOptLevel :: Int -> DynFlags -> DynFlags #
Sets the DynFlags to be appropriate to the optimisation level
addPluginModuleName :: String -> DynFlags -> DynFlags #
thisPackage :: DynFlags -> UnitId #
thisUnitIdInsts :: DynFlags -> [(ModuleName, Module)] #
thisComponentId :: DynFlags -> ComponentId #
getVerbFlags :: DynFlags -> [String] #
Gets the verbosity flag for the current verbosity level. This is fed to
other tools, so GHC-specific verbosity flags like -ddump-most are not included
Arguments
| :: DynFlags |
|
| -> (DynFlags -> [a]) | Relevant record accessor: one of the |
| -> [a] | Correctly ordered extracted options |
Retrieve the options corresponding to a particular opt_* field in the correct order
unsafeFlagsForInfer :: [(String, DynFlags -> SrcSpan, DynFlags -> Bool, DynFlags -> DynFlags)] #
A list of unsafe flags under Safe Haskell. Tuple elements are: * name of the flag * function to get srcspan that enabled the flag * function to test if the flag is on * function to turn the flag off
unsafeFlags :: [(String, DynFlags -> SrcSpan, DynFlags -> Bool, DynFlags -> DynFlags)] #
A list of unsafe flags under Safe Haskell. Tuple elements are: * name of the flag * function to get srcspan that enabled the flag * function to test if the flag is on * function to turn the flag off
safeImplicitImpsReq :: DynFlags -> Bool #
Are all implicit imports required to be safe for this Safe Haskell mode? Implicit imports are things in the prelude. e.g System.IO when print is used.
safeDirectImpsReq :: DynFlags -> Bool #
Are all direct imports required to be safe for this Safe Haskell mode? Direct imports are when the code explicitly imports a module
safeImportsOn :: DynFlags -> Bool #
Test if Safe Imports are on in some form
safeInferOn :: DynFlags -> Bool #
Is the Safe Haskell safe inference mode active
safeLanguageOn :: DynFlags -> Bool #
Is the Safe Haskell safe language in use
safeHaskellModeEnabled :: DynFlags -> Bool #
safeHaskellOn :: DynFlags -> Bool #
Is Safe Haskell on in some way (including inference mode)
packageTrustOn :: DynFlags -> Bool #
Is the -fpackage-trust mode on
dynFlagDependencies :: DynFlags -> [ModuleName] #
Some modules have dependencies on others through the DynFlags rather than textual imports
xopt_set_unlessExplSpec :: Extension -> (DynFlags -> Extension -> DynFlags) -> DynFlags -> DynFlags #
Set or unset a Extension, unless it has been explicitly
set or unset before.
wopt_unset_fatal :: DynFlags -> WarningFlag -> DynFlags #
Mark a WarningFlag as not fatal
wopt_set_fatal :: DynFlags -> WarningFlag -> DynFlags #
Mark a WarningFlag as fatal (do not set the flag)
wopt_fatal :: WarningFlag -> DynFlags -> Bool #
Test whether a WarningFlag is set as fatal
wopt_unset :: DynFlags -> WarningFlag -> DynFlags #
Unset a WarningFlag
wopt_set :: DynFlags -> WarningFlag -> DynFlags #
Set a WarningFlag
wopt :: WarningFlag -> DynFlags -> Bool #
Test whether a WarningFlag is set
gopt_unset :: DynFlags -> GeneralFlag -> DynFlags #
Unset a GeneralFlag
gopt_set :: DynFlags -> GeneralFlag -> DynFlags #
Set a GeneralFlag
gopt :: GeneralFlag -> DynFlags -> Bool #
Test whether a GeneralFlag is set
hasNoOptCoercion :: DynFlags -> Bool #
hasNoStateHack :: DynFlags -> Bool #
languageExtensions :: Maybe Language -> [Extension] #
The language extensions implied by the various language variants.
When updating this be sure to update the flag documentation in
docsusers-guideglasgow_exts.rst.
defaultLogActionHPrintDoc :: DynFlags -> Handle -> SDoc -> PprStyle -> IO () #
Like defaultLogActionHPutStrDoc but appends an extra newline.
interpreterDynamic :: DynFlags -> Bool #
interpreterProfiled :: DynFlags -> Bool #
interpWays :: [Way] #
defaultWays :: Settings -> [Way] #
defaultDynFlags :: Settings -> LlvmConfig -> DynFlags #
initDynFlags :: DynFlags -> IO DynFlags #
dynamicOutputFile :: DynFlags -> FilePath -> FilePath #
Compute the path of the dynamic object corresponding to an object file.
whenCannotGenerateDynamicToo :: MonadIO m => DynFlags -> m () -> m () #
ifGeneratingDynamicToo :: MonadIO m => DynFlags -> m a -> m a -> m a #
whenGeneratingDynamicToo :: MonadIO m => DynFlags -> m () -> m () #
wayUnsetGeneralFlags :: Platform -> Way -> [GeneralFlag] #
wayGeneralFlags :: Platform -> Way -> [GeneralFlag] #
wayRTSOnly :: Way -> Bool #
mkBuildTag :: [Way] -> String #
positionIndependent :: DynFlags -> Bool #
Are we building with -fPIE or -fPIC enabled?
packageFlagsChanged :: DynFlags -> DynFlags -> Bool #
targetRetainsAllBindings :: HscTarget -> Bool #
Does this target retain *all* top-level bindings for a module, rather than just the exported bindings, in the TypeEnv and compiled code (if any)? In interpreted mode we do this, so that GHCi can call functions inside a module. In HscNothing mode we also do it, so that Haddock can get access to the GlobalRdrEnv for a module after typechecking it.
isObjectTarget :: HscTarget -> Bool #
Will this target result in an object file on the disk?
versionedFilePath :: DynFlags -> FilePath #
versionedAppDir :: DynFlags -> MaybeT IO FilePath #
The directory for this version of ghc in the user's app directory
(typically something like ~.ghcx86_64-linux-7.6.3)
tablesNextToCode :: DynFlags -> Bool #
opt_windres :: DynFlags -> [String] #
opt_P_signature :: DynFlags -> ([String], Fingerprint) #
pgm_ranlib :: DynFlags -> String #
pgm_libtool :: DynFlags -> String #
pgm_windres :: DynFlags -> String #
systemPackageConfig :: DynFlags -> FilePath #
extraGccViaCFlags :: DynFlags -> [String] #
ghciUsagePath :: DynFlags -> FilePath #
ghcUsagePath :: DynFlags -> FilePath #
projectVersion :: DynFlags -> String #
programName :: DynFlags -> String #
backendMaintainsCfg :: DynFlags -> Bool #
flattenIncludes :: IncludeSpecs -> [String] #
Concatenate and flatten the list of global and quoted includes returning just a flat list of paths.
addQuoteInclude :: IncludeSpecs -> [String] -> IncludeSpecs #
Append to the list of includes a path that shall be included using `-iquote` when the C compiler is called. These paths only apply when quoted includes are used. e.g. #include "foo.h"
addGlobalInclude :: IncludeSpecs -> [String] -> IncludeSpecs #
Append to the list of includes a path that shall be included using `-I` when the C compiler is called. These paths override system search paths.
data WarnReason #
Used when outputting warnings: if a reason is given, it is displayed. If a warning isn't controlled by a flag, this is made explicit at the point of use.
Constructors
| NoReason | |
| Reason !WarningFlag | Warning was enabled with the flag |
| ErrReason !(Maybe WarningFlag) | Warning was made an error because of -Werror or -Werror=WarningFlag |
Instances
| Show WarnReason | |
Defined in DynFlags Methods showsPrec :: Int -> WarnReason -> ShowS # show :: WarnReason -> String # showList :: [WarnReason] -> ShowS # | |
| ToJson WarnReason | |
Defined in DynFlags Methods json :: WarnReason -> JsonDoc # | |
| Outputable WarnReason | |
Defined in DynFlags | |
data IncludeSpecs #
Used to differentiate the scope an include needs to apply to. We have to split the include paths to avoid accidentally forcing recursive includes since -I overrides the system search paths. See #14312.
Constructors
| IncludeSpecs | |
Fields
| |
Instances
| Show IncludeSpecs | |
Defined in DynFlags Methods showsPrec :: Int -> IncludeSpecs -> ShowS # show :: IncludeSpecs -> String # showList :: [IncludeSpecs] -> ShowS # | |
data WarningFlag #
Constructors
Instances
| Enum WarningFlag | |
Defined in DynFlags Methods succ :: WarningFlag -> WarningFlag # pred :: WarningFlag -> WarningFlag # toEnum :: Int -> WarningFlag # fromEnum :: WarningFlag -> Int # enumFrom :: WarningFlag -> [WarningFlag] # enumFromThen :: WarningFlag -> WarningFlag -> [WarningFlag] # enumFromTo :: WarningFlag -> WarningFlag -> [WarningFlag] # enumFromThenTo :: WarningFlag -> WarningFlag -> WarningFlag -> [WarningFlag] # | |
| Eq WarningFlag | |
Defined in DynFlags | |
| Show WarningFlag | |
Defined in DynFlags Methods showsPrec :: Int -> WarningFlag -> ShowS # show :: WarningFlag -> String # showList :: [WarningFlag] -> ShowS # | |
Constructors
| Haskell98 | |
| Haskell2010 |
Instances
| Enum Language | |
| Eq Language | |
| Show Language | |
| Outputable Language | |
data SafeHaskellMode #
The various Safe Haskell modes
Constructors
| Sf_None | inferred unsafe |
| Sf_Unsafe | declared and checked |
| Sf_Trustworthy | declared and checked |
| Sf_Safe | declared and checked |
| Sf_SafeInferred | inferred as safe |
| Sf_Ignore |
|
Instances
| Eq SafeHaskellMode | |
Defined in DynFlags Methods (==) :: SafeHaskellMode -> SafeHaskellMode -> Bool # (/=) :: SafeHaskellMode -> SafeHaskellMode -> Bool # | |
| Show SafeHaskellMode | |
Defined in DynFlags Methods showsPrec :: Int -> SafeHaskellMode -> ShowS # show :: SafeHaskellMode -> String # showList :: [SafeHaskellMode] -> ShowS # | |
| Outputable SafeHaskellMode | |
Defined in DynFlags | |
data CfgWeights #
Edge weights to use when generating a CFG from CMM
Constructors
| CFGWeights | |
Fields
| |
class HasDynFlags (m :: Type -> Type) where #
Methods
getDynFlags :: m DynFlags #
Instances
| HasDynFlags Hsc | |
Defined in HscTypes Methods getDynFlags :: Hsc DynFlags # | |
| HasDynFlags CoreM | |
Defined in CoreMonad Methods | |
| ContainsDynFlags env => HasDynFlags (IOEnv env) | |
Defined in IOEnv Methods getDynFlags :: IOEnv env DynFlags # | |
| (Monad m, HasDynFlags m) => HasDynFlags (MaybeT m) | |
Defined in DynFlags Methods getDynFlags :: MaybeT m DynFlags # | |
| (Monoid a, Monad m, HasDynFlags m) => HasDynFlags (WriterT a m) | |
Defined in DynFlags Methods getDynFlags :: WriterT a m DynFlags # | |
| (Monad m, HasDynFlags m) => HasDynFlags (ReaderT a m) | |
Defined in DynFlags Methods getDynFlags :: ReaderT a m DynFlags # | |
| (Monad m, HasDynFlags m) => HasDynFlags (ExceptT e m) | |
Defined in DynFlags Methods getDynFlags :: ExceptT e m DynFlags # | |
class ContainsDynFlags t where #
Methods
extractDynFlags :: t -> DynFlags #
Instances
| ContainsDynFlags (Env gbl lcl) | |
Defined in TcRnTypes Methods extractDynFlags :: Env gbl lcl -> DynFlags # | |
Constructors
| NoProfAuto | no SCC annotations added |
| ProfAutoAll | top-level and nested functions are annotated |
| ProfAutoTop | top-level functions annotated only |
| ProfAutoExports | exported functions annotated only |
| ProfAutoCalls | annotate call-sites |
Instances
| Enum ProfAuto | |
| Eq ProfAuto | |
data LlvmTarget #
Constructors
| LlvmTarget | |
Fields
| |
data LlvmConfig #
See Note [LLVM Configuration] in SysTools.
Constructors
| LlvmConfig | |
Fields
| |
The target code type of the compilation (if any).
Whenever you change the target, also make sure to set ghcLink to
something sensible.
HscNothing can be used to avoid generating any output, however, note
that:
- If a program uses Template Haskell the typechecker may need to run code from an imported module. To facilitate this, code generation is enabled for modules imported by modules that use template haskell. See Note [-fno-code mode].
Constructors
| HscC | Generate C code. |
| HscAsm | Generate assembly using the native code generator. |
| HscLlvm | Generate assembly using the llvm code generator. |
| HscInterpreted | Generate bytecode. (Requires |
| HscNothing | Don't generate any code. See notes above. |
The GhcMode tells us whether we're doing multi-module
compilation (controlled via the GHC API) or one-shot
(single-module) compilation. This makes a difference primarily to
the Finder: in one-shot mode we look for interface files for
imported modules, but in multi-module mode we look for source files
in order to check whether they need to be recompiled.
Constructors
| CompManager |
|
| OneShot | ghc -c Foo.hs |
| MkDepend |
|
What to do in the link step, if there is one.
Constructors
| NoLink | Don't link at all |
| LinkBinary | Link object code into a binary |
| LinkInMemory | Use the in-memory dynamic linker (works for both bytecode and object code). |
| LinkDynLib | Link objects into a dynamic lib (DLL on Windows, DSO on ELF platforms) |
| LinkStaticLib | Link objects into a static lib |
data PackageArg #
We accept flags which make packages visible, but how they select the package varies; this data type reflects what selection criterion is used.
Constructors
| PackageArg String |
|
| UnitIdArg UnitId |
|
Instances
| Eq PackageArg | |
Defined in DynFlags | |
| Show PackageArg | |
Defined in DynFlags Methods showsPrec :: Int -> PackageArg -> ShowS # show :: PackageArg -> String # showList :: [PackageArg] -> ShowS # | |
| Outputable PackageArg | |
Defined in DynFlags | |
data ModRenaming #
Represents the renaming that may be associated with an exposed
package, e.g. the rns part of -package "foo (rns)".
Here are some example parsings of the package flags (where
a string literal is punned to be a ModuleName:
Constructors
| ModRenaming | |
Fields
| |
Instances
| Eq ModRenaming | |
Defined in DynFlags | |
| Outputable ModRenaming | |
Defined in DynFlags | |
newtype IgnorePackageFlag #
Flags for manipulating the set of non-broken packages.
Constructors
| IgnorePackage String | -ignore-package |
Instances
| Eq IgnorePackageFlag | |
Defined in DynFlags Methods (==) :: IgnorePackageFlag -> IgnorePackageFlag -> Bool # (/=) :: IgnorePackageFlag -> IgnorePackageFlag -> Bool # | |
Flags for manipulating package trust.
Constructors
| TrustPackage String | -trust |
| DistrustPackage String | -distrust |
data PackageFlag #
Flags for manipulating packages visibility.
Constructors
| ExposePackage String PackageArg ModRenaming |
|
| HidePackage String | -hide-package |
Instances
| Eq PackageFlag | |
Defined in DynFlags | |
| Outputable PackageFlag | |
Defined in DynFlags | |
data PackageDBFlag #
Instances
| Eq PackageDBFlag | |
Defined in DynFlags Methods (==) :: PackageDBFlag -> PackageDBFlag -> Bool # (/=) :: PackageDBFlag -> PackageDBFlag -> Bool # | |
data DynLibLoader #
Constructors
| Deployable | |
| SystemDependent |
Instances
| Eq DynLibLoader | |
Defined in DynFlags | |
data RtsOptsEnabled #
Instances
| Show RtsOptsEnabled | |
Defined in DynFlags Methods showsPrec :: Int -> RtsOptsEnabled -> ShowS # show :: RtsOptsEnabled -> String # showList :: [RtsOptsEnabled] -> ShowS # | |
Constructors
| WayCustom String | |
| WayThreaded | |
| WayDebug | |
| WayProf | |
| WayEventLog | |
| WayDyn |
type FatalMessager = String -> IO () #
Constructors
| FlagSpec | |
Fields
| |
data PkgConfRef #
Constructors
| GlobalPkgConf | |
| UserPkgConf | |
| PkgConfFile FilePath |
Instances
| Eq PkgConfRef | |
Defined in DynFlags | |
data LinkerInfo #
Constructors
| GnuLD [Option] | |
| GnuGold [Option] | |
| LlvmLLD [Option] | |
| DarwinLD [Option] | |
| SolarisLD [Option] | |
| AixLD [Option] | |
| UnknownLD |
Instances
| Eq LinkerInfo | |
Defined in DynFlags | |
data CompilerInfo #
Constructors
| GCC | |
| Clang | |
| AppleClang | |
| AppleClang51 | |
| UnknownCC |
Instances
| Eq CompilerInfo | |
Defined in DynFlags | |
data FilesToClean #
A collection of files that must be deleted before ghc exits.
The current collection
is stored in an IORef in DynFlags, filesToClean.
Constructors
| FilesToClean | |
Fields
| |
isHsigFile :: HscSource -> Bool #
isHsBootOrSig :: HscSource -> Bool #
hscSourceString :: HscSource -> String #
Constructors
| HsSrcFile | |
| HsBootFile | |
| HsigFile |
Instances
| Eq HscSource | |
| Ord HscSource | |
| Show HscSource | |
| Binary HscSource | |
packageConfigId :: PackageConfig -> UnitId #
installedPackageConfigId :: PackageConfig -> InstalledUnitId #
Get the GHC UnitId right out of a Cabalish PackageConfig
pprPackageConfig :: PackageConfig -> SDoc #
type PackageConfig = InstalledPackageInfo ComponentId SourcePackageId PackageName InstalledUnitId UnitId ModuleName Module #
newtype SourcePackageId #
Constructors
| SourcePackageId FastString |
Instances
| Eq SourcePackageId | |
Defined in PackageConfig Methods (==) :: SourcePackageId -> SourcePackageId -> Bool # (/=) :: SourcePackageId -> SourcePackageId -> Bool # | |
| Ord SourcePackageId | |
Defined in PackageConfig Methods compare :: SourcePackageId -> SourcePackageId -> Ordering # (<) :: SourcePackageId -> SourcePackageId -> Bool # (<=) :: SourcePackageId -> SourcePackageId -> Bool # (>) :: SourcePackageId -> SourcePackageId -> Bool # (>=) :: SourcePackageId -> SourcePackageId -> Bool # max :: SourcePackageId -> SourcePackageId -> SourcePackageId # min :: SourcePackageId -> SourcePackageId -> SourcePackageId # | |
| Uniquable SourcePackageId | |
Defined in PackageConfig Methods getUnique :: SourcePackageId -> Unique # | |
| Outputable SourcePackageId | |
Defined in PackageConfig | |
| BinaryStringRep SourcePackageId | |
Defined in PackageConfig Methods | |
newtype PackageName #
Constructors
| PackageName FastString |
Instances
| Eq PackageName | |
Defined in PackageConfig | |
| Ord PackageName | |
Defined in PackageConfig Methods compare :: PackageName -> PackageName -> Ordering # (<) :: PackageName -> PackageName -> Bool # (<=) :: PackageName -> PackageName -> Bool # (>) :: PackageName -> PackageName -> Bool # (>=) :: PackageName -> PackageName -> Bool # max :: PackageName -> PackageName -> PackageName # min :: PackageName -> PackageName -> PackageName # | |
| Uniquable PackageName | |
Defined in PackageConfig Methods getUnique :: PackageName -> Unique # | |
| Outputable PackageName | |
Defined in PackageConfig | |
| BinaryStringRep PackageName | |
Defined in PackageConfig | |
unitModuleSet :: Module -> ModuleSet #
unionModuleSet :: ModuleSet -> ModuleSet -> ModuleSet #
delModuleSet :: ModuleSet -> Module -> ModuleSet #
minusModuleSet :: ModuleSet -> ModuleSet -> ModuleSet #
intersectModuleSet :: ModuleSet -> ModuleSet -> ModuleSet #
elemModuleSet :: Module -> ModuleSet -> Bool #
moduleSetElts :: ModuleSet -> [Module] #
extendModuleSetList :: ModuleSet -> [Module] -> ModuleSet #
extendModuleSet :: ModuleSet -> Module -> ModuleSet #
mkModuleSet :: [Module] -> ModuleSet #
isEmptyModuleEnv :: ModuleEnv a -> Bool #
unitModuleEnv :: Module -> a -> ModuleEnv a #
moduleEnvToList :: ModuleEnv a -> [(Module, a)] #
moduleEnvElts :: ModuleEnv a -> [a] #
moduleEnvKeys :: ModuleEnv a -> [Module] #
emptyModuleEnv :: ModuleEnv a #
mkModuleEnv :: [(Module, a)] -> ModuleEnv a #
mapModuleEnv :: (a -> b) -> ModuleEnv a -> ModuleEnv b #
lookupWithDefaultModuleEnv :: ModuleEnv a -> a -> Module -> a #
lookupModuleEnv :: ModuleEnv a -> Module -> Maybe a #
plusModuleEnv :: ModuleEnv a -> ModuleEnv a -> ModuleEnv a #
delModuleEnv :: ModuleEnv a -> Module -> ModuleEnv a #
delModuleEnvList :: ModuleEnv a -> [Module] -> ModuleEnv a #
plusModuleEnv_C :: (a -> a -> a) -> ModuleEnv a -> ModuleEnv a -> ModuleEnv a #
extendModuleEnvList_C :: (a -> a -> a) -> ModuleEnv a -> [(Module, a)] -> ModuleEnv a #
extendModuleEnvList :: ModuleEnv a -> [(Module, a)] -> ModuleEnv a #
extendModuleEnvWith :: (a -> a -> a) -> ModuleEnv a -> Module -> a -> ModuleEnv a #
extendModuleEnv :: ModuleEnv a -> Module -> a -> ModuleEnv a #
elemModuleEnv :: Module -> ModuleEnv a -> Bool #
wiredInUnitIds :: [UnitId] #
isHoleModule :: Module -> Bool #
isInteractiveModule :: Module -> Bool #
mainUnitId :: UnitId #
This is the package Id for the current program. It is the default package Id if you don't specify a package name. We don't add this prefix to symbol names, since there can be only one main package per program.
thisGhcUnitId :: UnitId #
baseUnitId :: UnitId #
integerUnitId :: UnitId #
primUnitId :: UnitId #
parseModSubst :: ReadP [(ModuleName, Module)] #
parseUnitId :: ReadP UnitId #
splitUnitIdInsts :: UnitId -> (InstalledUnitId, Maybe IndefUnitId) #
See splitModuleInsts.
splitModuleInsts :: Module -> (InstalledModule, Maybe IndefModule) #
Given a possibly on-the-fly instantiated module, split it into
a Module that we definitely can find on-disk, as well as an
instantiation if we need to instantiate it on the fly. If the
instantiation is Nothing no on-the-fly renaming is needed.
renameHoleUnitId' :: PackageConfigMap -> ShHoleSubst -> UnitId -> UnitId #
Like 'renameHoleUnitId, but requires only PackageConfigMap
so it can be used by Packages.
renameHoleModule' :: PackageConfigMap -> ShHoleSubst -> Module -> Module #
Like renameHoleModule, but requires only PackageConfigMap
so it can be used by Packages.
renameHoleUnitId :: DynFlags -> ShHoleSubst -> UnitId -> UnitId #
renameHoleModule :: DynFlags -> ShHoleSubst -> Module -> Module #
stringToUnitId :: String -> UnitId #
fsToUnitId :: FastString -> UnitId #
Create a new simple unit identifier from a FastString. Internally,
this is primarily used to specify wired-in unit identifiers.
newSimpleUnitId :: ComponentId -> UnitId #
Create a new simple unit identifier (no holes) from a ComponentId.
stableUnitIdCmp :: UnitId -> UnitId -> Ordering #
Compares package ids lexically, rather than by their Uniques
newUnitId :: ComponentId -> [(ModuleName, Module)] -> UnitId #
Create a new, un-hashed unit identifier.
hashUnitId :: ComponentId -> [(ModuleName, Module)] -> FastString #
Generate a uniquely identifying FastString for a unit
identifier. This is a one-way function. You can rely on one special
property: if a unit identifier is in most general form, its FastString
coincides with its ComponentId. This hash is completely internal
to GHC and is not used for symbol names or file paths.
unitIdIsDefinite :: UnitId -> Bool #
A UnitId is definite if it has no free holes.
unitIdFreeHoles :: UnitId -> UniqDSet ModuleName #
Retrieve the set of free holes of a UnitId.
filterInstalledModuleEnv :: (InstalledModule -> a -> Bool) -> InstalledModuleEnv a -> InstalledModuleEnv a #
extendInstalledModuleEnv :: InstalledModuleEnv a -> InstalledModule -> a -> InstalledModuleEnv a #
lookupInstalledModuleEnv :: InstalledModuleEnv a -> InstalledModule -> Maybe a #
installedUnitIdEq :: InstalledUnitId -> UnitId -> Bool #
Test if a UnitId corresponds to a given InstalledUnitId,
modulo instantiation.
installedModuleEq :: InstalledModule -> Module -> Bool #
Test if a Module corresponds to a given InstalledModule,
modulo instantiation.
toInstalledUnitId :: UnitId -> InstalledUnitId #
Lossy conversion to the on-disk InstalledUnitId for a component.
indefModuleToModule :: DynFlags -> IndefModule -> Module #
Injects an IndefModule to Module (see also
indefUnitIdToUnitId.
indefUnitIdToUnitId :: DynFlags -> IndefUnitId -> UnitId #
Injects an IndefUnitId (indefinite library which
was on-the-fly instantiated) to a UnitId (either
an indefinite or definite library).
newIndefUnitId :: ComponentId -> [(ModuleName, Module)] -> IndefUnitId #
Create a new IndefUnitId given an explicit module substitution.
unitIdFS :: UnitId -> FastString #
mkModule :: UnitId -> ModuleName -> Module #
stableModuleCmp :: Module -> Module -> Ordering #
This gives a stable ordering, as opposed to the Ord instance which
gives an ordering based on the Uniques of the components, which may
not be stable from run to run of the compiler.
mkHoleModule :: ModuleName -> Module #
Create a module variable at some ModuleName.
See Note [Representation of module/name variables]
moduleIsDefinite :: Module -> Bool #
A Module is definite if it has no free holes.
moduleFreeHoles :: Module -> UniqDSet ModuleName #
Calculate the free holes of a Module. If this set is non-empty,
this module was defined in an indefinite library that had required
signatures.
If a module has free holes, that means that substitutions can operate on it; if it has no free holes, substituting over a module has no effect.
moduleNameColons :: ModuleName -> String #
Returns the string version of the module name, with dots replaced by colons.
moduleNameSlashes :: ModuleName -> String #
Returns the string version of the module name, with dots replaced by slashes.
mkModuleNameFS :: FastString -> ModuleName #
mkModuleName :: String -> ModuleName #
moduleStableString :: Module -> String #
Get a string representation of a Module that's unique and stable
across recompilations.
eg. "$aeson_70dylHtv1FFGeai1IoxcQr$Data.Aeson.Types.Internal"
moduleNameString :: ModuleName -> String #
moduleNameFS :: ModuleName -> FastString #
pprModuleName :: ModuleName -> SDoc #
stableModuleNameCmp :: ModuleName -> ModuleName -> Ordering #
Compares module names lexically, rather than by their Uniques
addBootSuffixLocnOut :: ModLocation -> ModLocation #
Add the -boot suffix to all output file paths associated with the
module, not including the input file itself
addBootSuffixLocn :: ModLocation -> ModLocation #
Add the -boot suffix to all file paths associated with the module
addBootSuffix_maybe :: Bool -> FilePath -> FilePath #
Add the -boot suffix if the Bool argument is True
addBootSuffix :: FilePath -> FilePath #
Add the -boot suffix to .hs, .hi and .o files
data ModLocation #
Module Location
Where a module lives on the file system: the actual locations of the .hs, .hi and .o files, if we have them
Constructors
| ModLocation | |
Fields
| |
Instances
| Show ModLocation | |
Defined in Module Methods showsPrec :: Int -> ModLocation -> ShowS # show :: ModLocation -> String # showList :: [ModLocation] -> ShowS # | |
| Outputable ModLocation | |
Defined in Module | |
class ContainsModule t where #
Methods
extractModule :: t -> Module #
Instances
| ContainsModule DsGblEnv | |
Defined in TcRnTypes Methods extractModule :: DsGblEnv -> Module # | |
| ContainsModule TcGblEnv | |
Defined in TcRnTypes Methods extractModule :: TcGblEnv -> Module # | |
| ContainsModule gbl => ContainsModule (Env gbl lcl) | |
Defined in TcRnTypes Methods extractModule :: Env gbl lcl -> Module # | |
data IndefUnitId #
A unit identifier which identifies an indefinite
library (with holes) that has been *on-the-fly* instantiated
with a substitution indefUnitIdInsts. In fact, an indefinite
unit identifier could have no holes, but we haven't gotten
around to compiling the actual library yet.
An indefinite unit identifier pretty-prints to something like
p[H=H,A=aimpl:A>] (p is the ComponentId, and the
brackets enclose the module substitution).
Constructors
| IndefUnitId | |
Fields
| |
Instances
| Eq IndefUnitId | |
Defined in Module | |
| Ord IndefUnitId | |
Defined in Module Methods compare :: IndefUnitId -> IndefUnitId -> Ordering # (<) :: IndefUnitId -> IndefUnitId -> Bool # (<=) :: IndefUnitId -> IndefUnitId -> Bool # (>) :: IndefUnitId -> IndefUnitId -> Bool # (>=) :: IndefUnitId -> IndefUnitId -> Bool # max :: IndefUnitId -> IndefUnitId -> IndefUnitId # min :: IndefUnitId -> IndefUnitId -> IndefUnitId # | |
| Binary IndefUnitId | |
Defined in Module Methods put_ :: BinHandle -> IndefUnitId -> IO () # put :: BinHandle -> IndefUnitId -> IO (Bin IndefUnitId) # get :: BinHandle -> IO IndefUnitId # | |
| Outputable IndefUnitId | |
Defined in Module | |
data IndefModule #
Constructors
| IndefModule | |
Fields | |
Instances
| Eq IndefModule | |
Defined in Module | |
| Ord IndefModule | |
Defined in Module Methods compare :: IndefModule -> IndefModule -> Ordering # (<) :: IndefModule -> IndefModule -> Bool # (<=) :: IndefModule -> IndefModule -> Bool # (>) :: IndefModule -> IndefModule -> Bool # (>=) :: IndefModule -> IndefModule -> Bool # max :: IndefModule -> IndefModule -> IndefModule # min :: IndefModule -> IndefModule -> IndefModule # | |
| Outputable IndefModule | |
Defined in Module | |
data InstalledModule #
A InstalledModule is a Module which contains a InstalledUnitId.
Constructors
| InstalledModule | |
Fields | |
Instances
| Eq InstalledModule | |
Defined in Module Methods (==) :: InstalledModule -> InstalledModule -> Bool # (/=) :: InstalledModule -> InstalledModule -> Bool # | |
| Ord InstalledModule | |
Defined in Module Methods compare :: InstalledModule -> InstalledModule -> Ordering # (<) :: InstalledModule -> InstalledModule -> Bool # (<=) :: InstalledModule -> InstalledModule -> Bool # (>) :: InstalledModule -> InstalledModule -> Bool # (>=) :: InstalledModule -> InstalledModule -> Bool # max :: InstalledModule -> InstalledModule -> InstalledModule # min :: InstalledModule -> InstalledModule -> InstalledModule # | |
| Outputable InstalledModule | |
Defined in Module | |
A DefUnitId is an InstalledUnitId with the invariant that
it only refers to a definite library; i.e., one we have generated
code for.
Constructors
| DefUnitId | |
Fields | |
Instances
| Eq DefUnitId | |
| Ord DefUnitId | |
| Binary DefUnitId | |
| Outputable DefUnitId | |
data InstalledModuleEnv elt #
A map keyed off of InstalledModule
type ShHoleSubst = ModuleNameEnv Module #
Substitution on module variables, mapping module names to module identifiers.
type ModuleNameEnv elt = UniqFM elt #
A map keyed off of ModuleNames (actually, their Uniques)
type DModuleNameEnv elt = UniqDFM elt #
A map keyed off of ModuleNames (actually, their Uniques)
Has deterministic folds and can be deterministically converted to a list
mkFsEnv :: [(FastString, a)] -> FastStringEnv a #
lookupFsEnv :: FastStringEnv a -> FastString -> Maybe a #
extendFsEnv :: FastStringEnv a -> FastString -> a -> FastStringEnv a #
emptyFsEnv :: FastStringEnv a #
type FastStringEnv a = UniqFM a #
A non-deterministic set of FastStrings. See Note [Deterministic UniqFM] in UniqDFM for explanation why it's not deterministic and why it matters. Use DFastStringEnv if the set eventually gets converted into a list or folded over in a way where the order changes the generated code.
pprUniqSet :: (a -> SDoc) -> UniqSet a -> SDoc #
unsafeUFMToUniqSet :: UniqFM a -> UniqSet a #
unsafeUFMToUniqSet converts a into a UniqFM a
assuming, without checking, that it maps each UniqSet aUnique to a value
that has that Unique. See Note [UniqSet invariant].
getUniqSet :: UniqSet a -> UniqFM a #
mapUniqSet :: Uniquable b => (a -> b) -> UniqSet a -> UniqSet b #
nonDetFoldUniqSet_Directly :: (Unique -> elt -> a -> a) -> a -> UniqSet elt -> a #
nonDetFoldUniqSet :: (elt -> a -> a) -> a -> UniqSet elt -> a #
nonDetKeysUniqSet :: UniqSet elt -> [Unique] #
nonDetEltsUniqSet :: UniqSet elt -> [elt] #
lookupUniqSet_Directly :: UniqSet a -> Unique -> Maybe a #
lookupUniqSet :: Uniquable a => UniqSet b -> a -> Maybe b #
isEmptyUniqSet :: UniqSet a -> Bool #
sizeUniqSet :: UniqSet a -> Int #
uniqSetAll :: (a -> Bool) -> UniqSet a -> Bool #
uniqSetAny :: (a -> Bool) -> UniqSet a -> Bool #
filterUniqSet :: (a -> Bool) -> UniqSet a -> UniqSet a #
elemUniqSet_Directly :: Unique -> UniqSet a -> Bool #
elementOfUniqSet :: Uniquable a => a -> UniqSet a -> Bool #
uniqSetMinusUFM :: UniqSet a -> UniqFM b -> UniqSet a #
restrictUniqSetToUFM :: UniqSet a -> UniqFM b -> UniqSet a #
intersectUniqSets :: UniqSet a -> UniqSet a -> UniqSet a #
minusUniqSet :: UniqSet a -> UniqSet a -> UniqSet a #
unionManyUniqSets :: [UniqSet a] -> UniqSet a #
unionUniqSets :: UniqSet a -> UniqSet a -> UniqSet a #
delListFromUniqSet_Directly :: UniqSet a -> [Unique] -> UniqSet a #
delListFromUniqSet :: Uniquable a => UniqSet a -> [a] -> UniqSet a #
delOneFromUniqSet_Directly :: UniqSet a -> Unique -> UniqSet a #
delOneFromUniqSet :: Uniquable a => UniqSet a -> a -> UniqSet a #
addListToUniqSet :: Uniquable a => UniqSet a -> [a] -> UniqSet a #
addOneToUniqSet :: Uniquable a => UniqSet a -> a -> UniqSet a #
unitUniqSet :: Uniquable a => a -> UniqSet a #
emptyUniqSet :: UniqSet a #
Instances
| Eq (UniqSet a) | |
| Data a => Data (UniqSet a) | |
Defined in UniqSet Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UniqSet a -> c (UniqSet a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (UniqSet a) # toConstr :: UniqSet a -> Constr # dataTypeOf :: UniqSet a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (UniqSet a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (UniqSet a)) # gmapT :: (forall b. Data b => b -> b) -> UniqSet a -> UniqSet a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UniqSet a -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UniqSet a -> r # gmapQ :: (forall d. Data d => d -> u) -> UniqSet a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> UniqSet a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> UniqSet a -> m (UniqSet a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UniqSet a -> m (UniqSet a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UniqSet a -> m (UniqSet a) # | |
| Semigroup (UniqSet a) | |
| Monoid (UniqSet a) | |
| Outputable a => Outputable (UniqSet a) | |
pluralUFM :: UniqFM a -> SDoc #
Determines the pluralisation suffix appropriate for the length of a set in the same way that plural from Outputable does for lists.
Arguments
| :: UniqFM a | The things to be pretty printed |
| -> ([(Unique, a)] -> SDoc) | The pretty printing function to use on the elements |
| -> SDoc |
|
Pretty-print a non-deterministic set. The order of variables is non-deterministic and for pretty-printing that shouldn't be a problem. Having this function helps contain the non-determinism created with nonDetUFMToList.
Arguments
| :: UniqFM a | The things to be pretty printed |
| -> ([a] -> SDoc) | The pretty printing function to use on the elements |
| -> SDoc |
|
Pretty-print a non-deterministic set. The order of variables is non-deterministic and for pretty-printing that shouldn't be a problem. Having this function helps contain the non-determinism created with nonDetEltsUFM.
equalKeysUFM :: UniqFM a -> UniqFM b -> Bool #
ufmToIntMap :: UniqFM elt -> IntMap elt #
nonDetUFMToList :: UniqFM elt -> [(Unique, elt)] #
nonDetFoldUFM_Directly :: (Unique -> elt -> a -> a) -> a -> UniqFM elt -> a #
nonDetFoldUFM :: (elt -> a -> a) -> a -> UniqFM elt -> a #
nonDetKeysUFM :: UniqFM elt -> [Unique] #
nonDetEltsUFM :: UniqFM elt -> [elt] #
seqEltsUFM :: ([elt] -> ()) -> UniqFM elt -> () #
ufmToSet_Directly :: UniqFM elt -> IntSet #
lookupWithDefaultUFM_Directly :: UniqFM elt -> elt -> Unique -> elt #
lookupWithDefaultUFM :: Uniquable key => UniqFM elt -> elt -> key -> elt #
lookupUFM_Directly :: UniqFM elt -> Unique -> Maybe elt #
elemUFM_Directly :: Unique -> UniqFM elt -> Bool #
mapUFM_Directly :: (Unique -> elt1 -> elt2) -> UniqFM elt1 -> UniqFM elt2 #
disjointUFM :: UniqFM elt1 -> UniqFM elt2 -> Bool #
intersectUFM_C :: (elt1 -> elt2 -> elt3) -> UniqFM elt1 -> UniqFM elt2 -> UniqFM elt3 #
intersectUFM :: UniqFM elt1 -> UniqFM elt2 -> UniqFM elt1 #
plusUFMList :: [UniqFM elt] -> UniqFM elt #
plusUFM_CD :: (elt -> elt -> elt) -> UniqFM elt -> elt -> UniqFM elt -> elt -> UniqFM elt #
`plusUFM_CD f m1 d1 m2 d2` merges the maps using f as the
combinding function and d1 resp. d2 as the default value if
there is no entry in m1 reps. m2. The domain is the union of
the domains of m1 and m2.
Representative example:
plusUFM_CD f {A: 1, B: 2} 23 {B: 3, C: 4} 42
== {A: f 1 42, B: f 2 3, C: f 23 4 }
delFromUFM_Directly :: UniqFM elt -> Unique -> UniqFM elt #
delListFromUFM_Directly :: UniqFM elt -> [Unique] -> UniqFM elt #
delListFromUFM :: Uniquable key => UniqFM elt -> [key] -> UniqFM elt #
delFromUFM :: Uniquable key => UniqFM elt -> key -> UniqFM elt #
adjustUFM_Directly :: (elt -> elt) -> UniqFM elt -> Unique -> UniqFM elt #
addListToUFM_C :: Uniquable key => (elt -> elt -> elt) -> UniqFM elt -> [(key, elt)] -> UniqFM elt #
addToUFM_Acc :: Uniquable key => (elt -> elts -> elts) -> (elt -> elts) -> UniqFM elts -> key -> elt -> UniqFM elts #
addToUFM_C :: Uniquable key => (elt -> elt -> elt) -> UniqFM elt -> key -> elt -> UniqFM elt #
addToUFM_Directly :: UniqFM elt -> Unique -> elt -> UniqFM elt #
addListToUFM_Directly :: UniqFM elt -> [(Unique, elt)] -> UniqFM elt #
addListToUFM :: Uniquable key => UniqFM elt -> [(key, elt)] -> UniqFM elt #
listToUFM_C :: Uniquable key => (elt -> elt -> elt) -> [(key, elt)] -> UniqFM elt #
listToUFM_Directly :: [(Unique, elt)] -> UniqFM elt #
unitDirectlyUFM :: Unique -> elt -> UniqFM elt #
Instances
| Functor UniqFM | |
| Eq ele => Eq (UniqFM ele) | |
| Data ele => Data (UniqFM ele) | |
Defined in UniqFM Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UniqFM ele -> c (UniqFM ele) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (UniqFM ele) # toConstr :: UniqFM ele -> Constr # dataTypeOf :: UniqFM ele -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (UniqFM ele)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (UniqFM ele)) # gmapT :: (forall b. Data b => b -> b) -> UniqFM ele -> UniqFM ele # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UniqFM ele -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UniqFM ele -> r # gmapQ :: (forall d. Data d => d -> u) -> UniqFM ele -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> UniqFM ele -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> UniqFM ele -> m (UniqFM ele) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UniqFM ele -> m (UniqFM ele) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UniqFM ele -> m (UniqFM ele) # | |
| Semigroup (UniqFM a) | |
| Monoid (UniqFM a) | |
| Outputable a => Outputable (UniqFM a) | |
newtype NonDetUniqFM ele #
A wrapper around UniqFM with the sole purpose of informing call sites
that the provided Foldable and Traversable instances are
nondeterministic.
If you use this please provide a justification why it doesn't introduce
nondeterminism.
See Note [Deterministic UniqFM] in UniqDFM to learn about determinism.
Constructors
| NonDetUniqFM | |
Instances
| Functor NonDetUniqFM | |
Defined in UniqFM Methods fmap :: (a -> b) -> NonDetUniqFM a -> NonDetUniqFM b # (<$) :: a -> NonDetUniqFM b -> NonDetUniqFM a # | |
| Foldable NonDetUniqFM | Inherently nondeterministic. If you use this please provide a justification why it doesn't introduce nondeterminism. See Note [Deterministic UniqFM] in UniqDFM to learn about determinism. |
Defined in UniqFM Methods fold :: Monoid m => NonDetUniqFM m -> m # foldMap :: Monoid m => (a -> m) -> NonDetUniqFM a -> m # foldMap' :: Monoid m => (a -> m) -> NonDetUniqFM a -> m # foldr :: (a -> b -> b) -> b -> NonDetUniqFM a -> b # foldr' :: (a -> b -> b) -> b -> NonDetUniqFM a -> b # foldl :: (b -> a -> b) -> b -> NonDetUniqFM a -> b # foldl' :: (b -> a -> b) -> b -> NonDetUniqFM a -> b # foldr1 :: (a -> a -> a) -> NonDetUniqFM a -> a # foldl1 :: (a -> a -> a) -> NonDetUniqFM a -> a # toList :: NonDetUniqFM a -> [a] # null :: NonDetUniqFM a -> Bool # length :: NonDetUniqFM a -> Int # elem :: Eq a => a -> NonDetUniqFM a -> Bool # maximum :: Ord a => NonDetUniqFM a -> a # minimum :: Ord a => NonDetUniqFM a -> a # sum :: Num a => NonDetUniqFM a -> a # product :: Num a => NonDetUniqFM a -> a # | |
| Traversable NonDetUniqFM | Inherently nondeterministic. If you use this please provide a justification why it doesn't introduce nondeterminism. See Note [Deterministic UniqFM] in UniqDFM to learn about determinism. |
Defined in UniqFM Methods traverse :: Applicative f => (a -> f b) -> NonDetUniqFM a -> f (NonDetUniqFM b) # sequenceA :: Applicative f => NonDetUniqFM (f a) -> f (NonDetUniqFM a) # mapM :: Monad m => (a -> m b) -> NonDetUniqFM a -> m (NonDetUniqFM b) # sequence :: Monad m => NonDetUniqFM (m a) -> m (NonDetUniqFM a) # | |
initUs_ :: UniqSupply -> UniqSM a -> a #
Run the UniqSM action, discarding the final UniqSupply
initUs :: UniqSupply -> UniqSM a -> (a, UniqSupply) #
Run the UniqSM action, returning the final UniqSupply
takeUniqFromSupply :: UniqSupply -> (Unique, UniqSupply) #
Obtain the Unique from this particular UniqSupply, and a new supply
uniqsFromSupply :: UniqSupply -> [Unique] #
Obtain an infinite list of Unique that can be generated by constant splitting of the supply
uniqFromSupply :: UniqSupply -> Unique #
Obtain the Unique from this particular UniqSupply
listSplitUniqSupply :: UniqSupply -> [UniqSupply] #
Create an infinite list of UniqSupply from a single one
splitUniqSupply :: UniqSupply -> (UniqSupply, UniqSupply) #
Build two UniqSupply from a single one, each of which
can supply its own Unique.
mkSplitUniqSupply :: Char -> IO UniqSupply #
Create a unique supply out of thin air. The character given must be distinct from those of all calls to this function in the compiler for the values generated to be truly unique.
uniqFromMask :: Char -> IO Unique #
initUniqSupply :: Int -> Int -> IO () #
data UniqSupply #
Unique Supply
A value of type UniqSupply is unique, and it can
supply one distinct Unique. Also, from the supply, one can
also manufacture an arbitrary number of further UniqueSupply values,
which will be distinct from the first and from all others.
A monad which just gives the ability to obtain Uniques
Instances
| Monad UniqSM | |
| Functor UniqSM | |
| MonadFix UniqSM | |
Defined in UniqSupply | |
| MonadFail UniqSM | |
Defined in UniqSupply | |
| Applicative UniqSM | |
| MonadUnique UniqSM | |
Defined in UniqSupply Methods getUniqueSupplyM :: UniqSM UniqSupply # getUniqueM :: UniqSM Unique # getUniquesM :: UniqSM [Unique] # | |
class Monad m => MonadUnique (m :: Type -> Type) where #
A monad for generating unique identifiers
Minimal complete definition
Methods
getUniqueSupplyM :: m UniqSupply #
Get a new UniqueSupply
getUniqueM :: m Unique #
Get a new unique identifier
getUniquesM :: m [Unique] #
Get an infinite list of new unique identifiers
Instances
| MonadUnique CoreM | |
Defined in CoreMonad Methods getUniqueSupplyM :: CoreM UniqSupply # getUniqueM :: CoreM Unique # getUniquesM :: CoreM [Unique] # | |
| MonadUnique UniqSM | |
Defined in UniqSupply Methods getUniqueSupplyM :: UniqSM UniqSupply # getUniqueM :: UniqSM Unique # getUniquesM :: UniqSM [Unique] # | |
Unique identifier.
The type of unique identifiers that are used in many places in GHC
for fast ordering and equality tests. You should generate these with
the functions from the UniqSupply module
These are sometimes also referred to as "keys" in comments in GHC.
Class of things that we can obtain a Unique from
Instances
| Uniquable Int | |
| Uniquable EvBindsVar | |
Defined in TcEvidence Methods getUnique :: EvBindsVar -> Unique # | |
| Uniquable Class | |
| Uniquable CoAxiomRule | |
Defined in CoAxiom Methods getUnique :: CoAxiomRule -> Unique # | |
| Uniquable ConLike | |
| Uniquable DataCon | |
| Uniquable PatSyn | |
| Uniquable Var | |
| Uniquable SourcePackageId | |
Defined in PackageConfig Methods getUnique :: SourcePackageId -> Unique # | |
| Uniquable PackageName | |
Defined in PackageConfig Methods getUnique :: PackageName -> Unique # | |
| Uniquable Unique | |
| Uniquable Module | |
| Uniquable ModuleName | |
Defined in Module Methods getUnique :: ModuleName -> Unique # | |
| Uniquable UnitId | |
| Uniquable InstalledUnitId | |
Defined in Module Methods getUnique :: InstalledUnitId -> Unique # | |
| Uniquable ComponentId | |
Defined in Module Methods getUnique :: ComponentId -> Unique # | |
| Uniquable FastString | |
Defined in Unique Methods getUnique :: FastString -> Unique # | |
| Uniquable TyCon | |
| Uniquable OccName | |
| Uniquable Name | |
| Uniquable (CoAxiom br) | |
| Uniquable name => Uniquable (AnnTarget name) | |
Defined in Annotations | |
isKindLevel :: TypeOrKind -> Bool #
isTypeLevel :: TypeOrKind -> Bool #
mkIntWithInf :: Int -> IntWithInf #
Inject any integer into an IntWithInf
treatZeroAsInf :: Int -> IntWithInf #
Turn a positive number into an IntWithInf, where 0 represents infinity
intGtLimit :: Int -> IntWithInf -> Bool #
infinity :: IntWithInf #
A representation of infinity
integralFractionalLit :: Bool -> Integer -> FractionalLit #
mkFractionalLit :: Real a => a -> FractionalLit #
mkIntegralLit :: Integral a => a -> IntegralLit #
isEarlyActive :: Activation -> Bool #
isAlwaysActive :: Activation -> Bool #
isNeverActive :: Activation -> Bool #
competesWith :: Activation -> Activation -> Bool #
isActiveIn :: PhaseNum -> Activation -> Bool #
isActive :: CompilerPhase -> Activation -> Bool #
pprInlineDebug :: InlinePragma -> SDoc #
pprInline :: InlinePragma -> SDoc #
inlinePragmaSat :: InlinePragma -> Maybe Arity #
isAnyInlinePragma :: InlinePragma -> Bool #
isInlinablePragma :: InlinePragma -> Bool #
isInlinePragma :: InlinePragma -> Bool #
noUserInlineSpec :: InlineSpec -> Bool #
isFunLike :: RuleMatchInfo -> Bool #
isConLike :: RuleMatchInfo -> Bool #
pprWithSourceText :: SourceText -> SDoc -> SDoc #
Special combinator for showing string literals.
failed :: SuccessFlag -> Bool #
succeeded :: SuccessFlag -> Bool #
successIf :: Bool -> SuccessFlag #
zapFragileOcc :: OccInfo -> OccInfo #
isStrongLoopBreaker :: OccInfo -> Bool #
isWeakLoopBreaker :: OccInfo -> Bool #
isAlwaysTailCalled :: OccInfo -> Bool #
zapOccTailCallInfo :: OccInfo -> OccInfo #
tailCallInfo :: OccInfo -> TailCallInfo #
seqOccInfo :: OccInfo -> () #
isManyOccs :: OccInfo -> Bool #
Arguments
| :: (a -> SDoc) | The pretty printing function to use |
| -> a | The things to be pretty printed |
| -> ConTag | Alternative (one-based) |
| -> Arity | Arity |
| -> SDoc |
|
Pretty print an alternative in an unboxed sum e.g. "| a | |".
tupleParens :: TupleSort -> SDoc -> SDoc #
boxityTupleSort :: Boxity -> TupleSort #
tupleSortBoxity :: TupleSort -> Boxity #
hasOverlappingFlag :: OverlapMode -> Bool #
hasOverlappableFlag :: OverlapMode -> Bool #
hasIncoherentFlag :: OverlapMode -> Bool #
isGenerated :: Origin -> Bool #
boolToRecFlag :: Bool -> RecFlag #
isTopLevel :: TopLevelFlag -> Bool #
isNotTopLevel :: TopLevelFlag -> Bool #
funTyFixity :: Fixity #
negateFixity :: Fixity #
defaultFixity :: Fixity #
minPrecedence :: Int #
maxPrecedence :: Int #
pprRuleName :: RuleName -> SDoc #
pprWarningTxtForMsg :: WarningTxt -> SDoc #
bumpVersion :: Version -> Version #
isPromoted :: PromotionFlag -> Bool #
bestOneShot :: OneShotInfo -> OneShotInfo -> OneShotInfo #
worstOneShot :: OneShotInfo -> OneShotInfo -> OneShotInfo #
hasNoOneShotInfo :: OneShotInfo -> Bool #
isOneShotInfo :: OneShotInfo -> Bool #
noOneShotInfo :: OneShotInfo #
It is always safe to assume that an Id has no lambda-bound variable information
alignmentOf :: Int -> Alignment #
mkAlignment :: Int -> Alignment #
pickLR :: LeftOrRight -> (a, a) -> a #
data LeftOrRight #
Instances
| Eq LeftOrRight | |
Defined in BasicTypes | |
| Data LeftOrRight | |
Defined in BasicTypes Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> LeftOrRight -> c LeftOrRight # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c LeftOrRight # toConstr :: LeftOrRight -> Constr # dataTypeOf :: LeftOrRight -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c LeftOrRight) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c LeftOrRight) # gmapT :: (forall b. Data b => b -> b) -> LeftOrRight -> LeftOrRight # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LeftOrRight -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LeftOrRight -> r # gmapQ :: (forall d. Data d => d -> u) -> LeftOrRight -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> LeftOrRight -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> LeftOrRight -> m LeftOrRight # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LeftOrRight -> m LeftOrRight # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LeftOrRight -> m LeftOrRight # | |
| Outputable LeftOrRight | |
Defined in BasicTypes | |
The number of value arguments that can be applied to a value before it does "real work". So: fib 100 has arity 0 x -> fib x has arity 1 See also Note [Definition of arity] in CoreArity
The number of arguments that a join point takes. Unlike the arity of a function, this is a purely syntactic property and is fixed when the join point is created (or converted from a value). Both type and value arguments are counted.
Constructor Tag
Type of the tags associated with each constructor possibility or superclass selector
A power-of-two alignment
Instances
| Eq Alignment | |
| Ord Alignment | |
| Outputable Alignment | |
data OneShotInfo #
If the Id is a lambda-bound variable then it may have lambda-bound
variable info. Sometimes we know whether the lambda binding this variable
is a "one-shot" lambda; that is, whether it is applied at most once.
This information may be useful in optimisation, as computations may safely be floated inside such a lambda without risk of duplicating work.
Constructors
| NoOneShotInfo | No information |
| OneShotLam | The lambda is applied at most once. |
Instances
| Eq OneShotInfo | |
Defined in BasicTypes | |
| Outputable OneShotInfo | |
Defined in BasicTypes | |
Constructors
| NotSwapped | |
| IsSwapped |
data PromotionFlag #
Is a TyCon a promoted data constructor or just a normal type constructor?
Constructors
| NotPromoted | |
| IsPromoted |
Instances
| Eq PromotionFlag | |
Defined in BasicTypes Methods (==) :: PromotionFlag -> PromotionFlag -> Bool # (/=) :: PromotionFlag -> PromotionFlag -> Bool # | |
| Data PromotionFlag | |
Defined in BasicTypes Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PromotionFlag -> c PromotionFlag # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c PromotionFlag # toConstr :: PromotionFlag -> Constr # dataTypeOf :: PromotionFlag -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c PromotionFlag) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PromotionFlag) # gmapT :: (forall b. Data b => b -> b) -> PromotionFlag -> PromotionFlag # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PromotionFlag -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PromotionFlag -> r # gmapQ :: (forall d. Data d => d -> u) -> PromotionFlag -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> PromotionFlag -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> PromotionFlag -> m PromotionFlag # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PromotionFlag -> m PromotionFlag # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PromotionFlag -> m PromotionFlag # | |
data FunctionOrData #
Constructors
| IsFunction | |
| IsData |
Instances
data StringLiteral #
A String Literal in the source, including its original raw format for use by source to source manipulation tools.
Constructors
| StringLiteral | |
Fields
| |
Instances
| Eq StringLiteral | |
Defined in BasicTypes Methods (==) :: StringLiteral -> StringLiteral -> Bool # (/=) :: StringLiteral -> StringLiteral -> Bool # | |
| Data StringLiteral | |
Defined in BasicTypes Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> StringLiteral -> c StringLiteral # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c StringLiteral # toConstr :: StringLiteral -> Constr # dataTypeOf :: StringLiteral -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c StringLiteral) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c StringLiteral) # gmapT :: (forall b. Data b => b -> b) -> StringLiteral -> StringLiteral # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> StringLiteral -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> StringLiteral -> r # gmapQ :: (forall d. Data d => d -> u) -> StringLiteral -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> StringLiteral -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> StringLiteral -> m StringLiteral # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> StringLiteral -> m StringLiteral # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> StringLiteral -> m StringLiteral # | |
| Outputable StringLiteral | |
Defined in BasicTypes | |
data WarningTxt #
Warning Text
reason/explanation from a WARNING or DEPRECATED pragma
Constructors
| WarningTxt (Located SourceText) [Located StringLiteral] | |
| DeprecatedTxt (Located SourceText) [Located StringLiteral] |
Instances
| Eq WarningTxt | |
Defined in BasicTypes | |
| Data WarningTxt | |
Defined in BasicTypes Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> WarningTxt -> c WarningTxt # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c WarningTxt # toConstr :: WarningTxt -> Constr # dataTypeOf :: WarningTxt -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c WarningTxt) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c WarningTxt) # gmapT :: (forall b. Data b => b -> b) -> WarningTxt -> WarningTxt # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> WarningTxt -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> WarningTxt -> r # gmapQ :: (forall d. Data d => d -> u) -> WarningTxt -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> WarningTxt -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> WarningTxt -> m WarningTxt # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> WarningTxt -> m WarningTxt # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> WarningTxt -> m WarningTxt # | |
| Outputable WarningTxt | |
Defined in BasicTypes | |
type RuleName = FastString #
Constructors
| Fixity SourceText Int FixityDirection |
Instances
| Eq Fixity | |
| Data Fixity | |
Defined in BasicTypes Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Fixity -> c Fixity # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Fixity # toConstr :: Fixity -> Constr # dataTypeOf :: Fixity -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Fixity) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Fixity) # gmapT :: (forall b. Data b => b -> b) -> Fixity -> Fixity # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Fixity -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Fixity -> r # gmapQ :: (forall d. Data d => d -> u) -> Fixity -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Fixity -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Fixity -> m Fixity # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Fixity -> m Fixity # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Fixity -> m Fixity # | |
| Outputable Fixity | |
data FixityDirection #
Instances
| Eq FixityDirection | |
Defined in BasicTypes Methods (==) :: FixityDirection -> FixityDirection -> Bool # (/=) :: FixityDirection -> FixityDirection -> Bool # | |
| Data FixityDirection | |
Defined in BasicTypes Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FixityDirection -> c FixityDirection # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c FixityDirection # toConstr :: FixityDirection -> Constr # dataTypeOf :: FixityDirection -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c FixityDirection) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c FixityDirection) # gmapT :: (forall b. Data b => b -> b) -> FixityDirection -> FixityDirection # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FixityDirection -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FixityDirection -> r # gmapQ :: (forall d. Data d => d -> u) -> FixityDirection -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> FixityDirection -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> FixityDirection -> m FixityDirection # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> FixityDirection -> m FixityDirection # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> FixityDirection -> m FixityDirection # | |
| Outputable FixityDirection | |
Defined in BasicTypes | |
data LexicalFixity #
Captures the fixity of declarations as they are parsed. This is not necessarily the same as the fixity declaration, as the normal fixity may be overridden using parens or backticks.
Instances
| Eq LexicalFixity | |
Defined in BasicTypes Methods (==) :: LexicalFixity -> LexicalFixity -> Bool # (/=) :: LexicalFixity -> LexicalFixity -> Bool # | |
| Data LexicalFixity | |
Defined in BasicTypes Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> LexicalFixity -> c LexicalFixity # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c LexicalFixity # toConstr :: LexicalFixity -> Constr # dataTypeOf :: LexicalFixity -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c LexicalFixity) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c LexicalFixity) # gmapT :: (forall b. Data b => b -> b) -> LexicalFixity -> LexicalFixity # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LexicalFixity -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LexicalFixity -> r # gmapQ :: (forall d. Data d => d -> u) -> LexicalFixity -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> LexicalFixity -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> LexicalFixity -> m LexicalFixity # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LexicalFixity -> m LexicalFixity # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LexicalFixity -> m LexicalFixity # | |
| Outputable LexicalFixity | |
Defined in BasicTypes | |
data TopLevelFlag #
Constructors
| TopLevel | |
| NotTopLevel |
Instances
| Outputable TopLevelFlag | |
Defined in BasicTypes | |
Instances
| Eq Boxity | |
| Data Boxity | |
Defined in BasicTypes Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Boxity -> c Boxity # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Boxity # toConstr :: Boxity -> Constr # dataTypeOf :: Boxity -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Boxity) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Boxity) # gmapT :: (forall b. Data b => b -> b) -> Boxity -> Boxity # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Boxity -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Boxity -> r # gmapQ :: (forall d. Data d => d -> u) -> Boxity -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Boxity -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Boxity -> m Boxity # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Boxity -> m Boxity # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Boxity -> m Boxity # | |
| Outputable Boxity | |
Recursivity Flag
Constructors
| Recursive | |
| NonRecursive |
Instances
| Eq RecFlag | |
| Data RecFlag | |
Defined in BasicTypes Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> RecFlag -> c RecFlag # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c RecFlag # toConstr :: RecFlag -> Constr # dataTypeOf :: RecFlag -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c RecFlag) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c RecFlag) # gmapT :: (forall b. Data b => b -> b) -> RecFlag -> RecFlag # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> RecFlag -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> RecFlag -> r # gmapQ :: (forall d. Data d => d -> u) -> RecFlag -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> RecFlag -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> RecFlag -> m RecFlag # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> RecFlag -> m RecFlag # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> RecFlag -> m RecFlag # | |
| Outputable RecFlag | |
Constructors
| FromSource | |
| Generated |
Instances
| Eq Origin | |
| Data Origin | |
Defined in BasicTypes Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Origin -> c Origin # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Origin # toConstr :: Origin -> Constr # dataTypeOf :: Origin -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Origin) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Origin) # gmapT :: (forall b. Data b => b -> b) -> Origin -> Origin # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Origin -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Origin -> r # gmapQ :: (forall d. Data d => d -> u) -> Origin -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Origin -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Origin -> m Origin # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Origin -> m Origin # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Origin -> m Origin # | |
| Outputable Origin | |
data OverlapFlag #
The semantics allowed for overlapping instances for a particular
instance. See Note [Safe Haskell isSafeOverlap] (in hs) for a
explanation of the isSafeOverlap field.
AnnKeywordId:AnnOpen'{-# OVERLAPPABLE'or'{-# OVERLAPPING'or'{-# OVERLAPS'or'{-# INCOHERENT',AnnClose`#-}`,
Constructors
| OverlapFlag | |
Fields | |
Instances
| Eq OverlapFlag | |
Defined in BasicTypes | |
| Data OverlapFlag | |
Defined in BasicTypes Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> OverlapFlag -> c OverlapFlag # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c OverlapFlag # toConstr :: OverlapFlag -> Constr # dataTypeOf :: OverlapFlag -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c OverlapFlag) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c OverlapFlag) # gmapT :: (forall b. Data b => b -> b) -> OverlapFlag -> OverlapFlag # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> OverlapFlag -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> OverlapFlag -> r # gmapQ :: (forall d. Data d => d -> u) -> OverlapFlag -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> OverlapFlag -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> OverlapFlag -> m OverlapFlag # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> OverlapFlag -> m OverlapFlag # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> OverlapFlag -> m OverlapFlag # | |
| Outputable OverlapFlag | |
Defined in BasicTypes | |
data OverlapMode #
Constructors
| NoOverlap SourceText | This instance must not overlap another |
| Overlappable SourceText | Silently ignore this instance if you find a more specific one that matches the constraint you are trying to resolve Example: constraint (Foo [Int]) instance Foo [Int] instance {--} Foo [a] Since the second instance has the Overlappable flag, the first instance will be chosen (otherwise its ambiguous which to choose) |
| Overlapping SourceText | Silently ignore any more general instances that may be used to solve the constraint. Example: constraint (Foo [Int]) instance {--} Foo [Int] instance Foo [a] Since the first instance has the Overlapping flag, the second---more general---instance will be ignored (otherwise it is ambiguous which to choose) |
| Overlaps SourceText | Equivalent to having both |
| Incoherent SourceText | Behave like Overlappable and Overlapping, and in addition pick an an arbitrary one if there are multiple matching candidates, and don't worry about later instantiation Example: constraint (Foo [b])
instance {-# INCOHERENT -} Foo [Int]
instance Foo [a]
Without the Incoherent flag, we'd complain that
instantiating |
Instances
| Eq OverlapMode | |
Defined in BasicTypes | |
| Data OverlapMode | |
Defined in BasicTypes Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> OverlapMode -> c OverlapMode # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c OverlapMode # toConstr :: OverlapMode -> Constr # dataTypeOf :: OverlapMode -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c OverlapMode) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c OverlapMode) # gmapT :: (forall b. Data b => b -> b) -> OverlapMode -> OverlapMode # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> OverlapMode -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> OverlapMode -> r # gmapQ :: (forall d. Data d => d -> u) -> OverlapMode -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> OverlapMode -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> OverlapMode -> m OverlapMode # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> OverlapMode -> m OverlapMode # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> OverlapMode -> m OverlapMode # | |
| Outputable OverlapMode | |
Defined in BasicTypes | |
Constructors
| BoxedTuple | |
| UnboxedTuple | |
| ConstraintTuple |
Instances
| Eq TupleSort | |
| Data TupleSort | |
Defined in BasicTypes Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TupleSort -> c TupleSort # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TupleSort # toConstr :: TupleSort -> Constr # dataTypeOf :: TupleSort -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TupleSort) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TupleSort) # gmapT :: (forall b. Data b => b -> b) -> TupleSort -> TupleSort # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TupleSort -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TupleSort -> r # gmapQ :: (forall d. Data d => d -> u) -> TupleSort -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> TupleSort -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> TupleSort -> m TupleSort # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TupleSort -> m TupleSort # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TupleSort -> m TupleSort # | |
| Outputable TupleSort | |
identifier Occurrence Information
Constructors
| ManyOccs | There are many occurrences, or unknown occurrences |
Fields
| |
| IAmDead | Marks unused variables. Sometimes useful for lambda and case-bound variables. |
| OneOcc | Occurs exactly once (per branch), not inside a rule |
Fields
| |
| IAmALoopBreaker | This identifier breaks a loop of mutually recursive functions. The field marks whether it is only a loop breaker due to a reference in a rule |
Fields
| |
type InterestingCxt = Bool #
Interesting Context
data TailCallInfo #
Constructors
| AlwaysTailCalled JoinArity | |
| NoTailCallInfo |
Instances
| Eq TailCallInfo | |
Defined in BasicTypes | |
| Outputable TailCallInfo | |
Defined in BasicTypes | |
data DefMethSpec ty #
Default Method Specification
Instances
| Outputable (DefMethSpec ty) | |
Defined in BasicTypes | |
data SuccessFlag #
Instances
| Outputable SuccessFlag | |
Defined in BasicTypes | |
data SourceText #
Constructors
| SourceText String | |
| NoSourceText | For when code is generated, e.g. TH, deriving. The pretty printer will then make its own representation of the item. |
Instances
| Eq SourceText | |
Defined in BasicTypes | |
| Data SourceText | |
Defined in BasicTypes Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SourceText -> c SourceText # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SourceText # toConstr :: SourceText -> Constr # dataTypeOf :: SourceText -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SourceText) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SourceText) # gmapT :: (forall b. Data b => b -> b) -> SourceText -> SourceText # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SourceText -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SourceText -> r # gmapQ :: (forall d. Data d => d -> u) -> SourceText -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> SourceText -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> SourceText -> m SourceText # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SourceText -> m SourceText # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SourceText -> m SourceText # | |
| Show SourceText | |
Defined in BasicTypes Methods showsPrec :: Int -> SourceText -> ShowS # show :: SourceText -> String # showList :: [SourceText] -> ShowS # | |
| Outputable SourceText | |
Defined in BasicTypes | |
data CompilerPhase #
Constructors
| Phase PhaseNum | |
| InitialPhase |
Instances
| Outputable CompilerPhase | |
Defined in BasicTypes | |
data Activation #
Constructors
| NeverActive | |
| AlwaysActive | |
| ActiveBefore SourceText PhaseNum | |
| ActiveAfter SourceText PhaseNum |
Instances
| Eq Activation | |
Defined in BasicTypes | |
| Data Activation | |
Defined in BasicTypes Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Activation -> c Activation # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Activation # toConstr :: Activation -> Constr # dataTypeOf :: Activation -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Activation) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Activation) # gmapT :: (forall b. Data b => b -> b) -> Activation -> Activation # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Activation -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Activation -> r # gmapQ :: (forall d. Data d => d -> u) -> Activation -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Activation -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Activation -> m Activation # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Activation -> m Activation # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Activation -> m Activation # | |
| Outputable Activation | |
Defined in BasicTypes | |
data RuleMatchInfo #
Rule Match Information
Instances
| Eq RuleMatchInfo | |
Defined in BasicTypes Methods (==) :: RuleMatchInfo -> RuleMatchInfo -> Bool # (/=) :: RuleMatchInfo -> RuleMatchInfo -> Bool # | |
| Data RuleMatchInfo | |
Defined in BasicTypes Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> RuleMatchInfo -> c RuleMatchInfo # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c RuleMatchInfo # toConstr :: RuleMatchInfo -> Constr # dataTypeOf :: RuleMatchInfo -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c RuleMatchInfo) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c RuleMatchInfo) # gmapT :: (forall b. Data b => b -> b) -> RuleMatchInfo -> RuleMatchInfo # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> RuleMatchInfo -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> RuleMatchInfo -> r # gmapQ :: (forall d. Data d => d -> u) -> RuleMatchInfo -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> RuleMatchInfo -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> RuleMatchInfo -> m RuleMatchInfo # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> RuleMatchInfo -> m RuleMatchInfo # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> RuleMatchInfo -> m RuleMatchInfo # | |
| Show RuleMatchInfo | |
Defined in BasicTypes Methods showsPrec :: Int -> RuleMatchInfo -> ShowS # show :: RuleMatchInfo -> String # showList :: [RuleMatchInfo] -> ShowS # | |
| Outputable RuleMatchInfo | |
Defined in BasicTypes | |
data InlinePragma #
Constructors
| InlinePragma | |
Fields
| |
Instances
| Eq InlinePragma | |
Defined in BasicTypes | |
| Data InlinePragma | |
Defined in BasicTypes Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> InlinePragma -> c InlinePragma # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c InlinePragma # toConstr :: InlinePragma -> Constr # dataTypeOf :: InlinePragma -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c InlinePragma) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c InlinePragma) # gmapT :: (forall b. Data b => b -> b) -> InlinePragma -> InlinePragma # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> InlinePragma -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> InlinePragma -> r # gmapQ :: (forall d. Data d => d -> u) -> InlinePragma -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> InlinePragma -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> InlinePragma -> m InlinePragma # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> InlinePragma -> m InlinePragma # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> InlinePragma -> m InlinePragma # | |
| Outputable InlinePragma | |
Defined in BasicTypes | |
data InlineSpec #
Inline Specification
Constructors
| Inline | |
| Inlinable | |
| NoInline | |
| NoUserInline |
Instances
| Eq InlineSpec | |
Defined in BasicTypes | |
| Data InlineSpec | |
Defined in BasicTypes Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> InlineSpec -> c InlineSpec # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c InlineSpec # toConstr :: InlineSpec -> Constr # dataTypeOf :: InlineSpec -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c InlineSpec) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c InlineSpec) # gmapT :: (forall b. Data b => b -> b) -> InlineSpec -> InlineSpec # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> InlineSpec -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> InlineSpec -> r # gmapQ :: (forall d. Data d => d -> u) -> InlineSpec -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> InlineSpec -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> InlineSpec -> m InlineSpec # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> InlineSpec -> m InlineSpec # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> InlineSpec -> m InlineSpec # | |
| Show InlineSpec | |
Defined in BasicTypes Methods showsPrec :: Int -> InlineSpec -> ShowS # show :: InlineSpec -> String # showList :: [InlineSpec] -> ShowS # | |
| Outputable InlineSpec | |
Defined in BasicTypes | |
data IntegralLit #
Integral Literal
Used (instead of Integer) to represent negative zegative zero which is required for NegativeLiterals extension to correctly parse `-0::Double` as negative zero. See also #13211.
Instances
| Eq IntegralLit | |
Defined in BasicTypes | |
| Data IntegralLit | |
Defined in BasicTypes Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> IntegralLit -> c IntegralLit # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c IntegralLit # toConstr :: IntegralLit -> Constr # dataTypeOf :: IntegralLit -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c IntegralLit) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c IntegralLit) # gmapT :: (forall b. Data b => b -> b) -> IntegralLit -> IntegralLit # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> IntegralLit -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> IntegralLit -> r # gmapQ :: (forall d. Data d => d -> u) -> IntegralLit -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> IntegralLit -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> IntegralLit -> m IntegralLit # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> IntegralLit -> m IntegralLit # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> IntegralLit -> m IntegralLit # | |
| Ord IntegralLit | |
Defined in BasicTypes Methods compare :: IntegralLit -> IntegralLit -> Ordering # (<) :: IntegralLit -> IntegralLit -> Bool # (<=) :: IntegralLit -> IntegralLit -> Bool # (>) :: IntegralLit -> IntegralLit -> Bool # (>=) :: IntegralLit -> IntegralLit -> Bool # max :: IntegralLit -> IntegralLit -> IntegralLit # min :: IntegralLit -> IntegralLit -> IntegralLit # | |
| Show IntegralLit | |
Defined in BasicTypes Methods showsPrec :: Int -> IntegralLit -> ShowS # show :: IntegralLit -> String # showList :: [IntegralLit] -> ShowS # | |
| Outputable IntegralLit | |
Defined in BasicTypes | |
data FractionalLit #
Fractional Literal
Used (instead of Rational) to represent exactly the floating point literal that we encountered in the user's source program. This allows us to pretty-print exactly what the user wrote, which is important e.g. for floating point numbers that can't represented as Doubles (we used to via Double for pretty-printing). See also #2245.
Instances
data IntWithInf #
An integer or infinity
Instances
| Eq IntWithInf | |
Defined in BasicTypes | |
| Num IntWithInf | |
Defined in BasicTypes Methods (+) :: IntWithInf -> IntWithInf -> IntWithInf # (-) :: IntWithInf -> IntWithInf -> IntWithInf # (*) :: IntWithInf -> IntWithInf -> IntWithInf # negate :: IntWithInf -> IntWithInf # abs :: IntWithInf -> IntWithInf # signum :: IntWithInf -> IntWithInf # fromInteger :: Integer -> IntWithInf # | |
| Ord IntWithInf | |
Defined in BasicTypes Methods compare :: IntWithInf -> IntWithInf -> Ordering # (<) :: IntWithInf -> IntWithInf -> Bool # (<=) :: IntWithInf -> IntWithInf -> Bool # (>) :: IntWithInf -> IntWithInf -> Bool # (>=) :: IntWithInf -> IntWithInf -> Bool # max :: IntWithInf -> IntWithInf -> IntWithInf # min :: IntWithInf -> IntWithInf -> IntWithInf # | |
| Outputable IntWithInf | |
Defined in BasicTypes | |
data SpliceExplicitFlag #
Constructors
| ExplicitSplice | = $(f x y) |
| ImplicitSplice | = f x y, i.e. a naked top level expression |
Instances
| Data SpliceExplicitFlag | |
Defined in BasicTypes Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SpliceExplicitFlag -> c SpliceExplicitFlag # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SpliceExplicitFlag # toConstr :: SpliceExplicitFlag -> Constr # dataTypeOf :: SpliceExplicitFlag -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SpliceExplicitFlag) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SpliceExplicitFlag) # gmapT :: (forall b. Data b => b -> b) -> SpliceExplicitFlag -> SpliceExplicitFlag # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SpliceExplicitFlag -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SpliceExplicitFlag -> r # gmapQ :: (forall d. Data d => d -> u) -> SpliceExplicitFlag -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> SpliceExplicitFlag -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> SpliceExplicitFlag -> m SpliceExplicitFlag # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SpliceExplicitFlag -> m SpliceExplicitFlag # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SpliceExplicitFlag -> m SpliceExplicitFlag # | |
data TypeOrKind #
Flag to see whether we're type-checking terms or kind-checking types
Instances
| Eq TypeOrKind | |
Defined in BasicTypes | |
| Outputable TypeOrKind | |
Defined in BasicTypes | |
vanillaIdInfo :: IdInfo #
Basic IdInfo that carries no useful information whatsoever
Just a synonym for CoVarId. Written separately so it can be
exported in the hs-boot file.
pprIdDetails :: IdDetails -> SDoc #
Identifier Information
An IdInfo gives optional information about an Id. If
present it never lies, but it may not be present, in which case there
is always a conservative assumption which can be made.
Two Ids may have different info even though they have the same
Unique (and are hence the same Id); for example, one might lack
the properties attached to the other.
Most of the IdInfo gives information about the value, or definition, of
the Id, independent of its usage. Exceptions to this
are demandInfo, occInfo, oneShotInfo and callArityInfo.
Performance note: when we update IdInfo, we have to reallocate this
entire record, so it is a good idea not to let this data structure get
too big.
Identifier Details
The IdDetails of an Id give stable, and necessary,
information about the Id.
Constructors
| VanillaId | |
| RecSelId | The |
Fields
| |
| DataConWorkId DataCon | The |
| DataConWrapId DataCon | The |
| ClassOpId Class | The |
| PrimOpId PrimOp | The |
| FCallId ForeignCall | The |
| TickBoxOpId TickBoxOp | The |
| DFunId Bool | A dictionary function. Bool = True = the class has only one method, so may be implemented with a newtype, so it might be bad to be strict on this dictionary |
| CoVarId | A coercion variable This only covers un-lifted coercions, of type (t1 ~ t2), not their lifted variants |
| JoinId JoinArity | An |
unRealSrcSpan :: RealLocated a -> a #
getRealSrcSpan :: RealLocated a -> RealSrcSpan #
liftL :: (HasSrcSpan a, HasSrcSpan b, Monad m) => (SrcSpanLess a -> m (SrcSpanLess b)) -> a -> m b #
onHasSrcSpan :: (HasSrcSpan a, HasSrcSpan b) => (SrcSpanLess a -> SrcSpanLess b) -> a -> b #
Lifts a function of undecorated entities to one of decorated ones
cL :: HasSrcSpan a => SrcSpan -> SrcSpanLess a -> a #
An abbreviated form of composeSrcSpan,
mainly to replace the hardcoded L
dL :: HasSrcSpan a => a -> Located (SrcSpanLess a) #
An abbreviated form of decomposeSrcSpan, mainly to be used in ViewPatterns
Arguments
| :: SrcSpan | The span that may be enclosed by the other |
| -> SrcSpan | The span it may be enclosed by |
| -> Bool |
Determines whether a span is enclosed by another one
spans :: SrcSpan -> (Int, Int) -> Bool #
Determines whether a span encloses a given line and column index
cmpLocated :: (HasSrcSpan a, Ord (SrcSpanLess a)) => a -> a -> Ordering #
Tests the ordering of the two located things
eqLocated :: (HasSrcSpan a, Eq (SrcSpanLess a)) => a -> a -> Bool #
Tests whether the two located things are equal
addCLoc :: (HasSrcSpan a, HasSrcSpan b, HasSrcSpan c) => a -> b -> SrcSpanLess c -> c #
Combine locations from two Located things and add them to a third thing
combineLocs :: (HasSrcSpan a, HasSrcSpan b) => a -> b -> SrcSpan #
mkGeneralLocated :: HasSrcSpan e => String -> SrcSpanLess e -> e #
noLoc :: HasSrcSpan a => SrcSpanLess a -> a #
getLoc :: HasSrcSpan a => a -> SrcSpan #
unLoc :: HasSrcSpan a => a -> SrcSpanLess a #
mapLoc :: (a -> b) -> GenLocated l a -> GenLocated l b #
pprUserRealSpan :: Bool -> RealSrcSpan -> SDoc #
srcSpanFileName_maybe :: SrcSpan -> Maybe FastString #
Obtains the filename for a SrcSpan if it is "good"
realSrcSpanEnd :: RealSrcSpan -> RealSrcLoc #
srcSpanEnd :: SrcSpan -> SrcLoc #
srcSpanStart :: SrcSpan -> SrcLoc #
srcSpanEndCol :: RealSrcSpan -> Int #
srcSpanStartCol :: RealSrcSpan -> Int #
srcSpanEndLine :: RealSrcSpan -> Int #
srcSpanStartLine :: RealSrcSpan -> Int #
containsSpan :: RealSrcSpan -> RealSrcSpan -> Bool #
Tests whether the first span "contains" the other span, meaning that it covers at least as much source code. True where spans are equal.
isOneLineSpan :: SrcSpan -> Bool #
True if the span is known to straddle only one line.
For "bad" SrcSpan, it returns False
isGoodSrcSpan :: SrcSpan -> Bool #
Test if a SrcSpan is "good", i.e. has precise location information
srcSpanFirstCharacter :: SrcSpan -> SrcSpan #
Convert a SrcSpan into one that represents only its first character
combineSrcSpans :: SrcSpan -> SrcSpan -> SrcSpan #
Combines two SrcSpan into one that spans at least all the characters
within both spans. Returns UnhelpfulSpan if the files differ.
mkRealSrcSpan :: RealSrcLoc -> RealSrcLoc -> RealSrcSpan #
Create a SrcSpan between two points in a file
realSrcLocSpan :: RealSrcLoc -> RealSrcSpan #
srcLocSpan :: SrcLoc -> SrcSpan #
Create a SrcSpan corresponding to a single point
mkGeneralSrcSpan :: FastString -> SrcSpan #
Create a "bad" SrcSpan that has not location information
interactiveSrcSpan :: SrcSpan #
Built-in "bad" SrcSpans for common sources of location uncertainty
Built-in "bad" SrcSpans for common sources of location uncertainty
sortLocated :: HasSrcSpan a => [a] -> [a] #
advanceSrcLoc :: RealSrcLoc -> Char -> RealSrcLoc #
Move the SrcLoc down by one line if the character is a newline,
to the next 8-char tabstop if it is a tab, and across by one
character in any other case
srcLocCol :: RealSrcLoc -> Int #
Raises an error when used on a "bad" SrcLoc
srcLocLine :: RealSrcLoc -> Int #
Raises an error when used on a "bad" SrcLoc
srcLocFile :: RealSrcLoc -> FastString #
Gives the filename of the RealSrcLoc
mkGeneralSrcLoc :: FastString -> SrcLoc #
Creates a "bad" SrcLoc that has no detailed information about its location
Built-in "bad" SrcLoc values for particular locations
Built-in "bad" SrcLoc values for particular locations
mkRealSrcLoc :: FastString -> Int -> Int -> RealSrcLoc #
pattern LL :: HasSrcSpan a => SrcSpan -> SrcSpanLess a -> a #
A Pattern Synonym to Set/Get SrcSpans
data RealSrcLoc #
Real Source Location
Represents a single point within a file
Instances
| Eq RealSrcLoc | |
Defined in SrcLoc | |
| Ord RealSrcLoc | |
Defined in SrcLoc Methods compare :: RealSrcLoc -> RealSrcLoc -> Ordering # (<) :: RealSrcLoc -> RealSrcLoc -> Bool # (<=) :: RealSrcLoc -> RealSrcLoc -> Bool # (>) :: RealSrcLoc -> RealSrcLoc -> Bool # (>=) :: RealSrcLoc -> RealSrcLoc -> Bool # max :: RealSrcLoc -> RealSrcLoc -> RealSrcLoc # min :: RealSrcLoc -> RealSrcLoc -> RealSrcLoc # | |
| Show RealSrcLoc | |
Defined in SrcLoc Methods showsPrec :: Int -> RealSrcLoc -> ShowS # show :: RealSrcLoc -> String # showList :: [RealSrcLoc] -> ShowS # | |
| Outputable RealSrcLoc | |
Defined in SrcLoc | |
Source Location
Constructors
| RealSrcLoc !RealSrcLoc | |
| UnhelpfulLoc FastString |
data RealSrcSpan #
A RealSrcSpan delimits a portion of a text file. It could be represented
by a pair of (line,column) coordinates, but in fact we optimise
slightly by using more compact representations for single-line and
zero-length spans, both of which are quite common.
The end position is defined to be the column after the end of the span. That is, a span of (1,1)-(1,2) is one character long, and a span of (1,1)-(1,1) is zero characters long.
Real Source Span
Instances
| Eq RealSrcSpan | |
Defined in SrcLoc | |
| Data RealSrcSpan | |
Defined in SrcLoc Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> RealSrcSpan -> c RealSrcSpan # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c RealSrcSpan # toConstr :: RealSrcSpan -> Constr # dataTypeOf :: RealSrcSpan -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c RealSrcSpan) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c RealSrcSpan) # gmapT :: (forall b. Data b => b -> b) -> RealSrcSpan -> RealSrcSpan # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> RealSrcSpan -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> RealSrcSpan -> r # gmapQ :: (forall d. Data d => d -> u) -> RealSrcSpan -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> RealSrcSpan -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> RealSrcSpan -> m RealSrcSpan # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> RealSrcSpan -> m RealSrcSpan # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> RealSrcSpan -> m RealSrcSpan # | |
| Ord RealSrcSpan | |
Defined in SrcLoc Methods compare :: RealSrcSpan -> RealSrcSpan -> Ordering # (<) :: RealSrcSpan -> RealSrcSpan -> Bool # (<=) :: RealSrcSpan -> RealSrcSpan -> Bool # (>) :: RealSrcSpan -> RealSrcSpan -> Bool # (>=) :: RealSrcSpan -> RealSrcSpan -> Bool # max :: RealSrcSpan -> RealSrcSpan -> RealSrcSpan # min :: RealSrcSpan -> RealSrcSpan -> RealSrcSpan # | |
| Show RealSrcSpan | |
Defined in SrcLoc Methods showsPrec :: Int -> RealSrcSpan -> ShowS # show :: RealSrcSpan -> String # showList :: [RealSrcSpan] -> ShowS # | |
| ToJson RealSrcSpan | |
Defined in SrcLoc Methods json :: RealSrcSpan -> JsonDoc # | |
| Outputable RealSrcSpan | |
Defined in SrcLoc | |
Source Span
A SrcSpan identifies either a specific portion of a text file
or a human-readable description of a location.
Constructors
| RealSrcSpan !RealSrcSpan | |
| UnhelpfulSpan !FastString |
Instances
| Eq SrcSpan | |
| Data SrcSpan | |
Defined in SrcLoc Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SrcSpan -> c SrcSpan # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SrcSpan # toConstr :: SrcSpan -> Constr # dataTypeOf :: SrcSpan -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SrcSpan) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SrcSpan) # gmapT :: (forall b. Data b => b -> b) -> SrcSpan -> SrcSpan # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SrcSpan -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SrcSpan -> r # gmapQ :: (forall d. Data d => d -> u) -> SrcSpan -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> SrcSpan -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> SrcSpan -> m SrcSpan # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SrcSpan -> m SrcSpan # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SrcSpan -> m SrcSpan # | |
| Ord SrcSpan | |
| Show SrcSpan | |
| NFData SrcSpan | |
| ToJson SrcSpan | |
| Outputable SrcSpan | |
| NamedThing e => NamedThing (Located e) | |
| HasSrcSpan (Located a) | |
Defined in SrcLoc Methods composeSrcSpan :: Located (SrcSpanLess (Located a)) -> Located a # decomposeSrcSpan :: Located a -> Located (SrcSpanLess (Located a)) # | |
data GenLocated l e #
We attach SrcSpans to lots of things, so let's have a datatype for it.
Constructors
| L l e |
Instances
| Functor (GenLocated l) | |
Defined in SrcLoc Methods fmap :: (a -> b) -> GenLocated l a -> GenLocated l b # (<$) :: a -> GenLocated l b -> GenLocated l a # | |
| Foldable (GenLocated l) | |
Defined in SrcLoc Methods fold :: Monoid m => GenLocated l m -> m # foldMap :: Monoid m => (a -> m) -> GenLocated l a -> m # foldMap' :: Monoid m => (a -> m) -> GenLocated l a -> m # foldr :: (a -> b -> b) -> b -> GenLocated l a -> b # foldr' :: (a -> b -> b) -> b -> GenLocated l a -> b # foldl :: (b -> a -> b) -> b -> GenLocated l a -> b # foldl' :: (b -> a -> b) -> b -> GenLocated l a -> b # foldr1 :: (a -> a -> a) -> GenLocated l a -> a # foldl1 :: (a -> a -> a) -> GenLocated l a -> a # toList :: GenLocated l a -> [a] # null :: GenLocated l a -> Bool # length :: GenLocated l a -> Int # elem :: Eq a => a -> GenLocated l a -> Bool # maximum :: Ord a => GenLocated l a -> a # minimum :: Ord a => GenLocated l a -> a # sum :: Num a => GenLocated l a -> a # product :: Num a => GenLocated l a -> a # | |
| Traversable (GenLocated l) | |
Defined in SrcLoc Methods traverse :: Applicative f => (a -> f b) -> GenLocated l a -> f (GenLocated l b) # sequenceA :: Applicative f => GenLocated l (f a) -> f (GenLocated l a) # mapM :: Monad m => (a -> m b) -> GenLocated l a -> m (GenLocated l b) # sequence :: Monad m => GenLocated l (m a) -> m (GenLocated l a) # | |
| NamedThing e => NamedThing (Located e) | |
| HasSrcSpan (Located a) | |
Defined in SrcLoc Methods composeSrcSpan :: Located (SrcSpanLess (Located a)) -> Located a # decomposeSrcSpan :: Located a -> Located (SrcSpanLess (Located a)) # | |
| (Eq l, Eq e) => Eq (GenLocated l e) | |
Defined in SrcLoc Methods (==) :: GenLocated l e -> GenLocated l e -> Bool # (/=) :: GenLocated l e -> GenLocated l e -> Bool # | |
| (Data l, Data e) => Data (GenLocated l e) | |
Defined in SrcLoc Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GenLocated l e -> c (GenLocated l e) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (GenLocated l e) # toConstr :: GenLocated l e -> Constr # dataTypeOf :: GenLocated l e -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (GenLocated l e)) # dataCast2 :: Typeable t => (forall d e0. (Data d, Data e0) => c (t d e0)) -> Maybe (c (GenLocated l e)) # gmapT :: (forall b. Data b => b -> b) -> GenLocated l e -> GenLocated l e # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GenLocated l e -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GenLocated l e -> r # gmapQ :: (forall d. Data d => d -> u) -> GenLocated l e -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> GenLocated l e -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> GenLocated l e -> m (GenLocated l e) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GenLocated l e -> m (GenLocated l e) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GenLocated l e -> m (GenLocated l e) # | |
| (Ord l, Ord e) => Ord (GenLocated l e) | |
Defined in SrcLoc Methods compare :: GenLocated l e -> GenLocated l e -> Ordering # (<) :: GenLocated l e -> GenLocated l e -> Bool # (<=) :: GenLocated l e -> GenLocated l e -> Bool # (>) :: GenLocated l e -> GenLocated l e -> Bool # (>=) :: GenLocated l e -> GenLocated l e -> Bool # max :: GenLocated l e -> GenLocated l e -> GenLocated l e # min :: GenLocated l e -> GenLocated l e -> GenLocated l e # | |
| (Outputable l, Outputable e) => Outputable (GenLocated l e) | |
Defined in SrcLoc | |
| type SrcSpanLess (GenLocated l e) | |
Defined in SrcLoc | |
type Located = GenLocated SrcSpan #
type RealLocated = GenLocated RealSrcSpan #
type family SrcSpanLess a #
Determines the type of undecorated syntactic entities
For most syntactic entities E, where source location spans are
introduced by a wrapper construtor of the same syntactic entity,
we have `SrcSpanLess E = E`.
However, some syntactic entities have a different type compared to
a syntactic entity `e :: E` may have the type `Located E` when
decorated by wrapping it with `L sp e` for a source span sp.
Instances
| type SrcSpanLess Name | |
Defined in Name | |
| type SrcSpanLess (GenLocated l e) | |
Defined in SrcLoc | |
class HasSrcSpan a where #
A typeclass to set/get SrcSpans
Methods
composeSrcSpan :: Located (SrcSpanLess a) -> a #
Composes a SrcSpan decoration with an undecorated syntactic
entity to form its decorated variant
decomposeSrcSpan :: a -> Located (SrcSpanLess a) #
Decomposes a decorated syntactic entity into its SrcSpan
decoration and its undecorated variant
Instances
| HasSrcSpan Name | |
Defined in Name Methods composeSrcSpan :: Located (SrcSpanLess Name) -> Name # decomposeSrcSpan :: Name -> Located (SrcSpanLess Name) # | |
| HasSrcSpan (Located a) | |
Defined in SrcLoc Methods composeSrcSpan :: Located (SrcSpanLess (Located a)) -> Located a # decomposeSrcSpan :: Located a -> Located (SrcSpanLess (Located a)) # | |
assertPprPanic :: HasCallStack => String -> Int -> SDoc -> a #
Panic with an assertation failure, recording the given file and line number. Should typically be accessed with the ASSERT family of macros
pprSTrace :: HasCallStack => SDoc -> a -> a #
If debug output is on, show some SDoc on the screen along
with a call stack when available.
pprTraceException :: ExceptionMonad m => String -> SDoc -> m a -> m a #
pprTraceException desc x action runs action, printing a message
if it throws an exception.
pprTraceIt :: Outputable a => String -> a -> a #
pprTraceIt desc x is equivalent to pprTrace desc (ppr x) x
pprTraceWith :: String -> (a -> SDoc) -> a -> a #
pprTraceWith desc f x is equivalent to pprTrace desc (f x) x.
This allows you to print details from the returned value as well as from
ambient variables.
pprTraceM :: Applicative f => String -> SDoc -> f () #
pprTraceDebug :: String -> SDoc -> a -> a #
pprPgmError :: String -> SDoc -> a #
Throw an exception saying "bug in pgm being compiled" (used for unusual program errors)
pprPanic :: HasCallStack => String -> SDoc -> a #
Throw an exception saying "bug in GHC"
callStackDoc :: HasCallStack => SDoc #
Determines the form of to do appropriate for the length of a list:
doOrDoes [] = text "do" doOrDoes ["Hello"] = text "does" doOrDoes ["Hello", "World"] = text "do"
Determines the form of to be appropriate for the length of a list:
isOrAre [] = text "are" isOrAre ["Hello"] = text "is" isOrAre ["Hello", "World"] = text "are"
Determines the pluralisation suffix appropriate for the length of a list:
plural [] = char 's' plural ["Hello"] = empty plural ["Hello", "World"] = char 's'
speakNOf :: Int -> SDoc -> SDoc #
Converts an integer and object description to a statement about the multiplicity of those objects:
speakNOf 0 (text "melon") = text "no melons" speakNOf 1 (text "melon") = text "one melon" speakNOf 3 (text "melon") = text "three melons"
Converts an integer to a verbal multiplicity:
speakN 0 = text "none" speakN 5 = text "five" speakN 10 = text "10"
Converts an integer to a verbal index:
speakNth 1 = text "first" speakNth 5 = text "fifth" speakNth 21 = text "21st"
intWithCommas :: Integral a => a -> SDoc #
quotedListWithNor :: [SDoc] -> SDoc #
quotedListWithOr :: [SDoc] -> SDoc #
pprQuotedList :: Outputable a => [a] -> SDoc #
Returns the comma-separated concatenation of the quoted pretty printed things.
[x,y,z] ==> `x', `y', `z'
interpp'SP :: Outputable a => [a] -> SDoc #
Returns the comma-separated concatenation of the pretty printed things.
interppSP :: Outputable a => [a] -> SDoc #
Returns the separated concatenation of the pretty printed things.
pprFilePathString :: FilePath -> SDoc #
Normalise, escape and render a string representing a path
e.g. "c:\whatever"
pprFastFilePath :: FastString -> SDoc #
pprInfixVar :: Bool -> SDoc -> SDoc #
pprPrefixVar :: Bool -> SDoc -> SDoc #
pprPrimWord64 :: Integer -> SDoc #
pprPrimInt64 :: Integer -> SDoc #
pprPrimWord :: Integer -> SDoc #
pprPrimInt :: Integer -> SDoc #
pprPrimChar :: Char -> SDoc #
Special combinator for showing unboxed literals.
primInt64Suffix :: SDoc #
primWordSuffix :: SDoc #
primIntSuffix :: SDoc #
primFloatSuffix :: SDoc #
primCharSuffix :: SDoc #
pprHsBytes :: ByteString -> SDoc #
Special combinator for showing bytestring literals.
pprHsString :: FastString -> SDoc #
Special combinator for showing string literals.
coloured :: PprColour -> SDoc -> SDoc #
Apply the given colour/style for the argument.
Only takes effect if colours are enabled.
hangNotEmpty :: SDoc -> Int -> SDoc -> SDoc #
This behaves like hang, but does not indent the second document
when the header is empty.
A paragraph-fill combinator. It's much like sep, only it keeps fitting things on one line until it can't fit any more.
($$) :: SDoc -> SDoc -> SDoc #
Join two SDoc together vertically; if there is
no vertical overlap it "dovetails" the two onto one line
unicodeSyntax :: SDoc -> SDoc -> SDoc #
underscore :: SDoc #
angleBrackets :: SDoc -> SDoc #
doubleQuotes :: SDoc -> SDoc #
doublePrec :: Int -> Double -> SDoc #
doublePrec p n shows a floating point number n with p
digits of precision after the decimal point.
ztext :: FastZString -> SDoc #
ftext :: FastString -> SDoc #
showSDocDumpOneLine :: DynFlags -> SDoc -> String #
showSDocOneLine :: DynFlags -> SDoc -> String #
showSDocDebug :: DynFlags -> SDoc -> String #
showSDocDump :: DynFlags -> SDoc -> String #
showSDocForUser :: DynFlags -> PrintUnqualified -> SDoc -> String #
showSDocUnqual :: DynFlags -> SDoc -> String #
showPpr :: Outputable a => DynFlags -> a -> String #
mkCodeStyle :: CodeStyle -> PprStyle #
printForC :: DynFlags -> Handle -> SDoc -> IO () #
Like printSDocLn but specialized with LeftMode and
. This is typically used to output C-- code.PprCode CStyle
printForUserPartWay :: DynFlags -> Handle -> Int -> PrintUnqualified -> SDoc -> IO () #
printForUser :: DynFlags -> Handle -> PrintUnqualified -> SDoc -> IO () #
printSDocLn :: Mode -> DynFlags -> Handle -> PprStyle -> SDoc -> IO () #
Like printSDoc but appends an extra newline.
whenPprDebug :: SDoc -> SDoc #
Says what to do with -dppr-debug; without, return empty
ifPprDebug :: SDoc -> SDoc -> SDoc #
Says what to do with and without -dppr-debug
getPprDebug :: (Bool -> SDoc) -> SDoc #
debugStyle :: PprStyle -> Bool #
queryQual :: PprStyle -> PrintUnqualified #
qualName :: PprStyle -> QueryQualifyName #
sdocWithPlatform :: (Platform -> SDoc) -> SDoc #
sdocWithDynFlags :: (DynFlags -> SDoc) -> SDoc #
getPprStyle :: (PprStyle -> SDoc) -> SDoc #
pprSetDepth :: Depth -> SDoc -> SDoc #
pprDeeperList :: ([SDoc] -> SDoc) -> [SDoc] -> SDoc #
Truncate a list that is longer than the current depth.
withPprStyleDoc :: DynFlags -> PprStyle -> SDoc -> Doc #
This is not a recommended way to render SDoc, since it breaks the
abstraction layer of SDoc. Prefer to use printSDoc, printSDocLn,
bufLeftRenderSDoc, or renderWithStyle instead.
withPprStyle :: PprStyle -> SDoc -> SDoc #
initSDocContext :: DynFlags -> PprStyle -> SDocContext #
setStyleColoured :: Bool -> PprStyle -> PprStyle #
mkUserStyle :: DynFlags -> PrintUnqualified -> Depth -> PprStyle #
cmdlineParserStyle :: DynFlags -> PprStyle #
mkErrStyle :: DynFlags -> PrintUnqualified -> PprStyle #
Style for printing error messages
defaultErrStyle :: DynFlags -> PprStyle #
mkDumpStyle :: DynFlags -> PrintUnqualified -> PprStyle #
defaultDumpStyle :: DynFlags -> PprStyle #
defaultUserStyle :: DynFlags -> PprStyle #
alwaysQualifyNames :: QueryQualifyName #
NB: This won't ever show package IDs
data PrintUnqualified #
When printing code that contains original names, we need to map the
original names back to something the user understands. This is the
purpose of the triple of functions that gets passed around
when rendering SDoc.
Constructors
| QueryQualify | |
type QueryQualifyName = Module -> OccName -> QualifyName #
type QueryQualifyModule = Module -> Bool #
For a given module, we need to know whether to print it with a package name to disambiguate it.
type QueryQualifyPackage = UnitId -> Bool #
For a given package, we need to know whether to print it with the component id to disambiguate it.
data QualifyName #
Constructors
| NameUnqual | |
| NameQual ModuleName | |
| NameNotInScope1 | |
| NameNotInScope2 |
Instances
| Outputable QualifyName | |
Defined in Outputable | |
class Outputable a where #
Class designating that some type has an SDoc representation
Minimal complete definition
Nothing
Instances
data BindingSite #
BindingSite is used to tell the thing that prints binder what
language construct is binding the identifier. This can be used
to decide how much info to print.
Also see Note [Binding-site specific printing] in PprCore
Constructors
| LambdaBind | The x in (x. e) |
| CaseBind | The x in case scrut of x { (y,z) -> ... } |
| CasePatBind | The y,z in case scrut of x { (y,z) -> ... } |
| LetBind | The x in (let x = rhs in e) |
class Outputable a => OutputableBndr a where #
When we print a binder, we often want to print its type too.
The OutputableBndr class encapsulates this idea.
Minimal complete definition
Methods
pprBndr :: BindingSite -> a -> SDoc #
pprPrefixOcc :: a -> SDoc #
pprInfixOcc :: a -> SDoc #
bndrIsJoin_maybe :: a -> Maybe Int #
Instances
componentIdString :: DynFlags -> ComponentId -> Maybe String #
improveUnitId :: PackageConfigMap -> UnitId -> UnitId #
Given a fully instantiated UnitId, improve it into a
InstalledUnitId if we can find it in the package database.
getPackageConfigMap :: DynFlags -> PackageConfigMap #
Retrieve the PackageConfigMap from DynFlags; used
in the hs-boot loop-breaker.
data PackageState #
data PackageConfigMap #
UniqFM map from UnitId to PackageConfig, plus
the transitive closure of preload packages.
unitIdString :: UnitId -> String #
A Module is a pair of a UnitId and a ModuleName.
Module variables (i.e. H) which can be instantiated to a
specific module at some later point in time are represented
with moduleUnitId set to holeUnitId (this allows us to
avoid having to make moduleUnitId a partial operation.)
Constructors
| Module | |
Fields
| |
Instances
data ModuleName #
A ModuleName is essentially a simple string, e.g. Data.List.
Instances
A unit identifier identifies a (possibly partially) instantiated
library. It is primarily used as part of Module, which in turn
is used in Name, which is used to give names to entities when
typechecking.
There are two possible forms for a UnitId. It can be a
DefiniteUnitId, in which case we just have a string that uniquely
identifies some fully compiled, installed library we have on disk.
However, when we are typechecking a library with missing holes,
we may need to instantiate a library on the fly (in which case
we don't have any on-disk representation.) In that case, you
have an IndefiniteUnitId, which explicitly records the
instantiation, so that we can substitute over it.
Constructors
| IndefiniteUnitId !IndefUnitId | |
| DefiniteUnitId !DefUnitId |
Instances
newtype InstalledUnitId #
An installed unit identifier identifies a library which has
been installed to the package database. These strings are
provided to us via the -this-unit-id flag. The library
in question may be definite or indefinite; if it is indefinite,
none of the holes have been filled (we never install partially
instantiated libraries.) Put another way, an installed unit id
is either fully instantiated, or not instantiated at all.
Installed unit identifiers look something like p+af23SAj2dZ219,
or maybe just p if they don't use Backpack.
Constructors
| InstalledUnitId | |
Fields
| |
Instances
newtype ComponentId #
A ComponentId consists of the package name, package version, component
ID, the transitive dependencies of the component, and other information to
uniquely identify the source code and build configuration of a component.
This used to be known as an InstalledPackageId, but a package can contain
multiple components and a ComponentId uniquely identifies a component
within a package. When a package only has one component, the ComponentId
coincides with the InstalledPackageId
Constructors
| ComponentId FastString |
Instances
fsLit :: String -> FastString #
unpackPtrString :: PtrString -> String #
mkPtrString :: String -> PtrString #
mkPtrString# :: Addr# -> PtrString #
Wrap an unboxed address into a PtrString.
hPutFS :: Handle -> FastString -> IO () #
Outputs a FastString with no decoding at all, that is, you
get the actual bytes in the FastString written to the Handle.
getFastStringTable :: IO [[[FastString]]] #
isUnderscoreFS :: FastString -> Bool #
nilFS :: FastString #
uniqueOfFS :: FastString -> Int #
consFS :: Char -> FastString -> FastString #
tailFS :: FastString -> FastString #
headFS :: FastString -> Char #
concatFS :: [FastString] -> FastString #
appendFS :: FastString -> FastString -> FastString #
zEncodeFS :: FastString -> FastZString #
Returns a Z-encoded version of a FastString. This might be the
original, if it was already Z-encoded. The first time this
function is applied to a particular FastString, the results are
memoized.
unpackFS :: FastString -> String #
Unpacks and decodes the FastString
nullFS :: FastString -> Bool #
Returns True if the FastString is empty
lengthFS :: FastString -> Int #
Returns the length of the FastString in characters
mkFastStringByteList :: [Word8] -> FastString #
Creates a FastString from a UTF-8 encoded [Word8]
mkFastString :: String -> FastString #
Creates a UTF-8 encoded FastString from a String
mkFastStringByteString :: ByteString -> FastString #
Create a FastString from an existing ForeignPtr; the difference
between this and mkFastStringBytes is that we don't have to copy
the bytes if the string is new to the table.
mkFastStringForeignPtr :: Ptr Word8 -> ForeignPtr Word8 -> Int -> IO FastString #
Create a FastString from an existing ForeignPtr; the difference
between this and mkFastStringBytes is that we don't have to copy
the bytes if the string is new to the table.
mkFastStringBytes :: Ptr Word8 -> Int -> FastString #
mkFastString# :: Addr# -> FastString #
lengthFZS :: FastZString -> Int #
zString :: FastZString -> String #
hPutFZS :: Handle -> FastZString -> IO () #
unsafeMkByteString :: String -> ByteString #
bytesFS :: FastString -> ByteString #
Gives the UTF-8 encoded bytes corresponding to a FastString
data FastZString #
Instances
| NFData FastZString | |
Defined in FastString Methods rnf :: FastZString -> () # | |
data FastString #
A FastString is a UTF-8 encoded string together with a unique ID. All
FastStrings are stored in a global hashtable to support fast O(1)
comparison.
It is also associated with a lazy reference to the Z-encoding of this string which is used by the compiler internally.
Constructors
| FastString | |
Fields
| |
Instances
A PtrString is a pointer to some array of Latin-1 encoded chars.
overrideWith :: Bool -> OverridingBool -> Bool #
hashString :: String -> Int32 #
A sample hash function for Strings. We keep multiplying by the golden ratio and adding. The implementation is:
hashString = foldl' f golden
where f m c = fromIntegral (ord c) * magic + hashInt32 m
magic = 0xdeadbeefWhere hashInt32 works just as hashInt shown above.
Knuth argues that repeated multiplication by the golden ratio will minimize gaps in the hash space, and thus it's a good choice for combining together multiple keys to form one.
Here we know that individual characters c are often small, and this produces frequent collisions if we use ord c alone. A particular problem are the shorter low ASCII and ISO-8859-1 character strings. We pre-multiply by a magic twiddle factor to obtain a good distribution. In fact, given the following test:
testp :: Int32 -> Int
testp k = (n - ) . length . group . sort . map hs . take n $ ls
where ls = [] : [c : l | l <- ls, c <- ['\0'..'\xff']]
hs = foldl' f golden
f m c = fromIntegral (ord c) * k + hashInt32 m
n = 100000We discover that testp magic = 0.
abstractDataType :: String -> DataType #
abstractConstr :: String -> Constr #
makeRelativeTo :: FilePath -> FilePath -> FilePath #
escapeSpaces :: String -> String #
withAtomicRename :: MonadIO m => FilePath -> (FilePath -> m a) -> m a #
getModificationUTCTime :: FilePath -> IO UTCTime #
doesDirNameExist :: FilePath -> IO Bool #
readHexRational :: String -> Rational #
readRational :: String -> Rational #
looksLikePackageName :: String -> Bool #
looksLikeModuleName :: String -> Bool #
fuzzyLookup :: String -> [(String, a)] -> [a] #
Search for possible matches to the users input in the given list, returning a small number of ranked results
fuzzyMatch :: String -> [String] -> [String] #
removeSpaces :: String -> String #
capitalise :: String -> String #
Convert a word to title case by capitalising the first letter
snocView :: [a] -> Maybe ([a], a) #
Split a list into its last element and the initial part of the list.
snocView xs = Just (init xs, last xs) for non-empty lists.
snocView xs = Nothing otherwise.
Unless both parts of the result are guaranteed to be used
prefer separate calls to last + init.
If you are guaranteed to use both, this will
be more efficient.
spanEnd :: (a -> Bool) -> [a] -> ([a], [a]) #
spanEnd p l == reverse (span p (reverse l)). The first list
returns actually comes after the second list (when you look at the
input list).
dropWhileEndLE :: (a -> Bool) -> [a] -> [a] #
splitAtList :: [b] -> [a] -> ([a], [a]) #
countWhile :: (a -> Bool) -> [a] -> Int #
transitiveClosure :: (a -> [a]) -> (a -> a -> Bool) -> [a] -> [a] #
whenNonEmpty :: Applicative m => [a] -> (NonEmpty a -> m ()) -> m () #
changeLast :: [a] -> a -> [a] #
Replace the last element of a list with another element.
isSingleton :: [a] -> Bool #
compareLength :: [a] -> [b] -> Ordering #
equalLength :: [a] -> [b] -> Bool #
True if length xs == length ys
listLengthCmp :: [a] -> Int -> Ordering #
lengthLessThan :: [a] -> Int -> Bool #
(lengthLessThan xs n) == (length xs < n)
lengthAtMost :: [a] -> Int -> Bool #
(lengthAtMost xs n) = (length xs <= n)
lengthIsNot :: [a] -> Int -> Bool #
(lengthIsNot xs n) = (length xs /= n)
lengthAtLeast :: [a] -> Int -> Bool #
(lengthAtLeast xs n) = (length xs >= n)
lengthExceeds :: [a] -> Int -> Bool #
(lengthExceeds xs n) = (length xs > n)
atLength :: ([a] -> b) -> b -> [a] -> Int -> b #
atLength atLen atEnd ls n unravels list ls to position n. Precisely:
atLength atLenPred atEndPred ls n | n < 0 = atLenPred ls | length ls < n = atEndPred (n - length ls) | otherwise = atLenPred (drop n ls)
mapAccumL2 :: (s1 -> s2 -> a -> (s1, s2, b)) -> s1 -> s2 -> [a] -> (s1, s2, [b]) #
zipAndUnzip :: [a] -> [b] -> ([a], [b]) #
This has the effect of making the two lists have equal length by dropping the tail of the longer one.
zipWithAndUnzip :: (a -> b -> (c, d)) -> [a] -> [b] -> ([c], [d]) #
mapAndUnzip3 :: (a -> (b, c, d)) -> [a] -> ([b], [c], [d]) #
mapAndUnzip :: (a -> (b, c)) -> [a] -> ([b], [c]) #
stretchZipWith :: (a -> Bool) -> b -> (a -> b -> c) -> [a] -> [b] -> [c] #
stretchZipWith p z f xs ys stretches ys by inserting z in
the places where p returns True
partitionByList :: [Bool] -> [a] -> ([a], [a]) #
partitionByList takes a list of Bools and a list of some elements and
partitions the list according to the list of Bools. Elements corresponding
to True go to the left; elements corresponding to False go to the right.
For example, partitionByList [True, False, True] [1,2,3] == ([1,3], [2])
This function does not check whether the lists have equal
length; when one list runs out, the function stops.
filterByLists :: [Bool] -> [a] -> [a] -> [a] #
filterByLists takes a list of Bools and two lists as input, and
outputs a new list consisting of elements from the last two input lists. For
each Bool in the list, if it is True, then it takes an element from the
former list. If it is False, it takes an element from the latter list.
The elements taken correspond to the index of the Bool in its list.
For example:
filterByLists [True, False, True, False] "abcd" "wxyz" = "axcz"
This function does not check whether the lists have equal length.
filterByList :: [Bool] -> [a] -> [a] #
filterByList takes a list of Bools and a list of some elements and
filters out these elements for which the corresponding value in the list of
Bools is False. This function does not check whether the lists have equal
length.
zipWith3Lazy :: (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d] #
zipWith3Lazy is like zipWith3 but is lazy in the second and third lists.
The length of the output is always the same as the length of the first
list.
zipWithLazy :: (a -> b -> c) -> [a] -> [b] -> [c] #
zipWithLazy is like zipWith but is lazy in the second list.
The length of the output is always the same as the length of the first
list.
zipWith4Equal :: String -> (a -> b -> c -> d -> e) -> [a] -> [b] -> [c] -> [d] -> [e] #
zipWith3Equal :: String -> (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d] #
zipWithEqual :: String -> (a -> b -> c) -> [a] -> [b] -> [c] #
partitionWith :: (a -> Either b c) -> [a] -> ([b], [c]) #
Uses a function to determine which of two output lists an input element should join
nTimes :: Int -> (a -> a) -> a -> a #
A for loop: Compose a function with itself n times. (nth rather than twice)
isDarwinHost :: Bool #
isWindowsHost :: Bool #
ghciSupported :: Bool #
type HasDebugCallStack = () #
A call stack constraint, but only when isDebugOn.
data OverridingBool #
Instances
| Show OverridingBool | |
Defined in Util Methods showsPrec :: Int -> OverridingBool -> ShowS # show :: OverridingBool -> String # showList :: [OverridingBool] -> ShowS # | |
isTupleTyCon :: TyCon -> Bool #
Does this TyCon represent a tuple?
NB: when compiling Data.Tuple, the tycons won't reply True to
isTupleTyCon, because they are built as AlgTyCons. However they
get spat into the interface file as tuple tycons, so I don't think
it matters.
isUnboxedTupleTyCon :: TyCon -> Bool #
Is this the TyCon for an unboxed tuple?
isFunTyCon :: TyCon -> Bool #
TyCons represent type constructors. Type constructors are introduced by things such as:
1) Data declarations: data Foo = ... creates the Foo type constructor of
kind *
2) Type synonyms: type Foo = ... creates the Foo type constructor
3) Newtypes: newtype Foo a = MkFoo ... creates the Foo type constructor
of kind * -> *
4) Class declarations: class Foo where creates the Foo type constructor
of kind *
This data type also encodes a number of primitive, built in type constructors such as those for function and tuple types.
Instances
| Eq TyCon | |
| Data TyCon | |
Defined in TyCon Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TyCon -> c TyCon # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TyCon # dataTypeOf :: TyCon -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TyCon) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TyCon) # gmapT :: (forall b. Data b => b -> b) -> TyCon -> TyCon # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TyCon -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TyCon -> r # gmapQ :: (forall d. Data d => d -> u) -> TyCon -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> TyCon -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> TyCon -> m TyCon # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TyCon -> m TyCon # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TyCon -> m TyCon # | |
| NamedThing TyCon | |
| Uniquable TyCon | |
| Outputable TyCon | |
sGhcRtsWithLibdw :: Settings -> Bool #
sGhcDebugged :: Settings -> Bool #
sGhcThreaded :: Settings -> Bool #
sLeadingUnderscore :: Settings -> Bool #
sTablesNextToCode :: Settings -> Bool #
sGhcRTSWays :: Settings -> String #
sGhcWithSMP :: Settings -> Bool #
sGhcWithNativeCodeGen :: Settings -> Bool #
sGhcWithInterpreter :: Settings -> Bool #
sIntegerLibrary :: Settings -> String #
sTargetPlatformString :: Settings -> String #
sExtraGccViaCFlags :: Settings -> [String] #
sOpt_windres :: Settings -> [String] #
sPgm_ranlib :: Settings -> String #
sPgm_libtool :: Settings -> String #
sPgm_windres :: Settings -> String #
sGccSupportsNoPie :: Settings -> Bool #
sLdIsGnuLd :: Settings -> Bool #
sLdSupportsFilelist :: Settings -> Bool #
sLdSupportsBuildId :: Settings -> Bool #
sGhciUsagePath :: Settings -> FilePath #
sGhcUsagePath :: Settings -> FilePath #
sProjectVersion :: Settings -> String #
sProgramName :: Settings -> String #
Constructors
| Settings | |
Fields | |
data LoadedPlugin #
A plugin with its arguments. The result of loading the plugin.
Constructors
| LoadedPlugin | |
Fields
| |
data StaticPlugin #
A static plugin with its arguments. For registering compiled-in plugins through the GHC API.
Constructors
| StaticPlugin | |
Fields
| |
data PlatformConstants #
Constructors
Instances
| Read PlatformConstants | |
Defined in PlatformConstants Methods readsPrec :: Int -> ReadS PlatformConstants # readList :: ReadS [PlatformConstants] # | |
assertPanic :: String -> Int -> a #
Throw a failed assertion exception for a given filename and line number.
showSDocUnsafe :: SDoc -> String #
warnPprTrace :: HasCallStack => Bool -> String -> Int -> SDoc -> a -> a #
Just warn about an assertion failure, recording the given file and line number. Should typically be accessed with the WARN macros
Represents a pretty-printable document.
To display an SDoc, use printSDoc, printSDocLn, bufLeftRenderSDoc,
or renderWithStyle. Avoid calling runSDoc directly as it breaks the
abstraction layer.
Instances
| IsString SDoc | |
Defined in Outputable Methods fromString :: String -> SDoc # | |
| Outputable SDoc | |
Occurrence Name
In this context that means: "classified (i.e. as a type name, value name, etc) but not qualified and not yet resolved"
Instances
| Eq OccName | |
| Data OccName | |
Defined in OccName Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> OccName -> c OccName # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c OccName # toConstr :: OccName -> Constr # dataTypeOf :: OccName -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c OccName) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c OccName) # gmapT :: (forall b. Data b => b -> b) -> OccName -> OccName # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> OccName -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> OccName -> r # gmapQ :: (forall d. Data d => d -> u) -> OccName -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> OccName -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> OccName -> m OccName # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> OccName -> m OccName # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> OccName -> m OccName # | |
| Ord OccName | |
| NFData OccName | |
| HasOccName OccName | |
| Binary OccName | |
| Uniquable OccName | |
| Outputable OccName | |
| OutputableBndr OccName | |
Defined in OccName Methods pprBndr :: BindingSite -> OccName -> SDoc # pprPrefixOcc :: OccName -> SDoc # pprInfixOcc :: OccName -> SDoc # bndrIsJoin_maybe :: OccName -> Maybe Int # | |
A unique, unambiguous name for something, containing information about where that thing originated.
Instances
| Eq Name | |
| Data Name | |
Defined in Name Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Name -> c Name # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Name # dataTypeOf :: Name -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Name) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Name) # gmapT :: (forall b. Data b => b -> b) -> Name -> Name # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Name -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Name -> r # gmapQ :: (forall d. Data d => d -> u) -> Name -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Name -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Name -> m Name # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Name -> m Name # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Name -> m Name # | |
| Ord Name | Caution: This instance is implemented via See |
| NFData Name | |
| NamedThing Name | |
| HasOccName Name | |
| Binary Name | Assumes that the |
| Uniquable Name | |
| HasSrcSpan Name | |
Defined in Name Methods composeSrcSpan :: Located (SrcSpanLess Name) -> Name # decomposeSrcSpan :: Name -> Located (SrcSpanLess Name) # | |
| Outputable Name | |
| OutputableBndr Name | |
Defined in Name Methods pprBndr :: BindingSite -> Name -> SDoc # pprPrefixOcc :: Name -> SDoc # pprInfixOcc :: Name -> SDoc # bndrIsJoin_maybe :: Name -> Maybe Int # | |
| type SrcSpanLess Name | |
Defined in Name | |
When invoking external tools as part of the compilation pipeline, we pass these a sequence of options on the command-line. Rather than just using a list of Strings, we use a type that allows us to distinguish between filepaths and 'other stuff'. The reason for this is that this type gives us a handle on transforming filenames, and filenames only, to whatever format they're expected to be on a particular platform.
Constructors
| FileOption String String | |
| Option String |
useUnicodeSyntax :: DynFlags -> Bool #
An internal helper to check whether to use unicode syntax for output.
Note: You should very likely be using unicodeSyntax instead
of this function.
useStarIsType :: DynFlags -> Bool #
shouldUseColor :: DynFlags -> Bool #
hasPprDebug :: DynFlags -> Bool #
hasNoDebugOutput :: DynFlags -> Bool #
Contains not only a collection of GeneralFlags but also a plethora of
information relating to the compilation of a single file or GHC session
Constructors
| DynFlags | |
Fields
| |
Constructors
Instances
| Enum DumpFlag | |
| Eq DumpFlag | |
| Show DumpFlag | |
data GeneralFlag #
Enumerates the simple on-or-off dynamic flags
Constructors
Instances
| Enum GeneralFlag | |
Defined in DynFlags Methods succ :: GeneralFlag -> GeneralFlag # pred :: GeneralFlag -> GeneralFlag # toEnum :: Int -> GeneralFlag # fromEnum :: GeneralFlag -> Int # enumFrom :: GeneralFlag -> [GeneralFlag] # enumFromThen :: GeneralFlag -> GeneralFlag -> [GeneralFlag] # enumFromTo :: GeneralFlag -> GeneralFlag -> [GeneralFlag] # enumFromThenTo :: GeneralFlag -> GeneralFlag -> GeneralFlag -> [GeneralFlag] # | |
| Eq GeneralFlag | |
Defined in DynFlags | |
| Show GeneralFlag | |
Defined in DynFlags Methods showsPrec :: Int -> GeneralFlag -> ShowS # show :: GeneralFlag -> String # showList :: [GeneralFlag] -> ShowS # | |
data FileSettings #
Paths to various files and directories used by GHC, including those that provide more settings.
foldRightWithKey :: (key -> elt -> a -> a) -> a -> Map key elt -> a #
deleteList :: Ord key => [key] -> Map key elt -> Map key elt #
insertListWith :: Ord key => (elt -> elt -> elt) -> [(key, elt)] -> Map key elt -> Map key elt #
insertList :: Ord key => [(key, elt)] -> Map key elt -> Map key elt #
data InstalledPackageInfo compid srcpkgid srcpkgname instunitid unitid modulename mod #
This is a subset of Cabal's InstalledPackageInfo, with just the bits
that GHC is interested in. See Cabal's documentation for a more detailed
description of all of the fields.
Constructors
| InstalledPackageInfo | |
Fields
| |
Instances
| (Eq instunitid, Eq compid, Eq modulename, Eq mod, Eq srcpkgid, Eq srcpkgname) => Eq (InstalledPackageInfo compid srcpkgid srcpkgname instunitid unitid modulename mod) | |
Defined in GHC.PackageDb Methods (==) :: InstalledPackageInfo compid srcpkgid srcpkgname instunitid unitid modulename mod -> InstalledPackageInfo compid srcpkgid srcpkgname instunitid unitid modulename mod -> Bool # (/=) :: InstalledPackageInfo compid srcpkgid srcpkgname instunitid unitid modulename mod -> InstalledPackageInfo compid srcpkgid srcpkgname instunitid unitid modulename mod -> Bool # | |
| (Show instunitid, Show compid, Show modulename, Show mod, Show srcpkgid, Show srcpkgname) => Show (InstalledPackageInfo compid srcpkgid srcpkgname instunitid unitid modulename mod) | |
Defined in GHC.PackageDb Methods showsPrec :: Int -> InstalledPackageInfo compid srcpkgid srcpkgname instunitid unitid modulename mod -> ShowS # show :: InstalledPackageInfo compid srcpkgid srcpkgname instunitid unitid modulename mod -> String # showList :: [InstalledPackageInfo compid srcpkgid srcpkgname instunitid unitid modulename mod] -> ShowS # | |
| RepInstalledPackageInfo a b c d e f g => Binary (InstalledPackageInfo a b c d e f g) | |
Defined in GHC.PackageDb Methods put :: InstalledPackageInfo a b c d e f g -> Put # get :: Get (InstalledPackageInfo a b c d e f g) # putList :: [InstalledPackageInfo a b c d e f g] -> Put # | |
data IntegerLibrary #
Constructors
| IntegerGMP | |
| IntegerSimple |
Instances
| Eq IntegerLibrary | |
Defined in GHC.Platform Methods (==) :: IntegerLibrary -> IntegerLibrary -> Bool # (/=) :: IntegerLibrary -> IntegerLibrary -> Bool # | |
| Read IntegerLibrary | |
Defined in GHC.Platform Methods readsPrec :: Int -> ReadS IntegerLibrary # readList :: ReadS [IntegerLibrary] # | |
| Show IntegerLibrary | |
Defined in GHC.Platform Methods showsPrec :: Int -> IntegerLibrary -> ShowS # show :: IntegerLibrary -> String # showList :: [IntegerLibrary] -> ShowS # | |
data PlatformMisc #
Platform-specific settings formerly hard-coded in Config.hs.
These should probably be all be triaged whether they can be computed from
other settings or belong in another another place (like Platform above).
Constructors
| PlatformMisc | |
Fields
| |
data ForeignSrcLang #
Foreign formats supported by GHC via TH
Constructors
| LangC | C |
| LangCxx | C++ |
| LangObjc | Objective C |
| LangObjcxx | Objective C++ |
| LangAsm | Assembly language (.s) |
| RawObject | Object (.o) |