Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Debug.Breakpoint.GhcFacade
Synopsis
- class Monad m => MonadFix (m :: Type -> Type) where
- mfix :: (a -> m a) -> m a
- class Functor f => Applicative (f :: Type -> Type) where
- data Plugin = Plugin {
- installCoreToDos :: CorePlugin
- tcPlugin :: TcPlugin
- holeFitPlugin :: HoleFitPlugin
- driverPlugin :: [CommandLineOption] -> HscEnv -> IO HscEnv
- 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 {}
- class Monad m => MonadIO (m :: Type -> Type) where
- mapAndUnzipM :: Applicative m => (a -> m (b, c)) -> [a] -> m ([b], [c])
- data IORef a
- foldrM :: (Foldable t, Monad m) => (a -> b -> m b) -> b -> t a -> m b
- foldlM :: (Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m b
- (<$>) :: Functor f => (a -> b) -> f a -> f b
- pprTypeForUser :: Type -> SDoc
- pprTyThingLoc :: TyThing -> SDoc
- pprTyThingInContextLoc :: TyThing -> SDoc
- pprTyThingInContext :: ShowSub -> TyThing -> SDoc
- pprTyThingHdr :: TyThing -> SDoc
- pprTyThing :: ShowSub -> TyThing -> SDoc
- pprFamInst :: FamInst -> SDoc
- rnValBindsRHS :: HsSigCtxt -> HsValBindsLR GhcRn GhcPs -> RnM (HsValBinds GhcRn, DefUses)
- rnTopBindsLHS :: MiniFixityEnv -> HsValBinds GhcPs -> RnM (HsValBindsLR GhcRn GhcPs)
- rnTopBindsBoot :: NameSet -> HsValBindsLR GhcRn GhcPs -> RnM (HsValBinds GhcRn, DefUses)
- rnSrcFixityDecl :: HsSigCtxt -> FixitySig GhcPs -> RnM (FixitySig GhcRn)
- rnMethodBinds :: Bool -> Name -> [Name] -> LHsBinds GhcPs -> [LSig GhcPs] -> RnM (LHsBinds GhcRn, [LSig GhcRn], FreeVars)
- rnMatchGroup :: (Outputable (body GhcPs), AnnoBody body) => HsMatchContext GhcRn -> (LocatedA (body GhcPs) -> RnM (LocatedA (body GhcRn), FreeVars)) -> MatchGroup GhcPs (LocatedA (body GhcPs)) -> RnM (MatchGroup GhcRn (LocatedA (body GhcRn)), FreeVars)
- rnLocalValBindsRHS :: NameSet -> HsValBindsLR GhcRn GhcPs -> RnM (HsValBinds GhcRn, DefUses)
- rnLocalValBindsLHS :: MiniFixityEnv -> HsValBinds GhcPs -> RnM ([Name], HsValBindsLR GhcRn GhcPs)
- rnLocalBindsAndThen :: HsLocalBinds GhcPs -> (HsLocalBinds GhcRn -> FreeVars -> RnM (result, FreeVars)) -> RnM (result, FreeVars)
- rnGRHSs :: AnnoBody body => HsMatchContext GhcRn -> (LocatedA (body GhcPs) -> RnM (LocatedA (body GhcRn), FreeVars)) -> GRHSs GhcPs (LocatedA (body GhcPs)) -> RnM (GRHSs GhcRn (LocatedA (body GhcRn)), FreeVars)
- rnGRHS :: AnnoBody body => HsMatchContext GhcRn -> (LocatedA (body GhcPs) -> RnM (LocatedA (body GhcRn), FreeVars)) -> LGRHS GhcPs (LocatedA (body GhcPs)) -> RnM (LGRHS GhcRn (LocatedA (body GhcRn)), FreeVars)
- renameSigs :: HsSigCtxt -> [LSig GhcPs] -> RnM ([LSig GhcRn], FreeVars)
- makeMiniFixityEnv :: [LFixitySig GhcPs] -> RnM MiniFixityEnv
- data HsSigCtxt
- type MiniFixityEnv = FastStringEnv (Located Fixity)
- data PluginWithArgs = PluginWithArgs {}
- data PluginRecompile
- type FrontendPluginAction = [String] -> [(String, Maybe Phase)] -> Ghc ()
- type CorePlugin = [CommandLineOption] -> [CoreToDo] -> CoreM [CoreToDo]
- type CommandLineOption = String
- withPlugins_ :: Monad m => HscEnv -> ConstPluginOperation m a -> a -> m ()
- withPlugins :: Monad m => HscEnv -> PluginOperation m a -> a -> m a
- purePlugin :: [CommandLineOption] -> IO PluginRecompile
- plugins :: HscEnv -> [PluginWithArgs]
- pluginRecompile' :: PluginWithArgs -> IO PluginRecompile
- mapPlugins :: HscEnv -> (Plugin -> [CommandLineOption] -> a) -> [a]
- lpModuleName :: LoadedPlugin -> ModuleName
- keepRenamedSource :: [CommandLineOption] -> TcGblEnv -> HsGroup GhcRn -> TcM (TcGblEnv, HsGroup GhcRn)
- impurePlugin :: [CommandLineOption] -> IO PluginRecompile
- flagRecompile :: [CommandLineOption] -> IO PluginRecompile
- defaultPlugin :: Plugin
- defaultFrontendPlugin :: FrontendPlugin
- data HoleFitPluginR
- newtype NameCacheUpdater = NCU {
- updateNameCache :: forall c. (NameCache -> (NameCache, c)) -> IO c
- updNameCacheTc :: Module -> OccName -> (NameCache -> (NameCache, c)) -> TcRnIf a b c
- updNameCache :: IORef NameCache -> (NameCache -> (NameCache, c)) -> IO c
- tcIfaceTyVar :: FastString -> IfL TyVar
- tcIfaceLclId :: FastString -> IfL Id
- setNameModule :: Maybe Module -> Name -> TcRnIf m n Name
- newInteractiveBinder :: HscEnv -> OccName -> SrcSpan -> IO Name
- newIfaceNames :: [OccName] -> IfL [Name]
- newIfaceName :: OccName -> IfL Name
- newGlobalBinder :: Module -> OccName -> SrcSpan -> TcRnIf a b Name
- mkNameCacheUpdater :: TcRnIf a b NameCacheUpdater
- lookupOrigIO :: HscEnv -> Module -> OccName -> IO Name
- lookupOrig :: Module -> OccName -> TcRnIf a b Name
- lookupIfaceVar :: IfaceBndr -> IfL (Maybe TyCoVar)
- lookupIfaceTyVar :: IfaceTvBndr -> IfL (Maybe TyVar)
- lookupIfaceTop :: OccName -> IfL Name
- ifaceExportNames :: [IfaceExport] -> TcRnIf gbl lcl [AvailInfo]
- externaliseName :: Module -> Name -> TcRnIf m n Name
- extendIfaceTyVarEnv :: [TyVar] -> IfL a -> IfL a
- extendIfaceIdEnv :: [Id] -> IfL a -> IfL a
- extendIfaceEnvs :: [TyCoVar] -> IfL a -> IfL a
- allocateGlobalBinder :: NameCache -> Module -> OccName -> SrcSpan -> (NameCache, Name)
- data IsExtraConstraint
- xoptM :: Extension -> TcRnIf gbl lcl Bool
- writeTcRef :: TcRef a -> a -> TcRnIf gbl lcl ()
- wrapLocSndMA :: (a -> TcM (b, c)) -> LocatedA a -> TcM (b, LocatedA c)
- wrapLocSndM :: (a -> TcM (b, c)) -> Located a -> TcM (b, Located c)
- wrapLocM_ :: (a -> TcM ()) -> Located a -> TcM ()
- wrapLocMA_ :: (a -> TcM ()) -> LocatedA a -> TcM ()
- wrapLocMA :: (a -> TcM b) -> GenLocated (SrcSpanAnn' ann) a -> TcRn (GenLocated (SrcSpanAnn' ann) b)
- wrapLocM :: (a -> TcM b) -> Located a -> TcM (Located b)
- wrapLocFstMA :: (a -> TcM (b, c)) -> LocatedA a -> TcM (LocatedA b, c)
- wrapLocFstM :: (a -> TcM (b, c)) -> Located a -> TcM (Located b, c)
- wrapLocAM :: (a -> TcM b) -> LocatedAn an a -> TcM (Located b)
- woptM :: WarningFlag -> TcRnIf gbl lcl Bool
- withoutDynamicNow :: TcRnIf gbl lcl a -> TcRnIf gbl lcl a
- withException :: TcRnIf gbl lcl (MaybeErr SDoc a) -> TcRnIf gbl lcl a
- withDynamicNow :: TcRnIf gbl lcl a -> TcRnIf gbl lcl a
- whenXOptM :: Extension -> TcRnIf gbl lcl () -> TcRnIf gbl lcl ()
- whenWOptM :: WarningFlag -> TcRnIf gbl lcl () -> TcRnIf gbl lcl ()
- whenNoErrs :: TcM () -> TcM ()
- whenGOptM :: GeneralFlag -> TcRnIf gbl lcl () -> TcRnIf gbl lcl ()
- whenDOptM :: DumpFlag -> TcRnIf gbl lcl () -> TcRnIf gbl lcl ()
- warnTcM :: WarnReason -> Bool -> (TidyEnv, SDoc) -> TcM ()
- warnTc :: WarnReason -> Bool -> SDoc -> TcM ()
- warnIfFlag :: WarningFlag -> Bool -> SDoc -> TcRn ()
- warnIf :: Bool -> SDoc -> TcRn ()
- updateEps_ :: (ExternalPackageState -> ExternalPackageState) -> TcRnIf gbl lcl ()
- updateEps :: (ExternalPackageState -> (ExternalPackageState, a)) -> TcRnIf gbl lcl a
- updTopEnv :: (HscEnv -> HscEnv) -> TcRnIf gbl lcl a -> TcRnIf gbl lcl a
- updTcRef :: TcRef a -> (a -> a) -> TcRnIf gbl lcl ()
- updLclEnv :: (lcl -> lcl) -> TcRnIf gbl lcl a -> TcRnIf gbl lcl a
- updGblEnv :: (gbl -> gbl) -> TcRnIf gbl lcl a -> TcRnIf gbl lcl a
- unsetXOptM :: Extension -> TcRnIf gbl lcl a -> TcRnIf gbl lcl a
- unsetWOptM :: WarningFlag -> TcRnIf gbl lcl a -> TcRnIf gbl lcl a
- unsetGOptM :: GeneralFlag -> TcRnIf gbl lcl a -> TcRnIf gbl lcl a
- unlessXOptM :: Extension -> TcRnIf gbl lcl () -> TcRnIf gbl lcl ()
- tryTcDiscardingErrs :: TcM r -> TcM r -> TcM r
- tryTc :: TcRn a -> TcRn (Maybe a, Messages DecoratedSDoc)
- tryCaptureConstraints :: TcM a -> TcM (Maybe a, WantedConstraints)
- traceTcConstraints :: String -> TcM ()
- traceTc :: String -> SDoc -> TcRn ()
- traceRn :: String -> SDoc -> TcRn ()
- traceOptTcRn :: DumpFlag -> SDoc -> TcRn ()
- traceOptIf :: DumpFlag -> SDoc -> TcRnIf m n ()
- traceIf :: SDoc -> TcRnIf m n ()
- traceHiDiffs :: SDoc -> TcRnIf m n ()
- tcSelfBootInfo :: TcRn SelfBootInfo
- tcScalingUsage :: Mult -> TcM a -> TcM a
- tcIsHsig :: TcRn Bool
- tcIsHsBootOrSig :: TcRn Bool
- tcEmitBindingUsage :: UsageEnv -> TcM ()
- tcCollectingUsage :: TcM a -> TcM (UsageEnv, a)
- setXOptM :: Extension -> TcRnIf gbl lcl a -> TcRnIf gbl lcl a
- setTcLevel :: TcLevel -> TcM a -> TcM a
- setTcEvBindsMap :: EvBindsVar -> EvBindMap -> TcM ()
- setStage :: ThStage -> TcM a -> TcRn a
- setSrcSpanA :: SrcSpanAnn' ann -> TcRn a -> TcRn a
- setSrcSpan :: SrcSpan -> TcRn a -> TcRn a
- setLocalRdrEnv :: LocalRdrEnv -> RnM a -> RnM a
- setLclTypeEnv :: TcLclEnv -> TcM a -> TcM a
- setLclEnv :: lcl' -> TcRnIf gbl lcl' a -> TcRnIf gbl lcl a
- setImplicitEnvM :: TypeEnv -> IfL a -> IfL a
- setGblEnv :: gbl -> TcRnIf gbl lcl a -> TcRnIf gbl lcl a
- setErrsVar :: TcRef (Messages DecoratedSDoc) -> TcRn a -> TcRn a
- setErrCtxt :: [ErrCtxt] -> TcM a -> TcM a
- setEnvs :: (gbl', lcl') -> TcRnIf gbl' lcl' a -> TcRnIf gbl lcl a
- setCtLocM :: CtLoc -> TcM a -> TcM a
- setConstraintVar :: TcRef WantedConstraints -> TcM a -> TcM a
- reportWarning :: WarnReason -> MsgEnvelope DecoratedSDoc -> TcRn ()
- reportErrors :: [MsgEnvelope DecoratedSDoc] -> TcM ()
- reportError :: MsgEnvelope DecoratedSDoc -> TcRn ()
- recoverM :: TcRn r -> TcRn r -> TcRn r
- recordUnsafeInfer :: WarningMessages -> TcM ()
- recordThUse :: TcM ()
- recordThSpliceUse :: TcM ()
- readTcRef :: TcRef a -> TcRnIf gbl lcl a
- pushTcLevelsM :: Int -> TcM a -> TcM (a, TcLevel)
- pushTcLevelM_ :: TcM a -> TcM a
- pushTcLevelM :: TcM a -> TcM (TcLevel, a)
- pushLevelAndCaptureConstraints :: TcM a -> TcM (TcLevel, WantedConstraints, a)
- printForUserTcRn :: SDoc -> TcRn ()
- popErrCtxt :: TcM a -> TcM a
- newUniqueSupply :: TcRnIf gbl lcl UniqSupply
- newUnique :: TcRnIf gbl lcl Unique
- newTcRef :: a -> TcRnIf gbl lcl (TcRef a)
- newTcEvBinds :: TcM EvBindsVar
- newSysName :: OccName -> TcRnIf gbl lcl Name
- newSysLocalIds :: FastString -> [Scaled TcType] -> TcRnIf gbl lcl [TcId]
- newSysLocalId :: FastString -> Mult -> TcType -> TcRnIf gbl lcl TcId
- newNoTcEvBinds :: TcM EvBindsVar
- newNameAt :: OccName -> SrcSpan -> TcM Name
- newName :: OccName -> TcM Name
- newArrowScope :: TcM a -> TcM a
- mkLongErrAt :: SrcSpan -> SDoc -> SDoc -> TcRn (MsgEnvelope DecoratedSDoc)
- mkIfLclEnv :: Module -> SDoc -> IsBootInterface -> IfLclEnv
- mkErrInfo :: TidyEnv -> [ErrCtxt] -> TcM SDoc
- mkDecoratedSDocAt :: SrcSpan -> SDoc -> SDoc -> SDoc -> TcRn (MsgEnvelope DecoratedSDoc)
- mapAndReportM :: (a -> TcRn b) -> [a] -> TcRn [b]
- mapAndRecoverM :: (a -> TcRn b) -> [a] -> TcRn [b]
- keepAlive :: Name -> TcRn ()
- isTouchableTcM :: TcTyVar -> TcM Bool
- initTcWithGbl :: HscEnv -> TcGblEnv -> RealSrcSpan -> TcM r -> IO (Messages DecoratedSDoc, Maybe r)
- initTcRnIf :: Char -> HscEnv -> gbl -> lcl -> TcRnIf gbl lcl a -> IO a
- initTcInteractive :: HscEnv -> TcM a -> IO (Messages DecoratedSDoc, Maybe a)
- initTc :: HscEnv -> HscSource -> Bool -> Module -> RealSrcSpan -> TcM r -> IO (Messages DecoratedSDoc, Maybe r)
- initIfaceTcRn :: IfG a -> TcRn a
- initIfaceLoad :: HscEnv -> IfG a -> IO a
- initIfaceLclWithSubst :: Module -> SDoc -> IsBootInterface -> NameShape -> IfL a -> IfM lcl a
- initIfaceLcl :: Module -> SDoc -> IsBootInterface -> IfL a -> IfM lcl a
- initIfaceCheck :: SDoc -> HscEnv -> IfG a -> IO a
- inGeneratedCode :: TcRn Bool
- ifErrsM :: TcRn r -> TcRn r -> TcRn r
- goptM :: GeneralFlag -> TcRnIf gbl lcl Bool
- getTopEnv :: TcRnIf gbl lcl HscEnv
- getTcLevel :: TcM TcLevel
- getTcEvTyCoVars :: EvBindsVar -> TcM TyCoVarSet
- getTcEvBindsMap :: EvBindsVar -> TcM EvBindMap
- getStageAndBindLevel :: Name -> TcRn (Maybe (TopLevelFlag, ThLevel, ThStage))
- getStage :: TcM ThStage
- getSrcSpanM :: TcRn SrcSpan
- getRecFieldEnv :: TcRn RecFieldEnv
- getRdrEnvs :: TcRn (GlobalRdrEnv, LocalRdrEnv)
- getPrintUnqualified :: TcRn PrintUnqualified
- getLocalRdrEnv :: RnM LocalRdrEnv
- getLclTypeEnv :: TcM TcTypeEnv
- getLclEnv :: TcRnIf gbl lcl lcl
- getIsGHCi :: TcRn Bool
- getInteractivePrintName :: TcRn Name
- getImports :: TcRn ImportAvails
- getIfModule :: IfL Module
- getHpt :: TcRnIf gbl lcl HomePackageTable
- getGlobalRdrEnv :: TcRn GlobalRdrEnv
- getGhcMode :: TcRnIf gbl lcl GhcMode
- getGblEnv :: TcRnIf gbl lcl gbl
- getGHCiMonad :: TcRn Name
- getFixityEnv :: TcRn FixityEnv
- getErrsVar :: TcRn (TcRef (Messages DecoratedSDoc))
- getErrCtxt :: TcM [ErrCtxt]
- getEpsVar :: TcRnIf gbl lcl (TcRef ExternalPackageState)
- getEpsAndHpt :: TcRnIf gbl lcl (ExternalPackageState, HomePackageTable)
- getEps :: TcRnIf gbl lcl ExternalPackageState
- getEnvs :: TcRnIf gbl lcl (gbl, lcl)
- getDeclaredDefaultTys :: TcRn (Maybe [Type])
- getCtLocM :: CtOrigin -> Maybe TypeOrKind -> TcM CtLoc
- getConstraintVar :: TcM (TcRef WantedConstraints)
- getCCIndexTcM :: FastString -> TcM CostCentreIndex
- getCCIndexM :: (gbl -> TcRef CostCentreState) -> FastString -> TcRnIf gbl lcl CostCentreIndex
- forkM_maybe :: SDoc -> IfL a -> IfL (Maybe a)
- forkM :: SDoc -> IfL a -> IfL a
- foldAndRecoverM :: (b -> a -> TcRn b) -> b -> [a] -> TcRn b
- fixSafeInstances :: SafeHaskellMode -> [ClsInst] -> [ClsInst]
- finalSafeMode :: DynFlags -> TcGblEnv -> IO SafeHaskellMode
- failWithTcM :: (TidyEnv, SDoc) -> TcM a
- failWithTc :: SDoc -> TcM a
- failWith :: SDoc -> TcRn a
- failIfTcM :: Bool -> (TidyEnv, SDoc) -> TcM ()
- failIfTc :: Bool -> SDoc -> TcM ()
- failIfM :: SDoc -> IfL a
- failIfErrsM :: TcRn ()
- failAt :: SrcSpan -> SDoc -> TcRn a
- extendFixityEnv :: [(Name, FixItem)] -> RnM a -> RnM a
- escapeArrowScope :: TcM a -> TcM a
- emitStaticConstraints :: WantedConstraints -> TcM ()
- emitSimples :: Cts -> TcM ()
- emitSimple :: Ct -> TcM ()
- emitNamedTypeHole :: (Name, TcTyVar) -> TcM ()
- emitInsoluble :: Ct -> TcM ()
- emitImplications :: Bag Implication -> TcM ()
- emitImplication :: Implication -> TcM ()
- emitHoles :: Bag Hole -> TcM ()
- emitHole :: Hole -> TcM ()
- emitConstraints :: WantedConstraints -> TcM ()
- emitAnonTypeHole :: IsExtraConstraint -> TcTyVar -> TcM ()
- dumpTcRn :: Bool -> DumpFlag -> String -> DumpFormat -> SDoc -> TcRn ()
- dumpOptTcRn :: DumpFlag -> String -> DumpFormat -> SDoc -> TcRn ()
- doptM :: DumpFlag -> TcRnIf gbl lcl Bool
- discardWarnings :: TcRn a -> TcRn a
- discardResult :: TcM a -> TcM ()
- discardErrs :: TcRn a -> TcRn a
- discardConstraints :: TcM a -> TcM a
- debugTc :: TcM () -> TcM ()
- cloneLocalName :: Name -> TcM Name
- cloneEvBindsVar :: EvBindsVar -> TcM EvBindsVar
- chooseUniqueOccTc :: (OccSet -> OccName) -> TcM OccName
- checkTcM :: Bool -> (TidyEnv, SDoc) -> TcM ()
- checkTc :: Bool -> SDoc -> TcM ()
- checkNoErrs :: TcM r -> TcM r
- checkErr :: Bool -> SDoc -> TcRn ()
- captureConstraints :: TcM a -> TcM (a, WantedConstraints)
- attemptM :: TcRn r -> TcRn (Maybe r)
- askNoErrs :: TcRn a -> TcRn (a, Bool)
- add_warn :: WarnReason -> SDoc -> SDoc -> TcRn ()
- addWarnTcM :: WarnReason -> (TidyEnv, SDoc) -> TcM ()
- addWarnTc :: WarnReason -> SDoc -> TcM ()
- addWarnAt :: WarnReason -> SrcSpan -> SDoc -> TcRn ()
- addWarn :: WarnReason -> SDoc -> TcRn ()
- addTopEvBinds :: Bag EvBind -> TcM a -> TcM a
- addTcEvBind :: EvBindsVar -> EvBind -> TcM ()
- addModFinalizersWithLclEnv :: ThModFinalizers -> TcM ()
- addMessages :: Messages DecoratedSDoc -> TcRn ()
- addLongErrAt :: SrcSpan -> SDoc -> SDoc -> TcRn ()
- addLocMA :: (a -> TcM b) -> GenLocated (SrcSpanAnn' ann) a -> TcM b
- addLocM :: (a -> TcM b) -> Located a -> TcM b
- addLandmarkErrCtxtM :: (TidyEnv -> TcM (TidyEnv, SDoc)) -> TcM a -> TcM a
- addLandmarkErrCtxt :: SDoc -> TcM a -> TcM a
- addErrs :: [(SrcSpan, SDoc)] -> TcRn ()
- addErrTcM :: (TidyEnv, SDoc) -> TcM ()
- addErrTc :: SDoc -> TcM ()
- addErrCtxtM :: (TidyEnv -> TcM (TidyEnv, SDoc)) -> TcM a -> TcM a
- addErrCtxt :: SDoc -> TcM a -> TcM a
- addErrAt :: SrcSpan -> SDoc -> TcRn ()
- addErr :: SDoc -> TcRn ()
- addDependentFiles :: [FilePath] -> TcRn ()
- data WhereFrom
- data ThStage
- = Splice SpliceType
- | RunSplice (TcRef [ForeignRef (Q ())])
- | Comp
- | Brack ThStage PendingStuff
- type ThLevel = Int
- type TcTypeEnv = NameEnv TcTyThing
- data TcTyThing
- = AGlobal TyThing
- | ATcId {
- tct_id :: TcId
- tct_info :: IdBindingInfo
- | ATyVar Name TcTyVar
- | ATcTyCon TyCon
- | APromotionErr PromotionErr
- data TcSigInfo
- type TcSigFun = Name -> Maybe TcSigInfo
- type TcRnIf a b = IOEnv (Env a b)
- type TcRn = TcRnIf TcGblEnv TcLclEnv
- type TcRef a = IORef a
- type TcPluginSolver = [Ct] -> [Ct] -> [Ct] -> TcPluginM TcPluginResult
- data TcPluginResult
- = TcPluginContradiction [Ct]
- | TcPluginOk [(EvTerm, Ct)] [Ct]
- data TcPluginM a
- data TcPlugin = TcPlugin {
- tcPluginInit :: TcPluginM s
- tcPluginSolve :: s -> TcPluginSolver
- tcPluginStop :: s -> TcPluginM ()
- data TcPatSynInfo = TPSI {}
- type TcM = TcRn
- data TcIdSigInst = TISI {
- sig_inst_sig :: TcIdSigInfo
- sig_inst_skols :: [(Name, InvisTVBinder)]
- sig_inst_theta :: TcThetaType
- sig_inst_tau :: TcSigmaType
- sig_inst_wcs :: [(Name, TcTyVar)]
- sig_inst_wcx :: Maybe TcType
- data TcIdSigInfo
- = CompleteSig { }
- | PartialSig { }
- type TcIdSet = IdSet
- type TcId = Id
- data TcGblEnv = TcGblEnv {
- tcg_mod :: Module
- tcg_semantic_mod :: Module
- tcg_src :: HscSource
- tcg_rdr_env :: GlobalRdrEnv
- tcg_default :: Maybe [Type]
- tcg_fix_env :: FixityEnv
- tcg_field_env :: RecFieldEnv
- tcg_type_env :: TypeEnv
- tcg_type_env_var :: TcRef TypeEnv
- tcg_inst_env :: !InstEnv
- tcg_fam_inst_env :: !FamInstEnv
- tcg_ann_env :: AnnEnv
- tcg_exports :: [AvailInfo]
- tcg_imports :: ImportAvails
- tcg_dus :: DefUses
- tcg_used_gres :: TcRef [GlobalRdrElt]
- tcg_keep :: TcRef NameSet
- tcg_th_used :: TcRef Bool
- tcg_th_splice_used :: TcRef Bool
- tcg_dfun_n :: TcRef OccSet
- tcg_merged :: [(Module, Fingerprint)]
- tcg_rn_exports :: Maybe [(LIE GhcRn, Avails)]
- tcg_rn_imports :: [LImportDecl GhcRn]
- tcg_rn_decls :: Maybe (HsGroup GhcRn)
- tcg_dependent_files :: TcRef [FilePath]
- tcg_th_topdecls :: TcRef [LHsDecl GhcPs]
- tcg_th_foreign_files :: TcRef [(ForeignSrcLang, FilePath)]
- tcg_th_topnames :: TcRef NameSet
- tcg_th_modfinalizers :: TcRef [(TcLclEnv, ThModFinalizers)]
- tcg_th_coreplugins :: TcRef [String]
- tcg_th_state :: TcRef (Map TypeRep Dynamic)
- tcg_th_remote_state :: TcRef (Maybe (ForeignRef (IORef QState)))
- tcg_th_docs :: TcRef THDocs
- tcg_ev_binds :: Bag EvBind
- tcg_tr_module :: Maybe Id
- tcg_binds :: LHsBinds GhcTc
- tcg_sigs :: NameSet
- tcg_imp_specs :: [LTcSpecPrag]
- tcg_warns :: Warnings
- tcg_anns :: [Annotation]
- tcg_tcs :: [TyCon]
- tcg_ksigs :: NameSet
- tcg_insts :: [ClsInst]
- tcg_fam_insts :: [FamInst]
- tcg_rules :: [LRuleDecl GhcTc]
- tcg_fords :: [LForeignDecl GhcTc]
- tcg_patsyns :: [PatSyn]
- tcg_doc_hdr :: Maybe LHsDocString
- tcg_hpc :: !AnyHpcUsage
- tcg_self_boot :: SelfBootInfo
- tcg_main :: Maybe Name
- tcg_safeInfer :: TcRef (Bool, WarningMessages)
- tcg_tc_plugins :: [TcPluginSolver]
- tcg_hf_plugins :: [HoleFitPlugin]
- tcg_top_loc :: RealSrcSpan
- tcg_static_wc :: TcRef WantedConstraints
- tcg_complete_matches :: !CompleteMatches
- tcg_cc_st :: TcRef CostCentreState
- type TcBinderStack = [TcBinder]
- data TcBinder
- type THDocs = Map DocLoc String
- data SpliceType
- data SelfBootInfo
- = NoSelfBoot
- | SelfBoot {
- sb_mds :: ModDetails
- sb_tcs :: NameSet
- type RoleAnnotEnv = NameEnv (LRoleAnnotDecl GhcRn)
- type RnM = TcRn
- type RhsNames = NameSet
- type RecFieldEnv = NameEnv [FieldLabel]
- data PromotionErr
- data PendingStuff
- data NameShape = NameShape {
- ns_mod_name :: ModuleName
- ns_exports :: [AvailInfo]
- ns_map :: OccEnv Name
- data IsGroupClosed = IsGroupClosed (NameEnv RhsNames) ClosedTypeId
- data ImportAvails = ImportAvails {}
- type IfM lcl = TcRnIf IfGblEnv lcl
- data IfLclEnv = IfLclEnv {}
- type IfL = IfM IfLclEnv
- data IfGblEnv = IfGblEnv {}
- type IfG = IfM ()
- data IdBindingInfo
- data FrontendResult = FrontendTypecheck TcGblEnv
- type ErrCtxt = (Bool, TidyEnv -> TcM (TidyEnv, SDoc))
- data Env gbl lcl = Env {}
- data DocLoc
- type ClosedTypeId = Bool
- data ArrowCtxt
- unsafeTcPluginTcM :: TcM a -> TcPluginM a
- topStage :: ThStage
- topSpliceStage :: ThStage
- topAnnStage :: ThStage
- thLevel :: ThStage -> ThLevel
- tcVisibleOrphanMods :: TcGblEnv -> ModuleSet
- tcTyThingCategory :: TcTyThing -> String
- runTcPluginM :: TcPluginM a -> EvBindsVar -> TcM a
- removeBindingShadowing :: HasOccName a => [a] -> [a]
- pushErrCtxtSameOrigin :: ErrCtxt -> CtLoc -> CtLoc
- pushErrCtxt :: CtOrigin -> ErrCtxt -> CtLoc -> CtLoc
- pprTcTyThingCategory :: TcTyThing -> SDoc
- pprPECategory :: PromotionErr -> SDoc
- plusImportAvails :: ImportAvails -> ImportAvails -> ImportAvails
- peCategory :: PromotionErr -> String
- outerLevel :: ThLevel
- modDepsElts :: ModuleNameEnv ModuleNameWithIsBoot -> [ModuleNameWithIsBoot]
- mkRoleAnnotEnv :: [LRoleAnnotDecl GhcRn] -> RoleAnnotEnv
- mkModDeps :: [ModuleNameWithIsBoot] -> ModuleNameEnv ModuleNameWithIsBoot
- lookupRoleAnnot :: RoleAnnotEnv -> Name -> Maybe (LRoleAnnotDecl GhcRn)
- lintGblEnv :: Logger -> DynFlags -> TcGblEnv -> TcM ()
- isPartialSig :: TcIdSigInst -> Bool
- impLevel :: ThLevel
- hasCompleteSig :: TcSigFun -> Name -> Bool
- getRoleAnnots :: [Name] -> RoleAnnotEnv -> [LRoleAnnotDecl GhcRn]
- getPlatform :: TcM Platform
- getEvBindsTcPluginM :: TcPluginM EvBindsVar
- emptyRoleAnnotEnv :: RoleAnnotEnv
- emptyImportAvails :: ImportAvails
- uncacheModule :: HscEnv -> ModuleName -> IO ()
- mkStubPaths :: DynFlags -> ModuleName -> ModLocation -> FilePath
- mkObjPath :: DynFlags -> FilePath -> String -> FilePath
- mkHomeModLocation2 :: DynFlags -> ModuleName -> FilePath -> String -> IO ModLocation
- mkHomeModLocation :: DynFlags -> ModuleName -> FilePath -> IO ModLocation
- mkHiPath :: DynFlags -> FilePath -> String -> FilePath
- mkHiOnlyModLocation :: DynFlags -> Suffix -> FilePath -> String -> IO ModLocation
- flushFinderCaches :: HscEnv -> IO ()
- findPluginModule :: HscEnv -> ModuleName -> IO FindResult
- findObjectLinkableMaybe :: Module -> ModLocation -> IO (Maybe Linkable)
- findObjectLinkable :: Module -> FilePath -> UTCTime -> IO Linkable
- findImportedModule :: HscEnv -> ModuleName -> Maybe FastString -> IO FindResult
- findHomeModule :: HscEnv -> ModuleName -> IO FindResult
- findExposedPackageModule :: HscEnv -> ModuleName -> Maybe FastString -> IO FindResult
- findExactModule :: HscEnv -> InstalledModule -> IO InstalledFindResult
- addHomeModuleToFinder :: HscEnv -> ModuleName -> ModLocation -> IO Module
- type Xi = TcType
- data WantedConstraints = WC {}
- data TcEvDest
- data SubGoalDepth
- data ShadowInfo
- data QCInst = QCI {
- qci_ev :: CtEvidence
- qci_tvs :: [TcTyVar]
- qci_pred :: TcPredType
- qci_pend_sc :: Bool
- data Implication = Implic {}
- data ImplicStatus
- = IC_Solved { }
- | IC_Insoluble
- | IC_BadTelescope
- | IC_Unsolved
- data HoleSort
- data Hole = Hole {}
- data HasGivenEqs
- type Cts = Bag Ct
- data CtLoc = CtLoc {}
- data CtIrredReason
- type CtFlavourRole = (CtFlavour, EqRel)
- data CtFlavour
- = Given
- | Wanted ShadowInfo
- | Derived
- data CtEvidence
- data Ct
- = CDictCan {
- cc_ev :: CtEvidence
- cc_class :: Class
- cc_tyargs :: [Xi]
- cc_pend_sc :: Bool
- | CIrredCan { }
- | CEqCan { }
- | CNonCanonical {
- cc_ev :: CtEvidence
- | CQuantCan QCInst
- = CDictCan {
- data CheckTyEqResult
- data CheckTyEqProblem
- data CanEqLHS
- wrapType :: Type -> [TyVar] -> [PredType] -> Type
- updateCtLocOrigin :: CtLoc -> (CtOrigin -> CtOrigin) -> CtLoc
- unionsWC :: [WantedConstraints] -> WantedConstraints
- tyCoVarsOfWCList :: WantedConstraints -> [TyCoVar]
- tyCoVarsOfWC :: WantedConstraints -> TyCoVarSet
- tyCoVarsOfCtsList :: Cts -> [TcTyCoVar]
- tyCoVarsOfCts :: Cts -> TcTyCoVarSet
- tyCoVarsOfCtList :: Ct -> [TcTyCoVar]
- tyCoVarsOfCt :: Ct -> TcTyCoVarSet
- toKindLoc :: CtLoc -> CtLoc
- superClassesMightHelp :: WantedConstraints -> Bool
- subGoalDepthExceeded :: DynFlags -> SubGoalDepth -> Bool
- snocCts :: Cts -> Ct -> Cts
- singleCt :: Ct -> Cts
- setCtLocSpan :: CtLoc -> RealSrcSpan -> CtLoc
- setCtLocOrigin :: CtLoc -> CtOrigin -> CtLoc
- setCtLocEnv :: CtLoc -> TcLclEnv -> CtLoc
- setCtLoc :: Ct -> CtLoc -> Ct
- pprEvVars :: [EvVar] -> SDoc
- pprEvVarWithType :: EvVar -> SDoc
- pprEvVarTheta :: [EvVar] -> SDoc
- pprCts :: Cts -> SDoc
- pprCtLoc :: CtLoc -> SDoc
- mkTcEqPredLikeEv :: CtEvidence -> TcType -> TcType -> TcType
- mkSimpleWC :: [CtEvidence] -> WantedConstraints
- mkNonCanonicalCt :: Ct -> Ct
- mkNonCanonical :: CtEvidence -> Ct
- mkKindLoc :: TcType -> TcType -> CtLoc -> CtLoc
- mkIrredCt :: CtIrredReason -> CtEvidence -> Ct
- mkImplicWC :: Bag Implication -> WantedConstraints
- mkGivens :: CtLoc -> [EvId] -> [Ct]
- mkGivenLoc :: TcLevel -> SkolemInfo -> TcLclEnv -> CtLoc
- maxSubGoalDepth :: SubGoalDepth -> SubGoalDepth -> SubGoalDepth
- listToCts :: [Ct] -> Cts
- isWantedCt :: Ct -> Bool
- isWanted :: CtEvidence -> Bool
- isUserTypeErrorCt :: Ct -> Bool
- isSolvedWC :: WantedConstraints -> Bool
- isSolvedStatus :: ImplicStatus -> Bool
- isPendingScInst :: QCInst -> Maybe QCInst
- isPendingScDict :: Ct -> Maybe Ct
- isOutOfScopeHole :: Hole -> Bool
- isInsolubleStatus :: ImplicStatus -> Bool
- isInsolubleReason :: CtIrredReason -> Bool
- isGivenLoc :: CtLoc -> Bool
- isGivenCt :: Ct -> Bool
- isGiven :: CtEvidence -> Bool
- isEmptyWC :: WantedConstraints -> Bool
- isEmptyCts :: Cts -> Bool
- isDroppableCt :: Ct -> Bool
- isDerivedCt :: Ct -> Bool
- isDerived :: CtEvidence -> Bool
- insolubleWC :: WantedConstraints -> Bool
- insolubleImplic :: Implication -> Bool
- insolubleEqCt :: Ct -> Bool
- insolubleCt :: Ct -> Bool
- initialSubGoalDepth :: SubGoalDepth
- implicationPrototype :: Implication
- getUserTypeErrorMsg :: Ct -> Maybe Type
- getPendingWantedScs :: Cts -> ([Ct], Cts)
- extendCtsList :: Cts -> [Ct] -> Cts
- eqMayRewriteFR :: CtFlavourRole -> CtFlavourRole -> Bool
- eqCanRewriteFR :: CtFlavourRole -> CtFlavourRole -> Bool
- eqCanRewrite :: EqRel -> EqRel -> Bool
- eqCanEqLHS :: CanEqLHS -> CanEqLHS -> Bool
- eqCanDischargeFR :: CtFlavourRole -> CtFlavourRole -> Bool
- emptyWC :: WantedConstraints
- emptyCts :: Cts
- dropMisleading :: WantedConstraints -> WantedConstraints
- dropDerivedWC :: WantedConstraints -> WantedConstraints
- dropDerivedSimples :: Cts -> Cts
- ctsElts :: Cts -> [Ct]
- cterSetOccursCheckSoluble :: CheckTyEqResult -> CheckTyEqResult
- cterRemoveProblem :: CheckTyEqResult -> CheckTyEqProblem -> CheckTyEqResult
- cterHasProblem :: CheckTyEqResult -> CheckTyEqProblem -> Bool
- cterHasOnlyProblem :: CheckTyEqResult -> CheckTyEqProblem -> Bool
- cterHasOccursCheck :: CheckTyEqResult -> Bool
- cterHasNoProblem :: CheckTyEqResult -> Bool
- cterFromKind :: CheckTyEqResult -> CheckTyEqResult
- cterClearOccursCheck :: CheckTyEqResult -> CheckTyEqResult
- cteTypeFamily :: CheckTyEqProblem
- cteSolubleOccurs :: CheckTyEqProblem
- cteProblem :: CheckTyEqProblem -> CheckTyEqResult
- cteOK :: CheckTyEqResult
- cteInsolubleOccurs :: CheckTyEqProblem
- cteImpredicative :: CheckTyEqProblem
- cteHoleBlocker :: CheckTyEqProblem
- ctPred :: Ct -> PredType
- ctOrigin :: Ct -> CtOrigin
- ctLocTypeOrKind_maybe :: CtLoc -> Maybe TypeOrKind
- ctLocSpan :: CtLoc -> RealSrcSpan
- ctLocOrigin :: CtLoc -> CtOrigin
- ctLocLevel :: CtLoc -> TcLevel
- ctLocEnv :: CtLoc -> TcLclEnv
- ctLocDepth :: CtLoc -> SubGoalDepth
- ctLoc :: Ct -> CtLoc
- ctFlavourRole :: Ct -> CtFlavourRole
- ctFlavourContainsDerived :: CtFlavour -> Bool
- ctFlavour :: Ct -> CtFlavour
- ctEvidence :: Ct -> CtEvidence
- ctEvTerm :: CtEvidence -> EvTerm
- ctEvRole :: CtEvidence -> Role
- ctEvPred :: CtEvidence -> TcPredType
- ctEvOrigin :: CtEvidence -> CtOrigin
- ctEvLoc :: CtEvidence -> CtLoc
- ctEvId :: Ct -> EvVar
- ctEvFlavourRole :: CtEvidence -> CtFlavourRole
- ctEvFlavour :: CtEvidence -> CtFlavour
- ctEvExpr :: CtEvidence -> EvExpr
- ctEvEvId :: CtEvidence -> EvVar
- ctEvEqRel :: CtEvidence -> EqRel
- ctEvCoercion :: HasDebugCallStack => CtEvidence -> TcCoercion
- ctEqRel :: Ct -> EqRel
- consCts :: Ct -> Cts -> Cts
- checkTelescopeSkol :: SkolemInfo -> Bool
- canEqLHS_maybe :: Xi -> Maybe CanEqLHS
- canEqLHSType :: CanEqLHS -> TcType
- canEqLHSKind :: CanEqLHS -> TcKind
- bumpSubGoalDepth :: SubGoalDepth -> SubGoalDepth
- bumpCtLocDepth :: CtLoc -> CtLoc
- arisesFromGivens :: Ct -> Bool
- andWC :: WantedConstraints -> WantedConstraints -> WantedConstraints
- andManyCts :: [Cts] -> Cts
- andCts :: Cts -> Cts -> Cts
- addSimples :: WantedConstraints -> Bag Ct -> WantedConstraints
- addInsols :: WantedConstraints -> Bag Ct -> WantedConstraints
- addImplics :: WantedConstraints -> Bag Implication -> WantedConstraints
- addHoles :: WantedConstraints -> Bag Hole -> WantedConstraints
- data FloatBind
- wrapFloats :: [FloatBind] -> CoreExpr -> CoreExpr
- wrapFloat :: FloatBind -> CoreExpr -> CoreExpr
- unitExpr :: CoreExpr
- tYPE_ERROR_ID :: Id
- sortQuantVars :: [Var] -> [Var]
- rUNTIME_ERROR_ID :: Id
- rEC_SEL_ERROR_ID :: Id
- rEC_CON_ERROR_ID :: Id
- pAT_ERROR_ID :: Id
- nO_METHOD_BINDING_ERROR_ID :: Id
- nON_EXHAUSTIVE_GUARDS_ERROR_ID :: Id
- mkWordExpr :: Platform -> Integer -> CoreExpr
- mkWildValBinder :: Mult -> Type -> Id
- mkWildEvBinder :: PredType -> EvVar
- mkWildCase :: CoreExpr -> Scaled Type -> Type -> [CoreAlt] -> CoreExpr
- mkUncheckedIntExpr :: Integer -> CoreExpr
- mkTupleSelector1 :: [Id] -> Id -> Id -> CoreExpr -> CoreExpr
- mkTupleSelector :: [Id] -> Id -> Id -> CoreExpr -> CoreExpr
- mkTupleCase :: UniqSupply -> [Id] -> CoreExpr -> Id -> CoreExpr -> CoreExpr
- mkStringExprFSWith :: Monad m => (Name -> m Id) -> FastString -> m CoreExpr
- mkStringExprFS :: MonadThings m => FastString -> m CoreExpr
- mkStringExpr :: MonadThings m => String -> m CoreExpr
- mkSmallTupleSelector :: [Id] -> Id -> Id -> CoreExpr -> CoreExpr
- mkSmallTupleCase :: [Id] -> CoreExpr -> Id -> CoreExpr -> CoreExpr
- mkRuntimeErrorApp :: Id -> Type -> String -> CoreExpr
- mkNothingExpr :: Type -> CoreExpr
- mkNonEmptyListExpr :: Type -> CoreExpr -> [CoreExpr] -> CoreExpr
- mkNilExpr :: Type -> CoreExpr
- mkNaturalExpr :: Integer -> CoreExpr
- mkListExpr :: Type -> [CoreExpr] -> CoreExpr
- mkJustExpr :: Type -> CoreExpr -> CoreExpr
- mkIntegerExpr :: Integer -> CoreExpr
- mkIntExprInt :: Platform -> Int -> CoreExpr
- mkIntExpr :: Platform -> Integer -> CoreExpr
- mkImpossibleExpr :: Type -> CoreExpr
- mkIfThenElse :: CoreExpr -> CoreExpr -> CoreExpr -> CoreExpr
- mkFoldrExpr :: MonadThings m => Type -> Type -> CoreExpr -> CoreExpr -> CoreExpr -> m CoreExpr
- mkFloatExpr :: Float -> CoreExpr
- mkDoubleExpr :: Double -> CoreExpr
- mkCoreVarTupTy :: [Id] -> Type
- mkCoreUbxTup :: [Type] -> [CoreExpr] -> CoreExpr
- mkCoreUbxSum :: Int -> Int -> [Type] -> CoreExpr -> CoreExpr
- mkCoreTupBoxity :: Boxity -> [CoreExpr] -> CoreExpr
- mkCoreTup :: [CoreExpr] -> CoreExpr
- mkCoreLets :: [CoreBind] -> CoreExpr -> CoreExpr
- mkCoreLet :: CoreBind -> CoreExpr -> CoreExpr
- mkCoreLams :: [CoreBndr] -> CoreExpr -> CoreExpr
- mkCoreConApps :: DataCon -> [CoreExpr] -> CoreExpr
- mkCoreApps :: CoreExpr -> [CoreExpr] -> CoreExpr
- mkCoreApp :: SDoc -> CoreExpr -> CoreExpr -> CoreExpr
- mkConsExpr :: Type -> CoreExpr -> CoreExpr -> CoreExpr
- mkCharExpr :: Char -> CoreExpr
- mkBuildExpr :: (MonadFail m, MonadThings m, MonadUnique m) => Type -> ((Id, Type) -> (Id, Type) -> m CoreExpr) -> m CoreExpr
- mkBigCoreVarTupTy :: [Id] -> Type
- mkBigCoreVarTup1 :: [Id] -> CoreExpr
- mkBigCoreVarTup :: [Id] -> CoreExpr
- mkBigCoreTupTy :: [Type] -> Type
- mkBigCoreTup :: [CoreExpr] -> CoreExpr
- mkAbsentErrorApp :: Type -> String -> CoreExpr
- floatBindings :: FloatBind -> [Var]
- errorIds :: [Id]
- castBottomExpr :: CoreExpr -> Type -> CoreExpr
- aBSENT_SUM_FIELD_ERROR_ID :: Id
- aBSENT_ERROR_ID :: Id
- class UnXRec p => CollectPass p where
- collectXXPat :: Proxy p -> CollectFlag p -> XXPat p -> [IdP p] -> [IdP p]
- data CollectFlag p where
- CollNoDictBinders :: forall p. CollectFlag p
- CollWithDictBinders :: CollectFlag (GhcPass 'Typechecked)
- unitRecStmtTc :: RecStmtTc
- unguardedRHS :: forall (p :: Pass) body. Anno (GRHS (GhcPass p) (LocatedA (body (GhcPass p)))) ~ SrcSpan => EpAnn GrhsAnn -> SrcSpan -> LocatedA (body (GhcPass p)) -> [LGRHS (GhcPass p) (LocatedA (body (GhcPass p)))]
- unguardedGRHSs :: forall (p :: Pass) body. Anno (GRHS (GhcPass p) (LocatedA (body (GhcPass p)))) ~ SrcSpan => SrcSpan -> LocatedA (body (GhcPass p)) -> EpAnn GrhsAnn -> GRHSs (GhcPass p) (LocatedA (body (GhcPass p)))
- spanHsLocaLBinds :: forall (p :: Pass). Data (HsLocalBinds (GhcPass p)) => HsLocalBinds (GhcPass p) -> SrcSpan
- nl_HsVar :: forall (p :: Pass) a. IsSrcSpanAnn p a => IdP (GhcPass p) -> HsExpr (GhcPass p)
- nlWildPatName :: LPat GhcRn
- nlWildPat :: LPat GhcPs
- nlWildConPat :: DataCon -> LPat GhcPs
- nlVarPat :: forall (p :: Pass) a. IsSrcSpanAnn p a => IdP (GhcPass p) -> LPat (GhcPass p)
- nlTuplePat :: [LPat GhcPs] -> Boxity -> LPat GhcPs
- nlParPat :: forall (name :: Pass). LPat (GhcPass name) -> LPat (GhcPass name)
- nlNullaryConPat :: RdrName -> LPat GhcPs
- nlLitPat :: HsLit GhcPs -> LPat GhcPs
- nlList :: [LHsExpr GhcPs] -> LHsExpr GhcPs
- nlInfixConPat :: RdrName -> LPat GhcPs -> LPat GhcPs -> LPat GhcPs
- nlHsVarApps :: forall (p :: Pass) a. IsSrcSpanAnn p a => IdP (GhcPass p) -> [IdP (GhcPass p)] -> LHsExpr (GhcPass p)
- nlHsVar :: forall (p :: Pass) a. IsSrcSpanAnn p a => IdP (GhcPass p) -> LHsExpr (GhcPass p)
- nlHsTyVar :: forall (p :: Pass) a. IsSrcSpanAnn p a => IdP (GhcPass p) -> LHsType (GhcPass p)
- nlHsTyConApp :: forall (p :: Pass) a. IsSrcSpanAnn p a => LexicalFixity -> IdP (GhcPass p) -> [LHsTypeArg (GhcPass p)] -> LHsType (GhcPass p)
- nlHsTyApps :: Id -> [Type] -> [LHsExpr GhcTc] -> LHsExpr GhcTc
- nlHsTyApp :: Id -> [Type] -> LHsExpr GhcTc
- nlHsSyntaxApps :: SyntaxExprTc -> [LHsExpr GhcTc] -> LHsExpr GhcTc
- nlHsParTy :: forall (p :: Pass). LHsType (GhcPass p) -> LHsType (GhcPass p)
- nlHsPar :: forall (id :: Pass). LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
- nlHsOpApp :: LHsExpr GhcPs -> IdP GhcPs -> LHsExpr GhcPs -> LHsExpr GhcPs
- nlHsLit :: forall (p :: Pass). HsLit (GhcPass p) -> LHsExpr (GhcPass p)
- nlHsLam :: LMatch GhcPs (LHsExpr GhcPs) -> LHsExpr GhcPs
- nlHsIntLit :: forall (p :: Pass). Integer -> LHsExpr (GhcPass p)
- nlHsIf :: LHsExpr GhcPs -> LHsExpr GhcPs -> LHsExpr GhcPs -> LHsExpr GhcPs
- nlHsFunTy :: forall (p :: Pass). LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)
- nlHsDo :: HsStmtContext GhcRn -> [LStmt GhcPs (LHsExpr GhcPs)] -> LHsExpr GhcPs
- nlHsDataCon :: DataCon -> LHsExpr GhcTc
- nlHsCase :: LHsExpr GhcPs -> [LMatch GhcPs (LHsExpr GhcPs)] -> LHsExpr GhcPs
- nlHsApps :: forall (p :: Pass) a. IsSrcSpanAnn p a => IdP (GhcPass p) -> [LHsExpr (GhcPass p)] -> LHsExpr (GhcPass p)
- nlHsAppTy :: forall (p :: Pass). LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)
- nlHsAppKindTy :: forall (p :: Pass). LHsType (GhcPass p) -> LHsKind (GhcPass p) -> LHsType (GhcPass p)
- nlHsApp :: forall (id :: Pass). IsPass id => LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
- nlConVarPatName :: Name -> [Name] -> LPat GhcRn
- nlConVarPat :: RdrName -> [RdrName] -> LPat GhcPs
- nlConPatName :: Name -> [LPat GhcRn] -> LPat GhcRn
- nlConPat :: RdrName -> [LPat GhcPs] -> LPat GhcPs
- mkVarBind :: forall (p :: Pass). IdP (GhcPass p) -> LHsExpr (GhcPass p) -> LHsBind (GhcPass p)
- mkUntypedSplice :: EpAnn [AddEpAnn] -> SpliceDecoration -> LHsExpr GhcPs -> HsSplice GhcPs
- mkTypedSplice :: EpAnn [AddEpAnn] -> SpliceDecoration -> LHsExpr GhcPs -> HsSplice GhcPs
- mkTransformStmt :: EpAnn [AddEpAnn] -> [ExprLStmt GhcPs] -> LHsExpr GhcPs -> StmtLR GhcPs GhcPs (LHsExpr GhcPs)
- mkTransformByStmt :: EpAnn [AddEpAnn] -> [ExprLStmt GhcPs] -> LHsExpr GhcPs -> LHsExpr GhcPs -> StmtLR GhcPs GhcPs (LHsExpr GhcPs)
- mkTopFunBind :: Origin -> LocatedN Name -> [LMatch GhcRn (LHsExpr GhcRn)] -> HsBind GhcRn
- mkTcBindStmt :: LPat GhcTc -> LocatedA (bodyR GhcTc) -> StmtLR GhcTc GhcTc (LocatedA (bodyR GhcTc))
- mkSimpleMatch :: forall (p :: Pass) body. (Anno (Match (GhcPass p) (LocatedA (body (GhcPass p)))) ~ SrcSpanAnnA, Anno (GRHS (GhcPass p) (LocatedA (body (GhcPass p)))) ~ SrcSpan) => HsMatchContext (NoGhcTc (GhcPass p)) -> [LPat (GhcPass p)] -> LocatedA (body (GhcPass p)) -> LMatch (GhcPass p) (LocatedA (body (GhcPass p)))
- mkSimpleGeneratedFunBind :: SrcSpan -> RdrName -> [LPat GhcPs] -> LHsExpr GhcPs -> LHsBind GhcPs
- mkRnBindStmt :: LPat GhcRn -> LocatedA (bodyR GhcRn) -> StmtLR GhcRn GhcRn (LocatedA (bodyR GhcRn))
- mkRecStmt :: forall (idL :: Pass) bodyR. Anno [GenLocated (Anno (StmtLR (GhcPass idL) GhcPs bodyR)) (StmtLR (GhcPass idL) GhcPs bodyR)] ~ SrcSpanAnnL => EpAnn AnnList -> LocatedL [LStmtLR (GhcPass idL) GhcPs bodyR] -> StmtLR (GhcPass idL) GhcPs bodyR
- mkPsBindStmt :: EpAnn [AddEpAnn] -> LPat GhcPs -> LocatedA (bodyR GhcPs) -> StmtLR GhcPs GhcPs (LocatedA (bodyR GhcPs))
- mkPrefixFunRhs :: LIdP p -> HsMatchContext p
- mkPatSynBind :: LocatedN RdrName -> HsPatSynDetails GhcPs -> LPat GhcPs -> HsPatSynDir GhcPs -> EpAnn [AddEpAnn] -> HsBind GhcPs
- mkParPat :: forall (p :: Pass). IsPass p => LPat (GhcPass p) -> LPat (GhcPass p)
- mkNPlusKPat :: LocatedN RdrName -> Located (HsOverLit GhcPs) -> EpAnn EpaLocation -> Pat GhcPs
- mkNPat :: Located (HsOverLit GhcPs) -> Maybe (SyntaxExpr GhcPs) -> EpAnn [AddEpAnn] -> Pat GhcPs
- mkMatchGroup :: forall (p :: Pass) body. AnnoBody p body => Origin -> LocatedL [LocatedA (Match (GhcPass p) (LocatedA (body (GhcPass p))))] -> MatchGroup (GhcPass p) (LocatedA (body (GhcPass p)))
- mkMatch :: forall (p :: Pass). IsPass p => HsMatchContext (NoGhcTc (GhcPass p)) -> [LPat (GhcPass p)] -> LHsExpr (GhcPass p) -> HsLocalBinds (GhcPass p) -> LMatch (GhcPass p) (LHsExpr (GhcPass p))
- mkLocatedList :: Semigroup a => [GenLocated (SrcAnn a) e2] -> LocatedAn an [GenLocated (SrcAnn a) e2]
- mkLetStmt :: EpAnn [AddEpAnn] -> HsLocalBinds GhcPs -> StmtLR GhcPs GhcPs (LocatedA b)
- mkLastStmt :: forall (idR :: Pass) bodyR (idL :: Pass). IsPass idR => LocatedA (bodyR (GhcPass idR)) -> StmtLR (GhcPass idL) (GhcPass idR) (LocatedA (bodyR (GhcPass idR)))
- mkLHsWrapCo :: TcCoercionN -> LHsExpr GhcTc -> LHsExpr GhcTc
- mkLHsWrap :: HsWrapper -> LHsExpr GhcTc -> LHsExpr GhcTc
- mkLHsVarTuple :: forall (p :: Pass) a. IsSrcSpanAnn p a => [IdP (GhcPass p)] -> XExplicitTuple (GhcPass p) -> LHsExpr (GhcPass p)
- mkLHsTupleExpr :: forall (p :: Pass). [LHsExpr (GhcPass p)] -> XExplicitTuple (GhcPass p) -> LHsExpr (GhcPass p)
- mkLHsPar :: forall (id :: Pass). IsPass id => LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
- mkLHsCmdWrap :: HsWrapper -> LHsCmd GhcTc -> LHsCmd GhcTc
- mkHsWrapPatCo :: TcCoercionN -> Pat GhcTc -> Type -> Pat GhcTc
- mkHsWrapPat :: HsWrapper -> Pat GhcTc -> Type -> Pat GhcTc
- mkHsWrapCoR :: TcCoercionR -> HsExpr GhcTc -> HsExpr GhcTc
- mkHsWrapCo :: TcCoercionN -> HsExpr GhcTc -> HsExpr GhcTc
- mkHsWrap :: HsWrapper -> HsExpr GhcTc -> HsExpr GhcTc
- mkHsVarBind :: SrcSpan -> RdrName -> LHsExpr GhcPs -> LHsBind GhcPs
- mkHsStringPrimLit :: forall (p :: Pass). FastString -> HsLit (GhcPass p)
- mkHsString :: forall (p :: Pass). String -> HsLit (GhcPass p)
- mkHsSigEnv :: (LSig GhcRn -> Maybe ([LocatedN Name], a)) -> [LSig GhcRn] -> NameEnv a
- mkHsQuasiQuote :: RdrName -> SrcSpan -> FastString -> HsSplice GhcPs
- mkHsPar :: forall (id :: Pass). LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
- mkHsOpApp :: LHsExpr GhcPs -> IdP GhcPs -> LHsExpr GhcPs -> HsExpr GhcPs
- mkHsLams :: [TyVar] -> [EvVar] -> LHsExpr GhcTc -> LHsExpr GhcTc
- mkHsLam :: forall (p :: Pass). (IsPass p, XMG (GhcPass p) (LHsExpr (GhcPass p)) ~ NoExtField) => [LPat (GhcPass p)] -> LHsExpr (GhcPass p) -> LHsExpr (GhcPass p)
- mkHsIsString :: SourceText -> FastString -> HsOverLit GhcPs
- mkHsIntegral :: IntegralLit -> HsOverLit GhcPs
- mkHsIf :: LHsExpr GhcPs -> LHsExpr GhcPs -> LHsExpr GhcPs -> EpAnn AnnsIf -> HsExpr GhcPs
- mkHsFractional :: FractionalLit -> HsOverLit GhcPs
- mkHsDoAnns :: HsStmtContext GhcRn -> LocatedL [ExprLStmt GhcPs] -> EpAnn AnnList -> HsExpr GhcPs
- mkHsDo :: HsStmtContext GhcRn -> LocatedL [ExprLStmt GhcPs] -> HsExpr GhcPs
- mkHsDictLet :: TcEvBinds -> LHsExpr GhcTc -> LHsExpr GhcTc
- mkHsCompAnns :: HsStmtContext GhcRn -> [ExprLStmt GhcPs] -> LHsExpr GhcPs -> EpAnn AnnList -> HsExpr GhcPs
- mkHsComp :: HsStmtContext GhcRn -> [ExprLStmt GhcPs] -> LHsExpr GhcPs -> HsExpr GhcPs
- mkHsCmdWrap :: HsWrapper -> HsCmd GhcTc -> HsCmd GhcTc
- mkHsCmdIf :: LHsExpr GhcPs -> LHsCmd GhcPs -> LHsCmd GhcPs -> EpAnn AnnsIf -> HsCmd GhcPs
- mkHsCharPrimLit :: forall (p :: Pass). Char -> HsLit (GhcPass p)
- mkHsCaseAlt :: forall (p :: Pass) body. (Anno (GRHS (GhcPass p) (LocatedA (body (GhcPass p)))) ~ SrcSpan, Anno (Match (GhcPass p) (LocatedA (body (GhcPass p)))) ~ SrcSpanAnnA) => LPat (GhcPass p) -> LocatedA (body (GhcPass p)) -> LMatch (GhcPass p) (LocatedA (body (GhcPass p)))
- mkHsAppsWith :: forall (id :: Pass). (LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> HsExpr (GhcPass id) -> LHsExpr (GhcPass id)) -> LHsExpr (GhcPass id) -> [LHsExpr (GhcPass id)] -> LHsExpr (GhcPass id)
- mkHsApps :: forall (id :: Pass). LHsExpr (GhcPass id) -> [LHsExpr (GhcPass id)] -> LHsExpr (GhcPass id)
- mkHsAppWith :: forall (id :: Pass). (LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> HsExpr (GhcPass id) -> LHsExpr (GhcPass id)) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
- mkHsAppTypes :: LHsExpr GhcRn -> [LHsWcType GhcRn] -> LHsExpr GhcRn
- mkHsAppType :: LHsExpr GhcRn -> LHsWcType GhcRn -> LHsExpr GhcRn
- mkHsApp :: forall (id :: Pass). LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
- mkGroupUsingStmt :: EpAnn [AddEpAnn] -> [ExprLStmt GhcPs] -> LHsExpr GhcPs -> StmtLR GhcPs GhcPs (LHsExpr GhcPs)
- mkGroupByUsingStmt :: EpAnn [AddEpAnn] -> [ExprLStmt GhcPs] -> LHsExpr GhcPs -> LHsExpr GhcPs -> StmtLR GhcPs GhcPs (LHsExpr GhcPs)
- mkFunBind :: Origin -> LocatedN RdrName -> [LMatch GhcPs (LHsExpr GhcPs)] -> HsBind GhcPs
- mkClassOpSigs :: [LSig GhcPs] -> [LSig GhcPs]
- mkChunkified :: ([a] -> a) -> [a] -> a
- mkBodyStmt :: forall bodyR (idL :: Pass). LocatedA (bodyR GhcPs) -> StmtLR (GhcPass idL) GhcPs (LocatedA (bodyR GhcPs))
- mkBigLHsVarTup :: forall (p :: Pass) a. IsSrcSpanAnn p a => [IdP (GhcPass p)] -> XExplicitTuple (GhcPass p) -> LHsExpr (GhcPass p)
- mkBigLHsVarPatTup :: [IdP GhcRn] -> LPat GhcRn
- mkBigLHsTup :: forall (id :: Pass). [LHsExpr (GhcPass id)] -> XExplicitTuple (GhcPass id) -> LHsExpr (GhcPass id)
- mkBigLHsPatTup :: [LPat GhcRn] -> LPat GhcRn
- missingTupArg :: EpAnn EpaLocation -> HsTupArg GhcPs
- lStmtsImplicits :: forall (idR :: Pass) (body :: Type -> Type). [LStmtLR GhcRn (GhcPass idR) (LocatedA (body (GhcPass idR)))] -> [(SrcSpan, [Name])]
- lPatImplicits :: LPat GhcRn -> [(SrcSpan, [Name])]
- isUnliftedHsBind :: HsBind GhcTc -> Bool
- isInfixFunBind :: forall id1 id2. UnXRec id2 => HsBindLR id1 id2 -> Bool
- isBangedHsBind :: HsBind GhcTc -> Bool
- hsValBindsImplicits :: forall (idR :: Pass). HsValBindsLR GhcRn (GhcPass idR) -> [(SrcSpan, [Name])]
- hsTypeToHsSigWcType :: LHsType GhcPs -> LHsSigWcType GhcPs
- hsTypeToHsSigType :: LHsType GhcPs -> LHsSigType GhcPs
- hsTyClForeignBinders :: [TyClGroup GhcRn] -> [LForeignDecl GhcRn] -> [Name]
- hsPatSynSelectors :: forall (p :: Pass). IsPass p => HsValBinds (GhcPass p) -> [FieldOcc (GhcPass p)]
- hsLTyClDeclBinders :: forall (p :: Pass). IsPass p => LocatedA (TyClDecl (GhcPass p)) -> ([LocatedA (IdP (GhcPass p))], [LFieldOcc (GhcPass p)])
- hsGroupBinders :: HsGroup GhcRn -> [Name]
- hsForeignDeclsBinders :: forall (p :: Pass) a. (UnXRec (GhcPass p), IsSrcSpanAnn p a) => [LForeignDecl (GhcPass p)] -> [LIdP (GhcPass p)]
- hsDataFamInstBinders :: forall (p :: Pass). IsPass p => DataFamInstDecl (GhcPass p) -> ([LocatedA (IdP (GhcPass p))], [LFieldOcc (GhcPass p)])
- getPatSynBinds :: UnXRec id => [(RecFlag, LHsBinds id)] -> [PatSynBind id id]
- emptyTransStmt :: EpAnn [AddEpAnn] -> StmtLR GhcPs GhcPs (LHsExpr GhcPs)
- emptyRecStmtName :: Anno [GenLocated (Anno (StmtLR GhcRn GhcRn bodyR)) (StmtLR GhcRn GhcRn bodyR)] ~ SrcSpanAnnL => StmtLR GhcRn GhcRn bodyR
- emptyRecStmtId :: Stmt GhcTc (LocatedA (HsCmd GhcTc))
- emptyRecStmt :: forall (idL :: Pass) bodyR. Anno [GenLocated (Anno (StmtLR (GhcPass idL) GhcPs bodyR)) (StmtLR (GhcPass idL) GhcPs bodyR)] ~ SrcSpanAnnL => StmtLR (GhcPass idL) GhcPs bodyR
- collectStmtsBinders :: forall (idL :: Pass) (idR :: Pass) body. CollectPass (GhcPass idL) => CollectFlag (GhcPass idL) -> [StmtLR (GhcPass idL) (GhcPass idR) body] -> [IdP (GhcPass idL)]
- collectStmtBinders :: forall (idL :: Pass) (idR :: Pass) body. CollectPass (GhcPass idL) => CollectFlag (GhcPass idL) -> StmtLR (GhcPass idL) (GhcPass idR) body -> [IdP (GhcPass idL)]
- collectPatsBinders :: CollectPass p => CollectFlag p -> [LPat p] -> [IdP p]
- collectPatBinders :: CollectPass p => CollectFlag p -> LPat p -> [IdP p]
- collectMethodBinders :: UnXRec idL => LHsBindsLR idL idR -> [LIdP idL]
- collectLocalBinders :: forall (idL :: Pass) (idR :: Pass). CollectPass (GhcPass idL) => CollectFlag (GhcPass idL) -> HsLocalBindsLR (GhcPass idL) (GhcPass idR) -> [IdP (GhcPass idL)]
- collectLStmtsBinders :: forall (idL :: Pass) (idR :: Pass) body. CollectPass (GhcPass idL) => CollectFlag (GhcPass idL) -> [LStmtLR (GhcPass idL) (GhcPass idR) body] -> [IdP (GhcPass idL)]
- collectLStmtBinders :: forall (idL :: Pass) (idR :: Pass) body. CollectPass (GhcPass idL) => CollectFlag (GhcPass idL) -> LStmtLR (GhcPass idL) (GhcPass idR) body -> [IdP (GhcPass idL)]
- collectHsValBinders :: forall (idL :: Pass) (idR :: Pass). CollectPass (GhcPass idL) => CollectFlag (GhcPass idL) -> HsValBindsLR (GhcPass idL) (GhcPass idR) -> [IdP (GhcPass idL)]
- collectHsIdBinders :: forall (idL :: Pass) (idR :: Pass). CollectPass (GhcPass idL) => CollectFlag (GhcPass idL) -> HsValBindsLR (GhcPass idL) (GhcPass idR) -> [IdP (GhcPass idL)]
- collectHsBindsBinders :: CollectPass p => CollectFlag p -> LHsBindsLR p idR -> [IdP p]
- collectHsBindListBinders :: CollectPass p => CollectFlag p -> [LHsBindLR p idR] -> [IdP p]
- collectHsBindBinders :: CollectPass p => CollectFlag p -> HsBindLR p idR -> [IdP p]
- chunkify :: [a] -> [[a]]
- data XXExprGhcTc
- = WrapExpr !(HsWrap HsExpr)
- | ExpansionExpr !(HsExpansion (HsExpr GhcRn) (HsExpr GhcTc))
- data XBindStmtTc = XBindStmtTc {}
- data XBindStmtRn = XBindStmtRn {}
- data SyntaxExprTc
- = SyntaxExprTc { }
- | NoSyntaxExprTc
- data SyntaxExprRn
- type family SyntaxExprGhc (p :: Pass) = (r :: Type) | r -> p where ...
- data RecordUpdTc = RecordUpdTc {
- rupd_cons :: [ConLike]
- rupd_in_tys :: [Type]
- rupd_out_tys :: [Type]
- rupd_wrap :: HsWrapper
- data RecStmtTc = RecStmtTc {
- recS_bind_ty :: Type
- recS_later_rets :: [PostTcExpr]
- recS_rec_rets :: [PostTcExpr]
- recS_ret_ty :: Type
- type PostTcTable = [(Name, PostTcExpr)]
- type PostTcExpr = HsExpr GhcTc
- data PendingTcSplice = PendingTcSplice SplicePointName (LHsExpr GhcTc)
- data PendingRnSplice = PendingRnSplice UntypedSpliceFlavour SplicePointName (LHsExpr GhcRn)
- data HsWrap (hs_syn :: Type -> Type) = HsWrap HsWrapper (hs_syn GhcTc)
- newtype HsSplicedT = HsSplicedT DelayedSplice
- data HsExpansion a b = HsExpanded a b
- data GrhsAnn = GrhsAnn {}
- data EpAnnUnboundVar = EpAnnUnboundVar {}
- data EpAnnHsCase = EpAnnHsCase {}
- data DelayedSplice = DelayedSplice TcLclEnv (LHsExpr GhcRn) TcType (LHsExpr GhcTc)
- data CmdTopTc = CmdTopTc Type Type (CmdSyntaxTable GhcTc)
- data AnnsLet = AnnsLet {
- alLet :: EpaLocation
- alIn :: EpaLocation
- data AnnsIf = AnnsIf {}
- data AnnProjection = AnnProjection {}
- data AnnFieldLabel = AnnFieldLabel {}
- data AnnExplicitSum = AnnExplicitSum {}
- tupArgPresent :: forall (p :: Pass). HsTupArg (GhcPass p) -> Bool
- thTyBrackets :: SDoc -> SDoc
- thBrackets :: SDoc -> SDoc -> SDoc
- stripParensLHsExpr :: forall (p :: Pass). LHsExpr (GhcPass p) -> LHsExpr (GhcPass p)
- stripParensHsExpr :: forall (p :: Pass). HsExpr (GhcPass p) -> HsExpr (GhcPass p)
- ppr_splice_decl :: forall (p :: Pass). OutputableBndrId p => HsSplice (GhcPass p) -> SDoc
- ppr_splice :: forall (p :: Pass). OutputableBndrId p => SDoc -> IdP (GhcPass p) -> LHsExpr (GhcPass p) -> SDoc -> SDoc
- ppr_quasi :: OutputableBndr p => p -> p -> FastString -> SDoc
- ppr_module_name_prefix :: Maybe ModuleName -> SDoc
- ppr_lexpr :: forall (p :: Pass). OutputableBndrId p => LHsExpr (GhcPass p) -> SDoc
- ppr_lcmd :: forall (p :: Pass). OutputableBndrId p => LHsCmd (GhcPass p) -> SDoc
- ppr_infix_expr :: forall (p :: Pass). OutputableBndrId p => HsExpr (GhcPass p) -> Maybe SDoc
- ppr_expr :: forall (p :: Pass). OutputableBndrId p => HsExpr (GhcPass p) -> SDoc
- ppr_do_stmts :: forall (idL :: Pass) (idR :: Pass) body. (OutputableBndrId idL, OutputableBndrId idR, Anno (StmtLR (GhcPass idL) (GhcPass idR) body) ~ SrcSpanAnnA, Outputable body) => [LStmtLR (GhcPass idL) (GhcPass idR) body] -> SDoc
- ppr_cmd :: forall (p :: Pass). OutputableBndrId p => HsCmd (GhcPass p) -> SDoc
- ppr_apps :: forall (p :: Pass). OutputableBndrId p => HsExpr (GhcPass p) -> [Either (LHsExpr (GhcPass p)) (LHsWcType (NoGhcTc (GhcPass p)))] -> SDoc
- pprTransformStmt :: forall (p :: Pass). OutputableBndrId p => [IdP (GhcPass p)] -> LHsExpr (GhcPass p) -> Maybe (LHsExpr (GhcPass p)) -> SDoc
- pprTransStmt :: Outputable body => Maybe body -> body -> TransForm -> SDoc
- pprStmtInCtxt :: forall (idL :: Pass) (idR :: Pass) body. (OutputableBndrId idL, OutputableBndrId idR, Outputable body, Anno (StmtLR (GhcPass idL) (GhcPass idR) body) ~ SrcSpanAnnA) => HsStmtContext (GhcPass idL) -> StmtLR (GhcPass idL) (GhcPass idR) body -> SDoc
- pprStmt :: forall (idL :: Pass) (idR :: Pass) body. (OutputableBndrId idL, OutputableBndrId idR, Anno (StmtLR (GhcPass idL) (GhcPass idR) body) ~ SrcSpanAnnA, Outputable body) => StmtLR (GhcPass idL) (GhcPass idR) body -> SDoc
- pprQuals :: forall (p :: Pass) body. (OutputableBndrId p, Outputable body, Anno (StmtLR (GhcPass p) (GhcPass p) body) ~ SrcSpanAnnA) => [LStmt (GhcPass p) body] -> SDoc
- pprPendingSplice :: forall (p :: Pass). OutputableBndrId p => SplicePointName -> LHsExpr (GhcPass p) -> SDoc
- pprParendLExpr :: forall (p :: Pass). OutputableBndrId p => PprPrec -> LHsExpr (GhcPass p) -> SDoc
- pprParendExpr :: forall (p :: Pass). OutputableBndrId p => PprPrec -> HsExpr (GhcPass p) -> SDoc
- pprMatches :: forall (idR :: Pass) body. (OutputableBndrId idR, Outputable body) => MatchGroup (GhcPass idR) body -> SDoc
- pprMatchInCtxt :: forall (idR :: Pass) body. (OutputableBndrId idR, Outputable body) => Match (GhcPass idR) body -> SDoc
- pprMatch :: forall (idR :: Pass) body. (OutputableBndrId idR, Outputable body) => Match (GhcPass idR) body -> SDoc
- pprLCmd :: forall (p :: Pass). OutputableBndrId p => LHsCmd (GhcPass p) -> SDoc
- pprHsBracket :: forall (p :: Pass). OutputableBndrId p => HsBracket (GhcPass p) -> SDoc
- pprGRHSs :: forall (idR :: Pass) body passL. (OutputableBndrId idR, Outputable body) => HsMatchContext passL -> GRHSs (GhcPass idR) body -> SDoc
- pprGRHS :: forall (idR :: Pass) body passL. (OutputableBndrId idR, Outputable body) => HsMatchContext passL -> GRHS (GhcPass idR) body -> SDoc
- pprDo :: forall (p :: Pass) body any. (OutputableBndrId p, Outputable body, Anno (StmtLR (GhcPass p) (GhcPass p) body) ~ SrcSpanAnnA) => HsStmtContext any -> [LStmt (GhcPass p) body] -> SDoc
- pprDebugParendExpr :: forall (p :: Pass). OutputableBndrId p => PprPrec -> LHsExpr (GhcPass p) -> SDoc
- pprComp :: forall (p :: Pass) body. (OutputableBndrId p, Outputable body, Anno (StmtLR (GhcPass p) (GhcPass p) body) ~ SrcSpanAnnA) => [LStmt (GhcPass p) body] -> SDoc
- pprCmdArg :: forall (p :: Pass). OutputableBndrId p => HsCmdTop (GhcPass p) -> SDoc
- pprCmd :: forall (p :: Pass). OutputableBndrId p => HsCmd (GhcPass p) -> SDoc
- pprBy :: Outputable body => Maybe body -> SDoc
- pprBinds :: forall (idL :: Pass) (idR :: Pass). (OutputableBndrId idL, OutputableBndrId idR) => HsLocalBindsLR (GhcPass idL) (GhcPass idR) -> SDoc
- pprBindStmt :: (Outputable pat, Outputable expr) => pat -> expr -> SDoc
- pprArg :: forall (idL :: Pass). OutputableBndrId idL => ApplicativeArg (GhcPass idL) -> SDoc
- pp_rhs :: Outputable body => HsMatchContext passL -> body -> SDoc
- pp_dotdot :: SDoc
- parenthesizeHsExpr :: forall (p :: Pass). IsPass p => PprPrec -> LHsExpr (GhcPass p) -> LHsExpr (GhcPass p)
- noSyntaxExpr :: forall (p :: Pass). IsPass p => SyntaxExpr (GhcPass p)
- noExpr :: forall (p :: Pass). HsExpr (GhcPass p)
- mkSyntaxExpr :: HsExpr GhcRn -> SyntaxExprRn
- mkRnSyntaxExpr :: Name -> SyntaxExprRn
- matchGroupArity :: forall (id :: Pass) body. MatchGroup (GhcPass id) body -> Arity
- matchContextErrString :: forall (p :: Pass). OutputableBndrId p => HsMatchContext (GhcPass p) -> SDoc
- matchArrowContextErrString :: HsArrowMatchContext -> SDoc
- isSingletonMatchGroup :: forall (p :: Pass) body. [LMatch (GhcPass p) body] -> Bool
- isQuietHsExpr :: HsExpr id -> Bool
- isQuietHsCmd :: HsCmd id -> Bool
- isEmptyMatchGroup :: forall (p :: Pass) body. MatchGroup (GhcPass p) body -> Bool
- isAtomicHsExpr :: forall (p :: Pass). IsPass p => HsExpr (GhcPass p) -> Bool
- hsLMatchPats :: forall (id :: Pass) body. LMatch (GhcPass id) body -> [LPat (GhcPass id)]
- hsExprNeedsParens :: forall (p :: Pass). IsPass p => PprPrec -> HsExpr (GhcPass p) -> Bool
- data NHsValBindsLR idL = NValBinds [(RecFlag, LHsBinds idL)] [LSig GhcRn]
- data AnnSig = AnnSig {}
- pragSrcBrackets :: SourceText -> String -> SDoc -> SDoc
- pragBrackets :: SDoc -> SDoc
- ppr_sig :: forall (p :: Pass). OutputableBndrId p => Sig (GhcPass p) -> SDoc
- ppr_monobind :: forall (idL :: Pass) (idR :: Pass). (OutputableBndrId idL, OutputableBndrId idR) => HsBindLR (GhcPass idL) (GhcPass idR) -> SDoc
- pprVarSig :: OutputableBndr id => [id] -> SDoc -> SDoc
- pprTicks :: SDoc -> SDoc -> SDoc
- pprTcSpecPrags :: TcSpecPrags -> SDoc
- pprSpec :: OutputableBndr id => id -> SDoc -> InlinePragma -> SDoc
- pprMinimalSig :: OutputableBndr name => LBooleanFormula (GenLocated l name) -> SDoc
- pprLHsBindsForUser :: forall (idL :: Pass) (idR :: Pass) (id2 :: Pass). (OutputableBndrId idL, OutputableBndrId idR, OutputableBndrId id2) => LHsBindsLR (GhcPass idL) (GhcPass idR) -> [LSig (GhcPass id2)] -> [SDoc]
- pprLHsBinds :: forall (idL :: Pass) (idR :: Pass). (OutputableBndrId idL, OutputableBndrId idR) => LHsBindsLR (GhcPass idL) (GhcPass idR) -> SDoc
- pprDeclList :: [SDoc] -> SDoc
- plusHsValBinds :: forall (a :: Pass). HsValBinds (GhcPass a) -> HsValBinds (GhcPass a) -> HsValBinds (GhcPass a)
- isEmptyValBinds :: forall (a :: Pass) (b :: Pass). HsValBindsLR (GhcPass a) (GhcPass b) -> Bool
- isEmptyLHsBinds :: forall (idL :: Pass) idR. LHsBindsLR (GhcPass idL) idR -> Bool
- isEmptyIPBindsTc :: HsIPBinds GhcTc -> Bool
- isEmptyIPBindsPR :: forall (p :: Pass). HsIPBinds (GhcPass p) -> Bool
- eqEmptyLocalBinds :: HsLocalBindsLR a b -> Bool
- emptyValBindsOut :: forall (a :: Pass) (b :: Pass). HsValBindsLR (GhcPass a) (GhcPass b)
- emptyValBindsIn :: forall (a :: Pass) (b :: Pass). HsValBindsLR (GhcPass a) (GhcPass b)
- emptyLocalBinds :: forall (a :: Pass) (b :: Pass). HsLocalBindsLR (GhcPass a) (GhcPass b)
- emptyLHsBinds :: forall (idL :: Pass) idR. LHsBindsLR (GhcPass idL) idR
- mkHsAppTy :: forall (p :: Pass). LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)
- mkHsAppKindTy :: forall (p :: Pass). XAppKindTy (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)
- pprSpliceDecl :: forall (p :: Pass). OutputableBndrId p => HsSplice (GhcPass p) -> SpliceExplicitFlag -> SDoc
- pprSplice :: forall (p :: Pass). OutputableBndrId p => HsSplice (GhcPass p) -> SDoc
- pprPatBind :: forall (bndr :: Pass) (p :: Pass). (OutputableBndrId bndr, OutputableBndrId p) => LPat (GhcPass bndr) -> GRHSs (GhcPass p) (LHsExpr (GhcPass p)) -> SDoc
- pprLExpr :: forall (p :: Pass). OutputableBndrId p => LHsExpr (GhcPass p) -> SDoc
- pprFunBind :: forall (idR :: Pass). OutputableBndrId idR => MatchGroup (GhcPass idR) (LHsExpr (GhcPass idR)) -> SDoc
- pprExpr :: forall (p :: Pass). OutputableBndrId p => HsExpr (GhcPass p) -> SDoc
- data UntypedSpliceFlavour
- data TransForm
- newtype ThModFinalizers = ThModFinalizers [ForeignRef (Q ())]
- data StmtLR idL idR body
- = LastStmt (XLastStmt idL idR body) body (Maybe Bool) (SyntaxExpr idR)
- | BindStmt (XBindStmt idL idR body) (LPat idL) body
- | ApplicativeStmt (XApplicativeStmt idL idR body) [(SyntaxExpr idR, ApplicativeArg idL)] (Maybe (SyntaxExpr idR))
- | BodyStmt (XBodyStmt idL idR body) body (SyntaxExpr idR) (SyntaxExpr idR)
- | LetStmt (XLetStmt idL idR body) (HsLocalBindsLR idL idR)
- | ParStmt (XParStmt idL idR body) [ParStmtBlock idL idR] (HsExpr idR) (SyntaxExpr idR)
- | TransStmt { }
- | RecStmt {
- recS_ext :: XRecStmt idL idR body
- recS_stmts :: XRec idR [LStmtLR idL idR body]
- recS_later_ids :: [IdP idR]
- recS_rec_ids :: [IdP idR]
- recS_bind_fn :: SyntaxExpr idR
- recS_ret_fn :: SyntaxExpr idR
- recS_mfix_fn :: SyntaxExpr idR
- | XStmtLR !(XXStmtLR idL idR body)
- type Stmt id body = StmtLR id id body
- type SplicePointName = Name
- data SpliceDecoration
- type RecUpdProj p = RecProj p (LHsExpr p)
- type RecProj p arg = HsRecField' (FieldLabelStrings p) arg
- type family PendingTcSplice' p
- type family PendingRnSplice' p
- data ParStmtBlock idL idR
- = ParStmtBlock (XParStmtBlock idL idR) [ExprLStmt idL] [IdP idR] (SyntaxExpr idR)
- | XParStmtBlock !(XXParStmtBlock idL idR)
- data MatchGroupTc = MatchGroupTc {
- mg_arg_tys :: [Scaled Type]
- mg_res_ty :: Type
- data Match p body
- type LStmtLR idL idR body = XRec idL (StmtLR idL idR body)
- type LStmt id body = XRec id (StmtLR id id body)
- type LMatch id body = XRec id (Match id body)
- type LHsTupArg id = XRec id (HsTupArg id)
- type LHsRecUpdProj p = XRec p (RecUpdProj p)
- type LHsRecProj p arg = XRec p (RecProj p arg)
- type LHsCmdTop p = XRec p (HsCmdTop p)
- type LHsCmd id = XRec id (HsCmd id)
- type LGRHS id body = XRec id (GRHS id body)
- data HsTupArg id
- data HsStmtContext p
- = ListComp
- | MonadComp
- | DoExpr (Maybe ModuleName)
- | MDoExpr (Maybe ModuleName)
- | ArrowExpr
- | GhciStmtCtxt
- | PatGuard (HsMatchContext p)
- | ParStmtCtxt (HsStmtContext p)
- | TransStmtCtxt (HsStmtContext p)
- data HsSplicedThing id
- = HsSplicedExpr (HsExpr id)
- | HsSplicedTy (HsType id)
- | HsSplicedPat (Pat id)
- type HsRecordBinds p = HsRecFields p (LHsExpr p)
- data HsPragE p
- = HsPragSCC (XSCC p) SourceText StringLiteral
- | XHsPragE !(XXPragE p)
- data HsMatchContext p
- data HsFieldLabel p
- = HsFieldLabel { }
- | XHsFieldLabel !(XXHsFieldLabel p)
- type family HsDoRn p
- data HsCmdTop p
- data HsCmd id
- = HsCmdArrApp (XCmdArrApp id) (LHsExpr id) (LHsExpr id) HsArrAppType Bool
- | HsCmdArrForm (XCmdArrForm id) (LHsExpr id) LexicalFixity (Maybe Fixity) [LHsCmdTop id]
- | HsCmdApp (XCmdApp id) (LHsCmd id) (LHsExpr id)
- | HsCmdLam (XCmdLam id) (MatchGroup id (LHsCmd id))
- | HsCmdPar (XCmdPar id) (LHsCmd id)
- | HsCmdCase (XCmdCase id) (LHsExpr id) (MatchGroup id (LHsCmd id))
- | HsCmdLamCase (XCmdLamCase id) (MatchGroup id (LHsCmd id))
- | HsCmdIf (XCmdIf id) (SyntaxExpr id) (LHsExpr id) (LHsCmd id) (LHsCmd id)
- | HsCmdLet (XCmdLet id) (HsLocalBinds id) (LHsCmd id)
- | HsCmdDo (XCmdDo id) (XRec id [CmdLStmt id])
- | XCmd !(XXCmd id)
- type family HsBracketRn p
- data HsBracket p
- data HsArrowMatchContext
- data HsArrAppType
- type GuardStmt id = Stmt id (LHsExpr id)
- type GuardLStmt id = LStmt id (LHsExpr id)
- type GhciStmt id = Stmt id (LHsExpr id)
- type GhciLStmt id = LStmt id (LHsExpr id)
- data GRHS p body
- = GRHS (XCGRHS p body) [GuardLStmt p] body
- | XGRHS !(XXGRHS p body)
- newtype FieldLabelStrings p = FieldLabelStrings [Located (HsFieldLabel p)]
- type FailOperator id = Maybe (SyntaxExpr id)
- type ExprStmt id = Stmt id (LHsExpr id)
- type ExprLStmt id = LStmt id (LHsExpr id)
- type CmdSyntaxTable p = [(Name, HsExpr p)]
- type CmdStmt id = Stmt id (LHsCmd id)
- type CmdLStmt id = LStmt id (LHsCmd id)
- data ArithSeqInfo id
- type family ApplicativeArgStmCtxPass idL
- data ApplicativeArg idL
- = ApplicativeArgOne {
- xarg_app_arg_one :: XApplicativeArgOne idL
- app_arg_pattern :: LPat idL
- arg_expr :: LHsExpr idL
- is_body_stmt :: Bool
- | ApplicativeArgMany {
- xarg_app_arg_many :: XApplicativeArgMany idL
- app_stmts :: [ExprLStmt idL]
- final_expr :: HsExpr idL
- bv_pattern :: LPat idL
- stmt_context :: HsStmtContext (ApplicativeArgStmCtxPass idL)
- | XApplicativeArg !(XXApplicativeArg idL)
- = ApplicativeArgOne {
- qualifiedDoModuleName_maybe :: HsStmtContext p -> Maybe ModuleName
- prependQualified :: Maybe ModuleName -> SDoc -> SDoc
- pprStmtContext :: (Outputable (IdP p), UnXRec p) => HsStmtContext p -> SDoc
- pprMatchContextNoun :: (Outputable (IdP p), UnXRec p) => HsMatchContext p -> SDoc
- pprMatchContext :: (Outputable (IdP p), UnXRec p) => HsMatchContext p -> SDoc
- pprFieldLabelStrings :: FieldLabelStrings p -> SDoc
- pprExternalSrcLoc :: (StringLiteral, (Int, Int), (Int, Int)) -> SDoc
- pprArrowMatchContextNoun :: HsArrowMatchContext -> SDoc
- pprAStmtContext :: (Outputable (IdP p), UnXRec p) => HsStmtContext p -> SDoc
- matchSeparator :: HsMatchContext p -> SDoc
- isTypedSplice :: HsSplice id -> Bool
- isTypedBracket :: HsBracket id -> Bool
- isPatSynCtxt :: HsMatchContext p -> Bool
- isMonadStmtContext :: HsStmtContext id -> Bool
- isMonadCompContext :: HsStmtContext id -> Bool
- isInfixMatch :: Match id body -> Bool
- isComprehensionContext :: HsStmtContext id -> Bool
- data WarnDecls pass
- = Warnings {
- wd_ext :: XWarnings pass
- wd_src :: SourceText
- wd_warnings :: [LWarnDecl pass]
- | XWarnDecls !(XXWarnDecls pass)
- = Warnings {
- data WarnDecl pass
- = Warning (XWarning pass) [LIdP pass] WarningTxt
- | XWarnDecl !(XXWarnDecl pass)
- type TyFamInstEqn pass = FamEqn pass (LHsType pass)
- data TyFamInstDecl pass
- = TyFamInstDecl {
- tfid_xtn :: XCTyFamInstDecl pass
- tfid_eqn :: TyFamInstEqn pass
- | XTyFamInstDecl !(XXTyFamInstDecl pass)
- = TyFamInstDecl {
- type TyFamDefltDecl = TyFamInstDecl
- data TyClGroup pass
- = TyClGroup {
- group_ext :: XCTyClGroup pass
- group_tyclds :: [LTyClDecl pass]
- group_roles :: [LRoleAnnotDecl pass]
- group_kisigs :: [LStandaloneKindSig pass]
- group_instds :: [LInstDecl pass]
- | XTyClGroup !(XXTyClGroup pass)
- = TyClGroup {
- data TyClDecl pass
- = FamDecl {
- tcdFExt :: XFamDecl pass
- tcdFam :: FamilyDecl pass
- | SynDecl {
- tcdSExt :: XSynDecl pass
- tcdLName :: LIdP pass
- tcdTyVars :: LHsQTyVars pass
- tcdFixity :: LexicalFixity
- tcdRhs :: LHsType pass
- | DataDecl {
- tcdDExt :: XDataDecl pass
- tcdLName :: LIdP pass
- tcdTyVars :: LHsQTyVars pass
- tcdFixity :: LexicalFixity
- tcdDataDefn :: HsDataDefn pass
- | ClassDecl {
- tcdCExt :: XClassDecl pass
- tcdCtxt :: Maybe (LHsContext pass)
- tcdLName :: LIdP pass
- tcdTyVars :: LHsQTyVars pass
- tcdFixity :: LexicalFixity
- tcdFDs :: [LHsFunDep pass]
- tcdSigs :: [LSig pass]
- tcdMeths :: LHsBinds pass
- tcdATs :: [LFamilyDecl pass]
- tcdATDefs :: [LTyFamDefltDecl pass]
- tcdDocs :: [LDocDecl pass]
- | XTyClDecl !(XXTyClDecl pass)
- = FamDecl {
- data StandaloneKindSig pass
- = StandaloneKindSig (XStandaloneKindSig pass) (LIdP pass) (LHsSigType pass)
- | XStandaloneKindSig !(XXStandaloneKindSig pass)
- data SpliceDecl p
- = SpliceDecl (XSpliceDecl p) (XRec p (HsSplice p)) SpliceExplicitFlag
- | XSpliceDecl !(XXSpliceDecl p)
- data RuleDecls pass
- = HsRules {
- rds_ext :: XCRuleDecls pass
- rds_src :: SourceText
- rds_rules :: [LRuleDecl pass]
- | XRuleDecls !(XXRuleDecls pass)
- = HsRules {
- data RuleDecl pass
- data RuleBndr pass
- = RuleBndr (XCRuleBndr pass) (LIdP pass)
- | RuleBndrSig (XRuleBndrSig pass) (LIdP pass) (HsPatSigType pass)
- | XRuleBndr !(XXRuleBndr pass)
- data RoleAnnotDecl pass
- = RoleAnnotDecl (XCRoleAnnotDecl pass) (LIdP pass) [XRec pass (Maybe Role)]
- | XRoleAnnotDecl !(XXRoleAnnotDecl pass)
- data NewOrData
- type LWarnDecls pass = XRec pass (WarnDecls pass)
- type LWarnDecl pass = XRec pass (WarnDecl pass)
- type LTyFamInstEqn pass = XRec pass (TyFamInstEqn pass)
- type LTyFamInstDecl pass = XRec pass (TyFamInstDecl pass)
- type LTyFamDefltDecl pass = XRec pass (TyFamDefltDecl pass)
- type LTyClDecl pass = XRec pass (TyClDecl pass)
- type LStandaloneKindSig pass = XRec pass (StandaloneKindSig pass)
- type LSpliceDecl pass = XRec pass (SpliceDecl pass)
- type LRuleDecls pass = XRec pass (RuleDecls pass)
- type LRuleDecl pass = XRec pass (RuleDecl pass)
- type LRuleBndr pass = XRec pass (RuleBndr pass)
- type LRoleAnnotDecl pass = XRec pass (RoleAnnotDecl pass)
- type LInstDecl pass = XRec pass (InstDecl pass)
- type LInjectivityAnn pass = XRec pass (InjectivityAnn pass)
- type LHsFunDep pass = XRec pass (FunDep pass)
- type LHsDerivingClause pass = XRec pass (HsDerivingClause pass)
- type LHsDecl p = XRec p (HsDecl p)
- type LForeignDecl pass = XRec pass (ForeignDecl pass)
- type LFamilyResultSig pass = XRec pass (FamilyResultSig pass)
- type LFamilyDecl pass = XRec pass (FamilyDecl pass)
- type LDocDecl pass = XRec pass DocDecl
- type LDerivStrategy pass = XRec pass (DerivStrategy pass)
- type LDerivDecl pass = XRec pass (DerivDecl pass)
- type LDerivClauseTys pass = XRec pass (DerivClauseTys pass)
- type LDefaultDecl pass = XRec pass (DefaultDecl pass)
- type LDataFamInstDecl pass = XRec pass (DataFamInstDecl pass)
- type LConDecl pass = XRec pass (ConDecl pass)
- type LClsInstDecl pass = XRec pass (ClsInstDecl pass)
- type LAnnDecl pass = XRec pass (AnnDecl pass)
- data InstDecl pass
- = ClsInstD {
- cid_d_ext :: XClsInstD pass
- cid_inst :: ClsInstDecl pass
- | DataFamInstD {
- dfid_ext :: XDataFamInstD pass
- dfid_inst :: DataFamInstDecl pass
- | TyFamInstD {
- tfid_ext :: XTyFamInstD pass
- tfid_inst :: TyFamInstDecl pass
- | XInstDecl !(XXInstDecl pass)
- = ClsInstD {
- data InjectivityAnn pass
- = InjectivityAnn (XCInjectivityAnn pass) (LIdP pass) [LIdP pass]
- | XInjectivityAnn !(XXInjectivityAnn pass)
- type HsTyPats pass = [LHsTypeArg pass]
- data HsRuleRn = HsRuleRn NameSet NameSet
- data HsGroup p
- = HsGroup {
- hs_ext :: XCHsGroup p
- hs_valds :: HsValBinds p
- hs_splcds :: [LSpliceDecl p]
- hs_tyclds :: [TyClGroup p]
- hs_derivds :: [LDerivDecl p]
- hs_fixds :: [LFixitySig p]
- hs_defds :: [LDefaultDecl p]
- hs_fords :: [LForeignDecl p]
- hs_warnds :: [LWarnDecls p]
- hs_annds :: [LAnnDecl p]
- hs_ruleds :: [LRuleDecls p]
- hs_docs :: [LDocDecl p]
- | XHsGroup !(XXHsGroup p)
- = HsGroup {
- data HsDerivingClause pass
- = HsDerivingClause {
- deriv_clause_ext :: XCHsDerivingClause pass
- deriv_clause_strategy :: Maybe (LDerivStrategy pass)
- deriv_clause_tys :: LDerivClauseTys pass
- | XHsDerivingClause !(XXHsDerivingClause pass)
- = HsDerivingClause {
- type HsDeriving pass = [LHsDerivingClause pass]
- data HsDecl p
- = TyClD (XTyClD p) (TyClDecl p)
- | InstD (XInstD p) (InstDecl p)
- | DerivD (XDerivD p) (DerivDecl p)
- | ValD (XValD p) (HsBind p)
- | SigD (XSigD p) (Sig p)
- | KindSigD (XKindSigD p) (StandaloneKindSig p)
- | DefD (XDefD p) (DefaultDecl p)
- | ForD (XForD p) (ForeignDecl p)
- | WarningD (XWarningD p) (WarnDecls p)
- | AnnD (XAnnD p) (AnnDecl p)
- | RuleD (XRuleD p) (RuleDecls p)
- | SpliceD (XSpliceD p) (SpliceDecl p)
- | DocD (XDocD p) DocDecl
- | RoleAnnotD (XRoleAnnotD p) (RoleAnnotDecl p)
- | XHsDecl !(XXHsDecl p)
- data HsDataDefn pass
- = HsDataDefn {
- dd_ext :: XCHsDataDefn pass
- dd_ND :: NewOrData
- dd_ctxt :: Maybe (LHsContext pass)
- dd_cType :: Maybe (XRec pass CType)
- dd_kindSig :: Maybe (LHsKind pass)
- dd_cons :: [LConDecl pass]
- dd_derivs :: HsDeriving pass
- | XHsDataDefn !(XXHsDataDefn pass)
- = HsDataDefn {
- type HsConDeclH98Details pass = HsConDetails Void (HsScaled pass (LBangType pass)) (XRec pass [LConDeclField pass])
- data HsConDeclGADTDetails pass
- = PrefixConGADT [HsScaled pass (LBangType pass)]
- | RecConGADT (XRec pass [LConDeclField pass])
- data FunDep pass
- data ForeignImport = CImport (Located CCallConv) (Located Safety) (Maybe Header) CImportSpec (Located SourceText)
- data ForeignExport = CExport (Located CExportSpec) (Located SourceText)
- data ForeignDecl pass
- = ForeignImport {
- fd_i_ext :: XForeignImport pass
- fd_name :: LIdP pass
- fd_sig_ty :: LHsSigType pass
- fd_fi :: ForeignImport
- | ForeignExport {
- fd_e_ext :: XForeignExport pass
- fd_name :: LIdP pass
- fd_sig_ty :: LHsSigType pass
- fd_fe :: ForeignExport
- | XForeignDecl !(XXForeignDecl pass)
- = ForeignImport {
- data FamilyResultSig pass
- = NoSig (XNoSig pass)
- | KindSig (XCKindSig pass) (LHsKind pass)
- | TyVarSig (XTyVarSig pass) (LHsTyVarBndr () pass)
- | XFamilyResultSig !(XXFamilyResultSig pass)
- data FamilyInfo pass
- = DataFamily
- | OpenTypeFamily
- | ClosedTypeFamily (Maybe [LTyFamInstEqn pass])
- data FamilyDecl pass
- = FamilyDecl {
- fdExt :: XCFamilyDecl pass
- fdInfo :: FamilyInfo pass
- fdTopLevel :: TopLevelFlag
- fdLName :: LIdP pass
- fdTyVars :: LHsQTyVars pass
- fdFixity :: LexicalFixity
- fdResultSig :: LFamilyResultSig pass
- fdInjectivityAnn :: Maybe (LInjectivityAnn pass)
- | XFamilyDecl !(XXFamilyDecl pass)
- = FamilyDecl {
- data FamEqn pass rhs
- = FamEqn {
- feqn_ext :: XCFamEqn pass rhs
- feqn_tycon :: LIdP pass
- feqn_bndrs :: HsOuterFamEqnTyVarBndrs pass
- feqn_pats :: HsTyPats pass
- feqn_fixity :: LexicalFixity
- feqn_rhs :: rhs
- | XFamEqn !(XXFamEqn pass rhs)
- = FamEqn {
- data DocDecl
- data DerivStrategy pass
- = StockStrategy (XStockStrategy pass)
- | AnyclassStrategy (XAnyClassStrategy pass)
- | NewtypeStrategy (XNewtypeStrategy pass)
- | ViaStrategy (XViaStrategy pass)
- data DerivDecl pass
- = DerivDecl {
- deriv_ext :: XCDerivDecl pass
- deriv_type :: LHsSigWcType pass
- deriv_strategy :: Maybe (LDerivStrategy pass)
- deriv_overlap_mode :: Maybe (XRec pass OverlapMode)
- | XDerivDecl !(XXDerivDecl pass)
- = DerivDecl {
- data DerivClauseTys pass
- = DctSingle (XDctSingle pass) (LHsSigType pass)
- | DctMulti (XDctMulti pass) [LHsSigType pass]
- | XDerivClauseTys !(XXDerivClauseTys pass)
- data DefaultDecl pass
- = DefaultDecl (XCDefaultDecl pass) [LHsType pass]
- | XDefaultDecl !(XXDefaultDecl pass)
- newtype DataFamInstDecl pass = DataFamInstDecl {
- dfid_eqn :: FamEqn pass (HsDataDefn pass)
- data DataDeclRn = DataDeclRn {
- tcdDataCusk :: Bool
- tcdFVs :: NameSet
- data ConDecl pass
- = ConDeclGADT {
- con_g_ext :: XConDeclGADT pass
- con_names :: [LIdP pass]
- con_bndrs :: XRec pass (HsOuterSigTyVarBndrs pass)
- con_mb_cxt :: Maybe (LHsContext pass)
- con_g_args :: HsConDeclGADTDetails pass
- con_res_ty :: LHsType pass
- con_doc :: Maybe LHsDocString
- | ConDeclH98 {
- con_ext :: XConDeclH98 pass
- con_name :: LIdP pass
- con_forall :: Bool
- con_ex_tvs :: [LHsTyVarBndr Specificity pass]
- con_mb_cxt :: Maybe (LHsContext pass)
- con_args :: HsConDeclH98Details pass
- con_doc :: Maybe LHsDocString
- | XConDecl !(XXConDecl pass)
- = ConDeclGADT {
- data ClsInstDecl pass
- = ClsInstDecl {
- cid_ext :: XCClsInstDecl pass
- cid_poly_ty :: LHsSigType pass
- cid_binds :: LHsBinds pass
- cid_sigs :: [LSig pass]
- cid_tyfam_insts :: [LTyFamInstDecl pass]
- cid_datafam_insts :: [LDataFamInstDecl pass]
- cid_overlap_mode :: Maybe (XRec pass OverlapMode)
- | XClsInstDecl !(XXClsInstDecl pass)
- = ClsInstDecl {
- data CImportSpec
- data AnnProvenance pass
- = ValueAnnProvenance (LIdP pass)
- | TypeAnnProvenance (LIdP pass)
- | ModuleAnnProvenance
- data AnnDecl pass
- = HsAnnotation (XHsAnnotation pass) SourceText (AnnProvenance pass) (XRec pass (HsExpr pass))
- | XAnnDecl !(XXAnnDecl pass)
- tyClGroupTyClDecls :: [TyClGroup pass] -> [LTyClDecl pass]
- tyClGroupRoleDecls :: [TyClGroup pass] -> [LRoleAnnotDecl pass]
- tyClGroupKindSigs :: [TyClGroup pass] -> [LStandaloneKindSig pass]
- tyClGroupInstDecls :: [TyClGroup pass] -> [LInstDecl pass]
- tyClDeclTyVars :: TyClDecl pass -> LHsQTyVars pass
- pprFullRuleName :: Located (SourceText, RuleName) -> SDoc
- pprFlavour :: FamilyInfo pass -> SDoc
- newOrDataToFlavour :: NewOrData -> TyConFlavour
- isTypeFamilyDecl :: TyClDecl pass -> Bool
- isSynDecl :: TyClDecl pass -> Bool
- isOpenTypeFamilyInfo :: FamilyInfo pass -> Bool
- isFamilyDecl :: TyClDecl pass -> Bool
- isDataFamilyDecl :: TyClDecl pass -> Bool
- isDataDecl :: TyClDecl pass -> Bool
- isClosedTypeFamilyInfo :: FamilyInfo pass -> Bool
- isClassDecl :: TyClDecl pass -> Bool
- hsGroupInstDecls :: HsGroup id -> [LInstDecl id]
- docDeclDoc :: DocDecl -> HsDocString
- derivStrategyName :: DerivStrategy a -> SDoc
- countTyClDecls :: [TyClDecl pass] -> (Int, Int, Int, Int, Int)
- collectRuleBndrSigTys :: [RuleBndr pass] -> [HsPatSigType pass]
- annProvenanceName_maybe :: UnXRec p => AnnProvenance p -> Maybe (IdP p)
- data TcSpecPrags
- data TcSpecPrag = SpecPrag Id HsWrapper InlinePragma
- data Sig pass
- = TypeSig (XTypeSig pass) [LIdP pass] (LHsSigWcType pass)
- | PatSynSig (XPatSynSig pass) [LIdP pass] (LHsSigType pass)
- | ClassOpSig (XClassOpSig pass) Bool [LIdP pass] (LHsSigType pass)
- | IdSig (XIdSig pass) Id
- | FixSig (XFixSig pass) (FixitySig pass)
- | InlineSig (XInlineSig pass) (LIdP pass) InlinePragma
- | SpecSig (XSpecSig pass) (LIdP pass) [LHsSigType pass] InlinePragma
- | SpecInstSig (XSpecInstSig pass) SourceText (LHsSigType pass)
- | MinimalSig (XMinimalSig pass) SourceText (LBooleanFormula (LIdP pass))
- | SCCFunSig (XSCCFunSig pass) SourceText (LIdP pass) (Maybe (XRec pass StringLiteral))
- | CompleteMatchSig (XCompleteMatchSig pass) SourceText (XRec pass [LIdP pass]) (Maybe (LIdP pass))
- | XSig !(XXSig pass)
- data RecordPatSynField pass = RecordPatSynField {
- recordPatSynField :: FieldOcc pass
- recordPatSynPatVar :: LIdP pass
- data PatSynBind idL idR
- = PSB {
- psb_ext :: XPSB idL idR
- psb_id :: LIdP idL
- psb_args :: HsPatSynDetails idR
- psb_def :: LPat idR
- psb_dir :: HsPatSynDir idR
- | XPatSynBind !(XXPatSynBind idL idR)
- = PSB {
- type LTcSpecPrag = Located TcSpecPrag
- type LSig pass = XRec pass (Sig pass)
- type LIPBind id = XRec id (IPBind id)
- type LHsLocalBindsLR idL idR = XRec idL (HsLocalBindsLR idL idR)
- type LHsLocalBinds id = XRec id (HsLocalBinds id)
- type LHsBindsLR idL idR = Bag (LHsBindLR idL idR)
- type LHsBinds id = LHsBindsLR id id
- type LHsBindLR idL idR = XRec idL (HsBindLR idL idR)
- type LHsBind id = LHsBindLR id id
- type LFixitySig pass = XRec pass (FixitySig pass)
- data IPBind id
- data HsValBindsLR idL idR
- = ValBinds (XValBinds idL idR) (LHsBindsLR idL idR) [LSig idR]
- | XValBindsLR !(XXValBindsLR idL idR)
- type HsValBinds id = HsValBindsLR id id
- data HsPatSynDir id
- type HsPatSynDetails pass = HsConDetails Void (LIdP pass) [RecordPatSynField pass]
- data HsLocalBindsLR idL idR
- = HsValBinds (XHsValBinds idL idR) (HsValBindsLR idL idR)
- | HsIPBinds (XHsIPBinds idL idR) (HsIPBinds idR)
- | EmptyLocalBinds (XEmptyLocalBinds idL idR)
- | XHsLocalBindsLR !(XXHsLocalBindsLR idL idR)
- type HsLocalBinds id = HsLocalBindsLR id id
- data HsIPBinds id
- = IPBinds (XIPBinds id) [LIPBind id]
- | XHsIPBinds !(XXHsIPBinds id)
- data HsBindLR idL idR
- = FunBind {
- fun_ext :: XFunBind idL idR
- fun_id :: LIdP idL
- fun_matches :: MatchGroup idR (LHsExpr idR)
- fun_tick :: [CoreTickish]
- | PatBind {
- pat_ext :: XPatBind idL idR
- pat_lhs :: LPat idL
- pat_rhs :: GRHSs idR (LHsExpr idR)
- pat_ticks :: ([CoreTickish], [[CoreTickish]])
- | VarBind { }
- | AbsBinds {
- abs_ext :: XAbsBinds idL idR
- abs_tvs :: [TyVar]
- abs_ev_vars :: [EvVar]
- abs_exports :: [ABExport idL]
- abs_ev_binds :: [TcEvBinds]
- abs_binds :: LHsBinds idL
- abs_sig :: Bool
- | PatSynBind (XPatSynBind idL idR) (PatSynBind idL idR)
- | XHsBindsLR !(XXHsBindsLR idL idR)
- = FunBind {
- type HsBind id = HsBindLR id id
- data FixitySig pass
- = FixitySig (XFixitySig pass) [LIdP pass] Fixity
- | XFixitySig !(XXFixitySig pass)
- data ABExport p
- noSpecPrags :: TcSpecPrags
- isTypeLSig :: UnXRec p => LSig p -> Bool
- isSpecLSig :: UnXRec p => LSig p -> Bool
- isSpecInstLSig :: UnXRec p => LSig p -> Bool
- isSCCFunSig :: UnXRec p => LSig p -> Bool
- isPragLSig :: UnXRec p => LSig p -> Bool
- isMinimalLSig :: UnXRec p => LSig p -> Bool
- isInlineLSig :: UnXRec p => LSig p -> Bool
- isFixityLSig :: UnXRec p => LSig p -> Bool
- isDefaultMethod :: TcSpecPrags -> Bool
- isCompleteMatchSig :: UnXRec p => LSig p -> Bool
- hsSigDoc :: Sig name -> SDoc
- hasSpecPrags :: TcSpecPrags -> Bool
- type LHsRecUpdField p = XRec p (HsRecUpdField p)
- type LHsRecField' p id arg = XRec p (HsRecField' id arg)
- type LHsRecField p arg = XRec p (HsRecField p arg)
- type HsRecUpdField p = HsRecField' (AmbiguousFieldOcc p) (LHsExpr p)
- data HsRecFields p arg = HsRecFields {
- rec_flds :: [LHsRecField p arg]
- rec_dotdot :: Maybe (Located Int)
- data HsRecField' id arg = HsRecField {
- hsRecFieldAnn :: XHsRecField id
- hsRecFieldLbl :: Located id
- hsRecFieldArg :: arg
- hsRecPun :: Bool
- type HsRecField p arg = HsRecField' (FieldOcc p) arg
- type HsConPatDetails p = HsConDetails (HsPatSigType (NoGhcTc p)) (LPat p) (HsRecFields p (LPat p))
- type family ConLikeP x
- hsRecFieldsArgs :: UnXRec p => HsRecFields p arg -> [arg]
- hsRecFields :: UnXRec p => HsRecFields p arg -> [XCFieldOcc p]
- hsRecFieldSel :: HsRecField pass arg -> Located (XCFieldOcc pass)
- hsConPatArgs :: UnXRec p => HsConPatDetails p -> [LPat p]
- type LHsWcType pass = HsWildCardBndrs pass (LHsType pass)
- type LHsTypeArg p = HsArg (LHsType p) (LHsKind p)
- type LHsType pass = XRec pass (HsType pass)
- type LHsTyVarBndr flag pass = XRec pass (HsTyVarBndr flag pass)
- type LHsSigWcType pass = HsWildCardBndrs pass (LHsSigType pass)
- type LHsSigType pass = XRec pass (HsSigType pass)
- data LHsQTyVars pass
- = HsQTvs {
- hsq_ext :: XHsQTvs pass
- hsq_explicit :: [LHsTyVarBndr () pass]
- | XLHsQTyVars !(XXLHsQTyVars pass)
- = HsQTvs {
- type LHsKind pass = XRec pass (HsKind pass)
- type LHsContext pass = XRec pass (HsContext pass)
- type LFieldOcc pass = XRec pass (FieldOcc pass)
- type LConDeclField pass = XRec pass (ConDeclField pass)
- type LBangType pass = XRec pass (BangType pass)
- data HsWildCardBndrs pass thing
- = HsWC { }
- | XHsWildCardBndrs !(XXHsWildCardBndrs pass thing)
- data HsType pass
- = HsForAllTy {
- hst_xforall :: XForAllTy pass
- hst_tele :: HsForAllTelescope pass
- hst_body :: LHsType pass
- | HsQualTy { }
- | HsTyVar (XTyVar pass) PromotionFlag (LIdP pass)
- | HsAppTy (XAppTy pass) (LHsType pass) (LHsType pass)
- | HsAppKindTy (XAppKindTy pass) (LHsType pass) (LHsKind pass)
- | HsFunTy (XFunTy pass) (HsArrow pass) (LHsType pass) (LHsType pass)
- | HsListTy (XListTy pass) (LHsType pass)
- | HsTupleTy (XTupleTy pass) HsTupleSort [LHsType pass]
- | HsSumTy (XSumTy pass) [LHsType pass]
- | HsOpTy (XOpTy pass) (LHsType pass) (LIdP pass) (LHsType pass)
- | HsParTy (XParTy pass) (LHsType pass)
- | HsIParamTy (XIParamTy pass) (XRec pass HsIPName) (LHsType pass)
- | HsStarTy (XStarTy pass) Bool
- | HsKindSig (XKindSig pass) (LHsType pass) (LHsKind pass)
- | HsSpliceTy (XSpliceTy pass) (HsSplice pass)
- | HsDocTy (XDocTy pass) (LHsType pass) LHsDocString
- | HsBangTy (XBangTy pass) HsSrcBang (LHsType pass)
- | HsRecTy (XRecTy pass) [LConDeclField pass]
- | HsExplicitListTy (XExplicitListTy pass) PromotionFlag [LHsType pass]
- | HsExplicitTupleTy (XExplicitTupleTy pass) [LHsType pass]
- | HsTyLit (XTyLit pass) HsTyLit
- | HsWildCardTy (XWildCardTy pass)
- | XHsType !(XXType pass)
- = HsForAllTy {
- data HsTyVarBndr flag pass
- = UserTyVar (XUserTyVar pass) flag (LIdP pass)
- | KindedTyVar (XKindedTyVar pass) flag (LIdP pass) (LHsKind pass)
- | XTyVarBndr !(XXTyVarBndr pass)
- data HsTyLit
- data HsTupleSort
- data HsSigType pass
- = HsSig { }
- | XHsSigType !(XXHsSigType pass)
- data HsScaled pass a = HsScaled (HsArrow pass) a
- data HsPatSigType pass
- = HsPS { }
- | XHsPatSigType !(XXHsPatSigType pass)
- data HsPSRn = HsPSRn {
- hsps_nwcs :: [Name]
- hsps_imp_tvs :: [Name]
- data HsOuterTyVarBndrs flag pass
- = HsOuterImplicit {
- hso_ximplicit :: XHsOuterImplicit pass
- | HsOuterExplicit {
- hso_xexplicit :: XHsOuterExplicit pass flag
- hso_bndrs :: [LHsTyVarBndr flag (NoGhcTc pass)]
- | XHsOuterTyVarBndrs !(XXHsOuterTyVarBndrs pass)
- = HsOuterImplicit {
- type HsOuterSigTyVarBndrs = HsOuterTyVarBndrs Specificity
- type HsOuterFamEqnTyVarBndrs = HsOuterTyVarBndrs ()
- type HsKind pass = HsType pass
- newtype HsIPName = HsIPName FastString
- data HsForAllTelescope pass
- = HsForAllVis {
- hsf_xvis :: XHsForAllVis pass
- hsf_vis_bndrs :: [LHsTyVarBndr () pass]
- | HsForAllInvis {
- hsf_xinvis :: XHsForAllInvis pass
- hsf_invis_bndrs :: [LHsTyVarBndr Specificity pass]
- | XHsForAllTelescope !(XXHsForAllTelescope pass)
- = HsForAllVis {
- type HsCoreTy = Type
- type HsContext pass = [LHsType pass]
- data HsConDetails tyarg arg rec
- data HsArrow pass
- data HsArg tm ty
- data FieldOcc pass
- = FieldOcc {
- extFieldOcc :: XCFieldOcc pass
- rdrNameFieldOcc :: LocatedN RdrName
- | XFieldOcc !(XXFieldOcc pass)
- = FieldOcc {
- data ConDeclField pass
- = ConDeclField {
- cd_fld_ext :: XConDeclField pass
- cd_fld_names :: [LFieldOcc pass]
- cd_fld_type :: LBangType pass
- cd_fld_doc :: Maybe LHsDocString
- | XConDeclField !(XXConDeclField pass)
- = ConDeclField {
- type BangType pass = HsType pass
- data AmbiguousFieldOcc pass
- = Unambiguous (XUnambiguous pass) (LocatedN RdrName)
- | Ambiguous (XAmbiguous pass) (LocatedN RdrName)
- | XAmbiguousFieldOcc !(XXAmbiguousFieldOcc pass)
- numVisibleArgs :: [HsArg tm ty] -> Arity
- noTypeArgs :: [Void]
- mapHsOuterImplicit :: (XHsOuterImplicit pass -> XHsOuterImplicit pass) -> HsOuterTyVarBndrs flag pass -> HsOuterTyVarBndrs flag pass
- isHsKindedTyVar :: HsTyVarBndr flag pass -> Bool
- hsUnrestricted :: a -> HsScaled pass a
- hsScaledThing :: HsScaled pass a -> a
- hsQTvExplicit :: LHsQTyVars pass -> [LHsTyVarBndr () pass]
- hsPatSigType :: HsPatSigType pass -> LHsType pass
- hsMult :: HsScaled pass a -> HsArrow pass
- hsLinear :: a -> HsScaled pass a
- hsIPNameFS :: HsIPName -> FastString
- data Pat p
- = WildPat (XWildPat p)
- | VarPat (XVarPat p) (LIdP p)
- | LazyPat (XLazyPat p) (LPat p)
- | AsPat (XAsPat p) (LIdP p) (LPat p)
- | ParPat (XParPat p) (LPat p)
- | BangPat (XBangPat p) (LPat p)
- | ListPat (XListPat p) [LPat p]
- | TuplePat (XTuplePat p) [LPat p] Boxity
- | SumPat (XSumPat p) (LPat p) ConTag Arity
- | ConPat {
- pat_con_ext :: XConPat p
- pat_con :: XRec p (ConLikeP p)
- pat_args :: HsConPatDetails p
- | ViewPat (XViewPat p) (LHsExpr p) (LPat p)
- | SplicePat (XSplicePat p) (HsSplice p)
- | LitPat (XLitPat p) (HsLit p)
- | NPat (XNPat p) (XRec p (HsOverLit p)) (Maybe (SyntaxExpr p)) (SyntaxExpr p)
- | NPlusKPat (XNPlusKPat p) (LIdP p) (XRec p (HsOverLit p)) (HsOverLit p) (SyntaxExpr p) (SyntaxExpr p)
- | SigPat (XSigPat p) (LPat p) (HsPatSigType (NoGhcTc p))
- | XPat !(XXPat p)
- type LPat p = XRec p (Pat p)
- data OverLitVal
- data HsOverLit p
- = OverLit {
- ol_ext :: XOverLit p
- ol_val :: OverLitVal
- ol_witness :: HsExpr p
- | XOverLit !(XXOverLit p)
- = OverLit {
- data HsLit x
- = HsChar (XHsChar x) Char
- | HsCharPrim (XHsCharPrim x) Char
- | HsString (XHsString x) FastString
- | HsStringPrim (XHsStringPrim x) !ByteString
- | HsInt (XHsInt x) IntegralLit
- | HsIntPrim (XHsIntPrim x) Integer
- | HsWordPrim (XHsWordPrim x) Integer
- | HsInt64Prim (XHsInt64Prim x) Integer
- | HsWord64Prim (XHsWord64Prim x) Integer
- | HsInteger (XHsInteger x) Integer Type
- | HsRat (XHsRat x) FractionalLit Type
- | HsFloatPrim (XHsFloatPrim x) FractionalLit
- | HsDoublePrim (XHsDoublePrim x) FractionalLit
- | XLit !(XXLit x)
- negateOverLitVal :: OverLitVal -> OverLitVal
- hsOverLitNeedsParens :: PprPrec -> HsOverLit x -> Bool
- hsLitNeedsParens :: PprPrec -> HsLit x -> Bool
- data Pass
- = Parsed
- | Renamed
- | Typechecked
- type OutputableBndrId (pass :: Pass) = (OutputableBndr (IdGhcP pass), OutputableBndr (IdGhcP (NoGhcTcPass pass)), Outputable (GenLocated (Anno (IdGhcP pass)) (IdGhcP pass)), Outputable (GenLocated (Anno (IdGhcP (NoGhcTcPass pass))) (IdGhcP (NoGhcTcPass pass))), IsPass pass)
- type family NoGhcTcPass (p :: Pass) :: Pass where ...
- type IsSrcSpanAnn (p :: Pass) a = (Anno (IdGhcP p) ~ SrcSpanAnn' (EpAnn a), IsPass p)
- class (NoGhcTcPass (NoGhcTcPass p) ~ NoGhcTcPass p, IsPass (NoGhcTcPass p)) => IsPass (p :: Pass) where
- type family IdGhcP (pass :: Pass) where ...
- type GhcTc = GhcPass 'Typechecked
- type GhcRn = GhcPass 'Renamed
- type GhcPs = GhcPass 'Parsed
- data GhcPass (c :: Pass) where
- pprIfTc :: forall (p :: Pass). IsPass p => (p ~ 'Typechecked => SDoc) -> SDoc
- pprIfRn :: forall (p :: Pass). IsPass p => (p ~ 'Renamed => SDoc) -> SDoc
- pprIfPs :: forall (p :: Pass). IsPass p => (p ~ 'Parsed => SDoc) -> SDoc
- mkSingleAltCase :: CoreExpr -> Id -> AltCon -> [Var] -> CoreExpr -> CoreExpr
- type TcMCoercionR = MCoercionR
- type TcMCoercionN = MCoercionN
- type TcMCoercion = MCoercion
- data TcEvBinds
- = TcEvBinds EvBindsVar
- | EvBinds (Bag EvBind)
- type TcCoercionR = CoercionR
- type TcCoercionP = CoercionP
- type TcCoercionN = CoercionN
- type TcCoercion = Coercion
- data QuoteWrapper = QuoteWrapper EvVar Type
- data HsWrapper
- data HoleExprRef = HER (IORef EvTerm) TcType Unique
- data EvTypeable
- data EvTerm
- type EvExpr = CoreExpr
- data EvCallStack
- data EvBindsVar
- newtype EvBindMap = EvBindMap {}
- data EvBind = EvBind {}
- wrapIP :: Type -> CoercionR
- varSetMinusEvBindMap :: VarSet -> EvBindMap -> VarSet
- unwrapIP :: Type -> CoercionR
- tcDowngradeRole :: Role -> Role -> TcCoercion -> TcCoercion
- tcCoercionRole :: TcCoercion -> Role
- tcCoercionKind :: TcCoercion -> Pair TcType
- quoteWrapperTyVarTy :: QuoteWrapper -> Type
- pprHsWrapper :: HsWrapper -> (Bool -> SDoc) -> SDoc
- nonDetStrictFoldEvBindMap :: (EvBind -> a -> a) -> a -> EvBindMap -> a
- mkWpTyLams :: [TyVar] -> HsWrapper
- mkWpTyApps :: [Type] -> HsWrapper
- mkWpLet :: TcEvBinds -> HsWrapper
- mkWpLams :: [Var] -> HsWrapper
- mkWpFun :: HsWrapper -> HsWrapper -> Scaled TcType -> TcType -> SDoc -> HsWrapper
- mkWpEvVarApps :: [EvVar] -> HsWrapper
- mkWpEvApps :: [EvTerm] -> HsWrapper
- mkWpCastR :: TcCoercionR -> HsWrapper
- mkWpCastN :: TcCoercionN -> HsWrapper
- mkWantedEvBind :: EvVar -> EvTerm -> EvBind
- mkTcUnbranchedAxInstCo :: CoAxiom Unbranched -> [TcType] -> [TcCoercion] -> TcCoercionR
- mkTcTyConAppCo :: Role -> TyCon -> [TcCoercion] -> TcCoercion
- mkTcTransCo :: TcCoercion -> TcCoercion -> TcCoercion
- mkTcSymMCo :: TcMCoercion -> TcMCoercion
- mkTcSymCo :: TcCoercion -> TcCoercion
- mkTcSubCo :: HasDebugCallStack => TcCoercionN -> TcCoercionR
- mkTcRepReflCo :: TcType -> TcCoercionR
- mkTcReflCo :: Role -> TcType -> TcCoercion
- mkTcPhantomCo :: TcCoercionN -> TcType -> TcType -> TcCoercionP
- mkTcNthCo :: Role -> Int -> TcCoercion -> TcCoercion
- mkTcNomReflCo :: TcType -> TcCoercionN
- mkTcLRCo :: LeftOrRight -> TcCoercion -> TcCoercion
- mkTcKindCo :: TcCoercion -> TcCoercionN
- mkTcGReflRightMCo :: Role -> TcType -> TcMCoercionN -> TcCoercion
- mkTcGReflRightCo :: Role -> TcType -> TcCoercionN -> TcCoercion
- mkTcGReflLeftMCo :: Role -> TcType -> TcMCoercionN -> TcCoercion
- mkTcGReflLeftCo :: Role -> TcType -> TcCoercionN -> TcCoercion
- mkTcFunCo :: Role -> TcCoercion -> TcCoercion -> TcCoercion -> TcCoercion
- mkTcForAllCos :: [(TyVar, TcCoercionN)] -> TcCoercion -> TcCoercion
- mkTcForAllCo :: TyVar -> TcCoercionN -> TcCoercion -> TcCoercion
- mkTcFamilyTyConAppCo :: TyCon -> [TcCoercionN] -> TcCoercionN
- mkTcCoherenceRightCo :: Role -> TcType -> TcCoercionN -> TcCoercion -> TcCoercion
- mkTcCoherenceLeftCo :: Role -> TcType -> TcCoercionN -> TcCoercion -> TcCoercion
- mkTcCoVarCo :: CoVar -> TcCoercion
- mkTcAxiomRuleCo :: CoAxiomRule -> [TcCoercion] -> TcCoercionR
- mkTcAxInstCo :: forall (br :: BranchFlag). Role -> CoAxiom br -> BranchIndex -> [TcType] -> [TcCoercion] -> TcCoercion
- mkTcAppCo :: TcCoercion -> TcCoercionN -> TcCoercion
- mkGivenEvBind :: EvVar -> EvTerm -> EvBind
- mkEvScSelectors :: Class -> [TcType] -> [(TcPredType, EvExpr)]
- mkEvCast :: EvExpr -> TcCoercion -> EvTerm
- maybeTcSymCo :: SwapFlag -> TcCoercion -> TcCoercion
- maybeTcSubCo :: HasDebugCallStack => EqRel -> TcCoercionN -> TcCoercion
- lookupEvBind :: EvBindMap -> EvVar -> Maybe EvBind
- isTcReflexiveCo :: TcCoercion -> Bool
- isTcReflCo :: TcCoercion -> Bool
- isIdHsWrapper :: HsWrapper -> Bool
- isEmptyTcEvBinds :: TcEvBinds -> Bool
- isEmptyEvBindMap :: EvBindMap -> Bool
- isCoEvBindsVar :: EvBindsVar -> Bool
- idHsWrapper :: HsWrapper
- hsWrapDictBinders :: HsWrapper -> Bag DictId
- foldEvBindMap :: (EvBind -> a -> a) -> a -> EvBindMap -> a
- findNeededEvVars :: EvBindMap -> VarSet -> VarSet
- filterEvBindMap :: (EvBind -> Bool) -> EvBindMap -> EvBindMap
- extendEvBinds :: EvBindMap -> EvBind -> EvBindMap
- evVarsOfTerm :: EvTerm -> VarSet
- evTypeable :: Type -> EvTypeable -> EvTerm
- evTermCoercion_maybe :: EvTerm -> Maybe TcCoercion
- evTermCoercion :: EvTerm -> TcCoercion
- evSelector :: Id -> [Type] -> [EvExpr] -> EvExpr
- evId :: EvId -> EvExpr
- evDataConApp :: DataCon -> [Type] -> [EvExpr] -> EvTerm
- evDFunApp :: DFunId -> [Type] -> [EvExpr] -> EvTerm
- evCoercion :: TcCoercion -> EvTerm
- evCast :: EvExpr -> TcCoercion -> EvTerm
- evBindVar :: EvBind -> EvVar
- evBindMapToVarSet :: EvBindMap -> VarSet
- evBindMapBinds :: EvBindMap -> Bag EvBind
- emptyTcEvBinds :: TcEvBinds
- emptyEvBindMap :: EvBindMap
- collectHsWrapBinders :: HsWrapper -> ([Var], HsWrapper)
- applyQuoteWrapper :: QuoteWrapper -> HsWrapper
- (<.>) :: HsWrapper -> HsWrapper -> HsWrapper
- type VisibleOrphanModules = ModuleSet
- type InstMatch = (ClsInst, [DFunInstType])
- data InstEnvs = InstEnvs {}
- type InstEnv = UniqDFM Class ClsInstEnv
- type DFunInstType = Maybe Type
- type ClsInstLookupResult = ([InstMatch], [ClsInst], [InstMatch])
- data ClsInst = ClsInst {}
- updateClsInstDFun :: (DFunId -> DFunId) -> ClsInst -> ClsInst
- pprInstances :: [ClsInst] -> SDoc
- pprInstanceHdr :: ClsInst -> SDoc
- pprInstance :: ClsInst -> SDoc
- orphNamesOfClsInst :: ClsInst -> NameSet
- mkLocalInstance :: DFunId -> OverlapFlag -> [TyVar] -> Class -> [Type] -> ClsInst
- mkImportedInstance :: Name -> [RoughMatchTc] -> Name -> DFunId -> OverlapFlag -> IsOrphan -> ClsInst
- memberInstEnv :: InstEnv -> ClsInst -> Bool
- lookupUniqueInstEnv :: InstEnvs -> Class -> [Type] -> Either SDoc (ClsInst, [Type])
- lookupInstEnv :: Bool -> InstEnvs -> Class -> [Type] -> ClsInstLookupResult
- isOverlapping :: ClsInst -> Bool
- isOverlappable :: ClsInst -> Bool
- isIncoherent :: ClsInst -> Bool
- instanceSig :: ClsInst -> ([TyVar], [Type], Class, [Type])
- instanceRoughTcs :: ClsInst -> [RoughMatchTc]
- instanceHead :: ClsInst -> ([TyVar], Class, [Type])
- instanceDFunId :: ClsInst -> DFunId
- instanceBindFun :: BindFun
- instIsVisible :: VisibleOrphanModules -> ClsInst -> Bool
- instEnvElts :: InstEnv -> [ClsInst]
- instEnvClasses :: InstEnv -> [Class]
- identicalClsInstHead :: ClsInst -> ClsInst -> Bool
- fuzzyClsInstCmp :: ClsInst -> ClsInst -> Ordering
- extendInstEnvList :: InstEnv -> [ClsInst] -> InstEnv
- extendInstEnv :: InstEnv -> ClsInst -> InstEnv
- emptyInstEnv :: InstEnv
- deleteFromInstEnv :: InstEnv -> ClsInst -> InstEnv
- deleteDFunFromInstEnv :: InstEnv -> DFunId -> InstEnv
- classInstances :: InstEnvs -> Class -> [ClsInst]
- data TcLclEnv = TcLclEnv {
- tcl_loc :: RealSrcSpan
- tcl_ctxt :: [ErrCtxt]
- tcl_in_gen_code :: Bool
- tcl_tclvl :: TcLevel
- tcl_th_ctxt :: ThStage
- tcl_th_bndrs :: ThBindEnv
- tcl_arrow_ctxt :: ArrowCtxt
- tcl_rdr :: LocalRdrEnv
- tcl_env :: TcTypeEnv
- tcl_usage :: TcRef UsageEnv
- tcl_bndrs :: TcBinderStack
- tcl_lie :: TcRef WantedConstraints
- tcl_errs :: TcRef (Messages DecoratedSDoc)
- setLclEnvTcLevel :: TcLclEnv -> TcLevel -> TcLclEnv
- setLclEnvLoc :: TcLclEnv -> RealSrcSpan -> TcLclEnv
- getLclEnvTcLevel :: TcLclEnv -> TcLevel
- getLclEnvLoc :: TcLclEnv -> RealSrcSpan
- type TypeSize = IntWithInf
- type TcType = Type
- type TcTyVarSet = TyVarSet
- type TcTyVarBinder = TyVarBinder
- type TcTyCon = TyCon
- type TcTyCoVarSet = TyCoVarSet
- type TcTyCoVar = Var
- type TcThetaType = ThetaType
- type TcTauType = TcType
- type TcSigmaType = TcType
- type TcRhoType = TcType
- type TcReqTVBinder = ReqTVBinder
- type TcPredType = PredType
- newtype TcLevel = TcLevel Int
- type TcKind = Kind
- type TcInvisTVBinder = InvisTVBinder
- type TcDTyVarSet = DTyVarSet
- type TcDTyCoVarSet = DTyCoVarSet
- type TcCoVar = CoVar
- data SyntaxOpType
- data MetaInfo
- data InferResult = IR {}
- data ExpType
- = Check TcType
- | Infer !InferResult
- type ExpSigmaType = ExpType
- type ExpRhoType = ExpType
- transSuperClasses :: PredType -> [PredType]
- topTcLevel :: TcLevel
- tcTypeLevel :: TcType -> TcLevel
- tcTyVarLevel :: TcTyVar -> TcLevel
- tcTyFamInstsAndVis :: Type -> [(Bool, TyCon, [Type])]
- tcTyFamInsts :: Type -> [(TyCon, [Type])]
- tcTyConVisibilities :: TyCon -> [Bool]
- tcTyConAppTyFamInstsAndVis :: TyCon -> [Type] -> [(Bool, TyCon, [Type])]
- tcTyConAppTyCon_maybe :: Type -> Maybe TyCon
- tcTyConAppTyCon :: Type -> TyCon
- tcTyConAppArgs :: Type -> [Type]
- tcSplitTyConApp :: Type -> (TyCon, [Type])
- tcSplitSomeForAllTyVars :: (ArgFlag -> Bool) -> Type -> ([TyVar], Type)
- tcSplitSigmaTy :: Type -> ([TyVar], ThetaType, Type)
- tcSplitPredFunTy_maybe :: Type -> Maybe (PredType, Type)
- tcSplitPiTys :: Type -> ([TyBinder], Type)
- tcSplitPiTy_maybe :: Type -> Maybe (TyBinder, Type)
- tcSplitPhiTy :: Type -> (ThetaType, Type)
- tcSplitNestedSigmaTys :: Type -> ([TyVar], ThetaType, Type)
- tcSplitMethodTy :: Type -> ([TyVar], PredType, Type)
- tcSplitIOType_maybe :: Type -> Maybe (TyCon, Type)
- tcSplitFunTysN :: Arity -> TcRhoType -> Either Arity ([Scaled TcSigmaType], TcSigmaType)
- tcSplitFunTys :: Type -> ([Scaled Type], Type)
- tcSplitFunTy_maybe :: Type -> Maybe (Scaled Type, Type)
- tcSplitForAllTyVars :: Type -> ([TyVar], Type)
- tcSplitForAllTyVarBinders :: Type -> ([TyVarBinder], Type)
- tcSplitForAllTyVarBinder_maybe :: Type -> Maybe (TyVarBinder, Type)
- tcSplitForAllReqTVBinders :: Type -> ([TcReqTVBinder], Type)
- tcSplitForAllInvisTyVars :: Type -> ([TyVar], Type)
- tcSplitForAllInvisTVBinders :: Type -> ([TcInvisTVBinder], Type)
- tcSplitDFunTy :: Type -> ([TyVar], [Type], Class, [Type])
- tcSplitDFunHead :: Type -> (Class, [Type])
- tcSplitAppTys :: Type -> (Type, [Type])
- tcSplitAppTy_maybe :: Type -> Maybe (Type, Type)
- tcSplitAppTy :: Type -> (Type, Type)
- tcRepGetNumAppTys :: Type -> Arity
- tcIsTyVarTy :: Type -> Bool
- tcIsTcTyVar :: TcTyVar -> Bool
- tcIsForAllTy :: Type -> Bool
- tcGetTyVar_maybe :: Type -> Maybe TyVar
- tcGetTyVar :: String -> Type -> TyVar
- tcGetCastedTyVar_maybe :: Type -> Maybe (TyVar, CoercionN)
- tcFunResultTyN :: HasDebugCallStack => Arity -> Type -> Type
- tcFunResultTy :: Type -> Type
- tcFunArgTy :: Type -> Scaled Type
- tcEqTypeVis :: TcType -> TcType -> Bool
- tcEqTypeNoKindCheck :: TcType -> TcType -> Bool
- tcEqType :: HasDebugCallStack => TcType -> TcType -> Bool
- tcEqTyConApps :: TyCon -> [Type] -> TyCon -> [Type] -> Bool
- tcEqKind :: HasDebugCallStack => TcKind -> TcKind -> Bool
- synKnownType :: TcType -> SyntaxOpType
- superSkolemTv :: TcTyVarDetails
- strictlyDeeperThan :: TcLevel -> TcLevel -> Bool
- sizeTypes :: [Type] -> TypeSize
- sizeType :: Type -> TypeSize
- setMetaTyVarTcLevel :: TcTyVar -> TcLevel -> TcTyVar
- sameDepthAs :: TcLevel -> TcLevel -> Bool
- pushTcLevel :: TcLevel -> TcLevel
- promoteSkolemsX :: TcLevel -> TCvSubst -> [TcTyVar] -> (TCvSubst, [TcTyVar])
- promoteSkolemX :: TcLevel -> TCvSubst -> TcTyVar -> (TCvSubst, TcTyVar)
- promoteSkolem :: TcLevel -> TcTyVar -> TcTyVar
- pickyEqType :: TcType -> TcType -> Bool
- pickQuantifiablePreds :: TyVarSet -> TcThetaType -> TcThetaType
- pickCapturedPreds :: TyVarSet -> TcThetaType -> TcThetaType
- mkTyVarNamePairs :: [TyVar] -> [(Name, TyVar)]
- mkTcCastTy :: Type -> Coercion -> Type
- mkTcAppTys :: Type -> [Type] -> Type
- mkTcAppTy :: Type -> Type -> Type
- mkSynFunTys :: [SyntaxOpType] -> ExpType -> SyntaxOpType
- mkSpecSigmaTy :: [TyVar] -> [PredType] -> Type -> Type
- mkSigmaTy :: [TyCoVarBinder] -> [PredType] -> Type -> Type
- mkPhiTy :: [PredType] -> Type -> Type
- mkMinimalBySCs :: (a -> PredType) -> [a] -> [a]
- mkInfSigmaTy :: [TyCoVar] -> [PredType] -> Type -> Type
- mkCheckExpType :: TcType -> ExpType
- metaTyVarTcLevel_maybe :: TcTyVar -> Maybe TcLevel
- metaTyVarTcLevel :: TcTyVar -> TcLevel
- metaTyVarRef :: TyVar -> IORef MetaDetails
- metaTyVarInfo :: TcTyVar -> MetaInfo
- maxTcLevel :: TcLevel -> TcLevel -> TcLevel
- isWordTy :: Type -> Bool
- isUnitTy :: Type -> Bool
- isTyVarTyVar :: Var -> Bool
- isTyVarClassPred :: PredType -> Bool
- isTyFamFree :: Type -> Bool
- isTouchableMetaTyVar :: TcLevel -> TcTyVar -> Bool
- isTopTcLevel :: TcLevel -> Bool
- isStringTy :: Type -> Bool
- isSkolemTyVar :: TcTyVar -> Bool
- isSigmaTy :: TcType -> Bool
- isRuntimeUnkSkol :: TyVar -> Bool
- isRigidTy :: TcType -> Bool
- isRhoTy :: TcType -> Bool
- isRhoExpTy :: ExpType -> Bool
- isPromotableMetaTyVar :: TcTyVar -> Bool
- isOverloadedTy :: Type -> Bool
- isOverlappableTyVar :: TcTyVar -> Bool
- isNextTyConArgVisible :: TyCon -> [Type] -> Bool
- isNextArgVisible :: TcType -> Bool
- isNaturalTy :: Type -> Bool
- isMetaTyVarTy :: TcType -> Bool
- isIntegerTy :: Type -> Bool
- isIntTy :: Type -> Bool
- isIndirect :: MetaDetails -> Bool
- isImprovementPred :: PredType -> Bool
- isImmutableTyVar :: TyVar -> Bool
- isFunPtrTy :: Type -> Bool
- isFloatingTy :: Type -> Bool
- isFloatTy :: Type -> Bool
- isFlexi :: MetaDetails -> Bool
- isFFITy :: Type -> Bool
- isFFIPrimResultTy :: DynFlags -> Type -> Validity
- isFFIPrimArgumentTy :: DynFlags -> Type -> Validity
- isFFILabelTy :: Type -> Validity
- isFFIImportResultTy :: DynFlags -> Type -> Validity
- isFFIExternalTy :: Type -> Validity
- isFFIExportResultTy :: Type -> Validity
- isFFIDynTy :: Type -> Type -> Validity
- isFFIArgumentTy :: DynFlags -> Safety -> Type -> Validity
- isDoubleTy :: Type -> Bool
- isCycleBreakerTyVar :: TcTyVar -> Bool
- isCharTy :: Type -> Bool
- isCallStackTy :: Type -> Bool
- isCallStackPred :: Class -> [Type] -> Maybe FastString
- isBoolTy :: Type -> Bool
- isAmbiguousTyVar :: TcTyVar -> Bool
- immSuperClasses :: Class -> [Type] -> [PredType]
- hasTyVarHead :: Type -> Bool
- getDFunTyKey :: Type -> OccName
- findDupTyVarTvs :: [(Name, TcTyVar)] -> [(Name, Name)]
- exactTyCoVarsOfTypes :: [Type] -> TyCoVarSet
- exactTyCoVarsOfType :: Type -> TyCoVarSet
- evVarPred :: EvVar -> PredType
- deeperThanOrSame :: TcLevel -> TcLevel -> Bool
- deNoteType :: Type -> Type
- checkValidClsArgs :: Bool -> Class -> [KindOrType] -> Bool
- boxEqPred :: EqRel -> Type -> Type -> Maybe (Class, [Type])
- anyRewritableTyVar :: Bool -> EqRel -> (EqRel -> TcTyVar -> Bool) -> TcType -> Bool
- anyRewritableTyFamApp :: EqRel -> (EqRel -> TyCon -> [TcType] -> Bool) -> TcType -> Bool
- anyRewritableCanEqLHS :: EqRel -> (EqRel -> TcTyVar -> Bool) -> (EqRel -> TyCon -> [TcType] -> Bool) -> TcType -> Bool
- orphNamesOfTypes :: [Type] -> NameSet
- orphNamesOfType :: Type -> NameSet
- orphNamesOfCoCon :: forall (br :: BranchFlag). CoAxiom br -> NameSet
- orphNamesOfCo :: Coercion -> NameSet
- lookupOrigNameCache :: OrigNameCache -> Module -> OccName -> Maybe Name
- extendNameCache :: OrigNameCache -> Module -> OccName -> Name -> OrigNameCache
- wordTyConName :: Name
- wordTyCon :: TyCon
- wordTy :: Type
- wordDataCon :: DataCon
- word8TyCon :: TyCon
- word8Ty :: Type
- word8DataCon :: DataCon
- wiredInTyCons :: [TyCon]
- unrestrictedFunTyConName :: Name
- unliftedTypeKindTyConName :: Name
- unliftedRepTyConName :: Name
- unliftedDataConTyCon :: TyCon
- unitTyConKey :: Unique
- unitTyCon :: TyCon
- unitDataConId :: Id
- unitDataCon :: DataCon
- unboxedUnitTyCon :: TyCon
- unboxedUnitTy :: Type
- unboxedUnitDataCon :: DataCon
- unboxedSumKind :: [Type] -> Kind
- typeToTypeKind :: Kind
- typeSymbolKindCon :: TyCon
- tupleDataConName :: Boxity -> Arity -> Name
- true_RDR :: RdrName
- trueDataConId :: Id
- trueDataCon :: DataCon
- sumRepDataConTyCon :: TyCon
- stringTyCon_RDR :: RdrName
- stringTy :: Type
- soloTyCon :: TyCon
- promotedTrueDataCon :: TyCon
- promotedNothingDataCon :: TyCon
- promotedNilDataCon :: TyCon
- promotedLTDataCon :: TyCon
- promotedJustDataCon :: TyCon
- promotedGTDataCon :: TyCon
- promotedFalseDataCon :: TyCon
- promotedEQDataCon :: TyCon
- promotedConsDataCon :: TyCon
- pairTyCon :: TyCon
- orderingTyCon :: TyCon
- ordLTDataConId :: Id
- ordLTDataCon :: DataCon
- ordGTDataConId :: Id
- ordGTDataCon :: DataCon
- ordEQDataConId :: Id
- ordEQDataCon :: DataCon
- oneDataConName :: Name
- oneDataCon :: DataCon
- nothingDataConName :: Name
- nothingDataCon :: DataCon
- nonEmptyTyConName :: Name
- nonEmptyTyCon :: TyCon
- nonEmptyDataConName :: Name
- nonEmptyDataCon :: DataCon
- nilDataConName :: Name
- nilDataCon :: DataCon
- naturalTyConName :: Name
- naturalTyCon :: TyCon
- naturalNSDataConName :: Name
- naturalNSDataCon :: DataCon
- naturalNBDataConName :: Name
- naturalNBDataCon :: DataCon
- multiplicityTyConName :: Name
- mkWiredInTyConName :: BuiltInSyntax -> Module -> FastString -> Unique -> TyCon -> Name
- mkWiredInIdName :: Module -> FastString -> Unique -> Id -> Name
- mkTupleTy1 :: Boxity -> [Type] -> Type
- mkTupleTy :: Boxity -> [Type] -> Type
- mkTupleStr :: Boxity -> Arity -> String
- mkSumTy :: [Type] -> Type
- mkPromotedPairTy :: Kind -> Kind -> Type -> Type -> Type
- mkPromotedMaybeTy :: Kind -> Maybe Type -> Type
- mkMaybeTy :: Type -> Kind
- mkListTy :: Type -> Type
- maybeTyConName :: Name
- maybeTyCon :: TyCon
- manyDataConName :: Name
- manyDataCon :: DataCon
- makeRecoveryTyCon :: TyCon -> TyCon
- listTyCon_RDR :: RdrName
- listTyConName :: Name
- liftedTypeKindTyConName :: Name
- liftedRepTyConName :: Name
- justDataConName :: Name
- justDataCon :: DataCon
- isPromotedPairType :: Type -> Maybe (Type, Type)
- isPromotedMaybeTy :: Type -> Maybe (Maybe Type)
- isCTupleTyConName :: Name -> Bool
- isBuiltInOcc_maybe :: OccName -> Maybe Name
- integerTyConName :: Name
- integerTyCon :: TyCon
- integerISDataConName :: Name
- integerISDataCon :: DataCon
- integerIPDataConName :: Name
- integerIPDataCon :: DataCon
- integerINDataConName :: Name
- integerINDataCon :: DataCon
- intTyCon_RDR :: RdrName
- intTyConName :: Name
- intTyCon :: TyCon
- intTy :: Type
- intDataCon_RDR :: RdrName
- intDataCon :: DataCon
- heqTyConName :: Name
- heqDataCon :: DataCon
- heqClass :: Class
- floatTyConName :: Name
- floatTyCon :: TyCon
- floatTy :: Type
- floatDataCon :: DataCon
- filterCTuple :: RdrName -> RdrName
- false_RDR :: RdrName
- falseDataConId :: Id
- falseDataCon :: DataCon
- eqTyCon_RDR :: RdrName
- eqTyConName :: Name
- eqTyCon :: TyCon
- eqDataCon :: DataCon
- eqClass :: Class
- doubleTyConName :: Name
- doubleTyCon :: TyCon
- doubleTy :: Type
- doubleDataCon :: DataCon
- constraintKindTyConName :: Name
- constraintKindTyCon :: TyCon
- consDataCon_RDR :: RdrName
- consDataConName :: Name
- consDataCon :: DataCon
- coercibleTyConName :: Name
- coercibleDataCon :: DataCon
- coercibleClass :: Class
- charTyCon_RDR :: RdrName
- charTyConName :: Name
- charTyCon :: TyCon
- charDataCon :: DataCon
- cTupleTyConNames :: [Name]
- cTupleTyConNameArity_maybe :: Name -> Maybe Arity
- cTupleTyCon :: Arity -> TyCon
- cTupleSelId :: ConTag -> Arity -> Id
- cTupleDataConNames :: [Name]
- boxingDataCon_maybe :: TyCon -> Maybe DataCon
- boolTyCon_RDR :: RdrName
- boolTyConName :: Name
- boolTyCon :: TyCon
- boolTy :: Type
- anyTyCon :: TyCon
- anyTy :: Type
- zapStableUnfolding :: Id -> Id
- zapLamIdInfo :: Id -> Id
- zapJoinId :: Id -> Id
- zapIdUsedOnceInfo :: Id -> Id
- zapIdUsageInfo :: Id -> Id
- zapIdUsageEnvInfo :: Id -> Id
- zapIdTailCallInfo :: Id -> Id
- zapIdStrictness :: Id -> Id
- zapIdOccInfo :: Id -> Id
- zapIdDemandInfo :: Id -> Id
- zapFragileIdInfo :: Id -> Id
- updOneShotInfo :: Id -> OneShotInfo -> Id
- typeOneShot :: Type -> OneShotInfo
- transferPolyIdInfo :: Id -> [Var] -> Id -> Id
- stateHackOneShot :: OneShotInfo
- setOneShotLambda :: Id -> Id
- setInlinePragma :: Id -> InlinePragma -> Id
- setInlineActivation :: Id -> Activation -> Id
- setIdUnique :: Id -> Unique -> Id
- setIdUnfolding :: Id -> Unfolding -> Id
- setIdType :: Id -> Type -> Id
- setIdStrictness :: Id -> StrictSig -> Id
- setIdSpecialisation :: Id -> RuleInfo -> Id
- setIdOneShotInfo :: Id -> OneShotInfo -> Id
- setIdOccInfo :: Id -> OccInfo -> Id
- setIdNotExported :: Id -> Id
- setIdName :: Id -> Name -> Id
- setIdLFInfo :: Id -> LambdaFormInfo -> Id
- setIdInfo :: Id -> IdInfo -> Id
- setIdExported :: Id -> Id
- setIdDemandInfo :: Id -> Demand -> Id
- setIdCprInfo :: Id -> CprSig -> Id
- setIdCallArity :: Id -> Arity -> Id
- setIdCafInfo :: Id -> CafInfo -> Id
- setIdArity :: Id -> Arity -> Id
- setCaseBndrEvald :: StrictnessMark -> Id -> Id
- scaleVarBy :: Mult -> Var -> Var
- scaleIdBy :: Mult -> Id -> Id
- recordSelectorTyCon_maybe :: Id -> Maybe RecSelParent
- recordSelectorTyCon :: Id -> RecSelParent
- realIdUnfolding :: Id -> Unfolding
- modifyInlinePragma :: Id -> (InlinePragma -> InlinePragma) -> Id
- modifyIdInfo :: HasDebugCallStack => (IdInfo -> IdInfo) -> Id -> Id
- mkWorkerId :: Unique -> Id -> Type -> Id
- mkVanillaGlobalWithInfo :: Name -> Type -> IdInfo -> Id
- mkVanillaGlobal :: Name -> Type -> Id
- mkUserLocalOrCoVar :: OccName -> Unique -> Mult -> Type -> SrcSpan -> Id
- mkUserLocal :: OccName -> Unique -> Mult -> Type -> SrcSpan -> Id
- mkTemplateLocalsNum :: Int -> [Type] -> [Id]
- mkTemplateLocals :: [Type] -> [Id]
- mkTemplateLocal :: Int -> Type -> Id
- mkSysLocalOrCoVarM :: MonadUnique m => FastString -> Mult -> Type -> m Id
- mkSysLocalOrCoVar :: FastString -> Unique -> Mult -> Type -> Id
- mkSysLocalM :: MonadUnique m => FastString -> Mult -> Type -> m Id
- mkSysLocal :: FastString -> Unique -> Mult -> Type -> Id
- mkScaledTemplateLocal :: Int -> Scaled Type -> Id
- mkLocalIdWithInfo :: HasDebugCallStack => Name -> Mult -> Type -> IdInfo -> Id
- mkLocalIdOrCoVar :: Name -> Mult -> Type -> Id
- mkLocalId :: HasDebugCallStack => Name -> Mult -> Type -> Id
- mkLocalCoVar :: Name -> Type -> CoVar
- mkGlobalId :: IdDetails -> Name -> Type -> IdInfo -> Id
- mkExportedVanillaId :: Name -> Type -> Id
- mkExportedLocalId :: IdDetails -> Name -> Type -> Id
- maybeModifyIdInfo :: Maybe IdInfo -> Id -> Id
- localiseId :: Id -> Id
- lazySetIdInfo :: Id -> IdInfo -> Id
- isStrictId :: Id -> Bool
- isStateHackType :: Type -> Bool
- isRecordSelector :: Id -> Bool
- isProbablyOneShotLambda :: Id -> Bool
- isPrimOpId_maybe :: Id -> Maybe PrimOp
- isPrimOpId :: Id -> Bool
- isPatSynRecordSelector :: Id -> Bool
- isOneShotBndr :: Var -> Bool
- isNeverLevPolyId :: Id -> Bool
- isNaughtyRecordSelector :: Id -> Bool
- isJoinId_maybe :: Var -> Maybe JoinArity
- isJoinId :: Var -> Bool
- isImplicitId :: Id -> Bool
- isFCallId_maybe :: Id -> Maybe ForeignCall
- isFCallId :: Id -> Bool
- isDeadEndId :: Var -> Bool
- isDeadBinder :: Id -> Bool
- isDataConWrapId_maybe :: Id -> Maybe DataCon
- isDataConWrapId :: Id -> Bool
- isDataConWorkId_maybe :: Id -> Maybe DataCon
- isDataConWorkId :: Id -> Bool
- isDataConRecordSelector :: Id -> Bool
- isDataConId_maybe :: Id -> Maybe DataCon
- isDFunId :: Id -> Bool
- isConLikeId :: Id -> Bool
- isClassOpId_maybe :: Id -> Maybe Class
- isClassOpId :: Id -> Bool
- idUnique :: Id -> Unique
- idUnfolding :: Id -> Unfolding
- idType :: Id -> Kind
- idStrictness :: Id -> StrictSig
- idStateHackOneShotInfo :: Id -> OneShotInfo
- idSpecialisation :: Id -> RuleInfo
- idScaledType :: Id -> Scaled Type
- idRuleMatchInfo :: Id -> RuleMatchInfo
- idOneShotInfo :: Id -> OneShotInfo
- idOccInfo :: Id -> OccInfo
- idMult :: Id -> Mult
- idLFInfo_maybe :: Id -> Maybe LambdaFormInfo
- idJoinArity :: JoinId -> JoinArity
- idIsFrom :: Module -> Id -> Bool
- idInlinePragma :: Id -> InlinePragma
- idInlineActivation :: Id -> Activation
- idHasRules :: Id -> Bool
- idFunRepArity :: Id -> RepArity
- idDemandInfo :: Id -> Demand
- idDataCon :: Id -> DataCon
- idCprInfo :: Id -> CprSig
- idCoreRules :: Id -> [CoreRule]
- idCallArity :: Id -> Arity
- idCafInfo :: Id -> CafInfo
- idArity :: Id -> Arity
- hasNoBinding :: Id -> Bool
- clearOneShotLambda :: Id -> Id
- asJoinId_maybe :: Id -> Maybe JoinArity -> Id
- asJoinId :: Id -> JoinArity -> JoinId
- type family SyntaxExpr p
- data MatchGroup p body
- = MG { }
- | XMatchGroup !(XXMatchGroup p body)
- type LHsExpr p = XRec p (HsExpr p)
- data HsSplice id
- = HsTypedSplice (XTypedSplice id) SpliceDecoration (IdP id) (LHsExpr id)
- | HsUntypedSplice (XUntypedSplice id) SpliceDecoration (IdP id) (LHsExpr id)
- | HsQuasiQuote (XQuasiQuote id) (IdP id) (IdP id) SrcSpan FastString
- | HsSpliced (XSpliced id) ThModFinalizers (HsSplicedThing id)
- | XSplice !(XXSplice id)
- data HsExpr p
- = HsVar (XVar p) (LIdP p)
- | HsUnboundVar (XUnboundVar p) OccName
- | HsConLikeOut (XConLikeOut p) ConLike
- | HsRecFld (XRecFld p) (AmbiguousFieldOcc p)
- | HsOverLabel (XOverLabel p) FastString
- | HsIPVar (XIPVar p) HsIPName
- | HsOverLit (XOverLitE p) (HsOverLit p)
- | HsLit (XLitE p) (HsLit p)
- | HsLam (XLam p) (MatchGroup p (LHsExpr p))
- | HsLamCase (XLamCase p) (MatchGroup p (LHsExpr p))
- | HsApp (XApp p) (LHsExpr p) (LHsExpr p)
- | HsAppType (XAppTypeE p) (LHsExpr p) (LHsWcType (NoGhcTc p))
- | OpApp (XOpApp p) (LHsExpr p) (LHsExpr p) (LHsExpr p)
- | NegApp (XNegApp p) (LHsExpr p) (SyntaxExpr p)
- | HsPar (XPar p) (LHsExpr p)
- | SectionL (XSectionL p) (LHsExpr p) (LHsExpr p)
- | SectionR (XSectionR p) (LHsExpr p) (LHsExpr p)
- | ExplicitTuple (XExplicitTuple p) [HsTupArg p] Boxity
- | ExplicitSum (XExplicitSum p) ConTag Arity (LHsExpr p)
- | HsCase (XCase p) (LHsExpr p) (MatchGroup p (LHsExpr p))
- | HsIf (XIf p) (LHsExpr p) (LHsExpr p) (LHsExpr p)
- | HsMultiIf (XMultiIf p) [LGRHS p (LHsExpr p)]
- | HsLet (XLet p) (HsLocalBinds p) (LHsExpr p)
- | HsDo (XDo p) (HsStmtContext (HsDoRn p)) (XRec p [ExprLStmt p])
- | ExplicitList (XExplicitList p) [LHsExpr p]
- | RecordCon {
- rcon_ext :: XRecordCon p
- rcon_con :: XRec p (ConLikeP p)
- rcon_flds :: HsRecordBinds p
- | RecordUpd {
- rupd_ext :: XRecordUpd p
- rupd_expr :: LHsExpr p
- rupd_flds :: Either [LHsRecUpdField p] [LHsRecUpdProj p]
- | HsGetField { }
- | HsProjection {
- proj_ext :: XProjection p
- proj_flds :: NonEmpty (Located (HsFieldLabel p))
- | ExprWithTySig (XExprWithTySig p) (LHsExpr p) (LHsSigWcType (NoGhcTc p))
- | ArithSeq (XArithSeq p) (Maybe (SyntaxExpr p)) (ArithSeqInfo p)
- | HsBracket (XBracket p) (HsBracket p)
- | HsRnBracketOut (XRnBracketOut p) (HsBracket (HsBracketRn p)) [PendingRnSplice' p]
- | HsTcBracketOut (XTcBracketOut p) (Maybe QuoteWrapper) (HsBracket (HsBracketRn p)) [PendingTcSplice' p]
- | HsSpliceE (XSpliceE p) (HsSplice p)
- | HsProc (XProc p) (LPat p) (LHsCmdTop p)
- | HsStatic (XStatic p) (LHsExpr p)
- | HsTick (XTick p) CoreTickish (LHsExpr p)
- | HsBinTick (XBinTick p) Int Int (LHsExpr p)
- | HsPragE (XPragE p) (HsPragE p) (LHsExpr p)
- | XExpr !(XXExpr p)
- data GRHSs p body
- = GRHSs {
- grhssExt :: XCGRHSs p body
- grhssGRHSs :: [LGRHS p body]
- grhssLocalBinds :: HsLocalBinds p
- | XGRHSs !(XXGRHSs p body)
- = GRHSs {
- type family XXWarnDecls x
- type family XXWarnDecl x
- type family XXValBindsLR x x'
- type family XXType x
- type family XXTyVarBndr x
- type family XXTyFamInstDecl x
- type family XXTyClGroup x
- type family XXTyClDecl x
- type family XXTupArg x
- type family XXStmtLR x x' b
- type family XXStandaloneKindSig x
- type family XXSpliceDecl x
- type family XXSplice x
- type family XXSig x
- type family XXRuleDecls x
- type family XXRuleDecl x
- type family XXRuleBndr x
- type family XXRoleAnnotDecl x
- type family XXPragE x
- type family XXPatSynBind x x'
- type family XXPat x
- type family XXParStmtBlock x x'
- type family XXOverLit x
- type family XXMatchGroup x b
- type family XXMatch x b
- type family XXLit x
- type family XXLHsQTyVars x
- type family XXInstDecl x
- type family XXInjectivityAnn x
- type family XXImportDecl x
- type family XXIPBind x
- type family XXIE x
- type family XXHsWildCardBndrs x b
- type family XXHsSigType x
- type family XXHsPatSigType x
- type family XXHsOuterTyVarBndrs x
- type family XXHsLocalBindsLR x x'
- type family XXHsIPBinds x
- type family XXHsGroup x
- type family XXHsForAllTelescope x
- type family XXHsFieldLabel x
- type family XXHsDerivingClause x
- type family XXHsDecl x
- type family XXHsDataDefn x
- type family XXHsBindsLR x x'
- type family XXGRHSs x b
- type family XXGRHS x b
- type family XXFunDep x
- type family XXForeignDecl x
- type family XXFixitySig x
- type family XXFieldOcc x
- type family XXFamilyResultSig x
- type family XXFamilyDecl x
- type family XXFamEqn x r
- type family XXExpr x
- type family XXDerivDecl x
- type family XXDerivClauseTys x
- type family XXDefaultDecl x
- type family XXConDeclField x
- type family XXConDecl x
- type family XXCmdTop x
- type family XXCmd x
- type family XXClsInstDecl x
- type family XXBracket x
- type family XXApplicativeArg x
- type family XXAnnDecl x
- type family XXAmbiguousFieldOcc x
- type family XXABExport x
- type family XWildPat x
- type family XWildCardTy x
- type family XWarnings x
- type family XWarningD x
- type family XWarning x
- type family XViewPat x
- type family XViaStrategy x
- type family XVarPat x
- type family XVarBr x
- type family XVarBind x x'
- type family XVar x
- type family XValD x
- type family XValBinds x x'
- type family XUserTyVar x
- type family XUntypedSplice x
- type family XUnboundVar x
- type family XUnambiguous x
- type family XTypedSplice x
- type family XTypeSig x
- type family XTypBr x
- type family XTyVarSig x
- type family XTyVar x
- type family XTyLit x
- type family XTyFamInstD x
- type family XTyClD x
- type family XTupleTy x
- type family XTuplePat x
- type family XTransStmt x x' b
- type family XTick x
- type family XTcBracketOut x
- type family XTExpBr x
- type family XSynDecl x
- type family XSumTy x
- type family XSumPat x
- type family XStockStrategy x
- type family XStatic x
- type family XStarTy x
- type family XStandaloneKindSig x
- type family XSpliced x
- type family XSpliceTy x
- type family XSplicePat x
- type family XSpliceE x
- type family XSpliceDecl x
- type family XSpliceD x
- type family XSpecSig x
- type family XSpecInstSig x
- type family XSigPat x
- type family XSigD x
- type family XSectionR x
- type family XSectionL x
- type family XSCCFunSig x
- type family XSCC x
- type family XRuleD x
- type family XRuleBndrSig x
- type family XRoleAnnotD x
- type family XRnBracketOut x
- type family XRecordUpd x
- type family XRecordCon x
- type family XRecTy x
- type family XRecStmt x x' b
- type family XRecFld x
- type family XRec p a = (r :: Type) | r -> a
- type family XQuasiQuote x
- type family XQualTy x
- type family XProjection x
- type family XProc x
- type family XPresent x
- type family XPragE x
- type family XPatSynSig x
- type family XPatSynBind x x'
- type family XPatBr x
- type family XPatBind x x'
- type family XParTy x
- type family XParStmtBlock x x'
- type family XParStmt x x' b
- type family XParPat x
- type family XPar x
- type family XPSB x x'
- type family XOverLitE x
- type family XOverLit x
- type family XOverLabel x
- type family XOpTy x
- type family XOpApp x
- type family XNoSig x
- type family XNewtypeStrategy x
- type family XNegApp x
- type family XNPlusKPat x
- type family XNPat x
- type family XMultiIf x
- type family XMissing x
- type family XMinimalSig x
- type family XMG x b
- type family XLitPat x
- type family XLitE x
- type family XListTy x
- type family XListPat x
- type family XLetStmt x x' b
- type family XLet x
- type family XLazyPat x
- type family XLastStmt x x' b
- type family XLamCase x
- type family XLam x
- type family XKindedTyVar x
- type family XKindSigD x
- type family XKindSig x
- type family XInstD x
- type family XInlineSig x
- type family XIf x
- type family XIdSig x
- type family XIParamTy x
- type family XIPVar x
- type family XIPBinds x
- type family XIEVar x
- type family XIEThingWith x
- type family XIEThingAll x
- type family XIEThingAbs x
- type family XIEModuleContents x
- type family XIEGroup x
- type family XIEDocNamed x
- type family XIEDoc x
- type family XHsWordPrim x
- type family XHsWord64Prim x
- type family XHsWC x b
- type family XHsValBinds x x'
- type family XHsStringPrim x
- type family XHsString x
- type family XHsSig x
- type family XHsRule x
- type family XHsRecField x
- type family XHsRat x
- type family XHsQTvs x
- type family XHsPS x
- type family XHsOuterImplicit x
- type family XHsOuterExplicit x flag
- type family XHsInteger x
- type family XHsIntPrim x
- type family XHsInt64Prim x
- type family XHsInt x
- type family XHsIPBinds x x'
- type family XHsForAllVis x
- type family XHsForAllInvis x
- type family XHsFloatPrim x
- type family XHsDoublePrim x
- type family XHsCharPrim x
- type family XHsChar x
- type family XHsAnnotation x
- type family XGetField x
- type family XFunTy x
- type family XFunBind x x'
- type family XForeignImport x
- type family XForeignExport x
- type family XForD x
- type family XForAllTy x
- type family XFixitySig x
- type family XFixSig x
- type family XFamDecl x
- type family XExprWithTySig x
- type family XExplicitTupleTy x
- type family XExplicitTuple x
- type family XExplicitSum x
- type family XExplicitListTy x
- type family XExplicitList x
- type family XExpBr x
- type family XEmptyLocalBinds x x'
- type family XDocTy x
- type family XDocD x
- type family XDo x
- type family XDerivD x
- type family XDefD x
- type family XDecBrL x
- type family XDecBrG x
- type family XDctSingle x
- type family XDctMulti x
- type family XDataFamInstD x
- type family XDataDecl x
- type family XConPat x
- type family XConLikeOut x
- type family XConDeclH98 x
- type family XConDeclGADT x
- type family XConDeclField x
- type family XCompleteMatchSig x
- type family XCoPat x
- type family XCmdWrap x
- type family XCmdTop x
- type family XCmdPar x
- type family XCmdLet x
- type family XCmdLamCase x
- type family XCmdLam x
- type family XCmdIf x
- type family XCmdDo x
- type family XCmdCase x
- type family XCmdArrForm x
- type family XCmdArrApp x
- type family XCmdApp x
- type family XClsInstD x
- type family XClassOpSig x
- type family XClassDecl x
- type family XCase x
- type family XCTyFamInstDecl x
- type family XCTyClGroup x
- type family XCRuleDecls x
- type family XCRuleBndr x
- type family XCRoleAnnotDecl x
- type family XCMatch x b
- type family XCKindSig x
- type family XCInjectivityAnn x
- type family XCImportDecl x
- type family XCIPBind x
- type family XCHsGroup x
- type family XCHsFieldLabel x
- type family XCHsDerivingClause x
- type family XCHsDataDefn x
- type family XCGRHSs x b
- type family XCGRHS x b
- type family XCFunDep x
- type family XCFieldOcc x
- type family XCFamilyDecl x
- type family XCFamEqn x r
- type family XCDerivDecl x
- type family XCDefaultDecl x
- type family XCClsInstDecl x
- type family XBracket x
- type family XBodyStmt x x' b
- type family XBindStmt x x' b
- type family XBinTick x
- type family XBangTy x
- type family XBangPat x
- type family XAsPat x
- type family XArithSeq x
- type family XApplicativeStmt x x' b
- type family XApplicativeArgOne x
- type family XApplicativeArgMany x
- type family XAppTypeE x
- type family XAppTy x
- type family XAppKindTy x
- type family XApp x
- type family XAnyClassStrategy x
- type family XAnnD x
- type family XAmbiguous x
- type family XAbsBinds x x'
- type family XABE x
- class WrapXRec p a where
- class UnXRec p where
- type family NoGhcTc p
- data NoExtField = NoExtField
- data NoExtCon
- class MapXRec p where
- type LIdP p = XRec p (IdP p)
- type family IdP p
- type family Anno a = (b :: Type)
- noExtField :: NoExtField
- noExtCon :: NoExtCon -> a
- data IOEnvFailure = IOEnvFailure
- data IOEnv env a
- writeMutVar :: IORef a -> a -> IOEnv env ()
- updMutVarM :: IORef a -> (a -> IOEnv env a) -> IOEnv env ()
- updMutVar :: IORef a -> (a -> a) -> IOEnv env ()
- updEnv :: (env -> env') -> IOEnv env' a -> IOEnv env a
- unsafeInterleaveM :: IOEnv env a -> IOEnv env a
- uninterruptibleMaskM_ :: IOEnv env a -> IOEnv env a
- tryMostM :: IOEnv env r -> IOEnv env (Either SomeException r)
- tryM :: IOEnv env r -> IOEnv env (Either IOEnvFailure r)
- tryAllM :: IOEnv env r -> IOEnv env (Either SomeException r)
- setEnv :: env' -> IOEnv env' a -> IOEnv env a
- runIOEnv :: env -> IOEnv env a -> IO a
- readMutVar :: IORef a -> IOEnv env a
- newMutVar :: a -> IOEnv env (IORef a)
- getEnv :: IOEnv env env
- fixM :: (a -> IOEnv env a) -> IOEnv env a
- failWithM :: String -> IOEnv env a
- failM :: IOEnv env a
- atomicUpdMutVar' :: IORef a -> (a -> (a, b)) -> IOEnv env b
- atomicUpdMutVar :: IORef a -> (a -> (a, b)) -> IOEnv env b
- data InstalledFindResult
- type FinderCache = InstalledModuleEnv InstalledFindResult
- data FindResult
- = Found ModLocation Module
- | NoPackage Unit
- | FoundMultiple [(Module, ModuleOrigin)]
- | NotFound {
- fr_paths :: [FilePath]
- fr_pkg :: Maybe Unit
- fr_mods_hidden :: [Unit]
- fr_pkgs_hidden :: [Unit]
- fr_unusables :: [(Unit, UnusableUnitReason)]
- fr_suggestions :: [ModuleSuggestion]
- type CompleteMatches = [CompleteMatch]
- data CompleteMatch
- data SrcUnpackedness
- data SrcStrictness
- data HsSrcBang = HsSrcBang SourceText SrcUnpackedness SrcStrictness
- data HsImplBang
- roughMatchTcs :: [Type] -> [RoughMatchTc]
- instanceCantMatch :: [RoughMatchTc] -> [RoughMatchTc] -> Bool
- mkClassPred :: Class -> [Type] -> PredType
- isIPLikePred :: Type -> Bool
- isEqPrimPred :: PredType -> Bool
- isEqPredClass :: Class -> Bool
- isEqPred :: PredType -> Bool
- isClassPred :: PredType -> Bool
- type HoleSet = UniqSet CoercionHole
- pprTypeApp :: TyCon -> [Type] -> SDoc
- pprThetaArrowTy :: ThetaType -> SDoc
- pprTheta :: ThetaType -> SDoc
- pprTCvBndrs :: [TyCoVarBinder] -> SDoc
- pprTCvBndr :: TyCoVarBinder -> SDoc
- pprSigmaType :: Type -> SDoc
- pprParendType :: Type -> SDoc
- pprParendTheta :: ThetaType -> SDoc
- pprParendKind :: Kind -> SDoc
- pprClassPred :: Class -> [Type] -> SDoc
- data TyCoMapper env (m :: Type -> Type) = TyCoMapper {}
- userTypeError_maybe :: Type -> Maybe Type
- unrestricted :: a -> Scaled a
- typeKind :: HasDebugCallStack => Type -> Kind
- tymult :: a -> Scaled a
- tyConsOfType :: Type -> UniqSet TyCon
- tyConBindersTyCoBinders :: [TyConBinder] -> [TyCoBinder]
- tyConArgFlags :: TyCon -> [Type] -> [ArgFlag]
- tyConAppTyConPicky_maybe :: Type -> Maybe TyCon
- tyConAppTyCon :: Type -> TyCon
- tyConAppNeedsKindSig :: Bool -> TyCon -> Int -> Bool
- tyConAppArgs_maybe :: Type -> Maybe [Type]
- tyConAppArgs :: Type -> [Type]
- tyConAppArgN :: Int -> Type -> Type
- tyCoBinderVar_maybe :: TyCoBinder -> Maybe TyCoVar
- tyCoBinderType :: TyCoBinder -> Type
- tyBinderType :: TyBinder -> Type
- tcTypeKind :: HasDebugCallStack => Type -> Kind
- tcSplitTyConApp_maybe :: HasCallStack => Type -> Maybe (TyCon, [Type])
- tcReturnsConstraintKind :: Kind -> Bool
- tcRepSplitTyConApp_maybe :: HasDebugCallStack => Type -> Maybe (TyCon, [Type])
- tcRepSplitAppTy_maybe :: Type -> Maybe (Type, Type)
- tcIsRuntimeTypeKind :: Kind -> Bool
- tcIsLiftedTypeKind :: Kind -> Bool
- tcIsConstraintKind :: Kind -> Bool
- tcIsBoxedTypeKind :: Kind -> Bool
- stripCoercionTy :: Type -> Coercion
- splitVisVarsOfTypes :: [Type] -> Pair TyCoVarSet
- splitVisVarsOfType :: Type -> Pair TyCoVarSet
- splitTyConApp :: Type -> (TyCon, [Type])
- splitPiTys :: Type -> ([TyCoBinder], Type)
- splitPiTy_maybe :: Type -> Maybe (TyCoBinder, Type)
- splitPiTy :: Type -> (TyCoBinder, Type)
- splitListTyConApp_maybe :: Type -> Maybe Type
- splitInvisPiTysN :: Int -> Type -> ([TyCoBinder], Type)
- splitInvisPiTys :: Type -> ([TyCoBinder], Type)
- splitFunTys :: Type -> ([Scaled Type], Type)
- splitFunTy_maybe :: Type -> Maybe (Mult, Type, Type)
- splitFunTy :: Type -> (Mult, Type, Type)
- splitForAllTyVar_maybe :: Type -> Maybe (TyCoVar, Type)
- splitForAllTyCoVars :: Type -> ([TyCoVar], Type)
- splitForAllTyCoVar_maybe :: Type -> Maybe (TyCoVar, Type)
- splitForAllTyCoVarBinders :: Type -> ([TyCoVarBinder], Type)
- splitForAllTyCoVar :: Type -> (TyCoVar, Type)
- splitForAllReqTVBinders :: Type -> ([ReqTVBinder], Type)
- splitForAllInvisTVBinders :: Type -> ([InvisTVBinder], Type)
- splitForAllCoVar_maybe :: Type -> Maybe (TyCoVar, Type)
- splitCastTy_maybe :: Type -> Maybe (Type, Coercion)
- splitAppTys :: Type -> (Type, [Type])
- splitAppTy_maybe :: Type -> Maybe (Type, Type)
- splitAppTy :: Type -> (Type, Type)
- seqTypes :: [Type] -> ()
- seqType :: Type -> ()
- scaledSet :: Scaled a -> b -> Scaled b
- resultIsLevPoly :: Type -> Bool
- repSplitTyConApp_maybe :: HasDebugCallStack => Type -> Maybe (TyCon, [Type])
- repSplitAppTys :: HasDebugCallStack => Type -> (Type, [Type])
- repSplitAppTy_maybe :: HasDebugCallStack => Type -> Maybe (Type, Type)
- repGetTyVar_maybe :: Type -> Maybe TyVar
- pprUserTypeErrorTy :: Type -> SDoc
- pickyIsLiftedTypeKind :: Kind -> Bool
- piResultTys :: HasDebugCallStack => Type -> [Type] -> Type
- partitionInvisibles :: [(a, ArgFlag)] -> ([a], [a])
- occCheckExpand :: [Var] -> Type -> Maybe Type
- nonDetCmpTypesX :: RnEnv2 -> [Type] -> [Type] -> Ordering
- nonDetCmpTypes :: [Type] -> [Type] -> Ordering
- nonDetCmpTypeX :: RnEnv2 -> Type -> Type -> Ordering
- nonDetCmpType :: Type -> Type -> Ordering
- nonDetCmpTc :: TyCon -> TyCon -> Ordering
- newTyConInstRhs :: TyCon -> [Type] -> Type
- mkVisForAllTys :: [TyVar] -> Type -> Type
- mkTyConBindersPreferAnon :: [TyVar] -> TyCoVarSet -> [TyConBinder]
- mkTyCoInvForAllTys :: [TyCoVar] -> Type -> Type
- mkTyCoInvForAllTy :: TyCoVar -> Type -> Type
- mkStrLitTy :: FastString -> Type
- mkSpecForAllTys :: [TyVar] -> Type -> Type
- mkSpecForAllTy :: TyVar -> Type -> Type
- mkScaled :: Mult -> a -> Scaled a
- mkNumLitTy :: Integer -> Type
- mkInfForAllTys :: [TyVar] -> Type -> Type
- mkInfForAllTy :: TyVar -> Type -> Type
- mkFamilyTyConApp :: TyCon -> [Type] -> Type
- mkCoercionTy :: Coercion -> Type
- mkCharLitTy :: Char -> Type
- mkAppTys :: Type -> [Type] -> Type
- mkAnonBinder :: AnonArgFlag -> Scaled Type -> TyCoBinder
- mightBeUnliftedType :: Type -> Bool
- mapTyCoX :: Monad m => TyCoMapper env m -> (env -> Type -> m Type, env -> [Type] -> m [Type], env -> Coercion -> m Coercion, env -> [Coercion] -> m [Coercion])
- mapTyCo :: Monad m => TyCoMapper () m -> (Type -> m Type, [Type] -> m [Type], Coercion -> m Coercion, [Coercion] -> m [Coercion])
- linear :: a -> Scaled a
- kindRep_maybe :: HasDebugCallStack => Kind -> Maybe Type
- kindRep :: HasDebugCallStack => Kind -> Type
- isValidJoinPointType :: JoinArity -> Type -> Bool
- isUnliftedTypeKind :: Kind -> Bool
- isUnliftedType :: HasDebugCallStack => Type -> Bool
- isUnliftedRuntimeRep :: Type -> Bool
- isUnliftedLevity :: Type -> Bool
- isUnboxedTupleType :: Type -> Bool
- isUnboxedSumType :: Type -> Bool
- isTypeLevPoly :: Type -> Bool
- isTyVarTy :: Type -> Bool
- isTauTy :: Type -> Bool
- isStrictType :: HasDebugCallStack => Type -> Bool
- isStrLitTy :: Type -> Maybe FastString
- isRuntimeRepVar :: TyVar -> Bool
- isRuntimeRepKindedTy :: Type -> Bool
- isPrimitiveType :: Type -> Bool
- isPiTy :: Type -> Bool
- isOneDataConTy :: Mult -> Bool
- isNumLitTy :: Type -> Maybe Integer
- isMultiplicityVar :: TyVar -> Bool
- isManyDataConTy :: Mult -> Bool
- isLitTy :: Type -> Maybe TyLit
- isLinearType :: Type -> Bool
- isLiftedType_maybe :: HasDebugCallStack => Type -> Maybe Bool
- isLiftedRuntimeRep :: Type -> Bool
- isLiftedLevity :: Type -> Bool
- isLevityVar :: TyVar -> Bool
- isLevityTy :: Type -> Bool
- isKindLevPoly :: Kind -> Bool
- isFunTy :: Type -> Bool
- isForAllTy_ty :: Type -> Bool
- isForAllTy_co :: Type -> Bool
- isForAllTy :: Type -> Bool
- isFamFreeTy :: Type -> Bool
- isDataFamilyAppType :: Type -> Bool
- isCoercionTy_maybe :: Type -> Maybe Coercion
- isCoVarType :: Type -> Bool
- isCharLitTy :: Type -> Maybe Char
- isBoxedTypeKind :: Kind -> Bool
- isBoxedType :: Type -> Bool
- isBoxedRuntimeRep :: Type -> Bool
- isAtomicTy :: Type -> Bool
- isAnonTyCoBinder :: TyCoBinder -> Bool
- isAlgType :: Type -> Bool
- irrelevantMult :: Scaled a -> a
- invisibleTyBndrCount :: Type -> Int
- getTyVar_maybe :: Type -> Maybe TyVar
- getTyVar :: String -> Type -> TyVar
- getRuntimeRep_maybe :: HasDebugCallStack => Type -> Maybe Type
- getRuntimeRep :: HasDebugCallStack => Type -> Type
- getCastedTyVar_maybe :: Type -> Maybe (TyVar, CoercionN)
- funResultTy :: Type -> Type
- funArgTy :: Type -> Type
- filterOutInvisibleTypes :: TyCon -> [Type] -> [Type]
- filterOutInferredTypes :: TyCon -> [Type] -> [Type]
- expandTypeSynonyms :: Type -> Type
- eqVarBndrs :: RnEnv2 -> [Var] -> [Var] -> Maybe RnEnv2
- eqTypes :: [Type] -> [Type] -> Bool
- eqTypeX :: RnEnv2 -> Type -> Type -> Bool
- eqType :: Type -> Type -> Bool
- dropRuntimeRepArgs :: [Type] -> [Type]
- dropForAlls :: Type -> Type
- coAxNthLHS :: forall (br :: BranchFlag). CoAxiom br -> Int -> Type
- classifiesTypeWithValues :: Kind -> Bool
- buildSynTyCon :: Name -> [KnotTied TyConBinder] -> Kind -> [Role] -> KnotTied Type -> TyCon
- binderRelevantType_maybe :: TyCoBinder -> Maybe Type
- applyTysX :: [TyVar] -> Type -> [Type] -> Type
- appTyArgFlags :: Type -> [Type] -> [ArgFlag]
- pattern One :: Mult
- pattern Many :: Mult
- funTyCon :: TyCon
- type TvSubstEnv = TyVarEnv Type
- data TCvSubst = TCvSubst InScopeSet TvSubstEnv CvSubstEnv
- zipTyEnv :: HasDebugCallStack => [TyVar] -> [Type] -> TvSubstEnv
- zipTvSubst :: HasDebugCallStack => [TyVar] -> [Type] -> TCvSubst
- zipTCvSubst :: HasDebugCallStack => [TyCoVar] -> [Type] -> TCvSubst
- zipCoEnv :: HasDebugCallStack => [CoVar] -> [Coercion] -> CvSubstEnv
- zapTCvSubst :: TCvSubst -> TCvSubst
- unionTCvSubst :: TCvSubst -> TCvSubst -> TCvSubst
- substVarBndrs :: HasCallStack => TCvSubst -> [TyCoVar] -> (TCvSubst, [TyCoVar])
- substVarBndr :: HasCallStack => TCvSubst -> TyCoVar -> (TCvSubst, TyCoVar)
- substTysWith :: [TyVar] -> [Type] -> [Type] -> [Type]
- substTysUnchecked :: TCvSubst -> [Type] -> [Type]
- substTys :: HasCallStack => TCvSubst -> [Type] -> [Type]
- substTyWithUnchecked :: [TyVar] -> [Type] -> Type -> Type
- substTyWithCoVars :: [CoVar] -> [Coercion] -> Type -> Type
- substTyWith :: HasCallStack => [TyVar] -> [Type] -> Type -> Type
- substTyVars :: TCvSubst -> [TyVar] -> [Type]
- substTyVarBndrs :: HasCallStack => TCvSubst -> [TyVar] -> (TCvSubst, [TyVar])
- substTyVarBndr :: HasCallStack => TCvSubst -> TyVar -> (TCvSubst, TyVar)
- substTyVar :: TCvSubst -> TyVar -> Type
- substTyUnchecked :: TCvSubst -> Type -> Type
- substTyCoBndr :: TCvSubst -> TyCoBinder -> (TCvSubst, TyCoBinder)
- substTyAddInScope :: TCvSubst -> Type -> Type
- substTy :: HasCallStack => TCvSubst -> Type -> Type
- substThetaUnchecked :: TCvSubst -> ThetaType -> ThetaType
- substTheta :: HasCallStack => TCvSubst -> ThetaType -> ThetaType
- substScaledTysUnchecked :: TCvSubst -> [Scaled Type] -> [Scaled Type]
- substScaledTys :: HasCallStack => TCvSubst -> [Scaled Type] -> [Scaled Type]
- substScaledTyUnchecked :: HasCallStack => TCvSubst -> Scaled Type -> Scaled Type
- substScaledTy :: HasCallStack => TCvSubst -> Scaled Type -> Scaled Type
- substCoWithUnchecked :: [TyVar] -> [Type] -> Coercion -> Coercion
- substCoUnchecked :: TCvSubst -> Coercion -> Coercion
- setTvSubstEnv :: TCvSubst -> TvSubstEnv -> TCvSubst
- notElemTCvSubst :: Var -> TCvSubst -> Bool
- mkTvSubstPrs :: [(TyVar, Type)] -> TCvSubst
- mkTvSubst :: InScopeSet -> TvSubstEnv -> TCvSubst
- mkTCvSubst :: InScopeSet -> (TvSubstEnv, CvSubstEnv) -> TCvSubst
- mkEmptyTCvSubst :: InScopeSet -> TCvSubst
- lookupTyVar :: TCvSubst -> TyVar -> Maybe Type
- isInScope :: Var -> TCvSubst -> Bool
- isEmptyTCvSubst :: TCvSubst -> Bool
- getTvSubstEnv :: TCvSubst -> TvSubstEnv
- getTCvSubstRangeFVs :: TCvSubst -> VarSet
- getTCvInScope :: TCvSubst -> InScopeSet
- extendTvSubstWithClone :: TCvSubst -> TyVar -> TyVar -> TCvSubst
- extendTvSubstList :: TCvSubst -> [Var] -> [Type] -> TCvSubst
- extendTvSubstBinderAndInScope :: TCvSubst -> TyCoBinder -> Type -> TCvSubst
- extendTvSubstAndInScope :: TCvSubst -> TyVar -> Type -> TCvSubst
- extendTvSubst :: TCvSubst -> TyVar -> Type -> TCvSubst
- extendTCvSubstWithClone :: TCvSubst -> TyCoVar -> TyCoVar -> TCvSubst
- extendTCvSubstList :: TCvSubst -> [Var] -> [Type] -> TCvSubst
- extendTCvSubst :: TCvSubst -> TyCoVar -> Type -> TCvSubst
- extendTCvInScopeSet :: TCvSubst -> VarSet -> TCvSubst
- extendTCvInScopeList :: TCvSubst -> [Var] -> TCvSubst
- extendTCvInScope :: TCvSubst -> Var -> TCvSubst
- extendCvSubst :: TCvSubst -> CoVar -> Coercion -> TCvSubst
- emptyTvSubstEnv :: TvSubstEnv
- emptyTCvSubst :: TCvSubst
- composeTCvSubstEnv :: InScopeSet -> (TvSubstEnv, CvSubstEnv) -> (TvSubstEnv, CvSubstEnv) -> (TvSubstEnv, CvSubstEnv)
- composeTCvSubst :: TCvSubst -> TCvSubst -> TCvSubst
- cloneTyVarBndrs :: TCvSubst -> [TyVar] -> UniqSupply -> (TCvSubst, [TyVar])
- cloneTyVarBndr :: TCvSubst -> TyVar -> Unique -> (TCvSubst, TyVar)
- tidyVarBndrs :: TidyEnv -> [TyCoVar] -> (TidyEnv, [TyCoVar])
- tidyVarBndr :: TidyEnv -> TyCoVar -> (TidyEnv, TyCoVar)
- tidyTypes :: TidyEnv -> [Type] -> [Type]
- tidyType :: TidyEnv -> Type -> Type
- tidyTyCoVarOcc :: TidyEnv -> TyCoVar -> TyCoVar
- tidyTyCoVarBinders :: TidyEnv -> [VarBndr TyCoVar vis] -> (TidyEnv, [VarBndr TyCoVar vis])
- tidyTyCoVarBinder :: TidyEnv -> VarBndr TyCoVar vis -> (TidyEnv, VarBndr TyCoVar vis)
- tidyTopType :: Type -> Type
- tidyOpenTypes :: TidyEnv -> [Type] -> (TidyEnv, [Type])
- tidyOpenType :: TidyEnv -> Type -> (TidyEnv, Type)
- tidyOpenTyCoVars :: TidyEnv -> [TyCoVar] -> (TidyEnv, [TyCoVar])
- tidyOpenTyCoVar :: TidyEnv -> TyCoVar -> (TidyEnv, TyCoVar)
- tidyOpenKind :: TidyEnv -> Kind -> (TidyEnv, Kind)
- tidyKind :: TidyEnv -> Kind -> Kind
- tidyFreeTyCoVars :: TidyEnv -> [TyCoVar] -> TidyEnv
- tyCoVarsOfTypesWellScoped :: [Type] -> [TyVar]
- tyCoVarsOfTypesList :: [Type] -> [TyCoVar]
- tyCoVarsOfTypesDSet :: [Type] -> DTyCoVarSet
- tyCoVarsOfTypes :: [Type] -> TyCoVarSet
- tyCoVarsOfTypeWellScoped :: Type -> [TyVar]
- tyCoVarsOfTypeList :: Type -> [TyCoVar]
- tyCoVarsOfTypeDSet :: Type -> DTyCoVarSet
- tyCoVarsOfType :: Type -> TyCoVarSet
- tyCoFVsVarBndrs :: [Var] -> FV -> FV
- tyCoFVsVarBndr :: Var -> FV -> FV
- tyCoFVsOfTypes :: [Type] -> FV
- tyCoFVsOfType :: Type -> FV
- tyCoFVsBndr :: TyCoVarBinder -> FV -> FV
- scopedSort :: [TyCoVar] -> [TyCoVar]
- noFreeVarsOfType :: Type -> Bool
- coVarsOfTypes :: [Type] -> CoVarSet
- coVarsOfType :: Type -> CoVarSet
- closeOverKindsList :: [TyVar] -> [TyVar]
- closeOverKindsDSet :: DTyVarSet -> DTyVarSet
- closeOverKinds :: TyCoVarSet -> TyCoVarSet
- anyFreeVarsOfTypes :: (TyCoVar -> Bool) -> [Type] -> Bool
- anyFreeVarsOfType :: (TyCoVar -> Bool) -> Type -> Bool
- data TyCoFolder env a = TyCoFolder {}
- type TyBinder = TyCoBinder
- type MCoercionR = MCoercion
- type KnotTied ty = ty
- type KindOrType = Type
- type KindCoercion = CoercionN
- type CoercionR = Coercion
- type CoercionP = Coercion
- data CoercionHole = CoercionHole {}
- typeSize :: Type -> Int
- setCoHoleCoVar :: CoercionHole -> CoVar -> CoercionHole
- scaledThing :: Scaled a -> a
- scaledMult :: Scaled a -> Mult
- provSize :: UnivCoProvenance -> Int
- nonDetCmpTyLit :: TyLit -> TyLit -> Ordering
- mkVisFunTysMany :: [Type] -> Type -> Type
- mkVisFunTys :: [Scaled Type] -> Type -> Type
- mkVisFunTyMany :: Type -> Type -> Type
- mkVisFunTy :: Mult -> Type -> Type -> Type
- mkTyVarTys :: [TyVar] -> [Type]
- mkTyVarTy :: TyVar -> Type
- mkTyCoVarTys :: [TyCoVar] -> [Type]
- mkTyCoVarTy :: TyCoVar -> Type
- mkScaledFunTy :: AnonArgFlag -> Scaled Type -> Type -> Type
- mkPiTys :: [TyCoBinder] -> Type -> Type
- mkPiTy :: TyCoBinder -> Type -> Type
- mkInvisFunTysMany :: [Type] -> Type -> Type
- mkInvisFunTyMany :: Type -> Type -> Type
- mkInvisFunTy :: Mult -> Type -> Type -> Type
- mkInvisForAllTys :: [InvisTVBinder] -> Type -> Type
- mkFunTy :: AnonArgFlag -> Mult -> Type -> Type -> Type
- mkForAllTys :: [TyCoVarBinder] -> Type -> Type
- mapScaledType :: (Type -> Type) -> Scaled Type -> Scaled Type
- isVisibleBinder :: TyCoBinder -> Bool
- isTyBinder :: TyCoBinder -> Bool
- isNamedBinder :: TyCoBinder -> Bool
- isInvisibleBinder :: TyCoBinder -> Bool
- foldTyCo :: Monoid a => TyCoFolder env a -> env -> (Type -> a, [Type] -> a, Coercion -> a, [Coercion] -> a)
- delBinderVar :: VarSet -> TyCoVarBinder -> VarSet
- coercionSize :: Coercion -> Int
- coHoleCoVar :: CoercionHole -> CoVar
- cmpTyLit :: TyLit -> TyLit -> Ordering
- type TyConTyCoBinder = VarBndr TyCoVar TyConBndrVis
- data TyConFlavour
- data TyConBndrVis
- type TyConBinder = VarBndr TyVar TyConBndrVis
- data RuntimeRepInfo
- = NoRRI
- | RuntimeRep ([Type] -> [PrimRep])
- | VecCount Int
- | VecElem PrimElemRep
- | LiftedInfo
- | UnliftedInfo
- data PrimRep
- data PrimElemRep
- data Injectivity
- = NotInjective
- | Injective [Bool]
- data FamTyConFlav
- 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 AlgTyConFlav
- visibleDataCons :: AlgTyConRhs -> [DataCon]
- unwrapNewTyCon_maybe :: TyCon -> Maybe ([TyVar], Type, CoAxiom Unbranched)
- unwrapNewTyConEtad_maybe :: TyCon -> Maybe ([TyVar], Type, CoAxiom Unbranched)
- tyConVisibleTyVars :: TyCon -> [TyVar]
- tyConTuple_maybe :: TyCon -> Maybe TupleSort
- tyConStupidTheta :: TyCon -> [PredType]
- tyConSkolem :: TyCon -> Bool
- tyConSingleDataCon_maybe :: TyCon -> Maybe DataCon
- tyConSingleDataCon :: TyCon -> DataCon
- tyConSingleAlgDataCon_maybe :: TyCon -> Maybe DataCon
- tyConRuntimeRepInfo :: TyCon -> RuntimeRepInfo
- tyConRoles :: TyCon -> [Role]
- tyConRepModOcc :: Module -> OccName -> (Module, OccName)
- tyConInvisTVBinders :: [TyConBinder] -> [InvisTVBinder]
- tyConInjectivityInfo :: TyCon -> Injectivity
- tyConFlavourAssoc_maybe :: TyConFlavour -> Maybe TyCon
- tyConFlavour :: TyCon -> TyConFlavour
- tyConFieldLabels :: TyCon -> [FieldLabel]
- tyConFamilySize :: TyCon -> Int
- tyConFamilyResVar_maybe :: TyCon -> Maybe Name
- tyConFamilyCoercion_maybe :: TyCon -> Maybe (CoAxiom Unbranched)
- tyConFamInst_maybe :: TyCon -> Maybe (TyCon, [Type])
- tyConFamInstSig_maybe :: TyCon -> Maybe (TyCon, [Type], CoAxiom Unbranched)
- tyConDataCons_maybe :: TyCon -> Maybe [DataCon]
- tyConDataCons :: TyCon -> [DataCon]
- tyConClass_maybe :: TyCon -> Maybe Class
- tyConCType_maybe :: TyCon -> Maybe CType
- tyConBndrVisArgFlag :: TyConBndrVis -> ArgFlag
- tyConBinderArgFlag :: TyConBinder -> ArgFlag
- tyConAssoc_maybe :: TyCon -> Maybe TyCon
- tyConAlgDataCons_maybe :: TyCon -> Maybe [DataCon]
- tyConATs :: TyCon -> [TyCon]
- tcFlavourIsOpen :: TyConFlavour -> Bool
- synTyConRhs_maybe :: TyCon -> Maybe Type
- synTyConDefn_maybe :: TyCon -> Maybe ([TyVar], Type)
- setTcTyConKind :: TyCon -> Kind -> TyCon
- primRepsCompatible :: Platform -> [PrimRep] -> [PrimRep] -> Bool
- primRepSizeB :: Platform -> PrimRep -> Int
- primRepIsFloat :: PrimRep -> Maybe Bool
- primRepCompatible :: Platform -> PrimRep -> PrimRep -> Bool
- primElemRepSizeB :: PrimElemRep -> Int
- pprPromotionQuote :: TyCon -> SDoc
- noTcTyConScopedTyVars :: [(Name, TcTyVar)]
- newTyConRhs :: TyCon -> ([TyVar], Type)
- newTyConEtadRhs :: TyCon -> ([TyVar], Type)
- newTyConEtadArity :: TyCon -> Int
- newTyConDataCon_maybe :: TyCon -> Maybe DataCon
- newTyConCo_maybe :: TyCon -> Maybe (CoAxiom Unbranched)
- newTyConCo :: TyCon -> CoAxiom Unbranched
- mustBeSaturated :: TyCon -> Bool
- mkTyConTagMap :: TyCon -> NameEnv ConTag
- mkTyConKind :: [TyConBinder] -> Kind -> Kind
- mkTupleTyCon :: Name -> [TyConBinder] -> Kind -> Arity -> DataCon -> TupleSort -> AlgTyConFlav -> TyCon
- mkTcTyCon :: Name -> [TyConBinder] -> Kind -> [(Name, TcTyVar)] -> Bool -> TyConFlavour -> TyCon
- mkSynonymTyCon :: Name -> [TyConBinder] -> Kind -> [Role] -> Type -> Bool -> Bool -> Bool -> TyCon
- mkSumTyCon :: Name -> [TyConBinder] -> Kind -> Arity -> [TyVar] -> [DataCon] -> AlgTyConFlav -> TyCon
- mkRequiredTyConBinder :: TyCoVarSet -> TyVar -> TyConBinder
- mkPromotedDataCon :: DataCon -> Name -> TyConRepName -> [TyConTyCoBinder] -> Kind -> [Role] -> RuntimeRepInfo -> TyCon
- mkPrimTyCon :: Name -> [TyConBinder] -> Kind -> [Role] -> TyCon
- mkNamedTyConBinders :: ArgFlag -> [TyVar] -> [TyConBinder]
- mkNamedTyConBinder :: ArgFlag -> TyVar -> TyConBinder
- mkLiftedPrimTyCon :: Name -> [TyConBinder] -> Kind -> [Role] -> TyCon
- mkKindTyCon :: Name -> [TyConBinder] -> Kind -> [Role] -> Name -> TyCon
- mkFunTyCon :: Name -> [TyConBinder] -> Name -> TyCon
- mkFamilyTyCon :: Name -> [TyConBinder] -> Kind -> Maybe Name -> FamTyConFlav -> Maybe Class -> Injectivity -> TyCon
- mkDataTyConRhs :: [DataCon] -> AlgTyConRhs
- mkClassTyCon :: Name -> [TyConBinder] -> [Role] -> AlgTyConRhs -> Class -> Name -> TyCon
- mkAnonTyConBinders :: AnonArgFlag -> [TyVar] -> [TyConBinder]
- mkAnonTyConBinder :: AnonArgFlag -> TyVar -> TyConBinder
- mkAlgTyCon :: Name -> [TyConBinder] -> Kind -> [Role] -> Maybe CType -> [PredType] -> AlgTyConRhs -> AlgTyConFlav -> Bool -> TyCon
- lookupTyConFieldLabel :: FieldLabelString -> TyCon -> Maybe FieldLabel
- isVoidRep :: PrimRep -> Bool
- isVisibleTyConBinder :: VarBndr tv TyConBndrVis -> Bool
- isVanillaAlgTyCon :: TyCon -> Bool
- isUnliftedTyCon :: TyCon -> Bool
- isUnboxedSumTyCon :: TyCon -> Bool
- isTypeSynonymTyCon :: TyCon -> Bool
- isTypeFamilyTyCon :: TyCon -> Bool
- isTyConWithSrcDataCons :: TyCon -> Bool
- isTyConAssoc :: TyCon -> Bool
- isTcTyCon :: TyCon -> Bool
- isTcLevPoly :: TyCon -> Bool
- isTauTyCon :: TyCon -> Bool
- isPromotedTupleTyCon :: TyCon -> Bool
- isPromotedDataCon_maybe :: TyCon -> Maybe DataCon
- isPromotedDataCon :: TyCon -> Bool
- isPrimTyCon :: TyCon -> Bool
- isOpenTypeFamilyTyCon :: TyCon -> Bool
- isOpenFamilyTyCon :: TyCon -> Bool
- isNoParent :: AlgTyConFlav -> Bool
- isNewTyCon :: TyCon -> Bool
- isNamedTyConBinder :: TyConBinder -> Bool
- isLiftedTypeKindTyConName :: Name -> Bool
- isKindTyCon :: TyCon -> Bool
- isInvisibleTyConBinder :: VarBndr tv TyConBndrVis -> Bool
- isInjectiveTyCon :: TyCon -> Role -> Bool
- isImplicitTyCon :: TyCon -> Bool
- isGenerativeTyCon :: TyCon -> Role -> Bool
- isGenInjAlgRhs :: AlgTyConRhs -> Bool
- isGcPtrRep :: PrimRep -> Bool
- isGadtSyntaxTyCon :: TyCon -> Bool
- isForgetfulSynTyCon :: TyCon -> Bool
- isFamilyTyCon :: TyCon -> Bool
- isFamInstTyCon :: TyCon -> Bool
- isFamFreeTyCon :: TyCon -> Bool
- isEnumerationTyCon :: TyCon -> Bool
- isDataTyCon :: TyCon -> Bool
- isDataFamilyTyCon :: TyCon -> Bool
- isConstraintKindCon :: TyCon -> Bool
- isClosedSynFamilyTyConWithAxiom_maybe :: TyCon -> Maybe (CoAxiom Branched)
- isClassTyCon :: TyCon -> Bool
- isBuiltInSynFamTyCon_maybe :: TyCon -> Maybe BuiltInSynFamily
- isBoxedTupleTyCon :: TyCon -> Bool
- isAlgTyCon :: TyCon -> Bool
- isAbstractTyCon :: TyCon -> Bool
- famTyConFlav_maybe :: TyCon -> Maybe FamTyConFlav
- expandSynTyCon_maybe :: TyCon -> [tyco] -> Maybe ([(TyVar, tyco)], Type, [tyco])
- algTyConRhs :: TyCon -> AlgTyConRhs
- nilDataConKey :: Unique
- listTyConKey :: Unique
- type DefMethInfo = Maybe (Name, DefMethSpec Type)
- type ClassOpItem = (Id, DefMethInfo)
- type ClassMinimalDef = BooleanFormula Name
- data ClassATItem = ATI TyCon (Maybe (Type, ATValidityInfo))
- data Class
- data ATValidityInfo
- pprFundeps :: Outputable a => [FunDep a] -> SDoc
- pprFunDep :: Outputable a => FunDep a -> SDoc
- pprDefMethInfo :: DefMethInfo -> SDoc
- mkClass :: Name -> [TyVar] -> [FunDep TyVar] -> [PredType] -> [Id] -> [ClassATItem] -> [ClassOpItem] -> ClassMinimalDef -> TyCon -> Class
- mkAbstractClass :: Name -> [TyVar] -> [FunDep TyVar] -> TyCon -> Class
- isAbstractClass :: Class -> Bool
- classTvsFds :: Class -> ([TyVar], [FunDep TyVar])
- classSCTheta :: Class -> [PredType]
- classSCSelIds :: Class -> [Id]
- classSCSelId :: Class -> Int -> Id
- classOpItems :: Class -> [ClassOpItem]
- classMinimalDef :: Class -> ClassMinimalDef
- classMethods :: Class -> [Id]
- classHasFds :: Class -> Bool
- classExtraBigSig :: Class -> ([TyVar], [FunDep TyVar], [PredType], [Id], [ClassATItem], [ClassOpItem])
- classBigSig :: Class -> ([TyVar], [PredType], [Id], [ClassOpItem])
- classArity :: Class -> Arity
- classAllSelIds :: Class -> [Id]
- classATs :: Class -> [TyCon]
- classATItems :: Class -> [ClassATItem]
- data Role
- data TrailingAnn
- type SrcSpanAnnP = SrcAnn AnnPragma
- type SrcSpanAnnN = SrcAnn NameAnn
- type SrcSpanAnnL = SrcAnn AnnList
- type SrcSpanAnnC = SrcAnn AnnContext
- type SrcSpanAnnA = SrcAnn AnnListItem
- data SrcSpanAnn' a = SrcSpanAnn {}
- type SrcAnn ann = SrcSpanAnn' (EpAnn ann)
- data ParenType
- data NoEpAnns = NoEpAnns
- data NameAnn
- = NameAnn { }
- | NameAnnCommas { }
- | NameAnnOnly { }
- | NameAnnRArrow { }
- | NameAnnQuote { }
- | NameAnnTrailing {
- nann_trailing :: [TrailingAnn]
- data NameAdornment
- type LocatedP = GenLocated SrcSpanAnnP
- type LocatedN = GenLocated SrcSpanAnnN
- type LocatedL = GenLocated SrcSpanAnnL
- type LocatedC = GenLocated SrcSpanAnnC
- type LocatedAn an = GenLocated (SrcAnn an)
- type LocatedA = GenLocated SrcSpanAnnA
- type LEpaComment = GenLocated Anchor EpaComment
- data IsUnicodeSyntax
- data HasE
- data EpaLocation
- = EpaSpan !RealSrcSpan
- | EpaDelta !DeltaPos ![LEpaComment]
- data EpaCommentTok
- data EpaComment = EpaComment {}
- data EpAnnComments
- = EpaComments {
- priorComments :: ![LEpaComment]
- | EpaCommentsBalanced {
- priorComments :: ![LEpaComment]
- followingComments :: ![LEpaComment]
- = EpaComments {
- type EpAnnCO = EpAnn NoEpAnns
- data EpAnn ann
- = EpAnn {
- entry :: !Anchor
- anns :: !ann
- comments :: !EpAnnComments
- | EpAnnNotUsed
- = EpAnn {
- data DeltaPos
- = SameLine {
- deltaColumn :: !Int
- | DifferentLine {
- deltaLine :: !Int
- deltaColumn :: !Int
- = SameLine {
- data AnnSortKey
- data AnnPragma = AnnPragma {}
- data AnnParen = AnnParen {}
- data AnnListItem = AnnListItem {
- lann_trailing :: [TrailingAnn]
- data AnnList = AnnList {}
- data AnnKeywordId
- = AnnAnyclass
- | AnnAs
- | AnnAt
- | AnnBang
- | AnnBackquote
- | AnnBy
- | AnnCase
- | AnnClass
- | AnnClose
- | AnnCloseB
- | AnnCloseBU
- | AnnCloseC
- | AnnCloseQ
- | AnnCloseQU
- | AnnCloseP
- | AnnClosePH
- | AnnCloseS
- | AnnColon
- | AnnComma
- | AnnCommaTuple
- | AnnDarrow
- | AnnDarrowU
- | AnnData
- | AnnDcolon
- | AnnDcolonU
- | AnnDefault
- | AnnDeriving
- | AnnDo
- | AnnDot
- | AnnDotdot
- | AnnElse
- | AnnEqual
- | AnnExport
- | AnnFamily
- | AnnForall
- | AnnForallU
- | AnnForeign
- | AnnFunId
- | AnnGroup
- | AnnHeader
- | AnnHiding
- | AnnIf
- | AnnImport
- | AnnIn
- | AnnInfix
- | AnnInstance
- | AnnLam
- | AnnLarrow
- | AnnLarrowU
- | AnnLet
- | AnnLollyU
- | AnnMdo
- | AnnMinus
- | AnnModule
- | AnnNewtype
- | AnnName
- | AnnOf
- | AnnOpen
- | AnnOpenB
- | AnnOpenBU
- | AnnOpenC
- | AnnOpenE
- | AnnOpenEQ
- | AnnOpenEQU
- | AnnOpenP
- | AnnOpenS
- | AnnOpenPH
- | AnnDollar
- | AnnDollarDollar
- | AnnPackageName
- | AnnPattern
- | AnnPercent
- | AnnPercentOne
- | AnnProc
- | AnnQualified
- | AnnRarrow
- | AnnRarrowU
- | AnnRec
- | AnnRole
- | AnnSafe
- | AnnSemi
- | AnnSimpleQuote
- | AnnSignature
- | AnnStatic
- | AnnStock
- | AnnThen
- | AnnThTyQuote
- | AnnTilde
- | AnnType
- | AnnUnit
- | AnnUsing
- | AnnVal
- | AnnValStr
- | AnnVbar
- | AnnVia
- | AnnWhere
- | Annlarrowtail
- | AnnlarrowtailU
- | Annrarrowtail
- | AnnrarrowtailU
- | AnnLarrowtail
- | AnnLarrowtailU
- | AnnRarrowtail
- | AnnRarrowtailU
- data AnnContext = AnnContext {
- ac_darrow :: Maybe (IsUnicodeSyntax, EpaLocation)
- ac_open :: [EpaLocation]
- ac_close :: [EpaLocation]
- data AnchorOperation
- data Anchor = Anchor {}
- data AddEpAnn = AddEpAnn AnnKeywordId EpaLocation
- widenSpan :: SrcSpan -> [AddEpAnn] -> SrcSpan
- widenLocatedAn :: SrcSpanAnn' an -> [AddEpAnn] -> SrcSpanAnn' an
- widenAnchorR :: Anchor -> RealSrcSpan -> Anchor
- widenAnchor :: Anchor -> [AddEpAnn] -> Anchor
- unicodeAnn :: AnnKeywordId -> AnnKeywordId
- transferAnnsA :: SrcSpanAnnA -> SrcSpanAnnA -> (SrcSpanAnnA, SrcSpanAnnA)
- spanAsAnchor :: SrcSpan -> Anchor
- sortLocatedA :: [GenLocated (SrcSpanAnn' a) e] -> [GenLocated (SrcSpanAnn' a) e]
- setPriorComments :: EpAnnComments -> [LEpaComment] -> EpAnnComments
- setFollowingComments :: EpAnnComments -> [LEpaComment] -> EpAnnComments
- setCommentsSrcAnn :: Monoid ann => SrcAnn ann -> EpAnnComments -> SrcAnn ann
- setCommentsEpAnn :: Monoid a => SrcSpan -> EpAnn a -> EpAnnComments -> EpAnn a
- removeCommentsA :: SrcAnn ann -> SrcAnn ann
- realSrcSpan :: SrcSpan -> RealSrcSpan
- realSpanAsAnchor :: RealSrcSpan -> Anchor
- reLocN :: LocatedN a -> Located a
- reLocL :: LocatedN e -> LocatedA e
- reLocC :: LocatedN e -> LocatedC e
- reLocA :: Located e -> LocatedAn ann e
- reLoc :: LocatedAn a e -> Located e
- reAnnL :: ann -> EpAnnComments -> Located e -> GenLocated (SrcAnn ann) e
- reAnnC :: AnnContext -> EpAnnComments -> Located a -> LocatedC a
- reAnn :: [TrailingAnn] -> EpAnnComments -> Located a -> LocatedA a
- placeholderRealSpan :: RealSrcSpan
- parenTypeKws :: ParenType -> (AnnKeywordId, AnnKeywordId)
- noSrcSpanA :: SrcAnn ann
- noLocA :: a -> LocatedAn an a
- noComments :: EpAnnCO
- noAnnSrcSpan :: SrcSpan -> SrcAnn ann
- noAnn :: EpAnn a
- na2la :: SrcSpanAnn' a -> SrcAnn ann
- n2l :: LocatedN a -> LocatedA a
- mapLocA :: (a -> b) -> GenLocated SrcSpan a -> GenLocated (SrcAnn ann) b
- la2r :: SrcSpanAnn' a -> RealSrcSpan
- la2na :: SrcSpanAnn' a -> SrcSpanAnnN
- la2la :: LocatedAn ann1 a2 -> LocatedAn ann2 a2
- l2n :: LocatedAn a1 a2 -> LocatedN a2
- l2l :: SrcSpanAnn' a -> SrcAnn ann
- getLocAnn :: Located a -> SrcSpanAnnA
- getLocA :: GenLocated (SrcSpanAnn' a) e -> SrcSpan
- getFollowingComments :: EpAnnComments -> [LEpaComment]
- getDeltaLine :: DeltaPos -> Int
- extraToAnnList :: AnnList -> [AddEpAnn] -> AnnList
- epaLocationRealSrcSpan :: EpaLocation -> RealSrcSpan
- epaLocationFromSrcAnn :: SrcAnn ann -> EpaLocation
- epAnnComments :: EpAnn an -> EpAnnComments
- epAnnAnnsL :: EpAnn a -> [a]
- epAnnAnns :: EpAnn [AddEpAnn] -> [AddEpAnn]
- emptyComments :: EpAnnComments
- deltaPos :: Int -> Int -> DeltaPos
- commentsOnlyA :: Monoid ann => SrcAnn ann -> SrcAnn ann
- comment :: RealSrcSpan -> EpAnnComments -> EpAnnCO
- combineSrcSpansA :: Semigroup a => SrcAnn a -> SrcAnn a -> SrcAnn a
- combineLocsA :: Semigroup a => GenLocated (SrcAnn a) e1 -> GenLocated (SrcAnn a) e2 -> SrcAnn a
- annParen2AddEpAnn :: EpAnn AnnParen -> [AddEpAnn]
- addTrailingCommaToN :: SrcSpan -> EpAnn NameAnn -> EpaLocation -> EpAnn NameAnn
- addTrailingAnnToL :: SrcSpan -> TrailingAnn -> EpAnnComments -> EpAnn AnnList -> EpAnn AnnList
- addTrailingAnnToA :: SrcSpan -> TrailingAnn -> EpAnnComments -> EpAnn AnnListItem -> EpAnn AnnListItem
- addCommentsToSrcAnn :: Monoid ann => SrcAnn ann -> EpAnnComments -> SrcAnn ann
- addCommentsToEpAnn :: Monoid a => SrcSpan -> EpAnn a -> EpAnnComments -> EpAnn a
- addCLocAA :: GenLocated (SrcSpanAnn' a1) e1 -> GenLocated (SrcSpanAnn' a2) e2 -> e3 -> GenLocated (SrcAnn ann) e3
- addCLocA :: GenLocated (SrcSpanAnn' a) e1 -> GenLocated SrcSpan e2 -> e3 -> GenLocated (SrcAnn ann) e3
- addAnnsA :: SrcSpanAnnA -> [TrailingAnn] -> EpAnnComments -> SrcSpanAnnA
- addAnns :: EpAnn [AddEpAnn] -> [AddEpAnn] -> EpAnnComments -> EpAnn [AddEpAnn]
- type NameEnv a = UniqFM Name a
- type DNameEnv a = UniqDFM Name a
- unitNameEnv :: Name -> a -> NameEnv a
- plusNameEnv_CD2 :: (Maybe a -> Maybe a -> a) -> NameEnv a -> NameEnv a -> NameEnv a
- plusNameEnv_CD :: (a -> a -> a) -> NameEnv a -> a -> NameEnv a -> a -> NameEnv a
- plusNameEnv_C :: (a -> a -> a) -> NameEnv a -> NameEnv a -> NameEnv a
- plusNameEnv :: NameEnv a -> NameEnv a -> NameEnv a
- nameEnvElts :: NameEnv a -> [a]
- mkNameEnvWith :: (a -> Name) -> [a] -> NameEnv a
- mkNameEnv :: [(Name, a)] -> NameEnv a
- mapNameEnv :: (elt1 -> elt2) -> NameEnv elt1 -> NameEnv elt2
- mapDNameEnv :: (a -> b) -> DNameEnv a -> DNameEnv b
- lookupNameEnv_NF :: NameEnv a -> Name -> a
- lookupNameEnv :: NameEnv a -> Name -> Maybe a
- lookupDNameEnv :: DNameEnv a -> Name -> Maybe a
- isEmptyNameEnv :: NameEnv a -> Bool
- filterNameEnv :: (elt -> Bool) -> NameEnv elt -> NameEnv elt
- filterDNameEnv :: (a -> Bool) -> DNameEnv a -> DNameEnv a
- extendNameEnv_C :: (a -> a -> a) -> NameEnv a -> Name -> a -> NameEnv a
- extendNameEnv_Acc :: (a -> b -> b) -> (a -> b) -> NameEnv b -> Name -> a -> NameEnv b
- extendNameEnvList_C :: (a -> a -> a) -> NameEnv a -> [(Name, a)] -> NameEnv a
- extendNameEnvList :: NameEnv a -> [(Name, a)] -> NameEnv a
- extendNameEnv :: NameEnv a -> Name -> a -> NameEnv a
- extendDNameEnv :: DNameEnv a -> Name -> a -> DNameEnv a
- emptyNameEnv :: NameEnv a
- emptyDNameEnv :: DNameEnv a
- elemNameEnv :: Name -> NameEnv a -> Bool
- disjointNameEnv :: NameEnv a -> NameEnv a -> Bool
- depAnal :: (node -> [Name]) -> (node -> [Name]) -> [node] -> [SCC node]
- delListFromNameEnv :: NameEnv a -> [Name] -> NameEnv a
- delFromNameEnv :: NameEnv a -> Name -> NameEnv a
- delFromDNameEnv :: DNameEnv a -> Name -> DNameEnv a
- anyNameEnv :: (elt -> Bool) -> NameEnv elt -> Bool
- alterNameEnv :: (Maybe a -> Maybe a) -> NameEnv a -> Name -> NameEnv a
- alterDNameEnv :: (Maybe a -> Maybe a) -> DNameEnv a -> Name -> DNameEnv a
- adjustDNameEnv :: (a -> a) -> DNameEnv a -> Name -> DNameEnv a
- data BuiltInSyntax
- wiredInNameTyThing_maybe :: Name -> Maybe TyThing
- stableNameCmp :: Name -> Name -> Ordering
- setNameLoc :: Name -> SrcSpan -> Name
- pprPrefixName :: NamedThing a => a -> SDoc
- pprNameUnqualified :: Name -> SDoc
- pprNameDefnLoc :: Name -> SDoc
- pprModulePrefix :: PprStyle -> Module -> OccName -> SDoc
- pprInfixName :: (Outputable a, NamedThing a) => a -> SDoc
- pprDefinedAt :: Name -> SDoc
- nameStableString :: Name -> String
- nameSrcSpan :: Name -> SrcSpan
- nameSrcLoc :: Name -> SrcLoc
- nameNameSpace :: Name -> NameSpace
- nameModule_maybe :: Name -> Maybe Module
- nameModule :: HasDebugCallStack => Name -> Module
- nameIsLocalOrFrom :: Module -> Name -> Bool
- nameIsHomePackageImport :: Module -> Name -> Bool
- nameIsHomePackage :: Module -> Name -> Bool
- nameIsFromExternalPackage :: HomeUnit -> Name -> Bool
- mkWiredInName :: Module -> OccName -> Unique -> TyThing -> BuiltInSyntax -> Name
- mkSystemVarName :: Unique -> FastString -> Name
- mkSystemNameAt :: Unique -> OccName -> SrcSpan -> Name
- mkSystemName :: Unique -> OccName -> Name
- mkSysTvName :: Unique -> FastString -> Name
- mkInternalName :: Unique -> OccName -> SrcSpan -> Name
- mkFCallName :: Unique -> String -> Name
- mkExternalName :: Unique -> Module -> OccName -> SrcSpan -> Name
- mkDerivedInternalName :: (OccName -> OccName) -> Unique -> Name -> Name
- mkClonedInternalName :: Unique -> Name -> Name
- localiseName :: Name -> Name
- isWiredInName :: Name -> Bool
- isWiredIn :: NamedThing thing => thing -> Bool
- isVarName :: Name -> Bool
- isValName :: Name -> Bool
- isTyVarName :: Name -> Bool
- isTyConName :: Name -> Bool
- isSystemName :: Name -> Bool
- isInternalName :: Name -> Bool
- isHoleName :: Name -> Bool
- isExternalName :: Name -> Bool
- isDynLinkName :: Platform -> Module -> Name -> Bool
- isDataConName :: Name -> Bool
- isBuiltInSyntax :: Name -> Bool
- getSrcSpan :: NamedThing a => a -> SrcSpan
- getSrcLoc :: NamedThing a => a -> SrcLoc
- getOccString :: NamedThing a => a -> String
- getOccFS :: NamedThing a => a -> FastString
- type TidyOccEnv = UniqFM FastString Int
- type OccSet = UniqSet OccName
- data OccEnv a
- data NameSpace
- varName :: NameSpace
- unitOccSet :: OccName -> OccSet
- unitOccEnv :: OccName -> a -> OccEnv a
- unionOccSets :: OccSet -> OccSet -> OccSet
- unionManyOccSets :: [OccSet] -> OccSet
- tvName :: NameSpace
- tidyOccName :: TidyOccEnv -> OccName -> (TidyOccEnv, OccName)
- tcName :: NameSpace
- tcClsName :: NameSpace
- startsWithUnderscore :: OccName -> Bool
- srcDataName :: NameSpace
- setOccNameSpace :: NameSpace -> OccName -> OccName
- promoteOccName :: OccName -> Maybe OccName
- pprOccName :: OccName -> SDoc
- pprOccEnv :: (a -> SDoc) -> OccEnv a -> SDoc
- pprNonVarNameSpace :: NameSpace -> SDoc
- pprNameSpaceBrief :: NameSpace -> SDoc
- pprNameSpace :: NameSpace -> SDoc
- plusOccEnv_C :: (a -> a -> a) -> OccEnv a -> OccEnv a -> OccEnv a
- plusOccEnv :: OccEnv a -> OccEnv a -> OccEnv a
- parenSymOcc :: OccName -> SDoc -> SDoc
- occEnvElts :: OccEnv a -> [a]
- nameSpacesRelated :: NameSpace -> NameSpace -> Bool
- mkWorkerOcc :: OccName -> OccName
- mkVarOcc :: String -> OccName
- mkTyVarOccFS :: FastString -> OccName
- mkTyVarOcc :: String -> OccName
- mkTyConRepOcc :: OccName -> OccName
- mkTcOccFS :: FastString -> OccName
- mkTcOcc :: String -> OccName
- mkTag2ConOcc :: OccName -> OccName
- mkSuperDictSelOcc :: Int -> OccName -> OccName
- mkSuperDictAuxOcc :: Int -> OccName -> OccName
- mkSpecOcc :: OccName -> OccName
- mkRepEqOcc :: OccName -> OccName
- mkOccSet :: [OccName] -> OccSet
- mkOccNameFS :: NameSpace -> FastString -> OccName
- mkOccName :: NameSpace -> String -> OccName
- mkOccEnv_C :: (a -> a -> a) -> [(OccName, a)] -> OccEnv a
- mkOccEnv :: [(OccName, a)] -> OccEnv a
- mkNewTyCoOcc :: OccName -> OccName
- mkMethodOcc :: OccName -> OccName
- mkMaxTagOcc :: OccName -> OccName
- mkMatcherOcc :: OccName -> OccName
- mkLocalOcc :: Unique -> OccName -> OccName
- mkInstTyTcOcc :: String -> OccSet -> OccName
- mkInstTyCoOcc :: OccName -> OccName
- mkIPOcc :: OccName -> OccName
- mkGenR :: OccName -> OccName
- mkGen1R :: OccName -> OccName
- mkForeignExportOcc :: OccName -> OccName
- mkEqPredCoOcc :: OccName -> OccName
- mkDictOcc :: OccName -> OccName
- mkDefaultMethodOcc :: OccName -> OccName
- mkDataTOcc :: OccName -> OccName
- mkDataOccFS :: FastString -> OccName
- mkDataOcc :: String -> OccName
- mkDataConWrapperOcc :: OccName -> OccName
- mkDataConWorkerOcc :: OccName -> OccName
- mkDataCOcc :: OccName -> OccName
- mkDFunOcc :: String -> Bool -> OccSet -> OccName
- mkCon2TagOcc :: OccName -> OccName
- mkClsOccFS :: FastString -> OccName
- mkClsOcc :: String -> OccName
- mkClassOpAuxOcc :: OccName -> OccName
- mkClassDataConOcc :: OccName -> OccName
- mkBuilderOcc :: OccName -> OccName
- minusOccSet :: OccSet -> OccSet -> OccSet
- mapOccEnv :: (a -> b) -> OccEnv a -> OccEnv b
- lookupOccEnv :: OccEnv a -> OccName -> Maybe a
- isVarOcc :: OccName -> Bool
- isVarNameSpace :: NameSpace -> Bool
- isValOcc :: OccName -> Bool
- isValNameSpace :: NameSpace -> Bool
- isTypeableBindOcc :: OccName -> Bool
- isTvOcc :: OccName -> Bool
- isTvNameSpace :: NameSpace -> Bool
- isTcOcc :: OccName -> Bool
- isTcClsNameSpace :: NameSpace -> Bool
- isSymOcc :: OccName -> Bool
- isEmptyOccSet :: OccSet -> Bool
- isDerivedOccName :: OccName -> Bool
- isDefaultMethodOcc :: OccName -> Bool
- isDataSymOcc :: OccName -> Bool
- isDataOcc :: OccName -> Bool
- isDataConNameSpace :: NameSpace -> Bool
- intersectOccSet :: OccSet -> OccSet -> OccSet
- initTidyOccEnv :: [OccName] -> TidyOccEnv
- foldOccEnv :: (a -> b -> b) -> b -> OccEnv a -> b
- filterOccSet :: (OccName -> Bool) -> OccSet -> OccSet
- filterOccEnv :: (elt -> Bool) -> OccEnv elt -> OccEnv elt
- extendOccSetList :: OccSet -> [OccName] -> OccSet
- extendOccSet :: OccSet -> OccName -> OccSet
- extendOccEnv_C :: (a -> a -> a) -> OccEnv a -> OccName -> a -> OccEnv a
- extendOccEnv_Acc :: (a -> b -> b) -> (a -> b) -> OccEnv b -> OccName -> a -> OccEnv b
- extendOccEnvList :: OccEnv a -> [(OccName, a)] -> OccEnv a
- extendOccEnv :: OccEnv a -> OccName -> a -> OccEnv a
- emptyTidyOccEnv :: TidyOccEnv
- emptyOccSet :: OccSet
- emptyOccEnv :: OccEnv a
- elemOccSet :: OccName -> OccSet -> Bool
- elemOccEnv :: OccName -> OccEnv a -> Bool
- demoteOccName :: OccName -> Maybe OccName
- delTidyOccEnvList :: TidyOccEnv -> [FastString] -> TidyOccEnv
- delListFromOccEnv :: OccEnv a -> [OccName] -> OccEnv a
- delFromOccEnv :: OccEnv a -> OccName -> OccEnv a
- dataName :: NameSpace
- clsName :: NameSpace
- avoidClashesOccEnv :: TidyOccEnv -> [OccName] -> TidyOccEnv
- alterOccEnv :: (Maybe elt -> Maybe elt) -> OccEnv elt -> OccName -> OccEnv elt
- type TyVarBinder = VarBndr TyVar ArgFlag
- type TyCoVarBinder = VarBndr TyCoVar ArgFlag
- type OutVar = Var
- type OutId = Id
- type JoinId = Id
- type InVar = Var
- type InId = Id
- type DFunId = Id
- updateIdTypeButNotMult :: (Type -> Type) -> Id -> Id
- updateIdTypeAndMultM :: Monad m => (Type -> m Type) -> Id -> m Id
- updateIdTypeAndMult :: (Type -> Type) -> Id -> Id
- tyVarSpecToBinders :: [VarBndr a Specificity] -> [VarBndr a ArgFlag]
- tyVarKind :: TyVar -> Kind
- setIdMult :: Id -> Mult -> Id
- sameVis :: ArgFlag -> ArgFlag -> Bool
- mkTyVarBinders :: vis -> [TyVar] -> [VarBndr TyVar vis]
- mkTyVarBinder :: vis -> TyVar -> VarBndr TyVar vis
- mkTyCoVarBinders :: vis -> [TyCoVar] -> [VarBndr TyCoVar vis]
- mkTyCoVarBinder :: vis -> TyCoVar -> VarBndr TyCoVar vis
- isVisibleArgFlag :: ArgFlag -> Bool
- isTyVar :: Var -> Bool
- isLocalId :: Var -> Bool
- isInvisibleArgFlag :: ArgFlag -> Bool
- isId :: Var -> Bool
- isGlobalId :: Var -> Bool
- isExportedId :: Var -> Bool
- idInfo :: HasDebugCallStack => Id -> IdInfo
- idDetails :: Id -> IdDetails
- globaliseId :: Id -> Id
- binderVars :: [VarBndr tv argf] -> [tv]
- binderVar :: VarBndr tv argf -> tv
- binderType :: VarBndr TyCoVar argf -> Type
- binderArgFlag :: VarBndr tv argf -> argf
- wordRepDataConTy :: Type
- word8RepDataConTy :: Type
- word8ElemRepDataConTy :: Type
- word64RepDataConTy :: Type
- word64ElemRepDataConTy :: Type
- word32RepDataConTy :: Type
- word32ElemRepDataConTy :: Type
- word16RepDataConTy :: Type
- word16ElemRepDataConTy :: Type
- vecRepDataConTyCon :: TyCon
- vecElemTyCon :: TyCon
- vecCountTyCon :: TyCon
- vec8DataConTy :: Type
- vec64DataConTy :: Type
- vec4DataConTy :: Type
- vec32DataConTy :: Type
- vec2DataConTy :: Type
- vec16DataConTy :: Type
- unrestrictedFunTyCon :: TyCon
- unliftedTypeKindTyCon :: TyCon
- unliftedTypeKind :: Kind
- unliftedRepTyCon :: TyCon
- unliftedRepTy :: Type
- unliftedDataConTy :: Type
- unitTy :: Type
- unboxedTupleKind :: [Type] -> Kind
- typeSymbolKind :: Kind
- tupleTyConName :: TupleSort -> Arity -> Name
- tupleTyCon :: Boxity -> Arity -> TyCon
- tupleRepDataConTyCon :: TyCon
- tupleDataCon :: Boxity -> Arity -> DataCon
- sumTyCon :: Arity -> TyCon
- sumDataCon :: ConTag -> Arity -> DataCon
- runtimeRepTyCon :: TyCon
- runtimeRepTy :: Type
- promotedTupleDataCon :: Boxity -> Arity -> TyCon
- oneDataConTyCon :: TyCon
- oneDataConTy :: Type
- naturalTy :: Type
- multiplicityTyCon :: TyCon
- multiplicityTy :: Type
- multMulTyCon :: TyCon
- mkPromotedListTy :: Kind -> [Type] -> Type
- mkBoxedTupleTy :: [Type] -> Type
- manyDataConTyCon :: TyCon
- manyDataConTy :: Type
- listTyCon :: TyCon
- liftedTypeKindTyCon :: TyCon
- liftedTypeKind :: Kind
- liftedRepTyCon :: TyCon
- liftedRepTy :: Type
- liftedDataConTyCon :: TyCon
- liftedDataConTy :: Type
- levityTyCon :: TyCon
- integerTy :: Type
- intRepDataConTy :: Type
- int8RepDataConTy :: Type
- int8ElemRepDataConTy :: Type
- int64RepDataConTy :: Type
- int64ElemRepDataConTy :: Type
- int32RepDataConTy :: Type
- int32ElemRepDataConTy :: Type
- int16RepDataConTy :: Type
- int16ElemRepDataConTy :: Type
- heqTyCon :: TyCon
- floatRepDataConTy :: Type
- floatElemRepDataConTy :: Type
- doubleRepDataConTy :: Type
- doubleElemRepDataConTy :: Type
- constraintKind :: Kind
- coercibleTyCon :: TyCon
- charTy :: Type
- cTupleTyConName :: Arity -> Name
- cTupleSelIdName :: ConTag -> Arity -> Name
- cTupleDataConName :: Arity -> Name
- cTupleDataCon :: Arity -> DataCon
- boxedRepDataConTyCon :: TyCon
- anyTypeOfKind :: Kind -> Type
- addrRepDataConTy :: Type
- pprType :: Type -> SDoc
- pprKind :: Kind -> SDoc
- tyConAppTyCon_maybe :: Type -> Maybe TyCon
- tcView :: Type -> Maybe Type
- tYPE :: Type -> Type
- splitTyConApp_maybe :: HasDebugCallStack => Type -> Maybe (TyCon, [Type])
- piResultTy :: HasDebugCallStack => Type -> Type -> Type
- partitionInvisibleTypes :: TyCon -> [Type] -> ([Type], [Type])
- mkTyConTy :: TyCon -> Type
- mkTyConApp :: TyCon -> [Type] -> Type
- mkCastTy :: Type -> Coercion -> Type
- mkAppTy :: Type -> Type -> Type
- isRuntimeRepTy :: Type -> Bool
- isPredTy :: HasDebugCallStack => Type -> Bool
- isMultiplicityTy :: Type -> Bool
- isLiftedTypeKind :: Kind -> Bool
- isCoercionTy :: Type -> Bool
- coreView :: Type -> Maybe Type
- data UnivCoProvenance
- data Type
- data TyLit
- data TyCoBinder
- type ThetaType = [PredType]
- data Scaled a = Scaled !Mult a
- type PredType = Type
- type Mult = Type
- type MCoercionN = MCoercion
- data MCoercion
- type Kind = Type
- type CoercionN = Coercion
- data Coercion
- = Refl Type
- | GRefl Role Type MCoercionN
- | TyConAppCo Role TyCon [Coercion]
- | AppCo Coercion CoercionN
- | ForAllCo TyCoVar KindCoercion Coercion
- | FunCo Role CoercionN Coercion Coercion
- | CoVarCo CoVar
- | AxiomInstCo (CoAxiom Branched) BranchIndex [Coercion]
- | AxiomRuleCo CoAxiomRule [Coercion]
- | UnivCo UnivCoProvenance Role Type Type
- | SymCo Coercion
- | TransCo Coercion Coercion
- | NthCo Role Int Coercion
- | LRCo LeftOrRight CoercionN
- | InstCo Coercion CoercionN
- | KindCo Coercion
- | SubCo CoercionN
- | HoleCo CoercionHole
- mkTyConTy_ :: TyCon -> Type
- mkFunTyMany :: AnonArgFlag -> Type -> Type -> Type
- mkForAllTy :: TyCoVar -> ArgFlag -> Type -> Type
- type TyConRepName = Name
- data TyCon
- tyConRepName_maybe :: TyCon -> Maybe TyConRepName
- mkPrelTyConRepName :: Name -> TyConRepName
- isUnboxedTupleTyCon :: TyCon -> Bool
- isTupleTyCon :: TyCon -> Bool
- isFunTyCon :: TyCon -> Bool
- data Bag a
- unitBag :: a -> Bag a
- unionManyBags :: [Bag a] -> Bag a
- unionBags :: Bag a -> Bag a -> Bag a
- snocBag :: Bag a -> a -> Bag a
- partitionBagWith :: (a -> Either b c) -> Bag a -> (Bag b, Bag c)
- partitionBag :: (a -> Bool) -> Bag a -> (Bag a, Bag a)
- nonEmptyToBag :: NonEmpty a -> Bag a
- mapMaybeBag :: (a -> Maybe b) -> Bag a -> Bag b
- mapBagM_ :: Monad m => (a -> m b) -> Bag a -> m ()
- mapBagM :: Monad m => (a -> m b) -> Bag a -> m (Bag b)
- mapBag :: (a -> b) -> Bag a -> Bag b
- mapAndUnzipBagM :: Monad m => (a -> m (b, c)) -> Bag a -> m (Bag b, Bag c)
- mapAccumBagLM :: Monad m => (acc -> x -> m (acc, y)) -> acc -> Bag x -> m (acc, Bag y)
- mapAccumBagL :: (acc -> x -> (acc, y)) -> acc -> Bag x -> (acc, Bag y)
- listToBag :: [a] -> Bag a
- lengthBag :: Bag a -> Int
- isSingletonBag :: Bag a -> Bool
- isEmptyBag :: Bag a -> Bool
- foldBag :: (r -> r -> r) -> (a -> r) -> r -> Bag a -> r
- flatMapBagPairM :: Monad m => (a -> m (Bag b, Bag c)) -> Bag a -> m (Bag b, Bag c)
- flatMapBagM :: Monad m => (a -> m (Bag b)) -> Bag a -> m (Bag b)
- filterBagM :: Monad m => (a -> m Bool) -> Bag a -> m (Bag a)
- filterBag :: (a -> Bool) -> Bag a -> Bag a
- emptyBag :: Bag a
- elemBag :: Eq a => a -> Bag a -> Bool
- consBag :: a -> Bag a -> Bag a
- concatMapBagPair :: (a -> (Bag b, Bag c)) -> Bag a -> (Bag b, Bag c)
- concatMapBag :: (a -> Bag b) -> Bag a -> Bag b
- concatBag :: Bag (Bag a) -> Bag a
- catBagMaybes :: Bag (Maybe a) -> Bag a
- bagToList :: Bag a -> [a]
- anyBagM :: Monad m => (a -> m Bool) -> Bag a -> m Bool
- anyBag :: (a -> Bool) -> Bag a -> Bool
- allBag :: (a -> Bool) -> Bag a -> Bool
- data TcTyVarDetails
- data MetaDetails
- vanillaSkolemTv :: TcTyVarDetails
- pprTcTyVarDetails :: TcTyVarDetails -> SDoc
- isTyConableTyVar :: TcTyVar -> Bool
- isMetaTyVar :: TcTyVar -> Bool
- data TypeOrKind
- data TupleSort
- data TopLevelFlag
- data TailCallInfo
- data SwapFlag
- data SuccessFlag
- data SpliceExplicitFlag
- type RuleName = FastString
- data RuleMatchInfo
- type RepArity = Int
- data RecFlag
- data PromotionFlag
- newtype PprPrec = PprPrec Int
- type PhaseNum = Int
- data OverlapMode
- data OverlapFlag = OverlapFlag {}
- data Origin
- data OneShotInfo
- data OccInfo
- = ManyOccs {
- occ_tail :: !TailCallInfo
- | IAmDead
- | OneOcc { }
- | IAmALoopBreaker {
- occ_rules_only :: !RulesOnly
- occ_tail :: !TailCallInfo
- = ManyOccs {
- data LeftOrRight
- type JoinArity = Int
- data InterestingCxt
- data IntWithInf
- data InsideLam
- data InlineSpec
- data InlinePragma = InlinePragma {}
- data FunctionOrData
- = IsFunction
- | IsData
- type FullArgCount = Int
- data EP a = EP {}
- data DefMethSpec ty
- type ConTagZ = Int
- type ConTag = Int
- data CompilerPhase
- type BranchCount = Int
- data Boxity
- type Arity = Int
- data Alignment
- data Activation
- zapOccTailCallInfo :: OccInfo -> OccInfo
- zapFragileOcc :: OccInfo -> OccInfo
- worstOneShot :: OneShotInfo -> OneShotInfo -> OneShotInfo
- weakLoopBreaker :: OccInfo
- unSwap :: SwapFlag -> (a -> a -> b) -> a -> a -> b
- tupleSortBoxity :: TupleSort -> Boxity
- tupleParens :: TupleSort -> SDoc -> SDoc
- treatZeroAsInf :: Int -> IntWithInf
- topPrec :: PprPrec
- tailCallInfo :: OccInfo -> TailCallInfo
- sumParens :: SDoc -> SDoc
- successIf :: Bool -> SuccessFlag
- succeeded :: SuccessFlag -> Bool
- strongLoopBreaker :: OccInfo
- starPrec :: PprPrec
- sigPrec :: PprPrec
- setOverlapModeMaybe :: OverlapFlag -> Maybe OverlapMode -> OverlapFlag
- setInlinePragmaRuleMatchInfo :: InlinePragma -> RuleMatchInfo -> InlinePragma
- setInlinePragmaActivation :: InlinePragma -> Activation -> InlinePragma
- seqOccInfo :: OccInfo -> ()
- pprRuleName :: RuleName -> SDoc
- pprInlineDebug :: InlinePragma -> SDoc
- pprInline :: InlinePragma -> SDoc
- pprAlternative :: (a -> SDoc) -> a -> ConTag -> Arity -> SDoc
- pickLR :: LeftOrRight -> (a, a) -> a
- opPrec :: PprPrec
- oneBranch :: BranchCount
- noUserInlineSpec :: InlineSpec -> Bool
- noOneShotInfo :: OneShotInfo
- noOccInfo :: OccInfo
- neverInlinePragma :: InlinePragma
- mkIntWithInf :: Int -> IntWithInf
- mkAlignment :: Int -> Alignment
- maybeParen :: PprPrec -> PprPrec -> SDoc -> SDoc
- isWeakLoopBreaker :: OccInfo -> Bool
- isTypeLevel :: TypeOrKind -> Bool
- isTopLevel :: TopLevelFlag -> Bool
- isSwapped :: SwapFlag -> Bool
- isStrongLoopBreaker :: OccInfo -> Bool
- isRec :: RecFlag -> Bool
- isPromoted :: PromotionFlag -> Bool
- isOneShotInfo :: OneShotInfo -> Bool
- isOneOcc :: OccInfo -> Bool
- isNotTopLevel :: TopLevelFlag -> Bool
- isNonRec :: RecFlag -> Bool
- isNoOccInfo :: OccInfo -> Bool
- isNeverActive :: Activation -> Bool
- isManyOccs :: OccInfo -> Bool
- isKindLevel :: TypeOrKind -> Bool
- isInlinePragma :: InlinePragma -> Bool
- isInlinablePragma :: InlinePragma -> Bool
- isGenerated :: Origin -> Bool
- isFunLike :: RuleMatchInfo -> Bool
- isDefaultInlinePragma :: InlinePragma -> Bool
- isDeadOcc :: OccInfo -> Bool
- isConLike :: RuleMatchInfo -> Bool
- isBoxed :: Boxity -> Bool
- isAnyInlinePragma :: InlinePragma -> Bool
- isAlwaysTailCalled :: OccInfo -> Bool
- isAlwaysActive :: Activation -> Bool
- isActive :: CompilerPhase -> Activation -> Bool
- intGtLimit :: Int -> IntWithInf -> Bool
- inlinePragmaSpec :: InlinePragma -> InlineSpec
- inlinePragmaSat :: InlinePragma -> Maybe Arity
- inlinePragmaRuleMatchInfo :: InlinePragma -> RuleMatchInfo
- inlinePragmaActivation :: InlinePragma -> Activation
- infinity :: IntWithInf
- hasOverlappingFlag :: OverlapMode -> Bool
- hasOverlappableFlag :: OverlapMode -> Bool
- hasNoOneShotInfo :: OneShotInfo -> Bool
- hasIncoherentFlag :: OverlapMode -> Bool
- funPrec :: PprPrec
- flipSwap :: SwapFlag -> SwapFlag
- failed :: SuccessFlag -> Bool
- fIRST_TAG :: ConTag
- dfunInlinePragma :: InlinePragma
- defaultInlinePragma :: InlinePragma
- competesWith :: Activation -> Activation -> Bool
- boxityTupleSort :: Boxity -> TupleSort
- boolToRecFlag :: Bool -> RecFlag
- bestOneShot :: OneShotInfo -> OneShotInfo -> OneShotInfo
- appPrec :: PprPrec
- alwaysInlinePragma :: InlinePragma
- alignmentOf :: Int -> Alignment
- activeInFinalPhase :: Activation -> Bool
- activateDuringFinal :: Activation
- activateAfterInitial :: Activation
- idName :: Id -> Name
- data Var
- type TyVar = Var
- type TyCoVar = Id
- type TcTyVar = Var
- data Specificity
- type Id = Var
- data ArgFlag where
- data AnonArgFlag
- stableModuleNameCmp :: ModuleName -> ModuleName -> Ordering
- pprModuleName :: ModuleName -> SDoc
- parseModuleName :: ReadP ModuleName
- moduleNameString :: ModuleName -> String
- moduleNameSlashes :: ModuleName -> String
- moduleNameFS :: ModuleName -> FastString
- moduleNameColons :: ModuleName -> String
- mkModuleNameFS :: FastString -> ModuleName
- mkModuleName :: String -> ModuleName
- class NamedThing a where
- getOccName :: a -> OccName
- getName :: a -> Name
- data Name
- tidyNameOcc :: Name -> OccName -> Name
- setNameUnique :: Name -> Unique -> Name
- nameUnique :: Name -> Unique
- nameOccName :: Name -> OccName
- data UnhelpfulSpanReason
- data SrcSpan
- data SrcLoc
- data RealSrcSpan
- data RealSrcLoc
- type RealLocated = GenLocated RealSrcSpan
- data PsSpan = PsSpan {
- psRealSpan :: !RealSrcSpan
- psBufSpan :: !BufSpan
- type PsLocated = GenLocated PsSpan
- data PsLoc = PsLoc {
- psRealLoc :: !RealSrcLoc
- psBufPos :: !BufPos
- type Located = GenLocated SrcSpan
- data LayoutInfo
- data GenLocated l e = L l e
- data BufSpan = BufSpan {
- bufSpanStart :: !BufPos
- bufSpanEnd :: !BufPos
- newtype BufPos = BufPos {}
- wiredInSrcSpan :: SrcSpan
- unhelpfulSpanFS :: UnhelpfulSpanReason -> FastString
- unRealSrcSpan :: RealLocated a -> a
- unLoc :: GenLocated l e -> e
- srcSpanToRealSrcSpan :: SrcSpan -> Maybe RealSrcSpan
- srcSpanStartLine :: RealSrcSpan -> Int
- srcSpanStartCol :: RealSrcSpan -> Int
- srcSpanStart :: SrcSpan -> SrcLoc
- srcSpanFirstCharacter :: SrcSpan -> SrcSpan
- srcSpanFileName_maybe :: SrcSpan -> Maybe FastString
- srcSpanEndLine :: RealSrcSpan -> Int
- srcSpanEndCol :: RealSrcSpan -> Int
- srcSpanEnd :: SrcSpan -> SrcLoc
- srcLocSpan :: SrcLoc -> SrcSpan
- srcLocLine :: RealSrcLoc -> Int
- srcLocFile :: RealSrcLoc -> FastString
- srcLocCol :: RealSrcLoc -> Int
- spans :: SrcSpan -> (Int, Int) -> Bool
- sortRealLocated :: [RealLocated a] -> [RealLocated a]
- sortLocated :: [Located a] -> [Located a]
- rightmost_smallest :: SrcSpan -> SrcSpan -> Ordering
- realSrcSpanStart :: RealSrcSpan -> RealSrcLoc
- realSrcSpanEnd :: RealSrcSpan -> RealSrcLoc
- realSrcLocSpan :: RealSrcLoc -> RealSrcSpan
- psSpanStart :: PsSpan -> PsLoc
- psSpanEnd :: PsSpan -> PsLoc
- pprUserSpan :: Bool -> SrcSpan -> SDoc
- pprUserRealSpan :: Bool -> RealSrcSpan -> SDoc
- pprUnhelpfulSpanReason :: UnhelpfulSpanReason -> SDoc
- pprLocated :: (Outputable l, Outputable e) => GenLocated l e -> SDoc
- noSrcSpan :: SrcSpan
- noSrcLoc :: SrcLoc
- noLoc :: e -> Located e
- mkSrcSpanPs :: PsSpan -> SrcSpan
- mkSrcSpan :: SrcLoc -> SrcLoc -> SrcSpan
- mkSrcLoc :: FastString -> Int -> Int -> SrcLoc
- mkRealSrcSpan :: RealSrcLoc -> RealSrcLoc -> RealSrcSpan
- mkRealSrcLoc :: FastString -> Int -> Int -> RealSrcLoc
- mkPsSpan :: PsLoc -> PsLoc -> PsSpan
- mkGeneralSrcSpan :: FastString -> SrcSpan
- mkGeneralSrcLoc :: FastString -> SrcLoc
- mkGeneralLocated :: String -> e -> Located e
- mapLoc :: (a -> b) -> GenLocated l a -> GenLocated l b
- lookupSrcSpan :: SrcSpan -> Map RealSrcSpan a -> Maybe a
- lookupSrcLoc :: SrcLoc -> Map RealSrcLoc a -> Maybe a
- liftL :: Monad m => (a -> m b) -> GenLocated l a -> m (GenLocated l b)
- leftmost_smallest :: SrcSpan -> SrcSpan -> Ordering
- leftmost_largest :: SrcSpan -> SrcSpan -> Ordering
- leftmostColumn :: Int
- isZeroWidthSpan :: SrcSpan -> Bool
- isSubspanOf :: SrcSpan -> SrcSpan -> Bool
- isRealSubspanOf :: RealSrcSpan -> RealSrcSpan -> Bool
- isOneLineSpan :: SrcSpan -> Bool
- isGoodSrcSpan :: SrcSpan -> Bool
- isGeneratedSrcSpan :: SrcSpan -> Bool
- interactiveSrcSpan :: SrcSpan
- interactiveSrcLoc :: SrcLoc
- getRealSrcSpan :: RealLocated a -> RealSrcSpan
- getLoc :: GenLocated l e -> l
- getBufSpan :: SrcSpan -> Maybe BufSpan
- getBufPos :: SrcLoc -> Maybe BufPos
- generatedSrcSpan :: SrcSpan
- generatedSrcLoc :: SrcLoc
- eqLocated :: Eq a => GenLocated l a -> GenLocated l a -> Bool
- containsSpan :: RealSrcSpan -> RealSrcSpan -> Bool
- combineSrcSpans :: SrcSpan -> SrcSpan -> SrcSpan
- combineRealSrcSpans :: RealSrcSpan -> RealSrcSpan -> RealSrcSpan
- combineLocs :: Located a -> Located b -> SrcSpan
- cmpLocated :: Ord a => GenLocated l a -> GenLocated l a -> Ordering
- cmpBufSpan :: HasDebugCallStack => Located a -> Located a -> Ordering
- advanceSrcLoc :: RealSrcLoc -> Char -> RealSrcLoc
- advancePsLoc :: PsLoc -> Char -> PsLoc
- advanceBufPos :: BufPos -> BufPos
- addCLoc :: Located a -> Located b -> c -> Located c
- type FastStringEnv a = UniqFM FastString a
- mkFsEnv :: [(FastString, a)] -> FastStringEnv a
- lookupFsEnv :: FastStringEnv a -> FastString -> Maybe a
- extendFsEnv :: FastStringEnv a -> FastString -> a -> FastStringEnv a
- emptyFsEnv :: FastStringEnv a
- data UniqSet a
- unsafeUFMToUniqSet :: UniqFM a a -> UniqSet a
- unitUniqSet :: Uniquable a => a -> UniqSet a
- uniqSetMinusUFM :: UniqSet key -> UniqFM key b -> UniqSet key
- uniqSetMinusUDFM :: UniqSet key -> UniqDFM key b -> UniqSet key
- uniqSetAny :: (a -> Bool) -> UniqSet a -> Bool
- uniqSetAll :: (a -> Bool) -> UniqSet a -> Bool
- unionUniqSets :: UniqSet a -> UniqSet a -> UniqSet a
- unionManyUniqSets :: [UniqSet a] -> UniqSet a
- sizeUniqSet :: UniqSet a -> Int
- restrictUniqSetToUFM :: UniqSet key -> UniqFM key b -> UniqSet key
- pprUniqSet :: (a -> SDoc) -> UniqSet a -> SDoc
- partitionUniqSet :: (a -> Bool) -> UniqSet a -> (UniqSet a, UniqSet a)
- nonDetStrictFoldUniqSet :: (elt -> a -> a) -> a -> UniqSet elt -> a
- nonDetKeysUniqSet :: UniqSet elt -> [Unique]
- nonDetEltsUniqSet :: UniqSet elt -> [elt]
- mkUniqSet :: Uniquable a => [a] -> UniqSet a
- minusUniqSet :: UniqSet a -> UniqSet a -> UniqSet a
- mapUniqSet :: Uniquable b => (a -> b) -> UniqSet a -> UniqSet b
- lookupUniqSet_Directly :: UniqSet a -> Unique -> Maybe a
- lookupUniqSet :: Uniquable key => UniqSet key -> key -> Maybe key
- isEmptyUniqSet :: UniqSet a -> Bool
- intersectUniqSets :: UniqSet a -> UniqSet a -> UniqSet a
- getUniqSet :: UniqSet a -> UniqFM a a
- filterUniqSet_Directly :: (Unique -> elt -> Bool) -> UniqSet elt -> UniqSet elt
- filterUniqSet :: (a -> Bool) -> UniqSet a -> UniqSet a
- emptyUniqSet :: UniqSet a
- elementOfUniqSet :: Uniquable a => a -> UniqSet a -> Bool
- elemUniqSet_Directly :: Unique -> UniqSet a -> Bool
- disjointUniqSets :: UniqSet a -> UniqSet a -> Bool
- delOneFromUniqSet_Directly :: UniqSet a -> Unique -> UniqSet a
- delOneFromUniqSet :: Uniquable a => UniqSet a -> a -> UniqSet a
- delListFromUniqSet_Directly :: UniqSet a -> [Unique] -> UniqSet a
- delListFromUniqSet :: Uniquable a => UniqSet a -> [a] -> UniqSet a
- addOneToUniqSet :: Uniquable a => UniqSet a -> a -> UniqSet a
- addListToUniqSet :: Uniquable a => UniqSet a -> [a] -> UniqSet a
- type QueryQualifyPackage = Unit -> Bool
- type QueryQualifyName = Module -> OccName -> QualifyName
- type QueryQualifyModule = Module -> Bool
- data QualifyName
- data PrintUnqualified = QueryQualify {}
- newtype PDoc a = PDoc a
- class OutputableP env a where
- class Outputable a => OutputableBndr a where
- pprBndr :: BindingSite -> a -> SDoc
- pprPrefixOcc :: a -> SDoc
- pprInfixOcc :: a -> SDoc
- bndrIsJoin_maybe :: a -> Maybe Int
- class Outputable a where
- data LabelStyle
- data Depth
- data BindingSite
- ztext :: FastZString -> SDoc
- word :: Integer -> SDoc
- withUserStyle :: PrintUnqualified -> Depth -> SDoc -> SDoc
- withPprStyle :: PprStyle -> SDoc -> SDoc
- withErrStyle :: PrintUnqualified -> SDoc -> SDoc
- whenPprDebug :: SDoc -> SDoc
- vcat :: [SDoc] -> SDoc
- vbar :: SDoc
- userStyle :: PprStyle -> Bool
- updSDocContext :: (SDocContext -> SDocContext) -> SDoc -> SDoc
- unicodeSyntax :: SDoc -> SDoc -> SDoc
- underscore :: SDoc
- speakNth :: Int -> SDoc
- speakNOf :: Int -> SDoc -> SDoc
- speakN :: Int -> SDoc
- space :: SDoc
- showSDocUnsafe :: SDoc -> String
- showSDocOneLine :: SDocContext -> SDoc -> String
- showPprUnsafe :: Outputable a => a -> String
- setStyleColoured :: Bool -> PprStyle -> PprStyle
- sep :: [SDoc] -> SDoc
- semi :: SDoc
- sdocWithContext :: (SDocContext -> SDoc) -> SDoc
- sdocOption :: (SDocContext -> a) -> (a -> SDoc) -> SDoc
- runSDoc :: SDoc -> SDocContext -> Doc
- rparen :: SDoc
- renderWithContext :: SDocContext -> SDoc -> String
- reallyAlwaysQualifyNames :: QueryQualifyName
- reallyAlwaysQualify :: PrintUnqualified
- rbrack :: SDoc
- rbrace :: SDoc
- rational :: Rational -> SDoc
- quotes :: SDoc -> SDoc
- quotedListWithOr :: [SDoc] -> SDoc
- quotedListWithNor :: [SDoc] -> SDoc
- quote :: SDoc -> SDoc
- queryQual :: PprStyle -> PrintUnqualified
- qualPackage :: PprStyle -> QueryQualifyPackage
- qualName :: PprStyle -> QueryQualifyName
- qualModule :: PprStyle -> QueryQualifyModule
- punctuate :: SDoc -> [SDoc] -> [SDoc]
- ptext :: PtrString -> SDoc
- printSDocLn :: SDocContext -> Mode -> Handle -> SDoc -> IO ()
- printSDoc :: SDocContext -> Mode -> Handle -> SDoc -> IO ()
- primWordSuffix :: SDoc
- primWord8Suffix :: SDoc
- primWord64Suffix :: SDoc
- primWord32Suffix :: SDoc
- primWord16Suffix :: SDoc
- primIntSuffix :: SDoc
- primInt8Suffix :: SDoc
- primInt64Suffix :: SDoc
- primInt32Suffix :: SDoc
- primInt16Suffix :: SDoc
- primFloatSuffix :: SDoc
- primDoubleSuffix :: SDoc
- primCharSuffix :: SDoc
- pprWithCommas :: (a -> SDoc) -> [a] -> SDoc
- pprWithBars :: (a -> SDoc) -> [a] -> SDoc
- pprSetDepth :: Depth -> SDoc -> SDoc
- pprQuotedList :: Outputable a => [a] -> SDoc
- pprPrimWord8 :: Integer -> SDoc
- pprPrimWord64 :: Integer -> SDoc
- pprPrimWord32 :: Integer -> SDoc
- pprPrimWord16 :: Integer -> SDoc
- pprPrimWord :: Integer -> SDoc
- pprPrimInt8 :: Integer -> SDoc
- pprPrimInt64 :: Integer -> SDoc
- pprPrimInt32 :: Integer -> SDoc
- pprPrimInt16 :: Integer -> SDoc
- pprPrimInt :: Integer -> SDoc
- pprPrimChar :: Char -> SDoc
- pprPrefixVar :: Bool -> SDoc -> SDoc
- pprInfixVar :: Bool -> SDoc -> SDoc
- pprHsString :: FastString -> SDoc
- pprHsChar :: Char -> SDoc
- pprHsBytes :: ByteString -> SDoc
- pprFilePathString :: FilePath -> SDoc
- pprFastFilePath :: FastString -> SDoc
- pprDeeperList :: ([SDoc] -> SDoc) -> [SDoc] -> SDoc
- pprDeeper :: SDoc -> SDoc
- pprCode :: LabelStyle -> SDoc -> SDoc
- ppWhenOption :: (SDocContext -> Bool) -> SDoc -> SDoc
- ppWhen :: Bool -> SDoc -> SDoc
- ppUnlessOption :: (SDocContext -> Bool) -> SDoc -> SDoc
- ppUnless :: Bool -> SDoc -> SDoc
- plural :: [a] -> SDoc
- parens :: SDoc -> SDoc
- neverQualifyPackages :: QueryQualifyPackage
- neverQualifyNames :: QueryQualifyName
- neverQualifyModules :: QueryQualifyModule
- neverQualify :: PrintUnqualified
- nest :: Int -> SDoc -> SDoc
- mulArrow :: SDoc -> SDoc
- mkUserStyle :: PrintUnqualified -> Depth -> PprStyle
- mkErrStyle :: PrintUnqualified -> PprStyle
- mkDumpStyle :: PrintUnqualified -> PprStyle
- lparen :: SDoc
- lollipop :: SDoc
- lbrack :: SDoc
- lbrace :: SDoc
- larrowtt :: SDoc
- larrowt :: SDoc
- larrow :: SDoc
- lambda :: SDoc
- keyword :: SDoc -> SDoc
- itsOrTheir :: [a] -> SDoc
- isOrAre :: [a] -> SDoc
- isEmpty :: SDocContext -> SDoc -> Bool
- interppSP :: Outputable a => [a] -> SDoc
- interpp'SP' :: (a -> SDoc) -> [a] -> SDoc
- interpp'SP :: Outputable a => [a] -> SDoc
- integer :: Integer -> SDoc
- intWithCommas :: Integral a => a -> SDoc
- int :: Int -> SDoc
- ifPprDebug :: SDoc -> SDoc -> SDoc
- hsep :: [SDoc] -> SDoc
- hcat :: [SDoc] -> SDoc
- hangNotEmpty :: SDoc -> Int -> SDoc -> SDoc
- hang :: SDoc -> Int -> SDoc -> SDoc
- getPprStyle :: (PprStyle -> SDoc) -> SDoc
- getPprDebug :: (Bool -> SDoc) -> SDoc
- ftext :: FastString -> SDoc
- fsep :: [SDoc] -> SDoc
- forAllLit :: SDoc
- float :: Float -> SDoc
- fcat :: [SDoc] -> SDoc
- equals :: SDoc
- empty :: SDoc
- dumpStyle :: PprStyle -> Bool
- doubleQuotes :: SDoc -> SDoc
- doublePrec :: Int -> Double -> SDoc
- double :: Double -> SDoc
- dot :: SDoc
- docToSDoc :: Doc -> SDoc
- doOrDoes :: [a] -> SDoc
- defaultUserStyle :: PprStyle
- defaultSDocContext :: SDocContext
- defaultErrStyle :: PprStyle
- defaultDumpStyle :: PprStyle
- dcolon :: SDoc
- darrow :: SDoc
- cparen :: Bool -> SDoc -> SDoc
- comma :: SDoc
- coloured :: PprColour -> SDoc -> SDoc
- colon :: SDoc
- codeStyle :: PprStyle -> Bool
- cmdlineParserStyle :: PprStyle
- char :: Char -> SDoc
- cat :: [SDoc] -> SDoc
- bullet :: SDoc
- bufLeftRenderSDoc :: SDocContext -> BufHandle -> SDoc -> IO ()
- brackets :: SDoc -> SDoc
- braces :: SDoc -> SDoc
- blankLine :: SDoc
- asmStyle :: PprStyle -> Bool
- arrowtt :: SDoc
- arrowt :: SDoc
- arrow :: SDoc
- angleBrackets :: SDoc -> SDoc
- alwaysQualifyPackages :: QueryQualifyPackage
- alwaysQualifyNames :: QueryQualifyName
- alwaysQualifyModules :: QueryQualifyModule
- alwaysQualify :: PrintUnqualified
- (<>) :: SDoc -> SDoc -> SDoc
- (<+>) :: SDoc -> SDoc -> SDoc
- ($+$) :: SDoc -> SDoc -> SDoc
- ($$) :: SDoc -> SDoc -> SDoc
- data OccName
- class HasOccName name where
- occNameString :: OccName -> String
- mkVarOccFS :: FastString -> OccName
- mkRecFldSelOcc :: String -> OccName
- data PtrString = PtrString !(Ptr Word8) !Int
- newtype NonDetFastString = NonDetFastString FastString
- newtype LexicalFastString = LexicalFastString FastString
- data FastZString
- data FastString = FastString {
- uniq :: !Int
- n_chars :: !Int
- fs_sbs :: !ShortByteString
- fs_zenc :: FastZString
- zString :: FastZString -> String
- zEncodeFS :: FastString -> FastZString
- unsafeMkByteString :: String -> ByteString
- unpackPtrString :: PtrString -> String
- unpackFS :: FastString -> String
- uniqueOfFS :: FastString -> Int
- uniqCompareFS :: FastString -> FastString -> Ordering
- unconsFS :: FastString -> Maybe (Char, FastString)
- sLit :: String -> PtrString
- nullFS :: FastString -> Bool
- nilFS :: FastString
- mkPtrString# :: Addr# -> PtrString
- mkPtrString :: String -> PtrString
- mkFastStringShortByteString :: ShortByteString -> FastString
- mkFastStringBytes :: Ptr Word8 -> Int -> FastString
- mkFastStringByteString :: ByteString -> FastString
- mkFastStringByteList :: [Word8] -> FastString
- mkFastString# :: Addr# -> FastString
- mkFastString :: String -> FastString
- lexicalCompareFS :: FastString -> FastString -> Ordering
- lengthPS :: PtrString -> Int
- lengthFZS :: FastZString -> Int
- lengthFS :: FastString -> Int
- isUnderscoreFS :: FastString -> Bool
- headFS :: FastString -> Char
- hPutFZS :: Handle -> FastZString -> IO ()
- hPutFS :: Handle -> FastString -> IO ()
- getFastStringZEncCounter :: IO Int
- getFastStringTable :: IO [[[FastString]]]
- fsLit :: String -> FastString
- fastZStringToByteString :: FastZString -> ByteString
- fastStringToShortByteString :: FastString -> ShortByteString
- fastStringToByteString :: FastString -> ByteString
- consFS :: Char -> FastString -> FastString
- concatFS :: [FastString] -> FastString
- bytesFS :: FastString -> ByteString
- appendFS :: FastString -> FastString -> FastString
- data SDocContext = SDC {
- sdocStyle :: !PprStyle
- sdocColScheme :: !Scheme
- sdocLastColour :: !PprColour
- sdocShouldUseColor :: !Bool
- sdocDefaultDepth :: !Int
- sdocLineLength :: !Int
- sdocCanUseUnicode :: !Bool
- sdocHexWordLiterals :: !Bool
- sdocPprDebug :: !Bool
- sdocPrintUnicodeSyntax :: !Bool
- sdocPrintCaseAsLet :: !Bool
- sdocPrintTypecheckerElaboration :: !Bool
- sdocPrintAxiomIncomps :: !Bool
- sdocPrintExplicitKinds :: !Bool
- sdocPrintExplicitCoercions :: !Bool
- sdocPrintExplicitRuntimeReps :: !Bool
- sdocPrintExplicitForalls :: !Bool
- sdocPrintPotentialInstances :: !Bool
- sdocPrintEqualityRelations :: !Bool
- sdocSuppressTicks :: !Bool
- sdocSuppressTypeSignatures :: !Bool
- sdocSuppressTypeApplications :: !Bool
- sdocSuppressIdInfo :: !Bool
- sdocSuppressCoercions :: !Bool
- sdocSuppressUnfoldings :: !Bool
- sdocSuppressVarKinds :: !Bool
- sdocSuppressUniques :: !Bool
- sdocSuppressModulePrefixes :: !Bool
- sdocSuppressStgExts :: !Bool
- sdocErrorSpans :: !Bool
- sdocStarIsType :: !Bool
- sdocLinearTypes :: !Bool
- sdocImpredicativeTypes :: !Bool
- sdocPrintTypeAbbreviations :: !Bool
- sdocUnitIdForUser :: !(FastString -> SDoc)
- data SDoc
- data PprStyle
- = PprUser PrintUnqualified Depth Coloured
- | PprDump PrintUnqualified
- | PprCode LabelStyle
- text :: String -> SDoc
- zipWithAndUnzipM :: Monad m => (a -> b -> m (c, d)) -> [a] -> [b] -> m ([c], [d])
- zipWith4M :: Monad m => (a -> b -> c -> d -> m e) -> [a] -> [b] -> [c] -> [d] -> m [e]
- zipWith3M_ :: Monad m => (a -> b -> c -> m d) -> [a] -> [b] -> [c] -> m ()
- zipWith3M :: Monad m => (a -> b -> c -> m d) -> [a] -> [b] -> [c] -> m [d]
- whenM :: Monad m => m Bool -> m () -> m ()
- unlessM :: Monad m => m Bool -> m () -> m ()
- orM :: Monad m => m Bool -> m Bool -> m Bool
- maybeMapM :: Monad m => (a -> m b) -> Maybe a -> m (Maybe b)
- mapSndM :: Monad m => (b -> m c) -> [(a, b)] -> m [(a, c)]
- mapMaybeM :: Applicative m => (a -> m (Maybe b)) -> [a] -> m [b]
- mapAndUnzip5M :: Monad m => (a -> m (b, c, d, e, f)) -> [a] -> m ([b], [c], [d], [e], [f])
- mapAndUnzip4M :: Monad m => (a -> m (b, c, d, e)) -> [a] -> m ([b], [c], [d], [e])
- mapAndUnzip3M :: Monad m => (a -> m (b, c, d)) -> [a] -> m ([b], [c], [d])
- mapAccumLM :: Monad m => (acc -> x -> m (acc, y)) -> acc -> [x] -> m (acc, [y])
- liftSndM :: Monad m => (a -> b) -> m (r, a) -> m (r, b)
- liftFstM :: Monad m => (a -> b) -> m (a, r) -> m (b, r)
- foldlM_ :: (Monad m, Foldable t) => (a -> b -> m a) -> a -> t b -> m ()
- fmapMaybeM :: Monad m => (a -> m b) -> Maybe a -> m (Maybe b)
- fmapEitherM :: Monad m => (a -> m b) -> (c -> m d) -> Either a c -> m (Either b d)
- filterOutM :: Applicative m => (a -> m Bool) -> [a] -> m [a]
- concatMapM :: Monad m => (a -> m [b]) -> [a] -> m [b]
- anyM :: Monad m => (a -> m Bool) -> [a] -> m Bool
- allM :: Monad m => (a -> m Bool) -> [a] -> m Bool
- data ModuleName
- data StaticPlugin = StaticPlugin {}
- data LoadedPlugin = LoadedPlugin {}
- data ForeignSrcLang
- liftedRepName :: Name
- type LexicalFastString' = LexicalFastString
- mkLexicalFastString :: FastString -> LexicalFastString'
- fromLexicalFastString :: LexicalFastString' -> FastString
- collectHsBindBinders' :: HsBindLR GhcRn idR -> [Name]
- collectPatBinders' :: LPat GhcRn -> [Name]
- noLocA' :: a -> LocatedAn an a
- locA' :: SrcSpanAnn' ann -> SrcSpan
- mkWildValBinder' :: Type -> Id
- pattern HsLet' :: XLet GhcRn -> Located (HsLocalBinds GhcRn) -> LHsExpr GhcRn -> HsExpr GhcRn
- pattern LetStmt' :: XLetStmt GhcRn GhcRn body -> Located (HsLocalBinds GhcRn) -> StmtLR GhcRn GhcRn body
- pattern ExplicitList' :: XExplicitList p -> [LHsExpr p] -> HsExpr p
- pattern BindStmt' :: XBindStmt GhcRn GhcRn body -> LPat GhcRn -> body -> SyntaxExpr GhcRn -> SyntaxExpr GhcRn -> Stmt GhcRn body
Documentation
class Monad m => MonadFix (m :: Type -> Type) where #
Monads having fixed points with a 'knot-tying' semantics.
Instances of MonadFix
should satisfy the following laws:
- Purity
mfix
(return
. h) =return
(fix
h)- Left shrinking (or Tightening)
mfix
(\x -> a >>= \y -> f x y) = a >>= \y ->mfix
(\x -> f x y)- Sliding
, for strictmfix
(liftM
h . f) =liftM
h (mfix
(f . h))h
.- Nesting
mfix
(\x ->mfix
(\y -> f x y)) =mfix
(\x -> f x x)
This class is used in the translation of the recursive do
notation
supported by GHC and Hugs.
Methods
Instances
class Functor f => Applicative (f :: Type -> Type) where #
A functor with application, providing operations to
A minimal complete definition must include implementations of pure
and of either <*>
or liftA2
. If it defines both, then they must behave
the same as their default definitions:
(<*>
) =liftA2
id
liftA2
f x y = f<$>
x<*>
y
Further, any definition must satisfy the following:
- Identity
pure
id
<*>
v = v- Composition
pure
(.)<*>
u<*>
v<*>
w = u<*>
(v<*>
w)- Homomorphism
pure
f<*>
pure
x =pure
(f x)- Interchange
u
<*>
pure
y =pure
($
y)<*>
u
The other methods have the following default definitions, which may be overridden with equivalent specialized implementations:
As a consequence of these laws, the Functor
instance for f
will satisfy
It may be useful to note that supposing
forall x y. p (q x y) = f x . g y
it follows from the above that
liftA2
p (liftA2
q u v) =liftA2
f u .liftA2
g v
If f
is also a Monad
, it should satisfy
(which implies that pure
and <*>
satisfy the applicative functor laws).
Methods
Lift a value.
(<*>) :: f (a -> b) -> f a -> f b infixl 4 #
Sequential application.
A few functors support an implementation of <*>
that is more
efficient than the default one.
Example
Used in combination with (
, <$>
)(
can be used to build a record.<*>
)
>>>
data MyState = MyState {arg1 :: Foo, arg2 :: Bar, arg3 :: Baz}
>>>
produceFoo :: Applicative f => f Foo
>>>
produceBar :: Applicative f => f Bar
>>>
produceBaz :: Applicative f => f Baz
>>>
mkState :: Applicative f => f MyState
>>>
mkState = MyState <$> produceFoo <*> produceBar <*> produceBaz
liftA2 :: (a -> b -> c) -> f a -> f b -> f c #
Lift a binary function to actions.
Some functors support an implementation of liftA2
that is more
efficient than the default one. In particular, if fmap
is an
expensive operation, it is likely better to use liftA2
than to
fmap
over the structure and then use <*>
.
This became a typeclass method in 4.10.0.0. Prior to that, it was
a function defined in terms of <*>
and fmap
.
Example
>>>
liftA2 (,) (Just 3) (Just 5)
Just (3,5)
(*>) :: f a -> f b -> f b infixl 4 #
Sequence actions, discarding the value of the first argument.
Examples
If used in conjunction with the Applicative instance for Maybe
,
you can chain Maybe computations, with a possible "early return"
in case of Nothing
.
>>>
Just 2 *> Just 3
Just 3
>>>
Nothing *> Just 3
Nothing
Of course a more interesting use case would be to have effectful computations instead of just returning pure values.
>>>
import Data.Char
>>>
import Text.ParserCombinators.ReadP
>>>
let p = string "my name is " *> munch1 isAlpha <* eof
>>>
readP_to_S p "my name is Simon"
[("Simon","")]
(<*) :: f a -> f b -> f a infixl 4 #
Sequence actions, discarding the value of the second argument.
Instances
Applicative ZipList | f <$> ZipList xs1 <*> ... <*> ZipList xsN = ZipList (zipWithN f xs1 ... xsN) where (\a b c -> stimes c [a, b]) <$> ZipList "abcd" <*> ZipList "567" <*> ZipList [1..] = ZipList (zipWith3 (\a b c -> stimes c [a, b]) "abcd" "567" [1..]) = ZipList {getZipList = ["a5","b6b6","c7c7c7"]} Since: base-2.1 |
Applicative Identity | Since: base-4.8.0.0 |
Applicative First | Since: base-4.8.0.0 |
Applicative Last | Since: base-4.8.0.0 |
Applicative Down | Since: base-4.11.0.0 |
Applicative Dual | Since: base-4.8.0.0 |
Applicative Product | Since: base-4.8.0.0 |
Applicative Sum | Since: base-4.8.0.0 |
Applicative Par1 | Since: base-4.9.0.0 |
Applicative P | Since: base-4.5.0.0 |
Applicative ReadP | Since: base-4.6.0.0 |
Applicative NormM | |
Applicative UM | |
Applicative UnifyResultM | |
Defined in GHC.Core.Unify Methods pure :: a -> UnifyResultM a # (<*>) :: UnifyResultM (a -> b) -> UnifyResultM a -> UnifyResultM b # liftA2 :: (a -> b -> c) -> UnifyResultM a -> UnifyResultM b -> UnifyResultM c # (*>) :: UnifyResultM a -> UnifyResultM b -> UnifyResultM b # (<*) :: UnifyResultM a -> UnifyResultM b -> UnifyResultM a # | |
Applicative Pair | |
Applicative Hsc | |
Applicative PV | |
Applicative TcPluginM | |
Applicative UniqSM | |
Applicative IO | Since: base-2.1 |
Applicative NonEmpty | Since: base-4.9.0.0 |
Applicative Maybe | Since: base-2.1 |
Applicative Solo | Since: base-4.15 |
Applicative [] | Since: base-2.1 |
Monad m => Applicative (WrappedMonad m) | Since: base-2.1 |
Defined in Control.Applicative Methods pure :: a -> WrappedMonad m a # (<*>) :: WrappedMonad m (a -> b) -> WrappedMonad m a -> WrappedMonad m b # liftA2 :: (a -> b -> c) -> WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m c # (*>) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m b # (<*) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m a # | |
Arrow a => Applicative (ArrowMonad a) | Since: base-4.6.0.0 |
Defined in Control.Arrow Methods pure :: a0 -> ArrowMonad a a0 # (<*>) :: ArrowMonad a (a0 -> b) -> ArrowMonad a a0 -> ArrowMonad a b # liftA2 :: (a0 -> b -> c) -> ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a c # (*>) :: ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a b # (<*) :: ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a a0 # | |
Applicative (Either e) | Since: base-3.0 |
Applicative (Proxy :: Type -> Type) | Since: base-4.7.0.0 |
Applicative (U1 :: Type -> Type) | Since: base-4.9.0.0 |
Applicative (SetM s) | |
Applicative (IOEnv m) | |
Applicative (MaybeErr err) | |
Defined in GHC.Data.Maybe | |
Applicative m => Applicative (InputT m) | |
(Functor m, Monad m) => Applicative (MaybeT m) | |
Monoid a => Applicative ((,) a) | For tuples, the ("hello ", (+15)) <*> ("world!", 2002) ("hello world!",2017) Since: base-2.1 |
Arrow a => Applicative (WrappedArrow a b) | Since: base-2.1 |
Defined in Control.Applicative Methods pure :: a0 -> WrappedArrow a b a0 # (<*>) :: WrappedArrow a b (a0 -> b0) -> WrappedArrow a b a0 -> WrappedArrow a b b0 # liftA2 :: (a0 -> b0 -> c) -> WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b c # (*>) :: WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b b0 # (<*) :: WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b a0 # | |
Applicative m => Applicative (Kleisli m a) | Since: base-4.14.0.0 |
Defined in Control.Arrow | |
Applicative f => Applicative (Ap f) | Since: base-4.12.0.0 |
Applicative f => Applicative (Alt f) | Since: base-4.8.0.0 |
Applicative f => Applicative (Rec1 f) | Since: base-4.9.0.0 |
(Functor m, Monad m) => Applicative (ErrorT e m) | |
Defined in Control.Monad.Trans.Error | |
Applicative m => Applicative (ReaderT r m) | |
Defined in Control.Monad.Trans.Reader | |
(Functor m, Monad m) => Applicative (WriterT w m) | |
Defined in Control.Monad.Trans.Writer.CPS | |
(Monoid a, Monoid b) => Applicative ((,,) a b) | Since: base-4.14.0.0 |
(Applicative f, Applicative g) => Applicative (f :*: g) | Since: base-4.9.0.0 |
Monoid c => Applicative (K1 i c :: Type -> Type) | Since: base-4.12.0.0 |
(Applicative f, Monad f) => Applicative (WhenMissing f k x) | Equivalent to Since: containers-0.5.9 |
Defined in Data.Map.Internal Methods pure :: a -> WhenMissing f k x a # (<*>) :: WhenMissing f k x (a -> b) -> WhenMissing f k x a -> WhenMissing f k x b # liftA2 :: (a -> b -> c) -> WhenMissing f k x a -> WhenMissing f k x b -> WhenMissing f k x c # (*>) :: WhenMissing f k x a -> WhenMissing f k x b -> WhenMissing f k x b # (<*) :: WhenMissing f k x a -> WhenMissing f k x b -> WhenMissing f k x a # | |
(Monoid a, Monoid b, Monoid c) => Applicative ((,,,) a b c) | Since: base-4.14.0.0 |
Defined in GHC.Base | |
Applicative ((->) r) | Since: base-2.1 |
(Applicative f, Applicative g) => Applicative (f :.: g) | Since: base-4.9.0.0 |
Applicative f => Applicative (M1 i c f) | Since: base-4.9.0.0 |
(Monad f, Applicative f) => Applicative (WhenMatched f k x y) | Equivalent to Since: containers-0.5.9 |
Defined in Data.Map.Internal Methods pure :: a -> WhenMatched f k x y a # (<*>) :: WhenMatched f k x y (a -> b) -> WhenMatched f k x y a -> WhenMatched f k x y b # liftA2 :: (a -> b -> c) -> WhenMatched f k x y a -> WhenMatched f k x y b -> WhenMatched f k x y c # (*>) :: WhenMatched f k x y a -> WhenMatched f k x y b -> WhenMatched f k x y b # (<*) :: WhenMatched f k x y a -> WhenMatched f k x y b -> WhenMatched f k x y a # |
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 |
class Monad m => MonadIO (m :: Type -> Type) where #
Monads in which IO
computations may be embedded.
Any monad built by applying a sequence of monad transformers to the
IO
monad will be an instance of this class.
Instances should satisfy the following laws, which state that liftIO
is a transformer of monads:
Methods
Lift a computation from the IO
monad.
This allows us to run IO computations in any monadic stack, so long as it supports these kinds of operations
(i.e. IO
is the base monad for the stack).
Example
import Control.Monad.Trans.State -- from the "transformers" library printState :: Show s => StateT s IO () printState = do state <- get liftIO $ print state
Had we omitted
, we would have ended up with this error:liftIO
• Couldn't match type ‘IO’ with ‘StateT s IO’ Expected type: StateT s IO () Actual type: IO ()
The important part here is the mismatch between StateT s IO ()
and
.IO
()
Luckily, we know of a function that takes an
and returns an IO
a(m a)
:
,
enabling us to run the program and see the expected results:liftIO
> evalStateT printState "hello" "hello" > evalStateT printState 3 3
Instances
MonadIO Hsc | |
Defined in GHC.Driver.Env.Types | |
MonadIO IO | Since: base-4.9.0.0 |
Defined in Control.Monad.IO.Class | |
MonadIO (IOEnv env) | |
Defined in GHC.Data.IOEnv | |
MonadIO m => MonadIO (InputT m) | |
Defined in System.Console.Haskeline.InputT | |
MonadIO m => MonadIO (MaybeT m) | |
Defined in Control.Monad.Trans.Maybe | |
(Error e, MonadIO m) => MonadIO (ErrorT e m) | |
Defined in Control.Monad.Trans.Error | |
MonadIO m => MonadIO (ReaderT r m) | |
Defined in Control.Monad.Trans.Reader | |
MonadIO m => MonadIO (WriterT w m) | |
Defined in Control.Monad.Trans.Writer.CPS |
mapAndUnzipM :: Applicative m => (a -> m (b, c)) -> [a] -> m ([b], [c]) #
The mapAndUnzipM
function maps its first argument over a list, returning
the result as a pair of lists. This function is mainly used with complicated
data structures or a state monad.
A mutable variable in the IO
monad
Instances
Eq (IORef a) | Pointer equality. Since: base-4.0.0.0 |
(MonadIO m, MonadMask m) => CommandMonad (InputCmdT m) | |
Defined in System.Console.Haskeline.InputT Methods runCompletion :: (String, String) -> InputCmdT m (String, [Completion]) |
foldrM :: (Foldable t, Monad m) => (a -> b -> m b) -> b -> t a -> m b #
Right-to-left monadic fold over the elements of a structure.
Given a structure t
with elements (a, b, c, ..., x, y)
, the result of
a fold with an operator function f
is equivalent to:
foldrM f z t = do yy <- f y z xx <- f x yy ... bb <- f b cc aa <- f a bb return aa -- Just @return z@ when the structure is empty
For a Monad m
, given two functions f1 :: a -> m b
and f2 :: b -> m c
,
their Kleisli composition (f1 >=> f2) :: a -> m c
is defined by:
(f1 >=> f2) a = f1 a >>= f2
Another way of thinking about foldrM
is that it amounts to an application
to z
of a Kleisli composition:
foldrM f z t = f y >=> f x >=> ... >=> f b >=> f a $ z
The monadic effects of foldrM
are sequenced from right to left, and e.g.
folds of infinite lists will diverge.
If at some step the bind operator (
short-circuits (as with, e.g.,
>>=
)mzero
in a MonadPlus
), the evaluated effects will be from a tail of the
element sequence. If you want to evaluate the monadic effects in
left-to-right order, or perhaps be able to short-circuit after an initial
sequence of elements, you'll need to use foldlM
instead.
If the monadic effects don't short-circuit, the outermost application of
f
is to the leftmost element a
, so that, ignoring effects, the result
looks like a right fold:
a `f` (b `f` (c `f` (... (x `f` (y `f` z))))).
Examples
Basic usage:
>>>
let f i acc = do { print i ; return $ i : acc }
>>>
foldrM f [] [0..3]
3 2 1 0 [0,1,2,3]
foldlM :: (Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m b #
Left-to-right monadic fold over the elements of a structure.
Given a structure t
with elements (a, b, ..., w, x, y)
, the result of
a fold with an operator function f
is equivalent to:
foldlM f z t = do aa <- f z a bb <- f aa b ... xx <- f ww x yy <- f xx y return yy -- Just @return z@ when the structure is empty
For a Monad m
, given two functions f1 :: a -> m b
and f2 :: b -> m c
,
their Kleisli composition (f1 >=> f2) :: a -> m c
is defined by:
(f1 >=> f2) a = f1 a >>= f2
Another way of thinking about foldlM
is that it amounts to an application
to z
of a Kleisli composition:
foldlM f z t = flip f a >=> flip f b >=> ... >=> flip f x >=> flip f y $ z
The monadic effects of foldlM
are sequenced from left to right.
If at some step the bind operator (
short-circuits (as with, e.g.,
>>=
)mzero
in a MonadPlus
), the evaluated effects will be from an initial
segment of the element sequence. If you want to evaluate the monadic
effects in right-to-left order, or perhaps be able to short-circuit after
processing a tail of the sequence of elements, you'll need to use foldrM
instead.
If the monadic effects don't short-circuit, the outermost application of
f
is to the rightmost element y
, so that, ignoring effects, the result
looks like a left fold:
((((z `f` a) `f` b) ... `f` w) `f` x) `f` y
Examples
Basic usage:
>>>
let f a e = do { print e ; return $ e : a }
>>>
foldlM f [] [0..3]
0 1 2 3 [3,2,1,0]
(<$>) :: Functor f => (a -> b) -> f a -> f b infixl 4 #
An infix synonym for fmap
.
The name of this operator is an allusion to $
.
Note the similarities between their types:
($) :: (a -> b) -> a -> b (<$>) :: Functor f => (a -> b) -> f a -> f b
Whereas $
is function application, <$>
is function
application lifted over a Functor
.
Examples
Convert from a
to a Maybe
Int
using Maybe
String
show
:
>>>
show <$> Nothing
Nothing>>>
show <$> Just 3
Just "3"
Convert from an
to an
Either
Int
Int
Either
Int
String
using show
:
>>>
show <$> Left 17
Left 17>>>
show <$> Right 17
Right "17"
Double each element of a list:
>>>
(*2) <$> [1,2,3]
[2,4,6]
Apply even
to the second element of a pair:
>>>
even <$> (2,2)
(2,True)
pprTypeForUser :: Type -> SDoc #
pprTyThingLoc :: TyThing -> SDoc #
Pretty-prints a TyThing
with its defining location.
pprTyThingInContextLoc :: TyThing -> SDoc #
Like pprTyThingInContext
, but adds the defining location.
pprTyThingInContext :: ShowSub -> TyThing -> SDoc #
Pretty-prints a TyThing
in context: that is, if the entity
is a data constructor, record selector, or class method, then
the entity's parent declaration is pretty-printed with irrelevant
parts omitted.
pprTyThingHdr :: TyThing -> SDoc #
Pretty-prints the TyThing
header. For functions and data constructors
the function is equivalent to pprTyThing
but for type constructors
and classes it prints only the header part of the declaration.
pprFamInst :: FamInst -> SDoc #
Pretty-prints a FamInst
(type/data family instance) with its defining location.
rnValBindsRHS :: HsSigCtxt -> HsValBindsLR GhcRn GhcPs -> RnM (HsValBinds GhcRn, DefUses) #
rnTopBindsLHS :: MiniFixityEnv -> HsValBinds GhcPs -> RnM (HsValBindsLR GhcRn GhcPs) #
rnTopBindsBoot :: NameSet -> HsValBindsLR GhcRn GhcPs -> RnM (HsValBinds GhcRn, DefUses) #
rnMethodBinds :: Bool -> Name -> [Name] -> LHsBinds GhcPs -> [LSig GhcPs] -> RnM (LHsBinds GhcRn, [LSig GhcRn], FreeVars) #
rnMatchGroup :: (Outputable (body GhcPs), AnnoBody body) => HsMatchContext GhcRn -> (LocatedA (body GhcPs) -> RnM (LocatedA (body GhcRn), FreeVars)) -> MatchGroup GhcPs (LocatedA (body GhcPs)) -> RnM (MatchGroup GhcRn (LocatedA (body GhcRn)), FreeVars) #
rnLocalValBindsRHS :: NameSet -> HsValBindsLR GhcRn GhcPs -> RnM (HsValBinds GhcRn, DefUses) #
rnLocalValBindsLHS :: MiniFixityEnv -> HsValBinds GhcPs -> RnM ([Name], HsValBindsLR GhcRn GhcPs) #
rnLocalBindsAndThen :: HsLocalBinds GhcPs -> (HsLocalBinds GhcRn -> FreeVars -> RnM (result, FreeVars)) -> RnM (result, FreeVars) #
rnGRHSs :: AnnoBody body => HsMatchContext GhcRn -> (LocatedA (body GhcPs) -> RnM (LocatedA (body GhcRn), FreeVars)) -> GRHSs GhcPs (LocatedA (body GhcPs)) -> RnM (GRHSs GhcRn (LocatedA (body GhcRn)), FreeVars) #
rnGRHS :: AnnoBody body => HsMatchContext GhcRn -> (LocatedA (body GhcPs) -> RnM (LocatedA (body GhcRn), FreeVars)) -> LGRHS GhcPs (LocatedA (body GhcPs)) -> RnM (LGRHS GhcRn (LocatedA (body GhcRn)), FreeVars) #
makeMiniFixityEnv :: [LFixitySig GhcPs] -> RnM MiniFixityEnv #
Constructors
TopSigCtxt NameSet | |
LocalBindCtxt NameSet | |
ClsDeclCtxt Name | |
InstDeclCtxt NameSet | |
HsBootCtxt NameSet | |
RoleAnnotCtxt NameSet |
Instances
Outputable HsSigCtxt | |
Defined in GHC.Rename.Env |
type MiniFixityEnv = FastStringEnv (Located Fixity) #
data PluginWithArgs #
Constructors
PluginWithArgs | |
Fields
|
data PluginRecompile #
Constructors
ForceRecompile | |
NoForceRecompile | |
MaybeRecompile Fingerprint |
Instances
Monoid PluginRecompile | |
Defined in GHC.Driver.Plugins Methods mappend :: PluginRecompile -> PluginRecompile -> PluginRecompile # mconcat :: [PluginRecompile] -> PluginRecompile # | |
Semigroup PluginRecompile | |
Defined in GHC.Driver.Plugins Methods (<>) :: PluginRecompile -> PluginRecompile -> PluginRecompile # sconcat :: NonEmpty PluginRecompile -> PluginRecompile # stimes :: Integral b => b -> PluginRecompile -> PluginRecompile # | |
Outputable PluginRecompile | |
Defined in GHC.Driver.Plugins Methods ppr :: PluginRecompile -> SDoc # |
type CorePlugin = [CommandLineOption] -> [CoreToDo] -> CoreM [CoreToDo] #
type CommandLineOption = String #
Command line options gathered from the -PModule.Name:stuff syntax are given to you as this type
withPlugins_ :: Monad m => HscEnv -> ConstPluginOperation m a -> a -> m () #
Perform a constant operation by using all of the plugins in turn.
withPlugins :: Monad m => HscEnv -> PluginOperation m a -> a -> m a #
Perform an operation by using all of the plugins in turn.
purePlugin :: [CommandLineOption] -> IO PluginRecompile #
plugins :: HscEnv -> [PluginWithArgs] #
mapPlugins :: HscEnv -> (Plugin -> [CommandLineOption] -> a) -> [a] #
lpModuleName :: LoadedPlugin -> ModuleName #
keepRenamedSource :: [CommandLineOption] -> TcGblEnv -> HsGroup GhcRn -> TcM (TcGblEnv, HsGroup GhcRn) #
A renamer plugin which mades the renamed source available in a typechecker plugin.
impurePlugin :: [CommandLineOption] -> IO PluginRecompile #
flagRecompile :: [CommandLineOption] -> IO PluginRecompile #
defaultPlugin :: Plugin #
Default plugin: does nothing at all, except for marking that safe
inference has failed unless -fplugin-trustworthy
is passed. For
compatibility reason you should base all your plugin definitions on this
default value.
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.
newtype NameCacheUpdater #
A function that atomically updates the name cache given a modifier function. The second result of the modifier function will be the result of the IO action.
Constructors
NCU | |
Fields
|
tcIfaceTyVar :: FastString -> IfL TyVar #
tcIfaceLclId :: FastString -> IfL Id #
newIfaceNames :: [OccName] -> IfL [Name] #
newIfaceName :: OccName -> IfL Name #
lookupIfaceTyVar :: IfaceTvBndr -> IfL (Maybe TyVar) #
lookupIfaceTop :: OccName -> IfL Name #
Look up a top-level name from the current Iface module
ifaceExportNames :: [IfaceExport] -> TcRnIf gbl lcl [AvailInfo] #
extendIfaceTyVarEnv :: [TyVar] -> IfL a -> IfL a #
extendIfaceIdEnv :: [Id] -> IfL a -> IfL a #
extendIfaceEnvs :: [TyCoVar] -> IfL a -> IfL a #
data IsExtraConstraint #
Constructors
YesExtraConstraint | |
NoExtraConstraint |
Instances
Outputable IsExtraConstraint | |
Defined in GHC.Tc.Utils.Monad Methods ppr :: IsExtraConstraint -> SDoc # |
writeTcRef :: TcRef a -> a -> TcRnIf gbl lcl () #
wrapLocMA_ :: (a -> TcM ()) -> LocatedA a -> TcM () #
wrapLocMA :: (a -> TcM b) -> GenLocated (SrcSpanAnn' ann) a -> TcRn (GenLocated (SrcSpanAnn' ann) b) #
woptM :: WarningFlag -> TcRnIf gbl lcl Bool #
withoutDynamicNow :: TcRnIf gbl lcl a -> TcRnIf gbl lcl a #
withException :: TcRnIf gbl lcl (MaybeErr SDoc a) -> TcRnIf gbl lcl a #
A convenient wrapper for taking a MaybeErr SDoc a
and throwing
an exception if it is an error.
withDynamicNow :: TcRnIf gbl lcl a -> TcRnIf gbl lcl a #
whenWOptM :: WarningFlag -> TcRnIf gbl lcl () -> TcRnIf gbl lcl () #
whenNoErrs :: TcM () -> TcM () #
whenGOptM :: GeneralFlag -> TcRnIf gbl lcl () -> TcRnIf gbl lcl () #
warnTcM :: WarnReason -> Bool -> (TidyEnv, SDoc) -> TcM () #
Display a warning if a condition is met.
warnIfFlag :: WarningFlag -> Bool -> SDoc -> TcRn () #
Display a warning if a condition is met, and the warning is enabled
updateEps_ :: (ExternalPackageState -> ExternalPackageState) -> TcRnIf gbl lcl () #
Update the external package state.
This is an atomic operation and forces evaluation of the modified EPS in order to avoid space leaks.
updateEps :: (ExternalPackageState -> (ExternalPackageState, a)) -> TcRnIf gbl lcl a #
Update the external package state. Returns the second result of the modifier function.
This is an atomic operation and forces evaluation of the modified EPS in order to avoid space leaks.
unsetXOptM :: Extension -> TcRnIf gbl lcl a -> TcRnIf gbl lcl a #
unsetWOptM :: WarningFlag -> TcRnIf gbl lcl a -> TcRnIf gbl lcl a #
unsetGOptM :: GeneralFlag -> TcRnIf gbl lcl a -> TcRnIf gbl lcl a #
unlessXOptM :: Extension -> TcRnIf gbl lcl () -> TcRnIf gbl lcl () #
tryTcDiscardingErrs :: TcM r -> TcM r -> TcM r #
tryCaptureConstraints :: TcM a -> TcM (Maybe a, WantedConstraints) #
traceTcConstraints :: String -> TcM () #
traceOptTcRn :: DumpFlag -> SDoc -> TcRn () #
traceOptIf :: DumpFlag -> SDoc -> TcRnIf m n () #
traceHiDiffs :: SDoc -> TcRnIf m n () #
tcScalingUsage :: Mult -> TcM a -> TcM a #
tcScalingUsage mult thing_inside
runs thing_inside
and scales all the
usage information by mult
.
tcIsHsBootOrSig :: TcRn Bool #
tcEmitBindingUsage :: UsageEnv -> TcM () #
tcCollectingUsage :: TcM a -> TcM (UsageEnv, a) #
tcCollectingUsage thing_inside
runs thing_inside
and returns the usage
information which was collected as part of the execution of
thing_inside
. Careful: tcCollectingUsage thing_inside
itself does not
report any usage information, it's up to the caller to incorporate the
returned usage information into the larger context appropriately.
setTcLevel :: TcLevel -> TcM a -> TcM a #
setTcEvBindsMap :: EvBindsVar -> EvBindMap -> TcM () #
setSrcSpanA :: SrcSpanAnn' ann -> TcRn a -> TcRn a #
setSrcSpan :: SrcSpan -> TcRn a -> TcRn a #
setLocalRdrEnv :: LocalRdrEnv -> RnM a -> RnM a #
setLclTypeEnv :: TcLclEnv -> TcM a -> TcM a #
setImplicitEnvM :: TypeEnv -> IfL a -> IfL a #
setErrsVar :: TcRef (Messages DecoratedSDoc) -> TcRn a -> TcRn a #
setErrCtxt :: [ErrCtxt] -> TcM a -> TcM a #
setConstraintVar :: TcRef WantedConstraints -> TcM a -> TcM a #
reportWarning :: WarnReason -> MsgEnvelope DecoratedSDoc -> TcRn () #
reportErrors :: [MsgEnvelope DecoratedSDoc] -> TcM () #
reportError :: MsgEnvelope DecoratedSDoc -> TcRn () #
recordUnsafeInfer :: WarningMessages -> TcM () #
Mark that safe inference has failed See Note [Safe Haskell Overlapping Instances Implementation] although this is used for more than just that failure case.
recordThUse :: TcM () #
recordThSpliceUse :: TcM () #
pushTcLevelM_ :: TcM a -> TcM a #
pushTcLevelM :: TcM a -> TcM (TcLevel, a) #
pushLevelAndCaptureConstraints :: TcM a -> TcM (TcLevel, WantedConstraints, a) #
The name says it all. The returned TcLevel is the *inner* TcLevel.
printForUserTcRn :: SDoc -> TcRn () #
Like logInfoTcRn, but for user consumption
popErrCtxt :: TcM a -> TcM a #
newUniqueSupply :: TcRnIf gbl lcl UniqSupply #
newSysName :: OccName -> TcRnIf gbl lcl Name #
newSysLocalIds :: FastString -> [Scaled TcType] -> TcRnIf gbl lcl [TcId] #
newSysLocalId :: FastString -> Mult -> TcType -> TcRnIf gbl lcl TcId #
newNoTcEvBinds :: TcM EvBindsVar #
Creates an EvBindsVar incapable of holding any bindings. It still tracks covar usages (see comments on ebv_tcvs in GHC.Tc.Types.Evidence), thus must be made monadically
newArrowScope :: TcM a -> TcM a #
mkLongErrAt :: SrcSpan -> SDoc -> SDoc -> TcRn (MsgEnvelope DecoratedSDoc) #
mkIfLclEnv :: Module -> SDoc -> IsBootInterface -> IfLclEnv #
Arguments
:: SrcSpan | |
-> SDoc | The important part of the message |
-> SDoc | The context of the message |
-> SDoc | Any supplementary information. |
-> TcRn (MsgEnvelope DecoratedSDoc) |
mapAndReportM :: (a -> TcRn b) -> [a] -> TcRn [b] #
Apply the function to all elements on the input list If all succeed, return the list of results Otherwise fail, propagating all errors
mapAndRecoverM :: (a -> TcRn b) -> [a] -> TcRn [b] #
Drop elements of the input that fail, so the result list can be shorter than the argument list
isTouchableTcM :: TcTyVar -> TcM Bool #
initTcWithGbl :: HscEnv -> TcGblEnv -> RealSrcSpan -> TcM r -> IO (Messages DecoratedSDoc, Maybe r) #
Run a TcM
action in the context of an existing GblEnv
.
initTcInteractive :: HscEnv -> TcM a -> IO (Messages DecoratedSDoc, Maybe a) #
initTc :: HscEnv -> HscSource -> Bool -> Module -> RealSrcSpan -> TcM r -> IO (Messages DecoratedSDoc, Maybe r) #
Setup the initial typechecking environment
initIfaceTcRn :: IfG a -> TcRn a #
initIfaceLoad :: HscEnv -> IfG a -> IO a #
initIfaceLclWithSubst :: Module -> SDoc -> IsBootInterface -> NameShape -> IfL a -> IfM lcl a #
initIfaceLcl :: Module -> SDoc -> IsBootInterface -> IfL a -> IfM lcl a #
inGeneratedCode :: TcRn Bool #
goptM :: GeneralFlag -> TcRnIf gbl lcl Bool #
getTcLevel :: TcM TcLevel #
getTcEvTyCoVars :: EvBindsVar -> TcM TyCoVarSet #
getTcEvBindsMap :: EvBindsVar -> TcM EvBindMap #
getStageAndBindLevel :: Name -> TcRn (Maybe (TopLevelFlag, ThLevel, ThStage)) #
getSrcSpanM :: TcRn SrcSpan #
getRdrEnvs :: TcRn (GlobalRdrEnv, LocalRdrEnv) #
getIfModule :: IfL Module #
getHpt :: TcRnIf gbl lcl HomePackageTable #
getGhcMode :: TcRnIf gbl lcl GhcMode #
getGHCiMonad :: TcRn Name #
getErrsVar :: TcRn (TcRef (Messages DecoratedSDoc)) #
getErrCtxt :: TcM [ErrCtxt] #
getEpsVar :: TcRnIf gbl lcl (TcRef ExternalPackageState) #
getEpsAndHpt :: TcRnIf gbl lcl (ExternalPackageState, HomePackageTable) #
getEps :: TcRnIf gbl lcl ExternalPackageState #
getDeclaredDefaultTys :: TcRn (Maybe [Type]) #
getCCIndexTcM :: FastString -> TcM CostCentreIndex #
See getCCIndexM
.
getCCIndexM :: (gbl -> TcRef CostCentreState) -> FastString -> TcRnIf gbl lcl CostCentreIndex #
Get the next cost centre index associated with a given name.
forkM_maybe :: SDoc -> IfL a -> IfL (Maybe a) #
Run thing_inside in an interleaved thread. It shares everything with the parent thread, so this is DANGEROUS.
It returns Nothing if the computation fails
It's used for lazily type-checking interface signatures, which is pretty benign.
See Note [Masking exceptions in forkM_maybe]
foldAndRecoverM :: (b -> a -> TcRn b) -> b -> [a] -> TcRn b #
The accumulator is not updated if the action fails
fixSafeInstances :: SafeHaskellMode -> [ClsInst] -> [ClsInst] #
Switch instances to safe instances if we're in Safe mode.
finalSafeMode :: DynFlags -> TcGblEnv -> IO SafeHaskellMode #
Figure out the final correct safe haskell mode
failWithTcM :: (TidyEnv, SDoc) -> TcM a #
failWithTc :: SDoc -> TcM a #
failIfErrsM :: TcRn () #
escapeArrowScope :: TcM a -> TcM a #
emitStaticConstraints :: WantedConstraints -> TcM () #
emitSimples :: Cts -> TcM () #
emitSimple :: Ct -> TcM () #
emitNamedTypeHole :: (Name, TcTyVar) -> TcM () #
emitInsoluble :: Ct -> TcM () #
emitImplications :: Bag Implication -> TcM () #
emitImplication :: Implication -> TcM () #
emitConstraints :: WantedConstraints -> TcM () #
emitAnonTypeHole :: IsExtraConstraint -> TcTyVar -> TcM () #
dumpOptTcRn :: DumpFlag -> String -> DumpFormat -> SDoc -> TcRn () #
Dump if the given DumpFlag
is set.
discardWarnings :: TcRn a -> TcRn a #
discardResult :: TcM a -> TcM () #
discardErrs :: TcRn a -> TcRn a #
discardConstraints :: TcM a -> TcM a #
Throw out any constraints emitted by the thing_inside
cloneLocalName :: Name -> TcM Name #
cloneEvBindsVar :: EvBindsVar -> TcM EvBindsVar #
checkNoErrs :: TcM r -> TcM r #
captureConstraints :: TcM a -> TcM (a, WantedConstraints) #
add_warn :: WarnReason -> SDoc -> SDoc -> TcRn () #
Display a warning, with an optional flag, for the current source location.
addWarnTcM :: WarnReason -> (TidyEnv, SDoc) -> TcM () #
Display a warning in a given context.
addWarnTc :: WarnReason -> SDoc -> TcM () #
Display a warning in the current context.
addWarnAt :: WarnReason -> SrcSpan -> SDoc -> TcRn () #
Display a warning for a given source location.
addWarn :: WarnReason -> SDoc -> TcRn () #
Display a warning for the current source location.
addTcEvBind :: EvBindsVar -> EvBind -> TcM () #
addModFinalizersWithLclEnv :: ThModFinalizers -> TcM () #
Adds the given modFinalizers to the global environment and set them to use the current local environment.
addMessages :: Messages DecoratedSDoc -> TcRn () #
addLocMA :: (a -> TcM b) -> GenLocated (SrcSpanAnn' ann) a -> TcM b #
addLandmarkErrCtxtM :: (TidyEnv -> TcM (TidyEnv, SDoc)) -> TcM a -> TcM a #
Variant of addLandmarkErrCtxt
that allows for monadic operations
and tidying.
addLandmarkErrCtxt :: SDoc -> TcM a -> TcM a #
Add a fixed landmark message to the error context. A landmark message is always sure to be reported, even if there is a lot of context. It also doesn't count toward the maximum number of contexts reported.
addErrCtxtM :: (TidyEnv -> TcM (TidyEnv, SDoc)) -> TcM a -> TcM a #
Add a message to the error context. This message may do tidying.
addErrCtxt :: SDoc -> TcM a -> TcM a #
Add a fixed message to the error context. This message should not do any tidying.
addDependentFiles :: [FilePath] -> TcRn () #
Constructors
ImportByUser IsBootInterface | |
ImportBySystem | |
ImportByPlugin |
Instances
Outputable WhereFrom | |
Defined in GHC.Tc.Types |
Constructors
Splice SpliceType | |
RunSplice (TcRef [ForeignRef (Q ())]) | |
Comp | |
Brack ThStage PendingStuff |
Instances
Outputable ThStage | |
Defined in GHC.Tc.Types |
A typecheckable thing available in a local context. Could be
AGlobal
TyThing
, but also lexically scoped variables, etc.
See GHC.Tc.Utils.Env for how to retrieve a TyThing
given a Name
.
Constructors
AGlobal TyThing | |
ATcId | |
Fields
| |
ATyVar Name TcTyVar | |
ATcTyCon TyCon | |
APromotionErr PromotionErr |
Instances
Outputable TcTyThing | |
Defined in GHC.Tc.Types |
Constructors
TcIdSig TcIdSigInfo | |
TcPatSynSig TcPatSynInfo |
Instances
Outputable TcSigInfo | |
Defined in GHC.Tc.Types |
type TcPluginSolver = [Ct] -> [Ct] -> [Ct] -> TcPluginM TcPluginResult #
data TcPluginResult #
Constructors
TcPluginContradiction [Ct] | The plugin found a contradiction. The returned constraints are removed from the inert set, and recorded as insoluble. |
TcPluginOk [(EvTerm, Ct)] [Ct] | The first field is for constraints that were solved. These are removed from the inert set, and the evidence for them is recorded. The second field contains new work, that should be processed by the constraint solver. |
Instances
Constructors
TcPlugin | |
Fields
|
data TcPatSynInfo #
Constructors
TPSI | |
Fields |
Instances
Outputable TcPatSynInfo | |
Defined in GHC.Tc.Types Methods ppr :: TcPatSynInfo -> SDoc # |
data TcIdSigInst #
Constructors
TISI | |
Fields
|
Instances
Outputable TcIdSigInst | |
Defined in GHC.Tc.Types Methods ppr :: TcIdSigInst -> SDoc # |
data TcIdSigInfo #
Constructors
CompleteSig | |
PartialSig | |
Fields
|
Instances
Outputable TcIdSigInfo | |
Defined in GHC.Tc.Types Methods ppr :: TcIdSigInfo -> SDoc # |
TcGblEnv
describes the top-level of the module at the
point at which the typechecker is finished work.
It is this structure that is handed on to the desugarer
For state that needs to be updated during the typechecking
phase and returned at end, use a TcRef
(= IORef
).
Constructors
TcGblEnv | |
Fields
|
Instances
ContainsModule TcGblEnv | |
Defined in GHC.Tc.Types Methods extractModule :: TcGblEnv -> Module # |
type TcBinderStack = [TcBinder] #
Constructors
TcIdBndr TcId TopLevelFlag | |
TcIdBndr_ExpType Name ExpType TopLevelFlag | |
TcTvBndr Name TyVar |
Instances
HasOccName TcBinder | |
Defined in GHC.Tc.Types | |
Outputable TcBinder | |
Defined in GHC.Tc.Types |
type THDocs = Map DocLoc String #
The current collection of docs that Template Haskell has built up via putDoc.
data SpliceType #
data SelfBootInfo #
Constructors
NoSelfBoot | |
SelfBoot | |
Fields
|
type RoleAnnotEnv = NameEnv (LRoleAnnotDecl GhcRn) #
type RecFieldEnv = NameEnv [FieldLabel] #
data PromotionErr #
Constructors
TyConPE | |
ClassPE | |
FamDataConPE | |
ConstrainedDataConPE PredType | |
PatSynPE | |
RecDataConPE | |
NoDataKindsTC | |
NoDataKindsDC |
Instances
Outputable PromotionErr | |
Defined in GHC.Tc.Types Methods ppr :: PromotionErr -> SDoc # |
data PendingStuff #
Constructors
RnPendingUntyped (TcRef [PendingRnSplice]) | |
RnPendingTyped | |
TcPending (TcRef [PendingTcSplice]) (TcRef WantedConstraints) QuoteWrapper |
A NameShape
is a substitution on Name
s that can be used
to refine the identities of a hole while we are renaming interfaces
(see GHC.Iface.Rename). Specifically, a NameShape
for
ns_module_name
A
, defines a mapping from {A.T}
(for some OccName
T
) to some arbitrary other Name
.
The most intruiging thing about a NameShape
, however, is
how it's constructed. A NameShape
is *implied* by the
exported AvailInfo
s of the implementor of an interface:
if an implementor of signature <H>
exports M.T
, you implicitly
define a substitution from {H.T}
to M.T
. So a NameShape
is computed from the list of AvailInfo
s that are exported
by the implementation of a module, or successively merged
together by the export lists of signatures which are joining
together.
It's not the most obvious way to go about doing this, but it does seem to work!
NB: Can't boot this and put it in NameShape because then we start pulling in too many DynFlags things.
Constructors
NameShape | |
Fields
|
data IsGroupClosed #
IsGroupClosed describes a group of mutually-recursive bindings
Constructors
IsGroupClosed (NameEnv RhsNames) ClosedTypeId |
data ImportAvails #
ImportAvails
summarises what was imported from where, irrespective of
whether the imported things are actually used or not. It is used:
- when processing the export list,
- when constructing usage info for the interface file,
- to identify the list of directly imported modules for initialisation purposes and for optimised overlap checking of family instances,
- when figuring out what things are really unused
Constructors
ImportAvails | |
Fields
|
Constructors
IfLclEnv | |
Fields
|
data IdBindingInfo #
IdBindingInfo describes how an Id is bound.
It is used for the following purposes:
a) for static forms in checkClosedInStaticForm
and
b) to figure out when a nested binding can be generalised,
in decideGeneralisationPlan
.
Constructors
NotLetBound | |
ClosedLet | |
NonClosedLet RhsNames ClosedTypeId |
Instances
Outputable IdBindingInfo | |
Defined in GHC.Tc.Types Methods ppr :: IdBindingInfo -> SDoc # |
data FrontendResult #
FrontendResult
describes the result of running the frontend of a Haskell
module. Currently one always gets a FrontendTypecheck
, since running the
frontend involves typechecking a program. hs-sig merges are not handled here.
This data type really should be in GHC.Driver.Env, but it needs to have a TcGblEnv which is only defined here.
Constructors
FrontendTypecheck TcGblEnv |
Instances
ContainsHooks (Env gbl lcl) | |
Defined in GHC.Tc.Types Methods extractHooks :: Env gbl lcl -> Hooks # | |
ContainsDynFlags (Env gbl lcl) | |
Defined in GHC.Tc.Types Methods extractDynFlags :: Env gbl lcl -> DynFlags # | |
ContainsModule gbl => ContainsModule (Env gbl lcl) | |
Defined in GHC.Tc.Types Methods extractModule :: Env gbl lcl -> Module # | |
ContainsLogger (Env gbl lcl) | |
Defined in GHC.Tc.Types Methods extractLogger :: Env gbl lcl -> Logger # |
This is a mirror of Template Haskell's DocLoc, but the TH names are resolved to GHC names.
type ClosedTypeId = Bool #
Constructors
NoArrowCtxt | |
ArrowCtxt LocalRdrEnv (TcRef WantedConstraints) |
unsafeTcPluginTcM :: TcM a -> TcPluginM a #
topAnnStage :: ThStage #
tcTyThingCategory :: TcTyThing -> String #
runTcPluginM :: TcPluginM a -> EvBindsVar -> TcM a #
removeBindingShadowing :: HasOccName a => [a] -> [a] #
pushErrCtxtSameOrigin :: ErrCtxt -> CtLoc -> CtLoc #
pprTcTyThingCategory :: TcTyThing -> SDoc #
pprPECategory :: PromotionErr -> SDoc #
plusImportAvails :: ImportAvails -> ImportAvails -> ImportAvails #
Union two ImportAvails
This function is a key part of Import handling, basically for each import we create a separate ImportAvails structure and then union them all together with this function.
peCategory :: PromotionErr -> String #
outerLevel :: ThLevel #
mkRoleAnnotEnv :: [LRoleAnnotDecl GhcRn] -> RoleAnnotEnv #
lookupRoleAnnot :: RoleAnnotEnv -> Name -> Maybe (LRoleAnnotDecl GhcRn) #
lintGblEnv :: Logger -> DynFlags -> TcGblEnv -> TcM () #
Check the TcGblEnv
for consistency. Currently, only checks
axioms, but should check other aspects, too.
isPartialSig :: TcIdSigInst -> Bool #
hasCompleteSig :: TcSigFun -> Name -> Bool #
No signature or a partial signature
getRoleAnnots :: [Name] -> RoleAnnotEnv -> [LRoleAnnotDecl GhcRn] #
getPlatform :: TcM Platform #
Get target platform
getEvBindsTcPluginM :: TcPluginM EvBindsVar #
Access the EvBindsVar
carried by the TcPluginM
during
constraint solving. Returns Nothing
if invoked during
tcPluginInit
or tcPluginStop
.
uncacheModule :: HscEnv -> ModuleName -> IO () #
mkStubPaths :: DynFlags -> ModuleName -> ModLocation -> FilePath #
mkObjPath :: DynFlags -> FilePath -> String -> FilePath #
Constructs the filename of a .o file for a given source file. Does not check whether the .o file exists
mkHomeModLocation2 :: DynFlags -> ModuleName -> FilePath -> String -> IO ModLocation #
mkHomeModLocation :: DynFlags -> ModuleName -> FilePath -> IO ModLocation #
mkHiPath :: DynFlags -> FilePath -> String -> FilePath #
Constructs the filename of a .hi file for a given source file. Does not check whether the .hi file exists
mkHiOnlyModLocation :: DynFlags -> Suffix -> FilePath -> String -> IO ModLocation #
flushFinderCaches :: HscEnv -> IO () #
findPluginModule :: HscEnv -> ModuleName -> IO FindResult #
Locate a plugin module requested by the user, for a compiler
plugin. This consults the same set of exposed packages as
findImportedModule
, unless -hide-all-plugin-packages
or
-plugin-package
are specified.
findObjectLinkableMaybe :: Module -> ModLocation -> IO (Maybe Linkable) #
findImportedModule :: HscEnv -> ModuleName -> Maybe FastString -> IO FindResult #
Locate a module that was imported by the user. We have the module's name, and possibly a package name. Without a package name, this function will use the search path and the known exposed packages to find the module, if a package is specified then only that package is searched for the module.
findHomeModule :: HscEnv -> ModuleName -> IO FindResult #
findExposedPackageModule :: HscEnv -> ModuleName -> Maybe FastString -> IO FindResult #
findExactModule :: HscEnv -> InstalledModule -> IO InstalledFindResult #
Locate a specific Module
. The purpose of this function is to
create a ModLocation
for a given Module
, that is to find out
where the files associated with this module live. It is used when
reading the interface for a module mentioned by another interface,
for example (a "system import").
addHomeModuleToFinder :: HscEnv -> ModuleName -> ModLocation -> IO Module #
data WantedConstraints #
Instances
Outputable WantedConstraints | |
Defined in GHC.Tc.Types.Constraint Methods ppr :: WantedConstraints -> SDoc # |
A place for type-checking evidence to go after it is generated. Wanted equalities are always HoleDest; other wanteds are always EvVarDest.
Constructors
EvVarDest EvVar | bind this var to the evidence EvVarDest is always used for non-type-equalities e.g. class constraints |
HoleDest CoercionHole | fill in this hole with the evidence HoleDest is always used for type-equalities See Note [Coercion holes] in GHC.Core.TyCo.Rep |
Instances
Outputable TcEvDest | |
Defined in GHC.Tc.Types.Constraint |
data SubGoalDepth #
See Note [SubGoalDepth]
Instances
Outputable SubGoalDepth | |
Defined in GHC.Tc.Types.Constraint Methods ppr :: SubGoalDepth -> SDoc # | |
Eq SubGoalDepth | |
Defined in GHC.Tc.Types.Constraint | |
Ord SubGoalDepth | |
Defined in GHC.Tc.Types.Constraint Methods compare :: SubGoalDepth -> SubGoalDepth -> Ordering # (<) :: SubGoalDepth -> SubGoalDepth -> Bool # (<=) :: SubGoalDepth -> SubGoalDepth -> Bool # (>) :: SubGoalDepth -> SubGoalDepth -> Bool # (>=) :: SubGoalDepth -> SubGoalDepth -> Bool # max :: SubGoalDepth -> SubGoalDepth -> SubGoalDepth # min :: SubGoalDepth -> SubGoalDepth -> SubGoalDepth # |
data ShadowInfo #
Instances
Eq ShadowInfo | |
Defined in GHC.Tc.Types.Constraint |
Constructors
QCI | |
Fields
|
Instances
Outputable QCInst | |
Defined in GHC.Tc.Types.Constraint |
data Implication #
Constructors
Implic | |
Fields
|
Instances
Outputable Implication | |
Defined in GHC.Tc.Types.Constraint Methods ppr :: Implication -> SDoc # |
data ImplicStatus #
Constructors
IC_Solved | |
IC_Insoluble | |
IC_BadTelescope | |
IC_Unsolved |
Instances
Outputable ImplicStatus | |
Defined in GHC.Tc.Types.Constraint Methods ppr :: ImplicStatus -> SDoc # |
Used to indicate which sort of hole we have.
Constructors
ExprHole HoleExprRef | Either an out-of-scope variable or a "true" hole in an expression (TypedHoles). The HoleExprRef says where to write the the erroring expression for -fdefer-type-errors. |
TypeHole | A hole in a type (PartialTypeSignatures) |
ConstraintHole | A hole in a constraint, like @f :: (_, Eq a) => ... Differentiated from TypeHole because a ConstraintHole is simplified differently. See Note [Do not simplify ConstraintHoles] in GHC.Tc.Solver. |
Instances
Outputable HoleSort | |
Defined in GHC.Tc.Types.Constraint |
A hole stores the information needed to report diagnostics about holes in terms (unbound identifiers or underscores) or in types (also called wildcards, as used in partial type signatures). See Note [Holes].
Constructors
Hole | |
Instances
Outputable Hole | |
Defined in GHC.Tc.Types.Constraint |
data HasGivenEqs #
Constructors
NoGivenEqs | |
LocalGivenEqs | |
MaybeGivenEqs |
Instances
Monoid HasGivenEqs | |
Defined in GHC.Tc.Types.Constraint Methods mempty :: HasGivenEqs # mappend :: HasGivenEqs -> HasGivenEqs -> HasGivenEqs # mconcat :: [HasGivenEqs] -> HasGivenEqs # | |
Semigroup HasGivenEqs | |
Defined in GHC.Tc.Types.Constraint Methods (<>) :: HasGivenEqs -> HasGivenEqs -> HasGivenEqs # sconcat :: NonEmpty HasGivenEqs -> HasGivenEqs # stimes :: Integral b => b -> HasGivenEqs -> HasGivenEqs # | |
Outputable HasGivenEqs | |
Defined in GHC.Tc.Types.Constraint Methods ppr :: HasGivenEqs -> SDoc # | |
Eq HasGivenEqs | |
Defined in GHC.Tc.Types.Constraint |
Constructors
CtLoc | |
Fields
|
data CtIrredReason #
Used to indicate extra information about why a CIrredCan is irreducible
Constructors
IrredShapeReason | this constraint has a non-canonical shape (e.g. |
HoleBlockerReason HoleSet | this constraint is blocked on the coercion hole(s) listed See Note [Equalities with incompatible kinds] in GHC.Tc.Solver.Canonical Wrinkle (4a). Why store the HoleSet? See Wrinkle (2) of that same Note. INVARIANT: A HoleBlockerReason constraint is a homogeneous equality whose left hand side can fit in a CanEqLHS. |
NonCanonicalReason CheckTyEqResult | an equality where some invariant other than (TyEq:H) of |
ReprEqReason | an equality that cannot be decomposed because it is representational.
Example: |
ShapeMismatchReason | a nominal equality that relates two wholly different types,
like |
AbstractTyConReason | an equality like |
Instances
Outputable CtIrredReason | |
Defined in GHC.Tc.Types.Constraint Methods ppr :: CtIrredReason -> SDoc # |
type CtFlavourRole = (CtFlavour, EqRel) #
Whether or not one Ct
can rewrite another is determined by its
flavour and its equality relation. See also
Note [Flavours with roles] in GHC.Tc.Solver.Monad
Constructors
Given | |
Wanted ShadowInfo | |
Derived |
data CtEvidence #
Constructors
CtGiven | |
CtWanted | |
Fields
| |
CtDerived | |
Fields
|
Instances
Outputable CtEvidence | |
Defined in GHC.Tc.Types.Constraint Methods ppr :: CtEvidence -> SDoc # |
Constructors
CDictCan | |
Fields
| |
CIrredCan | |
Fields | |
CEqCan | |
CNonCanonical | |
Fields
| |
CQuantCan QCInst |
Instances
Outputable Ct | |
Defined in GHC.Tc.Types.Constraint |
data CheckTyEqResult #
A set of problems in checking the validity of a type equality.
See checkTypeEq
.
Instances
Monoid CheckTyEqResult | |
Defined in GHC.Tc.Types.Constraint Methods mappend :: CheckTyEqResult -> CheckTyEqResult -> CheckTyEqResult # mconcat :: [CheckTyEqResult] -> CheckTyEqResult # | |
Semigroup CheckTyEqResult | |
Defined in GHC.Tc.Types.Constraint Methods (<>) :: CheckTyEqResult -> CheckTyEqResult -> CheckTyEqResult # sconcat :: NonEmpty CheckTyEqResult -> CheckTyEqResult # stimes :: Integral b => b -> CheckTyEqResult -> CheckTyEqResult # | |
Outputable CheckTyEqResult | |
Defined in GHC.Tc.Types.Constraint Methods ppr :: CheckTyEqResult -> SDoc # |
data CheckTyEqProblem #
An individual problem that might be logged in a CheckTyEqResult
A CanEqLHS
is a type that can appear on the left of a canonical
equality: a type variable or exactly-saturated type family application.
Instances
Outputable CanEqLHS | |
Defined in GHC.Tc.Types.Constraint |
unionsWC :: [WantedConstraints] -> WantedConstraints #
tyCoVarsOfWCList :: WantedConstraints -> [TyCoVar] #
Returns free variables of WantedConstraints as a deterministically ordered list. See Note [Deterministic FV] in GHC.Utils.FV.
tyCoVarsOfWC :: WantedConstraints -> TyCoVarSet #
Returns free variables of WantedConstraints as a non-deterministic set. See Note [Deterministic FV] in GHC.Utils.FV.
tyCoVarsOfCtsList :: Cts -> [TcTyCoVar] #
Returns free variables of a bag of constraints as a deterministically ordered list. See Note [Deterministic FV] in GHC.Utils.FV.
tyCoVarsOfCts :: Cts -> TcTyCoVarSet #
Returns free variables of a bag of constraints as a non-deterministic set. See Note [Deterministic FV] in GHC.Utils.FV.
tyCoVarsOfCtList :: Ct -> [TcTyCoVar] #
Returns free variables of constraints as a deterministically ordered. list. See Note [Deterministic FV] in GHC.Utils.FV.
tyCoVarsOfCt :: Ct -> TcTyCoVarSet #
Returns free variables of constraints as a non-deterministic set
superClassesMightHelp :: WantedConstraints -> Bool #
True if taking superclasses of givens, or of wanteds (to perhaps expose more equalities or functional dependencies) might help to solve this constraint. See Note [When superclasses help]
subGoalDepthExceeded :: DynFlags -> SubGoalDepth -> Bool #
setCtLocSpan :: CtLoc -> RealSrcSpan -> CtLoc #
setCtLocOrigin :: CtLoc -> CtOrigin -> CtLoc #
setCtLocEnv :: CtLoc -> TcLclEnv -> CtLoc #
pprEvVarWithType :: EvVar -> SDoc #
pprEvVarTheta :: [EvVar] -> SDoc #
mkTcEqPredLikeEv :: CtEvidence -> TcType -> TcType -> TcType #
Makes a new equality predicate with the same role as the given evidence.
mkSimpleWC :: [CtEvidence] -> WantedConstraints #
mkNonCanonicalCt :: Ct -> Ct #
mkNonCanonical :: CtEvidence -> Ct #
mkIrredCt :: CtIrredReason -> CtEvidence -> Ct #
mkGivenLoc :: TcLevel -> SkolemInfo -> TcLclEnv -> CtLoc #
maxSubGoalDepth :: SubGoalDepth -> SubGoalDepth -> SubGoalDepth #
isWantedCt :: Ct -> Bool #
isWanted :: CtEvidence -> Bool #
isUserTypeErrorCt :: Ct -> Bool #
isSolvedWC :: WantedConstraints -> Bool #
Checks whether a the given wanted constraints are solved, i.e. that there are no simple constraints left and all the implications are solved.
isSolvedStatus :: ImplicStatus -> Bool #
isPendingScInst :: QCInst -> Maybe QCInst #
isPendingScDict :: Ct -> Maybe Ct #
isOutOfScopeHole :: Hole -> Bool #
Does this hole represent an "out of scope" error? See Note [Insoluble holes]
isInsolubleStatus :: ImplicStatus -> Bool #
isInsolubleReason :: CtIrredReason -> Bool #
Are we sure that more solving will never solve this constraint?
isGivenLoc :: CtLoc -> Bool #
isGiven :: CtEvidence -> Bool #
isEmptyWC :: WantedConstraints -> Bool #
isEmptyCts :: Cts -> Bool #
isDroppableCt :: Ct -> Bool #
isDerivedCt :: Ct -> Bool #
isDerived :: CtEvidence -> Bool #
insolubleWC :: WantedConstraints -> Bool #
insolubleImplic :: Implication -> Bool #
insolubleEqCt :: Ct -> Bool #
insolubleCt :: Ct -> Bool #
getUserTypeErrorMsg :: Ct -> Maybe Type #
A constraint is considered to be a custom type error, if it contains custom type errors anywhere in it. See Note [Custom type errors in constraints]
getPendingWantedScs :: Cts -> ([Ct], Cts) #
extendCtsList :: Cts -> [Ct] -> Cts #
eqMayRewriteFR :: CtFlavourRole -> CtFlavourRole -> Bool #
eqCanRewriteFR :: CtFlavourRole -> CtFlavourRole -> Bool #
eqCanRewrite :: EqRel -> EqRel -> Bool #
eqCanDischargeFR :: CtFlavourRole -> CtFlavourRole -> Bool #
dropDerivedSimples :: Cts -> Cts #
cterSetOccursCheckSoluble :: CheckTyEqResult -> CheckTyEqResult #
Mark a CheckTyEqResult
as not having an insoluble occurs-check: any occurs
check under a type family or in a representation equality is soluble.
cterHasProblem :: CheckTyEqResult -> CheckTyEqProblem -> Bool #
Check whether a CheckTyEqResult
has a CheckTyEqProblem
cterHasOnlyProblem :: CheckTyEqResult -> CheckTyEqProblem -> Bool #
Check whether a CheckTyEqResult
has one CheckTyEqProblem
and no other
cterHasNoProblem :: CheckTyEqResult -> Bool #
Check whether a CheckTyEqResult
is marked successful.
cterFromKind :: CheckTyEqResult -> CheckTyEqResult #
Retain only information about occurs-check failures, because only that matters after recurring into a kind.
No problems in checking the validity of a type equality.
ctLocSpan :: CtLoc -> RealSrcSpan #
ctLocOrigin :: CtLoc -> CtOrigin #
ctLocLevel :: CtLoc -> TcLevel #
ctLocDepth :: CtLoc -> SubGoalDepth #
ctFlavourRole :: Ct -> CtFlavourRole #
Extract the flavour and role from a Ct
ctEvidence :: Ct -> CtEvidence #
ctEvTerm :: CtEvidence -> EvTerm #
ctEvRole :: CtEvidence -> Role #
Get the role relevant for a CtEvidence
ctEvPred :: CtEvidence -> TcPredType #
ctEvOrigin :: CtEvidence -> CtOrigin #
ctEvLoc :: CtEvidence -> CtLoc #
ctEvFlavourRole :: CtEvidence -> CtFlavourRole #
Extract the flavour, role, and boxity from a CtEvidence
ctEvFlavour :: CtEvidence -> CtFlavour #
ctEvExpr :: CtEvidence -> EvExpr #
ctEvEvId :: CtEvidence -> EvVar #
ctEvEqRel :: CtEvidence -> EqRel #
Get the equality relation relevant for a CtEvidence
ctEvCoercion :: HasDebugCallStack => CtEvidence -> TcCoercion #
checkTelescopeSkol :: SkolemInfo -> Bool #
canEqLHS_maybe :: Xi -> Maybe CanEqLHS #
Is a type a canonical LHS? That is, is it a tyvar or an exactly-saturated type family application? Does not look through type synonyms.
canEqLHSKind :: CanEqLHS -> TcKind #
Retrieve the kind of a CanEqLHS
bumpCtLocDepth :: CtLoc -> CtLoc #
arisesFromGivens :: Ct -> Bool #
andManyCts :: [Cts] -> Cts #
addSimples :: WantedConstraints -> Bag Ct -> WantedConstraints #
addInsols :: WantedConstraints -> Bag Ct -> WantedConstraints #
addHoles :: WantedConstraints -> Bag Hole -> WantedConstraints #
Instances
Outputable FloatBind | |
Defined in GHC.Core.Make |
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
tYPE_ERROR_ID :: Id #
sortQuantVars :: [Var] -> [Var] #
rUNTIME_ERROR_ID :: Id #
rEC_SEL_ERROR_ID :: Id #
rEC_CON_ERROR_ID :: Id #
pAT_ERROR_ID :: Id #
mkWordExpr :: Platform -> Integer -> CoreExpr #
Create a CoreExpr
which will evaluate to the a Word
with the given value
mkWildValBinder :: Mult -> 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 GHC.Core.Opt.Simplify.Env
mkWildEvBinder :: PredType -> EvVar #
mkUncheckedIntExpr :: Integer -> CoreExpr #
Create a CoreExpr
which will evaluate to the given Int
. Don't check
that the number is in the range of the target platform Int
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.
A tuple selector is not linear in its argument. Consequently, the case
expression built by mkTupleSelector
must consume its scrutinee Many
times. And all the argument variables must have multiplicity Many
.
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.
A tuple selector is not linear in its argument. Consequently, the case
expression built by mkTupleSelector
must consume its scrutinee Many
times. And all the argument variables must have multiplicity Many
.
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.
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
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 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.
mkNothingExpr :: Type -> CoreExpr #
Makes a Nothing for the specified type
mkNaturalExpr :: Integer -> CoreExpr #
Create a CoreExpr
which will evaluate to the given Natural
mkListExpr :: Type -> [CoreExpr] -> CoreExpr #
Make a list containing the given expressions, where the list has the given type
mkJustExpr :: Type -> CoreExpr -> CoreExpr #
Makes a Just from a value of the specified type
mkIntegerExpr :: Integer -> CoreExpr #
Create a CoreExpr
which will evaluate to the given Integer
mkIntExpr :: Platform -> Integer -> CoreExpr #
Create a CoreExpr
which will evaluate to the given Int
mkImpossibleExpr :: Type -> CoreExpr #
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
mkFloatExpr :: Float -> CoreExpr #
Create a CoreExpr
which will evaluate to the given Float
mkDoubleExpr :: Double -> CoreExpr #
Create a CoreExpr
which will evaluate to the given Double
mkCoreVarTupTy :: [Id] -> Type #
Build the type of a small tuple that holds the specified variables One-tuples are flattened; see Note [Flattening one-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]
mkCoreUbxSum :: Int -> Int -> [Type] -> CoreExpr -> CoreExpr #
Build an unboxed sum.
Alternative number ("alt") starts from 1.
mkCoreTupBoxity :: Boxity -> [CoreExpr] -> CoreExpr #
Make a core tuple of the given boxity; don't flatten 1-tuples
mkCoreTup :: [CoreExpr] -> CoreExpr #
Build a small tuple holding the specified expressions One-tuples are flattened; see Note [Flattening one-tuples]
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
mkCoreLet :: CoreBind -> CoreExpr -> CoreExpr #
Bind a binding group over an expression, using a let
or case
as
appropriate (see GHC.Core)
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
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
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 Note [Core let/app invariant] in GHC.Core
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 Note [Core let/app invariant] in GHC.Core
mkConsExpr :: Type -> CoreExpr -> CoreExpr -> CoreExpr #
Makes a list (:)
for lists of the specified type
mkCharExpr :: Char -> CoreExpr #
Create a CoreExpr
which will evaluate to the given Char
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
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]
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]
mkAbsentErrorApp :: Type -> String -> CoreExpr #
floatBindings :: FloatBind -> [Var] #
castBottomExpr :: CoreExpr -> Type -> CoreExpr #
aBSENT_ERROR_ID :: Id #
class UnXRec p => CollectPass p where #
This class specifies how to collect variable identifiers from extension patterns in the given pass. Consumers of the GHC API that define their own passes should feel free to implement instances in order to make use of functions which depend on it.
In particular, Haddock already makes use of this, with an instance for its DocNameI
pass so that
it can reuse the code in GHC for collecting binders.
Methods
collectXXPat :: Proxy p -> CollectFlag p -> XXPat p -> [IdP p] -> [IdP p] #
Instances
IsPass p => CollectPass (GhcPass p) | |
Defined in GHC.Hs.Utils |
data CollectFlag p where #
Indicate if evidence binders have to be collected.
This type is used as a boolean (should we collect evidence binders or not?) but also to pass an evidence that the AST has been typechecked when we do want to collect evidence binders, otherwise these binders are not available.
See Note [Dictionary binders in ConPatOut]
Constructors
CollNoDictBinders :: forall p. CollectFlag p | Don't collect evidence binders |
CollWithDictBinders :: CollectFlag (GhcPass 'Typechecked) | Collect evidence binders |
unguardedRHS :: forall (p :: Pass) body. Anno (GRHS (GhcPass p) (LocatedA (body (GhcPass p)))) ~ SrcSpan => EpAnn GrhsAnn -> SrcSpan -> LocatedA (body (GhcPass p)) -> [LGRHS (GhcPass p) (LocatedA (body (GhcPass p)))] #
unguardedGRHSs :: forall (p :: Pass) body. Anno (GRHS (GhcPass p) (LocatedA (body (GhcPass p)))) ~ SrcSpan => SrcSpan -> LocatedA (body (GhcPass p)) -> EpAnn GrhsAnn -> GRHSs (GhcPass p) (LocatedA (body (GhcPass p))) #
spanHsLocaLBinds :: forall (p :: Pass). Data (HsLocalBinds (GhcPass p)) => HsLocalBinds (GhcPass p) -> SrcSpan #
Return the SrcSpan
encompassing the contents of any enclosed binds
nlWildPatName :: LPat GhcRn #
Wildcard pattern - after renaming
nlWildConPat :: DataCon -> LPat GhcPs #
nlNullaryConPat :: RdrName -> LPat GhcPs #
nlHsVarApps :: forall (p :: Pass) a. IsSrcSpanAnn p a => IdP (GhcPass p) -> [IdP (GhcPass p)] -> LHsExpr (GhcPass p) #
nlHsTyConApp :: forall (p :: Pass) a. IsSrcSpanAnn p a => LexicalFixity -> IdP (GhcPass p) -> [LHsTypeArg (GhcPass p)] -> LHsType (GhcPass p) #
nlHsSyntaxApps :: SyntaxExprTc -> [LHsExpr GhcTc] -> LHsExpr GhcTc #
nlHsFunTy :: forall (p :: Pass). LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p) #
nlHsApps :: forall (p :: Pass) a. IsSrcSpanAnn p a => IdP (GhcPass p) -> [LHsExpr (GhcPass p)] -> LHsExpr (GhcPass p) #
nlHsAppTy :: forall (p :: Pass). LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p) #
nlHsAppKindTy :: forall (p :: Pass). LHsType (GhcPass p) -> LHsKind (GhcPass p) -> LHsType (GhcPass p) #
nlHsApp :: forall (id :: Pass). IsPass id => LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) #
mkUntypedSplice :: EpAnn [AddEpAnn] -> SpliceDecoration -> LHsExpr GhcPs -> HsSplice GhcPs #
mkTypedSplice :: EpAnn [AddEpAnn] -> SpliceDecoration -> LHsExpr GhcPs -> HsSplice GhcPs #
mkTransformStmt :: EpAnn [AddEpAnn] -> [ExprLStmt GhcPs] -> LHsExpr GhcPs -> StmtLR GhcPs GhcPs (LHsExpr GhcPs) #
mkTransformByStmt :: EpAnn [AddEpAnn] -> [ExprLStmt GhcPs] -> LHsExpr GhcPs -> LHsExpr GhcPs -> StmtLR GhcPs GhcPs (LHsExpr GhcPs) #
mkTopFunBind :: Origin -> LocatedN Name -> [LMatch GhcRn (LHsExpr GhcRn)] -> HsBind GhcRn #
In Name-land, with empty bind_fvs
mkTcBindStmt :: LPat GhcTc -> LocatedA (bodyR GhcTc) -> StmtLR GhcTc GhcTc (LocatedA (bodyR GhcTc)) #
mkSimpleMatch :: forall (p :: Pass) body. (Anno (Match (GhcPass p) (LocatedA (body (GhcPass p)))) ~ SrcSpanAnnA, Anno (GRHS (GhcPass p) (LocatedA (body (GhcPass p)))) ~ SrcSpan) => HsMatchContext (NoGhcTc (GhcPass p)) -> [LPat (GhcPass p)] -> LocatedA (body (GhcPass p)) -> LMatch (GhcPass p) (LocatedA (body (GhcPass p))) #
mkSimpleGeneratedFunBind :: SrcSpan -> RdrName -> [LPat GhcPs] -> LHsExpr GhcPs -> LHsBind GhcPs #
Convenience function using mkFunBind
.
This is for generated bindings only, do not use for user-written code.
mkRnBindStmt :: LPat GhcRn -> LocatedA (bodyR GhcRn) -> StmtLR GhcRn GhcRn (LocatedA (bodyR GhcRn)) #
mkRecStmt :: forall (idL :: Pass) bodyR. Anno [GenLocated (Anno (StmtLR (GhcPass idL) GhcPs bodyR)) (StmtLR (GhcPass idL) GhcPs bodyR)] ~ SrcSpanAnnL => EpAnn AnnList -> LocatedL [LStmtLR (GhcPass idL) GhcPs bodyR] -> StmtLR (GhcPass idL) GhcPs bodyR #
mkPsBindStmt :: EpAnn [AddEpAnn] -> LPat GhcPs -> LocatedA (bodyR GhcPs) -> StmtLR GhcPs GhcPs (LocatedA (bodyR GhcPs)) #
mkPrefixFunRhs :: LIdP p -> HsMatchContext p #
Make a prefix, non-strict function HsMatchContext
mkPatSynBind :: LocatedN RdrName -> HsPatSynDetails GhcPs -> LPat GhcPs -> HsPatSynDir GhcPs -> EpAnn [AddEpAnn] -> HsBind GhcPs #
mkMatchGroup :: forall (p :: Pass) body. AnnoBody p body => Origin -> LocatedL [LocatedA (Match (GhcPass p) (LocatedA (body (GhcPass p))))] -> MatchGroup (GhcPass p) (LocatedA (body (GhcPass p))) #
mkMatch :: forall (p :: Pass). IsPass p => HsMatchContext (NoGhcTc (GhcPass p)) -> [LPat (GhcPass p)] -> LHsExpr (GhcPass p) -> HsLocalBinds (GhcPass p) -> LMatch (GhcPass p) (LHsExpr (GhcPass p)) #
mkLocatedList :: Semigroup a => [GenLocated (SrcAnn a) e2] -> LocatedAn an [GenLocated (SrcAnn a) e2] #
mkLastStmt :: forall (idR :: Pass) bodyR (idL :: Pass). IsPass idR => LocatedA (bodyR (GhcPass idR)) -> StmtLR (GhcPass idL) (GhcPass idR) (LocatedA (bodyR (GhcPass idR))) #
mkLHsWrapCo :: TcCoercionN -> LHsExpr GhcTc -> LHsExpr GhcTc #
mkLHsVarTuple :: forall (p :: Pass) a. IsSrcSpanAnn p a => [IdP (GhcPass p)] -> XExplicitTuple (GhcPass p) -> LHsExpr (GhcPass p) #
mkLHsTupleExpr :: forall (p :: Pass). [LHsExpr (GhcPass p)] -> XExplicitTuple (GhcPass p) -> LHsExpr (GhcPass p) #
mkLHsPar :: forall (id :: Pass). IsPass id => LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) #
Wrap in parens if
says it needs them
So hsExprNeedsParens
appPrecf x
becomes (f x)
, but 3
stays as 3
.
mkHsWrapPatCo :: TcCoercionN -> Pat GhcTc -> Type -> Pat GhcTc #
mkHsWrapCoR :: TcCoercionR -> HsExpr GhcTc -> HsExpr GhcTc #
mkHsWrapCo :: TcCoercionN -> HsExpr GhcTc -> HsExpr GhcTc #
mkHsWrap :: HsWrapper -> HsExpr GhcTc -> HsExpr GhcTc #
Avoid
and HsWrap
co1 (HsWrap
co2 _)
See Note [Detecting forced eta expansion] in GHC.HsToCore.ExprHsWrap
co1 (HsPar
_ _)
mkHsStringPrimLit :: forall (p :: Pass). FastString -> HsLit (GhcPass p) #
mkHsQuasiQuote :: RdrName -> SrcSpan -> FastString -> HsSplice GhcPs #
mkHsOpApp :: LHsExpr GhcPs -> IdP GhcPs -> LHsExpr GhcPs -> HsExpr GhcPs #
A useful function for building OpApps
. The operator is always a
variable, and we don't know the fixity yet.
mkHsLam :: forall (p :: Pass). (IsPass p, XMG (GhcPass p) (LHsExpr (GhcPass p)) ~ NoExtField) => [LPat (GhcPass p)] -> LHsExpr (GhcPass p) -> LHsExpr (GhcPass p) #
mkHsIsString :: SourceText -> FastString -> HsOverLit GhcPs #
mkHsIntegral :: IntegralLit -> HsOverLit GhcPs #
mkHsCompAnns :: HsStmtContext GhcRn -> [ExprLStmt GhcPs] -> LHsExpr GhcPs -> EpAnn AnnList -> HsExpr GhcPs #
mkHsCaseAlt :: forall (p :: Pass) body. (Anno (GRHS (GhcPass p) (LocatedA (body (GhcPass p)))) ~ SrcSpan, Anno (Match (GhcPass p) (LocatedA (body (GhcPass p)))) ~ SrcSpanAnnA) => LPat (GhcPass p) -> LocatedA (body (GhcPass p)) -> LMatch (GhcPass p) (LocatedA (body (GhcPass p))) #
A simple case alternative with a single pattern, no binds, no guards; pre-typechecking
mkHsAppsWith :: forall (id :: Pass). (LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> HsExpr (GhcPass id) -> LHsExpr (GhcPass id)) -> LHsExpr (GhcPass id) -> [LHsExpr (GhcPass id)] -> LHsExpr (GhcPass id) #
mkHsApps :: forall (id :: Pass). LHsExpr (GhcPass id) -> [LHsExpr (GhcPass id)] -> LHsExpr (GhcPass id) #
mkHsAppWith :: forall (id :: Pass). (LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> HsExpr (GhcPass id) -> LHsExpr (GhcPass id)) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) #
mkHsApp :: forall (id :: Pass). LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) #
mkGroupUsingStmt :: EpAnn [AddEpAnn] -> [ExprLStmt GhcPs] -> LHsExpr GhcPs -> StmtLR GhcPs GhcPs (LHsExpr GhcPs) #
mkGroupByUsingStmt :: EpAnn [AddEpAnn] -> [ExprLStmt GhcPs] -> LHsExpr GhcPs -> LHsExpr GhcPs -> StmtLR GhcPs GhcPs (LHsExpr GhcPs) #
mkFunBind :: Origin -> LocatedN RdrName -> [LMatch GhcPs (LHsExpr GhcPs)] -> HsBind GhcPs #
Not infix, with place holders for coercion and free vars
mkClassOpSigs :: [LSig GhcPs] -> [LSig GhcPs] #
Convert TypeSig
to ClassOpSig
.
The former is what is parsed, but the latter is
what we need in class/instance declarations
Arguments
:: ([a] -> a) | "Small" constructor function, of maximum input arity |
-> [a] | Possible "big" list of things to construct from |
-> a | Constructed thing made possible by recursive decomposition |
Lifts a "small" constructor into a "big" constructor by recursive decomposition
mkBodyStmt :: forall bodyR (idL :: Pass). LocatedA (bodyR GhcPs) -> StmtLR (GhcPass idL) GhcPs (LocatedA (bodyR GhcPs)) #
mkBigLHsVarTup :: forall (p :: Pass) a. IsSrcSpanAnn p a => [IdP (GhcPass p)] -> XExplicitTuple (GhcPass p) -> LHsExpr (GhcPass p) #
The Big equivalents for the source tuple expressions
mkBigLHsTup :: forall (id :: Pass). [LHsExpr (GhcPass id)] -> XExplicitTuple (GhcPass id) -> LHsExpr (GhcPass id) #
missingTupArg :: EpAnn EpaLocation -> HsTupArg GhcPs #
lStmtsImplicits :: forall (idR :: Pass) (body :: Type -> Type). [LStmtLR GhcRn (GhcPass idR) (LocatedA (body (GhcPass idR)))] -> [(SrcSpan, [Name])] #
isUnliftedHsBind :: HsBind GhcTc -> Bool #
Should we treat this as an unlifted bind? This will be true for any bind that binds an unlifted variable, but we must be careful around AbsBinds. See Note [Unlifted id check in isUnliftedHsBind]. For usage information, see Note [Strict binds checks] is GHC.HsToCore.Binds.
isInfixFunBind :: forall id1 id2. UnXRec id2 => HsBindLR id1 id2 -> Bool #
isBangedHsBind :: HsBind GhcTc -> Bool #
Is a binding a strict variable or pattern bind (e.g. !x = ...
)?
hsValBindsImplicits :: forall (idR :: Pass). HsValBindsLR GhcRn (GhcPass idR) -> [(SrcSpan, [Name])] #
hsTypeToHsSigWcType :: LHsType GhcPs -> LHsSigWcType GhcPs #
Convert an LHsType
to an LHsSigWcType
.
hsTypeToHsSigType :: LHsType GhcPs -> LHsSigType GhcPs #
Convert an LHsType
to an LHsSigType
.
hsTyClForeignBinders :: [TyClGroup GhcRn] -> [LForeignDecl GhcRn] -> [Name] #
hsPatSynSelectors :: forall (p :: Pass). IsPass p => HsValBinds (GhcPass p) -> [FieldOcc (GhcPass p)] #
Collects record pattern-synonym selectors only; the pattern synonym
names are collected by collectHsValBinders
.
hsLTyClDeclBinders :: forall (p :: Pass). IsPass p => LocatedA (TyClDecl (GhcPass p)) -> ([LocatedA (IdP (GhcPass p))], [LFieldOcc (GhcPass p)]) #
Returns all the binding names of the decl. The first one is guaranteed to be the name of the decl. The first component represents all binding names except record fields; the second represents field occurrences. For record fields mentioned in multiple constructors, the SrcLoc will be from the first occurrence.
Each returned (Located name) has a SrcSpan for the whole declaration. See Note [SrcSpan for binders]
hsGroupBinders :: HsGroup GhcRn -> [Name] #
hsForeignDeclsBinders :: forall (p :: Pass) a. (UnXRec (GhcPass p), IsSrcSpanAnn p a) => [LForeignDecl (GhcPass p)] -> [LIdP (GhcPass p)] #
See Note [SrcSpan for binders]
hsDataFamInstBinders :: forall (p :: Pass). IsPass p => DataFamInstDecl (GhcPass p) -> ([LocatedA (IdP (GhcPass p))], [LFieldOcc (GhcPass p)]) #
the SrcLoc
returned are for the whole declarations, not just the names
getPatSynBinds :: UnXRec id => [(RecFlag, LHsBinds id)] -> [PatSynBind id id] #
emptyRecStmtName :: Anno [GenLocated (Anno (StmtLR GhcRn GhcRn bodyR)) (StmtLR GhcRn GhcRn bodyR)] ~ SrcSpanAnnL => StmtLR GhcRn GhcRn bodyR #
emptyRecStmt :: forall (idL :: Pass) bodyR. Anno [GenLocated (Anno (StmtLR (GhcPass idL) GhcPs bodyR)) (StmtLR (GhcPass idL) GhcPs bodyR)] ~ SrcSpanAnnL => StmtLR (GhcPass idL) GhcPs bodyR #
collectStmtsBinders :: forall (idL :: Pass) (idR :: Pass) body. CollectPass (GhcPass idL) => CollectFlag (GhcPass idL) -> [StmtLR (GhcPass idL) (GhcPass idR) body] -> [IdP (GhcPass idL)] #
collectStmtBinders :: forall (idL :: Pass) (idR :: Pass) body. CollectPass (GhcPass idL) => CollectFlag (GhcPass idL) -> StmtLR (GhcPass idL) (GhcPass idR) body -> [IdP (GhcPass idL)] #
collectPatsBinders :: CollectPass p => CollectFlag p -> [LPat p] -> [IdP p] #
collectPatBinders :: CollectPass p => CollectFlag p -> LPat p -> [IdP p] #
collectMethodBinders :: UnXRec idL => LHsBindsLR idL idR -> [LIdP idL] #
Used exclusively for the bindings of an instance decl which are all
FunBinds
collectLocalBinders :: forall (idL :: Pass) (idR :: Pass). CollectPass (GhcPass idL) => CollectFlag (GhcPass idL) -> HsLocalBindsLR (GhcPass idL) (GhcPass idR) -> [IdP (GhcPass idL)] #
collectLStmtsBinders :: forall (idL :: Pass) (idR :: Pass) body. CollectPass (GhcPass idL) => CollectFlag (GhcPass idL) -> [LStmtLR (GhcPass idL) (GhcPass idR) body] -> [IdP (GhcPass idL)] #
collectLStmtBinders :: forall (idL :: Pass) (idR :: Pass) body. CollectPass (GhcPass idL) => CollectFlag (GhcPass idL) -> LStmtLR (GhcPass idL) (GhcPass idR) body -> [IdP (GhcPass idL)] #
collectHsValBinders :: forall (idL :: Pass) (idR :: Pass). CollectPass (GhcPass idL) => CollectFlag (GhcPass idL) -> HsValBindsLR (GhcPass idL) (GhcPass idR) -> [IdP (GhcPass idL)] #
collectHsIdBinders :: forall (idL :: Pass) (idR :: Pass). CollectPass (GhcPass idL) => CollectFlag (GhcPass idL) -> HsValBindsLR (GhcPass idL) (GhcPass idR) -> [IdP (GhcPass idL)] #
collectHsBindsBinders :: CollectPass p => CollectFlag p -> LHsBindsLR p idR -> [IdP p] #
collectHsBindListBinders :: CollectPass p => CollectFlag p -> [LHsBindLR p idR] -> [IdP p] #
Same as collectHsBindsBinders
, but works over a list of bindings
collectHsBindBinders :: CollectPass p => CollectFlag p -> HsBindLR p idR -> [IdP p] #
Collect both Id
s and pattern-synonym binders
Split a list into lists that are small enough to have a corresponding
tuple arity. The sub-lists of the result all have length <= mAX_TUPLE_SIZE
But there may be more than mAX_TUPLE_SIZE
sub-lists
data XXExprGhcTc #
Constructors
WrapExpr !(HsWrap HsExpr) | |
ExpansionExpr !(HsExpansion (HsExpr GhcRn) (HsExpr GhcTc)) |
data XBindStmtTc #
Constructors
XBindStmtTc | |
Fields |
data XBindStmtRn #
Constructors
XBindStmtRn | |
Fields |
data SyntaxExprTc #
An expression with wrappers, used for rebindable syntax
This should desugar to
syn_res_wrap $ syn_expr (syn_arg_wraps[0] arg0) (syn_arg_wraps[1] arg1) ...
where the actual arguments come from elsewhere in the AST.
Constructors
SyntaxExprTc | |
Fields
| |
NoSyntaxExprTc |
Instances
Outputable SyntaxExprTc | |
Defined in GHC.Hs.Expr Methods ppr :: SyntaxExprTc -> SDoc # |
data SyntaxExprRn #
The function to use in rebindable syntax. See Note [NoSyntaxExpr].
Constructors
SyntaxExprRn (HsExpr GhcRn) | |
NoSyntaxExprRn |
Instances
Outputable SyntaxExprRn | |
Defined in GHC.Hs.Expr Methods ppr :: SyntaxExprRn -> SDoc # |
type family SyntaxExprGhc (p :: Pass) = (r :: Type) | r -> p where ... #
Equations
SyntaxExprGhc 'Parsed = NoExtField | |
SyntaxExprGhc 'Renamed = SyntaxExprRn | |
SyntaxExprGhc 'Typechecked = SyntaxExprTc |
data RecordUpdTc #
Extra data fields for a RecordUpd
, added by the type checker
Constructors
RecordUpdTc | |
Fields
|
Constructors
RecStmtTc | |
Fields
|
type PostTcTable = [(Name, PostTcExpr)] #
Post-Type checking Table
We use a PostTcTable where there are a bunch of pieces of evidence, more than is convenient to keep individually.
type PostTcExpr = HsExpr GhcTc #
Post-Type checking Expression
PostTcExpr is an evidence expression attached to the syntax tree by the type checker (c.f. postTcType).
data PendingTcSplice #
Pending Type-checker Splice
Constructors
PendingTcSplice SplicePointName (LHsExpr GhcTc) |
Instances
Outputable PendingTcSplice | |
Defined in GHC.Hs.Expr Methods ppr :: PendingTcSplice -> SDoc # |
data PendingRnSplice #
Pending Renamer Splice
Constructors
PendingRnSplice UntypedSpliceFlavour SplicePointName (LHsExpr GhcRn) |
Instances
Outputable PendingRnSplice | |
Defined in GHC.Hs.Expr Methods ppr :: PendingRnSplice -> SDoc # |
data HsWrap (hs_syn :: Type -> Type) #
HsWrap appears only in typechecker output
Invariant: The contained Expr is *NOT* itself an HsWrap.
See Note [Detecting forced eta expansion] in GHC.HsToCore.Expr.
This invariant is maintained by mkHsWrap
.
hs_syn is something like HsExpr or HsCmd
Instances
(Data (hs_syn GhcTc), Typeable hs_syn) => Data (HsWrap hs_syn) | |
Defined in GHC.Hs.Expr Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsWrap hs_syn -> c (HsWrap hs_syn) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsWrap hs_syn) # toConstr :: HsWrap hs_syn -> Constr # dataTypeOf :: HsWrap hs_syn -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsWrap hs_syn)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsWrap hs_syn)) # gmapT :: (forall b. Data b => b -> b) -> HsWrap hs_syn -> HsWrap hs_syn # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsWrap hs_syn -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsWrap hs_syn -> r # gmapQ :: (forall d. Data d => d -> u) -> HsWrap hs_syn -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsWrap hs_syn -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsWrap hs_syn -> m (HsWrap hs_syn) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsWrap hs_syn -> m (HsWrap hs_syn) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsWrap hs_syn -> m (HsWrap hs_syn) # |
newtype HsSplicedT #
Constructors
HsSplicedT DelayedSplice |
Instances
Data HsSplicedT | |
Defined in GHC.Hs.Expr Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsSplicedT -> c HsSplicedT # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HsSplicedT # toConstr :: HsSplicedT -> Constr # dataTypeOf :: HsSplicedT -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c HsSplicedT) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HsSplicedT) # gmapT :: (forall b. Data b => b -> b) -> HsSplicedT -> HsSplicedT # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsSplicedT -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsSplicedT -> r # gmapQ :: (forall d. Data d => d -> u) -> HsSplicedT -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsSplicedT -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsSplicedT -> m HsSplicedT # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsSplicedT -> m HsSplicedT # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsSplicedT -> m HsSplicedT # |
data HsExpansion a b #
Constructors
HsExpanded a b |
Instances
(Data a, Data b) => Data (HsExpansion a b) | |
Defined in GHC.Hs.Expr Methods gfoldl :: (forall d b0. Data d => c (d -> b0) -> d -> c b0) -> (forall g. g -> c g) -> HsExpansion a b -> c (HsExpansion a b) # gunfold :: (forall b0 r. Data b0 => c (b0 -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsExpansion a b) # toConstr :: HsExpansion a b -> Constr # dataTypeOf :: HsExpansion a b -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsExpansion a b)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsExpansion a b)) # gmapT :: (forall b0. Data b0 => b0 -> b0) -> HsExpansion a b -> HsExpansion a b # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsExpansion a b -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsExpansion a b -> r # gmapQ :: (forall d. Data d => d -> u) -> HsExpansion a b -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsExpansion a b -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsExpansion a b -> m (HsExpansion a b) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsExpansion a b -> m (HsExpansion a b) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsExpansion a b -> m (HsExpansion a b) # | |
(Outputable a, Outputable b) => Outputable (HsExpansion a b) | Just print the original expression (the |
Defined in GHC.Hs.Expr Methods ppr :: HsExpansion a b -> SDoc # |
Instances
Data GrhsAnn | |
Defined in GHC.Hs.Expr Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GrhsAnn -> c GrhsAnn # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c GrhsAnn # toConstr :: GrhsAnn -> Constr # dataTypeOf :: GrhsAnn -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c GrhsAnn) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c GrhsAnn) # gmapT :: (forall b. Data b => b -> b) -> GrhsAnn -> GrhsAnn # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GrhsAnn -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GrhsAnn -> r # gmapQ :: (forall d. Data d => d -> u) -> GrhsAnn -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> GrhsAnn -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> GrhsAnn -> m GrhsAnn # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GrhsAnn -> m GrhsAnn # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GrhsAnn -> m GrhsAnn # | |
Outputable GrhsAnn | |
Defined in GHC.Hs.Expr |
data EpAnnUnboundVar #
Constructors
EpAnnUnboundVar | |
Fields |
Instances
Data EpAnnUnboundVar | |
Defined in GHC.Hs.Expr Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> EpAnnUnboundVar -> c EpAnnUnboundVar # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c EpAnnUnboundVar # toConstr :: EpAnnUnboundVar -> Constr # dataTypeOf :: EpAnnUnboundVar -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c EpAnnUnboundVar) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c EpAnnUnboundVar) # gmapT :: (forall b. Data b => b -> b) -> EpAnnUnboundVar -> EpAnnUnboundVar # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> EpAnnUnboundVar -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> EpAnnUnboundVar -> r # gmapQ :: (forall d. Data d => d -> u) -> EpAnnUnboundVar -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> EpAnnUnboundVar -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> EpAnnUnboundVar -> m EpAnnUnboundVar # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> EpAnnUnboundVar -> m EpAnnUnboundVar # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> EpAnnUnboundVar -> m EpAnnUnboundVar # |
data EpAnnHsCase #
Constructors
EpAnnHsCase | |
Fields |
Instances
Data EpAnnHsCase | |
Defined in GHC.Hs.Expr Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> EpAnnHsCase -> c EpAnnHsCase # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c EpAnnHsCase # toConstr :: EpAnnHsCase -> Constr # dataTypeOf :: EpAnnHsCase -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c EpAnnHsCase) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c EpAnnHsCase) # gmapT :: (forall b. Data b => b -> b) -> EpAnnHsCase -> EpAnnHsCase # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> EpAnnHsCase -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> EpAnnHsCase -> r # gmapQ :: (forall d. Data d => d -> u) -> EpAnnHsCase -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> EpAnnHsCase -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> EpAnnHsCase -> m EpAnnHsCase # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> EpAnnHsCase -> m EpAnnHsCase # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> EpAnnHsCase -> m EpAnnHsCase # |
data DelayedSplice #
Instances
Data DelayedSplice | |
Defined in GHC.Hs.Expr Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DelayedSplice -> c DelayedSplice # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DelayedSplice # toConstr :: DelayedSplice -> Constr # dataTypeOf :: DelayedSplice -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DelayedSplice) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DelayedSplice) # gmapT :: (forall b. Data b => b -> b) -> DelayedSplice -> DelayedSplice # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DelayedSplice -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DelayedSplice -> r # gmapQ :: (forall d. Data d => d -> u) -> DelayedSplice -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> DelayedSplice -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> DelayedSplice -> m DelayedSplice # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DelayedSplice -> m DelayedSplice # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DelayedSplice -> m DelayedSplice # |
Constructors
AnnsLet | |
Fields
|
Instances
Data AnnsLet | |
Defined in GHC.Hs.Expr Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AnnsLet -> c AnnsLet # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AnnsLet # toConstr :: AnnsLet -> Constr # dataTypeOf :: AnnsLet -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c AnnsLet) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AnnsLet) # gmapT :: (forall b. Data b => b -> b) -> AnnsLet -> AnnsLet # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AnnsLet -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AnnsLet -> r # gmapQ :: (forall d. Data d => d -> u) -> AnnsLet -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> AnnsLet -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> AnnsLet -> m AnnsLet # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnsLet -> m AnnsLet # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnsLet -> m AnnsLet # |
Constructors
AnnsIf | |
Fields
|
Instances
Data AnnsIf | |
Defined in GHC.Hs.Expr Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AnnsIf -> c AnnsIf # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AnnsIf # toConstr :: AnnsIf -> Constr # dataTypeOf :: AnnsIf -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c AnnsIf) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AnnsIf) # gmapT :: (forall b. Data b => b -> b) -> AnnsIf -> AnnsIf # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AnnsIf -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AnnsIf -> r # gmapQ :: (forall d. Data d => d -> u) -> AnnsIf -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> AnnsIf -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> AnnsIf -> m AnnsIf # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnsIf -> m AnnsIf # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnsIf -> m AnnsIf # |
data AnnProjection #
Constructors
AnnProjection | |
Fields
|
Instances
Data AnnProjection | |
Defined in GHC.Hs.Expr Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AnnProjection -> c AnnProjection # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AnnProjection # toConstr :: AnnProjection -> Constr # dataTypeOf :: AnnProjection -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c AnnProjection) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AnnProjection) # gmapT :: (forall b. Data b => b -> b) -> AnnProjection -> AnnProjection # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AnnProjection -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AnnProjection -> r # gmapQ :: (forall d. Data d => d -> u) -> AnnProjection -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> AnnProjection -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> AnnProjection -> m AnnProjection # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnProjection -> m AnnProjection # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnProjection -> m AnnProjection # |
data AnnFieldLabel #
Constructors
AnnFieldLabel | |
Fields |
Instances
Data AnnFieldLabel | |
Defined in GHC.Hs.Expr Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AnnFieldLabel -> c AnnFieldLabel # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AnnFieldLabel # toConstr :: AnnFieldLabel -> Constr # dataTypeOf :: AnnFieldLabel -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c AnnFieldLabel) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AnnFieldLabel) # gmapT :: (forall b. Data b => b -> b) -> AnnFieldLabel -> AnnFieldLabel # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AnnFieldLabel -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AnnFieldLabel -> r # gmapQ :: (forall d. Data d => d -> u) -> AnnFieldLabel -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> AnnFieldLabel -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> AnnFieldLabel -> m AnnFieldLabel # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnFieldLabel -> m AnnFieldLabel # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnFieldLabel -> m AnnFieldLabel # |
data AnnExplicitSum #
Constructors
AnnExplicitSum | |
Fields
|
Instances
Data AnnExplicitSum | |
Defined in GHC.Hs.Expr Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AnnExplicitSum -> c AnnExplicitSum # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AnnExplicitSum # toConstr :: AnnExplicitSum -> Constr # dataTypeOf :: AnnExplicitSum -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c AnnExplicitSum) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AnnExplicitSum) # gmapT :: (forall b. Data b => b -> b) -> AnnExplicitSum -> AnnExplicitSum # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AnnExplicitSum -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AnnExplicitSum -> r # gmapQ :: (forall d. Data d => d -> u) -> AnnExplicitSum -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> AnnExplicitSum -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> AnnExplicitSum -> m AnnExplicitSum # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnExplicitSum -> m AnnExplicitSum # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnExplicitSum -> m AnnExplicitSum # |
thTyBrackets :: SDoc -> SDoc #
thBrackets :: SDoc -> SDoc -> SDoc #
ppr_splice_decl :: forall (p :: Pass). OutputableBndrId p => HsSplice (GhcPass p) -> SDoc #
ppr_splice :: forall (p :: Pass). OutputableBndrId p => SDoc -> IdP (GhcPass p) -> LHsExpr (GhcPass p) -> SDoc -> SDoc #
ppr_quasi :: OutputableBndr p => p -> p -> FastString -> SDoc #
ppr_infix_expr :: forall (p :: Pass). OutputableBndrId p => HsExpr (GhcPass p) -> Maybe SDoc #
ppr_do_stmts :: forall (idL :: Pass) (idR :: Pass) body. (OutputableBndrId idL, OutputableBndrId idR, Anno (StmtLR (GhcPass idL) (GhcPass idR) body) ~ SrcSpanAnnA, Outputable body) => [LStmtLR (GhcPass idL) (GhcPass idR) body] -> SDoc #
ppr_apps :: forall (p :: Pass). OutputableBndrId p => HsExpr (GhcPass p) -> [Either (LHsExpr (GhcPass p)) (LHsWcType (NoGhcTc (GhcPass p)))] -> SDoc #
pprTransformStmt :: forall (p :: Pass). OutputableBndrId p => [IdP (GhcPass p)] -> LHsExpr (GhcPass p) -> Maybe (LHsExpr (GhcPass p)) -> SDoc #
pprTransStmt :: Outputable body => Maybe body -> body -> TransForm -> SDoc #
pprStmtInCtxt :: forall (idL :: Pass) (idR :: Pass) body. (OutputableBndrId idL, OutputableBndrId idR, Outputable body, Anno (StmtLR (GhcPass idL) (GhcPass idR) body) ~ SrcSpanAnnA) => HsStmtContext (GhcPass idL) -> StmtLR (GhcPass idL) (GhcPass idR) body -> SDoc #
pprStmt :: forall (idL :: Pass) (idR :: Pass) body. (OutputableBndrId idL, OutputableBndrId idR, Anno (StmtLR (GhcPass idL) (GhcPass idR) body) ~ SrcSpanAnnA, Outputable body) => StmtLR (GhcPass idL) (GhcPass idR) body -> SDoc #
pprQuals :: forall (p :: Pass) body. (OutputableBndrId p, Outputable body, Anno (StmtLR (GhcPass p) (GhcPass p) body) ~ SrcSpanAnnA) => [LStmt (GhcPass p) body] -> SDoc #
pprPendingSplice :: forall (p :: Pass). OutputableBndrId p => SplicePointName -> LHsExpr (GhcPass p) -> SDoc #
pprParendLExpr :: forall (p :: Pass). OutputableBndrId p => PprPrec -> LHsExpr (GhcPass p) -> SDoc #
pprParendExpr :: forall (p :: Pass). OutputableBndrId p => PprPrec -> HsExpr (GhcPass p) -> SDoc #
pprMatches :: forall (idR :: Pass) body. (OutputableBndrId idR, Outputable body) => MatchGroup (GhcPass idR) body -> SDoc #
pprMatchInCtxt :: forall (idR :: Pass) body. (OutputableBndrId idR, Outputable body) => Match (GhcPass idR) body -> SDoc #
pprMatch :: forall (idR :: Pass) body. (OutputableBndrId idR, Outputable body) => Match (GhcPass idR) body -> SDoc #
pprHsBracket :: forall (p :: Pass). OutputableBndrId p => HsBracket (GhcPass p) -> SDoc #
pprGRHSs :: forall (idR :: Pass) body passL. (OutputableBndrId idR, Outputable body) => HsMatchContext passL -> GRHSs (GhcPass idR) body -> SDoc #
pprGRHS :: forall (idR :: Pass) body passL. (OutputableBndrId idR, Outputable body) => HsMatchContext passL -> GRHS (GhcPass idR) body -> SDoc #
pprDo :: forall (p :: Pass) body any. (OutputableBndrId p, Outputable body, Anno (StmtLR (GhcPass p) (GhcPass p) body) ~ SrcSpanAnnA) => HsStmtContext any -> [LStmt (GhcPass p) body] -> SDoc #
pprDebugParendExpr :: forall (p :: Pass). OutputableBndrId p => PprPrec -> LHsExpr (GhcPass p) -> SDoc #
pprComp :: forall (p :: Pass) body. (OutputableBndrId p, Outputable body, Anno (StmtLR (GhcPass p) (GhcPass p) body) ~ SrcSpanAnnA) => [LStmt (GhcPass p) body] -> SDoc #
pprBy :: Outputable body => Maybe body -> SDoc #
pprBinds :: forall (idL :: Pass) (idR :: Pass). (OutputableBndrId idL, OutputableBndrId idR) => HsLocalBindsLR (GhcPass idL) (GhcPass idR) -> SDoc #
pprBindStmt :: (Outputable pat, Outputable expr) => pat -> expr -> SDoc #
pprArg :: forall (idL :: Pass). OutputableBndrId idL => ApplicativeArg (GhcPass idL) -> SDoc #
pp_rhs :: Outputable body => HsMatchContext passL -> body -> SDoc #
parenthesizeHsExpr :: forall (p :: Pass). IsPass p => PprPrec -> LHsExpr (GhcPass p) -> LHsExpr (GhcPass p) #
checks if parenthesizeHsExpr
p e
is true,
and if so, surrounds hsExprNeedsParens
p ee
with an HsPar
. Otherwise, it simply returns e
.
noSyntaxExpr :: forall (p :: Pass). IsPass p => SyntaxExpr (GhcPass p) #
noExpr :: forall (p :: Pass). HsExpr (GhcPass p) #
This is used for rebindable-syntax pieces that are too polymorphic for tcSyntaxOp (trS_fmap and the mzip in ParStmt)
mkSyntaxExpr :: HsExpr GhcRn -> SyntaxExprRn #
Make a 'SyntaxExpr GhcRn' from an expression Used only in getMonadFailOp. See Note [Monad fail : Rebindable syntax, overloaded strings] in GHC.Rename.Expr
mkRnSyntaxExpr :: Name -> SyntaxExprRn #
Make a SyntaxExpr
from a Name
(the "rn" is because this is used in the
renamer).
matchGroupArity :: forall (id :: Pass) body. MatchGroup (GhcPass id) body -> Arity #
matchContextErrString :: forall (p :: Pass). OutputableBndrId p => HsMatchContext (GhcPass p) -> SDoc #
isSingletonMatchGroup :: forall (p :: Pass) body. [LMatch (GhcPass p) body] -> Bool #
Is there only one RHS in this list of matches?
isQuietHsExpr :: HsExpr id -> Bool #
isQuietHsCmd :: HsCmd id -> Bool #
isEmptyMatchGroup :: forall (p :: Pass) body. MatchGroup (GhcPass p) body -> Bool #
hsExprNeedsParens :: forall (p :: Pass). IsPass p => PprPrec -> HsExpr (GhcPass p) -> Bool #
returns hsExprNeedsParens
p eTrue
if the expression e
needs
parentheses under precedence p
.
Instances
Data AnnSig | |
Defined in GHC.Hs.Binds Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AnnSig -> c AnnSig # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AnnSig # toConstr :: AnnSig -> Constr # dataTypeOf :: AnnSig -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c AnnSig) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AnnSig) # gmapT :: (forall b. Data b => b -> b) -> AnnSig -> AnnSig # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AnnSig -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AnnSig -> r # gmapQ :: (forall d. Data d => d -> u) -> AnnSig -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> AnnSig -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> AnnSig -> m AnnSig # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnSig -> m AnnSig # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnSig -> m AnnSig # |
pragSrcBrackets :: SourceText -> String -> SDoc -> SDoc #
Using SourceText in case the pragma was spelled differently or used mixed case
pragBrackets :: SDoc -> SDoc #
ppr_monobind :: forall (idL :: Pass) (idR :: Pass). (OutputableBndrId idL, OutputableBndrId idR) => HsBindLR (GhcPass idL) (GhcPass idR) -> SDoc #
pprVarSig :: OutputableBndr id => [id] -> SDoc -> SDoc #
pprTcSpecPrags :: TcSpecPrags -> SDoc #
pprSpec :: OutputableBndr id => id -> SDoc -> InlinePragma -> SDoc #
pprMinimalSig :: OutputableBndr name => LBooleanFormula (GenLocated l name) -> SDoc #
pprLHsBindsForUser :: forall (idL :: Pass) (idR :: Pass) (id2 :: Pass). (OutputableBndrId idL, OutputableBndrId idR, OutputableBndrId id2) => LHsBindsLR (GhcPass idL) (GhcPass idR) -> [LSig (GhcPass id2)] -> [SDoc] #
pprLHsBinds :: forall (idL :: Pass) (idR :: Pass). (OutputableBndrId idL, OutputableBndrId idR) => LHsBindsLR (GhcPass idL) (GhcPass idR) -> SDoc #
pprDeclList :: [SDoc] -> SDoc #
plusHsValBinds :: forall (a :: Pass). HsValBinds (GhcPass a) -> HsValBinds (GhcPass a) -> HsValBinds (GhcPass a) #
isEmptyValBinds :: forall (a :: Pass) (b :: Pass). HsValBindsLR (GhcPass a) (GhcPass b) -> Bool #
isEmptyLHsBinds :: forall (idL :: Pass) idR. LHsBindsLR (GhcPass idL) idR -> Bool #
isEmptyIPBindsTc :: HsIPBinds GhcTc -> Bool #
eqEmptyLocalBinds :: HsLocalBindsLR a b -> Bool #
emptyValBindsOut :: forall (a :: Pass) (b :: Pass). HsValBindsLR (GhcPass a) (GhcPass b) #
emptyValBindsIn :: forall (a :: Pass) (b :: Pass). HsValBindsLR (GhcPass a) (GhcPass b) #
emptyLocalBinds :: forall (a :: Pass) (b :: Pass). HsLocalBindsLR (GhcPass a) (GhcPass b) #
emptyLHsBinds :: forall (idL :: Pass) idR. LHsBindsLR (GhcPass idL) idR #
mkHsAppTy :: forall (p :: Pass). LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p) #
mkHsAppKindTy :: forall (p :: Pass). XAppKindTy (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p) #
pprSpliceDecl :: forall (p :: Pass). OutputableBndrId p => HsSplice (GhcPass p) -> SpliceExplicitFlag -> SDoc #
pprPatBind :: forall (bndr :: Pass) (p :: Pass). (OutputableBndrId bndr, OutputableBndrId p) => LPat (GhcPass bndr) -> GRHSs (GhcPass p) (LHsExpr (GhcPass p)) -> SDoc #
pprFunBind :: forall (idR :: Pass). OutputableBndrId idR => MatchGroup (GhcPass idR) (LHsExpr (GhcPass idR)) -> SDoc #
data UntypedSpliceFlavour #
Instances
Data UntypedSpliceFlavour | |
Defined in Language.Haskell.Syntax.Expr Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UntypedSpliceFlavour -> c UntypedSpliceFlavour # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c UntypedSpliceFlavour # toConstr :: UntypedSpliceFlavour -> Constr # dataTypeOf :: UntypedSpliceFlavour -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c UntypedSpliceFlavour) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c UntypedSpliceFlavour) # gmapT :: (forall b. Data b => b -> b) -> UntypedSpliceFlavour -> UntypedSpliceFlavour # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UntypedSpliceFlavour -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UntypedSpliceFlavour -> r # gmapQ :: (forall d. Data d => d -> u) -> UntypedSpliceFlavour -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> UntypedSpliceFlavour -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> UntypedSpliceFlavour -> m UntypedSpliceFlavour # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UntypedSpliceFlavour -> m UntypedSpliceFlavour # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UntypedSpliceFlavour -> m UntypedSpliceFlavour # |
Instances
Data TransForm | |
Defined in Language.Haskell.Syntax.Expr Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TransForm -> c TransForm # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TransForm # toConstr :: TransForm -> Constr # dataTypeOf :: TransForm -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TransForm) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TransForm) # gmapT :: (forall b. Data b => b -> b) -> TransForm -> TransForm # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TransForm -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TransForm -> r # gmapQ :: (forall d. Data d => d -> u) -> TransForm -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> TransForm -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> TransForm -> m TransForm # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TransForm -> m TransForm # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TransForm -> m TransForm # |
newtype ThModFinalizers #
Finalizers produced by a splice with
addModFinalizer
See Note [Delaying modFinalizers in untyped splices] in GHC.Rename.Splice. For how this is used.
Constructors
ThModFinalizers [ForeignRef (Q ())] |
Instances
Data ThModFinalizers | |
Defined in Language.Haskell.Syntax.Expr Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ThModFinalizers -> c ThModFinalizers # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ThModFinalizers # toConstr :: ThModFinalizers -> Constr # dataTypeOf :: ThModFinalizers -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ThModFinalizers) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ThModFinalizers) # gmapT :: (forall b. Data b => b -> b) -> ThModFinalizers -> ThModFinalizers # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ThModFinalizers -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ThModFinalizers -> r # gmapQ :: (forall d. Data d => d -> u) -> ThModFinalizers -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ThModFinalizers -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ThModFinalizers -> m ThModFinalizers # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ThModFinalizers -> m ThModFinalizers # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ThModFinalizers -> m ThModFinalizers # |
Exact print annotations when in qualifier lists or guards
- AnnKeywordId
: AnnVbar
,
AnnComma
,AnnThen
,
AnnBy
,AnnBy
,
AnnGroup
,AnnUsing
Constructors
LastStmt (XLastStmt idL idR body) body (Maybe Bool) (SyntaxExpr idR) | |
BindStmt | |
Fields | |
ApplicativeStmt (XApplicativeStmt idL idR body) [(SyntaxExpr idR, ApplicativeArg idL)] (Maybe (SyntaxExpr idR)) |
For full details, see Note [ApplicativeDo] in GHC.Rename.Expr |
BodyStmt (XBodyStmt idL idR body) body (SyntaxExpr idR) (SyntaxExpr idR) | |
LetStmt (XLetStmt idL idR body) (HsLocalBindsLR idL idR) |
|
ParStmt (XParStmt idL idR body) [ParStmtBlock idL idR] (HsExpr idR) (SyntaxExpr idR) | |
TransStmt | |
RecStmt | |
Fields
| |
XStmtLR !(XXStmtLR idL idR body) |
Instances
type SplicePointName = Name #
data SpliceDecoration #
A splice can appear with various decorations wrapped around it. This data type captures explicitly how it was originally written, for use in the pretty printer.
Constructors
DollarSplice | $splice or $$splice |
BareSplice | bare splice |
Instances
type RecUpdProj p = RecProj p (LHsExpr p) #
type RecProj p arg = HsRecField' (FieldLabelStrings p) arg #
type family PendingTcSplice' p #
Instances
type PendingTcSplice' (GhcPass _1) | |
Defined in GHC.Hs.Expr |
type family PendingRnSplice' p #
Instances
type PendingRnSplice' (GhcPass _1) | |
Defined in GHC.Hs.Expr |
data ParStmtBlock idL idR #
Parenthesised Statement Block
Constructors
ParStmtBlock (XParStmtBlock idL idR) [ExprLStmt idL] [IdP idR] (SyntaxExpr idR) | |
XParStmtBlock !(XXParStmtBlock idL idR) |
data MatchGroupTc #
Constructors
MatchGroupTc | |
Fields
|
Instances
Data MatchGroupTc | |
Defined in Language.Haskell.Syntax.Expr Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> MatchGroupTc -> c MatchGroupTc # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c MatchGroupTc # toConstr :: MatchGroupTc -> Constr # dataTypeOf :: MatchGroupTc -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c MatchGroupTc) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c MatchGroupTc) # gmapT :: (forall b. Data b => b -> b) -> MatchGroupTc -> MatchGroupTc # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> MatchGroupTc -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> MatchGroupTc -> r # gmapQ :: (forall d. Data d => d -> u) -> MatchGroupTc -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> MatchGroupTc -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> MatchGroupTc -> m MatchGroupTc # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> MatchGroupTc -> m MatchGroupTc # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> MatchGroupTc -> m MatchGroupTc # |
Instances
type Anno [LocatedA (Match (GhcPass p) (LocatedA (HsCmd (GhcPass p))))] | |
Defined in GHC.Hs.Expr | |
type Anno [LocatedA (Match (GhcPass p) (LocatedA (HsExpr (GhcPass p))))] | |
Defined in GHC.Hs.Expr | |
type Anno [LocatedA (Match GhcPs (LocatedA (PatBuilder GhcPs)))] | |
Defined in GHC.Parser.PostProcess | |
type Anno (Match (GhcPass p) (LocatedA (HsCmd (GhcPass p)))) | |
Defined in GHC.Hs.Expr | |
type Anno (Match (GhcPass p) (LocatedA (HsExpr (GhcPass p)))) | |
Defined in GHC.Hs.Expr | |
type Anno (Match GhcPs (LocatedA (PatBuilder GhcPs))) | |
Defined in GHC.Parser.PostProcess |
type LStmtLR idL idR body = XRec idL (StmtLR idL idR body) #
Located Statement with separate Left and Right id's
type LMatch id body = XRec id (Match id body) #
Located Match
May have AnnKeywordId
: AnnSemi
when in a
list
type LHsTupArg id = XRec id (HsTupArg id) #
Located Haskell Tuple Argument
HsTupArg
is used for tuple sections
(,a,)
is represented by
ExplicitTuple [Missing ty1, Present a, Missing ty3]
Which in turn stands for (x:ty1 y:ty2. (x,a,y))
type LHsRecUpdProj p = XRec p (RecUpdProj p) #
type LHsRecProj p arg = XRec p (RecProj p arg) #
type LHsCmdTop p = XRec p (HsCmdTop p) #
Top-level command, introducing a new arrow. This may occur inside a proc (where the stack is empty) or as an argument of a command-forming operator.
Located Haskell Top-level Command
Haskell Tuple Argument
data HsStmtContext p #
Haskell Statement Context.
Constructors
ListComp | |
MonadComp | |
DoExpr (Maybe ModuleName) |
|
MDoExpr (Maybe ModuleName) |
|
ArrowExpr | do-notation in an arrow-command context |
GhciStmtCtxt | A command-line Stmt in GHCi pat <- rhs |
PatGuard (HsMatchContext p) | Pattern guard for specified thing |
ParStmtCtxt (HsStmtContext p) | A branch of a parallel stmt |
TransStmtCtxt (HsStmtContext p) | A branch of a transform stmt |
data HsSplicedThing id #
Haskell Spliced Thing
Values that can result from running a splice.
Constructors
HsSplicedExpr (HsExpr id) | Haskell Spliced Expression |
HsSplicedTy (HsType id) | Haskell Spliced Type |
HsSplicedPat (Pat id) | Haskell Spliced Pattern |
type HsRecordBinds p = HsRecFields p (LHsExpr p) #
Haskell Record Bindings
A pragma, written as {-# ... #-}, that may appear within an expression.
data HsMatchContext p #
Haskell Match Context
Context of a pattern match. This is more subtle than it would seem. See Note [Varieties of pattern matches].
Constructors
FunRhs | |
Fields
| |
LambdaExpr | Patterns of a lambda |
CaseAlt | Patterns and guards on a case alternative |
IfAlt | Guards of a multi-way if alternative |
ArrowMatchCtxt HsArrowMatchContext | A pattern match inside arrow notation |
PatBindRhs | A pattern binding eg [y] <- e = e |
PatBindGuards | Guards of pattern bindings, e.g., (Just b) | Just _ <- x = e | otherwise = e' |
RecUpd | Record update [used only in GHC.HsToCore.Expr to tell matchWrapper what sort of runtime error message to generate] |
StmtCtxt (HsStmtContext p) | Pattern of a do-stmt, list comprehension, pattern guard, etc |
ThPatSplice | A Template Haskell pattern splice |
ThPatQuote | A Template Haskell pattern quotation [p| (a,b) |] |
PatSyn | A pattern synonym declaration |
data HsFieldLabel p #
Constructors
HsFieldLabel | |
Fields | |
XHsFieldLabel !(XXHsFieldLabel p) |
Instances
Outputable (HsFieldLabel p) | |
Defined in Language.Haskell.Syntax.Expr Methods ppr :: HsFieldLabel p -> SDoc # |
The AST used to hard-refer to GhcPass, which was a layer violation. For now, we paper it over with this new extension point.
Haskell Top-level Command
Haskell Command (e.g. a "statement" in an Arrow proc block)
Constructors
HsCmdArrApp (XCmdArrApp id) (LHsExpr id) (LHsExpr id) HsArrAppType Bool | |
HsCmdArrForm (XCmdArrForm id) (LHsExpr id) LexicalFixity (Maybe Fixity) [LHsCmdTop id] |
|
HsCmdApp (XCmdApp id) (LHsCmd id) (LHsExpr id) | |
HsCmdLam (XCmdLam id) (MatchGroup id (LHsCmd id)) | |
HsCmdPar (XCmdPar id) (LHsCmd id) |
|
HsCmdCase (XCmdCase id) (LHsExpr id) (MatchGroup id (LHsCmd id)) |
|
HsCmdLamCase (XCmdLamCase id) (MatchGroup id (LHsCmd id)) |
|
HsCmdIf (XCmdIf id) (SyntaxExpr id) (LHsExpr id) (LHsCmd id) (LHsCmd id) | |
HsCmdLet (XCmdLet id) (HsLocalBinds id) (LHsCmd id) |
|
HsCmdDo (XCmdDo id) (XRec id [CmdLStmt id]) | |
XCmd !(XXCmd id) |
Instances
type family HsBracketRn p #
Instances
type HsBracketRn (GhcPass _1) | |
Defined in GHC.Hs.Expr |
Haskell Bracket
data HsArrowMatchContext #
Haskell arrow match context.
Constructors
ProcExpr | A proc expression |
ArrowCaseAlt | A case alternative inside arrow notation |
KappaExpr | An arrow kappa abstraction |
data HsArrAppType #
Haskell Array Application Type
Constructors
HsHigherOrderApp | |
HsFirstOrderApp |
Instances
Data HsArrAppType | |
Defined in Language.Haskell.Syntax.Expr Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsArrAppType -> c HsArrAppType # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HsArrAppType # toConstr :: HsArrAppType -> Constr # dataTypeOf :: HsArrAppType -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c HsArrAppType) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HsArrAppType) # gmapT :: (forall b. Data b => b -> b) -> HsArrAppType -> HsArrAppType # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsArrAppType -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsArrAppType -> r # gmapQ :: (forall d. Data d => d -> u) -> HsArrAppType -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsArrAppType -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsArrAppType -> m HsArrAppType # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsArrAppType -> m HsArrAppType # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsArrAppType -> m HsArrAppType # |
type GuardLStmt id = LStmt id (LHsExpr id) #
Guard Located Statement
Guarded Right Hand Side.
Constructors
GRHS (XCGRHS p body) [GuardLStmt p] body | |
XGRHS !(XXGRHS p body) |
newtype FieldLabelStrings p #
RecordDotSyntax field updates
Constructors
FieldLabelStrings [Located (HsFieldLabel p)] |
Instances
Outputable (FieldLabelStrings p) | |
Defined in Language.Haskell.Syntax.Expr Methods ppr :: FieldLabelStrings p -> SDoc # | |
OutputableBndr (FieldLabelStrings p) | |
Defined in Language.Haskell.Syntax.Expr Methods pprBndr :: BindingSite -> FieldLabelStrings p -> SDoc # pprPrefixOcc :: FieldLabelStrings p -> SDoc # pprInfixOcc :: FieldLabelStrings p -> SDoc # bndrIsJoin_maybe :: FieldLabelStrings p -> Maybe Int # |
type FailOperator id = Maybe (SyntaxExpr id) #
The fail operator
This is used for `.. <-` "bind statements" in do notation, including non-monadic "binds" in applicative.
The fail operator is 'Just expr' if it potentially fail monadically. if the
pattern match cannot fail, or shouldn't fail monadically (regular incomplete
pattern exception), it is Nothing
.
See Note [Monad fail : Rebindable syntax, overloaded strings] for the type of
expression in the Just
case, and why it is so.
See Note [Failing pattern matches in Stmts] for which contexts for
'BindStmt
's should use the monadic fail and which shouldn't.
type CmdSyntaxTable p = [(Name, HsExpr p)] #
Command Syntax Table (for Arrow syntax)
data ArithSeqInfo id #
Arithmetic Sequence Information
type family ApplicativeArgStmCtxPass idL #
Instances
type ApplicativeArgStmCtxPass _1 | |
Defined in GHC.Hs.Expr |
data ApplicativeArg idL #
Applicative Argument
Constructors
ApplicativeArgOne | |
Fields
| |
ApplicativeArgMany | |
Fields
| |
XApplicativeArg !(XXApplicativeArg idL) |
prependQualified :: Maybe ModuleName -> SDoc -> SDoc #
pprStmtContext :: (Outputable (IdP p), UnXRec p) => HsStmtContext p -> SDoc #
pprMatchContextNoun :: (Outputable (IdP p), UnXRec p) => HsMatchContext p -> SDoc #
pprMatchContext :: (Outputable (IdP p), UnXRec p) => HsMatchContext p -> SDoc #
pprFieldLabelStrings :: FieldLabelStrings p -> SDoc #
pprExternalSrcLoc :: (StringLiteral, (Int, Int), (Int, Int)) -> SDoc #
pprAStmtContext :: (Outputable (IdP p), UnXRec p) => HsStmtContext p -> SDoc #
matchSeparator :: HsMatchContext p -> SDoc #
isTypedSplice :: HsSplice id -> Bool #
isTypedBracket :: HsBracket id -> Bool #
isPatSynCtxt :: HsMatchContext p -> Bool #
isMonadStmtContext :: HsStmtContext id -> Bool #
Is this a monadic context?
isMonadCompContext :: HsStmtContext id -> Bool #
isInfixMatch :: Match id body -> Bool #
isComprehensionContext :: HsStmtContext id -> Bool #
Warning pragma Declarations
Constructors
Warnings | |
Fields
| |
XWarnDecls !(XXWarnDecls pass) |
Instances
type Anno (WarnDecls (GhcPass p)) | |
Defined in GHC.Hs.Decls |
Warning pragma Declaration
Constructors
Warning (XWarning pass) [LIdP pass] WarningTxt | |
XWarnDecl !(XXWarnDecl pass) |
Instances
type Anno (WarnDecl (GhcPass p)) | |
Defined in GHC.Hs.Decls |
type TyFamInstEqn pass = FamEqn pass (LHsType pass) #
Type Family Instance Equation
data TyFamInstDecl pass #
Type Family Instance Declaration
Constructors
TyFamInstDecl | |
Fields
| |
XTyFamInstDecl !(XXTyFamInstDecl pass) |
Instances
type Anno (TyFamInstDecl (GhcPass p)) | |
Defined in GHC.Hs.Decls |
type TyFamDefltDecl = TyFamInstDecl #
Type family default declarations.
A convenient synonym for TyFamInstDecl
.
See Note [Type family instance declarations in HsSyn]
.
Type or Class Group
Constructors
TyClGroup | |
Fields
| |
XTyClGroup !(XXTyClGroup pass) |
A type or class declaration.
Constructors
FamDecl | type/data family T :: *->* |
Fields
| |
SynDecl |
|
Fields
| |
DataDecl |
|
Fields
| |
ClassDecl | |
Fields
| |
XTyClDecl !(XXTyClDecl pass) |
Instances
type Anno (TyClDecl (GhcPass p)) | |
Defined in GHC.Hs.Decls |
data StandaloneKindSig pass #
Constructors
StandaloneKindSig (XStandaloneKindSig pass) (LIdP pass) (LHsSigType pass) | |
XStandaloneKindSig !(XXStandaloneKindSig pass) |
Instances
type Anno (StandaloneKindSig (GhcPass p)) | |
Defined in GHC.Hs.Decls |
data SpliceDecl p #
Splice Declaration
Constructors
SpliceDecl (XSpliceDecl p) (XRec p (HsSplice p)) SpliceExplicitFlag | |
XSpliceDecl !(XXSpliceDecl p) |
Instances
type Anno (SpliceDecl (GhcPass p)) | |
Defined in GHC.Hs.Decls |
Rule Declarations
Constructors
HsRules | |
Fields
| |
XRuleDecls !(XXRuleDecls pass) |
Instances
type Anno (RuleDecls (GhcPass p)) | |
Defined in GHC.Hs.Decls |
Rule Declaration
Constructors
HsRule | |
Fields
| |
XRuleDecl !(XXRuleDecl pass) |
Instances
type Anno (RuleDecl (GhcPass p)) | |
Defined in GHC.Hs.Decls |
Rule Binder
Constructors
RuleBndr (XCRuleBndr pass) (LIdP pass) | |
RuleBndrSig (XRuleBndrSig pass) (LIdP pass) (HsPatSigType pass) | |
XRuleBndr !(XXRuleBndr pass) |
data RoleAnnotDecl pass #
Role Annotation Declaration
Constructors
RoleAnnotDecl (XCRoleAnnotDecl pass) (LIdP pass) [XRec pass (Maybe Role)] | |
XRoleAnnotDecl !(XXRoleAnnotDecl pass) |
Instances
type Anno (RoleAnnotDecl (GhcPass p)) | |
Defined in GHC.Hs.Decls |
Instances
Data NewOrData | |
Defined in Language.Haskell.Syntax.Decls Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> NewOrData -> c NewOrData # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c NewOrData # toConstr :: NewOrData -> Constr # dataTypeOf :: NewOrData -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c NewOrData) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NewOrData) # gmapT :: (forall b. Data b => b -> b) -> NewOrData -> NewOrData # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NewOrData -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NewOrData -> r # gmapQ :: (forall d. Data d => d -> u) -> NewOrData -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> NewOrData -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> NewOrData -> m NewOrData # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> NewOrData -> m NewOrData # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> NewOrData -> m NewOrData # | |
Outputable NewOrData | |
Defined in Language.Haskell.Syntax.Decls | |
Eq NewOrData | |
type LWarnDecls pass = XRec pass (WarnDecls pass) #
Located Warning Declarations
type LTyFamInstEqn pass #
Arguments
= XRec pass (TyFamInstEqn pass) | May have |
Located Type Family Instance Equation
type LTyFamInstDecl pass = XRec pass (TyFamInstDecl pass) #
Located Type Family Instance Declaration
type LTyFamDefltDecl pass = XRec pass (TyFamDefltDecl pass) #
Located type family default declarations.
type LStandaloneKindSig pass = XRec pass (StandaloneKindSig pass) #
Located Standalone Kind Signature
type LSpliceDecl pass = XRec pass (SpliceDecl pass) #
Located Splice Declaration
type LRuleDecls pass = XRec pass (RuleDecls pass) #
Located Rule Declarations
type LRoleAnnotDecl pass = XRec pass (RoleAnnotDecl pass) #
Located Role Annotation Declaration
type LInjectivityAnn pass = XRec pass (InjectivityAnn pass) #
Located Injectivity Annotation
type LHsDerivingClause pass = XRec pass (HsDerivingClause pass) #
type LForeignDecl pass = XRec pass (ForeignDecl pass) #
Located Foreign Declaration
type LFamilyResultSig pass = XRec pass (FamilyResultSig pass) #
Located type Family Result Signature
type LFamilyDecl pass = XRec pass (FamilyDecl pass) #
Located type Family Declaration
type LDerivStrategy pass = XRec pass (DerivStrategy pass) #
type LDerivDecl pass = XRec pass (DerivDecl pass) #
Located stand-alone 'deriving instance' declaration
type LDerivClauseTys pass = XRec pass (DerivClauseTys pass) #
type LDefaultDecl pass = XRec pass (DefaultDecl pass) #
Located Default Declaration
type LDataFamInstDecl pass = XRec pass (DataFamInstDecl pass) #
Located Data Family Instance Declaration
Arguments
= XRec pass (ConDecl pass) | May have |
Located data Constructor Declaration
type LClsInstDecl pass = XRec pass (ClsInstDecl pass) #
Located Class Instance Declaration
Instance Declaration
Constructors
ClsInstD | |
Fields
| |
DataFamInstD | |
Fields
| |
TyFamInstD | |
Fields
| |
XInstDecl !(XXInstDecl pass) |
Instances
type Anno (InstDecl (GhcPass p)) | |
Defined in GHC.Hs.Decls |
data InjectivityAnn pass #
If the user supplied an injectivity annotation it is represented using InjectivityAnn. At the moment this is a single injectivity condition - see Note [Injectivity annotation]. `Located name` stores the LHS of injectivity condition. `[Located name]` stores the RHS of injectivity condition. Example:
type family Foo a b c = r | r -> a c where ...
This will be represented as "InjectivityAnn r
[a
, c
]"
Constructors
InjectivityAnn (XCInjectivityAnn pass) (LIdP pass) [LIdP pass] | |
XInjectivityAnn !(XXInjectivityAnn pass) |
Instances
type Anno (InjectivityAnn (GhcPass p)) | |
Defined in GHC.Hs.Decls |
type HsTyPats pass = [LHsTypeArg pass] #
Haskell Type Patterns
Instances
Data HsRuleRn | |
Defined in Language.Haskell.Syntax.Decls Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsRuleRn -> c HsRuleRn # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HsRuleRn # toConstr :: HsRuleRn -> Constr # dataTypeOf :: HsRuleRn -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c HsRuleRn) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HsRuleRn) # gmapT :: (forall b. Data b => b -> b) -> HsRuleRn -> HsRuleRn # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsRuleRn -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsRuleRn -> r # gmapQ :: (forall d. Data d => d -> u) -> HsRuleRn -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsRuleRn -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsRuleRn -> m HsRuleRn # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsRuleRn -> m HsRuleRn # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsRuleRn -> m HsRuleRn # |
Constructors
HsGroup | |
Fields
| |
XHsGroup !(XXHsGroup p) |
data HsDerivingClause pass #
A single deriving
clause of a data declaration.
Constructors
HsDerivingClause | |
Fields
| |
XHsDerivingClause !(XXHsDerivingClause pass) |
Instances
type Anno (HsDerivingClause (GhcPass p)) | |
Defined in GHC.Hs.Decls |
type HsDeriving pass #
Arguments
= [LHsDerivingClause pass] | The optional The list of |
Haskell Deriving clause
A Haskell Declaration
Constructors
TyClD (XTyClD p) (TyClDecl p) | Type or Class Declaration |
InstD (XInstD p) (InstDecl p) | Instance declaration |
DerivD (XDerivD p) (DerivDecl p) | Deriving declaration |
ValD (XValD p) (HsBind p) | Value declaration |
SigD (XSigD p) (Sig p) | Signature declaration |
KindSigD (XKindSigD p) (StandaloneKindSig p) | Standalone kind signature |
DefD (XDefD p) (DefaultDecl p) | 'default' declaration |
ForD (XForD p) (ForeignDecl p) | Foreign declaration |
WarningD (XWarningD p) (WarnDecls p) | Warning declaration |
AnnD (XAnnD p) (AnnDecl p) | Annotation declaration |
RuleD (XRuleD p) (RuleDecls p) | Rule declaration |
SpliceD (XSpliceD p) (SpliceDecl p) | Splice declaration (Includes quasi-quotes) |
DocD (XDocD p) DocDecl | Documentation comment declaration |
RoleAnnotD (XRoleAnnotD p) (RoleAnnotDecl p) | Role annotation declaration |
XHsDecl !(XXHsDecl p) |
Instances
type Anno (HsDecl (GhcPass _1)) | |
Defined in GHC.Hs.Decls |
data HsDataDefn pass #
Haskell Data type Definition
Constructors
HsDataDefn | Declares a data type or newtype, giving its constructors
|
Fields
| |
XHsDataDefn !(XXHsDataDefn pass) |
type HsConDeclH98Details pass = HsConDetails Void (HsScaled pass (LBangType pass)) (XRec pass [LConDeclField pass]) #
The arguments in a Haskell98-style data constructor.
data HsConDeclGADTDetails pass #
The arguments in a GADT constructor. Unlike Haskell98-style constructors,
GADT constructors cannot be declared with infix syntax. As a result, we do
not use HsConDetails
here, as InfixCon
would be an unrepresentable
state. (There is a notion of infix GADT constructors for the purposes of
derived Show instances—see Note [Infix GADT constructors] in
GHC.Tc.TyCl—but that is an orthogonal concern.)
Constructors
PrefixConGADT [HsScaled pass (LBangType pass)] | |
RecConGADT (XRec pass [LConDeclField pass]) |
Instances
type Anno (FunDep (GhcPass p)) | |
Defined in GHC.Hs.Decls |
data ForeignImport #
Constructors
CImport (Located CCallConv) (Located Safety) (Maybe Header) CImportSpec (Located SourceText) |
Instances
Data ForeignImport | |
Defined in Language.Haskell.Syntax.Decls Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ForeignImport -> c ForeignImport # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ForeignImport # toConstr :: ForeignImport -> Constr # dataTypeOf :: ForeignImport -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ForeignImport) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ForeignImport) # gmapT :: (forall b. Data b => b -> b) -> ForeignImport -> ForeignImport # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ForeignImport -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ForeignImport -> r # gmapQ :: (forall d. Data d => d -> u) -> ForeignImport -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ForeignImport -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ForeignImport -> m ForeignImport # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ForeignImport -> m ForeignImport # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ForeignImport -> m ForeignImport # | |
Outputable ForeignImport | |
Defined in Language.Haskell.Syntax.Decls Methods ppr :: ForeignImport -> SDoc # |
data ForeignExport #
Constructors
CExport (Located CExportSpec) (Located SourceText) |
Instances
Data ForeignExport | |
Defined in Language.Haskell.Syntax.Decls Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ForeignExport -> c ForeignExport # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ForeignExport # toConstr :: ForeignExport -> Constr # dataTypeOf :: ForeignExport -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ForeignExport) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ForeignExport) # gmapT :: (forall b. Data b => b -> b) -> ForeignExport -> ForeignExport # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ForeignExport -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ForeignExport -> r # gmapQ :: (forall d. Data d => d -> u) -> ForeignExport -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ForeignExport -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ForeignExport -> m ForeignExport # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ForeignExport -> m ForeignExport # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ForeignExport -> m ForeignExport # | |
Outputable ForeignExport | |
Defined in Language.Haskell.Syntax.Decls Methods ppr :: ForeignExport -> SDoc # |
data ForeignDecl pass #
Foreign Declaration
Constructors
ForeignImport | |
Fields
| |
ForeignExport | |
Fields
| |
XForeignDecl !(XXForeignDecl pass) |
Instances
type Anno (ForeignDecl (GhcPass p)) | |
Defined in GHC.Hs.Decls |
data FamilyResultSig pass #
type Family Result Signature
Constructors
NoSig (XNoSig pass) | |
KindSig (XCKindSig pass) (LHsKind pass) | |
TyVarSig (XTyVarSig pass) (LHsTyVarBndr () pass) | |
XFamilyResultSig !(XXFamilyResultSig pass) |
Instances
type Anno (FamilyResultSig (GhcPass p)) | |
Defined in GHC.Hs.Decls |
data FamilyInfo pass #
Constructors
DataFamily | |
OpenTypeFamily | |
ClosedTypeFamily (Maybe [LTyFamInstEqn pass]) |
|
Instances
Outputable (FamilyInfo pass) | |
Defined in Language.Haskell.Syntax.Decls Methods ppr :: FamilyInfo pass -> SDoc # |
data FamilyDecl pass #
type Family Declaration
Constructors
FamilyDecl | |
Fields
| |
XFamilyDecl !(XXFamilyDecl pass) |
Instances
type Anno (FamilyDecl (GhcPass p)) | |
Defined in GHC.Hs.Decls |
Family Equation
One equation in a type family instance declaration, data family instance declaration, or type family default. See Note [Type family instance declarations in HsSyn] See Note [Family instance declaration binders]
Constructors
FamEqn | |
Fields
| |
XFamEqn !(XXFamEqn pass rhs) |
Instances
type Anno (FamEqn (GhcPass p) _1) | |
Defined in GHC.Hs.Decls | |
type Anno (FamEqn (GhcPass p) _1) | |
Defined in GHC.Hs.Decls | |
type Anno (FamEqn p (LocatedA (HsType p))) | |
Defined in GHC.Hs.Decls |
Documentation comment Declaration
Constructors
DocCommentNext HsDocString | |
DocCommentPrev HsDocString | |
DocCommentNamed String HsDocString | |
DocGroup Int HsDocString |
Instances
Data DocDecl | |
Defined in Language.Haskell.Syntax.Decls Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DocDecl -> c DocDecl # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DocDecl # toConstr :: DocDecl -> Constr # dataTypeOf :: DocDecl -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DocDecl) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DocDecl) # gmapT :: (forall b. Data b => b -> b) -> DocDecl -> DocDecl # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DocDecl -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DocDecl -> r # gmapQ :: (forall d. Data d => d -> u) -> DocDecl -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> DocDecl -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> DocDecl -> m DocDecl # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DocDecl -> m DocDecl # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DocDecl -> m DocDecl # | |
Outputable DocDecl | |
Defined in Language.Haskell.Syntax.Decls | |
type Anno DocDecl | |
Defined in GHC.Hs.Decls |
data DerivStrategy pass #
Which technique the user explicitly requested when deriving an instance.
Constructors
StockStrategy (XStockStrategy pass) | GHC's "standard" strategy, which is to implement a
custom instance for the data type. This only works
for certain types that GHC knows about (e.g., |
AnyclassStrategy (XAnyClassStrategy pass) | -XDeriveAnyClass |
NewtypeStrategy (XNewtypeStrategy pass) | -XGeneralizedNewtypeDeriving |
ViaStrategy (XViaStrategy pass) | -XDerivingVia |
Instances
type Anno (DerivStrategy (GhcPass p)) | |
Defined in GHC.Hs.Decls |
Stand-alone 'deriving instance' declaration
Constructors
DerivDecl | |
Fields
| |
XDerivDecl !(XXDerivDecl pass) |
Instances
type Anno (DerivDecl (GhcPass p)) | |
Defined in GHC.Hs.Decls |
data DerivClauseTys pass #
The types mentioned in a single deriving
clause. This can come in two
forms, DctSingle
or DctMulti
, depending on whether the types are
surrounded by enclosing parentheses or not. These parentheses are
semantically different than HsParTy
. For example, deriving ()
means
"derive zero classes" rather than "derive an instance of the 0-tuple".
DerivClauseTys
use LHsSigType
because deriving
clauses can mention
type variables that aren't bound by the datatype, e.g.
data T b = ... deriving (C [a])
should produce a derived instance for C [a] (T b)
.
Constructors
DctSingle (XDctSingle pass) (LHsSigType pass) | A Example: |
DctMulti (XDctMulti pass) [LHsSigType pass] | A Example: |
XDerivClauseTys !(XXDerivClauseTys pass) |
Instances
type Anno (DerivClauseTys (GhcPass _1)) | |
Defined in GHC.Hs.Decls |
data DefaultDecl pass #
Default Declaration
Constructors
DefaultDecl (XCDefaultDecl pass) [LHsType pass] | |
XDefaultDecl !(XXDefaultDecl pass) |
Instances
type Anno (DefaultDecl (GhcPass p)) | |
Defined in GHC.Hs.Decls |
newtype DataFamInstDecl pass #
Data Family Instance Declaration
Constructors
DataFamInstDecl | |
Fields
|
Instances
type Anno (DataFamInstDecl (GhcPass p)) | |
Defined in GHC.Hs.Decls |
data DataDeclRn #
Constructors
DataDeclRn | |
Fields
|
Instances
Data DataDeclRn | |
Defined in Language.Haskell.Syntax.Decls Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DataDeclRn -> c DataDeclRn # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DataDeclRn # toConstr :: DataDeclRn -> Constr # dataTypeOf :: DataDeclRn -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DataDeclRn) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DataDeclRn) # gmapT :: (forall b. Data b => b -> b) -> DataDeclRn -> DataDeclRn # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DataDeclRn -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DataDeclRn -> r # gmapQ :: (forall d. Data d => d -> u) -> DataDeclRn -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> DataDeclRn -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> DataDeclRn -> m DataDeclRn # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DataDeclRn -> m DataDeclRn # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DataDeclRn -> m DataDeclRn # |
data T b = forall a. Eq a => MkT a b MkT :: forall b a. Eq a => MkT a b data T b where MkT1 :: Int -> T Int data T = IntMkT
Int | MkT2 data T a where IntMkT
Int :: T Int
AnnKeywordId
s :AnnOpen
,AnnDotdot
,AnnCLose
,AnnEqual
,AnnVbar
,AnnDarrow
,AnnDarrow
,AnnForall
,AnnDot
data Constructor Declaration
Constructors
ConDeclGADT | |
Fields
| |
ConDeclH98 | |
Fields
| |
XConDecl !(XXConDecl pass) |
Instances
type Anno (ConDecl (GhcPass p)) | |
Defined in GHC.Hs.Decls |
data ClsInstDecl pass #
Class Instance Declaration
Constructors
ClsInstDecl | |
Fields
| |
XClsInstDecl !(XXClsInstDecl pass) |
Instances
type Anno (ClsInstDecl (GhcPass p)) | |
Defined in GHC.Hs.Decls |
data CImportSpec #
Constructors
CLabel CLabelString | |
CFunction CCallTarget | |
CWrapper |
Instances
Data CImportSpec | |
Defined in Language.Haskell.Syntax.Decls Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CImportSpec -> c CImportSpec # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CImportSpec # toConstr :: CImportSpec -> Constr # dataTypeOf :: CImportSpec -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c CImportSpec) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CImportSpec) # gmapT :: (forall b. Data b => b -> b) -> CImportSpec -> CImportSpec # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CImportSpec -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CImportSpec -> r # gmapQ :: (forall d. Data d => d -> u) -> CImportSpec -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> CImportSpec -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> CImportSpec -> m CImportSpec # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CImportSpec -> m CImportSpec # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CImportSpec -> m CImportSpec # |
data AnnProvenance pass #
Annotation Provenance
Constructors
ValueAnnProvenance (LIdP pass) | |
TypeAnnProvenance (LIdP pass) | |
ModuleAnnProvenance |
Annotation Declaration
Constructors
HsAnnotation (XHsAnnotation pass) SourceText (AnnProvenance pass) (XRec pass (HsExpr pass)) | |
XAnnDecl !(XXAnnDecl pass) |
Instances
type Anno (AnnDecl (GhcPass p)) | |
Defined in GHC.Hs.Decls |
tyClGroupTyClDecls :: [TyClGroup pass] -> [LTyClDecl pass] #
tyClGroupRoleDecls :: [TyClGroup pass] -> [LRoleAnnotDecl pass] #
tyClGroupKindSigs :: [TyClGroup pass] -> [LStandaloneKindSig pass] #
tyClGroupInstDecls :: [TyClGroup pass] -> [LInstDecl pass] #
tyClDeclTyVars :: TyClDecl pass -> LHsQTyVars pass #
pprFullRuleName :: Located (SourceText, RuleName) -> SDoc #
pprFlavour :: FamilyInfo pass -> SDoc #
newOrDataToFlavour :: NewOrData -> TyConFlavour #
Convert a NewOrData
to a TyConFlavour
isTypeFamilyDecl :: TyClDecl pass -> Bool #
type family declaration
isOpenTypeFamilyInfo :: FamilyInfo pass -> Bool #
open type family info
isFamilyDecl :: TyClDecl pass -> Bool #
type/data family declaration
isDataFamilyDecl :: TyClDecl pass -> Bool #
data family declaration
isDataDecl :: TyClDecl pass -> Bool #
True
= argument is a data
/newtype
declaration.
isClosedTypeFamilyInfo :: FamilyInfo pass -> Bool #
closed type family info
isClassDecl :: TyClDecl pass -> Bool #
type class
hsGroupInstDecls :: HsGroup id -> [LInstDecl id] #
docDeclDoc :: DocDecl -> HsDocString #
derivStrategyName :: DerivStrategy a -> SDoc #
A short description of a DerivStrategy'
.
collectRuleBndrSigTys :: [RuleBndr pass] -> [HsPatSigType pass] #
annProvenanceName_maybe :: UnXRec p => AnnProvenance p -> Maybe (IdP p) #
data TcSpecPrags #
Type checker Specialisation Pragmas
TcSpecPrags
conveys SPECIALISE
pragmas from the type checker to the desugarer
Constructors
IsDefaultMethod | Super-specialised: a default method should be macro-expanded at every call site |
SpecPrags [LTcSpecPrag] |
Instances
Data TcSpecPrags | |
Defined in Language.Haskell.Syntax.Binds Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TcSpecPrags -> c TcSpecPrags # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TcSpecPrags # toConstr :: TcSpecPrags -> Constr # dataTypeOf :: TcSpecPrags -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TcSpecPrags) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TcSpecPrags) # gmapT :: (forall b. Data b => b -> b) -> TcSpecPrags -> TcSpecPrags # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TcSpecPrags -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TcSpecPrags -> r # gmapQ :: (forall d. Data d => d -> u) -> TcSpecPrags -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> TcSpecPrags -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> TcSpecPrags -> m TcSpecPrags # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TcSpecPrags -> m TcSpecPrags # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TcSpecPrags -> m TcSpecPrags # |
data TcSpecPrag #
Type checker Specification Pragma
Constructors
SpecPrag Id HsWrapper InlinePragma | The Id to be specialised, a wrapper that specialises the polymorphic function, and inlining spec for the specialised function |
Instances
Data TcSpecPrag | |
Defined in Language.Haskell.Syntax.Binds Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TcSpecPrag -> c TcSpecPrag # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TcSpecPrag # toConstr :: TcSpecPrag -> Constr # dataTypeOf :: TcSpecPrag -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TcSpecPrag) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TcSpecPrag) # gmapT :: (forall b. Data b => b -> b) -> TcSpecPrag -> TcSpecPrag # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TcSpecPrag -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TcSpecPrag -> r # gmapQ :: (forall d. Data d => d -> u) -> TcSpecPrag -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> TcSpecPrag -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> TcSpecPrag -> m TcSpecPrag # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TcSpecPrag -> m TcSpecPrag # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TcSpecPrag -> m TcSpecPrag # |
Signatures and pragmas
Constructors
TypeSig (XTypeSig pass) [LIdP pass] (LHsSigWcType pass) | An ordinary type signature f :: Num a => a -> a After renaming, this list of Names contains the named
wildcards brought into scope by this signature. For a signature
|
PatSynSig (XPatSynSig pass) [LIdP pass] (LHsSigType pass) | A pattern synonym type signature pattern Single :: () => (Show a) => a -> [a] |
ClassOpSig (XClassOpSig pass) Bool [LIdP pass] (LHsSigType pass) | A signature for a class method False: ordinary class-method signature True: generic-default class method signature e.g. class C a where op :: a -> a -- Ordinary default op :: Eq a => a -> a -- Generic default No wildcards allowed here |
IdSig (XIdSig pass) Id | A type signature in generated code, notably the code generated for record selectors. We simply record the desired Id itself, replete with its name, type and IdDetails. Otherwise it's just like a type signature: there should be an accompanying binding |
FixSig (XFixSig pass) (FixitySig pass) | An ordinary fixity declaration infixl 8 *** |
InlineSig (XInlineSig pass) (LIdP pass) InlinePragma | An inline pragma {#- INLINE f #-} |
SpecSig (XSpecSig pass) (LIdP pass) [LHsSigType pass] InlinePragma | A specialisation pragma {-# SPECIALISE f :: Int -> Int #-} |
SpecInstSig (XSpecInstSig pass) SourceText (LHsSigType pass) | A specialisation pragma for instance declarations only {-# SPECIALISE instance Eq [Int] #-} (Class tys); should be a specialisation of the current instance declaration |
MinimalSig (XMinimalSig pass) SourceText (LBooleanFormula (LIdP pass)) | A minimal complete definition pragma {-# MINIMAL a | (b, c | (d | e)) #-} |
SCCFunSig (XSCCFunSig pass) SourceText (LIdP pass) (Maybe (XRec pass StringLiteral)) | A "set cost centre" pragma for declarations {-# SCC funName #-} or {-# SCC funName "cost_centre_name" #-} |
CompleteMatchSig (XCompleteMatchSig pass) SourceText (XRec pass [LIdP pass]) (Maybe (LIdP pass)) | A complete match pragma {-# COMPLETE C, D [:: T] #-} Used to inform the pattern match checker about additional complete matchings which, for example, arise from pattern synonym definitions. |
XSig !(XXSig pass) |
Instances
type Anno (Sig (GhcPass p)) | |
Defined in GHC.Hs.Binds |
data RecordPatSynField pass #
Record Pattern Synonym Field
Constructors
RecordPatSynField | |
Fields
|
Instances
Outputable (RecordPatSynField a) | |
Defined in Language.Haskell.Syntax.Binds Methods ppr :: RecordPatSynField a -> SDoc # |
data PatSynBind idL idR #
AnnKeywordId
:AnnPattern
,AnnEqual
,AnnLarrow
,AnnWhere
,AnnOpen
'{'
,AnnClose
'}'
,
Pattern Synonym binding
Constructors
PSB | |
Fields
| |
XPatSynBind !(XXPatSynBind idL idR) |
type LTcSpecPrag = Located TcSpecPrag #
Located Type checker Specification Pragmas
type LIPBind id = XRec id (IPBind id) #
Located Implicit Parameter Binding
May have AnnKeywordId
: AnnSemi
when in a
list
type LHsLocalBindsLR idL idR = XRec idL (HsLocalBindsLR idL idR) #
type LHsLocalBinds id = XRec id (HsLocalBinds id) #
Located Haskell local bindings
type LHsBindsLR idL idR = Bag (LHsBindLR idL idR) #
Located Haskell Bindings with separate Left and Right identifier types
type LHsBinds id = LHsBindsLR id id #
Located Haskell Bindings
type LHsBindLR idL idR = XRec idL (HsBindLR idL idR) #
Located Haskell Binding with separate Left and Right identifier types
type LFixitySig pass = XRec pass (FixitySig pass) #
Located Fixity Signature
Implicit parameter bindings.
These bindings start off as (Left "x") in the parser and stay that way until after type-checking when they are replaced with (Right d), where "d" is the name of the dictionary holding the evidence for the implicit parameter.
Constructors
IPBind (XCIPBind id) (Either (XRec id HsIPName) (IdP id)) (LHsExpr id) | |
XIPBind !(XXIPBind id) |
Instances
type Anno (IPBind (GhcPass p)) | |
Defined in GHC.Hs.Binds |
data HsValBindsLR idL idR #
Haskell Value bindings with separate Left and Right identifier types (not implicit parameters) Used for both top level and nested bindings May contain pattern synonym bindings
Constructors
ValBinds (XValBinds idL idR) (LHsBindsLR idL idR) [LSig idR] | Value Bindings In Before renaming RHS; idR is always RdrName Not dependency analysed Recursive by default |
XValBindsLR !(XXValBindsLR idL idR) | Value Bindings Out After renaming RHS; idR can be Name or Id Dependency analysed, later bindings in the list may depend on earlier ones. |
type HsValBinds id = HsValBindsLR id id #
Haskell Value Bindings
data HsPatSynDir id #
Haskell Pattern Synonym Direction
Constructors
Unidirectional | |
ImplicitBidirectional | |
ExplicitBidirectional (MatchGroup id (LHsExpr id)) |
type HsPatSynDetails pass = HsConDetails Void (LIdP pass) [RecordPatSynField pass] #
Haskell Pattern Synonym Details
data HsLocalBindsLR idL idR #
Haskell Local Bindings with separate Left and Right identifier types
Bindings in a 'let' expression or a 'where' clause
Constructors
HsValBinds (XHsValBinds idL idR) (HsValBindsLR idL idR) | Haskell Value Bindings |
HsIPBinds (XHsIPBinds idL idR) (HsIPBinds idR) | Haskell Implicit Parameter Bindings |
EmptyLocalBinds (XEmptyLocalBinds idL idR) | Empty Local Bindings |
XHsLocalBindsLR !(XXHsLocalBindsLR idL idR) |
type HsLocalBinds id = HsLocalBindsLR id id #
Haskell Local Bindings
Haskell Implicit Parameter Bindings
Constructors
IPBinds (XIPBinds id) [LIPBind id] | |
XHsIPBinds !(XXHsIPBinds id) |
Haskell Binding with separate Left and Right id's
Constructors
FunBind | Function-like Binding FunBind is used for both functions Reason 1: Special case for type inference: see Reason 2: Instance decls can only have FunBinds, which is convenient. If you change this, you'll need to change e.g. rnMethodBinds But note that the form Strict bindings have their strictness recorded in the |
Fields
| |
PatBind | Pattern Binding The pattern is never a simple variable; That case is done by FunBind. See Note [FunBind vs PatBind] for details about the relationship between FunBind and PatBind. |
Fields
| |
VarBind | Variable Binding Dictionary binding and suchlike. All VarBinds are introduced by the type checker |
AbsBinds | Abstraction Bindings |
Fields
| |
PatSynBind | Patterns Synonym Binding |
Fields
| |
XHsBindsLR !(XXHsBindsLR idL idR) |
Instances
type Anno (HsBindLR (GhcPass idL) (GhcPass idR)) | |
Defined in GHC.Hs.Binds |
Fixity Signature
Constructors
FixitySig (XFixitySig pass) [LIdP pass] Fixity | |
XFixitySig !(XXFixitySig pass) |
Instances
type Anno (FixitySig (GhcPass p)) | |
Defined in GHC.Hs.Binds |
Abstraction Bindings Export
isTypeLSig :: UnXRec p => LSig p -> Bool #
isSpecLSig :: UnXRec p => LSig p -> Bool #
isSpecInstLSig :: UnXRec p => LSig p -> Bool #
isSCCFunSig :: UnXRec p => LSig p -> Bool #
isPragLSig :: UnXRec p => LSig p -> Bool #
isMinimalLSig :: UnXRec p => LSig p -> Bool #
isInlineLSig :: UnXRec p => LSig p -> Bool #
isFixityLSig :: UnXRec p => LSig p -> Bool #
isDefaultMethod :: TcSpecPrags -> Bool #
isCompleteMatchSig :: UnXRec p => LSig p -> Bool #
hasSpecPrags :: TcSpecPrags -> Bool #
type LHsRecUpdField p = XRec p (HsRecUpdField p) #
Located Haskell Record Update Field
type LHsRecField' p id arg = XRec p (HsRecField' id arg) #
Located Haskell Record Field
type LHsRecField p arg = XRec p (HsRecField p arg) #
Located Haskell Record Field
type HsRecUpdField p = HsRecField' (AmbiguousFieldOcc p) (LHsExpr p) #
Haskell Record Update Field
data HsRecFields p arg #
Haskell Record Fields
HsRecFields is used only for patterns and expressions (not data type declarations)
Constructors
HsRecFields | |
Fields
|
Instances
(Outputable arg, Outputable (XRec p (HsRecField p arg))) => Outputable (HsRecFields p arg) | |
Defined in Language.Haskell.Syntax.Pat Methods ppr :: HsRecFields p arg -> SDoc # |
data HsRecField' id arg #
Haskell Record Field
For details on above see note [exact print annotations] in GHC.Parser.Annotation
Constructors
HsRecField | |
Fields
|
Instances
type HsRecField p arg = HsRecField' (FieldOcc p) arg #
Haskell Record Field
type HsConPatDetails p = HsConDetails (HsPatSigType (NoGhcTc p)) (LPat p) (HsRecFields p (LPat p)) #
Haskell Constructor Pattern Details
hsRecFieldsArgs :: UnXRec p => HsRecFields p arg -> [arg] #
hsRecFields :: UnXRec p => HsRecFields p arg -> [XCFieldOcc p] #
hsRecFieldSel :: HsRecField pass arg -> Located (XCFieldOcc pass) #
hsConPatArgs :: UnXRec p => HsConPatDetails p -> [LPat p] #
type LHsWcType pass = HsWildCardBndrs pass (LHsType pass) #
Located Haskell Wildcard Type
type LHsTypeArg p = HsArg (LHsType p) (LHsKind p) #
Arguments
= XRec pass (HsType pass) | May have |
Located Haskell Type
type LHsTyVarBndr flag pass = XRec pass (HsTyVarBndr flag pass) #
Located Haskell Type Variable Binder
type LHsSigWcType pass = HsWildCardBndrs pass (LHsSigType pass) #
Located Haskell Signature Wildcard Type
type LHsSigType pass = XRec pass (HsSigType pass) #
Located Haskell Signature Type
data LHsQTyVars pass #
Located Haskell Quantified Type Variables
Constructors
HsQTvs | |
Fields
| |
XLHsQTyVars !(XXLHsQTyVars pass) |
type LHsContext pass #
Arguments
= XRec pass (HsContext pass) |
|
Located Haskell Context
type LConDeclField pass #
Arguments
= XRec pass (ConDeclField pass) | May have |
Located Constructor Declaration Field
data HsWildCardBndrs pass thing #
Haskell Wildcard Binders
Constructors
HsWC | |
XHsWildCardBndrs !(XXHsWildCardBndrs pass thing) |
Haskell Type
Constructors
Instances
DisambTD (HsType GhcPs) | |
Defined in GHC.Parser.PostProcess Methods mkHsAppTyHeadPV :: LHsType GhcPs -> PV (LocatedA (HsType GhcPs)) # mkHsAppTyPV :: LocatedA (HsType GhcPs) -> LHsType GhcPs -> PV (LocatedA (HsType GhcPs)) # mkHsAppKindTyPV :: LocatedA (HsType GhcPs) -> SrcSpan -> LHsType GhcPs -> PV (LocatedA (HsType GhcPs)) # mkHsOpTyPV :: LHsType GhcPs -> LocatedN RdrName -> LHsType GhcPs -> PV (LocatedA (HsType GhcPs)) # mkUnpackednessPV :: Located UnpackednessPragma -> LocatedA (HsType GhcPs) -> PV (LocatedA (HsType GhcPs)) # | |
type Anno (BangType (GhcPass p)) | |
Defined in GHC.Hs.Type | |
type Anno (HsKind (GhcPass p)) | |
Defined in GHC.Hs.Type | |
type Anno (HsType (GhcPass p)) | |
Defined in GHC.Hs.Type | |
type Anno [LocatedA (HsType (GhcPass p))] | |
Defined in GHC.Hs.Type | |
type Anno (FamEqn p (LocatedA (HsType p))) | |
Defined in GHC.Hs.Decls |
data HsTyVarBndr flag pass #
Haskell Type Variable Binder
The flag annotates the binder. It is Specificity
in places where
explicit specificity is allowed (e.g. x :: forall {a} b. ...) or
()
in other places.
Constructors
UserTyVar (XUserTyVar pass) flag (LIdP pass) | |
KindedTyVar (XKindedTyVar pass) flag (LIdP pass) (LHsKind pass) | |
XTyVarBndr !(XXTyVarBndr pass) |
Instances
type Anno (HsTyVarBndr _flag (GhcPass _1)) | |
Defined in GHC.Hs.Type | |
type Anno (HsTyVarBndr _flag GhcPs) | |
Defined in GHC.Hs.Type | |
type Anno (HsTyVarBndr _flag GhcRn) | |
Defined in GHC.Hs.Type | |
type Anno (HsTyVarBndr _flag GhcTc) | |
Defined in GHC.Hs.Type |
Haskell Type Literal
Constructors
HsNumTy SourceText Integer | |
HsStrTy SourceText FastString | |
HsCharTy SourceText Char |
Instances
Data HsTyLit | |
Defined in Language.Haskell.Syntax.Type Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsTyLit -> c HsTyLit # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HsTyLit # toConstr :: HsTyLit -> Constr # dataTypeOf :: HsTyLit -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c HsTyLit) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HsTyLit) # gmapT :: (forall b. Data b => b -> b) -> HsTyLit -> HsTyLit # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsTyLit -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsTyLit -> r # gmapQ :: (forall d. Data d => d -> u) -> HsTyLit -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsTyLit -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsTyLit -> m HsTyLit # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsTyLit -> m HsTyLit # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsTyLit -> m HsTyLit # | |
Outputable HsTyLit | |
Defined in Language.Haskell.Syntax.Type |
data HsTupleSort #
Haskell Tuple Sort
Constructors
HsUnboxedTuple | |
HsBoxedOrConstraintTuple |
Instances
Data HsTupleSort | |
Defined in Language.Haskell.Syntax.Type Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsTupleSort -> c HsTupleSort # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HsTupleSort # toConstr :: HsTupleSort -> Constr # dataTypeOf :: HsTupleSort -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c HsTupleSort) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HsTupleSort) # gmapT :: (forall b. Data b => b -> b) -> HsTupleSort -> HsTupleSort # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsTupleSort -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsTupleSort -> r # gmapQ :: (forall d. Data d => d -> u) -> HsTupleSort -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsTupleSort -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsTupleSort -> m HsTupleSort # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsTupleSort -> m HsTupleSort # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsTupleSort -> m HsTupleSort # |
A type signature that obeys the forall
-or-nothing rule. In other
words, an LHsType
that uses an HsOuterSigTyVarBndrs
to represent its
outermost type variable quantification.
See Note [Representing type signatures]
.
Constructors
HsSig | |
XHsSigType !(XXHsSigType pass) |
Instances
type Anno (HsSigType (GhcPass p)) | |
Defined in GHC.Hs.Type |
This is used in the syntax. In constructor declaration. It must keep the arrow representation.
Instances
Outputable a => Outputable (HsScaled pass a) | |
Defined in Language.Haskell.Syntax.Type |
data HsPatSigType pass #
Types that can appear in pattern signatures, as well as the signatures for
term-level binders in RULES.
See Note [Pattern signature binders and scoping]
.
This is very similar to HsSigWcType
, but with
slightly different semantics: see Note [HsType binders]
.
See also Note [The wildcard story for types]
.
Constructors
HsPS | |
XHsPatSigType !(XXHsPatSigType pass) |
The extension field for HsPatSigType
, which is only used in the
renamer onwards. See Note [Pattern signature binders and scoping]
.
Constructors
HsPSRn | |
Fields
|
Instances
Data HsPSRn | |
Defined in Language.Haskell.Syntax.Type Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsPSRn -> c HsPSRn # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HsPSRn # toConstr :: HsPSRn -> Constr # dataTypeOf :: HsPSRn -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c HsPSRn) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HsPSRn) # gmapT :: (forall b. Data b => b -> b) -> HsPSRn -> HsPSRn # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsPSRn -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsPSRn -> r # gmapQ :: (forall d. Data d => d -> u) -> HsPSRn -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsPSRn -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsPSRn -> m HsPSRn # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsPSRn -> m HsPSRn # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsPSRn -> m HsPSRn # |
data HsOuterTyVarBndrs flag pass #
The outermost type variables in a type that obeys the forall
-or-nothing
rule. See Note [forall-or-nothing rule]
.
Constructors
HsOuterImplicit | Implicit forall, e.g.,
|
Fields
| |
HsOuterExplicit | Explicit forall, e.g.,
|
Fields
| |
XHsOuterTyVarBndrs !(XXHsOuterTyVarBndrs pass) |
Instances
type Anno (HsOuterTyVarBndrs _1 (GhcPass _2)) | |
Defined in GHC.Hs.Type |
type HsOuterSigTyVarBndrs = HsOuterTyVarBndrs Specificity #
Used for signatures, e.g.,
f :: forall a {b}. blah
We use Specificity
for the HsOuterTyVarBndrs
flag
to allow
distinguishing between specified and inferred type variables.
type HsOuterFamEqnTyVarBndrs = HsOuterTyVarBndrs () #
Used for type-family instance equations, e.g.,
type instance forall a. F [a] = Tree a
The notion of specificity is irrelevant in type family equations, so we use
()
for the HsOuterTyVarBndrs
flag
.
These names are used early on to store the names of implicit parameters. They completely disappear after type-checking.
Constructors
HsIPName FastString |
Instances
Data HsIPName | |
Defined in Language.Haskell.Syntax.Type Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsIPName -> c HsIPName # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HsIPName # toConstr :: HsIPName -> Constr # dataTypeOf :: HsIPName -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c HsIPName) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HsIPName) # gmapT :: (forall b. Data b => b -> b) -> HsIPName -> HsIPName # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsIPName -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsIPName -> r # gmapQ :: (forall d. Data d => d -> u) -> HsIPName -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsIPName -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsIPName -> m HsIPName # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsIPName -> m HsIPName # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsIPName -> m HsIPName # | |
Outputable HsIPName | |
Defined in Language.Haskell.Syntax.Type | |
OutputableBndr HsIPName | |
Defined in Language.Haskell.Syntax.Type Methods pprBndr :: BindingSite -> HsIPName -> SDoc # pprPrefixOcc :: HsIPName -> SDoc # pprInfixOcc :: HsIPName -> SDoc # bndrIsJoin_maybe :: HsIPName -> Maybe Int # | |
Eq HsIPName | |
type Anno HsIPName | |
Defined in GHC.Hs.Type |
data HsForAllTelescope pass #
The type variable binders in an HsForAllTy
.
See also Note [Variable Specificity and Forall Visibility]
in
GHC.Tc.Gen.HsType.
Constructors
HsForAllVis | A visible |
Fields
| |
HsForAllInvis | An invisible |
Fields
| |
XHsForAllTelescope !(XXHsForAllTelescope pass) |
data HsConDetails tyarg arg rec #
Describes the arguments to a data constructor. This is a common representation for several constructor-related concepts, including:
- The arguments in a Haskell98-style constructor declaration
(see
HsConDeclH98Details
in GHC.Hs.Decls). - The arguments in constructor patterns in
case
/function definitions (seeHsConPatDetails
in GHC.Hs.Pat). - The left-hand side arguments in a pattern synonym binding
(see
HsPatSynDetails
in GHC.Hs.Binds).
One notable exception is the arguments in a GADT constructor, which uses
a separate data type entirely (see HsConDeclGADTDetails
in
GHC.Hs.Decls). This is because GADT constructors cannot be declared with
infix syntax, unlike the concepts above (#18844).
Instances
(Data tyarg, Data arg, Data rec) => Data (HsConDetails tyarg arg rec) | |
Defined in Language.Haskell.Syntax.Type Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsConDetails tyarg arg rec -> c (HsConDetails tyarg arg rec) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsConDetails tyarg arg rec) # toConstr :: HsConDetails tyarg arg rec -> Constr # dataTypeOf :: HsConDetails tyarg arg rec -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsConDetails tyarg arg rec)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsConDetails tyarg arg rec)) # gmapT :: (forall b. Data b => b -> b) -> HsConDetails tyarg arg rec -> HsConDetails tyarg arg rec # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsConDetails tyarg arg rec -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsConDetails tyarg arg rec -> r # gmapQ :: (forall d. Data d => d -> u) -> HsConDetails tyarg arg rec -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsConDetails tyarg arg rec -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsConDetails tyarg arg rec -> m (HsConDetails tyarg arg rec) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsConDetails tyarg arg rec -> m (HsConDetails tyarg arg rec) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsConDetails tyarg arg rec -> m (HsConDetails tyarg arg rec) # | |
(Outputable tyarg, Outputable arg, Outputable rec) => Outputable (HsConDetails tyarg arg rec) | |
Defined in Language.Haskell.Syntax.Type Methods ppr :: HsConDetails tyarg arg rec -> SDoc # |
Denotes the type of arrows in the surface language
Constructors
HsUnrestrictedArrow IsUnicodeSyntax | a -> b or a → b |
HsLinearArrow IsUnicodeSyntax (Maybe AddEpAnn) | a %1 -> b or a %1 → b, or a ⊸ b |
HsExplicitMult IsUnicodeSyntax (Maybe AddEpAnn) (LHsType pass) | a %m -> b or a %m → b (very much including `a %Many -> b`!
This is how the programmer wrote it). It is stored as an
|
Instances
(Outputable tm, Outputable ty) => Outputable (HsArg tm ty) | |
Defined in Language.Haskell.Syntax.Type |
Field Occurrence
Represents an *occurrence* of an unambiguous field. This may or may not be a
binding occurrence (e.g. this type is used in ConDeclField
and
RecordPatSynField
which bind their fields, but also in HsRecField
for
record construction and patterns, which do not).
We store both the RdrName
the user originally wrote, and after the renamer,
the selector function.
Constructors
FieldOcc | |
Fields
| |
XFieldOcc !(XXFieldOcc pass) |
Instances
Outputable (FieldOcc pass) | |
Defined in Language.Haskell.Syntax.Type | |
OutputableBndr (FieldOcc pass) | |
Defined in Language.Haskell.Syntax.Type Methods pprBndr :: BindingSite -> FieldOcc pass -> SDoc # pprPrefixOcc :: FieldOcc pass -> SDoc # pprInfixOcc :: FieldOcc pass -> SDoc # bndrIsJoin_maybe :: FieldOcc pass -> Maybe Int # | |
(Eq (XCFieldOcc pass), Eq (XXFieldOcc pass)) => Eq (FieldOcc pass) | |
OutputableBndr (GenLocated SrcSpan (FieldOcc pass)) | |
Defined in Language.Haskell.Syntax.Type Methods pprBndr :: BindingSite -> GenLocated SrcSpan (FieldOcc pass) -> SDoc # pprPrefixOcc :: GenLocated SrcSpan (FieldOcc pass) -> SDoc # pprInfixOcc :: GenLocated SrcSpan (FieldOcc pass) -> SDoc # bndrIsJoin_maybe :: GenLocated SrcSpan (FieldOcc pass) -> Maybe Int # | |
type Anno (FieldOcc (GhcPass p)) | |
Defined in GHC.Hs.Type | |
type Anno (HsRecField (GhcPass p) arg) | |
Defined in GHC.Hs.Pat |
data ConDeclField pass #
Constructor Declaration Field
Constructors
ConDeclField | |
Fields
| |
XConDeclField !(XXConDeclField pass) |
Instances
type Anno (ConDeclField (GhcPass p)) | |
Defined in GHC.Hs.Type | |
type Anno [LocatedA (ConDeclField (GhcPass _1))] | |
Defined in GHC.Hs.Decls |
data AmbiguousFieldOcc pass #
Ambiguous Field Occurrence
Represents an *occurrence* of a field that is potentially
ambiguous after the renamer, with the ambiguity resolved by the
typechecker. We always store the RdrName
that the user
originally wrote, and store the selector function after the renamer
(for unambiguous occurrences) or the typechecker (for ambiguous
occurrences).
See Note [HsRecField and HsRecUpdField] in GHC.Hs.Pat and Note [Disambiguating record fields] in GHC.Tc.Gen.Head. See Note [Located RdrNames] in GHC.Hs.Expr
Constructors
Unambiguous (XUnambiguous pass) (LocatedN RdrName) | |
Ambiguous (XAmbiguous pass) (LocatedN RdrName) | |
XAmbiguousFieldOcc !(XXAmbiguousFieldOcc pass) |
Instances
type Anno (AmbiguousFieldOcc GhcTc) | |
Defined in GHC.Hs.Pat | |
type Anno (HsRecField' (AmbiguousFieldOcc p) (LocatedA (HsExpr p))) | |
Defined in GHC.Hs.Pat |
numVisibleArgs :: [HsArg tm ty] -> Arity #
noTypeArgs :: [Void] #
An empty list that can be used to indicate that there are no type arguments allowed in cases where HsConDetails is applied to Void.
mapHsOuterImplicit :: (XHsOuterImplicit pass -> XHsOuterImplicit pass) -> HsOuterTyVarBndrs flag pass -> HsOuterTyVarBndrs flag pass #
isHsKindedTyVar :: HsTyVarBndr flag pass -> Bool #
Does this HsTyVarBndr
come with an explicit kind annotation?
hsUnrestricted :: a -> HsScaled pass a #
When creating syntax we use the shorthands. It's better for printing, also, the shorthands work trivially at each pass.
hsScaledThing :: HsScaled pass a -> a #
hsQTvExplicit :: LHsQTyVars pass -> [LHsTyVarBndr () pass] #
hsPatSigType :: HsPatSigType pass -> LHsType pass #
hsLinear :: a -> HsScaled pass a #
When creating syntax we use the shorthands. It's better for printing, also, the shorthands work trivially at each pass.
hsIPNameFS :: HsIPName -> FastString #
Pattern
Constructors
WildPat (XWildPat p) | Wildcard Pattern The sole reason for a type on a WildPat is to support hsPatType :: Pat Id -> Type |
VarPat (XVarPat p) (LIdP p) | Variable Pattern |
LazyPat (XLazyPat p) (LPat p) | Lazy Pattern
^ - |
AsPat (XAsPat p) (LIdP p) (LPat p) | As pattern
^ - |
ParPat (XParPat p) (LPat p) | Parenthesised pattern
See Note [Parens in HsSyn] in GHC.Hs.Expr
^ - |
BangPat (XBangPat p) (LPat p) | Bang pattern
^ - |
ListPat (XListPat p) [LPat p] | Syntactic List
|
TuplePat (XTuplePat p) [LPat p] Boxity | Tuple sub-patterns
|
SumPat (XSumPat p) (LPat p) ConTag Arity | Anonymous sum pattern
|
ConPat | Constructor Pattern |
Fields
| |
ViewPat | |
SplicePat |
|
Fields
| |
LitPat (XLitPat p) (HsLit p) | Literal Pattern Used for *non-overloaded* literal patterns: Int#, Char#, Int, Char, String, etc. |
NPat (XNPat p) (XRec p (HsOverLit p)) (Maybe (SyntaxExpr p)) (SyntaxExpr p) | Natural Pattern |
NPlusKPat (XNPlusKPat p) (LIdP p) (XRec p (HsOverLit p)) (HsOverLit p) (SyntaxExpr p) (SyntaxExpr p) | n+k pattern |
SigPat | |
Fields
| |
XPat !(XXPat p) | Trees that Grow extension point for new constructors |
Instances
type Anno (Pat (GhcPass p)) | |
Defined in GHC.Hs.Pat |
data OverLitVal #
Overloaded Literal Value
Constructors
HsIntegral !IntegralLit | Integer-looking literals; |
HsFractional !FractionalLit | Frac-looking literals |
HsIsString !SourceText !FastString | String-looking literals |
Instances
Data OverLitVal | |
Defined in Language.Haskell.Syntax.Lit Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> OverLitVal -> c OverLitVal # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c OverLitVal # toConstr :: OverLitVal -> Constr # dataTypeOf :: OverLitVal -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c OverLitVal) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c OverLitVal) # gmapT :: (forall b. Data b => b -> b) -> OverLitVal -> OverLitVal # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> OverLitVal -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> OverLitVal -> r # gmapQ :: (forall d. Data d => d -> u) -> OverLitVal -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> OverLitVal -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> OverLitVal -> m OverLitVal # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> OverLitVal -> m OverLitVal # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> OverLitVal -> m OverLitVal # | |
Outputable OverLitVal | |
Defined in Language.Haskell.Syntax.Lit Methods ppr :: OverLitVal -> SDoc # | |
Eq OverLitVal | |
Defined in Language.Haskell.Syntax.Lit | |
Ord OverLitVal | |
Defined in Language.Haskell.Syntax.Lit Methods compare :: OverLitVal -> OverLitVal -> Ordering # (<) :: OverLitVal -> OverLitVal -> Bool # (<=) :: OverLitVal -> OverLitVal -> Bool # (>) :: OverLitVal -> OverLitVal -> Bool # (>=) :: OverLitVal -> OverLitVal -> Bool # max :: OverLitVal -> OverLitVal -> OverLitVal # min :: OverLitVal -> OverLitVal -> OverLitVal # |
Haskell Overloaded Literal
Constructors
OverLit | |
Fields
| |
XOverLit !(XXOverLit p) |
Instances
Eq (XXOverLit p) => Eq (HsOverLit p) | |
Ord (XXOverLit p) => Ord (HsOverLit p) | |
Defined in Language.Haskell.Syntax.Lit | |
type Anno (HsOverLit (GhcPass p)) | |
Defined in GHC.Hs.Pat |
Haskell Literal
Constructors
HsChar (XHsChar x) Char | Character |
HsCharPrim (XHsCharPrim x) Char | Unboxed character |
HsString (XHsString x) FastString | String |
HsStringPrim (XHsStringPrim x) !ByteString | Packed bytes |
HsInt (XHsInt x) IntegralLit | Genuinely an Int; arises from GHC.Tc.Deriv.Generate, and from TRANSLATION |
HsIntPrim (XHsIntPrim x) Integer | literal |
HsWordPrim (XHsWordPrim x) Integer | literal |
HsInt64Prim (XHsInt64Prim x) Integer | literal |
HsWord64Prim (XHsWord64Prim x) Integer | literal |
HsInteger (XHsInteger x) Integer Type | Genuinely an integer; arises only from TRANSLATION (overloaded literals are done with HsOverLit) |
HsRat (XHsRat x) FractionalLit Type | Genuinely a rational; arises only from TRANSLATION (overloaded literals are done with HsOverLit) |
HsFloatPrim (XHsFloatPrim x) FractionalLit | Unboxed Float |
HsDoublePrim (XHsDoublePrim x) FractionalLit | Unboxed Double |
XLit !(XXLit x) |
hsOverLitNeedsParens :: PprPrec -> HsOverLit x -> Bool #
returns hsOverLitNeedsParens
p olTrue
if an overloaded literal
ol
needs to be parenthesized under precedence p
.
hsLitNeedsParens :: PprPrec -> HsLit x -> Bool #
returns hsLitNeedsParens
p lTrue
if a literal l
needs
to be parenthesized under precedence p
.
Constructors
Parsed | |
Renamed | |
Typechecked |
Instances
Data Pass | |
Defined in GHC.Hs.Extension Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Pass -> c Pass # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Pass # dataTypeOf :: Pass -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Pass) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Pass) # gmapT :: (forall b. Data b => b -> b) -> Pass -> Pass # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Pass -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Pass -> r # gmapQ :: (forall d. Data d => d -> u) -> Pass -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Pass -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Pass -> m Pass # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Pass -> m Pass # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Pass -> m Pass # |
type OutputableBndrId (pass :: Pass) = (OutputableBndr (IdGhcP pass), OutputableBndr (IdGhcP (NoGhcTcPass pass)), Outputable (GenLocated (Anno (IdGhcP pass)) (IdGhcP pass)), Outputable (GenLocated (Anno (IdGhcP (NoGhcTcPass pass))) (IdGhcP (NoGhcTcPass pass))), IsPass pass) #
Constraint type to bundle up the requirement for OutputableBndr
on both
the id
and the NoGhcTc
of it. See Note [NoGhcTc].
type family NoGhcTcPass (p :: Pass) :: Pass where ... #
Equations
NoGhcTcPass 'Typechecked = 'Renamed | |
NoGhcTcPass other = other |
type IsSrcSpanAnn (p :: Pass) a = (Anno (IdGhcP p) ~ SrcSpanAnn' (EpAnn a), IsPass p) #
class (NoGhcTcPass (NoGhcTcPass p) ~ NoGhcTcPass p, IsPass (NoGhcTcPass p)) => IsPass (p :: Pass) where #
Allows us to check what phase we're in at GHC's runtime. For example, this class allows us to write > f :: forall p. IsPass p => HsExpr (GhcPass p) -> blah > f e = case ghcPass @p of > GhcPs -> ... in this RHS we have HsExpr GhcPs... > GhcRn -> ... in this RHS we have HsExpr GhcRn... > GhcTc -> ... in this RHS we have HsExpr GhcTc... which is very useful, for example, when pretty-printing. See Note [IsPass].
Instances
IsPass 'Parsed | |
Defined in GHC.Hs.Extension | |
IsPass 'Renamed | |
Defined in GHC.Hs.Extension | |
IsPass 'Typechecked | |
Defined in GHC.Hs.Extension Methods ghcPass :: GhcPass 'Typechecked # |
type GhcTc = GhcPass 'Typechecked #
data GhcPass (c :: Pass) where #
Used as a data type index for the hsSyn AST; also serves as a singleton type for Pass
Instances
type TcMCoercionR = MCoercionR #
type TcMCoercionN = MCoercionN #
type TcMCoercion = MCoercion #
Constructors
TcEvBinds EvBindsVar | |
EvBinds (Bag EvBind) |
Instances
Data TcEvBinds | |
Defined in GHC.Tc.Types.Evidence Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TcEvBinds -> c TcEvBinds # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TcEvBinds # toConstr :: TcEvBinds -> Constr # dataTypeOf :: TcEvBinds -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TcEvBinds) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TcEvBinds) # gmapT :: (forall b. Data b => b -> b) -> TcEvBinds -> TcEvBinds # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TcEvBinds -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TcEvBinds -> r # gmapQ :: (forall d. Data d => d -> u) -> TcEvBinds -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> TcEvBinds -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> TcEvBinds -> m TcEvBinds # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TcEvBinds -> m TcEvBinds # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TcEvBinds -> m TcEvBinds # | |
Outputable TcEvBinds | |
Defined in GHC.Tc.Types.Evidence |
type TcCoercionR = CoercionR #
type TcCoercionP = CoercionP #
type TcCoercionN = CoercionN #
type TcCoercion = Coercion #
data QuoteWrapper #
Constructors
QuoteWrapper EvVar Type |
Instances
Data QuoteWrapper | |
Defined in GHC.Tc.Types.Evidence Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> QuoteWrapper -> c QuoteWrapper # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c QuoteWrapper # toConstr :: QuoteWrapper -> Constr # dataTypeOf :: QuoteWrapper -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c QuoteWrapper) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c QuoteWrapper) # gmapT :: (forall b. Data b => b -> b) -> QuoteWrapper -> QuoteWrapper # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> QuoteWrapper -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> QuoteWrapper -> r # gmapQ :: (forall d. Data d => d -> u) -> QuoteWrapper -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> QuoteWrapper -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> QuoteWrapper -> m QuoteWrapper # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> QuoteWrapper -> m QuoteWrapper # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> QuoteWrapper -> m QuoteWrapper # |
Constructors
Instances
Data HsWrapper | |
Defined in GHC.Tc.Types.Evidence Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsWrapper -> c HsWrapper # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HsWrapper # toConstr :: HsWrapper -> Constr # dataTypeOf :: HsWrapper -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c HsWrapper) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HsWrapper) # gmapT :: (forall b. Data b => b -> b) -> HsWrapper -> HsWrapper # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsWrapper -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsWrapper -> r # gmapQ :: (forall d. Data d => d -> u) -> HsWrapper -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsWrapper -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsWrapper -> m HsWrapper # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsWrapper -> m HsWrapper # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsWrapper -> m HsWrapper # | |
Outputable HsWrapper | |
Defined in GHC.Tc.Types.Evidence |
data HoleExprRef #
Where to store evidence for expression holes See Note [Holes] in GHC.Tc.Types.Constraint
Constructors
HER | |
Instances
Data HoleExprRef | |
Defined in GHC.Tc.Types.Evidence Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HoleExprRef -> c HoleExprRef # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HoleExprRef # toConstr :: HoleExprRef -> Constr # dataTypeOf :: HoleExprRef -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c HoleExprRef) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HoleExprRef) # gmapT :: (forall b. Data b => b -> b) -> HoleExprRef -> HoleExprRef # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HoleExprRef -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HoleExprRef -> r # gmapQ :: (forall d. Data d => d -> u) -> HoleExprRef -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HoleExprRef -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HoleExprRef -> m HoleExprRef # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HoleExprRef -> m HoleExprRef # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HoleExprRef -> m HoleExprRef # | |
Outputable HoleExprRef | |
Defined in GHC.Tc.Types.Evidence Methods ppr :: HoleExprRef -> SDoc # |
data EvTypeable #
Instructions on how to make a Typeable
dictionary.
See Note [Typeable evidence terms]
Constructors
EvTypeableTyCon TyCon [EvTerm] | Dictionary for |
EvTypeableTyApp EvTerm EvTerm | Dictionary for |
EvTypeableTrFun EvTerm EvTerm EvTerm | Dictionary for |
EvTypeableTyLit EvTerm | Dictionary for a type literal,
e.g. |
Instances
Data EvTypeable | |
Defined in GHC.Tc.Types.Evidence Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> EvTypeable -> c EvTypeable # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c EvTypeable # toConstr :: EvTypeable -> Constr # dataTypeOf :: EvTypeable -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c EvTypeable) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c EvTypeable) # gmapT :: (forall b. Data b => b -> b) -> EvTypeable -> EvTypeable # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> EvTypeable -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> EvTypeable -> r # gmapQ :: (forall d. Data d => d -> u) -> EvTypeable -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> EvTypeable -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> EvTypeable -> m EvTypeable # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> EvTypeable -> m EvTypeable # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> EvTypeable -> m EvTypeable # | |
Outputable EvTypeable | |
Defined in GHC.Tc.Types.Evidence Methods ppr :: EvTypeable -> SDoc # |
Constructors
EvExpr EvExpr | |
EvTypeable Type EvTypeable | |
EvFun | |
Instances
Data EvTerm | |
Defined in GHC.Tc.Types.Evidence Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> EvTerm -> c EvTerm # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c EvTerm # toConstr :: EvTerm -> Constr # dataTypeOf :: EvTerm -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c EvTerm) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c EvTerm) # gmapT :: (forall b. Data b => b -> b) -> EvTerm -> EvTerm # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> EvTerm -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> EvTerm -> r # gmapQ :: (forall d. Data d => d -> u) -> EvTerm -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> EvTerm -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> EvTerm -> m EvTerm # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> EvTerm -> m EvTerm # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> EvTerm -> m EvTerm # | |
Outputable EvTerm | |
Defined in GHC.Tc.Types.Evidence |
data EvCallStack #
Evidence for CallStack
implicit parameters.
Constructors
EvCsEmpty | |
EvCsPushCall Name RealSrcSpan EvExpr |
|
Instances
Data EvCallStack | |
Defined in GHC.Tc.Types.Evidence Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> EvCallStack -> c EvCallStack # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c EvCallStack # toConstr :: EvCallStack -> Constr # dataTypeOf :: EvCallStack -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c EvCallStack) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c EvCallStack) # gmapT :: (forall b. Data b => b -> b) -> EvCallStack -> EvCallStack # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> EvCallStack -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> EvCallStack -> r # gmapQ :: (forall d. Data d => d -> u) -> EvCallStack -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> EvCallStack -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> EvCallStack -> m EvCallStack # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> EvCallStack -> m EvCallStack # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> EvCallStack -> m EvCallStack # | |
Outputable EvCallStack | |
Defined in GHC.Tc.Types.Evidence Methods ppr :: EvCallStack -> SDoc # |
data EvBindsVar #
Constructors
EvBindsVar | |
CoEvBindsVar | |
Instances
Uniquable EvBindsVar | |
Defined in GHC.Tc.Types.Evidence Methods getUnique :: EvBindsVar -> Unique # | |
Outputable EvBindsVar | |
Defined in GHC.Tc.Types.Evidence Methods ppr :: EvBindsVar -> SDoc # |
Constructors
EvBindMap | |
Fields |
Instances
Outputable EvBindMap | |
Defined in GHC.Tc.Types.Evidence |
Instances
Outputable EvBind | |
Defined in GHC.Tc.Types.Evidence |
varSetMinusEvBindMap :: VarSet -> EvBindMap -> VarSet #
unwrapIP :: Type -> CoercionR #
Create a Expr
that unwraps an implicit-parameter or
overloaded-label dictionary to expose the underlying value. We
expect the Expr
to have the form `IP sym ty` or `IsLabel sym ty`,
and return a Expr
`co :: IP sym ty ~ ty` or
`co :: IsLabel sym ty ~ ty`. See also
Note [Type-checking overloaded labels] in GHC.Tc.Gen.Expr.
tcDowngradeRole :: Role -> Role -> TcCoercion -> TcCoercion #
tcCoercionRole :: TcCoercion -> Role #
tcCoercionKind :: TcCoercion -> Pair TcType #
quoteWrapperTyVarTy :: QuoteWrapper -> Type #
nonDetStrictFoldEvBindMap :: (EvBind -> a -> a) -> a -> EvBindMap -> a #
mkWpTyLams :: [TyVar] -> HsWrapper #
mkWpTyApps :: [Type] -> HsWrapper #
mkWpEvVarApps :: [EvVar] -> HsWrapper #
mkWpEvApps :: [EvTerm] -> HsWrapper #
mkWpCastR :: TcCoercionR -> HsWrapper #
mkWpCastN :: TcCoercionN -> HsWrapper #
mkWantedEvBind :: EvVar -> EvTerm -> EvBind #
mkTcUnbranchedAxInstCo :: CoAxiom Unbranched -> [TcType] -> [TcCoercion] -> TcCoercionR #
mkTcTyConAppCo :: Role -> TyCon -> [TcCoercion] -> TcCoercion #
mkTcTransCo :: TcCoercion -> TcCoercion -> TcCoercion #
mkTcSymMCo :: TcMCoercion -> TcMCoercion #
mkTcSymCo :: TcCoercion -> TcCoercion #
mkTcSubCo :: HasDebugCallStack => TcCoercionN -> TcCoercionR #
mkTcRepReflCo :: TcType -> TcCoercionR #
mkTcReflCo :: Role -> TcType -> TcCoercion #
mkTcPhantomCo :: TcCoercionN -> TcType -> TcType -> TcCoercionP #
mkTcNthCo :: Role -> Int -> TcCoercion -> TcCoercion #
mkTcNomReflCo :: TcType -> TcCoercionN #
mkTcLRCo :: LeftOrRight -> TcCoercion -> TcCoercion #
mkTcKindCo :: TcCoercion -> TcCoercionN #
mkTcGReflRightMCo :: Role -> TcType -> TcMCoercionN -> TcCoercion #
mkTcGReflRightCo :: Role -> TcType -> TcCoercionN -> TcCoercion #
mkTcGReflLeftMCo :: Role -> TcType -> TcMCoercionN -> TcCoercion #
mkTcGReflLeftCo :: Role -> TcType -> TcCoercionN -> TcCoercion #
mkTcFunCo :: Role -> TcCoercion -> TcCoercion -> TcCoercion -> TcCoercion #
mkTcForAllCos :: [(TyVar, TcCoercionN)] -> TcCoercion -> TcCoercion #
mkTcForAllCo :: TyVar -> TcCoercionN -> TcCoercion -> TcCoercion #
mkTcFamilyTyConAppCo :: TyCon -> [TcCoercionN] -> TcCoercionN #
mkTcCoherenceRightCo :: Role -> TcType -> TcCoercionN -> TcCoercion -> TcCoercion #
mkTcCoherenceLeftCo :: Role -> TcType -> TcCoercionN -> TcCoercion -> TcCoercion #
mkTcCoVarCo :: CoVar -> TcCoercion #
mkTcAxiomRuleCo :: CoAxiomRule -> [TcCoercion] -> TcCoercionR #
mkTcAxInstCo :: forall (br :: BranchFlag). Role -> CoAxiom br -> BranchIndex -> [TcType] -> [TcCoercion] -> TcCoercion #
mkTcAppCo :: TcCoercion -> TcCoercionN -> TcCoercion #
mkGivenEvBind :: EvVar -> EvTerm -> EvBind #
mkEvScSelectors :: Class -> [TcType] -> [(TcPredType, EvExpr)] #
mkEvCast :: EvExpr -> TcCoercion -> EvTerm #
maybeTcSymCo :: SwapFlag -> TcCoercion -> TcCoercion #
maybeTcSubCo :: HasDebugCallStack => EqRel -> TcCoercionN -> TcCoercion #
If the EqRel is ReprEq, makes a SubCo; otherwise, does nothing. Note that the input coercion should always be nominal.
isTcReflexiveCo :: TcCoercion -> Bool #
This version does a slow check, calculating the related types and seeing if they are equal.
isTcReflCo :: TcCoercion -> Bool #
isIdHsWrapper :: HsWrapper -> Bool #
isEmptyTcEvBinds :: TcEvBinds -> Bool #
isEmptyEvBindMap :: EvBindMap -> Bool #
isCoEvBindsVar :: EvBindsVar -> Bool #
hsWrapDictBinders :: HsWrapper -> Bag DictId #
Identifies the lambda-bound dictionaries of an HsWrapper
. This is used
(only) to allow the pattern-match overlap checker to know what Given
dictionaries are in scope.
We specifically do not collect dictionaries bound in a WpLet
. These are
either superclasses of lambda-bound ones, or (extremely numerous) results of
binding Wanted dictionaries. We definitely don't want all those cluttering
up the Given dictionaries for pattern-match overlap checking!
foldEvBindMap :: (EvBind -> a -> a) -> a -> EvBindMap -> a #
findNeededEvVars :: EvBindMap -> VarSet -> VarSet #
extendEvBinds :: EvBindMap -> EvBind -> EvBindMap #
evVarsOfTerm :: EvTerm -> VarSet #
evTypeable :: Type -> EvTypeable -> EvTerm #
evTermCoercion :: EvTerm -> TcCoercion #
evCoercion :: TcCoercion -> EvTerm #
evCast :: EvExpr -> TcCoercion -> EvTerm #
d |> co
evBindMapToVarSet :: EvBindMap -> VarSet #
evBindMapBinds :: EvBindMap -> Bag EvBind #
collectHsWrapBinders :: HsWrapper -> ([Var], HsWrapper) #
applyQuoteWrapper :: QuoteWrapper -> HsWrapper #
Convert the QuoteWrapper into a normal HsWrapper which can be used to apply its contents.
type VisibleOrphanModules = ModuleSet #
Set of visible orphan modules, according to what modules have been directly imported. This is based off of the dep_orphs field, which records transitively reachable orphan modules (modules that define orphan instances).
type InstMatch = (ClsInst, [DFunInstType]) #
InstEnvs
represents the combination of the global type class instance
environment, the local type class instance environment, and the set of
transitively reachable orphan modules (according to what modules have been
directly imported) used to test orphan instance visibility.
Constructors
InstEnvs | |
Fields |
type DFunInstType = Maybe Type #
type ClsInstLookupResult = ([InstMatch], [ClsInst], [InstMatch]) #
A type-class instance. Note that there is some tricky laziness at work here. See Note [ClsInst laziness and the rough-match fields] for more details.
Constructors
ClsInst | |
Fields
|
Instances
Data ClsInst | |
Defined in GHC.Core.InstEnv Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ClsInst -> c ClsInst # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ClsInst # toConstr :: ClsInst -> Constr # dataTypeOf :: ClsInst -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ClsInst) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ClsInst) # gmapT :: (forall b. Data b => b -> b) -> ClsInst -> ClsInst # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ClsInst -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ClsInst -> r # gmapQ :: (forall d. Data d => d -> u) -> ClsInst -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ClsInst -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ClsInst -> m ClsInst # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ClsInst -> m ClsInst # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ClsInst -> m ClsInst # | |
NamedThing ClsInst | |
Defined in GHC.Core.InstEnv | |
Outputable ClsInst | |
Defined in GHC.Core.InstEnv |
pprInstances :: [ClsInst] -> SDoc #
pprInstanceHdr :: ClsInst -> SDoc #
pprInstance :: ClsInst -> SDoc #
orphNamesOfClsInst :: ClsInst -> NameSet #
Collects the names of concrete types and type constructors that make up the head of a class instance. For instance, given `class Foo a b`:
`instance Foo (Either (Maybe Int) a) Bool` would yield [Either, Maybe, Int, Bool]
Used in the implementation of ":info" in GHCi.
The tcSplitSigmaTy
is because of
instance Foo a => Baz T where ...
The decl is an orphan if Baz and T are both not locally defined,
even if Foo *is* locally defined
mkLocalInstance :: DFunId -> OverlapFlag -> [TyVar] -> Class -> [Type] -> ClsInst #
Arguments
:: Name | the name of the class |
-> [RoughMatchTc] | the types which the class was applied to |
-> Name | the |
-> DFunId | the |
-> OverlapFlag | may this instance overlap? |
-> IsOrphan | is this instance an orphan? |
-> ClsInst |
memberInstEnv :: InstEnv -> ClsInst -> Bool #
Checks for an exact match of ClsInst in the instance environment. We use this when we do signature checking in GHC.Tc.Module
lookupUniqueInstEnv :: InstEnvs -> Class -> [Type] -> Either SDoc (ClsInst, [Type]) #
Look up an instance in the given instance environment. The given class application must match exactly one instance and the match may not contain any flexi type variables. If the lookup is unsuccessful, yield 'Left errorMessage'.
lookupInstEnv :: Bool -> InstEnvs -> Class -> [Type] -> ClsInstLookupResult #
See Note [Rules for instance lookup] ^ See Note [Safe Haskell Overlapping Instances] in GHC.Tc.Solver ^ See Note [Safe Haskell Overlapping Instances Implementation] in GHC.Tc.Solver
isOverlapping :: ClsInst -> Bool #
isOverlappable :: ClsInst -> Bool #
isIncoherent :: ClsInst -> Bool #
instanceRoughTcs :: ClsInst -> [RoughMatchTc] #
instanceDFunId :: ClsInst -> DFunId #
instIsVisible :: VisibleOrphanModules -> ClsInst -> Bool #
Test if an instance is visible, by checking that its origin module
is in VisibleOrphanModules
.
See Note [Instance lookup and orphan instances]
instEnvElts :: InstEnv -> [ClsInst] #
instEnvClasses :: InstEnv -> [Class] #
identicalClsInstHead :: ClsInst -> ClsInst -> Bool #
True when when the instance heads are the same e.g. both are Eq [(a,b)] Used for overriding in GHCi Obviously should be insensitive to alpha-renaming
fuzzyClsInstCmp :: ClsInst -> ClsInst -> Ordering #
A fuzzy comparison function for class instances, intended for sorting instances before displaying them to the user.
extendInstEnvList :: InstEnv -> [ClsInst] -> InstEnv #
extendInstEnv :: InstEnv -> ClsInst -> InstEnv #
emptyInstEnv :: InstEnv #
deleteFromInstEnv :: InstEnv -> ClsInst -> InstEnv #
deleteDFunFromInstEnv :: InstEnv -> DFunId -> InstEnv #
classInstances :: InstEnvs -> Class -> [ClsInst] #
Constructors
TcLclEnv | |
Fields
|
setLclEnvTcLevel :: TcLclEnv -> TcLevel -> TcLclEnv #
setLclEnvLoc :: TcLclEnv -> RealSrcSpan -> TcLclEnv #
getLclEnvTcLevel :: TcLclEnv -> TcLevel #
getLclEnvLoc :: TcLclEnv -> RealSrcSpan #
type TypeSize = IntWithInf #
type TcTyVarSet = TyVarSet #
type TcTyVarBinder = TyVarBinder #
type TcTyCoVarSet = TyCoVarSet #
type TcThetaType = ThetaType #
type TcSigmaType = TcType #
type TcReqTVBinder = ReqTVBinder #
type TcPredType = PredType #
Instances
Outputable TcLevel | |
Defined in GHC.Tc.Utils.TcType | |
Eq TcLevel | |
Ord TcLevel | |
type TcInvisTVBinder = InvisTVBinder #
type TcDTyVarSet = DTyVarSet #
type TcDTyCoVarSet = DTyCoVarSet #
data SyntaxOpType #
What to expect for an argument to a rebindable-syntax operator.
Quite like Type
, but allows for holes to be filled in by tcSyntaxOp.
The callback called from tcSyntaxOp gets a list of types; the meaning
of these types is determined by a left-to-right depth-first traversal
of the SyntaxOpType
tree. So if you pass in
SynAny `SynFun` (SynList `SynFun` SynType Int) `SynFun` SynAny
you'll get three types back: one for the first SynAny
, the element
type of the list, and one for the last SynAny
. You don't get anything
for the SynType
, because you've said positively that it should be an
Int, and so it shall be.
You'll also get three multiplicities back: one for each function arrow. See also Note [Linear types] in Multiplicity.
This is defined here to avoid defining it in GHC.Tc.Gen.Expr boot file.
Constructors
SynAny | Any type |
SynRho | A rho type, skolemised or instantiated as appropriate |
SynList | A list type. You get back the element type of the list |
SynFun SyntaxOpType SyntaxOpType infixr 0 | A function. |
SynType ExpType | A known type. |
Constructors
TauTv | |
TyVarTv | |
RuntimeUnkTv | |
CycleBreakerTv |
Instances
Outputable MetaInfo | |
Defined in GHC.Tc.Utils.TcType |
data InferResult #
Instances
Outputable InferResult | |
Defined in GHC.Tc.Utils.TcType Methods ppr :: InferResult -> SDoc # |
An expected type to check against during type-checking. See Note [ExpType] in GHC.Tc.Utils.TcMType, where you'll also find manipulators.
Constructors
Check TcType | |
Infer !InferResult |
Instances
Outputable ExpType | |
Defined in GHC.Tc.Utils.TcType |
type ExpSigmaType = ExpType #
type ExpRhoType = ExpType #
transSuperClasses :: PredType -> [PredType] #
topTcLevel :: TcLevel #
tcTypeLevel :: TcType -> TcLevel #
tcTyVarLevel :: TcTyVar -> TcLevel #
tcTyFamInstsAndVis :: Type -> [(Bool, TyCon, [Type])] #
Like tcTyFamInsts
, except that the output records whether the
type family and its arguments occur as an invisible argument in
some type application. This information is useful because it helps GHC know
when to turn on -fprint-explicit-kinds
during error reporting so that
users can actually see the type family being mentioned.
As an example, consider:
class C a data T (a :: k) type family F a :: k instance C (T @(F Int) (F Bool))
There are two occurrences of the type family F
in that C
instance, so
will return:tcTyFamInstsAndVis
(C (T @(F Int) (F Bool)))
[ (True
, F, [Int]) , (False
, F, [Bool]) ]
F Int
is paired with True
since it appears as an invisible argument
to C
, whereas F Bool
is paired with False
since it appears an a
visible argument to C
.
See also Note [Kind arguments in error messages]
in GHC.Tc.Errors.
tcTyFamInsts :: Type -> [(TyCon, [Type])] #
Finds outermost type-family applications occurring in a type, after expanding synonyms. In the list (F, tys) that is returned we guarantee that tys matches F's arity. For example, given type family F a :: * -> * (arity 1) calling tcTyFamInsts on (Maybe (F Int Bool) will return (F, [Int]), not (F, [Int,Bool])
This is important for its use in deciding termination of type instances (see #11581). E.g. type instance G [Int] = ...(F Int <big type>)... we don't need to take <big type> into account when asking if the calls on the RHS are smaller than the LHS
tcTyConVisibilities :: TyCon -> [Bool] #
For every arg a tycon can take, the returned list says True if the argument is taken visibly, and False otherwise. Ends with an infinite tail of Trues to allow for oversaturation.
tcTyConAppTyFamInstsAndVis :: TyCon -> [Type] -> [(Bool, TyCon, [Type])] #
In an application of a TyCon
to some arguments, find the outermost
occurrences of type family applications within the arguments. This function
will not consider the TyCon
itself when checking for type family
applications.
See tcTyFamInstsAndVis
for more details on how this works (as this
function is called inside of tcTyFamInstsAndVis
).
tcTyConAppTyCon_maybe :: Type -> Maybe TyCon #
Like tcRepSplitTyConApp_maybe
, but only returns the TyCon
.
tcTyConAppTyCon :: Type -> TyCon #
tcTyConAppArgs :: Type -> [Type] #
tcSplitTyConApp :: Type -> (TyCon, [Type]) #
tcSplitSomeForAllTyVars :: (ArgFlag -> Bool) -> Type -> ([TyVar], Type) #
Like tcSplitForAllTyVars
, but only splits a ForAllTy
if argf_pred argf
is True
, where argf
is the visibility of the ForAllTy
's binder and
argf_pred
is a predicate over visibilities provided as an argument to this
function.
tcSplitSigmaTy :: Type -> ([TyVar], ThetaType, Type) #
Split a sigma type into its parts. This only splits invisible type variable binders, as these are the only forms of binder that the typechecker will implicitly instantiate.
tcSplitPiTys :: Type -> ([TyBinder], Type) #
Splits a forall type into a list of TyBinder
s and the inner type.
Always succeeds, even if it returns an empty list.
tcSplitPiTy_maybe :: Type -> Maybe (TyBinder, Type) #
Splits a type into a TyBinder and a body, if possible. Panics otherwise
tcSplitPhiTy :: Type -> (ThetaType, Type) #
tcSplitNestedSigmaTys :: Type -> ([TyVar], ThetaType, Type) #
Split a sigma type into its parts, going underneath as many ForAllTy
s
as possible. For example, given this type synonym:
type Traversal s t a b = forall f. Applicative f => (a -> f b) -> s -> f t
if you called tcSplitSigmaTy
on this type:
forall s t a b. Each s t a b => Traversal s t a b
then it would return ([s,t,a,b], [Each s t a b], Traversal s t a b)
. But
if you instead called tcSplitNestedSigmaTys
on the type, it would return
([s,t,a,b,f], [Each s t a b, Applicative f], (a -> f b) -> s -> f t)
.
tcSplitFunTysN :: Arity -> TcRhoType -> Either Arity ([Scaled TcSigmaType], TcSigmaType) #
Split off exactly the specified number argument types
Returns
(Left m) if there are m
missing arrows in the type
(Right (tys,res)) if the type looks like t1 -> ... -> tn -> res
tcSplitForAllTyVars :: Type -> ([TyVar], Type) #
Like tcSplitPiTys
, but splits off only named binders,
returning just the tyvars.
tcSplitForAllTyVarBinders :: Type -> ([TyVarBinder], Type) #
Like tcSplitForAllTyVars
, but splits off only named binders.
tcSplitForAllTyVarBinder_maybe :: Type -> Maybe (TyVarBinder, Type) #
tcSplitForAllReqTVBinders :: Type -> ([TcReqTVBinder], Type) #
Like tcSplitForAllTyVars
, but only splits ForAllTy
s with Required
type
variable binders. All split tyvars are annotated with ()
.
tcSplitForAllInvisTyVars :: Type -> ([TyVar], Type) #
Like tcSplitForAllTyVars
, but only splits ForAllTy
s with Invisible
type variable binders.
tcSplitForAllInvisTVBinders :: Type -> ([TcInvisTVBinder], Type) #
Like tcSplitForAllTyVars
, but only splits ForAllTy
s with Invisible
type
variable binders. All split tyvars are annotated with their Specificity
.
tcSplitDFunHead :: Type -> (Class, [Type]) #
tcSplitAppTys :: Type -> (Type, [Type]) #
tcSplitAppTy :: Type -> (Type, Type) #
tcRepGetNumAppTys :: Type -> Arity #
Returns the number of arguments in the given type, without looking through synonyms. This is used only for error reporting. We don't look through synonyms because of #11313.
tcIsTyVarTy :: Type -> Bool #
tcIsTcTyVar :: TcTyVar -> Bool #
tcIsForAllTy :: Type -> Bool #
Is this a ForAllTy with a named binder?
tcGetTyVar_maybe :: Type -> Maybe TyVar #
tcGetTyVar :: String -> Type -> TyVar #
tcGetCastedTyVar_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 type
tcFunResultTyN :: HasDebugCallStack => Arity -> Type -> Type #
Strips off n *visible* arguments and returns the resulting type
tcFunResultTy :: Type -> Type #
tcFunArgTy :: Type -> Scaled Type #
tcEqTypeVis :: TcType -> TcType -> Bool #
Like tcEqType
, but returns True if the visible part of the types
are equal, even if they are really unequal (in the invisible bits)
tcEqTypeNoKindCheck :: TcType -> TcType -> Bool #
Just like tcEqType
, but will return True for types of different kinds
as long as their non-coercion structure is identical.
tcEqType :: HasDebugCallStack => TcType -> TcType -> Bool #
tcEqType implements typechecker equality, as described in
Note [Typechecker equality vs definitional equality]
.
tcEqTyConApps :: TyCon -> [Type] -> TyCon -> [Type] -> Bool #
Check whether two TyConApps are the same; if the number of arguments are different, just checks the common prefix of arguments.
synKnownType :: TcType -> SyntaxOpType #
Like SynType
but accepts a regular TcType
strictlyDeeperThan :: TcLevel -> TcLevel -> Bool #
setMetaTyVarTcLevel :: TcTyVar -> TcLevel -> TcTyVar #
sameDepthAs :: TcLevel -> TcLevel -> Bool #
pushTcLevel :: TcLevel -> TcLevel #
promoteSkolemX :: TcLevel -> TCvSubst -> TcTyVar -> (TCvSubst, TcTyVar) #
Change the TcLevel in a skolem, extending a substitution
promoteSkolem :: TcLevel -> TcTyVar -> TcTyVar #
pickyEqType :: TcType -> TcType -> Bool #
Like pickyEqTypeVis
, but returns a Bool for convenience
pickQuantifiablePreds :: TyVarSet -> TcThetaType -> TcThetaType #
When inferring types, should we quantify over a given predicate? Generally true of classes; generally false of equality constraints. Equality constraints that mention quantified type variables and implicit variables complicate the story. See Notes [Inheriting implicit parameters] and [Quantifying over equality constraints]
pickCapturedPreds :: TyVarSet -> TcThetaType -> TcThetaType #
mkTyVarNamePairs :: [TyVar] -> [(Name, TyVar)] #
mkTcCastTy :: Type -> Coercion -> Type #
mkTcAppTys :: Type -> [Type] -> Type #
mkSynFunTys :: [SyntaxOpType] -> ExpType -> SyntaxOpType #
Like mkFunTys
but for SyntaxOpType
mkSpecSigmaTy :: [TyVar] -> [PredType] -> Type -> Type #
Make a sigma ty where all type variables are "specified". That is, they can be used with visible type application
mkMinimalBySCs :: (a -> PredType) -> [a] -> [a] #
mkInfSigmaTy :: [TyCoVar] -> [PredType] -> Type -> Type #
Make a sigma ty where all type variables are Inferred
. That is,
they cannot be used with visible type application.
mkCheckExpType :: TcType -> ExpType #
Make an ExpType
suitable for checking.
metaTyVarTcLevel :: TcTyVar -> TcLevel #
metaTyVarRef :: TyVar -> IORef MetaDetails #
metaTyVarInfo :: TcTyVar -> MetaInfo #
maxTcLevel :: TcLevel -> TcLevel -> TcLevel #
isTyVarTyVar :: Var -> Bool #
isTyVarClassPred :: PredType -> Bool #
isTyFamFree :: Type -> Bool #
Check that a type does not contain any type family applications.
isTouchableMetaTyVar :: TcLevel -> TcTyVar -> Bool #
isTopTcLevel :: TcLevel -> Bool #
isStringTy :: Type -> Bool #
Is a type String
?
isSkolemTyVar :: TcTyVar -> Bool #
isRuntimeUnkSkol :: TyVar -> Bool #
isPromotableMetaTyVar :: TcTyVar -> Bool #
isOverloadedTy :: Type -> Bool #
isOverlappableTyVar :: TcTyVar -> Bool #
isNextTyConArgVisible :: TyCon -> [Type] -> Bool #
If the tycon is applied to the types, is the next argument visible?
isNextArgVisible :: TcType -> Bool #
Should this type be applied to a visible argument?
isNaturalTy :: Type -> Bool #
isMetaTyVarTy :: TcType -> Bool #
isIntegerTy :: Type -> Bool #
isIndirect :: MetaDetails -> Bool #
isImprovementPred :: PredType -> Bool #
isImmutableTyVar :: TyVar -> Bool #
isFunPtrTy :: Type -> Bool #
isFloatingTy :: Type -> Bool #
Does a type represent a floating-point number?
isFlexi :: MetaDetails -> Bool #
isFFIPrimResultTy :: DynFlags -> Type -> Validity #
isFFIPrimArgumentTy :: DynFlags -> Type -> Validity #
isFFILabelTy :: Type -> Validity #
isFFIImportResultTy :: DynFlags -> Type -> Validity #
isFFIExternalTy :: Type -> Validity #
isFFIExportResultTy :: Type -> Validity #
isFFIDynTy :: Type -> Type -> Validity #
isDoubleTy :: Type -> Bool #
isCycleBreakerTyVar :: TcTyVar -> Bool #
isCallStackTy :: Type -> Bool #
Is a type a CallStack
?
isCallStackPred :: Class -> [Type] -> Maybe FastString #
Is a PredType
a CallStack
implicit parameter?
If so, return the name of the parameter.
isAmbiguousTyVar :: TcTyVar -> Bool #
immSuperClasses :: Class -> [Type] -> [PredType] #
hasTyVarHead :: Type -> Bool #
getDFunTyKey :: Type -> OccName #
exactTyCoVarsOfTypes :: [Type] -> TyCoVarSet #
exactTyCoVarsOfType :: Type -> TyCoVarSet #
deeperThanOrSame :: TcLevel -> TcLevel -> Bool #
deNoteType :: Type -> Type #
checkValidClsArgs :: Bool -> Class -> [KindOrType] -> Bool #
anyRewritableCanEqLHS :: EqRel -> (EqRel -> TcTyVar -> Bool) -> (EqRel -> TyCon -> [TcType] -> Bool) -> TcType -> Bool #
orphNamesOfTypes :: [Type] -> NameSet #
orphNamesOfType :: Type -> NameSet #
orphNamesOfCoCon :: forall (br :: BranchFlag). CoAxiom br -> NameSet #
orphNamesOfCo :: Coercion -> NameSet #
lookupOrigNameCache :: OrigNameCache -> Module -> OccName -> Maybe Name #
extendNameCache :: OrigNameCache -> Module -> OccName -> Name -> OrigNameCache #
wordTyConName :: Name #
wordDataCon :: DataCon #
word8TyCon :: TyCon #
word8DataCon :: DataCon #
wiredInTyCons :: [TyCon] #
unitTyConKey :: Unique #
unitDataConId :: Id #
unitDataCon :: DataCon #
unboxedUnitTy :: Type #
unboxedSumKind :: [Type] -> Kind #
Specialization of unboxedTupleSumKind
for sums
typeToTypeKind :: Kind #
tupleDataConName :: Boxity -> Arity -> Name #
trueDataConId :: Id #
trueDataCon :: DataCon #
orderingTyCon :: TyCon #
ordLTDataConId :: Id #
ordLTDataCon :: DataCon #
ordGTDataConId :: Id #
ordGTDataCon :: DataCon #
ordEQDataConId :: Id #
ordEQDataCon :: DataCon #
oneDataConName :: Name #
oneDataCon :: DataCon #
nonEmptyTyCon :: TyCon #
nilDataConName :: Name #
nilDataCon :: DataCon #
naturalTyCon :: TyCon #
mkWiredInTyConName :: BuiltInSyntax -> Module -> FastString -> Unique -> TyCon -> Name #
mkWiredInIdName :: Module -> FastString -> Unique -> Id -> Name #
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 GHC.Core.Make
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]
mkTupleStr :: Boxity -> Arity -> String #
maybeTyConName :: Name #
maybeTyCon :: TyCon #
manyDataConName :: Name #
manyDataCon :: DataCon #
makeRecoveryTyCon :: TyCon -> TyCon #
Make a fake, recovery TyCon
from an existing one.
Used when recovering from errors in type declarations
listTyConName :: Name #
justDataConName :: Name #
justDataCon :: DataCon #
isCTupleTyConName :: Name -> Bool #
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(,,,)).
integerTyCon :: TyCon #
intTyCon_RDR :: RdrName #
intTyConName :: Name #
intDataCon :: DataCon #
heqTyConName :: Name #
heqDataCon :: DataCon #
floatTyConName :: Name #
floatTyCon :: TyCon #
floatDataCon :: DataCon #
filterCTuple :: RdrName -> RdrName #
Replaces constraint tuple names with corresponding boxed ones.
falseDataConId :: Id #
falseDataCon :: DataCon #
eqTyCon_RDR :: RdrName #
eqTyConName :: Name #
doubleTyConName :: Name #
doubleTyCon :: TyCon #
consDataConName :: Name #
consDataCon :: DataCon #
coercibleClass :: Class #
charTyConName :: Name #
charDataCon :: DataCon #
cTupleTyConNames :: [Name] #
cTupleTyConNameArity_maybe :: Name -> Maybe Arity #
If the given name is that of a constraint tuple, return its arity.
cTupleTyCon :: Arity -> TyCon #
cTupleSelId :: ConTag -> Arity -> Id #
cTupleDataConNames :: [Name] #
boxingDataCon_maybe :: TyCon -> Maybe DataCon #
boolTyConName :: Name #
zapStableUnfolding :: Id -> Id #
zapLamIdInfo :: Id -> Id #
zapIdUsedOnceInfo :: Id -> Id #
zapIdUsageInfo :: Id -> Id #
zapIdUsageEnvInfo :: Id -> Id #
zapIdTailCallInfo :: Id -> Id #
zapIdStrictness :: Id -> Id #
zapIdOccInfo :: Id -> Id #
zapIdDemandInfo :: Id -> Id #
zapFragileIdInfo :: Id -> Id #
updOneShotInfo :: Id -> OneShotInfo -> Id #
typeOneShot :: Type -> OneShotInfo #
stateHackOneShot :: OneShotInfo #
Should we apply the state hack to values of this Type
?
setOneShotLambda :: Id -> Id #
setInlinePragma :: Id -> InlinePragma -> Id infixl 1 #
setInlineActivation :: Id -> Activation -> Id infixl 1 #
setIdUnique :: Id -> Unique -> Id #
setIdUnfolding :: Id -> Unfolding -> Id infixl 1 #
setIdStrictness :: Id -> StrictSig -> Id infixl 1 #
setIdSpecialisation :: Id -> RuleInfo -> Id infixl 1 #
setIdOneShotInfo :: Id -> OneShotInfo -> Id infixl 1 #
setIdOccInfo :: Id -> OccInfo -> Id infixl 1 #
setIdNotExported :: Id -> Id #
setIdLFInfo :: Id -> LambdaFormInfo -> Id #
setIdExported :: Id -> Id #
setIdDemandInfo :: Id -> Demand -> Id infixl 1 #
setIdCprInfo :: Id -> CprSig -> Id infixl 1 #
setIdCallArity :: Id -> Arity -> Id infixl 1 #
setIdCafInfo :: Id -> CafInfo -> Id #
setIdArity :: Id -> Arity -> Id infixl 1 #
setCaseBndrEvald :: StrictnessMark -> Id -> Id #
scaleVarBy :: Mult -> Var -> Var #
Like scaleIdBy
, but skips non-Ids. Useful for scaling
a mixed list of ids and tyvars.
recordSelectorTyCon :: Id -> RecSelParent #
realIdUnfolding :: Id -> Unfolding #
modifyInlinePragma :: Id -> (InlinePragma -> InlinePragma) -> Id #
modifyIdInfo :: HasDebugCallStack => (IdInfo -> IdInfo) -> Id -> Id #
mkWorkerId :: Unique -> Id -> Type -> Id #
Workers get local names. CoreTidy will externalise these if necessary
mkUserLocalOrCoVar :: OccName -> Unique -> Mult -> Type -> SrcSpan -> Id #
Like mkUserLocal
, but checks if we have a coercion type
mkUserLocal :: OccName -> Unique -> Mult -> Type -> SrcSpan -> Id #
Create a user local Id
. These are local Id
s (see GHC.Types.Var) with a name and location that the user might recognize
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 Id
s in bijection with Int
s, typically used in unfoldings
mkSysLocalOrCoVarM :: MonadUnique m => FastString -> Mult -> Type -> m Id #
mkSysLocalOrCoVar :: FastString -> Unique -> Mult -> Type -> Id #
Like mkSysLocal
, but checks to see if we have a covar type
mkSysLocalM :: MonadUnique m => FastString -> Mult -> Type -> m Id #
mkSysLocal :: FastString -> Unique -> Mult -> Type -> Id #
mkLocalIdWithInfo :: HasDebugCallStack => Name -> Mult -> Type -> IdInfo -> Id #
mkLocalIdOrCoVar :: Name -> Mult -> Type -> Id #
Like mkLocalId
, but checks the type to see if it should make a covar
mkLocalId :: HasDebugCallStack => Name -> Mult -> Type -> Id #
For an explanation of global vs. local Id
s, see GHC.Types.Var
mkLocalCoVar :: Name -> Type -> CoVar #
Make a local CoVar
mkGlobalId :: IdDetails -> Name -> Type -> IdInfo -> Id #
For an explanation of global vs. local Id
s, see GHC.Types.Var.Var
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]
localiseId :: Id -> Id #
lazySetIdInfo :: Id -> IdInfo -> Id #
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
.
isStateHackType :: Type -> Bool #
isRecordSelector :: Id -> Bool #
isProbablyOneShotLambda :: Id -> Bool #
isPrimOpId_maybe :: Id -> Maybe PrimOp #
isPrimOpId :: Id -> Bool #
isPatSynRecordSelector :: Id -> Bool #
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 GHC.Core.Opt.Arity
isNeverLevPolyId :: Id -> Bool #
isNaughtyRecordSelector :: Id -> Bool #
isJoinId_maybe :: Var -> Maybe JoinArity #
isImplicitId :: Id -> Bool #
isImplicitId
tells whether an Id
s 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.
isFCallId_maybe :: Id -> Maybe ForeignCall #
isDeadEndId :: Var -> Bool #
Returns true if an application to n args diverges or throws an exception See Note [Dead ends] in GHC.Types.Demand.
isDeadBinder :: Id -> Bool #
isDataConWrapId_maybe :: Id -> Maybe DataCon #
isDataConWrapId :: Id -> Bool #
isDataConWorkId_maybe :: Id -> Maybe DataCon #
isDataConWorkId :: Id -> Bool #
isDataConRecordSelector :: Id -> Bool #
isDataConId_maybe :: Id -> Maybe DataCon #
isConLikeId :: Id -> Bool #
isClassOpId_maybe :: Id -> Maybe Class #
isClassOpId :: Id -> Bool #
idUnfolding :: Id -> Unfolding #
idStrictness :: Id -> StrictSig #
Accesses the Id'
s strictnessInfo
.
idStateHackOneShotInfo :: Id -> OneShotInfo #
Like idOneShotInfo
, but taking the Horrible State Hack in to account
See Note [The state-transformer hack] in GHC.Core.Opt.Arity
idSpecialisation :: Id -> RuleInfo #
idScaledType :: Id -> Scaled Type #
idRuleMatchInfo :: Id -> RuleMatchInfo #
idOneShotInfo :: Id -> OneShotInfo #
idLFInfo_maybe :: Id -> Maybe LambdaFormInfo #
idJoinArity :: JoinId -> JoinArity #
idInlinePragma :: Id -> InlinePragma #
idInlineActivation :: Id -> Activation #
idHasRules :: Id -> Bool #
idFunRepArity :: Id -> RepArity #
idDemandInfo :: Id -> Demand #
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
idCoreRules :: Id -> [CoreRule] #
idCallArity :: Id -> Arity #
hasNoBinding :: Id -> Bool #
Returns True
of an Id
which may not have a
binding, even though it is defined in this module.
clearOneShotLambda :: Id -> Id #
type family SyntaxExpr p #
Syntax Expression
SyntaxExpr is represents the function used in interpreting rebindable
syntax. In the parser, we have no information to supply; in the renamer,
we have the name of the function (but see
Note [Monad fail : Rebindable syntax, overloaded strings] for a wrinkle)
and in the type-checker we have a more elaborate structure SyntaxExprTc
.
In some contexts, rebindable syntax is not implemented, and so we have constructors to represent that possibility in both the renamer and typechecker instantiations.
E.g. (>>=)
is filled in before the renamer by the appropriate Name
for
(>>=)
, and then instantiated by the type checker with its type args
etc
Instances
type SyntaxExpr (GhcPass p) | |
Defined in GHC.Hs.Expr |
data MatchGroup p body #
Constructors
MG | |
XMatchGroup !(XXMatchGroup p body) |
Arguments
= XRec p (HsExpr p) | May have |
Located Haskell Expression
Haskell Splice
Constructors
HsTypedSplice (XTypedSplice id) SpliceDecoration (IdP id) (LHsExpr id) | |
HsUntypedSplice (XUntypedSplice id) SpliceDecoration (IdP id) (LHsExpr id) | |
HsQuasiQuote (XQuasiQuote id) (IdP id) (IdP id) SrcSpan FastString | |
HsSpliced (XSpliced id) ThModFinalizers (HsSplicedThing id) | |
XSplice !(XXSplice id) |
Instances
type Anno (HsSplice (GhcPass p)) | |
Defined in GHC.Hs.Expr |
A Haskell expression.
Constructors
HsVar (XVar p) (LIdP p) | Variable See Note [Located RdrNames] |
HsUnboundVar (XUnboundVar p) OccName | Unbound variable; also used for "holes" (_ or _x). Turned from HsVar to HsUnboundVar by the renamer, when it finds an out-of-scope variable or hole. The (XUnboundVar p) field becomes an HoleExprRef after typechecking; this is where the erroring expression will be written after solving. See Note [Holes] in GHC.Tc.Types.Constraint. |
HsConLikeOut (XConLikeOut p) ConLike | After typechecker only; must be different HsVar for pretty printing |
HsRecFld (XRecFld p) (AmbiguousFieldOcc p) | Variable pointing to record selector The parser produces HsVars The renamer renames record-field selectors to HsRecFld The typechecker preserves HsRecFld |
HsOverLabel (XOverLabel p) FastString | Overloaded label (Note [Overloaded labels] in GHC.OverloadedLabels) |
HsIPVar (XIPVar p) HsIPName | Implicit parameter (not in use after typechecking) |
HsOverLit (XOverLitE p) (HsOverLit p) | Overloaded literals |
HsLit (XLitE p) (HsLit p) | Simple (non-overloaded) literals |
HsLam (XLam p) (MatchGroup p (LHsExpr p)) | Lambda abstraction. Currently always a single match |
HsLamCase (XLamCase p) (MatchGroup p (LHsExpr p)) | Lambda-case |
HsApp (XApp p) (LHsExpr p) (LHsExpr p) | Application |
HsAppType (XAppTypeE p) (LHsExpr p) (LHsWcType (NoGhcTc p)) | Visible type application Explicit type argument; e.g f @Int x y NB: Has wildcards, but no implicit quantification |
OpApp (XOpApp p) (LHsExpr p) (LHsExpr p) (LHsExpr p) | Operator applications: NB Bracketed ops such as (+) come out as Vars. |
NegApp (XNegApp p) (LHsExpr p) (SyntaxExpr p) | Negation operator. Contains the negated expression and the name
of |
HsPar |
|
SectionL (XSectionL p) (LHsExpr p) (LHsExpr p) | |
SectionR (XSectionR p) (LHsExpr p) (LHsExpr p) | |
ExplicitTuple (XExplicitTuple p) [HsTupArg p] Boxity | Used for explicit tuples and sections thereof |
ExplicitSum (XExplicitSum p) ConTag Arity (LHsExpr p) | Used for unboxed sum types
There will be multiple |
HsCase (XCase p) (LHsExpr p) (MatchGroup p (LHsExpr p)) |
|
HsIf (XIf p) (LHsExpr p) (LHsExpr p) (LHsExpr p) | |
HsMultiIf (XMultiIf p) [LGRHS p (LHsExpr p)] | Multi-way if |
HsLet (XLet p) (HsLocalBinds p) (LHsExpr p) | let(rec)
|
HsDo (XDo p) (HsStmtContext (HsDoRn p)) (XRec p [ExprLStmt p]) | |
ExplicitList (XExplicitList p) [LHsExpr p] | Syntactic list: [a,b,c,...]
|
RecordCon | Record construction
|
Fields
| |
RecordUpd | Record update |
Fields
| |
HsGetField | Record field selection e.g This case only arises when the OverloadedRecordDot langauge extension is enabled. |
HsProjection | Record field selector. e.g. This case only arises when the OverloadedRecordDot langauge extensions is enabled. |
Fields
| |
ExprWithTySig (XExprWithTySig p) (LHsExpr p) (LHsSigWcType (NoGhcTc p)) | Expression with an explicit type signature. |
ArithSeq (XArithSeq p) (Maybe (SyntaxExpr p)) (ArithSeqInfo p) | Arithmetic sequence
|
HsBracket (XBracket p) (HsBracket p) | |
HsRnBracketOut (XRnBracketOut p) (HsBracket (HsBracketRn p)) [PendingRnSplice' p] | |
HsTcBracketOut (XTcBracketOut p) (Maybe QuoteWrapper) (HsBracket (HsBracketRn p)) [PendingTcSplice' p] | |
HsSpliceE (XSpliceE p) (HsSplice p) | |
HsProc (XProc p) (LPat p) (LHsCmdTop p) |
|
HsStatic (XStatic p) (LHsExpr p) | |
HsTick (XTick p) CoreTickish (LHsExpr p) | |
HsBinTick (XBinTick p) Int Int (LHsExpr p) | |
HsPragE (XPragE p) (HsPragE p) (LHsExpr p) | |
XExpr !(XXExpr p) |
Instances
Guarded Right-Hand Sides
GRHSs are used both for pattern bindings and for Matches
Constructors
GRHSs | |
Fields
| |
XGRHSs !(XXGRHSs p body) |
type family XXWarnDecls x #
Instances
type XXWarnDecls (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XXWarnDecl x #
Instances
type XXWarnDecl (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XXValBindsLR x x' #
Instances
type XXValBindsLR (GhcPass pL) (GhcPass pR) | |
Defined in GHC.Hs.Binds |
type family XXTyVarBndr x #
Instances
type XXTyVarBndr (GhcPass _1) | |
Defined in GHC.Hs.Type |
type family XXTyFamInstDecl x #
Instances
type XXTyFamInstDecl (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XXTyClGroup x #
Instances
type XXTyClGroup (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XXTyClDecl x #
Instances
type XXTyClDecl (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XXStandaloneKindSig x #
Instances
type XXStandaloneKindSig (GhcPass p) | |
Defined in GHC.Hs.Decls |
type family XXSpliceDecl x #
Instances
type XXSpliceDecl (GhcPass _1) | |
Defined in GHC.Hs.Decls |
Instances
type XXSplice GhcPs | |
Defined in GHC.Hs.Expr | |
type XXSplice GhcRn | |
Defined in GHC.Hs.Expr | |
type XXSplice GhcTc | |
Defined in GHC.Hs.Expr |
type family XXRuleDecls x #
Instances
type XXRuleDecls (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XXRuleDecl x #
Instances
type XXRuleDecl (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XXRuleBndr x #
Instances
type XXRuleBndr (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XXRoleAnnotDecl x #
Instances
type XXRoleAnnotDecl (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XXPatSynBind x x' #
Instances
type XXPatSynBind (GhcPass idL) (GhcPass idR) | |
Defined in GHC.Hs.Binds |
type family XXParStmtBlock x x' #
Instances
type XXParStmtBlock (GhcPass pL) (GhcPass pR) | |
Defined in GHC.Hs.Expr |
type family XXMatchGroup x b #
Instances
type XXMatchGroup (GhcPass _1) b | |
Defined in GHC.Hs.Expr |
type family XXLHsQTyVars x #
Instances
type XXLHsQTyVars (GhcPass _1) | |
Defined in GHC.Hs.Type |
type family XXInstDecl x #
Instances
type XXInstDecl (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XXInjectivityAnn x #
Instances
type XXInjectivityAnn (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XXImportDecl x #
Instances
type XXImportDecl (GhcPass _1) | |
Defined in GHC.Hs.ImpExp |
type family XXHsWildCardBndrs x b #
Instances
type XXHsWildCardBndrs (GhcPass _1) _2 | |
Defined in GHC.Hs.Type |
type family XXHsSigType x #
Instances
type XXHsSigType (GhcPass _1) | |
Defined in GHC.Hs.Type |
type family XXHsPatSigType x #
Instances
type XXHsPatSigType (GhcPass _1) | |
Defined in GHC.Hs.Type |
type family XXHsOuterTyVarBndrs x #
Instances
type XXHsOuterTyVarBndrs (GhcPass _1) | |
Defined in GHC.Hs.Type |
type family XXHsLocalBindsLR x x' #
Instances
type XXHsLocalBindsLR (GhcPass pL) (GhcPass pR) | |
Defined in GHC.Hs.Binds |
type family XXHsIPBinds x #
Instances
type XXHsIPBinds (GhcPass p) | |
Defined in GHC.Hs.Binds |
type family XXHsForAllTelescope x #
Instances
type XXHsForAllTelescope (GhcPass _1) | |
Defined in GHC.Hs.Type |
type family XXHsFieldLabel x #
Instances
type XXHsFieldLabel (GhcPass _1) | |
Defined in GHC.Hs.Expr |
type family XXHsDerivingClause x #
Instances
type XXHsDerivingClause (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XXHsDataDefn x #
Instances
type XXHsDataDefn (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XXHsBindsLR x x' #
Instances
type XXHsBindsLR (GhcPass pL) (GhcPass pR) | |
Defined in GHC.Hs.Binds |
type family XXForeignDecl x #
Instances
type XXForeignDecl (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XXFixitySig x #
Instances
type XXFixitySig (GhcPass p) | |
Defined in GHC.Hs.Binds |
type family XXFieldOcc x #
Instances
type XXFieldOcc (GhcPass _1) | |
Defined in GHC.Hs.Type |
type family XXFamilyResultSig x #
Instances
type XXFamilyResultSig (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XXFamilyDecl x #
Instances
type XXFamilyDecl (GhcPass _1) | |
Defined in GHC.Hs.Decls |
Instances
type XXExpr GhcPs | |
Defined in GHC.Hs.Expr | |
type XXExpr GhcRn | |
Defined in GHC.Hs.Expr | |
type XXExpr GhcTc | |
Defined in GHC.Hs.Expr |
type family XXDerivDecl x #
Instances
type XXDerivDecl (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XXDerivClauseTys x #
Instances
type XXDerivClauseTys (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XXDefaultDecl x #
Instances
type XXDefaultDecl (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XXConDeclField x #
Instances
type XXConDeclField (GhcPass _1) | |
Defined in GHC.Hs.Type |
type family XXClsInstDecl x #
Instances
type XXClsInstDecl (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XXApplicativeArg x #
Instances
type XXApplicativeArg (GhcPass _1) | |
Defined in GHC.Hs.Expr |
type family XXAmbiguousFieldOcc x #
Instances
type XXAmbiguousFieldOcc (GhcPass _1) | |
Defined in GHC.Hs.Type |
type family XXABExport x #
Instances
type XXABExport (GhcPass p) | |
Defined in GHC.Hs.Binds |
Instances
type XWildPat GhcPs | |
Defined in GHC.Hs.Pat | |
type XWildPat GhcRn | |
Defined in GHC.Hs.Pat | |
type XWildPat GhcTc | |
Defined in GHC.Hs.Pat |
type family XWildCardTy x #
Instances
type XWildCardTy (GhcPass _1) | |
Defined in GHC.Hs.Type |
Instances
type XWarnings GhcPs | |
Defined in GHC.Hs.Decls | |
type XWarnings GhcRn | |
Defined in GHC.Hs.Decls | |
type XWarnings GhcTc | |
Defined in GHC.Hs.Decls |
Instances
type XWarningD (GhcPass _1) | |
Defined in GHC.Hs.Decls |
Instances
type XViewPat GhcPs | |
Defined in GHC.Hs.Pat | |
type XViewPat GhcRn | |
Defined in GHC.Hs.Pat | |
type XViewPat GhcTc | |
Defined in GHC.Hs.Pat |
type family XViaStrategy x #
Instances
type XViaStrategy GhcPs | |
Defined in GHC.Hs.Decls | |
type XViaStrategy GhcRn | |
Defined in GHC.Hs.Decls | |
type XViaStrategy GhcTc | |
Defined in GHC.Hs.Decls |
Instances
type XVarPat (GhcPass _1) | |
Defined in GHC.Hs.Pat |
Instances
type XVarBr (GhcPass _1) | |
Defined in GHC.Hs.Expr |
Instances
type XVarBind (GhcPass pL) (GhcPass pR) | |
Defined in GHC.Hs.Binds |
Instances
type XVar (GhcPass _1) | |
Defined in GHC.Hs.Expr | |
type XVar (GhcPass _1) | |
Defined in GHC.Hs.Expr |
Instances
type XValD (GhcPass _1) | |
Defined in GHC.Hs.Decls |
Instances
type XValBinds (GhcPass pL) (GhcPass pR) | |
Defined in GHC.Hs.Binds |
type family XUserTyVar x #
Instances
type XUserTyVar (GhcPass _1) | |
Defined in GHC.Hs.Type |
type family XUntypedSplice x #
Instances
type XUntypedSplice (GhcPass _1) | |
Defined in GHC.Hs.Expr |
type family XUnboundVar x #
Instances
type XUnboundVar GhcPs | |
Defined in GHC.Hs.Expr | |
type XUnboundVar GhcRn | |
Defined in GHC.Hs.Expr | |
type XUnboundVar GhcTc | |
Defined in GHC.Hs.Expr |
type family XUnambiguous x #
Instances
type XUnambiguous GhcPs | |
Defined in GHC.Hs.Type | |
type XUnambiguous GhcRn | |
Defined in GHC.Hs.Type | |
type XUnambiguous GhcTc | |
Defined in GHC.Hs.Type |
type family XTypedSplice x #
Instances
type XTypedSplice (GhcPass _1) | |
Defined in GHC.Hs.Expr |
Instances
type XTypBr (GhcPass _1) | |
Defined in GHC.Hs.Expr |
Instances
type XTyVarSig (GhcPass _1) | |
Defined in GHC.Hs.Decls |
Instances
type XTyLit (GhcPass _1) | |
Defined in GHC.Hs.Type |
type family XTyFamInstD x #
Instances
type XTyFamInstD GhcPs | |
Defined in GHC.Hs.Decls | |
type XTyFamInstD GhcRn | |
Defined in GHC.Hs.Decls | |
type XTyFamInstD GhcTc | |
Defined in GHC.Hs.Decls |
Instances
type XTyClD (GhcPass _1) | |
Defined in GHC.Hs.Decls |
Instances
type XTuplePat GhcPs | |
Defined in GHC.Hs.Pat | |
type XTuplePat GhcRn | |
Defined in GHC.Hs.Pat | |
type XTuplePat GhcTc | |
Defined in GHC.Hs.Pat |
type family XTransStmt x x' b #
Instances
type XTransStmt (GhcPass _1) GhcPs b | |
Defined in GHC.Hs.Expr | |
type XTransStmt (GhcPass _1) GhcRn b | |
Defined in GHC.Hs.Expr | |
type XTransStmt (GhcPass _1) GhcTc b | |
Defined in GHC.Hs.Expr |
Instances
type XTick (GhcPass _1) | |
Defined in GHC.Hs.Expr |
type family XTcBracketOut x #
Instances
type XTcBracketOut (GhcPass _1) | |
Defined in GHC.Hs.Expr |
Instances
type XTExpBr (GhcPass _1) | |
Defined in GHC.Hs.Expr |
Instances
type XSumPat GhcPs | |
Defined in GHC.Hs.Pat | |
type XSumPat GhcRn | |
Defined in GHC.Hs.Pat | |
type XSumPat GhcTc | |
Defined in GHC.Hs.Pat |
type family XStockStrategy x #
Instances
type XStockStrategy GhcPs | |
Defined in GHC.Hs.Decls | |
type XStockStrategy GhcRn | |
Defined in GHC.Hs.Decls | |
type XStockStrategy GhcTc | |
Defined in GHC.Hs.Decls |
Instances
type XStarTy (GhcPass _1) | |
Defined in GHC.Hs.Type |
type family XStandaloneKindSig x #
Instances
type XStandaloneKindSig GhcPs | |
Defined in GHC.Hs.Decls | |
type XStandaloneKindSig GhcRn | |
Defined in GHC.Hs.Decls | |
type XStandaloneKindSig GhcTc | |
Defined in GHC.Hs.Decls |
Instances
type XSpliced (GhcPass _1) | |
Defined in GHC.Hs.Expr |
Instances
type XSpliceTy GhcPs | |
Defined in GHC.Hs.Type | |
type XSpliceTy GhcRn | |
Defined in GHC.Hs.Type | |
type XSpliceTy GhcTc | |
Defined in GHC.Hs.Type |
type family XSplicePat x #
Instances
type XSplicePat (GhcPass _1) | |
Defined in GHC.Hs.Pat |
type family XSpliceDecl x #
Instances
type XSpliceDecl (GhcPass _1) | |
Defined in GHC.Hs.Decls |
Instances
type XSpliceD (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XSpecInstSig x #
Instances
type XSpecInstSig (GhcPass p) | |
Defined in GHC.Hs.Binds |
Instances
type XSigPat GhcPs | |
Defined in GHC.Hs.Pat | |
type XSigPat GhcRn | |
Defined in GHC.Hs.Pat | |
type XSigPat GhcTc | |
Defined in GHC.Hs.Pat |
Instances
type XSigD (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XSCCFunSig x #
Instances
type XSCCFunSig (GhcPass p) | |
Defined in GHC.Hs.Binds |
Instances
type XRuleD (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XRuleBndrSig x #
Instances
type XRuleBndrSig (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XRoleAnnotD x #
Instances
type XRoleAnnotD (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XRnBracketOut x #
Instances
type XRnBracketOut (GhcPass _1) | |
Defined in GHC.Hs.Expr |
type family XRecordUpd x #
Instances
type XRecordUpd GhcPs | |
Defined in GHC.Hs.Expr | |
type XRecordUpd GhcRn | |
Defined in GHC.Hs.Expr | |
type XRecordUpd GhcTc | |
Defined in GHC.Hs.Expr |
type family XRecordCon x #
Instances
type XRecordCon GhcPs | |
Defined in GHC.Hs.Expr | |
type XRecordCon GhcRn | |
Defined in GHC.Hs.Expr | |
type XRecordCon GhcTc | |
Defined in GHC.Hs.Expr |
Instances
type XRecTy GhcPs | |
Defined in GHC.Hs.Type | |
type XRecTy GhcRn | |
Defined in GHC.Hs.Type | |
type XRecTy GhcTc | |
Defined in GHC.Hs.Type |
Instances
type XRecFld (GhcPass _1) | |
Defined in GHC.Hs.Expr | |
type XRecFld (GhcPass _1) | |
Defined in GHC.Hs.Expr |
type family XRec p a = (r :: Type) | r -> a #
GHC's L prefixed variants wrap their vanilla variant in this type family,
to add SrcLoc
info via Located
. Other passes than GhcPass
not
interested in location information can define this as
type instance XRec NoLocated a = a
.
See Note [XRec and SrcSpans in the AST]
Instances
type XRec (GhcPass p) a | |
Defined in GHC.Hs.Extension |
type family XQuasiQuote x #
Instances
type XQuasiQuote (GhcPass _1) | |
Defined in GHC.Hs.Expr |
Instances
type XQualTy (GhcPass _1) | |
Defined in GHC.Hs.Type |
type family XProjection x #
Instances
type XProjection GhcPs | |
Defined in GHC.Hs.Expr | |
type XProjection GhcRn | |
Defined in GHC.Hs.Expr | |
type XProjection GhcTc | |
Defined in GHC.Hs.Expr |
Instances
type XPragE (GhcPass _1) | |
Defined in GHC.Hs.Expr |
type family XPatSynSig x #
Instances
type XPatSynSig (GhcPass p) | |
Defined in GHC.Hs.Binds |
type family XPatSynBind x x' #
Instances
type XPatSynBind (GhcPass pL) (GhcPass pR) | |
Defined in GHC.Hs.Binds |
Instances
type XPatBr (GhcPass _1) | |
Defined in GHC.Hs.Expr |
type family XParStmtBlock x x' #
Instances
type XParStmtBlock (GhcPass pL) (GhcPass pR) | |
Defined in GHC.Hs.Expr |
Instances
type XParStmt (GhcPass _1) GhcPs b | |
Defined in GHC.Hs.Expr | |
type XParStmt (GhcPass _1) GhcRn b | |
Defined in GHC.Hs.Expr | |
type XParStmt (GhcPass _1) GhcTc b | |
Defined in GHC.Hs.Expr |
Instances
Instances
type XOverLit GhcPs | |
Defined in GHC.Hs.Lit | |
type XOverLit GhcRn | |
Defined in GHC.Hs.Lit | |
type XOverLit GhcTc | |
Defined in GHC.Hs.Lit |
type family XOverLabel x #
Instances
type XOverLabel GhcPs | |
Defined in GHC.Hs.Expr | |
type XOverLabel GhcRn | |
Defined in GHC.Hs.Expr | |
type XOverLabel GhcTc | |
Defined in GHC.Hs.Expr |
Instances
type XOpTy (GhcPass _1) | |
Defined in GHC.Hs.Type |
Instances
type XNoSig (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XNewtypeStrategy x #
Instances
type XNewtypeStrategy GhcPs | |
Defined in GHC.Hs.Decls | |
type XNewtypeStrategy GhcRn | |
Defined in GHC.Hs.Decls | |
type XNewtypeStrategy GhcTc | |
Defined in GHC.Hs.Decls |
Instances
type XNegApp GhcPs | |
Defined in GHC.Hs.Expr | |
type XNegApp GhcRn | |
Defined in GHC.Hs.Expr | |
type XNegApp GhcTc | |
Defined in GHC.Hs.Expr |
type family XNPlusKPat x #
Instances
type XNPlusKPat GhcPs | |
Defined in GHC.Hs.Pat | |
type XNPlusKPat GhcRn | |
Defined in GHC.Hs.Pat | |
type XNPlusKPat GhcTc | |
Defined in GHC.Hs.Pat |
Instances
type XMultiIf GhcPs | |
Defined in GHC.Hs.Expr | |
type XMultiIf GhcRn | |
Defined in GHC.Hs.Expr | |
type XMultiIf GhcTc | |
Defined in GHC.Hs.Expr |
Instances
type XMissing GhcPs | |
Defined in GHC.Hs.Expr | |
type XMissing GhcRn | |
Defined in GHC.Hs.Expr | |
type XMissing GhcTc | |
Defined in GHC.Hs.Expr |
type family XMinimalSig x #
Instances
type XMinimalSig (GhcPass p) | |
Defined in GHC.Hs.Binds |
Instances
type XMG GhcPs b | |
Defined in GHC.Hs.Expr | |
type XMG GhcRn b | |
Defined in GHC.Hs.Expr | |
type XMG GhcTc b | |
Defined in GHC.Hs.Expr |
Instances
type XLitPat (GhcPass _1) | |
Defined in GHC.Hs.Pat |
Instances
type XLet GhcPs | |
Defined in GHC.Hs.Expr | |
type XLet GhcRn | |
Defined in GHC.Hs.Expr | |
type XLet GhcTc | |
Defined in GHC.Hs.Expr |
Instances
type XLazyPat GhcPs | |
Defined in GHC.Hs.Pat | |
type XLazyPat GhcRn | |
Defined in GHC.Hs.Pat | |
type XLazyPat GhcTc | |
Defined in GHC.Hs.Pat |
type family XLastStmt x x' b #
Instances
type XLastStmt (GhcPass _1) (GhcPass _2) b | |
Defined in GHC.Hs.Expr |
Instances
type XLam (GhcPass _1) | |
Defined in GHC.Hs.Expr | |
type XLam (GhcPass _1) | |
Defined in GHC.Hs.Expr |
type family XKindedTyVar x #
Instances
type XKindedTyVar (GhcPass _1) | |
Defined in GHC.Hs.Type |
Instances
type XKindSigD (GhcPass _1) | |
Defined in GHC.Hs.Decls |
Instances
type XInstD (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XInlineSig x #
Instances
type XInlineSig (GhcPass p) | |
Defined in GHC.Hs.Binds |
Instances
type XIf GhcPs | |
Defined in GHC.Hs.Expr | |
type XIf GhcRn | |
Defined in GHC.Hs.Expr | |
type XIf GhcTc | |
Defined in GHC.Hs.Expr |
Instances
type XIdSig (GhcPass p) | |
Defined in GHC.Hs.Binds |
Instances
type XIPBinds GhcPs | |
Defined in GHC.Hs.Binds | |
type XIPBinds GhcRn | |
Defined in GHC.Hs.Binds | |
type XIPBinds GhcTc | |
Defined in GHC.Hs.Binds |
Instances
type XIEVar GhcPs | |
Defined in GHC.Hs.ImpExp | |
type XIEVar GhcRn | |
Defined in GHC.Hs.ImpExp | |
type XIEVar GhcTc | |
Defined in GHC.Hs.ImpExp |
type family XIEThingWith x #
Instances
type XIEThingWith (GhcPass 'Parsed) | |
Defined in GHC.Hs.ImpExp | |
type XIEThingWith (GhcPass 'Renamed) | |
Defined in GHC.Hs.ImpExp | |
type XIEThingWith (GhcPass 'Typechecked) | |
Defined in GHC.Hs.ImpExp |
type family XIEThingAll x #
Instances
type XIEThingAll (GhcPass _1) | |
Defined in GHC.Hs.ImpExp |
type family XIEThingAbs x #
Instances
type XIEThingAbs (GhcPass _1) | |
Defined in GHC.Hs.ImpExp |
type family XIEModuleContents x #
Instances
type XIEModuleContents GhcPs | |
Defined in GHC.Hs.ImpExp | |
type XIEModuleContents GhcRn | |
Defined in GHC.Hs.ImpExp | |
type XIEModuleContents GhcTc | |
Defined in GHC.Hs.ImpExp |
Instances
type XIEGroup (GhcPass _1) | |
Defined in GHC.Hs.ImpExp |
type family XIEDocNamed x #
Instances
type XIEDocNamed (GhcPass _1) | |
Defined in GHC.Hs.ImpExp |
Instances
type XIEDoc (GhcPass _1) | |
Defined in GHC.Hs.ImpExp |
type family XHsWordPrim x #
Instances
type XHsWordPrim (GhcPass _1) | |
Defined in GHC.Hs.Lit |
type family XHsWord64Prim x #
Instances
type XHsWord64Prim (GhcPass _1) | |
Defined in GHC.Hs.Lit |
Instances
type XHsWC GhcPs b | |
Defined in GHC.Hs.Type | |
type XHsWC GhcRn b | |
Defined in GHC.Hs.Type | |
type XHsWC GhcTc b | |
Defined in GHC.Hs.Type |
type family XHsValBinds x x' #
Instances
type XHsValBinds (GhcPass pL) (GhcPass pR) | |
Defined in GHC.Hs.Binds |
type family XHsStringPrim x #
Instances
type XHsStringPrim (GhcPass _1) | |
Defined in GHC.Hs.Lit |
Instances
type XHsString (GhcPass _1) | |
Defined in GHC.Hs.Lit |
Instances
type XHsSig (GhcPass _1) | |
Defined in GHC.Hs.Type |
type family XHsRecField x #
Instances
type XHsRecField _1 | |
Defined in GHC.Hs.Pat |
Instances
type XHsRat (GhcPass _1) | |
Defined in GHC.Hs.Lit |
Instances
type XHsQTvs GhcPs | |
Defined in GHC.Hs.Type | |
type XHsQTvs GhcRn | |
Defined in GHC.Hs.Type | |
type XHsQTvs GhcTc | |
Defined in GHC.Hs.Type |
Instances
type XHsPS GhcPs | |
Defined in GHC.Hs.Type | |
type XHsPS GhcRn | |
Defined in GHC.Hs.Type | |
type XHsPS GhcTc | |
Defined in GHC.Hs.Type |
type family XHsOuterImplicit x #
Instances
type XHsOuterImplicit GhcPs | |
Defined in GHC.Hs.Type | |
type XHsOuterImplicit GhcRn | |
Defined in GHC.Hs.Type | |
type XHsOuterImplicit GhcTc | |
Defined in GHC.Hs.Type |
type family XHsOuterExplicit x flag #
Instances
type XHsOuterExplicit GhcPs _1 | |
Defined in GHC.Hs.Type | |
type XHsOuterExplicit GhcRn _1 | |
Defined in GHC.Hs.Type | |
type XHsOuterExplicit GhcTc flag | |
Defined in GHC.Hs.Type |
type family XHsInteger x #
Instances
type XHsInteger (GhcPass _1) | |
Defined in GHC.Hs.Lit |
type family XHsIntPrim x #
Instances
type XHsIntPrim (GhcPass _1) | |
Defined in GHC.Hs.Lit |
type family XHsInt64Prim x #
Instances
type XHsInt64Prim (GhcPass _1) | |
Defined in GHC.Hs.Lit |
Instances
type XHsInt (GhcPass _1) | |
Defined in GHC.Hs.Lit |
type family XHsIPBinds x x' #
Instances
type XHsIPBinds (GhcPass pL) (GhcPass pR) | |
Defined in GHC.Hs.Binds |
type family XHsForAllVis x #
Instances
type XHsForAllVis (GhcPass _1) | |
Defined in GHC.Hs.Type |
type family XHsForAllInvis x #
Instances
type XHsForAllInvis (GhcPass _1) | |
Defined in GHC.Hs.Type |
type family XHsFloatPrim x #
Instances
type XHsFloatPrim (GhcPass _1) | |
Defined in GHC.Hs.Lit |
type family XHsDoublePrim x #
Instances
type XHsDoublePrim (GhcPass _1) | |
Defined in GHC.Hs.Lit |
type family XHsCharPrim x #
Instances
type XHsCharPrim (GhcPass _1) | |
Defined in GHC.Hs.Lit |
Instances
type XHsChar (GhcPass _1) | |
Defined in GHC.Hs.Lit |
type family XHsAnnotation x #
Instances
type XHsAnnotation (GhcPass _1) | |
Defined in GHC.Hs.Decls |
Instances
type XGetField GhcPs | |
Defined in GHC.Hs.Expr | |
type XGetField GhcRn | |
Defined in GHC.Hs.Expr | |
type XGetField GhcTc | |
Defined in GHC.Hs.Expr |
Instances
type XFunTy (GhcPass _1) | |
Defined in GHC.Hs.Type |
Instances
type XFunBind (GhcPass pL) GhcPs | |
Defined in GHC.Hs.Binds | |
type XFunBind (GhcPass pL) GhcRn | |
Defined in GHC.Hs.Binds | |
type XFunBind (GhcPass pL) GhcTc | |
Defined in GHC.Hs.Binds |
type family XForeignImport x #
Instances
type XForeignImport GhcPs | |
Defined in GHC.Hs.Decls | |
type XForeignImport GhcRn | |
Defined in GHC.Hs.Decls | |
type XForeignImport GhcTc | |
Defined in GHC.Hs.Decls |
type family XForeignExport x #
Instances
type XForeignExport GhcPs | |
Defined in GHC.Hs.Decls | |
type XForeignExport GhcRn | |
Defined in GHC.Hs.Decls | |
type XForeignExport GhcTc | |
Defined in GHC.Hs.Decls |
Instances
type XForD (GhcPass _1) | |
Defined in GHC.Hs.Decls |
Instances
type XForAllTy (GhcPass _1) | |
Defined in GHC.Hs.Type |
type family XFixitySig x #
Instances
type XFixitySig (GhcPass p) | |
Defined in GHC.Hs.Binds |
Instances
type XFamDecl (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XExprWithTySig x #
Instances
type XExprWithTySig GhcPs | |
Defined in GHC.Hs.Expr | |
type XExprWithTySig GhcRn | |
Defined in GHC.Hs.Expr | |
type XExprWithTySig GhcTc | |
Defined in GHC.Hs.Expr |
type family XExplicitTupleTy x #
Instances
type XExplicitTupleTy GhcPs | |
Defined in GHC.Hs.Type | |
type XExplicitTupleTy GhcRn | |
Defined in GHC.Hs.Type | |
type XExplicitTupleTy GhcTc | |
Defined in GHC.Hs.Type |
type family XExplicitTuple x #
Instances
type XExplicitTuple GhcPs | |
Defined in GHC.Hs.Expr | |
type XExplicitTuple GhcRn | |
Defined in GHC.Hs.Expr | |
type XExplicitTuple GhcTc | |
Defined in GHC.Hs.Expr |
type family XExplicitSum x #
Instances
type XExplicitSum GhcPs | |
Defined in GHC.Hs.Expr | |
type XExplicitSum GhcRn | |
Defined in GHC.Hs.Expr | |
type XExplicitSum GhcTc | |
Defined in GHC.Hs.Expr |
type family XExplicitListTy x #
Instances
type XExplicitListTy GhcPs | |
Defined in GHC.Hs.Type | |
type XExplicitListTy GhcRn | |
Defined in GHC.Hs.Type | |
type XExplicitListTy GhcTc | |
Defined in GHC.Hs.Type |
type family XExplicitList x #
Instances
type XExplicitList GhcPs | |
Defined in GHC.Hs.Expr | |
type XExplicitList GhcRn | |
Defined in GHC.Hs.Expr | |
type XExplicitList GhcTc | |
Defined in GHC.Hs.Expr |
Instances
type XExpBr (GhcPass _1) | |
Defined in GHC.Hs.Expr |
type family XEmptyLocalBinds x x' #
Instances
type XEmptyLocalBinds (GhcPass pL) (GhcPass pR) | |
Defined in GHC.Hs.Binds |
Instances
type XDocD (GhcPass _1) | |
Defined in GHC.Hs.Decls |
Instances
type XDo GhcPs | |
Defined in GHC.Hs.Expr | |
type XDo GhcRn | |
Defined in GHC.Hs.Expr | |
type XDo GhcTc | |
Defined in GHC.Hs.Expr |
Instances
type XDerivD (GhcPass _1) | |
Defined in GHC.Hs.Decls |
Instances
type XDefD (GhcPass _1) | |
Defined in GHC.Hs.Decls |
Instances
type XDecBrL (GhcPass _1) | |
Defined in GHC.Hs.Expr |
Instances
type XDecBrG (GhcPass _1) | |
Defined in GHC.Hs.Expr |
type family XDctSingle x #
Instances
type XDctSingle (GhcPass _1) | |
Defined in GHC.Hs.Decls |
Instances
type XDctMulti (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XDataFamInstD x #
Instances
type XDataFamInstD GhcPs | |
Defined in GHC.Hs.Decls | |
type XDataFamInstD GhcRn | |
Defined in GHC.Hs.Decls | |
type XDataFamInstD GhcTc | |
Defined in GHC.Hs.Decls |
Instances
type XDataDecl GhcPs | |
Defined in GHC.Hs.Decls | |
type XDataDecl GhcRn | |
Defined in GHC.Hs.Decls | |
type XDataDecl GhcTc | |
Defined in GHC.Hs.Decls |
Instances
type XConPat GhcPs | |
Defined in GHC.Hs.Pat | |
type XConPat GhcRn | |
Defined in GHC.Hs.Pat | |
type XConPat GhcTc | |
Defined in GHC.Hs.Pat |
type family XConLikeOut x #
Instances
type XConLikeOut (GhcPass _1) | |
Defined in GHC.Hs.Expr | |
type XConLikeOut (GhcPass _1) | |
Defined in GHC.Hs.Expr |
type family XConDeclH98 x #
Instances
type XConDeclH98 (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XConDeclGADT x #
Instances
type XConDeclGADT (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XConDeclField x #
Instances
type XConDeclField (GhcPass _1) | |
Defined in GHC.Hs.Type |
type family XCompleteMatchSig x #
Instances
type XCompleteMatchSig (GhcPass p) | |
Defined in GHC.Hs.Binds |
Instances
type XCmdWrap (GhcPass _1) | |
Defined in GHC.Hs.Expr |
Instances
type XCmdTop GhcPs | |
Defined in GHC.Hs.Expr | |
type XCmdTop GhcRn | |
Defined in GHC.Hs.Expr | |
type XCmdTop GhcTc | |
Defined in GHC.Hs.Expr |
Instances
type XCmdLet GhcPs | |
Defined in GHC.Hs.Expr | |
type XCmdLet GhcRn | |
Defined in GHC.Hs.Expr | |
type XCmdLet GhcTc | |
Defined in GHC.Hs.Expr |
type family XCmdLamCase x #
Instances
type XCmdLamCase (GhcPass _1) | |
Defined in GHC.Hs.Expr |
Instances
type XCmdLam (GhcPass _1) | |
Defined in GHC.Hs.Expr |
Instances
type XCmdIf GhcPs | |
Defined in GHC.Hs.Expr | |
type XCmdIf GhcRn | |
Defined in GHC.Hs.Expr | |
type XCmdIf GhcTc | |
Defined in GHC.Hs.Expr |
Instances
type XCmdDo GhcPs | |
Defined in GHC.Hs.Expr | |
type XCmdDo GhcRn | |
Defined in GHC.Hs.Expr | |
type XCmdDo GhcTc | |
Defined in GHC.Hs.Expr |
Instances
type XCmdCase GhcPs | |
Defined in GHC.Hs.Expr | |
type XCmdCase GhcRn | |
Defined in GHC.Hs.Expr | |
type XCmdCase GhcTc | |
Defined in GHC.Hs.Expr |
type family XCmdArrForm x #
Instances
type XCmdArrForm GhcPs | |
Defined in GHC.Hs.Expr | |
type XCmdArrForm GhcRn | |
Defined in GHC.Hs.Expr | |
type XCmdArrForm GhcTc | |
Defined in GHC.Hs.Expr |
type family XCmdArrApp x #
Instances
type XCmdArrApp GhcPs | |
Defined in GHC.Hs.Expr | |
type XCmdArrApp GhcRn | |
Defined in GHC.Hs.Expr | |
type XCmdArrApp GhcTc | |
Defined in GHC.Hs.Expr |
Instances
type XClsInstD (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XClassOpSig x #
Instances
type XClassOpSig (GhcPass p) | |
Defined in GHC.Hs.Binds |
type family XClassDecl x #
Instances
type XClassDecl GhcPs | |
Defined in GHC.Hs.Decls | |
type XClassDecl GhcRn | |
Defined in GHC.Hs.Decls | |
type XClassDecl GhcTc | |
Defined in GHC.Hs.Decls |
Instances
type XCase GhcPs | |
Defined in GHC.Hs.Expr | |
type XCase GhcRn | |
Defined in GHC.Hs.Expr | |
type XCase GhcTc | |
Defined in GHC.Hs.Expr |
type family XCTyFamInstDecl x #
Instances
type XCTyFamInstDecl (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XCTyClGroup x #
Instances
type XCTyClGroup (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XCRuleDecls x #
Instances
type XCRuleDecls GhcPs | |
Defined in GHC.Hs.Decls | |
type XCRuleDecls GhcRn | |
Defined in GHC.Hs.Decls | |
type XCRuleDecls GhcTc | |
Defined in GHC.Hs.Decls |
type family XCRuleBndr x #
Instances
type XCRuleBndr (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XCRoleAnnotDecl x #
Instances
type XCRoleAnnotDecl GhcPs | |
Defined in GHC.Hs.Decls | |
type XCRoleAnnotDecl GhcRn | |
Defined in GHC.Hs.Decls | |
type XCRoleAnnotDecl GhcTc | |
Defined in GHC.Hs.Decls |
Instances
type XCKindSig (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XCInjectivityAnn x #
Instances
type XCInjectivityAnn (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XCImportDecl x #
Instances
type XCImportDecl GhcPs | |
Defined in GHC.Hs.ImpExp | |
type XCImportDecl GhcRn | |
Defined in GHC.Hs.ImpExp | |
type XCImportDecl GhcTc | |
Defined in GHC.Hs.ImpExp |
Instances
type XCHsGroup (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XCHsFieldLabel x #
Instances
type XCHsFieldLabel (GhcPass _1) | |
Defined in GHC.Hs.Expr |
type family XCHsDerivingClause x #
Instances
type XCHsDerivingClause (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XCHsDataDefn x #
Instances
type XCHsDataDefn (GhcPass _1) | |
Defined in GHC.Hs.Decls |
Instances
type XCGRHSs (GhcPass _1) _2 | |
Defined in GHC.Hs.Expr |
type family XCFieldOcc x #
Instances
type XCFieldOcc GhcPs | |
Defined in GHC.Hs.Type | |
type XCFieldOcc GhcRn | |
Defined in GHC.Hs.Type | |
type XCFieldOcc GhcTc | |
Defined in GHC.Hs.Type |
type family XCFamilyDecl x #
Instances
type XCFamilyDecl (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XCDerivDecl x #
Instances
type XCDerivDecl (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XCDefaultDecl x #
Instances
type XCDefaultDecl GhcPs | |
Defined in GHC.Hs.Decls | |
type XCDefaultDecl GhcRn | |
Defined in GHC.Hs.Decls | |
type XCDefaultDecl GhcTc | |
Defined in GHC.Hs.Decls |
type family XCClsInstDecl x #
Instances
type XCClsInstDecl GhcPs | |
Defined in GHC.Hs.Decls | |
type XCClsInstDecl GhcRn | |
Defined in GHC.Hs.Decls | |
type XCClsInstDecl GhcTc | |
Defined in GHC.Hs.Decls |
type family XBodyStmt x x' b #
Instances
type XBodyStmt (GhcPass _1) GhcPs b | |
Defined in GHC.Hs.Expr | |
type XBodyStmt (GhcPass _1) GhcRn b | |
Defined in GHC.Hs.Expr | |
type XBodyStmt (GhcPass _1) GhcTc b | |
Defined in GHC.Hs.Expr |
Instances
type XBinTick (GhcPass _1) | |
Defined in GHC.Hs.Expr |
Instances
type XBangPat GhcPs | |
Defined in GHC.Hs.Pat | |
type XBangPat GhcRn | |
Defined in GHC.Hs.Pat | |
type XBangPat GhcTc | |
Defined in GHC.Hs.Pat |
Instances
type XAsPat GhcPs | |
Defined in GHC.Hs.Pat | |
type XAsPat GhcRn | |
Defined in GHC.Hs.Pat | |
type XAsPat GhcTc | |
Defined in GHC.Hs.Pat |
Instances
type XArithSeq GhcPs | |
Defined in GHC.Hs.Expr | |
type XArithSeq GhcRn | |
Defined in GHC.Hs.Expr | |
type XArithSeq GhcTc | |
Defined in GHC.Hs.Expr |
type family XApplicativeStmt x x' b #
Instances
type XApplicativeStmt (GhcPass _1) GhcPs b | |
Defined in GHC.Hs.Expr | |
type XApplicativeStmt (GhcPass _1) GhcRn b | |
Defined in GHC.Hs.Expr | |
type XApplicativeStmt (GhcPass _1) GhcTc b | |
Defined in GHC.Hs.Expr |
type family XApplicativeArgOne x #
Instances
type XApplicativeArgOne GhcPs | |
Defined in GHC.Hs.Expr | |
type XApplicativeArgOne GhcRn | |
Defined in GHC.Hs.Expr | |
type XApplicativeArgOne GhcTc | |
Defined in GHC.Hs.Expr |
type family XApplicativeArgMany x #
Instances
type XApplicativeArgMany (GhcPass _1) | |
Defined in GHC.Hs.Expr |
Instances
type XAppTypeE GhcPs | |
Defined in GHC.Hs.Expr | |
type XAppTypeE GhcRn | |
Defined in GHC.Hs.Expr | |
type XAppTypeE GhcTc | |
Defined in GHC.Hs.Expr |
Instances
type XAppTy (GhcPass _1) | |
Defined in GHC.Hs.Type |
type family XAppKindTy x #
Instances
type XAppKindTy (GhcPass _1) | |
Defined in GHC.Hs.Type |
type family XAnyClassStrategy x #
Instances
type XAnyClassStrategy GhcPs | |
Defined in GHC.Hs.Decls | |
type XAnyClassStrategy GhcRn | |
Defined in GHC.Hs.Decls | |
type XAnyClassStrategy GhcTc | |
Defined in GHC.Hs.Decls |
Instances
type XAnnD (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XAmbiguous x #
Instances
type XAmbiguous GhcPs | |
Defined in GHC.Hs.Type | |
type XAmbiguous GhcRn | |
Defined in GHC.Hs.Type | |
type XAmbiguous GhcTc | |
Defined in GHC.Hs.Type |
Instances
type XAbsBinds (GhcPass pL) (GhcPass pR) | |
Defined in GHC.Hs.Binds |
Instances
type XABE (GhcPass p) | |
Defined in GHC.Hs.Binds |
The trivial wrapper that carries no additional information See Note [XRec and SrcSpans in the AST]
We can strip off the XRec to access the underlying data. See Note [XRec and SrcSpans in the AST]
See Note [NoGhcTc] in GHC.Hs.Extension. It has to be in this module because it is used like an extension point (in the data definitions of types that should be parameter-agnostic.
Instances
type NoGhcTc (GhcPass pass) | Marks that a field uses the GhcRn variant even when the pass parameter is GhcTc. Useful for storing HsTypes in GHC.Hs.Exprs, say, because HsType GhcTc should never occur. See Note [NoGhcTc] |
Defined in GHC.Hs.Extension |
data NoExtField #
A placeholder type for TTG extension points that are not currently unused to represent any particular value.
This should not be confused with NoExtCon
, which are found in unused
extension constructors and therefore should never be inhabited. In
contrast, NoExtField
is used in extension points (e.g., as the field of
some constructor), so it must have an inhabitant to construct AST passes
that manipulate fields with that extension point as their type.
Constructors
NoExtField |
Instances
Data NoExtField | |
Defined in Language.Haskell.Syntax.Extension Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> NoExtField -> c NoExtField # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c NoExtField # toConstr :: NoExtField -> Constr # dataTypeOf :: NoExtField -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c NoExtField) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NoExtField) # gmapT :: (forall b. Data b => b -> b) -> NoExtField -> NoExtField # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NoExtField -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NoExtField -> r # gmapQ :: (forall d. Data d => d -> u) -> NoExtField -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> NoExtField -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> NoExtField -> m NoExtField # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> NoExtField -> m NoExtField # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> NoExtField -> m NoExtField # | |
Outputable NoExtField | |
Defined in Language.Haskell.Syntax.Extension Methods ppr :: NoExtField -> SDoc # | |
Eq NoExtField | |
Defined in Language.Haskell.Syntax.Extension | |
Ord NoExtField | |
Defined in Language.Haskell.Syntax.Extension Methods compare :: NoExtField -> NoExtField -> Ordering # (<) :: NoExtField -> NoExtField -> Bool # (<=) :: NoExtField -> NoExtField -> Bool # (>) :: NoExtField -> NoExtField -> Bool # (>=) :: NoExtField -> NoExtField -> Bool # max :: NoExtField -> NoExtField -> NoExtField # min :: NoExtField -> NoExtField -> NoExtField # |
Used in TTG extension constructors that have yet to be extended with
anything. If an extension constructor has NoExtCon
as its field, it is
not intended to ever be constructed anywhere, and any function that consumes
the extension constructor can eliminate it by way of noExtCon
.
This should not be confused with NoExtField
, which are found in unused
extension points (not constructors) and therefore can be inhabited.
Instances
Data NoExtCon | |
Defined in Language.Haskell.Syntax.Extension Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> NoExtCon -> c NoExtCon # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c NoExtCon # toConstr :: NoExtCon -> Constr # dataTypeOf :: NoExtCon -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c NoExtCon) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NoExtCon) # gmapT :: (forall b. Data b => b -> b) -> NoExtCon -> NoExtCon # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NoExtCon -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NoExtCon -> r # gmapQ :: (forall d. Data d => d -> u) -> NoExtCon -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> NoExtCon -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> NoExtCon -> m NoExtCon # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> NoExtCon -> m NoExtCon # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> NoExtCon -> m NoExtCon # | |
Outputable NoExtCon | |
Defined in Language.Haskell.Syntax.Extension | |
Eq NoExtCon | |
Ord NoExtCon | |
Defined in Language.Haskell.Syntax.Extension |
We can map over the underlying type contained in an XRec
while preserving
the annotation as is.
Maps the "normal" id type for a given pass
type family Anno a = (b :: Type) #
Instances
Used when constructing a term with an unused extension point.
data IOEnvFailure #
Constructors
IOEnvFailure |
Instances
Exception IOEnvFailure | |
Defined in GHC.Data.IOEnv Methods toException :: IOEnvFailure -> SomeException # fromException :: SomeException -> Maybe IOEnvFailure # displayException :: IOEnvFailure -> String # | |
Show IOEnvFailure | |
Defined in GHC.Data.IOEnv Methods showsPrec :: Int -> IOEnvFailure -> ShowS # show :: IOEnvFailure -> String # showList :: [IOEnvFailure] -> ShowS # |
Instances
MonadFail (IOEnv m) | |
Defined in GHC.Data.IOEnv | |
MonadIO (IOEnv env) | |
Defined in GHC.Data.IOEnv | |
Alternative (IOEnv env) | |
Applicative (IOEnv m) | |
Functor (IOEnv env) | |
Monad (IOEnv m) | |
MonadPlus (IOEnv env) | |
MonadCatch (IOEnv env) | |
MonadMask (IOEnv env) | |
Defined in GHC.Data.IOEnv | |
MonadThrow (IOEnv env) | |
Defined in GHC.Data.IOEnv | |
ContainsHooks env => HasHooks (IOEnv env) | |
Defined in GHC.Data.IOEnv | |
ContainsDynFlags env => HasDynFlags (IOEnv env) | |
Defined in GHC.Data.IOEnv Methods getDynFlags :: IOEnv env DynFlags # | |
ContainsModule env => HasModule (IOEnv env) | |
Defined in GHC.Data.IOEnv | |
ContainsLogger env => HasLogger (IOEnv env) | |
Defined in GHC.Data.IOEnv |
writeMutVar :: IORef a -> a -> IOEnv env () #
updMutVarM :: IORef a -> (a -> IOEnv env a) -> IOEnv env () #
updEnv :: (env -> env') -> IOEnv env' a -> IOEnv env a #
Perform a computation with an altered environment
unsafeInterleaveM :: IOEnv env a -> IOEnv env a #
uninterruptibleMaskM_ :: IOEnv env a -> IOEnv env a #
readMutVar :: IORef a -> IOEnv env a #
atomicUpdMutVar' :: IORef a -> (a -> (a, b)) -> IOEnv env b #
Strict variant of atomicUpdMutVar
.
atomicUpdMutVar :: IORef a -> (a -> (a, b)) -> IOEnv env b #
Atomically update the reference. Does not force the evaluation of the
new variable contents. For strict update, use atomicUpdMutVar'
.
data InstalledFindResult #
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 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 Unit | The requested unit was not found |
FoundMultiple [(Module, ModuleOrigin)] | _Error_: both in multiple packages |
NotFound | Not found |
Fields
|
type CompleteMatches = [CompleteMatch] #
data CompleteMatch #
A list of conlikes which represents a complete pattern match.
These arise from COMPLETE
signatures.
See also Note [Implementation of COMPLETE pragmas].
Instances
Outputable CompleteMatch | |
Defined in GHC.Types.CompleteMatch Methods ppr :: CompleteMatch -> SDoc # |
data SrcUnpackedness #
Source Unpackedness
What unpackedness the user requested
Constructors
SrcUnpack | {-# UNPACK #-} specified |
SrcNoUnpack | {-# NOUNPACK #-} specified |
NoSrcUnpack | no unpack pragma |
Instances
data SrcStrictness #
Source Strictness
What strictness annotation the user wrote
Constructors
SrcLazy | Lazy, ie |
SrcStrict | Strict, ie |
NoSrcStrict | no strictness annotation |
Instances
Data SrcStrictness | |
Defined in GHC.Core.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 GHC.Core.DataCon Methods put_ :: BinHandle -> SrcStrictness -> IO () # put :: BinHandle -> SrcStrictness -> IO (Bin SrcStrictness) # get :: BinHandle -> IO SrcStrictness # | |
Outputable SrcStrictness | |
Defined in GHC.Core.DataCon Methods ppr :: SrcStrictness -> SDoc # | |
Eq SrcStrictness | |
Defined in GHC.Core.DataCon Methods (==) :: SrcStrictness -> SrcStrictness -> Bool # (/=) :: SrcStrictness -> SrcStrictness -> Bool # |
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 GHC.Core.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 | |
Defined in GHC.Core.DataCon |
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 GHC.Core.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 GHC.Core.DataCon Methods ppr :: HsImplBang -> SDoc # |
roughMatchTcs :: [Type] -> [RoughMatchTc] #
instanceCantMatch :: [RoughMatchTc] -> [RoughMatchTc] -> Bool #
mkClassPred :: Class -> [Type] -> PredType #
isIPLikePred :: Type -> Bool #
isEqPrimPred :: PredType -> Bool #
isEqPredClass :: Class -> Bool #
isClassPred :: PredType -> Bool #
type HoleSet = UniqSet CoercionHole #
A set of CoercionHole
s
pprTypeApp :: TyCon -> [Type] -> SDoc #
pprThetaArrowTy :: ThetaType -> SDoc #
pprTCvBndrs :: [TyCoVarBinder] -> SDoc #
pprTCvBndr :: TyCoVarBinder -> SDoc #
pprSigmaType :: Type -> SDoc #
pprParendType :: Type -> SDoc #
pprParendTheta :: ThetaType -> SDoc #
pprParendKind :: Kind -> SDoc #
pprClassPred :: Class -> [Type] -> SDoc #
data TyCoMapper env (m :: Type -> Type) #
This describes how a "map" operation over a type/coercion should behave
Constructors
TyCoMapper | |
Fields
|
userTypeError_maybe :: Type -> Maybe Type #
Is this type a custom user error? If so, give us the kind and the error message.
unrestricted :: a -> Scaled a #
Scale a payload by Many
typeKind :: HasDebugCallStack => Type -> 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.
tyConBindersTyCoBinders :: [TyConBinder] -> [TyCoBinder] #
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.
tyConAppTyConPicky_maybe :: Type -> Maybe TyCon #
Retrieve the tycon heading this type, if there is one. Does not look through synonyms.
tyConAppTyCon :: Type -> TyCon #
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.)
tyConAppArgs_maybe :: Type -> Maybe [Type] #
The same as snd . splitTyConApp
tyConAppArgs :: Type -> [Type] #
tyConAppArgN :: Int -> Type -> Type #
tyCoBinderType :: TyCoBinder -> Type #
tyBinderType :: TyBinder -> Type #
tcTypeKind :: HasDebugCallStack => Type -> Kind #
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.
This does *not* split types headed with (=>), as that's not a TyCon in the type-checker.
If you only need the TyCon
, consider using tcTyConAppTyCon_maybe
.
tcReturnsConstraintKind :: Kind -> Bool #
tcRepSplitTyConApp_maybe :: HasDebugCallStack => Type -> Maybe (TyCon, [Type]) #
Like tcSplitTyConApp_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 [Decomposing FunTy] in GHC.Tc.Solver.Canonical and Note [The Purely Kinded Type Invariant (PKTI)] in GHC.Tc.Gen.HsType, Wrinkle around FunTy
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)
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 Type
?
This considers Constraint
to be distinct from Type
. For a version that
treats them as the same type, see isLiftedTypeKind
.
tcIsConstraintKind :: Kind -> Bool #
tcIsBoxedTypeKind :: Kind -> Bool #
Is this kind equivalent to TYPE (BoxedRep l)
for some l :: Levity
?
This considers Constraint
to be distinct from Type
. For a version that
treats them as the same type, see isLiftedTypeKind
.
stripCoercionTy :: Type -> Coercion #
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.
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
splitPiTys :: Type -> ([TyCoBinder], Type) #
Split off all TyCoBinders to a type, splitting both proper foralls and functions
splitPiTy_maybe :: Type -> Maybe (TyCoBinder, Type) #
Attempts to take a forall type apart; works with proper foralls and functions
splitPiTy :: Type -> (TyCoBinder, Type) #
Takes a forall type apart, or panics
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)
splitInvisPiTysN :: Int -> Type -> ([TyCoBinder], Type) #
Same as splitInvisPiTys
, but stop when
- you have found n
TyCoBinder
s,
- or you run out of invisible binders
splitInvisPiTys :: Type -> ([TyCoBinder], Type) #
Like splitPiTys
, but returns only *invisible* binders, including constraints.
Stops at the first visible binder.
splitFunTy_maybe :: Type -> Maybe (Mult, Type, Type) #
Attempts to extract the multiplicity, argument and result types from a type
splitFunTy :: Type -> (Mult, Type, Type) #
Attempts to extract the multiplicity, argument and result types from a type,
and panics if that is not possible. See also splitFunTy_maybe
splitForAllTyVar_maybe :: Type -> Maybe (TyCoVar, Type) #
Like splitForAllTyCoVar_maybe
, but only returns Just if it is a tyvar binder.
splitForAllTyCoVars :: 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.
splitForAllTyCoVar_maybe :: Type -> Maybe (TyCoVar, Type) #
Attempts to take a forall type apart, but only if it's a proper forall, with a named binder
splitForAllTyCoVarBinders :: Type -> ([TyCoVarBinder], Type) #
Like splitPiTys
but split off only named binders
and returns TyCoVarBinder
s rather than TyCoBinder
s
splitForAllTyCoVar :: Type -> (TyCoVar, Type) #
Take a forall type apart, or panics if that is not possible.
splitForAllReqTVBinders :: Type -> ([ReqTVBinder], Type) #
Like splitForAllTyCoVars
, but only splits ForAllTy
s with Required
type
variable binders. Furthermore, each returned tyvar is annotated with ()
.
splitForAllInvisTVBinders :: Type -> ([InvisTVBinder], Type) #
Like splitForAllTyCoVars
, but only splits ForAllTy
s with Invisible
type
variable binders. Furthermore, each returned tyvar is annotated with its
Specificity
.
splitForAllCoVar_maybe :: Type -> Maybe (TyCoVar, Type) #
Like splitForAllTyCoVar_maybe
, but only returns Just if it is a covar binder.
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_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!
splitAppTy :: Type -> (Type, Type) #
Attempts to take a type application apart, as in splitAppTy_maybe
,
and panics if this is not possible
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)
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.
repSplitAppTys :: HasDebugCallStack => Type -> (Type, [Type]) #
Like splitAppTys
, but doesn't look through type synonyms
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
repGetTyVar_maybe :: Type -> Maybe TyVar #
Attempts to obtain the type variable underlying a Type
, without
any expansion
pprUserTypeErrorTy :: Type -> SDoc #
Render a type corresponding to a user type error into a SDoc.
pickyIsLiftedTypeKind :: Kind -> Bool #
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 undefined
s type.
partitionInvisibles :: [(a, ArgFlag)] -> ([a], [a]) #
Given a list of things paired with their visibilities, partition the things into (invisible things, visible things).
nonDetCmpTypes :: [Type] -> [Type] -> Ordering #
nonDetCmpType :: Type -> Type -> Ordering #
nonDetCmpTc :: TyCon -> TyCon -> Ordering #
Compare two TyCon
s. NB: This should never see Constraint
(as
recognized by Kind.isConstraintKindCon) which is considered a synonym for
Type
in Core.
See Note [Kind Constraint and kind Type] in GHC.Core.Type.
See Note [nonDetCmpType nondeterminism]
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.
mkVisForAllTys :: [TyVar] -> Type -> Type #
Like mkForAllTys, but assumes all variables are dependent and visible
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.
mkTyCoInvForAllTys :: [TyCoVar] -> Type -> Type #
Like mkForAllTys
, but assumes all variables are dependent and
Inferred
, a common case
mkStrLitTy :: FastString -> Type #
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
mkNumLitTy :: Integer -> Type #
mkInfForAllTys :: [TyVar] -> Type -> Type #
Like mkTyCoInvForAllTys
, but tvs should be a list of tyvar
mkInfForAllTy :: TyVar -> Type -> Type #
Like mkTyCoInvForAllTy
, but tv should be a tyvar
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)
mkCoercionTy :: Coercion -> Type #
mkCharLitTy :: Char -> Type #
mkAnonBinder :: AnonArgFlag -> Scaled Type -> TyCoBinder #
Make an anonymous binder
mightBeUnliftedType :: Type -> Bool #
mapTyCoX :: Monad m => TyCoMapper env m -> (env -> Type -> m Type, env -> [Type] -> m [Type], env -> Coercion -> m Coercion, env -> [Coercion] -> m [Coercion]) #
mapTyCo :: Monad m => TyCoMapper () m -> (Type -> m Type, [Type] -> m [Type], Coercion -> m Coercion, [Coercion] -> m [Coercion]) #
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
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 GHC.Core.) 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]
isUnliftedTypeKind :: Kind -> Bool #
Returns True if the kind classifies unlifted types (like 'Int#') and False otherwise. Note that this returns False for levity-polymorphic kinds, which may be specialized to a kind that classifies unlifted types.
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.
isUnliftedRuntimeRep :: Type -> Bool #
isUnliftedLevity :: Type -> Bool #
isUnboxedTupleType :: Type -> Bool #
isUnboxedSumType :: Type -> Bool #
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)
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.
isStrLitTy :: Type -> Maybe FastString #
Is this a symbol literal. We also look through type synonyms.
isRuntimeRepVar :: TyVar -> Bool #
Is a tyvar of type RuntimeRep
?
isRuntimeRepKindedTy :: Type -> Bool #
Is this a type of kind RuntimeRep? (e.g. LiftedRep)
isPrimitiveType :: Type -> Bool #
Returns true of types that are opaque to Haskell.
isOneDataConTy :: Mult -> Bool #
isNumLitTy :: Type -> Maybe Integer #
Is this a numeric literal. We also look through type synonyms.
isMultiplicityVar :: TyVar -> Bool #
Is a tyvar of type Multiplicity
?
isManyDataConTy :: Mult -> Bool #
isLinearType :: Type -> Bool #
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.
isLiftedRuntimeRep :: Type -> Bool #
isLiftedLevity :: Type -> Bool #
isLevityVar :: TyVar -> Bool #
Is a tyvar of type Levity
?
isLevityTy :: Type -> Bool #
Is this the type Levity
?
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
isForAllTy_ty :: Type -> Bool #
Like isForAllTy
, but returns True only if it is a tyvar binder
isForAllTy_co :: Type -> Bool #
Like isForAllTy
, but returns True only if it is a covar binder
isForAllTy :: Type -> Bool #
Checks whether this is a proper forall (with a named binder)
isFamFreeTy :: Type -> Bool #
isDataFamilyAppType :: Type -> Bool #
Check whether a type is a data family type
isCoercionTy_maybe :: Type -> Maybe Coercion #
isCoVarType :: Type -> Bool #
Does this type classify a core (unlifted) Coercion? At either role nominal or representational (t1 ~# t2) or (t1 ~R# t2) See Note [Types for coercions, predicates, and evidence] in GHC.Core.TyCo.Rep
isCharLitTy :: Type -> Maybe Char #
Is this a char literal? We also look through type synonyms.
isBoxedTypeKind :: Kind -> Bool #
Returns True if the kind classifies types which are allocated on the GC'd heap and False otherwise. Note that this returns False for levity-polymorphic kinds, which may be specialized to a kind that classifies AddrRep or even unboxed kinds.
isBoxedType :: Type -> Bool #
See Type for what a boxed type is.
Panics on levity polymorphic types; See mightBeUnliftedType
for
a more approximate predicate that behaves better in the presence of
levity polymorphism.
isBoxedRuntimeRep :: Type -> Bool #
See isBoxedRuntimeRep_maybe
.
isAtomicTy :: Type -> Bool #
isAnonTyCoBinder :: TyCoBinder -> Bool #
Does this binder bind a variable that is not erased? Returns
True
for anonymous binders.
See Type for what an algebraic type is. Should only be applied to types, as opposed to e.g. partially saturated type constructors
irrelevantMult :: Scaled a -> a #
invisibleTyBndrCount :: Type -> Int #
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
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.
getRuntimeRep :: HasDebugCallStack => Type -> Type #
Extract the RuntimeRep classifier of a type. For instance,
getRuntimeRep_maybe Int = LiftedRep
. Panics if this is not possible.
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
funResultTy :: Type -> Type #
Extract the function result type and panic if that is not possible
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
filterOutInvisibleTypes :: TyCon -> [Type] -> [Type] #
filterOutInferredTypes :: TyCon -> [Type] -> [Type] #
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
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
.
eqType :: Type -> Type -> Bool #
Type equality on source types. Does not look through newtypes
or
PredType
s, 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 GHC.Core.TyCo.Rep.
dropRuntimeRepArgs :: [Type] -> [Type] #
Drops prefix of RuntimeRep constructors in TyConApp
s. Useful for e.g.
dropping 'LiftedRep arguments of unboxed tuple TyCon applications:
dropRuntimeRepArgs [ 'LiftedRep, 'IntRep , String, Int# ] == [String, Int#]
dropForAlls :: Type -> Type #
Drops all ForAllTys
coAxNthLHS :: forall (br :: BranchFlag). CoAxiom br -> Int -> Type #
Get the type on the LHS of a coercion induced by a type/data family instance.
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
binderRelevantType_maybe :: TyCoBinder -> Maybe Type #
Extract a relevant type, if there is one.
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 AppTy
s.
(See also #15792).
The FUN
type constructor.
FUN :: forall (m :: Multiplicity) -> forall {rep1 :: RuntimeRep} {rep2 :: RuntimeRep}. TYPE rep1 -> TYPE rep2 -> *
The runtime representations quantification is left inferred. This
means they cannot be specified with -XTypeApplications
.
This is a deliberate choice to allow future extensions to the function arrow. To allow visible application a type synonym can be defined:
type Arr :: forall (rep1 :: RuntimeRep) (rep2 :: RuntimeRep). TYPE rep1 -> TYPE rep2 -> Type type Arr = FUN 'Many
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 |
Instances
Outputable TCvSubst | |
Defined in GHC.Core.TyCo.Subst |
zipTyEnv :: HasDebugCallStack => [TyVar] -> [Type] -> TvSubstEnv #
zipTvSubst :: HasDebugCallStack => [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 #
zipCoEnv :: HasDebugCallStack => [CoVar] -> [Coercion] -> CvSubstEnv #
zapTCvSubst :: TCvSubst -> TCvSubst #
unionTCvSubst :: TCvSubst -> TCvSubst -> TCvSubst #
substVarBndrs :: HasCallStack => TCvSubst -> [TyCoVar] -> (TCvSubst, [TyCoVar]) #
substVarBndr :: HasCallStack => TCvSubst -> TyCoVar -> (TCvSubst, TyCoVar) #
substTysWith :: [TyVar] -> [Type] -> [Type] -> [Type] #
Type substitution, see zipTvSubst
substTysUnchecked :: TCvSubst -> [Type] -> [Type] #
Substitute within several Type
s 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 Type
s
The substitution has to satisfy the invariants described in
Note [The substitution invariant].
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
substTyVars :: TCvSubst -> [TyVar] -> [Type] #
substTyVarBndrs :: HasCallStack => TCvSubst -> [TyVar] -> (TCvSubst, [TyVar]) #
substTyVarBndr :: HasCallStack => TCvSubst -> TyVar -> (TCvSubst, TyVar) #
substTyVar :: TCvSubst -> TyVar -> Type #
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.
substTyCoBndr :: TCvSubst -> TyCoBinder -> (TCvSubst, TyCoBinder) #
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].
substTy :: HasCallStack => TCvSubst -> Type -> Type #
Substitute within a Type
The substitution has to satisfy the invariants described in
Note [The substitution invariant].
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].
substScaledTys :: HasCallStack => TCvSubst -> [Scaled Type] -> [Scaled Type] #
substScaledTyUnchecked :: HasCallStack => TCvSubst -> Scaled Type -> Scaled Type #
substScaledTy :: HasCallStack => TCvSubst -> Scaled Type -> Scaled Type #
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.
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.
setTvSubstEnv :: TCvSubst -> TvSubstEnv -> TCvSubst #
notElemTCvSubst :: Var -> TCvSubst -> Bool #
mkTvSubstPrs :: [(TyVar, Type)] -> TCvSubst #
Generates the in-scope set for the TCvSubst
from the types in the
incoming environment. No CoVars, please!
mkTvSubst :: InScopeSet -> TvSubstEnv -> TCvSubst #
Make a TCvSubst with specified tyvar subst and empty covar subst
mkTCvSubst :: InScopeSet -> (TvSubstEnv, CvSubstEnv) -> TCvSubst #
mkEmptyTCvSubst :: InScopeSet -> TCvSubst #
isEmptyTCvSubst :: TCvSubst -> Bool #
getTvSubstEnv :: TCvSubst -> TvSubstEnv #
getTCvSubstRangeFVs :: TCvSubst -> VarSet #
Returns the free variables of the types in the range of a substitution as a non-deterministic set.
getTCvInScope :: TCvSubst -> InScopeSet #
extendTvSubstBinderAndInScope :: TCvSubst -> TyCoBinder -> Type -> TCvSubst #
extendTCvInScopeSet :: TCvSubst -> VarSet -> TCvSubst #
extendTCvInScopeList :: TCvSubst -> [Var] -> TCvSubst #
extendTCvInScope :: TCvSubst -> Var -> TCvSubst #
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
composeTCvSubst :: TCvSubst -> TCvSubst -> TCvSubst #
Composes two substitutions, applying the second one provided first, like in function composition.
cloneTyVarBndrs :: TCvSubst -> [TyVar] -> UniqSupply -> (TCvSubst, [TyVar]) #
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.
tidyTypes :: TidyEnv -> [Type] -> [Type] #
Tidy a list of Types
See Note [Strictness in tidyType and friends]
tidyTyCoVarOcc :: TidyEnv -> TyCoVar -> TyCoVar #
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
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 TyVar
s to the env in tidy form,
so that we can tidy the type they are free in
tyCoVarsOfTypesWellScoped :: [Type] -> [TyVar] #
Get the free vars of types in scoped order
tyCoVarsOfTypesList :: [Type] -> [TyCoVar] #
Returns free variables of types, including kind variables as a deterministically ordered list. For type synonyms it does not expand the synonym.
tyCoVarsOfTypesDSet :: [Type] -> DTyCoVarSet #
Returns free variables of types, including kind variables as a deterministic set. For type synonyms it does not expand the synonym.
tyCoVarsOfTypes :: [Type] -> TyCoVarSet #
tyCoVarsOfTypeWellScoped :: Type -> [TyVar] #
Get the free vars of a type in scoped order
tyCoVarsOfTypeList :: Type -> [TyCoVar] #
tyCoFVsOfType
that returns free variables of a type in deterministic
order. For explanation of why using VarSet
is not deterministic see
Note [Deterministic FV] in GHC.Utils.FV.
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 GHC.Utils.FV.
tyCoVarsOfType :: Type -> TyCoVarSet #
tyCoFVsVarBndrs :: [Var] -> FV -> FV #
tyCoFVsVarBndr :: Var -> FV -> FV #
tyCoFVsOfTypes :: [Type] -> 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 GHC.Utils.FV.
Eta-expanded because that makes it run faster (apparently) See Note [FV eta expansion] in GHC.Utils.FV for explanation.
tyCoFVsBndr :: TyCoVarBinder -> FV -> FV #
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 GHC.Rename.HsType
noFreeVarsOfType :: Type -> Bool #
coVarsOfTypes :: [Type] -> CoVarSet #
coVarsOfType :: Type -> CoVarSet #
closeOverKindsList :: [TyVar] -> [TyVar] #
Add the kind variables free in the kinds of the tyvars in the given set. Returns a deterministically ordered list.
closeOverKindsDSet :: DTyVarSet -> DTyVarSet #
Add the kind variables free in the kinds of the tyvars in the given set. Returns a deterministic set.
closeOverKinds :: TyCoVarSet -> TyCoVarSet #
data TyCoFolder env a #
Constructors
TyCoFolder | |
Fields
|
type TyBinder = TyCoBinder #
TyBinder
is like TyCoBinder
, but there can only be TyVarBinder
in the Named
field.
type MCoercionR = MCoercion #
A type labeled KnotTied
might have knot-tied tycons in it. See
Note [Type checking recursive type and class declarations] in
GHC.Tc.TyCl
type KindOrType = Type #
The key representation of types within the compiler
type KindCoercion = CoercionN #
data CoercionHole #
A coercion to be filled in by the type-checker. See Note [Coercion holes]
Instances
Data CoercionHole | |
Defined in GHC.Core.TyCo.Rep 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 # | |
Uniquable CoercionHole | |
Defined in GHC.Core.TyCo.Rep Methods getUnique :: CoercionHole -> Unique # | |
Outputable CoercionHole | |
Defined in GHC.Core.TyCo.Rep Methods ppr :: CoercionHole -> SDoc # |
setCoHoleCoVar :: CoercionHole -> CoVar -> CoercionHole #
scaledThing :: Scaled a -> a #
scaledMult :: Scaled a -> Mult #
provSize :: UnivCoProvenance -> Int #
nonDetCmpTyLit :: TyLit -> TyLit -> Ordering #
mkVisFunTysMany :: [Type] -> Type -> Type #
mkVisFunTyMany :: Type -> Type -> Type infixr 3 #
Special, common, case: Arrow type with mult Many
mkTyVarTys :: [TyVar] -> [Type] #
mkTyCoVarTys :: [TyCoVar] -> [Type] #
mkTyCoVarTy :: TyCoVar -> Type #
mkScaledFunTy :: AnonArgFlag -> Scaled Type -> Type -> Type #
mkPiTys :: [TyCoBinder] -> Type -> Type #
mkPiTy :: TyCoBinder -> Type -> Type #
mkInvisFunTysMany :: [Type] -> Type -> Type #
mkInvisFunTyMany :: Type -> Type -> Type infixr 3 #
mkInvisForAllTys :: [InvisTVBinder] -> Type -> Type #
Wraps foralls over the type using the provided InvisTVBinder
s from left to right
mkForAllTys :: [TyCoVarBinder] -> Type -> Type #
Wraps foralls over the type using the provided TyCoVar
s from left to right
mapScaledType :: (Type -> Type) -> Scaled Type -> Scaled Type #
Apply a function to both the Mult and the Type in a 'Scaled Type'
isVisibleBinder :: TyCoBinder -> Bool #
Does this binder bind a visible argument?
isTyBinder :: TyCoBinder -> Bool #
If its a named binder, is the binder a tyvar? Returns True for nondependent binder. This check that we're really returning a *Ty*Binder (as opposed to a coercion binder). That way, if/when we allow coercion quantification in more places, we'll know we missed updating some function.
isNamedBinder :: TyCoBinder -> Bool #
isInvisibleBinder :: TyCoBinder -> Bool #
Does this binder bind an invisible argument?
foldTyCo :: Monoid a => TyCoFolder env a -> env -> (Type -> a, [Type] -> a, Coercion -> a, [Coercion] -> a) #
delBinderVar :: VarSet -> TyCoVarBinder -> VarSet #
Remove the binder's variable from the set, if the binder has a variable.
coercionSize :: Coercion -> Int #
coHoleCoVar :: CoercionHole -> CoVar #
type TyConTyCoBinder = VarBndr TyCoVar TyConBndrVis #
data TyConFlavour #
Paints a picture of what a TyCon
represents, in broad strokes.
This is used towards more informative error messages.
Constructors
Instances
Outputable TyConFlavour | |
Defined in GHC.Core.TyCon Methods ppr :: TyConFlavour -> SDoc # | |
Eq TyConFlavour | |
Defined in GHC.Core.TyCon |
data TyConBndrVis #
Constructors
NamedTCB ArgFlag | |
AnonTCB AnonArgFlag |
Instances
Binary TyConBndrVis | |
Defined in GHC.Core.TyCon Methods put_ :: BinHandle -> TyConBndrVis -> IO () # put :: BinHandle -> TyConBndrVis -> IO (Bin TyConBndrVis) # get :: BinHandle -> IO TyConBndrVis # | |
Outputable TyConBndrVis | |
Defined in GHC.Core.TyCon Methods ppr :: TyConBndrVis -> SDoc # | |
OutputableBndr tv => Outputable (VarBndr tv TyConBndrVis) | |
Defined in GHC.Core.TyCon Methods ppr :: VarBndr tv TyConBndrVis -> SDoc # |
type TyConBinder = VarBndr TyVar TyConBndrVis #
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 GHC.Types.RepType
Constructors
NoRRI | an ordinary promoted data con |
RuntimeRep ([Type] -> [PrimRep]) | A constructor of |
VecCount Int | A constructor of |
VecElem PrimElemRep | A constructor of |
LiftedInfo | A constructor of |
UnliftedInfo | A constructor of |
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
GHC.Types.RepType and Note [VoidRep] in GHC.Types.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 |
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 |
WordRep | Unsigned, word-sized value |
AddrRep | A pointer, but not to a Haskell value (use '(Un)liftedRep') |
FloatRep | |
DoubleRep | |
VecRep Int PrimElemRep | A vector |
Instances
Show PrimRep | |
Outputable PrimRep | |
Defined in GHC.Core.TyCon | |
Eq PrimRep | |
data PrimElemRep #
Constructors
Int8ElemRep | |
Int16ElemRep | |
Int32ElemRep | |
Int64ElemRep | |
Word8ElemRep | |
Word16ElemRep | |
Word32ElemRep | |
Word64ElemRep | |
FloatElemRep | |
DoubleElemRep |
Instances
Show PrimElemRep | |
Defined in GHC.Core.TyCon Methods showsPrec :: Int -> PrimElemRep -> ShowS # show :: PrimElemRep -> String # showList :: [PrimElemRep] -> ShowS # | |
Outputable PrimElemRep | |
Defined in GHC.Core.TyCon Methods ppr :: PrimElemRep -> SDoc # | |
Eq PrimElemRep | |
Defined in GHC.Core.TyCon |
data Injectivity #
Constructors
NotInjective | |
Injective [Bool] |
Instances
Binary Injectivity | |
Defined in GHC.Core.TyCon Methods put_ :: BinHandle -> Injectivity -> IO () # put :: BinHandle -> Injectivity -> IO (Bin Injectivity) # get :: BinHandle -> IO Injectivity # | |
Eq Injectivity | |
Defined in GHC.Core.TyCon |
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 GHC.Core.TyCon Methods ppr :: FamTyConFlav -> SDoc # |
data AlgTyConRhs #
Represents right-hand-sides of TyCon
s 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 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 GHC.Core.TyCo.Rep |
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 GHC.Core.TyCon Methods ppr :: AlgTyConFlav -> SDoc # |
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 DataCon
s 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!
unwrapNewTyCon_maybe :: TyCon -> Maybe ([TyVar], Type, CoAxiom Unbranched) #
unwrapNewTyConEtad_maybe :: TyCon -> Maybe ([TyVar], Type, CoAxiom Unbranched) #
tyConVisibleTyVars :: TyCon -> [TyVar] #
tyConTuple_maybe :: TyCon -> Maybe TupleSort #
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 ...
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]
tyConSingleDataCon :: TyCon -> DataCon #
Like tyConSingleDataCon_maybe
, but panics if Nothing
.
tyConSingleAlgDataCon_maybe :: TyCon -> Maybe DataCon #
Like tyConSingleDataCon_maybe
, but returns Nothing
for newtypes.
tyConRuntimeRepInfo :: TyCon -> RuntimeRepInfo #
Extract any RuntimeRepInfo
from this TyCon
tyConRoles :: TyCon -> [Role] #
Get the list of roles for the type parameters of a TyCon
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 GHC.Tc.Instance.Typeable.
tyConInvisTVBinders :: [TyConBinder] -> [InvisTVBinder] #
tyConInjectivityInfo :: TyCon -> Injectivity #
returns tyConInjectivityInfo
tc
if Injective
istc
is an
injective tycon (where is
states for which tyConBinders
tc
is
injective), or NotInjective
otherwise.
tyConFlavourAssoc_maybe :: TyConFlavour -> Maybe TyCon #
Get the enclosing class TyCon (if there is one) for the given TyConFlavour
tyConFlavour :: TyCon -> TyConFlavour #
tyConFieldLabels :: TyCon -> [FieldLabel] #
The labels for the fields of this particular TyCon
tyConFamilySize :: TyCon -> Int #
tyConFamilyResVar_maybe :: TyCon -> Maybe Name #
Extract type variable naming the result of injective type family
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) #
tyConDataCons_maybe :: TyCon -> Maybe [DataCon] #
tyConDataCons :: TyCon -> [DataCon] #
As tyConDataCons_maybe
, but returns the empty list of constructors if no
constructors could be found
tyConClass_maybe :: TyCon -> Maybe Class #
If this TyCon
is that for a class instance, return the class it is for.
Otherwise returns Nothing
tyConCType_maybe :: TyCon -> Maybe CType #
tyConAssoc_maybe :: TyCon -> Maybe TyCon #
Get the enclosing class TyCon (if there is one) for the given TyCon.
tyConAlgDataCons_maybe :: TyCon -> Maybe [DataCon] #
Returns Just dcs
if the given TyCon
is a data
type, a tuple type
or a sum type with data constructors dcs. If the TyCon
has more than one
constructor, or represents a primitive or function type constructor then
Nothing
is returned.
Like tyConDataCons_maybe
, but returns Nothing
for newtypes.
tcFlavourIsOpen :: TyConFlavour -> Bool #
Is this flavour of TyCon
an open type family or a data family?
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 TyVar
s bound by a vanilla type synonym
and the corresponding (unsubstituted) right hand side.
setTcTyConKind :: TyCon -> Kind -> TyCon #
primRepSizeB :: Platform -> 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# 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
laid out.
primRepIsFloat :: PrimRep -> Maybe Bool #
Return if Rep stands for floating type, returns Nothing for vector types.
primElemRepSizeB :: PrimElemRep -> Int #
pprPromotionQuote :: TyCon -> SDoc #
noTcTyConScopedTyVars :: [(Name, TcTyVar)] #
No scoped type variables (to be used with mkTcTyCon).
newTyConRhs :: TyCon -> ([TyVar], Type) #
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.
newTyConDataCon_maybe :: TyCon -> Maybe DataCon #
newTyConCo_maybe :: TyCon -> Maybe (CoAxiom Unbranched) #
newTyConCo :: TyCon -> CoAxiom Unbranched #
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
mkTyConTagMap :: TyCon -> NameEnv ConTag #
mkTyConKind :: [TyConBinder] -> Kind -> Kind #
Arguments
:: Name | |
-> [TyConBinder] | |
-> Kind | Result kind of the |
-> Arity | Arity of the tuple |
-> DataCon | |
-> TupleSort | Whether the tuple is boxed or unboxed |
-> AlgTyConFlav | |
-> TyCon |
Arguments
:: Name | |
-> [TyConBinder] | |
-> Kind | result kind only |
-> [(Name, TcTyVar)] | Scoped type variables; see Note [How TcTyCons work] in GHC.Tc.TyCl |
-> 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 GHC.Tc.TyCl.
Arguments
:: Name | |
-> [TyConBinder] | |
-> Kind | result kind |
-> [Role] | |
-> Type | |
-> Bool | |
-> Bool | |
-> Bool | |
-> TyCon |
Create a type synonym TyCon
Arguments
:: Name | |
-> [TyConBinder] | |
-> Kind | Kind of the resulting |
-> Arity | Arity of the sum |
-> [TyVar] |
|
-> [DataCon] | |
-> AlgTyConFlav | |
-> TyCon |
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
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, never levity-polymorphic |
-> [Role] | |
-> TyCon |
Create an unlifted primitive TyCon
, such as Int#
.
mkNamedTyConBinders :: ArgFlag -> [TyVar] -> [TyConBinder] #
mkNamedTyConBinder :: ArgFlag -> TyVar -> TyConBinder #
Arguments
:: Name | |
-> [TyConBinder] | |
-> Kind | result kind |
-> [Role] | |
-> TyCon |
Create a lifted primitive TyCon
such as RealWorld
Kind constructors
mkFunTyCon :: Name -> [TyConBinder] -> Name -> TyCon #
Arguments
:: Name | |
-> [TyConBinder] | |
-> Kind | result kind |
-> Maybe Name | |
-> FamTyConFlav | |
-> Maybe Class | |
-> Injectivity | |
-> TyCon |
Create a type family TyCon
mkDataTyConRhs :: [DataCon] -> AlgTyConRhs #
mkClassTyCon :: Name -> [TyConBinder] -> [Role] -> AlgTyConRhs -> Class -> Name -> TyCon #
Simpler specialization of mkAlgTyCon
for classes
mkAnonTyConBinders :: AnonArgFlag -> [TyVar] -> [TyConBinder] #
mkAnonTyConBinder :: AnonArgFlag -> TyVar -> TyConBinder #
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
.
lookupTyConFieldLabel :: FieldLabelString -> TyCon -> Maybe FieldLabel #
Look up a field label belonging to this TyCon
isVisibleTyConBinder :: VarBndr tv TyConBndrVis -> Bool #
isVanillaAlgTyCon :: TyCon -> Bool #
Returns True
for vanilla AlgTyCons -- that is, those created
with a data
or newtype
declaration.
isUnliftedTyCon :: TyCon -> Bool #
isUnboxedSumTyCon :: TyCon -> Bool #
Is this the TyCon
for an unboxed sum?
isTypeSynonymTyCon :: TyCon -> Bool #
Is this a TyCon
representing a regular H98 type synonym (type
)?
isTypeFamilyTyCon :: TyCon -> Bool #
Is this a synonym TyCon
that can have may have further instances appear?
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.
isTyConAssoc :: TyCon -> Bool #
Is this TyCon for an associated type?
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)
isTauTyCon :: TyCon -> Bool #
isPromotedTupleTyCon :: TyCon -> Bool #
Is this the TyCon
for a promoted tuple?
isPromotedDataCon_maybe :: TyCon -> Maybe DataCon #
Retrieves the promoted DataCon if this is a PromotedDataCon;
isPromotedDataCon :: TyCon -> Bool #
Is this a PromotedDataCon?
isPrimTyCon :: TyCon -> Bool #
Does this TyCon
represent something that cannot be defined in Haskell?
isOpenTypeFamilyTyCon :: TyCon -> Bool #
Is this an open type family TyCon?
isOpenFamilyTyCon :: TyCon -> Bool #
Is this a TyCon
, synonym or otherwise, that defines a family with
instances?
isNoParent :: AlgTyConFlav -> Bool #
isNewTyCon :: TyCon -> Bool #
Is this TyCon
that for a newtype
isNamedTyConBinder :: TyConBinder -> Bool #
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?
isInvisibleTyConBinder :: VarBndr tv TyConBndrVis -> Bool #
isInjectiveTyCon :: TyCon -> Role -> Bool #
isInjectiveTyCon
is true of TyCon
s 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 GHC.Tc.Solver.Canonical
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
dfun
does 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)
isGenerativeTyCon :: TyCon -> Role -> Bool #
isGenerativeTyCon
is true of TyCon
s 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 GHC.Tc.Solver.Canonical
isGenInjAlgRhs :: AlgTyConRhs -> Bool #
Is this an AlgTyConRhs
of a TyCon
that is generative and injective
with respect to representational equality?
isGcPtrRep :: PrimRep -> Bool #
isGadtSyntaxTyCon :: TyCon -> Bool #
Is this an algebraic TyCon
declared with the GADT syntax?
isForgetfulSynTyCon :: TyCon -> Bool #
Is this a forgetful type synonym? If this is a type synonym whose RHS does not mention one (or more) of its bound variables, returns True. Thus, False means that all bound variables appear on the RHS; True may not mean anything, as the test to set this flag is conservative.
isFamilyTyCon :: TyCon -> Bool #
Is this a TyCon
, synonym or otherwise, that defines a family?
isFamInstTyCon :: TyCon -> Bool #
Is this TyCon
that for a data family instance?
isFamFreeTyCon :: TyCon -> Bool #
Is this tycon neither a type family nor a synonym that expands to a type family?
isEnumerationTyCon :: TyCon -> Bool #
Is this an algebraic TyCon
which is just an enumeration of values?
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 newtype
s, unboxed tuples, unboxed sums and type family
TyCon
s. But it is not guaranteed to return True
in all cases
that it could.
NB: for a data type family, only the instance TyCon
s
get an info table. The family declaration TyCon
does not
isDataFamilyTyCon :: TyCon -> Bool #
Is this a synonym TyCon
that can have may have further instances appear?
isConstraintKindCon :: TyCon -> Bool #
Returns True
for the TyCon
of the Constraint
kind.
isClosedSynFamilyTyConWithAxiom_maybe :: TyCon -> Maybe (CoAxiom Branched) #
Is this a non-empty closed type family? Returns Nothing
for
abstract or empty closed families.
isClassTyCon :: TyCon -> Bool #
Is this TyCon
that for a class instance?
isBoxedTupleTyCon :: TyCon -> Bool #
Is this the TyCon
for a boxed tuple?
isAlgTyCon :: TyCon -> Bool #
Returns True
if the supplied TyCon
resulted from either a
data
or newtype
declaration
isAbstractTyCon :: TyCon -> Bool #
Test if the TyCon
is algebraic but abstract (invisible data constructors)
famTyConFlav_maybe :: TyCon -> Maybe FamTyConFlav #
Extract the flavour of a type family (with all the extra information that it carries)
Arguments
:: TyCon | |
-> [tyco] | Arguments to |
-> Maybe ([(TyVar, tyco)], Type, [tyco]) | Returns a |
algTyConRhs :: TyCon -> AlgTyConRhs #
Extract an AlgTyConRhs
with information about data constructors from an
algebraic or tuple TyCon
. Panics for any other sort of TyCon
nilDataConKey :: Unique #
listTyConKey :: Unique #
type DefMethInfo = Maybe (Name, DefMethSpec Type) #
type ClassOpItem = (Id, DefMethInfo) #
type ClassMinimalDef = BooleanFormula Name #
data ClassATItem #
Constructors
ATI TyCon (Maybe (Type, ATValidityInfo)) |
Instances
Data Class | |
Defined in GHC.Core.Class Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Class -> c Class # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Class # dataTypeOf :: Class -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Class) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Class) # gmapT :: (forall b. Data b => b -> b) -> Class -> Class # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Class -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Class -> r # gmapQ :: (forall d. Data d => d -> u) -> Class -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Class -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Class -> m Class # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Class -> m Class # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Class -> m Class # | |
NamedThing Class | |
Defined in GHC.Core.Class | |
Uniquable Class | |
Defined in GHC.Core.Class | |
Outputable Class | |
Defined in GHC.Core.Class | |
Eq Class | |
data ATValidityInfo #
Information about an associated type family default implementation. This
is used solely for validity checking.
See Note [Type-checking default assoc decls]
in GHC.Tc.TyCl.
pprFundeps :: Outputable a => [FunDep a] -> SDoc #
pprFunDep :: Outputable a => FunDep a -> SDoc #
pprDefMethInfo :: DefMethInfo -> SDoc #
mkClass :: Name -> [TyVar] -> [FunDep TyVar] -> [PredType] -> [Id] -> [ClassATItem] -> [ClassOpItem] -> ClassMinimalDef -> TyCon -> Class #
isAbstractClass :: Class -> Bool #
classSCTheta :: Class -> [PredType] #
classSCSelIds :: Class -> [Id] #
classSCSelId :: Class -> Int -> Id #
classOpItems :: Class -> [ClassOpItem] #
classMinimalDef :: Class -> ClassMinimalDef #
classMethods :: Class -> [Id] #
classHasFds :: Class -> Bool #
classExtraBigSig :: Class -> ([TyVar], [FunDep TyVar], [PredType], [Id], [ClassATItem], [ClassOpItem]) #
classBigSig :: Class -> ([TyVar], [PredType], [Id], [ClassOpItem]) #
classArity :: Class -> Arity #
classAllSelIds :: Class -> [Id] #
classATItems :: Class -> [ClassATItem] #
Constructors
Nominal | |
Representational | |
Phantom |
Instances
Data Role | |
Defined in GHC.Core.Coercion.Axiom 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 # | |
Binary Role | |
Outputable Role | |
Defined in GHC.Core.Coercion.Axiom | |
Eq Role | |
Ord Role | |
type Anno (Maybe Role) | |
Defined in GHC.Hs.Decls | |
type Anno (Maybe Role) | |
Defined in GHC.Hs.Decls |
data TrailingAnn #
Captures the location of punctuation occuring between items, normally in a list. It is captured as a trailing annotation.
Constructors
AddSemiAnn EpaLocation | Trailing ';' |
AddCommaAnn EpaLocation | Trailing ',' |
AddVbarAnn EpaLocation | Trailing '|' |
AddRarrowAnn EpaLocation | Trailing |
AddRarrowAnnU EpaLocation | Trailing |
AddLollyAnnU EpaLocation | Trailing |
Instances
Data TrailingAnn | |
Defined in GHC.Parser.Annotation Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TrailingAnn -> c TrailingAnn # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TrailingAnn # toConstr :: TrailingAnn -> Constr # dataTypeOf :: TrailingAnn -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TrailingAnn) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TrailingAnn) # gmapT :: (forall b. Data b => b -> b) -> TrailingAnn -> TrailingAnn # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TrailingAnn -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TrailingAnn -> r # gmapQ :: (forall d. Data d => d -> u) -> TrailingAnn -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> TrailingAnn -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> TrailingAnn -> m TrailingAnn # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TrailingAnn -> m TrailingAnn # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TrailingAnn -> m TrailingAnn # | |
Outputable TrailingAnn | |
Defined in GHC.Parser.Annotation Methods ppr :: TrailingAnn -> SDoc # | |
Eq TrailingAnn | |
Defined in GHC.Parser.Annotation | |
Ord TrailingAnn | |
Defined in GHC.Parser.Annotation Methods compare :: TrailingAnn -> TrailingAnn -> Ordering # (<) :: TrailingAnn -> TrailingAnn -> Bool # (<=) :: TrailingAnn -> TrailingAnn -> Bool # (>) :: TrailingAnn -> TrailingAnn -> Bool # (>=) :: TrailingAnn -> TrailingAnn -> Bool # max :: TrailingAnn -> TrailingAnn -> TrailingAnn # min :: TrailingAnn -> TrailingAnn -> TrailingAnn # |
type SrcSpanAnnP = SrcAnn AnnPragma #
type SrcSpanAnnN = SrcAnn NameAnn #
type SrcSpanAnnL = SrcAnn AnnList #
type SrcSpanAnnC = SrcAnn AnnContext #
type SrcSpanAnnA = SrcAnn AnnListItem #
data SrcSpanAnn' a #
The 'SrcSpanAnn'' type wraps a normal SrcSpan
, together with
an extra annotation type. This is mapped to a specific GenLocated
usage in the AST through the XRec
and Anno
type families.
Constructors
SrcSpanAnn | |
Instances
type SrcAnn ann = SrcSpanAnn' (EpAnn ann) #
We mostly use 'SrcSpanAnn'' with an 'EpAnn''
Detail of the "brackets" used in an AnnParen
exact print annotation.
Constructors
AnnParens | '(', ')' |
AnnParensHash | '(#', '#)' |
AnnParensSquare | '[', ']' |
Instances
Data ParenType | |
Defined in GHC.Parser.Annotation Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ParenType -> c ParenType # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ParenType # toConstr :: ParenType -> Constr # dataTypeOf :: ParenType -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ParenType) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ParenType) # gmapT :: (forall b. Data b => b -> b) -> ParenType -> ParenType # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ParenType -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ParenType -> r # gmapQ :: (forall d. Data d => d -> u) -> ParenType -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ParenType -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ParenType -> m ParenType # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ParenType -> m ParenType # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ParenType -> m ParenType # | |
Eq ParenType | |
Ord ParenType | |
Constructors
NoEpAnns |
Instances
Data NoEpAnns | |
Defined in GHC.Parser.Annotation Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> NoEpAnns -> c NoEpAnns # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c NoEpAnns # toConstr :: NoEpAnns -> Constr # dataTypeOf :: NoEpAnns -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c NoEpAnns) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NoEpAnns) # gmapT :: (forall b. Data b => b -> b) -> NoEpAnns -> NoEpAnns # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NoEpAnns -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NoEpAnns -> r # gmapQ :: (forall d. Data d => d -> u) -> NoEpAnns -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> NoEpAnns -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> NoEpAnns -> m NoEpAnns # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> NoEpAnns -> m NoEpAnns # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> NoEpAnns -> m NoEpAnns # | |
Eq NoEpAnns | |
Ord NoEpAnns | |
Defined in GHC.Parser.Annotation |
exact print annotations for a RdrName
. There are many kinds of
adornment that can be attached to a given RdrName
. This type
captures them, as detailed on the individual constructors.
Constructors
NameAnn | Used for a name with an adornment, so |
Fields | |
NameAnnCommas | |
Fields | |
NameAnnOnly | Used for |
Fields | |
NameAnnRArrow | Used for |
Fields
| |
NameAnnQuote | Used for an item with a leading |
Fields | |
NameAnnTrailing | Used when adding a |
Fields
|
Instances
Data NameAnn | |
Defined in GHC.Parser.Annotation Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> NameAnn -> c NameAnn # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c NameAnn # toConstr :: NameAnn -> Constr # dataTypeOf :: NameAnn -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c NameAnn) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NameAnn) # gmapT :: (forall b. Data b => b -> b) -> NameAnn -> NameAnn # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NameAnn -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NameAnn -> r # gmapQ :: (forall d. Data d => d -> u) -> NameAnn -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> NameAnn -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> NameAnn -> m NameAnn # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> NameAnn -> m NameAnn # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> NameAnn -> m NameAnn # | |
Monoid NameAnn | |
Semigroup NameAnn | |
Outputable NameAnn | |
Defined in GHC.Parser.Annotation | |
Eq NameAnn | |
type Anno (LocatedN Name) | |
Defined in GHC.Hs.Binds | |
type Anno (LocatedN RdrName) | |
Defined in GHC.Hs.Binds | |
type Anno (LocatedN Id) | |
Defined in GHC.Hs.Binds | |
type Anno [LocatedN Name] | |
Defined in GHC.Hs.Binds | |
type Anno [LocatedN RdrName] | |
Defined in GHC.Hs.Binds | |
type Anno [LocatedN Id] | |
Defined in GHC.Hs.Binds |
data NameAdornment #
A NameAnn
can capture the locations of surrounding adornments,
such as parens or backquotes. This data type identifies what
particular pair are being used.
Constructors
NameParens | '(' ')' |
NameParensHash | '(#' '#)' |
NameBackquotes | '`' |
NameSquare | '[' ']' |
Instances
type LocatedP = GenLocated SrcSpanAnnP #
type LocatedN = GenLocated SrcSpanAnnN #
type LocatedL = GenLocated SrcSpanAnnL #
type LocatedC = GenLocated SrcSpanAnnC #
type LocatedAn an = GenLocated (SrcAnn an) #
General representation of a GenLocated
type carrying a
parameterised annotation type.
type LocatedA = GenLocated SrcSpanAnnA #
type LEpaComment = GenLocated Anchor EpaComment #
data IsUnicodeSyntax #
Certain tokens can have alternate representations when unicode syntax is
enabled. This flag is attached to those tokens in the lexer so that the
original source representation can be reproduced in the corresponding
EpAnnotation
Constructors
UnicodeSyntax | |
NormalSyntax |
Instances
Some template haskell tokens have two variants, one with an e
the other
not:
[| or [e| [|| or [e||
This type indicates whether the e
is present or not.
Instances
Data HasE | |
Defined in GHC.Parser.Annotation Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HasE -> c HasE # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HasE # dataTypeOf :: HasE -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c HasE) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HasE) # gmapT :: (forall b. Data b => b -> b) -> HasE -> HasE # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HasE -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HasE -> r # gmapQ :: (forall d. Data d => d -> u) -> HasE -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HasE -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HasE -> m HasE # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HasE -> m HasE # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HasE -> m HasE # | |
Show HasE | |
Eq HasE | |
Ord HasE | |
data EpaLocation #
The anchor for an
. The Parser inserts the
AnnKeywordId
variant, giving the exact location of the original item
in the parsed source. This can be replaced by the EpaSpan
version, to provide a position for the item relative to the end of
the previous item in the source. This is useful when editing an
AST prior to exact printing the changed one. The list of comments
in the EpaDelta
variant captures any comments between the prior
output and the thing being marked here, since we cannot otherwise
sort the relative order.EpaDelta
Constructors
EpaSpan !RealSrcSpan | |
EpaDelta !DeltaPos ![LEpaComment] |
Instances
Data EpaLocation | |
Defined in GHC.Parser.Annotation Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> EpaLocation -> c EpaLocation # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c EpaLocation # toConstr :: EpaLocation -> Constr # dataTypeOf :: EpaLocation -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c EpaLocation) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c EpaLocation) # gmapT :: (forall b. Data b => b -> b) -> EpaLocation -> EpaLocation # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> EpaLocation -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> EpaLocation -> r # gmapQ :: (forall d. Data d => d -> u) -> EpaLocation -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> EpaLocation -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> EpaLocation -> m EpaLocation # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> EpaLocation -> m EpaLocation # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> EpaLocation -> m EpaLocation # | |
Outputable EpaLocation | |
Defined in GHC.Parser.Annotation Methods ppr :: EpaLocation -> SDoc # | |
Eq EpaLocation | |
Defined in GHC.Parser.Annotation | |
Ord EpaLocation | |
Defined in GHC.Parser.Annotation Methods compare :: EpaLocation -> EpaLocation -> Ordering # (<) :: EpaLocation -> EpaLocation -> Bool # (<=) :: EpaLocation -> EpaLocation -> Bool # (>) :: EpaLocation -> EpaLocation -> Bool # (>=) :: EpaLocation -> EpaLocation -> Bool # max :: EpaLocation -> EpaLocation -> EpaLocation # min :: EpaLocation -> EpaLocation -> EpaLocation # |
data EpaCommentTok #
Constructors
EpaDocCommentNext String | something beginning '-- |' |
EpaDocCommentPrev String | something beginning '-- ^' |
EpaDocCommentNamed String | something beginning '-- $' |
EpaDocSection Int String | a section heading |
EpaDocOptions String | doc options (prune, ignore-exports, etc) |
EpaLineComment String | comment starting by "--" |
EpaBlockComment String | comment in {- -} |
EpaEofComment | empty comment, capturing location of EOF |
Instances
data EpaComment #
Constructors
EpaComment | |
Fields
|
Instances
data EpAnnComments #
When we are parsing we add comments that belong a particular AST
element, and print them together with the element, interleaving
them into the output stream. But when editing the AST to move
fragments around it is useful to be able to first separate the
comments into those occuring before the AST element and those
following it. The EpaCommentsBalanced
constructor is used to do
this. The GHC parser will only insert the EpaComments
form.
Constructors
EpaComments | |
Fields
| |
EpaCommentsBalanced | |
Fields
|
Instances
The exact print annotations (EPAs) are kept in the HsSyn AST for the GhcPs phase. We do not always have EPAs though, only for code that has been parsed as they do not exist for generated code. This type captures that they may be missing.
A goal of the annotations is that an AST can be edited, including moving subtrees from one place to another, duplicating them, and so on. This means that each fragment must be self-contained. To this end, each annotated fragment keeps track of the anchor position it was originally captured at, being simply the start span of the topmost element of the ast fragment. This gives us a way to later re-calculate all Located items in this layer of the AST, as well as any annotations captured. The comments associated with the AST fragment are also captured here.
The ann
type parameter allows this general structure to be
specialised to the specific set of locations of original exact
print annotation elements. So for HsLet
we have
type instance XLet GhcPs = EpAnn AnnsLet data AnnsLet = AnnsLet { alLet :: EpaLocation, alIn :: EpaLocation } deriving Data
The spacing between the items under the scope of a given EpAnn is
normally derived from the original Anchor
. But if a sub-element
is not in its original position, the required spacing can be
directly captured in the anchor_op
field of the entry
Anchor.
This allows us to freely move elements around, and stitch together
new AST fragments out of old ones, and have them still printed out
in a precise way.
Constructors
EpAnn | |
EpAnnNotUsed | No Annotation for generated code, e.g. from TH, deriving, etc. |
Instances
Spacing between output items when exact printing. It captures
the spacing from the current print position on the page to the
position required for the thing about to be printed. This is
either on the same line in which case is is simply the number of
spaces to emit, or it is some number of lines down, with a given
column offset. The exact printing algorithm keeps track of the
column offset pertaining to the current anchor position, so the
deltaColumn
is the additional spaces to add in this case. See
https://gitlab.haskell.org/ghc/ghc/wikis/api-annotations for
details.
Constructors
SameLine | |
Fields
| |
DifferentLine | |
Fields
|
Instances
Data DeltaPos | |
Defined in GHC.Parser.Annotation Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DeltaPos -> c DeltaPos # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DeltaPos # toConstr :: DeltaPos -> Constr # dataTypeOf :: DeltaPos -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DeltaPos) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DeltaPos) # gmapT :: (forall b. Data b => b -> b) -> DeltaPos -> DeltaPos # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DeltaPos -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DeltaPos -> r # gmapQ :: (forall d. Data d => d -> u) -> DeltaPos -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> DeltaPos -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> DeltaPos -> m DeltaPos # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DeltaPos -> m DeltaPos # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DeltaPos -> m DeltaPos # | |
Show DeltaPos | |
Outputable DeltaPos | |
Defined in GHC.Parser.Annotation | |
Eq DeltaPos | |
Ord DeltaPos | |
Defined in GHC.Parser.Annotation |
data AnnSortKey #
Captures the sort order of sub elements. This is needed when the sub-elements have been split (as in a HsLocalBind which holds separate binds and sigs) or for infix patterns where the order has been re-arranged. It is captured explicitly so that after the Delta phase a SrcSpan is used purely as an index into the annotations, allowing transformations of the AST including the introduction of new Located items or re-arranging existing ones.
Constructors
NoAnnSortKey | |
AnnSortKey [RealSrcSpan] |
Instances
Data AnnSortKey | |
Defined in GHC.Parser.Annotation Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AnnSortKey -> c AnnSortKey # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AnnSortKey # toConstr :: AnnSortKey -> Constr # dataTypeOf :: AnnSortKey -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c AnnSortKey) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AnnSortKey) # gmapT :: (forall b. Data b => b -> b) -> AnnSortKey -> AnnSortKey # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AnnSortKey -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AnnSortKey -> r # gmapQ :: (forall d. Data d => d -> u) -> AnnSortKey -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> AnnSortKey -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> AnnSortKey -> m AnnSortKey # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnSortKey -> m AnnSortKey # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnSortKey -> m AnnSortKey # | |
Monoid AnnSortKey | |
Defined in GHC.Parser.Annotation Methods mempty :: AnnSortKey # mappend :: AnnSortKey -> AnnSortKey -> AnnSortKey # mconcat :: [AnnSortKey] -> AnnSortKey # | |
Semigroup AnnSortKey | |
Defined in GHC.Parser.Annotation Methods (<>) :: AnnSortKey -> AnnSortKey -> AnnSortKey # sconcat :: NonEmpty AnnSortKey -> AnnSortKey # stimes :: Integral b => b -> AnnSortKey -> AnnSortKey # | |
Outputable AnnSortKey | |
Defined in GHC.Parser.Annotation Methods ppr :: AnnSortKey -> SDoc # | |
Eq AnnSortKey | |
Defined in GHC.Parser.Annotation |
exact print annotation used for capturing the locations of annotations in pragmas.
Instances
Data AnnPragma | |
Defined in GHC.Parser.Annotation Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AnnPragma -> c AnnPragma # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AnnPragma # toConstr :: AnnPragma -> Constr # dataTypeOf :: AnnPragma -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c AnnPragma) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AnnPragma) # gmapT :: (forall b. Data b => b -> b) -> AnnPragma -> AnnPragma # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AnnPragma -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AnnPragma -> r # gmapQ :: (forall d. Data d => d -> u) -> AnnPragma -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> AnnPragma -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> AnnPragma -> m AnnPragma # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnPragma -> m AnnPragma # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnPragma -> m AnnPragma # | |
Outputable AnnPragma | |
Defined in GHC.Parser.Annotation | |
Eq AnnPragma | |
exact print annotation for an item having surrounding "brackets", such as tuples or lists
Constructors
AnnParen | |
Fields |
Instances
Data AnnParen | |
Defined in GHC.Parser.Annotation Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AnnParen -> c AnnParen # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AnnParen # toConstr :: AnnParen -> Constr # dataTypeOf :: AnnParen -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c AnnParen) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AnnParen) # gmapT :: (forall b. Data b => b -> b) -> AnnParen -> AnnParen # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AnnParen -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AnnParen -> r # gmapQ :: (forall d. Data d => d -> u) -> AnnParen -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> AnnParen -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> AnnParen -> m AnnParen # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnParen -> m AnnParen # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnParen -> m AnnParen # |
data AnnListItem #
Annotation for items appearing in a list. They can have one or more trailing punctuations items, such as commas or semicolons.
Constructors
AnnListItem | |
Fields
|
Instances
Annotation for the "container" of a list. This captures surrounding items such as braces if present, and introductory keywords such as 'where'.
Constructors
AnnList | |
Instances
Data AnnList | |
Defined in GHC.Parser.Annotation Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AnnList -> c AnnList # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AnnList # toConstr :: AnnList -> Constr # dataTypeOf :: AnnList -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c AnnList) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AnnList) # gmapT :: (forall b. Data b => b -> b) -> AnnList -> AnnList # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AnnList -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AnnList -> r # gmapQ :: (forall d. Data d => d -> u) -> AnnList -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> AnnList -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> AnnList -> m AnnList # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnList -> m AnnList # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnList -> m AnnList # | |
Monoid AnnList | |
Semigroup AnnList | |
Outputable AnnList | |
Defined in GHC.Parser.Annotation | |
Eq AnnList | |
Binary a => Binary (LocatedL a) | |
data AnnKeywordId #
Exact print annotations exist so that tools can perform source to source conversions of Haskell code. They are used to keep track of the various syntactic keywords that are not otherwise captured in the AST.
The wiki page describing this feature is https://gitlab.haskell.org/ghc/ghc/wikis/api-annotations https://gitlab.haskell.org/ghc/ghc/-/wikis/implementing-trees-that-grow/in-tree-api-annotations
Note: in general the names of these are taken from the corresponding token, unless otherwise noted See note [exact print annotations] above for details of the usage
Constructors
AnnAnyclass | |
AnnAs | |
AnnAt | |
AnnBang |
|
AnnBackquote | '`' |
AnnBy | |
AnnCase | case or lambda case |
AnnClass | |
AnnClose | '#)' or '#-}' etc |
AnnCloseB | '|)' |
AnnCloseBU | '|)', unicode variant |
AnnCloseC | '}' |
AnnCloseQ | '|]' |
AnnCloseQU | '|]', unicode variant |
AnnCloseP | ')' |
AnnClosePH | '#)' |
AnnCloseS | ']' |
AnnColon | |
AnnComma | as a list separator |
AnnCommaTuple | in a RdrName for a tuple |
AnnDarrow | '=>' |
AnnDarrowU | '=>', unicode variant |
AnnData | |
AnnDcolon | '::' |
AnnDcolonU | '::', unicode variant |
AnnDefault | |
AnnDeriving | |
AnnDo | |
AnnDot | |
AnnDotdot | '..' |
AnnElse | |
AnnEqual | |
AnnExport | |
AnnFamily | |
AnnForall | |
AnnForallU | Unicode variant |
AnnForeign | |
AnnFunId | for function name in matches where there are multiple equations for the function. |
AnnGroup | |
AnnHeader | for CType |
AnnHiding | |
AnnIf | |
AnnImport | |
AnnIn | |
AnnInfix | 'infix' or 'infixl' or 'infixr' |
AnnInstance | |
AnnLam | |
AnnLarrow | '<-' |
AnnLarrowU | '<-', unicode variant |
AnnLet | |
AnnLollyU | The |
AnnMdo | |
AnnMinus | |
AnnModule | |
AnnNewtype | |
AnnName | where a name loses its location in the AST, this carries it |
AnnOf | |
AnnOpen | '{-# DEPRECATED' etc. Opening of pragmas where
the capitalisation of the string can be changed by
the user. The actual text used is stored in a
|
AnnOpenB | '(|' |
AnnOpenBU | '(|', unicode variant |
AnnOpenC | '{' |
AnnOpenE | '[e|' or '[e||' |
AnnOpenEQ | '[|' |
AnnOpenEQU | '[|', unicode variant |
AnnOpenP | '(' |
AnnOpenS | '[' |
AnnOpenPH | '(#' |
AnnDollar | prefix |
AnnDollarDollar | prefix |
AnnPackageName | |
AnnPattern | |
AnnPercent |
|
AnnPercentOne | '%1' -- for HsLinearArrow |
AnnProc | |
AnnQualified | |
AnnRarrow |
|
AnnRarrowU |
|
AnnRec | |
AnnRole | |
AnnSafe | |
AnnSemi | ';' |
AnnSimpleQuote | ''' |
AnnSignature | |
AnnStatic |
|
AnnStock | |
AnnThen | |
AnnThTyQuote | double ''' |
AnnTilde |
|
AnnType | |
AnnUnit |
|
AnnUsing | |
AnnVal | e.g. INTEGER |
AnnValStr | String value, will need quotes when output |
AnnVbar | '|' |
AnnVia |
|
AnnWhere | |
Annlarrowtail |
|
AnnlarrowtailU |
|
Annrarrowtail |
|
AnnrarrowtailU |
|
AnnLarrowtail |
|
AnnLarrowtailU |
|
AnnRarrowtail |
|
AnnRarrowtailU |
|
Instances
data AnnContext #
Exact print annotation for the Context
data type.
Constructors
AnnContext | |
Fields
|
Instances
Data AnnContext | |
Defined in GHC.Parser.Annotation Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AnnContext -> c AnnContext # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AnnContext # toConstr :: AnnContext -> Constr # dataTypeOf :: AnnContext -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c AnnContext) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AnnContext) # gmapT :: (forall b. Data b => b -> b) -> AnnContext -> AnnContext # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AnnContext -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AnnContext -> r # gmapQ :: (forall d. Data d => d -> u) -> AnnContext -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> AnnContext -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> AnnContext -> m AnnContext # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnContext -> m AnnContext # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnContext -> m AnnContext # | |
Outputable AnnContext | |
Defined in GHC.Parser.Annotation Methods ppr :: AnnContext -> SDoc # |
data AnchorOperation #
If tools modify the parsed source, the MovedAnchor
variant can
directly provide the spacing for this item relative to the previous
one when printing. This allows AST fragments with a particular
anchor to be freely moved, without worrying about recalculating the
appropriate anchor span.
Constructors
UnchangedAnchor | |
MovedAnchor DeltaPos |
Instances
An Anchor
records the base location for the start of the
syntactic element holding the annotations, and is used as the point
of reference for calculating delta positions for contained
annotations.
It is also normally used as the reference point for the spacing of
the element relative to its container. If it is moved, that
relationship is tracked in the anchor_op
instead.
Constructors
Anchor | |
Fields
|
Instances
Data Anchor | |
Defined in GHC.Parser.Annotation Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Anchor -> c Anchor # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Anchor # toConstr :: Anchor -> Constr # dataTypeOf :: Anchor -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Anchor) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Anchor) # gmapT :: (forall b. Data b => b -> b) -> Anchor -> Anchor # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Anchor -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Anchor -> r # gmapQ :: (forall d. Data d => d -> u) -> Anchor -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Anchor -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Anchor -> m Anchor # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Anchor -> m Anchor # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Anchor -> m Anchor # | |
Semigroup Anchor | |
Show Anchor | |
Outputable Anchor | |
Defined in GHC.Parser.Annotation | |
Eq Anchor | |
Ord Anchor | |
Outputable (GenLocated Anchor EpaComment) | |
Defined in GHC.Parser.Annotation Methods ppr :: GenLocated Anchor EpaComment -> SDoc # |
Captures an annotation, storing the
and its
location. The parser only ever inserts AnnKeywordId
fields with a
RealSrcSpan being the original location of the annotation in the
source file.
The EpaLocation
can also store a delta position if the AST has been
modified and needs to be pretty printed again.
The usual way an EpaLocation
AddEpAnn
is created is using the mj
("make
jump") function, and then it can be inserted into the appropriate
annotation.
Constructors
AddEpAnn AnnKeywordId EpaLocation |
Instances
Data AddEpAnn | |
Defined in GHC.Parser.Annotation Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AddEpAnn -> c AddEpAnn # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AddEpAnn # toConstr :: AddEpAnn -> Constr # dataTypeOf :: AddEpAnn -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c AddEpAnn) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AddEpAnn) # gmapT :: (forall b. Data b => b -> b) -> AddEpAnn -> AddEpAnn # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AddEpAnn -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AddEpAnn -> r # gmapQ :: (forall d. Data d => d -> u) -> AddEpAnn -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> AddEpAnn -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> AddEpAnn -> m AddEpAnn # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AddEpAnn -> m AddEpAnn # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AddEpAnn -> m AddEpAnn # | |
Outputable AddEpAnn | |
Defined in GHC.Parser.Annotation | |
Eq AddEpAnn | |
Ord AddEpAnn | |
Defined in GHC.Parser.Annotation |
widenSpan :: SrcSpan -> [AddEpAnn] -> SrcSpan #
The annotations need to all come after the anchor. Make sure this is the case.
widenLocatedAn :: SrcSpanAnn' an -> [AddEpAnn] -> SrcSpanAnn' an #
widenAnchorR :: Anchor -> RealSrcSpan -> Anchor #
widenAnchor :: Anchor -> [AddEpAnn] -> Anchor #
unicodeAnn :: AnnKeywordId -> AnnKeywordId #
Convert a normal annotation into its unicode equivalent one
transferAnnsA :: SrcSpanAnnA -> SrcSpanAnnA -> (SrcSpanAnnA, SrcSpanAnnA) #
Transfer comments and trailing items from the annotations in the
first SrcSpanAnnA
argument to those in the second.
spanAsAnchor :: SrcSpan -> Anchor #
sortLocatedA :: [GenLocated (SrcSpanAnn' a) e] -> [GenLocated (SrcSpanAnn' a) e] #
setPriorComments :: EpAnnComments -> [LEpaComment] -> EpAnnComments #
setFollowingComments :: EpAnnComments -> [LEpaComment] -> EpAnnComments #
setCommentsSrcAnn :: Monoid ann => SrcAnn ann -> EpAnnComments -> SrcAnn ann #
Replace any existing comments on a SrcAnn
, used for manipulating the
AST prior to exact printing the changed one.
setCommentsEpAnn :: Monoid a => SrcSpan -> EpAnn a -> EpAnnComments -> EpAnn a #
Replace any existing comments, used for manipulating the AST prior to exact printing the changed one.
removeCommentsA :: SrcAnn ann -> SrcAnn ann #
Remove the comments, leaving the exact print annotations payload
realSrcSpan :: SrcSpan -> RealSrcSpan #
realSpanAsAnchor :: RealSrcSpan -> Anchor #
reAnnL :: ann -> EpAnnComments -> Located e -> GenLocated (SrcAnn ann) e #
reAnnC :: AnnContext -> EpAnnComments -> Located a -> LocatedC a #
reAnn :: [TrailingAnn] -> EpAnnComments -> Located a -> LocatedA a #
parenTypeKws :: ParenType -> (AnnKeywordId, AnnKeywordId) #
Maps the ParenType
to the related opening and closing
AnnKeywordId. Used when actually printing the item.
noSrcSpanA :: SrcAnn ann #
noComments :: EpAnnCO #
noAnnSrcSpan :: SrcSpan -> SrcAnn ann #
Short form for EpAnnNotUsed
na2la :: SrcSpanAnn' a -> SrcAnn ann #
Helper function (temporary) during transition of names Discards any annotations
mapLocA :: (a -> b) -> GenLocated SrcSpan a -> GenLocated (SrcAnn ann) b #
la2r :: SrcSpanAnn' a -> RealSrcSpan #
la2na :: SrcSpanAnn' a -> SrcSpanAnnN #
Helper function (temporary) during transition of names Discards any annotations
la2la :: LocatedAn ann1 a2 -> LocatedAn ann2 a2 #
Helper function (temporary) during transition of names Discards any annotations
l2n :: LocatedAn a1 a2 -> LocatedN a2 #
Helper function (temporary) during transition of names Discards any annotations
l2l :: SrcSpanAnn' a -> SrcAnn ann #
getLocAnn :: Located a -> SrcSpanAnnA #
getLocA :: GenLocated (SrcSpanAnn' a) e -> SrcSpan #
getDeltaLine :: DeltaPos -> Int #
extraToAnnList :: AnnList -> [AddEpAnn] -> AnnList #
epaLocationRealSrcSpan :: EpaLocation -> RealSrcSpan #
Used in the parser only, extract the SrcSpan
from an
EpaLocation
. The parser will never insert a DeltaPos
, so the
partial function is safe.
epaLocationFromSrcAnn :: SrcAnn ann -> EpaLocation #
epAnnComments :: EpAnn an -> EpAnnComments #
epAnnAnnsL :: EpAnn a -> [a] #
deltaPos :: Int -> Int -> DeltaPos #
Smart constructor for a DeltaPos
. It preserves the invariant
that for the DifferentLine
constructor deltaLine
is always > 0.
commentsOnlyA :: Monoid ann => SrcAnn ann -> SrcAnn ann #
Remove the exact print annotations payload, leaving only the anchor and comments.
comment :: RealSrcSpan -> EpAnnComments -> EpAnnCO #
combineLocsA :: Semigroup a => GenLocated (SrcAnn a) e1 -> GenLocated (SrcAnn a) e2 -> SrcAnn a #
annParen2AddEpAnn :: EpAnn AnnParen -> [AddEpAnn] #
addTrailingCommaToN :: SrcSpan -> EpAnn NameAnn -> EpaLocation -> EpAnn NameAnn #
Helper function used in the parser to add a comma location to an existing annotation.
addTrailingAnnToL :: SrcSpan -> TrailingAnn -> EpAnnComments -> EpAnn AnnList -> EpAnn AnnList #
Helper function used in the parser to add a TrailingAnn
items
to an existing annotation.
addTrailingAnnToA :: SrcSpan -> TrailingAnn -> EpAnnComments -> EpAnn AnnListItem -> EpAnn AnnListItem #
Helper function used in the parser to add a TrailingAnn
items
to an existing annotation.
addCommentsToSrcAnn :: Monoid ann => SrcAnn ann -> EpAnnComments -> SrcAnn ann #
Add additional comments to a SrcAnn
, used for manipulating the
AST prior to exact printing the changed one.
addCommentsToEpAnn :: Monoid a => SrcSpan -> EpAnn a -> EpAnnComments -> EpAnn a #
Add additional comments, used for manipulating the AST prior to exact printing the changed one.
addCLocAA :: GenLocated (SrcSpanAnn' a1) e1 -> GenLocated (SrcSpanAnn' a2) e2 -> e3 -> GenLocated (SrcAnn ann) e3 #
addCLocA :: GenLocated (SrcSpanAnn' a) e1 -> GenLocated SrcSpan e2 -> e3 -> GenLocated (SrcAnn ann) e3 #
Combine locations from two Located
things and add them to a third thing
addAnnsA :: SrcSpanAnnA -> [TrailingAnn] -> EpAnnComments -> SrcSpanAnnA #
type DNameEnv a = UniqDFM Name a #
Deterministic Name Environment
See Note [Deterministic UniqFM] in GHC.Types.Unique.DFM for explanation why we need DNameEnv.
unitNameEnv :: Name -> a -> NameEnv a #
plusNameEnv_CD :: (a -> a -> a) -> NameEnv a -> a -> NameEnv a -> a -> NameEnv a #
plusNameEnv_C :: (a -> a -> a) -> NameEnv a -> NameEnv a -> NameEnv a #
plusNameEnv :: NameEnv a -> NameEnv a -> NameEnv a #
nameEnvElts :: NameEnv a -> [a] #
mkNameEnvWith :: (a -> Name) -> [a] -> NameEnv a #
mapNameEnv :: (elt1 -> elt2) -> NameEnv elt1 -> NameEnv elt2 #
mapDNameEnv :: (a -> b) -> DNameEnv a -> DNameEnv b #
lookupNameEnv_NF :: NameEnv a -> Name -> a #
lookupNameEnv :: NameEnv a -> Name -> Maybe a #
lookupDNameEnv :: DNameEnv a -> Name -> Maybe a #
isEmptyNameEnv :: NameEnv a -> Bool #
filterNameEnv :: (elt -> Bool) -> NameEnv elt -> NameEnv elt #
filterDNameEnv :: (a -> Bool) -> DNameEnv a -> DNameEnv a #
extendNameEnv_C :: (a -> a -> a) -> NameEnv a -> Name -> a -> NameEnv a #
extendNameEnv_Acc :: (a -> b -> b) -> (a -> b) -> NameEnv b -> Name -> a -> NameEnv b #
extendNameEnvList_C :: (a -> a -> a) -> NameEnv a -> [(Name, a)] -> NameEnv a #
extendNameEnvList :: NameEnv a -> [(Name, a)] -> NameEnv a #
extendNameEnv :: NameEnv a -> Name -> a -> NameEnv a #
extendDNameEnv :: DNameEnv a -> Name -> a -> DNameEnv a #
emptyNameEnv :: NameEnv a #
emptyDNameEnv :: DNameEnv a #
elemNameEnv :: Name -> NameEnv a -> Bool #
disjointNameEnv :: NameEnv a -> NameEnv a -> Bool #
delListFromNameEnv :: NameEnv a -> [Name] -> NameEnv a #
delFromNameEnv :: NameEnv a -> Name -> NameEnv a #
delFromDNameEnv :: DNameEnv a -> Name -> DNameEnv a #
anyNameEnv :: (elt -> Bool) -> NameEnv elt -> Bool #
adjustDNameEnv :: (a -> a) -> DNameEnv a -> Name -> DNameEnv a #
data BuiltInSyntax #
BuiltInSyntax is for things like (:)
, []
and tuples,
which have special syntactic forms. They aren't in scope
as such.
Constructors
BuiltInSyntax | |
UserSyntax |
stableNameCmp :: Name -> Name -> Ordering #
Compare Names lexicographically This only works for Names that originate in the source code or have been tidied.
setNameLoc :: Name -> SrcSpan -> Name #
pprPrefixName :: NamedThing a => a -> SDoc #
pprNameUnqualified :: Name -> SDoc #
Print the string of Name unqualifiedly directly.
pprNameDefnLoc :: Name -> SDoc #
pprInfixName :: (Outputable a, NamedThing a) => a -> SDoc #
pprDefinedAt :: Name -> SDoc #
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"
nameSrcSpan :: Name -> SrcSpan #
nameSrcLoc :: Name -> SrcLoc #
nameNameSpace :: Name -> NameSpace #
nameModule_maybe :: Name -> Maybe Module #
nameModule :: HasDebugCallStack => Name -> Module #
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 GHC.Runtime.Context
nameIsHomePackageImport :: Module -> Name -> Bool #
nameIsHomePackage :: Module -> Name -> Bool #
nameIsFromExternalPackage :: HomeUnit -> Name -> Bool #
Returns True if the Name comes from some other package: neither this package nor the interactive package.
mkWiredInName :: Module -> OccName -> Unique -> TyThing -> BuiltInSyntax -> Name #
Create a name which is actually defined by the compiler itself
mkSystemVarName :: Unique -> FastString -> Name #
mkSystemName :: Unique -> OccName -> Name #
Create a name brought into being by the compiler
mkSysTvName :: Unique -> FastString -> Name #
mkFCallName :: Unique -> String -> Name #
Make a name for a foreign call
mkExternalName :: Unique -> Module -> OccName -> SrcSpan -> Name #
Create a name which definitely originates in the given module
mkClonedInternalName :: Unique -> Name -> Name #
localiseName :: Name -> Name #
Make the Name
into an internal name, regardless of what it was to begin with
isWiredInName :: Name -> Bool #
isWiredIn :: NamedThing thing => thing -> Bool #
isTyVarName :: Name -> Bool #
isTyConName :: Name -> Bool #
isSystemName :: Name -> Bool #
isInternalName :: Name -> Bool #
isHoleName :: Name -> Bool #
isExternalName :: Name -> Bool #
isDynLinkName :: Platform -> Module -> Name -> Bool #
Will the Name
come from a dynamically linked package?
isDataConName :: Name -> Bool #
isBuiltInSyntax :: Name -> Bool #
getSrcSpan :: NamedThing a => a -> SrcSpan #
getSrcLoc :: NamedThing a => a -> SrcLoc #
getOccString :: NamedThing a => a -> String #
getOccFS :: NamedThing a => a -> FastString #
type TidyOccEnv = UniqFM FastString Int #
Instances
Data a => Data (OccEnv a) | |
Defined in GHC.Types.Name.Occurrence 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) | |
Defined in GHC.Types.Name.Occurrence |
Instances
Binary NameSpace | |
Eq NameSpace | |
Ord NameSpace | |
unitOccSet :: OccName -> OccSet #
unitOccEnv :: OccName -> a -> OccEnv a #
unionOccSets :: OccSet -> OccSet -> OccSet #
unionManyOccSets :: [OccSet] -> OccSet #
tidyOccName :: TidyOccEnv -> OccName -> (TidyOccEnv, OccName) #
startsWithUnderscore :: OccName -> Bool #
Haskell 98 encourages compilers to suppress warnings about unused
names in a pattern if they start with _
: this implements that test
setOccNameSpace :: NameSpace -> OccName -> OccName #
promoteOccName :: OccName -> Maybe OccName #
pprOccName :: OccName -> SDoc #
pprNonVarNameSpace :: NameSpace -> SDoc #
pprNameSpaceBrief :: NameSpace -> SDoc #
pprNameSpace :: NameSpace -> SDoc #
plusOccEnv_C :: (a -> a -> a) -> OccEnv a -> OccEnv a -> OccEnv a #
plusOccEnv :: OccEnv a -> OccEnv a -> OccEnv a #
parenSymOcc :: OccName -> SDoc -> SDoc #
Wrap parens around an operator
occEnvElts :: OccEnv a -> [a] #
nameSpacesRelated :: NameSpace -> NameSpace -> Bool #
mkWorkerOcc :: OccName -> OccName #
mkTyVarOccFS :: FastString -> OccName #
mkTyVarOcc :: String -> OccName #
mkTyConRepOcc :: OccName -> OccName #
mkTcOccFS :: FastString -> OccName #
mkTag2ConOcc :: OccName -> OccName #
mkSuperDictAuxOcc :: Int -> OccName -> OccName #
mkRepEqOcc :: OccName -> OccName #
mkOccNameFS :: NameSpace -> FastString -> OccName #
mkOccEnv_C :: (a -> a -> a) -> [(OccName, a)] -> OccEnv a #
mkNewTyCoOcc :: OccName -> OccName #
mkMethodOcc :: OccName -> OccName #
mkMaxTagOcc :: OccName -> OccName #
mkMatcherOcc :: OccName -> OccName #
Derive a name for the representation type constructor of a
data
/newtype
instance.
mkInstTyCoOcc :: OccName -> OccName #
mkForeignExportOcc :: OccName -> OccName #
mkEqPredCoOcc :: OccName -> OccName #
mkDefaultMethodOcc :: OccName -> OccName #
mkDataTOcc :: OccName -> OccName #
mkDataOccFS :: FastString -> OccName #
mkDataConWrapperOcc :: OccName -> OccName #
mkDataConWorkerOcc :: OccName -> OccName #
mkDataCOcc :: OccName -> OccName #
mkCon2TagOcc :: OccName -> OccName #
mkClsOccFS :: FastString -> OccName #
mkClassOpAuxOcc :: OccName -> OccName #
mkClassDataConOcc :: OccName -> OccName #
mkBuilderOcc :: OccName -> OccName #
minusOccSet :: OccSet -> OccSet -> OccSet #
lookupOccEnv :: OccEnv a -> OccName -> Maybe a #
isVarNameSpace :: NameSpace -> Bool #
Value OccNames
s are those that are either in
the variable or data constructor namespaces
isValNameSpace :: NameSpace -> Bool #
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 GHC.Tc.Instance.Typeable.
isTvNameSpace :: NameSpace -> Bool #
isTcClsNameSpace :: NameSpace -> Bool #
Test if the OccName
is that for any operator (whether
it is a data constructor or variable or whatever)
isEmptyOccSet :: OccSet -> Bool #
isDerivedOccName :: OccName -> Bool #
Test for definitions internally generated by GHC. This predicate is used to suppress printing of internal definitions in some debug prints
isDefaultMethodOcc :: OccName -> Bool #
isDataSymOcc :: OccName -> Bool #
Test if the OccName
is a data constructor that starts with
a symbol (e.g. :
, or []
)
isDataConNameSpace :: NameSpace -> Bool #
intersectOccSet :: OccSet -> OccSet -> OccSet #
initTidyOccEnv :: [OccName] -> TidyOccEnv #
foldOccEnv :: (a -> b -> b) -> b -> OccEnv a -> b #
filterOccEnv :: (elt -> Bool) -> OccEnv elt -> OccEnv elt #
extendOccSetList :: OccSet -> [OccName] -> OccSet #
extendOccSet :: OccSet -> OccName -> OccSet #
extendOccEnv_C :: (a -> a -> a) -> OccEnv a -> OccName -> a -> OccEnv a #
extendOccEnv_Acc :: (a -> b -> b) -> (a -> b) -> OccEnv b -> OccName -> a -> OccEnv b #
extendOccEnvList :: OccEnv a -> [(OccName, a)] -> OccEnv a #
extendOccEnv :: OccEnv a -> OccName -> a -> OccEnv a #
emptyOccSet :: OccSet #
emptyOccEnv :: OccEnv a #
elemOccSet :: OccName -> OccSet -> Bool #
elemOccEnv :: OccName -> OccEnv a -> Bool #
demoteOccName :: OccName -> Maybe OccName #
delTidyOccEnvList :: TidyOccEnv -> [FastString] -> TidyOccEnv #
delListFromOccEnv :: OccEnv a -> [OccName] -> OccEnv a #
delFromOccEnv :: OccEnv a -> OccName -> OccEnv a #
avoidClashesOccEnv :: TidyOccEnv -> [OccName] -> TidyOccEnv #
type TyVarBinder = VarBndr TyVar ArgFlag #
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 GHC.Core.TyCo.Rep, because it's used in GHC.Core.DataCon.hs-boot
A TyVarBinder
is a binder with only TyVar
tyVarSpecToBinders :: [VarBndr a Specificity] -> [VarBndr a ArgFlag] #
mkTyVarBinders :: vis -> [TyVar] -> [VarBndr TyVar vis] #
Make many named binders Input vars should be type variables
mkTyVarBinder :: vis -> TyVar -> VarBndr TyVar vis #
Make a named binder
var
should be a type variable
mkTyCoVarBinders :: vis -> [TyCoVar] -> [VarBndr TyCoVar vis] #
Make many named binders
mkTyCoVarBinder :: vis -> TyCoVar -> VarBndr TyCoVar vis #
Make a named binder
isVisibleArgFlag :: ArgFlag -> Bool #
Does this ArgFlag
classify an argument that is written in Haskell?
Is this a type-level (i.e., computationally irrelevant, thus erasable)
variable? Satisfies isTyVar = not . isId
.
isInvisibleArgFlag :: ArgFlag -> Bool #
Does this ArgFlag
classify an argument that is not written in Haskell?
Is this a value-level (i.e., computationally relevant) Var
entifier?
Satisfies isId = not . isTyVar
.
isGlobalId :: Var -> Bool #
isExportedId :: Var -> Bool #
isExportedIdVar
means "don't throw this away"
idInfo :: HasDebugCallStack => Id -> IdInfo #
globaliseId :: Id -> Id #
If it's a local, make it global
binderVars :: [VarBndr tv argf] -> [tv] #
binderType :: VarBndr TyCoVar argf -> Type #
binderArgFlag :: VarBndr tv argf -> argf #
vecElemTyCon :: TyCon #
vecCountTyCon :: TyCon #
vec8DataConTy :: Type #
vec64DataConTy :: Type #
vec4DataConTy :: Type #
vec32DataConTy :: Type #
vec2DataConTy :: Type #
vec16DataConTy :: Type #
unliftedTypeKindTyCon :: TyCon #
type UnliftedType = TYPE ('BoxedRep 'Unlifted)
type UnliftedRep = 'BoxedRep 'Unlifted
unliftedRepTy :: Type #
unboxedTupleKind :: [Type] -> Kind #
Specialization of unboxedTupleSumKind
for tuples
typeSymbolKind :: Kind #
tupleTyConName :: TupleSort -> Arity -> Name #
tupleTyCon :: Boxity -> Arity -> TyCon #
tupleDataCon :: Boxity -> Arity -> DataCon #
sumDataCon :: ConTag -> Arity -> DataCon #
Data constructor for i-th alternative of a n-ary unboxed sum.
runtimeRepTy :: Type #
promotedTupleDataCon :: Boxity -> Arity -> TyCon #
oneDataConTy :: Type #
multiplicityTy :: Type #
multMulTyCon :: TyCon #
Make a *promoted* list.
mkBoxedTupleTy :: [Type] -> Type #
Build the type of a small tuple that holds the specified type of thing Flattens 1-tuples. See Note [One-tuples].
manyDataConTy :: Type #
liftedTypeKind :: Kind #
liftedRepTyCon :: TyCon #
type LiftedRep = 'BoxedRep 'Lifted
liftedRepTy :: Type #
liftedDataConTy :: Type #
levityTyCon :: TyCon #
intRepDataConTy :: Type #
constraintKind :: Kind #
coercibleTyCon :: TyCon #
cTupleTyConName :: Arity -> Name #
cTupleSelIdName :: ConTag -> Arity -> Name #
cTupleDataConName :: Arity -> Name #
cTupleDataCon :: Arity -> DataCon #
anyTypeOfKind :: Kind -> Type #
tyConAppTyCon_maybe :: Type -> Maybe TyCon #
The same as fst . splitTyConApp
Given a RuntimeRep
, applies TYPE
to it.
See Note [TYPE and RuntimeRep] in GHC.Builtin.Types.Prim.
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
piResultTy :: HasDebugCallStack => Type -> Type -> Type #
Create the plain type constructor type which has been applied to no type arguments at all.
mkTyConApp :: TyCon -> [Type] -> Type #
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 GHC.Core.TyCo.Rep
isRuntimeRepTy :: Type -> Bool #
Is this the type RuntimeRep
?
isPredTy :: HasDebugCallStack => Type -> Bool #
isMultiplicityTy :: Type -> Bool #
Is this the type Multiplicity
?
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]
isCoercionTy :: Type -> Bool #
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
.
By being non-recursive and inlined, this case analysis gets efficiently joined onto the case analysis that the caller is already doing
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
.
Constructors
PhantomProv KindCoercion | See Note [Phantom coercions]. Only in Phantom roled coercions |
ProofIrrelProv KindCoercion | From the fact that any two coercions are considered equivalent. See Note [ProofIrrelProv]. Can be used in Nominal or Representational coercions |
PluginProv String | From a plugin, which asserts that this coercion is sound. The string is for the use of the plugin. |
CorePrepProv Bool |
Instances
Data UnivCoProvenance | |
Defined in GHC.Core.TyCo.Rep 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 GHC.Core.TyCo.Rep Methods ppr :: UnivCoProvenance -> SDoc # |
Constructors
TyVarTy Var | Vanilla type or kind variable (*never* a coercion variable) |
AppTy Type Type | Type application to something other than a 1) Function: must not be a 2) Argument type |
TyConApp TyCon [KindOrType] | Application of a 1) Type constructor being applied to. 2) Type arguments. Might not have enough type arguments here to saturate the constructor. Even type synonyms are not necessarily saturated; for example unsaturated type synonyms can appear as the right hand side of a type synonym. |
ForAllTy !TyCoVarBinder Type | A Π type. INVARIANT: If the binder is a coercion variable, it must be mentioned in the Type. See Note [Unused coercion variable in ForAllTy] |
FunTy | FUN m t1 t2 Very common, so an important special case See Note [Function types] |
LitTy TyLit | Type literals are similar to type constructors. |
CastTy Type KindCoercion | A kind cast. The coercion is always nominal. INVARIANT: The cast is never reflexive (EQ2) INVARIANT: The Type is not a CastTy (use TransCo instead) (EQ3) INVARIANT: The Type is not a ForAllTy over a tyvar (EQ4) See Note [Respecting definitional equality] |
CoercionTy Coercion | Injection of a Coercion into a type This should only ever be used in the RHS of an AppTy, in the list of a TyConApp, when applying a promoted GADT data constructor |
Instances
Data Type | |
Defined in GHC.Core.TyCo.Rep 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 | |
Defined in GHC.Core.TyCo.Rep |
Instances
Data TyLit | |
Defined in GHC.Core.TyCo.Rep Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TyLit -> c TyLit # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TyLit # dataTypeOf :: TyLit -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TyLit) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TyLit) # gmapT :: (forall b. Data b => b -> b) -> TyLit -> TyLit # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TyLit -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TyLit -> r # gmapQ :: (forall d. Data d => d -> u) -> TyLit -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> TyLit -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> TyLit -> m TyLit # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TyLit -> m TyLit # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TyLit -> m TyLit # | |
Outputable TyLit | |
Defined in GHC.Core.TyCo.Rep | |
Eq TyLit | |
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]
Constructors
Named TyCoVarBinder | |
Anon AnonArgFlag (Scaled Type) |
Instances
Data TyCoBinder | |
Defined in GHC.Core.TyCo.Rep 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 GHC.Core.TyCo.Rep Methods ppr :: TyCoBinder -> SDoc # |
A shorthand for data with an attached Mult
element (the multiplicity).
Instances
Data a => Data (Scaled a) | |
Defined in GHC.Core.TyCo.Rep Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Scaled a -> c (Scaled a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Scaled a) # toConstr :: Scaled a -> Constr # dataTypeOf :: Scaled a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Scaled a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Scaled a)) # gmapT :: (forall b. Data b => b -> b) -> Scaled a -> Scaled a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Scaled a -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Scaled a -> r # gmapQ :: (forall d. Data d => d -> u) -> Scaled a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Scaled a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Scaled a -> m (Scaled a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Scaled a -> m (Scaled a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Scaled a -> m (Scaled a) # | |
Outputable a => Outputable (Scaled a) | |
Defined in GHC.Core.TyCo.Rep |
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"
Mult is a type alias for Type.
Mult must contain Type because multiplicity variables are mere type variables (of kind Multiplicity) in Haskell. So the simplest implementation is to make Mult be Type.
Multiplicities can be formed with: - One: GHC.Types.One (= oneDataCon) - Many: GHC.Types.Many (= manyDataCon) - Multiplication: GHC.Types.MultMul (= multMulTyCon)
So that Mult feels a bit more structured, we provide pattern synonyms and smart constructors for these.
type MCoercionN = MCoercion #
A semantically more meaningful type to represent what may or may not be a
useful Coercion
.
Instances
Data MCoercion | |
Defined in GHC.Core.TyCo.Rep 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 | |
Defined in GHC.Core.TyCo.Rep |
A Coercion
is concrete evidence of the equality/convertibility
of two types.
Constructors
Refl Type | |
GRefl Role Type MCoercionN | |
TyConAppCo Role TyCon [Coercion] | |
AppCo Coercion CoercionN | |
ForAllCo TyCoVar KindCoercion Coercion | |
FunCo Role CoercionN Coercion Coercion | |
CoVarCo CoVar | |
AxiomInstCo (CoAxiom Branched) BranchIndex [Coercion] | |
AxiomRuleCo CoAxiomRule [Coercion] | |
UnivCo UnivCoProvenance Role Type Type | |
SymCo Coercion | |
TransCo Coercion Coercion | |
NthCo Role Int Coercion | |
LRCo LeftOrRight CoercionN | |
InstCo Coercion CoercionN | |
KindCo Coercion | |
SubCo CoercionN | |
HoleCo CoercionHole | See Note [Coercion holes] Only present during typechecking |
Instances
Data Coercion | |
Defined in GHC.Core.TyCo.Rep 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 | |
Defined in GHC.Core.TyCo.Rep |
mkTyConTy_ :: TyCon -> Type #
mkFunTyMany :: AnonArgFlag -> Type -> Type -> Type #
mkForAllTy :: TyCoVar -> ArgFlag -> Type -> Type #
Like mkTyCoForAllTy
, but does not check the occurrence of the binder
See Note [Unused coercion variable in ForAllTy]
type TyConRepName = Name #
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
Data TyCon | |
Defined in GHC.Core.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 | |
Defined in GHC.Core.TyCon | |
Uniquable TyCon | |
Defined in GHC.Core.TyCon | |
Outputable TyCon | |
Defined in GHC.Core.TyCon | |
Eq TyCon | |
mkPrelTyConRepName :: Name -> TyConRepName #
Make a Name
for the Typeable
representation of the given wired-in type
isUnboxedTupleTyCon :: TyCon -> Bool #
Is this the TyCon
for an unboxed tuple?
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.
isFunTyCon :: TyCon -> Bool #
Instances
Foldable Bag | |
Defined in GHC.Data.Bag Methods fold :: Monoid m => Bag m -> m # foldMap :: Monoid m => (a -> m) -> Bag a -> m # foldMap' :: Monoid m => (a -> m) -> Bag a -> m # foldr :: (a -> b -> b) -> b -> Bag a -> b # foldr' :: (a -> b -> b) -> b -> Bag a -> b # foldl :: (b -> a -> b) -> b -> Bag a -> b # foldl' :: (b -> a -> b) -> b -> Bag a -> b # foldr1 :: (a -> a -> a) -> Bag a -> a # foldl1 :: (a -> a -> a) -> Bag a -> a # elem :: Eq a => a -> Bag a -> Bool # maximum :: Ord a => Bag a -> a # | |
Traversable Bag | |
Functor Bag | |
Data a => Data (Bag a) | |
Defined in GHC.Data.Bag Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Bag a -> c (Bag a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Bag a) # dataTypeOf :: Bag a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Bag a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Bag a)) # gmapT :: (forall b. Data b => b -> b) -> Bag a -> Bag a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Bag a -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Bag a -> r # gmapQ :: (forall d. Data d => d -> u) -> Bag a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Bag a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Bag a -> m (Bag a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Bag a -> m (Bag a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Bag a -> m (Bag a) # | |
IsList (Bag a) | |
Outputable a => Outputable (Bag a) | |
Defined in GHC.Data.Bag | |
type Item (Bag a) | |
Defined in GHC.Data.Bag |
unionManyBags :: [Bag a] -> Bag a #
nonEmptyToBag :: NonEmpty a -> Bag a #
mapMaybeBag :: (a -> Maybe b) -> Bag a -> Bag b #
isSingletonBag :: Bag a -> Bool #
isEmptyBag :: Bag a -> Bool #
concatMapBag :: (a -> Bag b) -> Bag a -> Bag b #
catBagMaybes :: Bag (Maybe a) -> Bag a #
data TcTyVarDetails #
Constructors
SkolemTv TcLevel Bool | |
RuntimeUnk | |
MetaTv | |
Instances
Outputable TcTyVarDetails | |
Defined in GHC.Tc.Utils.TcType Methods ppr :: TcTyVarDetails -> SDoc # |
data MetaDetails #
Instances
Outputable MetaDetails | |
Defined in GHC.Tc.Utils.TcType Methods ppr :: MetaDetails -> SDoc # |
pprTcTyVarDetails :: TcTyVarDetails -> SDoc #
isTyConableTyVar :: TcTyVar -> Bool #
isMetaTyVar :: TcTyVar -> Bool #
data TypeOrKind #
Flag to see whether we're type-checking terms or kind-checking types
Instances
Outputable TypeOrKind | |
Defined in GHC.Types.Basic Methods ppr :: TypeOrKind -> SDoc # | |
Eq TypeOrKind | |
Defined in GHC.Types.Basic |
Constructors
BoxedTuple | |
UnboxedTuple | |
ConstraintTuple |
Instances
Data TupleSort | |
Defined in GHC.Types.Basic 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 # | |
Binary TupleSort | |
Outputable TupleSort | |
Defined in GHC.Types.Basic | |
Eq TupleSort | |
data TopLevelFlag #
Constructors
TopLevel | |
NotTopLevel |
Instances
Data TopLevelFlag | |
Defined in GHC.Types.Basic Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TopLevelFlag -> c TopLevelFlag # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TopLevelFlag # toConstr :: TopLevelFlag -> Constr # dataTypeOf :: TopLevelFlag -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TopLevelFlag) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TopLevelFlag) # gmapT :: (forall b. Data b => b -> b) -> TopLevelFlag -> TopLevelFlag # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TopLevelFlag -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TopLevelFlag -> r # gmapQ :: (forall d. Data d => d -> u) -> TopLevelFlag -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> TopLevelFlag -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> TopLevelFlag -> m TopLevelFlag # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TopLevelFlag -> m TopLevelFlag # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TopLevelFlag -> m TopLevelFlag # | |
Outputable TopLevelFlag | |
Defined in GHC.Types.Basic Methods ppr :: TopLevelFlag -> SDoc # |
data TailCallInfo #
Constructors
AlwaysTailCalled JoinArity | |
NoTailCallInfo |
Instances
Outputable TailCallInfo | |
Defined in GHC.Types.Basic Methods ppr :: TailCallInfo -> SDoc # | |
Eq TailCallInfo | |
Defined in GHC.Types.Basic |
Constructors
NotSwapped | |
IsSwapped |
Instances
Outputable SwapFlag | |
Defined in GHC.Types.Basic |
data SuccessFlag #
Instances
Outputable SuccessFlag | |
Defined in GHC.Types.Basic Methods ppr :: SuccessFlag -> SDoc # |
data SpliceExplicitFlag #
Constructors
ExplicitSplice | = $(f x y) |
ImplicitSplice | = f x y, i.e. a naked top level expression |
Instances
Data SpliceExplicitFlag | |
Defined in GHC.Types.Basic 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 # |
type RuleName = FastString #
data RuleMatchInfo #
Rule Match Information
Instances
Representation Arity
The number of represented arguments that can be applied to a value before it does "real work". So: fib 100 has representation arity 0 x -> fib x has representation arity 1 (# x, y #) -> fib (x + y) has representation arity 2
Recursivity Flag
Constructors
Recursive | |
NonRecursive |
Instances
Data RecFlag | |
Defined in GHC.Types.Basic 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 # | |
Binary RecFlag | |
Outputable RecFlag | |
Defined in GHC.Types.Basic | |
Eq RecFlag | |
data PromotionFlag #
Is a TyCon a promoted data constructor or just a normal type constructor?
Constructors
NotPromoted | |
IsPromoted |
Instances
Data PromotionFlag | |
Defined in GHC.Types.Basic 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 # | |
Binary PromotionFlag | |
Defined in GHC.Types.Basic Methods put_ :: BinHandle -> PromotionFlag -> IO () # put :: BinHandle -> PromotionFlag -> IO (Bin PromotionFlag) # get :: BinHandle -> IO PromotionFlag # | |
Outputable PromotionFlag | |
Defined in GHC.Types.Basic Methods ppr :: PromotionFlag -> SDoc # | |
Eq PromotionFlag | |
Defined in GHC.Types.Basic Methods (==) :: PromotionFlag -> PromotionFlag -> Bool # (/=) :: PromotionFlag -> PromotionFlag -> Bool # |
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 {-# OVERLAPPABLE #-} 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 {-# OVERLAPPING #-} 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 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
Data OverlapMode | |
Defined in GHC.Types.Basic 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 # | |
Binary OverlapMode | |
Defined in GHC.Types.Basic Methods put_ :: BinHandle -> OverlapMode -> IO () # put :: BinHandle -> OverlapMode -> IO (Bin OverlapMode) # get :: BinHandle -> IO OverlapMode # | |
Outputable OverlapMode | |
Defined in GHC.Types.Basic Methods ppr :: OverlapMode -> SDoc # | |
Eq OverlapMode | |
Defined in GHC.Types.Basic | |
type Anno OverlapMode | |
Defined in GHC.Hs.Decls | |
type Anno OverlapMode | |
Defined in GHC.Hs.Decls |
data OverlapFlag #
The semantics allowed for overlapping instances for a particular
instance. See Note [Safe Haskell isSafeOverlap] (in GHC.Core.InstEnv) for a
explanation of the isSafeOverlap
field.
AnnKeywordId
:AnnOpen
'{-# OVERLAPPABLE'
or'{-# OVERLAPPING'
or'{-# OVERLAPS'
or'{-# INCOHERENT'
,AnnClose
`#-}`
,
Constructors
OverlapFlag | |
Fields |
Instances
Data OverlapFlag | |
Defined in GHC.Types.Basic 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 # | |
Binary OverlapFlag | |
Defined in GHC.Types.Basic Methods put_ :: BinHandle -> OverlapFlag -> IO () # put :: BinHandle -> OverlapFlag -> IO (Bin OverlapFlag) # get :: BinHandle -> IO OverlapFlag # | |
Outputable OverlapFlag | |
Defined in GHC.Types.Basic Methods ppr :: OverlapFlag -> SDoc # | |
Eq OverlapFlag | |
Defined in GHC.Types.Basic |
Constructors
FromSource | |
Generated |
Instances
Data Origin | |
Defined in GHC.Types.Basic 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 | |
Defined in GHC.Types.Basic | |
Eq Origin | |
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.
See also Note [OneShotInfo overview] above.
Constructors
NoOneShotInfo | No information |
OneShotLam | The lambda is applied at most once. |
Instances
Outputable OneShotInfo | |
Defined in GHC.Types.Basic Methods ppr :: OneShotInfo -> SDoc # | |
Eq OneShotInfo | |
Defined in GHC.Types.Basic |
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
|
data LeftOrRight #
Instances
Data LeftOrRight | |
Defined in GHC.Types.Basic 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 # | |
Binary LeftOrRight | |
Defined in GHC.Types.Basic Methods put_ :: BinHandle -> LeftOrRight -> IO () # put :: BinHandle -> LeftOrRight -> IO (Bin LeftOrRight) # get :: BinHandle -> IO LeftOrRight # | |
Outputable LeftOrRight | |
Defined in GHC.Types.Basic Methods ppr :: LeftOrRight -> SDoc # | |
Eq LeftOrRight | |
Defined in GHC.Types.Basic |
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.
data InterestingCxt #
Interesting Context
Constructors
IsInteresting | Function: is applied Data value: scrutinised by a case with at least one non-DEFAULT branch |
NotInteresting |
Instances
Monoid InterestingCxt | |
Defined in GHC.Types.Basic Methods mappend :: InterestingCxt -> InterestingCxt -> InterestingCxt # mconcat :: [InterestingCxt] -> InterestingCxt # | |
Semigroup InterestingCxt | If there is any |
Defined in GHC.Types.Basic Methods (<>) :: InterestingCxt -> InterestingCxt -> InterestingCxt # sconcat :: NonEmpty InterestingCxt -> InterestingCxt # stimes :: Integral b => b -> InterestingCxt -> InterestingCxt # | |
Eq InterestingCxt | |
Defined in GHC.Types.Basic Methods (==) :: InterestingCxt -> InterestingCxt -> Bool # (/=) :: InterestingCxt -> InterestingCxt -> Bool # |
data IntWithInf #
An integer or infinity
Instances
Num IntWithInf | |
Defined in GHC.Types.Basic Methods (+) :: IntWithInf -> IntWithInf -> IntWithInf # (-) :: IntWithInf -> IntWithInf -> IntWithInf # (*) :: IntWithInf -> IntWithInf -> IntWithInf # negate :: IntWithInf -> IntWithInf # abs :: IntWithInf -> IntWithInf # signum :: IntWithInf -> IntWithInf # fromInteger :: Integer -> IntWithInf # | |
Outputable IntWithInf | |
Defined in GHC.Types.Basic Methods ppr :: IntWithInf -> SDoc # | |
Eq IntWithInf | |
Defined in GHC.Types.Basic | |
Ord IntWithInf | |
Defined in GHC.Types.Basic 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 # |
Inside Lambda
Constructors
IsInsideLam | Occurs inside a non-linear lambda Substituting a redex for this occurrence is dangerous because it might duplicate work. |
NotInsideLam |
data InlineSpec #
Inline Specification
Constructors
Inline | |
Inlinable | |
NoInline | |
NoUserInlinePrag |
Instances
Data InlineSpec | |
Defined in GHC.Types.Basic 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 GHC.Types.Basic Methods showsPrec :: Int -> InlineSpec -> ShowS # show :: InlineSpec -> String # showList :: [InlineSpec] -> ShowS # | |
Binary InlineSpec | |
Defined in GHC.Types.Basic Methods put_ :: BinHandle -> InlineSpec -> IO () # put :: BinHandle -> InlineSpec -> IO (Bin InlineSpec) # get :: BinHandle -> IO InlineSpec # | |
Outputable InlineSpec | |
Defined in GHC.Types.Basic Methods ppr :: InlineSpec -> SDoc # | |
Eq InlineSpec | |
Defined in GHC.Types.Basic |
data InlinePragma #
Constructors
InlinePragma | |
Fields
|
Instances
Data InlinePragma | |
Defined in GHC.Types.Basic 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 # | |
Binary InlinePragma | |
Defined in GHC.Types.Basic Methods put_ :: BinHandle -> InlinePragma -> IO () # put :: BinHandle -> InlinePragma -> IO (Bin InlinePragma) # get :: BinHandle -> IO InlinePragma # | |
Outputable InlinePragma | |
Defined in GHC.Types.Basic Methods ppr :: InlinePragma -> SDoc # | |
Eq InlinePragma | |
Defined in GHC.Types.Basic |
data FunctionOrData #
Constructors
IsFunction | |
IsData |
Instances
type FullArgCount = Int #
FullArgCount is the number of type or value arguments in an application, or the number of type or value binders in a lambda. Note: it includes both type and value arguments!
data DefMethSpec ty #
Default Method Specification
Instances
Binary (DefMethSpec IfaceType) | |
Defined in GHC.Iface.Type | |
Outputable (DefMethSpec ty) | |
Defined in GHC.Types.Basic Methods ppr :: DefMethSpec ty -> SDoc # |
A *one-index* constructor tag
Type of the tags associated with each constructor possibility or superclass selector
data CompilerPhase #
Constructors
InitialPhase | |
Phase PhaseNum | |
FinalPhase |
Instances
Outputable CompilerPhase | |
Defined in GHC.Types.Basic Methods ppr :: CompilerPhase -> SDoc # | |
Eq CompilerPhase | |
Defined in GHC.Types.Basic Methods (==) :: CompilerPhase -> CompilerPhase -> Bool # (/=) :: CompilerPhase -> CompilerPhase -> Bool # |
type BranchCount = Int #
Instances
Data Boxity | |
Defined in GHC.Types.Basic 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 | |
Defined in GHC.Types.Basic | |
Eq Boxity | |
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 GHC.Core.Opt.Arity
A power-of-two alignment
Instances
Outputable Alignment | |
Defined in GHC.Types.Basic | |
Eq Alignment | |
Ord Alignment | |
OutputableP env Alignment | |
Defined in GHC.Types.Basic |
data Activation #
Constructors
AlwaysActive | |
ActiveBefore SourceText PhaseNum | |
ActiveAfter SourceText PhaseNum | |
FinalActive | |
NeverActive |
Instances
Data Activation | |
Defined in GHC.Types.Basic 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 # | |
Binary Activation | |
Defined in GHC.Types.Basic Methods put_ :: BinHandle -> Activation -> IO () # put :: BinHandle -> Activation -> IO (Bin Activation) # get :: BinHandle -> IO Activation # | |
Outputable Activation | |
Defined in GHC.Types.Basic Methods ppr :: Activation -> SDoc # | |
Eq Activation | |
Defined in GHC.Types.Basic |
zapOccTailCallInfo :: OccInfo -> OccInfo #
zapFragileOcc :: OccInfo -> OccInfo #
worstOneShot :: OneShotInfo -> OneShotInfo -> OneShotInfo #
tupleSortBoxity :: TupleSort -> Boxity #
tupleParens :: TupleSort -> SDoc -> SDoc #
treatZeroAsInf :: Int -> IntWithInf #
Turn a positive number into an IntWithInf
, where 0 represents infinity
tailCallInfo :: OccInfo -> TailCallInfo #
successIf :: Bool -> SuccessFlag #
succeeded :: SuccessFlag -> Bool #
seqOccInfo :: OccInfo -> () #
pprRuleName :: RuleName -> SDoc #
pprInlineDebug :: InlinePragma -> SDoc #
pprInline :: InlinePragma -> SDoc #
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 | |".
pickLR :: LeftOrRight -> (a, a) -> a #
noUserInlineSpec :: InlineSpec -> Bool #
noOneShotInfo :: OneShotInfo #
It is always safe to assume that an Id
has no lambda-bound variable information
mkIntWithInf :: Int -> IntWithInf #
Inject any integer into an IntWithInf
mkAlignment :: Int -> Alignment #
isWeakLoopBreaker :: OccInfo -> Bool #
isTypeLevel :: TypeOrKind -> Bool #
isTopLevel :: TopLevelFlag -> Bool #
isStrongLoopBreaker :: OccInfo -> Bool #
isPromoted :: PromotionFlag -> Bool #
isOneShotInfo :: OneShotInfo -> Bool #
isNotTopLevel :: TopLevelFlag -> Bool #
isNoOccInfo :: OccInfo -> Bool #
isNeverActive :: Activation -> Bool #
isManyOccs :: OccInfo -> Bool #
isKindLevel :: TypeOrKind -> Bool #
isInlinePragma :: InlinePragma -> Bool #
isInlinablePragma :: InlinePragma -> Bool #
isGenerated :: Origin -> Bool #
isFunLike :: RuleMatchInfo -> Bool #
isConLike :: RuleMatchInfo -> Bool #
isAnyInlinePragma :: InlinePragma -> Bool #
isAlwaysTailCalled :: OccInfo -> Bool #
isAlwaysActive :: Activation -> Bool #
isActive :: CompilerPhase -> Activation -> Bool #
intGtLimit :: Int -> IntWithInf -> Bool #
inlinePragmaSat :: InlinePragma -> Maybe Arity #
infinity :: IntWithInf #
A representation of infinity
hasOverlappingFlag :: OverlapMode -> Bool #
hasOverlappableFlag :: OverlapMode -> Bool #
hasNoOneShotInfo :: OneShotInfo -> Bool #
hasIncoherentFlag :: OverlapMode -> Bool #
failed :: SuccessFlag -> Bool #
competesWith :: Activation -> Activation -> Bool #
boxityTupleSort :: Boxity -> TupleSort #
boolToRecFlag :: Bool -> RecFlag #
bestOneShot :: OneShotInfo -> OneShotInfo -> OneShotInfo #
alignmentOf :: Int -> Alignment #
activeInFinalPhase :: Activation -> Bool #
Variable
Essentially a typed Name
, that may also contain some additional information
about the Var
and its use sites.
Instances
Data Var | |
Defined in GHC.Types.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 # | |
NamedThing Var | |
Defined in GHC.Types.Var | |
HasOccName Var | |
Defined in GHC.Types.Var | |
Uniquable Var | |
Defined in GHC.Types.Var | |
Outputable Var | |
Defined in GHC.Types.Var | |
Eq Var | |
Ord Var | |
type Anno Id | |
Defined in GHC.Hs.Extension | |
type Anno (LocatedN Id) | |
Defined in GHC.Hs.Binds | |
type Anno [LocatedN Id] | |
Defined in GHC.Hs.Binds |
data Specificity #
Whether an Invisible
argument may appear in source Haskell.
Constructors
InferredSpec | the argument may not appear in source Haskell, it is only inferred. |
SpecifiedSpec | the argument may appear in source Haskell, but isn't required. |
Instances
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 GHC.Core.TyCo.Rep
Constructors
Invisible Specificity | |
Required |
Instances
Data ArgFlag | |
Defined in GHC.Types.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 # | |
Binary ArgFlag | |
Outputable ArgFlag | |
Defined in GHC.Types.Var | |
Eq ArgFlag | |
Ord ArgFlag | |
Outputable tv => Outputable (VarBndr tv ArgFlag) | |
data AnonArgFlag #
The non-dependent version of ArgFlag
.
See Note [AnonArgFlag]
Appears here partly so that it's together with its friends ArgFlag
and ForallVisFlag, but also because it is used in IfaceType, rather
early in the compilation chain
Constructors
VisArg | Used for |
InvisArg | Used for |
Instances
stableModuleNameCmp :: ModuleName -> ModuleName -> Ordering #
Compares module names lexically, rather than by their Unique
s
pprModuleName :: ModuleName -> SDoc #
moduleNameString :: ModuleName -> String #
moduleNameSlashes :: ModuleName -> String #
Returns the string version of the module name, with dots replaced by slashes.
moduleNameFS :: ModuleName -> FastString #
moduleNameColons :: ModuleName -> String #
Returns the string version of the module name, with dots replaced by colons.
mkModuleNameFS :: FastString -> ModuleName #
mkModuleName :: String -> ModuleName #
class NamedThing a where #
A class allowing convenient access to the Name
of various datatypes
Minimal complete definition
Instances
NamedThing Class | |
Defined in GHC.Core.Class | |
NamedThing ConLike | |
Defined in GHC.Core.ConLike | |
NamedThing DataCon | |
Defined in GHC.Core.DataCon | |
NamedThing FamInst | |
Defined in GHC.Core.FamInstEnv | |
NamedThing ClsInst | |
Defined in GHC.Core.InstEnv | |
NamedThing PatSyn | |
Defined in GHC.Core.PatSyn | |
NamedThing TyCon | |
Defined in GHC.Core.TyCon | |
NamedThing IfaceClassOp | |
Defined in GHC.Iface.Syntax | |
NamedThing IfaceConDecl | |
Defined in GHC.Iface.Syntax | |
NamedThing IfaceDecl | |
Defined in GHC.Iface.Syntax | |
NamedThing HoleFitCandidate | |
Defined in GHC.Tc.Errors.Hole.FitTypes | |
NamedThing Name | |
Defined in GHC.Types.Name | |
NamedThing TyThing | |
Defined in GHC.Types.TyThing | |
NamedThing Var | |
Defined in GHC.Types.Var | |
NamedThing (CoAxiom br) | |
Defined in GHC.Core.Coercion.Axiom | |
NamedThing e => NamedThing (Located e) | |
Defined in GHC.Types.Name | |
NamedThing (Located a) => NamedThing (LocatedAn an a) | |
Defined in GHC.Parser.Annotation | |
NamedThing tv => NamedThing (VarBndr tv flag) | |
Defined in GHC.Types.Var |
A unique, unambiguous name for something, containing information about where that thing originated.
Instances
Data Name | |
Defined in GHC.Types.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 # | |
NFData Name | |
Defined in GHC.Types.Name | |
NamedThing Name | |
Defined in GHC.Types.Name | |
HasOccName Name | |
Defined in GHC.Types.Name | |
Uniquable Name | |
Defined in GHC.Types.Name | |
Binary Name | Assumes that the |
Outputable Name | |
Defined in GHC.Types.Name | |
OutputableBndr Name | |
Defined in GHC.Types.Name Methods pprBndr :: BindingSite -> Name -> SDoc # pprPrefixOcc :: Name -> SDoc # pprInfixOcc :: Name -> SDoc # bndrIsJoin_maybe :: Name -> Maybe Int # | |
Eq Name | |
Ord Name | Caution: This instance is implemented via See |
type Anno Name | |
Defined in GHC.Hs.Extension | |
type Anno (LocatedN Name) | |
Defined in GHC.Hs.Binds | |
type Anno [LocatedN Name] | |
Defined in GHC.Hs.Binds |
tidyNameOcc :: Name -> OccName -> Name #
setNameUnique :: Name -> Unique -> Name #
nameUnique :: Name -> Unique #
nameOccName :: Name -> OccName #
data UnhelpfulSpanReason #
Constructors
UnhelpfulNoLocationInfo | |
UnhelpfulWiredIn | |
UnhelpfulInteractive | |
UnhelpfulGenerated | |
UnhelpfulOther !FastString |
Instances
Show UnhelpfulSpanReason | |
Defined in GHC.Types.SrcLoc Methods showsPrec :: Int -> UnhelpfulSpanReason -> ShowS # show :: UnhelpfulSpanReason -> String # showList :: [UnhelpfulSpanReason] -> ShowS # | |
Outputable UnhelpfulSpanReason | |
Defined in GHC.Types.SrcLoc Methods ppr :: UnhelpfulSpanReason -> SDoc # | |
Eq UnhelpfulSpanReason | |
Defined in GHC.Types.SrcLoc Methods (==) :: UnhelpfulSpanReason -> UnhelpfulSpanReason -> Bool # (/=) :: UnhelpfulSpanReason -> UnhelpfulSpanReason -> Bool # |
Source Span
A SrcSpan
identifies either a specific portion of a text file
or a human-readable description of a location.
Constructors
RealSrcSpan !RealSrcSpan !(Maybe BufSpan) | |
UnhelpfulSpan !UnhelpfulSpanReason |
Instances
Data SrcSpan | |
Defined in GHC.Types.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 # | |
Show SrcSpan | |
NFData SrcSpan | |
Defined in GHC.Types.SrcLoc | |
ToJson SrcSpan | |
Defined in GHC.Types.SrcLoc | |
Outputable SrcSpan | |
Defined in GHC.Types.SrcLoc | |
Eq SrcSpan | |
NamedThing e => NamedThing (Located e) | |
Defined in GHC.Types.Name | |
Outputable e => Outputable (Located e) | |
Defined in GHC.Types.SrcLoc | |
OutputableBndr (GenLocated SrcSpan (FieldOcc pass)) | |
Defined in Language.Haskell.Syntax.Type Methods pprBndr :: BindingSite -> GenLocated SrcSpan (FieldOcc pass) -> SDoc # pprPrefixOcc :: GenLocated SrcSpan (FieldOcc pass) -> SDoc # pprInfixOcc :: GenLocated SrcSpan (FieldOcc pass) -> SDoc # bndrIsJoin_maybe :: GenLocated SrcSpan (FieldOcc pass) -> Maybe Int # |
Source Location
Constructors
RealSrcLoc !RealSrcLoc !(Maybe BufPos) | |
UnhelpfulLoc FastString |
Instances
Show SrcLoc | |
Outputable SrcLoc | |
Defined in GHC.Types.SrcLoc | |
Eq SrcLoc | |
data RealSrcSpan #
A SrcSpan
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
data RealSrcLoc #
Real Source Location
Represents a single point within a file
Instances
Show RealSrcLoc | |
Defined in GHC.Types.SrcLoc Methods showsPrec :: Int -> RealSrcLoc -> ShowS # show :: RealSrcLoc -> String # showList :: [RealSrcLoc] -> ShowS # | |
Outputable RealSrcLoc | |
Defined in GHC.Types.SrcLoc Methods ppr :: RealSrcLoc -> SDoc # | |
Eq RealSrcLoc | |
Defined in GHC.Types.SrcLoc | |
Ord RealSrcLoc | |
Defined in GHC.Types.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 # |
type RealLocated = GenLocated RealSrcSpan #
Constructors
PsSpan | |
Fields
|
type PsLocated = GenLocated PsSpan #
A location as produced by the parser. Consists of two components:
- The location in the file, adjusted for #line and {-# LINE ... #-} pragmas (RealSrcLoc)
- The location in the string buffer (BufPos) with monotonicity guarantees (see #17632)
Constructors
PsLoc | |
Fields
|
type Located = GenLocated SrcSpan #
data LayoutInfo #
Layout information for declarations.
Constructors
ExplicitBraces | Explicit braces written by the user. class C a where { foo :: a; bar :: a } |
VirtualBraces | Virtual braces inserted by the layout algorithm. class C a where foo :: a bar :: a |
Fields
| |
NoLayoutInfo | Empty or compiler-generated blocks do not have layout information associated with them. |
Instances
Data LayoutInfo | |
Defined in GHC.Types.SrcLoc Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> LayoutInfo -> c LayoutInfo # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c LayoutInfo # toConstr :: LayoutInfo -> Constr # dataTypeOf :: LayoutInfo -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c LayoutInfo) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c LayoutInfo) # gmapT :: (forall b. Data b => b -> b) -> LayoutInfo -> LayoutInfo # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LayoutInfo -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LayoutInfo -> r # gmapQ :: (forall d. Data d => d -> u) -> LayoutInfo -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> LayoutInfo -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> LayoutInfo -> m LayoutInfo # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LayoutInfo -> m LayoutInfo # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LayoutInfo -> m LayoutInfo # | |
Show LayoutInfo | |
Defined in GHC.Types.SrcLoc Methods showsPrec :: Int -> LayoutInfo -> ShowS # show :: LayoutInfo -> String # showList :: [LayoutInfo] -> ShowS # | |
Eq LayoutInfo | |
Defined in GHC.Types.SrcLoc | |
Ord LayoutInfo | |
Defined in GHC.Types.SrcLoc Methods compare :: LayoutInfo -> LayoutInfo -> Ordering # (<) :: LayoutInfo -> LayoutInfo -> Bool # (<=) :: LayoutInfo -> LayoutInfo -> Bool # (>) :: LayoutInfo -> LayoutInfo -> Bool # (>=) :: LayoutInfo -> LayoutInfo -> Bool # max :: LayoutInfo -> LayoutInfo -> LayoutInfo # min :: LayoutInfo -> LayoutInfo -> LayoutInfo # |
data GenLocated l e #
We attach SrcSpans to lots of things, so let's have a datatype for it.
Constructors
L l e |
Instances
StringBuffer Source Span
Constructors
BufSpan | |
Fields
|
0-based offset identifying the raw location in the StringBuffer
.
The lexer increments the BufPos
every time a character (UTF-8 code point)
is read from the input buffer. As UTF-8 is a variable-length encoding and
StringBuffer
needs a byte offset for indexing, a BufPos
cannot be used
for indexing.
The parser guarantees that BufPos
are monotonic. See #17632. This means
that syntactic constructs that appear later in the StringBuffer
are guaranteed to
have a higher BufPos
. Constrast that with SrcLoc
, which does *not* make the
analogous guarantee about higher line/column numbers.
This is due to #line and {-# LINE ... #-} pragmas that can arbitrarily
modify SrcLoc
. Notice how setSrcLoc
and resetAlrLastLoc
in
GHC.Parser.Lexer update PsLoc
, modifying SrcLoc
but preserving
BufPos
.
Monotonicity makes BufPos
useful to determine the order in which syntactic
elements appear in the source. Consider this example (haddockA041 in the test suite):
haddockA041.hs {-# LANGUAGE CPP #-} -- | Module header documentation module Comments_and_CPP_include where #include "IncludeMe.hs"
IncludeMe.hs: -- | Comment on T data T = MkT -- ^ Comment on MkT
After the C preprocessor runs, the StringBuffer
will contain a program that
looks like this (unimportant lines at the beginning removed):
# 1 "haddockA041.hs" {-# LANGUAGE CPP #-} -- | Module header documentation module Comments_and_CPP_include where # 1 "IncludeMe.hs" 1 -- | Comment on T data T = MkT -- ^ Comment on MkT # 7 "haddockA041.hs" 2
The line pragmas inserted by CPP make the error messages more informative. The downside is that we can't use RealSrcLoc to determine the ordering of syntactic elements.
With RealSrcLoc, we have the following location information recorded in the AST: * The module name is located at haddockA041.hs:3:8-31 * The Haddock comment "Comment on T" is located at IncludeMe:1:1-17 * The data declaration is located at IncludeMe.hs:2:1-32
Is the Haddock comment located between the module name and the data declaration? This is impossible to tell because the locations are not comparable; they even refer to different files.
On the other hand, with BufPos
, we have the following location information:
* The module name is located at 846-870
* The Haddock comment "Comment on T" is located at 898-915
* The data declaration is located at 916-928
Aside: if you're wondering why the numbers are so high, try running
ghc -E haddockA041.hs
and see the extra fluff that CPP inserts at the start of the file.
For error messages, BufPos
is not useful at all. On the other hand, this is
exactly what we need to determine the order of syntactic elements:
870 < 898, therefore the Haddock comment appears *after* the module name.
915 < 916, therefore the Haddock comment appears *before* the data declaration.
We use BufPos
in in GHC.Parser.PostProcess.Haddock to associate Haddock
comments with parts of the AST using location information (#17544).
Built-in "bad" SrcSpan
s for common sources of location uncertainty
unRealSrcSpan :: RealLocated a -> a #
unLoc :: GenLocated l e -> e #
srcSpanStartLine :: RealSrcSpan -> Int #
srcSpanStartCol :: RealSrcSpan -> Int #
srcSpanStart :: SrcSpan -> SrcLoc #
srcSpanFirstCharacter :: SrcSpan -> SrcSpan #
Convert a SrcSpan into one that represents only its first character
srcSpanFileName_maybe :: SrcSpan -> Maybe FastString #
Obtains the filename for a SrcSpan
if it is "good"
srcSpanEndLine :: RealSrcSpan -> Int #
srcSpanEndCol :: RealSrcSpan -> Int #
srcSpanEnd :: SrcSpan -> SrcLoc #
srcLocSpan :: SrcLoc -> SrcSpan #
Create a SrcSpan
corresponding to a single point
srcLocLine :: RealSrcLoc -> Int #
Raises an error when used on a "bad" SrcLoc
srcLocFile :: RealSrcLoc -> FastString #
Gives the filename of the SrcLoc
srcLocCol :: RealSrcLoc -> Int #
Raises an error when used on a "bad" SrcLoc
spans :: SrcSpan -> (Int, Int) -> Bool #
Determines whether a span encloses a given line and column index
sortRealLocated :: [RealLocated a] -> [RealLocated a] #
sortLocated :: [Located a] -> [Located a] #
realSrcSpanEnd :: RealSrcSpan -> RealSrcLoc #
realSrcLocSpan :: RealSrcLoc -> RealSrcSpan #
psSpanStart :: PsSpan -> PsLoc #
pprUserSpan :: Bool -> SrcSpan -> SDoc #
pprUserRealSpan :: Bool -> RealSrcSpan -> SDoc #
pprLocated :: (Outputable l, Outputable e) => GenLocated l e -> SDoc #
mkSrcSpanPs :: PsSpan -> SrcSpan #
mkRealSrcSpan :: RealSrcLoc -> RealSrcLoc -> RealSrcSpan #
Create a SrcSpan
between two points in a file
mkRealSrcLoc :: FastString -> Int -> Int -> RealSrcLoc #
mkGeneralSrcSpan :: FastString -> SrcSpan #
Create a "bad" SrcSpan
that has not location information
mkGeneralSrcLoc :: FastString -> SrcLoc #
Creates a "bad" SrcLoc
that has no detailed information about its location
mkGeneralLocated :: String -> e -> Located e #
mapLoc :: (a -> b) -> GenLocated l a -> GenLocated l b #
lookupSrcSpan :: SrcSpan -> Map RealSrcSpan a -> Maybe a #
lookupSrcLoc :: SrcLoc -> Map RealSrcLoc a -> Maybe a #
liftL :: Monad m => (a -> m b) -> GenLocated l a -> m (GenLocated l b) #
leftmostColumn :: Int #
Indentation level is 1-indexed, so the leftmost column is 1.
isZeroWidthSpan :: SrcSpan -> Bool #
True if the span has a width of zero, as returned for "virtual"
semicolons in the lexer.
For "bad" SrcSpan
, it returns False
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
Arguments
:: RealSrcSpan | The span that may be enclosed by the other |
-> RealSrcSpan | The span it may be enclosed by |
-> Bool |
Determines whether a span is enclosed by another one
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
isGeneratedSrcSpan :: SrcSpan -> Bool #
interactiveSrcSpan :: SrcSpan #
Built-in "bad" SrcSpan
s for common sources of location uncertainty
Built-in "bad" SrcLoc
values for particular locations
getRealSrcSpan :: RealLocated a -> RealSrcSpan #
getLoc :: GenLocated l e -> l #
getBufSpan :: SrcSpan -> Maybe BufSpan #
Built-in "bad" SrcSpan
s for common sources of location uncertainty
Built-in "bad" SrcLoc
values for particular locations
eqLocated :: Eq a => GenLocated l a -> GenLocated l a -> Bool #
Tests whether the two located things are equal
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.
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.
combineRealSrcSpans :: RealSrcSpan -> RealSrcSpan -> RealSrcSpan #
Combines two SrcSpan
into one that spans at least all the characters
within both spans. Assumes the "file" part is the same in both inputs
combineLocs :: Located a -> Located b -> SrcSpan #
cmpLocated :: Ord a => GenLocated l a -> GenLocated l a -> Ordering #
Tests the ordering of the two located things
cmpBufSpan :: HasDebugCallStack => Located a -> Located a -> Ordering #
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
advancePsLoc :: PsLoc -> Char -> PsLoc #
advanceBufPos :: BufPos -> BufPos #
addCLoc :: Located a -> Located b -> c -> Located c #
Combine locations from two Located
things and add them to a third thing
type FastStringEnv a = UniqFM FastString a #
A non-deterministic set of FastStrings. See Note [Deterministic UniqFM] in GHC.Types.Unique.DFM 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.
mkFsEnv :: [(FastString, a)] -> FastStringEnv a #
lookupFsEnv :: FastStringEnv a -> FastString -> Maybe a #
extendFsEnv :: FastStringEnv a -> FastString -> a -> FastStringEnv a #
emptyFsEnv :: FastStringEnv a #
Instances
Data a => Data (UniqSet a) | |
Defined in GHC.Types.Unique.Set 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) # | |
Monoid (UniqSet a) | |
Semigroup (UniqSet a) | |
Outputable a => Outputable (UniqSet a) | |
Defined in GHC.Types.Unique.Set | |
Eq (UniqSet a) | |
unsafeUFMToUniqSet :: UniqFM a 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].
unitUniqSet :: Uniquable a => a -> UniqSet a #
uniqSetMinusUFM :: UniqSet key -> UniqFM key b -> UniqSet key #
uniqSetMinusUDFM :: UniqSet key -> UniqDFM key b -> UniqSet key #
uniqSetAny :: (a -> Bool) -> UniqSet a -> Bool #
uniqSetAll :: (a -> Bool) -> UniqSet a -> Bool #
unionUniqSets :: UniqSet a -> UniqSet a -> UniqSet a #
unionManyUniqSets :: [UniqSet a] -> UniqSet a #
sizeUniqSet :: UniqSet a -> Int #
restrictUniqSetToUFM :: UniqSet key -> UniqFM key b -> UniqSet key #
pprUniqSet :: (a -> SDoc) -> UniqSet a -> SDoc #
nonDetStrictFoldUniqSet :: (elt -> a -> a) -> a -> UniqSet elt -> a #
nonDetKeysUniqSet :: UniqSet elt -> [Unique] #
nonDetEltsUniqSet :: UniqSet elt -> [elt] #
minusUniqSet :: UniqSet a -> UniqSet a -> UniqSet a #
mapUniqSet :: Uniquable b => (a -> b) -> UniqSet a -> UniqSet b #
lookupUniqSet_Directly :: UniqSet a -> Unique -> Maybe a #
lookupUniqSet :: Uniquable key => UniqSet key -> key -> Maybe key #
What's the point you might ask? We might have changed an object without it's key changing. In which case this lookup makes sense.
isEmptyUniqSet :: UniqSet a -> Bool #
intersectUniqSets :: UniqSet a -> UniqSet a -> UniqSet a #
getUniqSet :: UniqSet a -> UniqFM a a #
filterUniqSet :: (a -> Bool) -> UniqSet a -> UniqSet a #
emptyUniqSet :: UniqSet a #
elementOfUniqSet :: Uniquable a => a -> UniqSet a -> Bool #
elemUniqSet_Directly :: Unique -> UniqSet a -> Bool #
disjointUniqSets :: UniqSet a -> UniqSet a -> Bool #
delOneFromUniqSet_Directly :: UniqSet a -> Unique -> UniqSet a #
delOneFromUniqSet :: Uniquable a => UniqSet a -> a -> UniqSet a #
delListFromUniqSet_Directly :: UniqSet a -> [Unique] -> UniqSet a #
delListFromUniqSet :: Uniquable a => UniqSet a -> [a] -> UniqSet a #
addOneToUniqSet :: Uniquable a => UniqSet a -> a -> UniqSet a #
addListToUniqSet :: Uniquable a => UniqSet a -> [a] -> UniqSet a #
type QueryQualifyPackage = Unit -> Bool #
For a given package, we need to know whether to print it with the component id to disambiguate it.
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.
data QualifyName #
Constructors
NameUnqual | |
NameQual ModuleName | |
NameNotInScope1 | |
NameNotInScope2 |
Instances
Outputable QualifyName | |
Defined in GHC.Utils.Outputable Methods ppr :: QualifyName -> SDoc # |
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 | |
Wrapper for types having a Outputable instance when an OutputableP instance is required.
Constructors
PDoc a |
Instances
Outputable a => OutputableP env (PDoc a) | |
Defined in GHC.Utils.Outputable |
class OutputableP env a where #
Outputable class with an additional environment value
See Note [The OutputableP class]
Instances
OutputableP env Alignment | |
Defined in GHC.Types.Basic | |
OutputableP env SDoc | |
Defined in GHC.Utils.Outputable | |
OutputableP env a => OutputableP env (SCC a) | |
Defined in GHC.Utils.Outputable | |
OutputableP env a => OutputableP env (Set a) | |
Defined in GHC.Utils.Outputable | |
Outputable a => OutputableP env (PDoc a) | |
Defined in GHC.Utils.Outputable | |
OutputableP env a => OutputableP env (Maybe a) | |
Defined in GHC.Utils.Outputable | |
OutputableP env a => OutputableP env [a] | |
Defined in GHC.Utils.Outputable | |
(OutputableP env key, OutputableP env elt) => OutputableP env (Map key elt) | |
Defined in GHC.Utils.Outputable | |
(OutputableP env a, OutputableP env b) => OutputableP env (a, b) | |
Defined in GHC.Utils.Outputable | |
(OutputableP env a, OutputableP env b, OutputableP env c) => OutputableP env (a, b, c) | |
Defined in GHC.Utils.Outputable |
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
class Outputable a where #
Class designating that some type has an SDoc
representation
Instances
data LabelStyle #
Style of label pretty-printing.
When we produce C sources or headers, we have to take into account that C compilers transform C labels when they convert them into symbols. For example, they can add prefixes (e.g., "_" on Darwin) or suffixes (size for stdcalls on Windows). So we provide two ways to pretty-print CLabels: C style or Asm style.
Constructors
CStyle | C label style (used by C and LLVM backends) |
AsmStyle | Asm label style (used by NCG backend) |
Instances
Show LabelStyle | |
Defined in GHC.Utils.Outputable Methods showsPrec :: Int -> LabelStyle -> ShowS # show :: LabelStyle -> String # showList :: [LabelStyle] -> ShowS # | |
Eq LabelStyle | |
Defined in GHC.Utils.Outputable | |
Ord LabelStyle | |
Defined in GHC.Utils.Outputable Methods compare :: LabelStyle -> LabelStyle -> Ordering # (<) :: LabelStyle -> LabelStyle -> Bool # (<=) :: LabelStyle -> LabelStyle -> Bool # (>) :: LabelStyle -> LabelStyle -> Bool # (>=) :: LabelStyle -> LabelStyle -> Bool # max :: LabelStyle -> LabelStyle -> LabelStyle # min :: LabelStyle -> LabelStyle -> LabelStyle # |
Constructors
AllTheWay | |
PartWay Int | 0 => stop |
DefaultDepth | Use |
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 GHC.Core.Ppr
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) |
ztext :: FastZString -> SDoc #
withUserStyle :: PrintUnqualified -> Depth -> SDoc -> SDoc #
withPprStyle :: PprStyle -> SDoc -> SDoc #
withErrStyle :: PrintUnqualified -> SDoc -> SDoc #
whenPprDebug :: SDoc -> SDoc #
Says what to do with -dppr-debug; without, return empty
updSDocContext :: (SDocContext -> SDocContext) -> SDoc -> SDoc #
unicodeSyntax :: SDoc -> SDoc -> SDoc #
underscore :: SDoc #
Converts an integer to a verbal index:
speakNth 1 = text "first" speakNth 5 = text "fifth" speakNth 21 = text "21st"
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"
showSDocUnsafe :: SDoc -> String #
showSDocOneLine :: SDocContext -> SDoc -> String #
showPprUnsafe :: Outputable a => a -> String #
setStyleColoured :: Bool -> PprStyle -> PprStyle #
sdocWithContext :: (SDocContext -> SDoc) -> SDoc #
sdocOption :: (SDocContext -> a) -> (a -> SDoc) -> SDoc #
runSDoc :: SDoc -> SDocContext -> Doc #
renderWithContext :: SDocContext -> SDoc -> String #
quotedListWithOr :: [SDoc] -> SDoc #
quotedListWithNor :: [SDoc] -> SDoc #
queryQual :: PprStyle -> PrintUnqualified #
qualName :: PprStyle -> QueryQualifyName #
printSDocLn :: SDocContext -> Mode -> Handle -> SDoc -> IO () #
Like printSDoc
but appends an extra newline.
primWordSuffix :: SDoc #
primWord8Suffix :: SDoc #
primIntSuffix :: SDoc #
primInt8Suffix :: SDoc #
primInt64Suffix :: SDoc #
primInt32Suffix :: SDoc #
primInt16Suffix :: SDoc #
primFloatSuffix :: SDoc #
primCharSuffix :: SDoc #
pprSetDepth :: Depth -> SDoc -> SDoc #
pprQuotedList :: Outputable a => [a] -> SDoc #
Returns the comma-separated concatenation of the quoted pretty printed things.
[x,y,z] ==> `x', `y', `z'
pprPrimWord8 :: Integer -> SDoc #
pprPrimWord64 :: Integer -> SDoc #
pprPrimWord32 :: Integer -> SDoc #
pprPrimWord16 :: Integer -> SDoc #
pprPrimWord :: Integer -> SDoc #
pprPrimInt8 :: Integer -> SDoc #
pprPrimInt64 :: Integer -> SDoc #
pprPrimInt32 :: Integer -> SDoc #
pprPrimInt16 :: Integer -> SDoc #
pprPrimInt :: Integer -> SDoc #
pprPrimChar :: Char -> SDoc #
Special combinator for showing unboxed literals.
pprPrefixVar :: Bool -> SDoc -> SDoc #
pprInfixVar :: Bool -> SDoc -> SDoc #
pprHsString :: FastString -> SDoc #
Special combinator for showing string literals.
pprHsBytes :: ByteString -> SDoc #
Special combinator for showing bytestring literals.
pprFilePathString :: FilePath -> SDoc #
Normalise, escape and render a string representing a path
e.g. "c:\whatever"
pprFastFilePath :: FastString -> SDoc #
pprDeeperList :: ([SDoc] -> SDoc) -> [SDoc] -> SDoc #
Truncate a list that is longer than the current depth.
pprCode :: LabelStyle -> SDoc -> SDoc #
ppWhenOption :: (SDocContext -> Bool) -> SDoc -> SDoc #
ppUnlessOption :: (SDocContext -> Bool) -> SDoc -> SDoc #
Determines the pluralisation suffix appropriate for the length of a list:
plural [] = char 's' plural ["Hello"] = empty plural ["Hello", "World"] = char 's'
mkUserStyle :: PrintUnqualified -> Depth -> PprStyle #
mkErrStyle :: PrintUnqualified -> PprStyle #
Style for printing error messages
mkDumpStyle :: PrintUnqualified -> PprStyle #
itsOrTheir :: [a] -> SDoc #
Determines the form of possessive appropriate for the length of a list:
itsOrTheir [x] = text "its" itsOrTheir [x,y] = text "their" itsOrTheir [] = text "their" -- probably avoid this
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"
isEmpty :: SDocContext -> SDoc -> Bool #
interppSP :: Outputable a => [a] -> SDoc #
Returns the separated concatenation of the pretty printed things.
interpp'SP' :: (a -> SDoc) -> [a] -> SDoc #
interpp'SP :: Outputable a => [a] -> SDoc #
Returns the comma-separated concatenation of the pretty printed things.
intWithCommas :: Integral a => a -> SDoc #
ifPprDebug :: SDoc -> SDoc -> SDoc #
Says what to do with and without -dppr-debug
hangNotEmpty :: SDoc -> Int -> SDoc -> SDoc #
This behaves like hang
, but does not indent the second document
when the header is empty.
getPprStyle :: (PprStyle -> SDoc) -> SDoc #
getPprDebug :: (Bool -> SDoc) -> SDoc #
Indicate if -dppr-debug mode is enabled
ftext :: FastString -> SDoc #
A paragraph-fill combinator. It's much like sep, only it keeps fitting things on one line until it can't fit any more.
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.
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"
defaultSDocContext :: SDocContext #
Default pretty-printing options
Default style for error messages, when we don't know PrintUnqualified It's a bit of a hack because it doesn't take into account what's in scope Only used for desugarer warnings, and typechecker errors in interface sigs
coloured :: PprColour -> SDoc -> SDoc #
Apply the given colour/style for the argument.
Only takes effect if colours are enabled.
bufLeftRenderSDoc :: SDocContext -> BufHandle -> SDoc -> IO () #
angleBrackets :: SDoc -> SDoc #
alwaysQualifyNames :: QueryQualifyName #
NB: This won't ever show package IDs
($$) :: SDoc -> SDoc -> SDoc #
Join two SDoc
together vertically; if there is
no vertical overlap it "dovetails" the two onto one line
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
Data OccName | |
Defined in GHC.Types.Name.Occurrence 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 # | |
NFData OccName | |
Defined in GHC.Types.Name.Occurrence | |
HasOccName OccName | |
Defined in GHC.Types.Name.Occurrence | |
Uniquable OccName | |
Defined in GHC.Types.Name.Occurrence | |
Binary OccName | |
Outputable OccName | |
Defined in GHC.Types.Name.Occurrence | |
OutputableBndr OccName | |
Defined in GHC.Types.Name.Occurrence Methods pprBndr :: BindingSite -> OccName -> SDoc # pprPrefixOcc :: OccName -> SDoc # pprInfixOcc :: OccName -> SDoc # bndrIsJoin_maybe :: OccName -> Maybe Int # | |
Eq OccName | |
Ord OccName | |
Defined in GHC.Types.Name.Occurrence |
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 IfaceClassOp | |
Defined in GHC.Iface.Syntax Methods occName :: IfaceClassOp -> OccName # | |
HasOccName IfaceConDecl | |
Defined in GHC.Iface.Syntax Methods occName :: IfaceConDecl -> OccName # | |
HasOccName IfaceDecl | |
Defined in GHC.Iface.Syntax | |
HasOccName HoleFitCandidate | |
Defined in GHC.Tc.Errors.Hole.FitTypes Methods occName :: HoleFitCandidate -> OccName # | |
HasOccName TcBinder | |
Defined in GHC.Tc.Types | |
HasOccName GreName | |
Defined in GHC.Types.Avail | |
HasOccName FieldLabel | |
Defined in GHC.Types.FieldLabel Methods occName :: FieldLabel -> OccName # | |
HasOccName Name | |
Defined in GHC.Types.Name | |
HasOccName OccName | |
Defined in GHC.Types.Name.Occurrence | |
HasOccName GlobalRdrElt | |
Defined in GHC.Types.Name.Reader Methods occName :: GlobalRdrElt -> OccName # | |
HasOccName RdrName | |
Defined in GHC.Types.Name.Reader | |
HasOccName Var | |
Defined in GHC.Types.Var | |
HasOccName name => HasOccName (IEWrappedName name) | |
Defined in GHC.Hs.ImpExp Methods occName :: IEWrappedName name -> OccName # |
occNameString :: OccName -> String #
mkVarOccFS :: FastString -> OccName #
mkRecFldSelOcc :: String -> OccName #
A PtrString
is a pointer to some array of Latin-1 encoded chars.
newtype NonDetFastString #
Non-deterministic FastString
This is a simple FastString wrapper with an Ord instance using
uniqCompareFS
(i.e. which compares FastStrings on their Uniques). Hence it
is not deterministic from one run to the other.
Constructors
NonDetFastString FastString |
Instances
newtype LexicalFastString #
Lexical FastString
This is a simple FastString wrapper with an Ord instance using
lexicalCompareFS
(i.e. which compares FastStrings on their String
representation). Hence it is deterministic from one run to the other.
Constructors
LexicalFastString FastString |
Instances
data FastZString #
Instances
NFData FastZString | |
Defined in GHC.Data.FastString Methods rnf :: FastZString -> () # |
data FastString #
A FastString
is a UTF-8 encoded string together with a unique ID. All
FastString
s 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
zString :: FastZString -> String #
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.
unsafeMkByteString :: String -> ByteString #
unpackPtrString :: PtrString -> String #
unpackFS :: FastString -> String #
Unpacks and decodes the FastString
uniqueOfFS :: FastString -> Int #
uniqCompareFS :: FastString -> FastString -> Ordering #
Compare FastString by their Unique (not lexically).
Much cheaper than lexicalCompareFS
but non-deterministic!
unconsFS :: FastString -> Maybe (Char, FastString) #
nullFS :: FastString -> Bool #
Returns True
if the FastString
is empty
nilFS :: FastString #
mkPtrString# :: Addr# -> PtrString #
Wrap an unboxed address into a PtrString
.
mkPtrString :: String -> PtrString #
mkFastStringShortByteString :: ShortByteString -> FastString #
Create a FastString
from an existing ShortByteString
without
copying.
mkFastStringBytes :: Ptr Word8 -> Int -> FastString #
mkFastStringByteString :: ByteString -> FastString #
Create a FastString
by copying an existing ByteString
mkFastStringByteList :: [Word8] -> FastString #
Creates a FastString
from a UTF-8 encoded [Word8]
mkFastString# :: Addr# -> FastString #
mkFastString :: String -> FastString #
Creates a UTF-8 encoded FastString
from a String
lexicalCompareFS :: FastString -> FastString -> Ordering #
Compare FastString lexically
If you don't care about the lexical ordering, use uniqCompareFS
instead.
lengthFZS :: FastZString -> Int #
lengthFS :: FastString -> Int #
Returns the length of the FastString
in characters
isUnderscoreFS :: FastString -> Bool #
headFS :: FastString -> Char #
hPutFZS :: Handle -> FastZString -> IO () #
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]]] #
fsLit :: String -> FastString #
fastStringToByteString :: FastString -> ByteString #
Gives the Modified UTF-8 encoded bytes corresponding to a FastString
consFS :: Char -> FastString -> FastString #
concatFS :: [FastString] -> FastString #
bytesFS :: FastString -> ByteString #
Gives the Modified UTF-8 encoded bytes corresponding to a FastString
appendFS :: FastString -> FastString -> FastString #
data SDocContext #
Constructors
Represents a pretty-printable document.
To display an SDoc
, use printSDoc
, printSDocLn
, bufLeftRenderSDoc
,
or renderWithContext
. Avoid calling runSDoc
directly as it breaks the
abstraction layer.
Instances
IsString SDoc | |
Defined in GHC.Utils.Outputable Methods fromString :: String -> SDoc # | |
Outputable SDoc | |
Defined in GHC.Utils.Outputable | |
OutputableP env SDoc | |
Defined in GHC.Utils.Outputable |
Constructors
PprUser PrintUnqualified Depth Coloured | |
PprDump PrintUnqualified | |
PprCode LabelStyle | Print code; either C or assembler |
Instances
Outputable PprStyle | |
Defined in GHC.Utils.Outputable |
zipWithAndUnzipM :: Monad m => (a -> b -> m (c, d)) -> [a] -> [b] -> m ([c], [d]) #
zipWith3M_ :: Monad m => (a -> b -> c -> m d) -> [a] -> [b] -> [c] -> m () #
whenM :: Monad m => m Bool -> m () -> m () #
Monadic version of when
, taking the condition in the monad
unlessM :: Monad m => m Bool -> m () -> m () #
Monadic version of unless
, taking the condition in the monad
maybeMapM :: Monad m => (a -> m b) -> Maybe a -> m (Maybe b) #
Monadic version of fmap specialised for Maybe
mapMaybeM :: Applicative m => (a -> m (Maybe b)) -> [a] -> m [b] #
Applicative version of mapMaybe
mapAndUnzip5M :: Monad m => (a -> m (b, c, d, e, f)) -> [a] -> m ([b], [c], [d], [e], [f]) #
mapAndUnzip4M :: Monad m => (a -> m (b, c, d, e)) -> [a] -> m ([b], [c], [d], [e]) #
mapAndUnzip3M :: Monad m => (a -> m (b, c, d)) -> [a] -> m ([b], [c], [d]) #
mapAndUnzipM for triples
Arguments
:: Monad m | |
=> (acc -> x -> m (acc, y)) | combining function |
-> acc | initial state |
-> [x] | inputs |
-> m (acc, [y]) | final state, outputs |
Monadic version of mapAccumL
foldlM_ :: (Monad m, Foldable t) => (a -> b -> m a) -> a -> t b -> m () #
Monadic version of foldl that discards its result
fmapMaybeM :: Monad m => (a -> m b) -> Maybe a -> m (Maybe b) #
Monadic version of fmap
fmapEitherM :: Monad m => (a -> m b) -> (c -> m d) -> Either a c -> m (Either b d) #
Monadic version of fmap
filterOutM :: Applicative m => (a -> m Bool) -> [a] -> m [a] #
Like filterM
, only it reverses the sense of the test.
concatMapM :: Monad m => (a -> m [b]) -> [a] -> m [b] #
Monadic version of concatMap
anyM :: Monad m => (a -> m Bool) -> [a] -> m Bool #
Monadic version of any
, aborts the computation at the first True
value
allM :: Monad m => (a -> m Bool) -> [a] -> m Bool #
Monad version of all
, aborts the computation at the first False
value
data ModuleName #
A ModuleName is essentially a simple string, e.g. Data.List
.
Instances
data StaticPlugin #
A static plugin with its arguments. For registering compiled-in plugins through the GHC API.
Constructors
StaticPlugin | |
Fields
|
data LoadedPlugin #
A plugin with its arguments. The result of loading the plugin.
Constructors
LoadedPlugin | |
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) |
Instances
liftedRepName :: Name Source #
locA' :: SrcSpanAnn' ann -> SrcSpan Source #
mkWildValBinder' :: Type -> Id Source #
pattern HsLet' :: XLet GhcRn -> Located (HsLocalBinds GhcRn) -> LHsExpr GhcRn -> HsExpr GhcRn Source #
pattern LetStmt' :: XLetStmt GhcRn GhcRn body -> Located (HsLocalBinds GhcRn) -> StmtLR GhcRn GhcRn body Source #
pattern ExplicitList' :: XExplicitList p -> [LHsExpr p] -> HsExpr p Source #