Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell98 |
This module re-exports all identifiers that LH needs from the GHC API.
The intended use of this module is to provide a quick look of what GHC API features LH depends upon.
The transitive dependencies of this module shouldn't contain modules from Language.Haskell.Liquid.* or other non-boot libraries. This makes it easy to discover breaking changes in the GHC API.
Synopsis
- 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
- liftIO :: MonadIO m => IO a -> m a
- deserializeWithData :: Data a => [Word8] -> a
- fromSerialized :: Typeable a => ([Word8] -> a) -> Serialized -> Maybe a
- toSerialized :: Typeable a => (a -> [Word8]) -> a -> Serialized
- data TypecheckedModule
- data ParsedModule
- data DesugaredModule = DesugaredModule {}
- modInfoTopLevelScope :: ModuleInfo -> Maybe [Name]
- isDictonaryId :: Id -> Bool
- compileFile :: HscEnv -> Phase -> (FilePath, Maybe Phase) -> IO FilePath
- hscTcRcLookupName :: HscEnv -> Name -> IO (Maybe TyThing)
- hscDesugar :: HscEnv -> ModSummary -> TcGblEnv -> IO ModGuts
- tcRnLookupRdrName :: HscEnv -> LocatedN RdrName -> IO (Messages DecoratedSDoc, Maybe [Name])
- getModuleInterface :: HscEnv -> Module -> IO (Messages DecoratedSDoc, Maybe ModIface)
- dsLExpr :: LHsExpr GhcTc -> DsM CoreExpr
- initDsWithModGuts :: HscEnv -> ModGuts -> DsM a -> IO (Messages DecoratedSDoc, Maybe a)
- initDsTc :: DsM a -> TcM a
- type DsM = TcRnIf DsGblEnv DsLclEnv
- tcInferSigma :: Bool -> LHsExpr GhcRn -> TcM TcSigmaType
- tcValBinds :: TopLevelFlag -> [(RecFlag, LHsBinds GhcRn)] -> [LSig GhcRn] -> TcM thing -> TcM ([(RecFlag, LHsBinds GhcTc)], thing)
- data InferMode = NoRestrictions
- simplifyInteractive :: WantedConstraints -> TcM (Bag EvBind)
- simplifyInfer :: TcLevel -> InferMode -> [TcIdSigInst] -> [(Name, TcTauType)] -> WantedConstraints -> TcM ([TcTyVar], [EvVar], TcEvBinds, Bool)
- captureTopConstraints :: TcM a -> TcM (a, WantedConstraints)
- zonkTopLExpr :: LHsExpr GhcTc -> TcM (LHsExpr GhcTc)
- loadInterface :: SDoc -> Module -> WhereFrom -> IfM lcl (MaybeErr SDoc ModIface)
- cannotFindModule :: HscEnv -> ModuleName -> FindResult -> SDoc
- type CommandLineOption = String
- purePlugin :: [CommandLineOption] -> IO PluginRecompile
- defaultPlugin :: Plugin
- rnLExpr :: LHsExpr GhcPs -> RnM (LHsExpr GhcRn, FreeVars)
- tcInferRho :: LHsExpr GhcRn -> TcM (LHsExpr GhcTc, TcRhoType)
- reportErrors :: [MsgEnvelope DecoratedSDoc] -> TcM ()
- reportError :: MsgEnvelope DecoratedSDoc -> TcRn ()
- pushTcLevelM :: TcM a -> TcM (TcLevel, a)
- newUnique :: TcRnIf gbl lcl Unique
- mkLongErrAt :: SrcSpan -> SDoc -> SDoc -> TcRn (MsgEnvelope DecoratedSDoc)
- initIfaceTcRn :: IfG a -> TcRn a
- failWithTc :: SDoc -> TcM a
- failIfErrsM :: TcRn ()
- discardConstraints :: TcM a -> TcM a
- captureConstraints :: TcM a -> TcM (a, WantedConstraints)
- data WhereFrom = ImportBySystem
- type TcRn = TcRnIf TcGblEnv TcLclEnv
- type TcM = TcRn
- data TcGblEnv
- data Env gbl lcl
- getSession :: GhcMonad m => m HscEnv
- data Ghc a
- withSession :: GhcMonad m => (HscEnv -> m a) -> m a
- findImportedModule :: HscEnv -> ModuleName -> Maybe FastString -> IO FindResult
- findExposedPackageModule :: HscEnv -> ModuleName -> Maybe FastString -> IO FindResult
- data HscEnv
- isNumericClass :: Class -> Bool
- lexprCtOrigin :: LHsExpr GhcRn -> CtOrigin
- data ModGuts
- data ExternalPackageState
- type HomePackageTable = DModuleNameEnv HomeModInfo
- data HomeModInfo
- lookupHpt :: HomePackageTable -> ModuleName -> Maybe HomeModInfo
- data ModIface_ (phase :: ModIfacePhase)
- data ModSummary
- ms_mod_name :: ModSummary -> ModuleName
- data HsModule
- pAT_ERROR_ID :: Id
- mkCoreLets :: [CoreBind] -> CoreExpr -> CoreExpr
- mkCoreLams :: [CoreBndr] -> CoreExpr -> CoreExpr
- mkCoreConApps :: DataCon -> [CoreExpr] -> CoreExpr
- mkCoreApps :: CoreExpr -> [CoreExpr] -> CoreExpr
- nlVarPat :: forall (p :: Pass) a. IsSrcSpanAnn p a => IdP (GhcPass p) -> LPat (GhcPass p)
- nlList :: [LHsExpr GhcPs] -> LHsExpr GhcPs
- 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)
- nlHsIf :: LHsExpr GhcPs -> LHsExpr GhcPs -> LHsExpr GhcPs -> LHsExpr GhcPs
- nlHsFunTy :: forall (p :: Pass). LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)
- nlHsAppTy :: forall (p :: Pass). LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)
- mkHsLam :: forall (p :: Pass). (IsPass p, XMG (GhcPass p) (LHsExpr (GhcPass p)) ~ NoExtField) => [LPat (GhcPass p)] -> LHsExpr (GhcPass p) -> LHsExpr (GhcPass p)
- mkHsIntegral :: IntegralLit -> HsOverLit GhcPs
- mkHsFractional :: FractionalLit -> HsOverLit GhcPs
- mkHsDictLet :: TcEvBinds -> LHsExpr GhcTc -> LHsExpr GhcTc
- mkHsApp :: forall (id :: Pass). LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
- hsTypeToHsSigWcType :: LHsType GhcPs -> LHsSigWcType GhcPs
- hsTypeToHsSigType :: LHsType GhcPs -> LHsSigType GhcPs
- mkHsForAllInvisTele :: forall (p :: Pass). EpAnnForallTy -> [LHsTyVarBndr Specificity (GhcPass p)] -> HsForAllTelescope (GhcPass p)
- type LHsDecl p = XRec p (HsDecl p)
- data HsDecl p = SigD (XSigD p) (Sig p)
- data Sig pass
- = TypeSig (XTypeSig pass) [LIdP pass] (LHsSigWcType pass)
- | FixSig (XFixSig pass) (FixitySig pass)
- | InlineSig (XInlineSig pass) (LIdP pass) InlinePragma
- data FixitySig pass = FixitySig (XFixitySig pass) [LIdP pass] Fixity
- type LHsType pass = XRec pass (HsType pass)
- data HsWildCardBndrs pass thing = HsWC (XHsWC pass thing) thing
- data HsType pass
- = HsForAllTy (XForAllTy pass) (HsForAllTelescope pass) (LHsType pass)
- | HsQualTy (XQualTy pass) (Maybe (LHsContext pass)) (LHsType pass)
- | HsTyVar (XTyVar pass) PromotionFlag (LIdP pass)
- | HsAppTy (XAppTy pass) (LHsType pass) (LHsType pass)
- | HsWildCardTy (XWildCardTy pass)
- data HsTyVarBndr flag pass = UserTyVar (XUserTyVar pass) flag (LIdP pass)
- data HsSigType pass = HsSig (XHsSig pass) (HsOuterSigTyVarBndrs pass) (LHsType pass)
- data HsOuterTyVarBndrs flag pass = HsOuterImplicit (XHsOuterImplicit pass)
- data HsArg tm ty = HsValArg tm
- type LImportDecl pass = XRec pass (ImportDecl pass)
- ideclAs :: ImportDecl pass -> Maybe (XRec pass ModuleName)
- ideclName :: ImportDecl pass -> XRec pass ModuleName
- type GhcRn = GhcPass 'Renamed
- type GhcPs = GhcPass 'Parsed
- occurAnalysePgm :: Module -> (Id -> Bool) -> (Activation -> Bool) -> [CoreRule] -> CoreProgram -> CoreProgram
- substExpr :: HasDebugCallStack => Subst -> CoreExpr -> CoreExpr
- extendIdSubst :: Subst -> Id -> CoreExpr -> Subst
- extendCvSubst :: Subst -> CoVar -> Coercion -> Subst
- emptySubst :: Subst
- deShadowBinds :: CoreProgram -> CoreProgram
- exprType :: CoreExpr -> Type
- data TcEvBinds = EvBinds (Bag EvBind)
- data ClsInst
- instanceSig :: ClsInst -> ([TyVar], [Type], Class, [Type])
- instanceDFunId :: ClsInst -> DFunId
- instEnvElts :: InstEnv -> [ClsInst]
- tcSplitMethodTy :: Type -> ([TyVar], PredType, Type)
- tcSplitDFunTy :: Type -> ([TyVar], [Type], Class, [Type])
- exprFreeVarsList :: CoreExpr -> [Var]
- data IfaceAnnotation
- true_RDR :: RdrName
- trueDataConId :: Id
- trueDataCon :: DataCon
- stringTy :: Type
- nilDataCon :: DataCon
- listTyConName :: Name
- intTyConName :: Name
- intTyCon :: TyCon
- intTy :: Type
- intDataCon :: DataCon
- falseDataConId :: Id
- falseDataCon :: DataCon
- consDataCon :: DataCon
- charTyCon :: TyCon
- charDataCon :: DataCon
- boolTyConName :: Name
- boolTyCon :: TyCon
- boolTy :: Type
- anyTy :: Type
- setIdInfo :: Id -> IdInfo -> Id
- realIdUnfolding :: Id -> Unfolding
- modifyIdInfo :: HasDebugCallStack => (IdInfo -> IdInfo) -> Id -> Id
- mkUserLocal :: OccName -> Unique -> Mult -> Type -> SrcSpan -> Id
- mkExportedLocalId :: IdDetails -> Name -> Type -> Id
- isRecordSelector :: Id -> Bool
- isDFunId :: Id -> Bool
- isConLikeId :: Id -> Bool
- isClassOpId_maybe :: Id -> Maybe Class
- idType :: Id -> Kind
- idOccInfo :: Id -> OccInfo
- idDataCon :: Id -> DataCon
- data CafInfo = NoCafRefs
- setOccInfo :: IdInfo -> OccInfo -> IdInfo
- setCafInfo :: IdInfo -> CafInfo -> IdInfo
- mayHaveCafRefs :: CafInfo -> Bool
- cafInfo :: IdInfo -> CafInfo
- data Unfolding
- data Expr b
- type CoreProgram = [CoreBind]
- type CoreExpr = Expr CoreBndr
- type CoreBndr = Var
- type CoreBind = Bind CoreBndr
- type CoreArg = Arg CoreBndr
- type CoreAlt = Alt CoreBndr
- data Bind b
- type Arg b = Expr b
- data AltCon
- data Alt b = Alt AltCon [b] (Expr b)
- mkTyArg :: Type -> Expr b
- mkTyApps :: Expr b -> [Type] -> Expr b
- mkLams :: [b] -> Expr b -> Expr b
- mkApps :: Expr b -> [Arg b] -> Expr b
- maybeUnfoldingTemplate :: Unfolding -> Maybe CoreExpr
- isTypeArg :: Expr b -> Bool
- flattenBinds :: [Bind b] -> [(b, Expr b)]
- collectTyBinders :: CoreExpr -> ([TyVar], CoreExpr)
- collectTyAndValBinders :: CoreExpr -> ([TyVar], [Id], CoreExpr)
- collectBinders :: Expr b -> ([b], Expr b)
- collectArgs :: Expr b -> (Expr b, [Arg b])
- cmpAlt :: Alt a -> Alt a -> Ordering
- bindersOf :: Bind b -> [b]
- data GenTickish (pass :: TickishPass)
- = ProfNote {
- profNoteCC :: CostCentre
- profNoteCount :: !Bool
- profNoteScope :: !Bool
- | HpcTick {
- tickModule :: Module
- tickId :: !Int
- | Breakpoint {
- breakpointExt :: XBreakpoint pass
- breakpointId :: !Int
- breakpointFVs :: [XTickishId pass]
- | SourceNote { }
- = ProfNote {
- type CoreTickish = GenTickish 'TickishPassCore
- type LHsExpr p = XRec p (HsExpr p)
- data HsExpr p
- = HsVar (XVar p) (LIdP p)
- | HsOverLit (XOverLitE p) (HsOverLit p)
- | ExprWithTySig (XExprWithTySig p) (LHsExpr p) (LHsSigWcType (NoGhcTc p))
- type family IdP p
- noExtField :: NoExtField
- getEnv :: IOEnv env env
- failM :: IOEnv env a
- data FindResult
- = Found ModLocation Module
- | NoPackage Unit
- | FoundMultiple [(Module, ModuleOrigin)]
- | NotFound [FilePath] (Maybe Unit) [Unit] [Unit] [(Unit, UnusableUnitReason)] [ModuleSuggestion]
- withTiming :: MonadIO m => Logger -> DynFlags -> SDoc -> (a -> ()) -> m a -> m a
- data Logger
- getLogger :: HasLogger m => m Logger
- putLogMsg :: Logger -> LogAction
- getDynFlags :: HasDynFlags m => m DynFlags
- data GhcMode = CompManager
- data GhcLink = LinkInMemory
- xopt_set :: DynFlags -> Extension -> DynFlags
- updOptLevel :: Int -> DynFlags -> DynFlags
- gopt_set :: DynFlags -> GeneralFlag -> DynFlags
- gopt :: GeneralFlag -> DynFlags -> Bool
- data SourceError
- srcErrorMessages :: SourceError -> ErrorMessages
- data Severity = SevWarning
- data MsgEnvelope e
- data Messages e
- data DecoratedSDoc
- data ConLike = RealDataCon DataCon
- data StrictnessMark
- isVanillaDataCon :: DataCon -> Bool
- isTupleDataCon :: DataCon -> Bool
- dataConWrapperType :: DataCon -> Type
- dataConWrapId_maybe :: DataCon -> Maybe Id
- dataConUnivTyVars :: DataCon -> [TyVar]
- dataConTheta :: DataCon -> ThetaType
- dataConRepType :: DataCon -> Type
- dataConRepStrictness :: DataCon -> [StrictnessMark]
- dataConRepArgTys :: DataCon -> [Scaled Type]
- dataConOrigArgTys :: DataCon -> [Scaled Type]
- dataConInstArgTys :: DataCon -> [Type] -> [Scaled Type]
- dataConImplicitTyThings :: DataCon -> [TyThing]
- classDataCon :: Class -> DataCon
- type FamInstEnvs = (FamInstEnv, FamInstEnv)
- type FamInstEnv = UniqDFM TyCon FamilyInstEnv
- data FamInst = FamInst (CoAxiom Unbranched) FamFlavor Name [RoughMatchTc] [TyVar] [CoVar] [Type] Type
- data FamFlavor = DataFamilyInst TyCon
- topNormaliseType_maybe :: FamInstEnvs -> Type -> Maybe (Coercion, Type)
- famInstEnvElts :: FamInstEnv -> [FamInst]
- emptyFamInstEnv :: FamInstEnv
- tcUnifyTy :: Type -> Type -> Maybe TCvSubst
- ruleMatchTyKiX :: TyCoVarSet -> RnEnv2 -> TvSubstEnv -> Type -> Type -> Maybe TvSubstEnv
- mkClassPred :: Class -> [Type] -> PredType
- isEvVarType :: Type -> Bool
- isEqPrimPred :: PredType -> Bool
- isEqPred :: PredType -> Bool
- isDictId :: Id -> Bool
- isClassPred :: PredType -> Bool
- getClassPredTys_maybe :: PredType -> Maybe (Class, [Type])
- getClassPredTys :: HasDebugCallStack => PredType -> (Class, [Type])
- mkRepReflCo :: Type -> Coercion
- data Literal
- data LitNumType = LitNumInt
- literalType :: Literal -> Type
- tyConAppArgs_maybe :: Type -> Maybe [Type]
- splitTyConApp :: Type -> (TyCon, [Type])
- splitFunTys :: Type -> ([Scaled Type], Type)
- splitFunTy_maybe :: Type -> Maybe (Mult, Type, Type)
- splitForAllTyCoVars :: Type -> ([TyCoVar], Type)
- splitAppTys :: Type -> (Type, [Type])
- piResultTys :: HasDebugCallStack => Type -> [Type] -> Type
- nonDetCmpType :: Type -> Type -> Ordering
- newTyConInstRhs :: TyCon -> [Type] -> Type
- isTyVarTy :: Type -> Bool
- isFunTy :: Type -> Bool
- irrelevantMult :: Scaled a -> a
- expandTypeSynonyms :: Type -> Type
- eqType :: Type -> Type -> Bool
- dropForAlls :: Type -> Type
- classifiesTypeWithValues :: Kind -> Bool
- pattern Many :: Mult
- primTyCons :: [TyCon]
- eqReprPrimTyCon :: TyCon
- eqPrimTyCon :: TyCon
- substTyWith :: HasCallStack => [TyVar] -> [Type] -> Type -> Type
- substTy :: HasCallStack => TCvSubst -> Type -> Type
- mkTvSubstPrs :: [(TyVar, Type)] -> TCvSubst
- emptyTvSubstEnv :: TvSubstEnv
- mkTyVarTys :: [TyVar] -> [Type]
- mkTyVarTy :: TyVar -> Type
- mkFunTy :: AnonArgFlag -> Mult -> Type -> Type -> Type
- mkForAllTys :: [TyCoVarBinder] -> Type -> Type
- data TyConBndrVis = AnonTCB AnonArgFlag
- type TyConBinder = VarBndr TyVar TyConBndrVis
- tyConSingleDataCon_maybe :: TyCon -> Maybe DataCon
- tyConFamInst_maybe :: TyCon -> Maybe (TyCon, [Type])
- tyConDataCons_maybe :: TyCon -> Maybe [DataCon]
- tyConDataCons :: TyCon -> [DataCon]
- tyConClass_maybe :: TyCon -> Maybe Class
- synTyConRhs_maybe :: TyCon -> Maybe Type
- synTyConDefn_maybe :: TyCon -> Maybe ([TyVar], Type)
- newTyConRhs :: TyCon -> ([TyVar], Type)
- mkKindTyCon :: Name -> [TyConBinder] -> Kind -> [Role] -> Name -> TyCon
- isVanillaAlgTyCon :: TyCon -> Bool
- isTypeSynonymTyCon :: TyCon -> Bool
- isPromotedDataCon :: TyCon -> Bool
- isPrimTyCon :: TyCon -> Bool
- isNewTyCon :: TyCon -> Bool
- isGadtSyntaxTyCon :: TyCon -> Bool
- isFamilyTyCon :: TyCon -> Bool
- isFamInstTyCon :: TyCon -> Bool
- isClassTyCon :: TyCon -> Bool
- isBoxedTupleTyCon :: TyCon -> Bool
- isAlgTyCon :: TyCon -> Bool
- varQual_RDR :: Module -> FastString -> RdrName
- times_RDR :: RdrName
- plus_RDR :: RdrName
- ordClassName :: Name
- ordClassKey :: Unique
- numericClassKeys :: [Unique]
- not_RDR :: RdrName
- negateName :: Name
- minus_RDR :: RdrName
- lt_RDR :: RdrName
- le_RDR :: RdrName
- itName :: Unique -> SrcSpan -> Name
- isStringClassName :: Name
- gt_RDR :: RdrName
- ge_RDR :: RdrName
- gHC_REAL :: Module
- fractionalClassKeys :: [Unique]
- fractionalClassKey :: Unique
- eqClassName :: Name
- eqClassKey :: Unique
- dollarIdKey :: Unique
- dATA_FOLDABLE :: Module
- bindMName :: Name
- and_RDR :: RdrName
- data Class
- classSCTheta :: Class -> [PredType]
- classSCSelIds :: Class -> [Id]
- classMethods :: Class -> [Id]
- classBigSig :: Class -> ([TyVar], [PredType], [Id], [ClassOpItem])
- classAllSelIds :: Class -> [Id]
- coercionKind :: Coercion -> Pair Type
- data Role
- data CoAxiomRule = CoAxiomRule FastString [Role] Role ([TypeEqn] -> Maybe TypeEqn)
- data CoAxiom (br :: BranchFlag)
- type Branched = 'Branched
- coAxiomTyCon :: forall (br :: BranchFlag). CoAxiom br -> TyCon
- type LocatedN = GenLocated SrcSpanAnnN
- noLocA :: a -> LocatedAn an a
- noAnnSrcSpan :: SrcSpan -> SrcAnn ann
- noAnn :: EpAnn a
- getLocA :: GenLocated (SrcSpanAnn' a) e -> SrcSpan
- data Annotation = Annotation {}
- data AnnTarget name = ModuleTarget Module
- type AnnPayload = Serialized
- findAnns :: Typeable a => ([Word8] -> a) -> AnnEnv -> CoreAnnTarget -> [a]
- data RdrName
- data ImportSpec = ImpSpec ImpDeclSpec ImpItemSpec
- data ImpItemSpec = ImpAll
- data ImpDeclSpec = ImpDeclSpec {
- is_mod :: ModuleName
- is_as :: ModuleName
- is_qual :: Bool
- is_dloc :: SrcSpan
- nameRdrName :: Name -> RdrName
- mkVarUnqual :: FastString -> RdrName
- mkUnqual :: NameSpace -> FastString -> RdrName
- mkQual :: NameSpace -> (FastString, FastString) -> RdrName
- mkGlobalRdrEnv :: [GlobalRdrElt] -> GlobalRdrEnv
- lookupGRE_RdrName :: RdrName -> GlobalRdrEnv -> [GlobalRdrElt]
- gresFromAvails :: Maybe ImportSpec -> [AvailInfo] -> [GlobalRdrElt]
- greMangledName :: GlobalRdrElt -> Name
- globalRdrEnvElts :: GlobalRdrEnv -> [GlobalRdrElt]
- getRdrName :: NamedThing thing => thing -> RdrName
- data AvailInfo
- greNameMangledName :: GreName -> Name
- availNames :: AvailInfo -> [Name]
- data CostCentre
- mkRnEnv2 :: InScopeSet -> RnEnv2
- emptyInScopeSet :: InScopeSet
- type VarSet = UniqSet Var
- unitVarSet :: Var -> VarSet
- extendVarSetList :: VarSet -> [Var] -> VarSet
- extendVarSet :: VarSet -> Var -> VarSet
- emptyVarSet :: VarSet
- elemVarSet :: Var -> VarSet -> Bool
- stableNameCmp :: Name -> Name -> Ordering
- nameStableString :: Name -> String
- nameSrcSpan :: Name -> SrcSpan
- nameSrcLoc :: Name -> SrcLoc
- nameModule_maybe :: Name -> Maybe Module
- nameModule :: HasDebugCallStack => Name -> Module
- mkSystemName :: Unique -> OccName -> Name
- mkInternalName :: Unique -> OccName -> SrcSpan -> Name
- isSystemName :: Name -> Bool
- isInternalName :: Name -> Bool
- isExternalName :: Name -> Bool
- getSrcSpan :: NamedThing a => a -> SrcSpan
- getOccString :: NamedThing a => a -> String
- mkVarOcc :: String -> OccName
- mkTyVarOcc :: String -> OccName
- mkTcOcc :: String -> OccName
- type TyVarBinder = VarBndr TyVar ArgFlag
- type DFunId = Id
- varUnique :: Var -> Unique
- tyVarKind :: TyVar -> Kind
- setVarUnique :: Var -> Unique -> Var
- setVarType :: Var -> Type -> Var
- setVarName :: Var -> Name -> Var
- mkTyVar :: Name -> Kind -> TyVar
- mkLocalVar :: IdDetails -> Name -> Mult -> Type -> IdInfo -> Id
- isTyVar :: Var -> Bool
- isLocalId :: Var -> Bool
- isId :: Var -> Bool
- isCoVar :: Var -> Bool
- idInfo :: HasDebugCallStack => Id -> IdInfo
- idDetails :: Id -> IdDetails
- binderVar :: VarBndr tv argf -> tv
- typeSymbolKind :: Kind
- tupleTyCon :: Boxity -> Arity -> TyCon
- tupleDataCon :: Boxity -> Arity -> DataCon
- naturalTy :: Type
- listTyCon :: TyCon
- liftedTypeKind :: Kind
- data DataCon
- dataConWrapId :: DataCon -> Id
- dataConWorkId :: DataCon -> Id
- dataConTyCon :: DataCon -> TyCon
- dataConName :: DataCon -> Name
- dataConFullSig :: DataCon -> ([TyVar], [TyCoVar], [EqSpec], ThetaType, [Scaled Type], Type)
- dataConFieldLabels :: DataCon -> [FieldLabel]
- dataConExTyCoVars :: DataCon -> [TyCoVar]
- tyConAppTyCon_maybe :: Type -> Maybe TyCon
- splitTyConApp_maybe :: HasDebugCallStack => Type -> Maybe (TyCon, [Type])
- mkTyConApp :: TyCon -> [Type] -> Type
- data UnivCoProvenance
- data Type
- data TyLit
- type PredType = Type
- type Kind = Type
- data Coercion
- = 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
- data TyThing
- data TyCon
- isTupleTyCon :: TyCon -> Bool
- isFunTyCon :: TyCon -> Bool
- data Bag a
- bagToList :: Bag a -> [a]
- data Pair a = Pair a a
- data WarnReason = NoReason
- data GeneralFlag
- data Phase = StopLn
- showSDocDump :: SDocContext -> SDoc -> String
- showSDoc :: DynFlags -> SDoc -> String
- showPpr :: Outputable a => DynFlags -> a -> String
- data TopLevelFlag = NotTopLevel
- data PromotionFlag = NotPromoted
- data PprPrec
- data InlinePragma
- data Boxity = Boxed
- type Arity = Int
- topPrec :: PprPrec
- noOccInfo :: OccInfo
- isStrongLoopBreaker :: OccInfo -> Bool
- isDeadOcc :: OccInfo -> Bool
- funPrec :: PprPrec
- data FieldLabel
- data LexicalFixity = Prefix
- data FixityDirection
- data Fixity = Fixity SourceText Int FixityDirection
- data IdInfo
- data IdDetails
- vanillaIdInfo :: IdInfo
- data VarBndr var argf = Bndr var argf
- data Var
- type TyVar = Var
- data Specificity = SpecifiedSpec
- type Id = Var
- data ArgFlag = Required
- data AnonArgFlag = VisArg
- data SourceText
- mkTHFractionalLit :: Rational -> FractionalLit
- mkIntegralLit :: Integral a => a -> IntegralLit
- moduleStableString :: Module -> String
- data ModLocation
- type ModuleNameWithIsBoot = GenWithIsBoot ModuleName
- data IsBootInterface
- data GenWithIsBoot mod
- unitString :: IsUnitId u => u -> String
- toUnitId :: Unit -> UnitId
- fsToUnit :: FastString -> Unit
- moduleNameString :: ModuleName -> String
- moduleNameFS :: ModuleName -> FastString
- mkModuleNameFS :: FastString -> ModuleName
- mkModuleName :: String -> ModuleName
- class NamedThing a where
- getOccName :: a -> OccName
- getName :: a -> Name
- data Name
- nameOccName :: Name -> OccName
- data UnhelpfulSpanReason
- data SrcSpan
- data SrcLoc
- data RealSrcSpan
- data RealSrcLoc
- type Located = GenLocated SrcSpan
- data GenLocated l e = L l e
- unLoc :: GenLocated l e -> e
- srcSpanToRealSrcSpan :: SrcSpan -> Maybe RealSrcSpan
- srcSpanStartLine :: RealSrcSpan -> Int
- srcSpanStartCol :: RealSrcSpan -> Int
- srcSpanFileName_maybe :: SrcSpan -> Maybe FastString
- srcSpanEndLine :: RealSrcSpan -> Int
- srcSpanEndCol :: RealSrcSpan -> Int
- srcLocLine :: RealSrcLoc -> Int
- srcLocFile :: RealSrcLoc -> FastString
- srcLocCol :: RealSrcLoc -> Int
- realSrcSpanStart :: RealSrcSpan -> RealSrcLoc
- noSrcSpan :: SrcSpan
- mkSrcSpan :: SrcLoc -> SrcLoc -> SrcSpan
- mkSrcLoc :: FastString -> Int -> Int -> SrcLoc
- mkRealSrcSpan :: RealSrcLoc -> RealSrcLoc -> RealSrcSpan
- mkRealSrcLoc :: FastString -> Int -> Int -> RealSrcLoc
- mkGeneralSrcSpan :: FastString -> SrcSpan
- isGoodSrcSpan :: SrcSpan -> Bool
- combineSrcSpans :: SrcSpan -> SrcSpan -> SrcSpan
- mkUniqSet :: Uniquable a => [a] -> UniqSet a
- class Monad m => MonadUnique (m :: Type -> Type) where
- getUniqueM :: m Unique
- data Unique
- class Uniquable a where
- mkUnique :: Char -> Int -> Unique
- hasKey :: Uniquable a => a -> Unique -> Bool
- getKey :: Unique -> Int
- data GhcException
- throwGhcExceptionIO :: GhcException -> IO a
- throwGhcException :: GhcException -> 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
- data OccName
- occNameString :: OccName -> String
- mkVarOccFS :: FastString -> OccName
- data FastString
- unpackFS :: FastString -> String
- sLit :: String -> PtrString
- mkFastStringByteString :: ByteString -> FastString
- mkFastString :: String -> FastString
- fsLit :: String -> FastString
- concatFS :: [FastString] -> FastString
- bytesFS :: FastString -> ByteString
- data Backend = Interpreter
- data DynFlags
- panic :: String -> a
- data UnitId
- type Module = GenModule Unit
- moduleName :: GenModule unit -> ModuleName
- moduleUnit :: GenModule unit -> unit
- 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
- data ModuleName
- data StableModule
- toStableModule :: Module -> StableModule
- renderModule :: Module -> String
- mkStableModule :: UnitId -> ModuleName -> StableModule
- data ApiComment
- fsToUnitId :: FastString -> UnitId
- moduleUnitId :: Module -> UnitId
- thisPackage :: DynFlags -> UnitId
- tyConRealArity :: TyCon -> Int
- getDependenciesModuleNames :: Dependencies -> [ModuleNameWithIsBoot]
- renderWithStyle :: DynFlags -> SDoc -> PprStyle -> String
- dataConSig :: DataCon -> ([TyCoVar], ThetaType, [Type], Type)
- relevantModules :: ModGuts -> Set Module
- parseModuleIO :: HscEnv -> ModSummary -> IO ParsedModule
- typecheckModuleIO :: HscEnv -> ParsedModule -> IO TypecheckedModuleLH
- desugarModuleIO :: HscEnv -> ModSummary -> TypecheckedModuleLH -> IO ModGuts
- apiComments :: ParsedModule -> [Located ApiComment]
- apiCommentsParsedSource :: Located HsModule -> [Located ApiComment]
- lookupModSummary :: HscEnv -> ModuleName -> Maybe ModSummary
- modInfoLookupNameIO :: HscEnv -> ModuleInfoLH -> Name -> IO (Maybe TyThing)
- moduleInfoTc :: HscEnv -> ModSummary -> TcGblEnv -> IO ModuleInfoLH
- isPatErrorAlt :: CoreAlt -> Bool
- qualifiedNameFS :: Name -> FastString
- showPprQualified :: Outputable a => a -> String
- showSDocQualified :: SDoc -> String
Documentation
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.
Plugin | |
|
liftIO :: MonadIO m => IO a -> m a #
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
deserializeWithData :: Data a => [Word8] -> a #
Use a Data
instance to implement a deserialization scheme dual to that of serializeWithData
fromSerialized :: Typeable a => ([Word8] -> a) -> Serialized -> Maybe a #
If the Serialized
value contains something of the given type, then use the specified deserializer to return Just
that.
Otherwise return Nothing
.
toSerialized :: Typeable a => (a -> [Word8]) -> a -> Serialized #
Put a Typeable value that we are able to actually turn into bytes into a Serialized
value ready for deserialization later
data TypecheckedModule #
The result of successful typechecking. It also contains the parser result.
Instances
ParsedMod TypecheckedModule | |
Defined in GHC | |
TypecheckedMod TypecheckedModule | |
Defined in GHC |
data DesugaredModule #
The result of successful desugaring (i.e., translation to core). Also contains all the information of a typechecked module.
Instances
DesugaredMod DesugaredModule | |
Defined in GHC coreModule :: DesugaredModule -> ModGuts # | |
ParsedMod DesugaredModule | |
Defined in GHC | |
TypecheckedMod DesugaredModule | |
Defined in GHC |
modInfoTopLevelScope :: ModuleInfo -> Maybe [Name] #
isDictonaryId :: Id -> Bool #
hscDesugar :: HscEnv -> ModSummary -> TcGblEnv -> IO ModGuts #
Convert a typechecked module to Core
tcRnLookupRdrName :: HscEnv -> LocatedN RdrName -> IO (Messages DecoratedSDoc, Maybe [Name]) #
Find all the Names that this RdrName could mean, in GHCi
getModuleInterface :: HscEnv -> Module -> IO (Messages DecoratedSDoc, Maybe ModIface) #
ASSUMES that the module is either in the HomePackageTable
or is
a package module with an interface on disk. If neither of these is
true, then the result will be an error indicating the interface
could not be found.
dsLExpr :: LHsExpr GhcTc -> DsM CoreExpr #
Replace the body of the function with this block to test the hsExprType
function in GHC.Tc.Utils.Zonk:
putSrcSpanDs loc $ do
{ core_expr <- dsExpr e
; if debugIsOn && not ( exprType core_expr eqType
hsExprType e -- ) then (assertPprPanic "compiler.GHCHsToCoreExpr.hs" 249 ( ppr e + dcolon + ppr (hsExprType e) $$ -- ppr core_expr + dcolon + ppr (exprType core_expr) )) else return ()
initDsWithModGuts :: HscEnv -> ModGuts -> DsM a -> IO (Messages DecoratedSDoc, Maybe a) #
tcInferSigma :: Bool -> LHsExpr GhcRn -> TcM TcSigmaType #
tcValBinds :: TopLevelFlag -> [(RecFlag, LHsBinds GhcRn)] -> [LSig GhcRn] -> TcM thing -> TcM ([(RecFlag, LHsBinds GhcTc)], thing) #
How should we choose which constraints to quantify over?
NoRestrictions | Quantify over any constraint that
satisfies |
Instances
Outputable InferMode | |
Defined in GHC.Tc.Solver |
simplifyInteractive :: WantedConstraints -> TcM (Bag EvBind) #
simplifyInfer :: TcLevel -> InferMode -> [TcIdSigInst] -> [(Name, TcTauType)] -> WantedConstraints -> TcM ([TcTyVar], [EvVar], TcEvBinds, Bool) #
captureTopConstraints :: TcM a -> TcM (a, WantedConstraints) #
cannotFindModule :: HscEnv -> ModuleName -> FindResult -> SDoc #
type CommandLineOption = String #
Command line options gathered from the -PModule.Name:stuff syntax are given to you as this type
purePlugin :: [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.
reportErrors :: [MsgEnvelope DecoratedSDoc] -> TcM () #
reportError :: MsgEnvelope DecoratedSDoc -> TcRn () #
pushTcLevelM :: TcM a -> TcM (TcLevel, a) #
mkLongErrAt :: SrcSpan -> SDoc -> SDoc -> TcRn (MsgEnvelope DecoratedSDoc) #
initIfaceTcRn :: IfG a -> TcRn a #
failWithTc :: SDoc -> TcM a #
failIfErrsM :: TcRn () #
discardConstraints :: TcM a -> TcM a #
Throw out any constraints emitted by the thing_inside
captureConstraints :: TcM a -> TcM (a, WantedConstraints) #
Instances
Outputable WhereFrom | |
Defined in GHC.Tc.Types |
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
).
Instances
ContainsModule TcGblEnv | |
Defined in GHC.Tc.Types extractModule :: TcGblEnv -> Module # |
Instances
ContainsHooks (Env gbl lcl) | |
Defined in GHC.Tc.Types extractHooks :: Env gbl lcl -> Hooks # | |
ContainsDynFlags (Env gbl lcl) | |
Defined in GHC.Tc.Types extractDynFlags :: Env gbl lcl -> DynFlags # | |
ContainsModule gbl => ContainsModule (Env gbl lcl) | |
Defined in GHC.Tc.Types extractModule :: Env gbl lcl -> Module # | |
ContainsLogger (Env gbl lcl) | |
Defined in GHC.Tc.Types extractLogger :: Env gbl lcl -> Logger # |
getSession :: GhcMonad m => m HscEnv #
A minimal implementation of a GhcMonad
. If you need a custom monad,
e.g., to maintain additional state consider wrapping this monad or using
GhcT
.
Instances
MonadFix Ghc | |
Defined in GHC.Driver.Monad | |
MonadIO Ghc | |
Defined in GHC.Driver.Monad | |
Applicative Ghc | |
Functor Ghc | |
Monad Ghc | |
MonadCatch Ghc | |
MonadMask Ghc | |
MonadThrow Ghc | |
Defined in GHC.Driver.Monad | |
GhcMonad Ghc | |
Defined in GHC.Driver.Monad getSession :: Ghc HscEnv # setSession :: HscEnv -> Ghc () # | |
HasDynFlags Ghc | |
Defined in GHC.Driver.Monad getDynFlags :: Ghc DynFlags # | |
HasLogger Ghc | |
Defined in GHC.Driver.Monad |
withSession :: GhcMonad m => (HscEnv -> m a) -> m a #
Call the argument with the current session.
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.
findExposedPackageModule :: HscEnv -> ModuleName -> Maybe FastString -> IO FindResult #
HscEnv is like Session
, except that some of the fields are immutable.
An HscEnv is used to compile a single module from plain Haskell source
code (after preprocessing) to either C, assembly or C--. It's also used
to store the dynamic linker state to allow for multiple linkers in the
same address space.
Things like the module graph don't change during a single compilation.
Historical note: "hsc" used to be the name of the compiler binary, when there was a separate driver and compiler. To compile a single module, the driver would invoke hsc on the source code... so nowadays we think of hsc as the layer of the compiler that deals with compiling a single module.
isNumericClass :: Class -> Bool #
lexprCtOrigin :: LHsExpr GhcRn -> CtOrigin #
Extract a suitable CtOrigin from a HsExpr
A ModGuts is carried through the compiler, accumulating stuff as it goes
There is only one ModGuts at any time, the one for the module
being compiled right now. Once it is compiled, a ModIface
and
ModDetails
are extracted and the ModGuts is discarded.
data ExternalPackageState #
Information about other packages that we have slurped in by reading their interface files
type HomePackageTable = DModuleNameEnv HomeModInfo #
Helps us find information about modules in the home package
data HomeModInfo #
Information about modules in the package being compiled
lookupHpt :: HomePackageTable -> ModuleName -> Maybe HomeModInfo #
data ModIface_ (phase :: ModIfacePhase) #
A ModIface_
plus a ModDetails
summarises everything we know
about a compiled module. The ModIface_
is the stuff *before* linking,
and can be written out to an interface file. The 'ModDetails is after
linking and can be completely recovered from just the ModIface_
.
When we read an interface file, we also construct a ModIface_
from it,
except that we explicitly make the mi_decls
and a few other fields empty;
as when reading we consolidate the declarations etc. into a number of indexed
maps and environments in the ExternalPackageState
.
Instances
Binary ModIface | |
(NFData (IfaceBackendExts phase), NFData (IfaceDeclExts phase)) => NFData (ModIface_ phase) | |
Defined in GHC.Unit.Module.ModIface |
data ModSummary #
Data for a module node in a ModuleGraph
. Module nodes of the module graph
are one of:
- A regular Haskell source module
- A hi-boot source module
Instances
Outputable ModSummary | |
Defined in GHC.Unit.Module.ModSummary ppr :: ModSummary -> SDoc # |
ms_mod_name :: ModSummary -> ModuleName #
Haskell Module
All we actually declare here is the top-level structure for a module.
Instances
Data HsModule | |
Defined in GHC.Hs gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsModule -> c HsModule # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HsModule # toConstr :: HsModule -> Constr # dataTypeOf :: HsModule -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c HsModule) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HsModule) # gmapT :: (forall b. Data b => b -> b) -> HsModule -> HsModule # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsModule -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsModule -> r # gmapQ :: (forall d. Data d => d -> u) -> HsModule -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsModule -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsModule -> m HsModule # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsModule -> m HsModule # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsModule -> m HsModule # | |
Outputable HsModule | |
pAT_ERROR_ID :: Id #
mkCoreLets :: [CoreBind] -> CoreExpr -> CoreExpr #
Bind a list of binding groups over an expression. The leftmost binding group becomes the outermost group in the resulting expression
mkCoreLams :: [CoreBndr] -> CoreExpr -> CoreExpr #
Create a lambda where the given expression has a number of variables bound over it. The leftmost binder is that bound by the outermost lambda in the result
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
nlHsTyConApp :: forall (p :: Pass) a. IsSrcSpanAnn p a => LexicalFixity -> IdP (GhcPass p) -> [LHsTypeArg (GhcPass p)] -> LHsType (GhcPass p) #
nlHsFunTy :: forall (p :: Pass). LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p) #
nlHsAppTy :: forall (p :: Pass). LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p) #
mkHsLam :: forall (p :: Pass). (IsPass p, XMG (GhcPass p) (LHsExpr (GhcPass p)) ~ NoExtField) => [LPat (GhcPass p)] -> LHsExpr (GhcPass p) -> LHsExpr (GhcPass p) #
mkHsIntegral :: IntegralLit -> HsOverLit GhcPs #
mkHsApp :: forall (id :: Pass). LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) #
hsTypeToHsSigWcType :: LHsType GhcPs -> LHsSigWcType GhcPs #
Convert an LHsType
to an LHsSigWcType
.
hsTypeToHsSigType :: LHsType GhcPs -> LHsSigType GhcPs #
Convert an LHsType
to an LHsSigType
.
mkHsForAllInvisTele :: forall (p :: Pass). EpAnnForallTy -> [LHsTyVarBndr Specificity (GhcPass p)] -> HsForAllTelescope (GhcPass p) #
A Haskell Declaration
Instances
type Anno (HsDecl (GhcPass _1)) | |
Defined in GHC.Hs.Decls |
Signatures and pragmas
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
|
FixSig (XFixSig pass) (FixitySig pass) | An ordinary fixity declaration infixl 8 *** |
InlineSig (XInlineSig pass) (LIdP pass) InlinePragma | An inline pragma {#- INLINE f #-} |
Instances
type Anno (Sig (GhcPass p)) | |
Defined in GHC.Hs.Binds |
Fixity Signature
FixitySig (XFixitySig pass) [LIdP pass] Fixity |
Instances
type Anno (FixitySig (GhcPass p)) | |
Defined in GHC.Hs.Binds |
= XRec pass (HsType pass) | May have |
Located Haskell Type
Haskell Type
HsForAllTy (XForAllTy pass) (HsForAllTelescope pass) (LHsType pass) |
|
HsQualTy (XQualTy pass) (Maybe (LHsContext pass)) (LHsType pass) | |
HsTyVar (XTyVar pass) PromotionFlag (LIdP pass) |
|
HsAppTy (XAppTy pass) (LHsType pass) (LHsType pass) |
|
HsWildCardTy (XWildCardTy pass) |
|
Instances
DisambTD (HsType GhcPs) | |
Defined in GHC.Parser.PostProcess 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.
UserTyVar (XUserTyVar pass) flag (LIdP 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 |
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]
.
HsSig (XHsSig pass) (HsOuterSigTyVarBndrs pass) (LHsType pass) |
Instances
type Anno (HsSigType (GhcPass p)) | |
Defined in GHC.Hs.Type |
data HsOuterTyVarBndrs flag pass #
The outermost type variables in a type that obeys the forall
-or-nothing
rule. See Note [forall-or-nothing rule]
.
HsOuterImplicit (XHsOuterImplicit pass) | Implicit forall, e.g.,
|
Instances
type Anno (HsOuterTyVarBndrs _1 (GhcPass _2)) | |
Defined in GHC.Hs.Type |
HsValArg tm |
Instances
(Outputable tm, Outputable ty) => Outputable (HsArg tm ty) | |
Defined in Language.Haskell.Syntax.Type |
type LImportDecl pass #
= XRec pass (ImportDecl pass) | When in a list this may have |
Located Import Declaration
ideclAs :: ImportDecl pass -> Maybe (XRec pass ModuleName) #
as Module
ideclName :: ImportDecl pass -> XRec pass ModuleName #
Module name.
occurAnalysePgm :: Module -> (Id -> Bool) -> (Activation -> Bool) -> [CoreRule] -> CoreProgram -> CoreProgram #
substExpr :: HasDebugCallStack => Subst -> CoreExpr -> CoreExpr #
substExpr applies a substitution to an entire CoreExpr
. Remember,
you may only apply the substitution once:
See Note [Substitutions apply only once] in GHC.Core.TyCo.Subst
Do *not* attempt to short-cut in the case of an empty substitution! See Note [Extending the Subst]
extendCvSubst :: Subst -> CoVar -> Coercion -> Subst #
Add a substitution from a CoVar
to a Expr
to the Subst
:
you must ensure that the in-scope set satisfies
GHC.Core.TyCo.Subst Note [The substitution invariant]
after extending the substitution like this
emptySubst :: Subst #
deShadowBinds :: CoreProgram -> CoreProgram #
De-shadowing the program is sometimes a useful pre-pass. It can be done simply by running over the bindings with an empty substitution, because substitution returns a result that has no-shadowing guaranteed.
(Actually, within a single type there might still be shadowing, because
substTy
is a no-op for the empty substitution, but that's probably OK.)
- Aug 09
- This function is not used in GHC at the moment, but seems so short and simple that I'm going to leave it here
exprType :: CoreExpr -> Type #
Recover the type of a well-typed Core expression. Fails when
applied to the actual Type
expression as it cannot
really be said to have a type
Instances
Data TcEvBinds | |
Defined in GHC.Tc.Types.Evidence 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 |
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.
Instances
Data ClsInst | |
Defined in GHC.Core.InstEnv 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 |
instanceDFunId :: ClsInst -> DFunId #
instEnvElts :: InstEnv -> [ClsInst] #
exprFreeVarsList :: CoreExpr -> [Var] #
Find all locally-defined free Ids or type variables in an expression returning a deterministically ordered list.
data IfaceAnnotation #
Instances
NFData IfaceAnnotation | |
Defined in GHC.Iface.Syntax rnf :: IfaceAnnotation -> () # | |
Binary IfaceAnnotation | |
Defined in GHC.Iface.Syntax put_ :: BinHandle -> IfaceAnnotation -> IO () # put :: BinHandle -> IfaceAnnotation -> IO (Bin IfaceAnnotation) # get :: BinHandle -> IO IfaceAnnotation # | |
Outputable IfaceAnnotation | |
Defined in GHC.Iface.Syntax ppr :: IfaceAnnotation -> SDoc # |
trueDataConId :: Id #
trueDataCon :: DataCon #
nilDataCon :: DataCon #
listTyConName :: Name #
intTyConName :: Name #
intDataCon :: DataCon #
falseDataConId :: Id #
falseDataCon :: DataCon #
consDataCon :: DataCon #
charDataCon :: DataCon #
boolTyConName :: Name #
realIdUnfolding :: Id -> Unfolding #
modifyIdInfo :: HasDebugCallStack => (IdInfo -> IdInfo) -> Id -> Id #
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
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]
isRecordSelector :: Id -> Bool #
isConLikeId :: Id -> Bool #
isClassOpId_maybe :: Id -> Maybe Class #
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
Constant applicative form Information
Records whether an Id
makes Constant Applicative Form references
NoCafRefs | A function or static constructor that refers to no CAFs. |
Instances
Outputable CafInfo | |
Defined in GHC.Types.Id.Info | |
Eq CafInfo | |
Ord CafInfo | |
setOccInfo :: IdInfo -> OccInfo -> IdInfo infixl 1 #
setCafInfo :: IdInfo -> CafInfo -> IdInfo infixl 1 #
mayHaveCafRefs :: CafInfo -> Bool #
Records the unfolding of an identifier, which is approximately the form the identifier would have if we substituted its definition in for the identifier. This type should be treated as abstract everywhere except in GHC.Core.Unfold
DFunUnfolding [Var] DataCon [CoreExpr] | |
CoreUnfolding CoreExpr UnfoldingSource Bool Bool Bool Bool Bool UnfoldingGuidance | An unfolding with redundant cached information. Parameters: uf_tmpl: Template used to perform unfolding; NB: Occurrence info is guaranteed correct: see Note [OccInfo in unfoldings and rules] uf_is_top: Is this a top level binding? uf_is_value: uf_is_work_free: Does this waste only a little work if we expand it inside an inlining?
Basically this is a cached version of uf_guidance: Tells us about the size of the unfolding template |
This is the data type that represents GHCs core intermediate language. Currently GHC uses System FC https://www.microsoft.com/en-us/research/publication/system-f-with-type-equality-coercions/ for this purpose, which is closely related to the simpler and better known System F http://en.wikipedia.org/wiki/System_F.
We get from Haskell source to this Core language in a number of stages:
- The source code is parsed into an abstract syntax tree, which is represented
by the data type
HsExpr
with the names beingRdrNames
- This syntax tree is renamed, which attaches a
Unique
to everyRdrName
(yielding aName
) to disambiguate identifiers which are lexically identical. For example, this program:
f x = let f x = x + 1 in f (x - 2)
Would be renamed by having Unique
s attached so it looked something like this:
f_1 x_2 = let f_3 x_4 = x_4 + 1 in f_3 (x_2 - 2)
But see Note [Shadowing] below.
- The resulting syntax tree undergoes type checking (which also deals with instantiating
type class arguments) to yield a
HsExpr
type that hasId
as it's names. - Finally the syntax tree is desugared from the expressive
HsExpr
type into thisExpr
type, which has far fewer constructors and hence is easier to perform optimization, analysis and code generation on.
The type parameter b
is for the type of binders in the expression tree.
The language consists of the following elements:
- Variables See Note [Variable occurrences in Core]
- Primitive literals
- Applications: note that the argument may be a
Expr
. See Note [Core let/app invariant] See Note [Levity polymorphism invariants] - Lambda abstraction See Note [Levity polymorphism invariants]
- Recursive and non recursive
let
s. Operationally this corresponds to allocating a thunk for the things bound and then executing the sub-expression.
See Note [Core letrec invariant] See Note [Core let/app invariant] See Note [Levity polymorphism invariants] See Note [Core type and coercion invariant]
- Case expression. Operationally this corresponds to evaluating the scrutinee (expression examined) to weak head normal form and then examining at most one level of resulting constructor (i.e. you cannot do nested pattern matching directly with this).
The binder gets bound to the value of the scrutinee,
and the Expr
must be that of all the case alternatives
IMPORTANT: see Note [Case expression invariants]
- Cast an expression to a particular type.
This is used to implement
newtype
s (anewtype
constructor or destructor just becomes aCast
in Core) and GADTs. - Ticks. These are used to represent all the source annotation we support: profiling SCCs, HPC ticks, and GHCi breakpoints.
- A type: this should only show up at the top level of an Arg
- A coercion
Var Id | |
Lit Literal | |
App (Expr b) (Arg b) infixl 4 | |
Lam b (Expr b) | |
Let (Bind b) (Expr b) | |
Case (Expr b) b Type [Alt b] | |
Cast (Expr b) CoercionR | |
Tick CoreTickish (Expr b) | |
Type Type | |
Coercion Coercion |
Instances
Show CoreExpr Source # | |
Subable CoreExpr Source # | |
Data b => Data (Expr b) | |
Defined in GHC.Core gfoldl :: (forall d b0. Data d => c (d -> b0) -> d -> c b0) -> (forall g. g -> c g) -> Expr b -> c (Expr b) # gunfold :: (forall b0 r. Data b0 => c (b0 -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Expr b) # toConstr :: Expr b -> Constr # dataTypeOf :: Expr b -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Expr b)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Expr b)) # gmapT :: (forall b0. Data b0 => b0 -> b0) -> Expr b -> Expr b # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Expr b -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Expr b -> r # gmapQ :: (forall d. Data d => d -> u) -> Expr b -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Expr b -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Expr b -> m (Expr b) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Expr b -> m (Expr b) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Expr b -> m (Expr b) # | |
PPrint (Expr Var) Source # | |
Defined in Language.Haskell.Liquid.Types.PrettyPrint | |
CBVisitable (Expr Var) Source # | |
Show (Axiom Var Type CoreExpr) Source # | |
type CoreProgram = [CoreBind] #
The common case for the type of binders and variables when we are manipulating the Core language within GHC
Binding, used for top level bindings in a module and local bindings in a let
.
Instances
CBVisitable CoreBind Source # | |
Data b => Data (Bind b) | |
Defined in GHC.Core gfoldl :: (forall d b0. Data d => c (d -> b0) -> d -> c b0) -> (forall g. g -> c g) -> Bind b -> c (Bind b) # gunfold :: (forall b0 r. Data b0 => c (b0 -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Bind b) # toConstr :: Bind b -> Constr # dataTypeOf :: Bind b -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Bind b)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Bind b)) # gmapT :: (forall b0. Data b0 => b0 -> b0) -> Bind b -> Bind b # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Bind b -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Bind b -> r # gmapQ :: (forall d. Data d => d -> u) -> Bind b -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Bind b -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Bind b -> m (Bind b) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Bind b -> m (Bind b) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Bind b -> m (Bind b) # | |
PPrint (Bind Var) Source # | |
Defined in Language.Haskell.Liquid.Types.PrettyPrint | |
Subable (Bind Var) Source # | |
CBVisitable [CoreBind] Source # | |
A case alternative constructor (i.e. pattern match)
DataAlt DataCon | |
LitAlt Literal | A literal: |
DEFAULT | Trivial alternative: |
Instances
Data AltCon | |
Defined in GHC.Core gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AltCon -> c AltCon # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AltCon # toConstr :: AltCon -> Constr # dataTypeOf :: AltCon -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c AltCon) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AltCon) # gmapT :: (forall b. Data b => b -> b) -> AltCon -> AltCon # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AltCon -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AltCon -> r # gmapQ :: (forall d. Data d => d -> u) -> AltCon -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> AltCon -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> AltCon -> m AltCon # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AltCon -> m AltCon # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AltCon -> m AltCon # | |
Outputable AltCon | |
Eq AltCon | |
Ord AltCon | |
CBVisitable AltCon Source # | |
A case split alternative. Consists of the constructor leading to the alternative,
the variables bound from the constructor, and the expression to be executed given that binding.
The default alternative is (DEFAULT, [], rhs)
Instances
Data b => Data (Alt b) | |
Defined in GHC.Core gfoldl :: (forall d b0. Data d => c (d -> b0) -> d -> c b0) -> (forall g. g -> c g) -> Alt b -> c (Alt b) # gunfold :: (forall b0 r. Data b0 => c (b0 -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Alt b) # dataTypeOf :: Alt b -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Alt b)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Alt b)) # gmapT :: (forall b0. Data b0 => b0 -> b0) -> Alt b -> Alt b # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Alt b -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Alt b -> r # gmapQ :: (forall d. Data d => d -> u) -> Alt b -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Alt b -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Alt b -> m (Alt b) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Alt b -> m (Alt b) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Alt b -> m (Alt b) # | |
Subable (Alt Var) Source # | |
CBVisitable (Alt Var) Source # | |
mkTyApps :: Expr b -> [Type] -> Expr b infixl 4 #
Apply a list of type argument expressions to a function expression in a nested fashion
mkLams :: [b] -> Expr b -> Expr b #
Bind all supplied binders over an expression in a nested lambda expression. Prefer to
use mkCoreLams
if possible
mkApps :: Expr b -> [Arg b] -> Expr b infixl 4 #
Apply a list of argument expressions to a function expression in a nested fashion. Prefer to
use mkCoreApps
if possible
maybeUnfoldingTemplate :: Unfolding -> Maybe CoreExpr #
Retrieves the template of an unfolding if possible maybeUnfoldingTemplate is used mainly wnen specialising, and we do want to specialise DFuns, so it's important to return a template for DFunUnfoldings
flattenBinds :: [Bind b] -> [(b, Expr b)] #
Collapse all the bindings in the supplied groups into a single
list of lhs/rhs pairs suitable for binding in a Rec
binding group
collectTyBinders :: CoreExpr -> ([TyVar], CoreExpr) #
collectBinders :: Expr b -> ([b], Expr b) #
We often want to strip off leading lambdas before getting down to
business. Variants are collectTyBinders
, collectValBinders
,
and collectTyAndValBinders
collectArgs :: Expr b -> (Expr b, [Arg b]) #
Takes a nested application expression and returns the function being applied and the arguments to which it is applied
data GenTickish (pass :: TickishPass) #
ProfNote | An |
| |
HpcTick | A "tick" used by HPC to track the execution of each subexpression in the original source code. |
| |
Breakpoint | A breakpoint for the GHCi debugger. This behaves like an HPC tick, but has a list of free variables which will be available for inspection in GHCi when the program stops at the breakpoint. NB. we must take account of these Ids when (a) counting free variables, and (b) substituting (don't substitute for them) |
| |
SourceNote | A source note. Source notes are pure annotations: Their presence should neither influence compilation nor execution. The semantics are given by causality: The presence of a source note means that a local change in the referenced source code span will possibly provoke the generated code to change. On the flip-side, the functionality of annotated code *must* be invariant against changes to all source code *except* the spans referenced in the source notes (see "Causality of optimized Haskell" paper for details). Therefore extending the scope of any given source note is always valid. Note that it is still undesirable though, as this reduces their usefulness for debugging and profiling. Therefore we will generally try only to make use of this property where it is necessary to enable optimizations. |
|
Instances
Data (GenTickish 'TickishPassCmm) | |
Defined in GHC.Types.Tickish gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GenTickish 'TickishPassCmm -> c (GenTickish 'TickishPassCmm) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (GenTickish 'TickishPassCmm) # toConstr :: GenTickish 'TickishPassCmm -> Constr # dataTypeOf :: GenTickish 'TickishPassCmm -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (GenTickish 'TickishPassCmm)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (GenTickish 'TickishPassCmm)) # gmapT :: (forall b. Data b => b -> b) -> GenTickish 'TickishPassCmm -> GenTickish 'TickishPassCmm # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GenTickish 'TickishPassCmm -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GenTickish 'TickishPassCmm -> r # gmapQ :: (forall d. Data d => d -> u) -> GenTickish 'TickishPassCmm -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> GenTickish 'TickishPassCmm -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> GenTickish 'TickishPassCmm -> m (GenTickish 'TickishPassCmm) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GenTickish 'TickishPassCmm -> m (GenTickish 'TickishPassCmm) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GenTickish 'TickishPassCmm -> m (GenTickish 'TickishPassCmm) # | |
Data (GenTickish 'TickishPassCore) | |
Defined in GHC.Types.Tickish gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GenTickish 'TickishPassCore -> c (GenTickish 'TickishPassCore) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (GenTickish 'TickishPassCore) # toConstr :: GenTickish 'TickishPassCore -> Constr # dataTypeOf :: GenTickish 'TickishPassCore -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (GenTickish 'TickishPassCore)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (GenTickish 'TickishPassCore)) # gmapT :: (forall b. Data b => b -> b) -> GenTickish 'TickishPassCore -> GenTickish 'TickishPassCore # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GenTickish 'TickishPassCore -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GenTickish 'TickishPassCore -> r # gmapQ :: (forall d. Data d => d -> u) -> GenTickish 'TickishPassCore -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> GenTickish 'TickishPassCore -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> GenTickish 'TickishPassCore -> m (GenTickish 'TickishPassCore) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GenTickish 'TickishPassCore -> m (GenTickish 'TickishPassCore) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GenTickish 'TickishPassCore -> m (GenTickish 'TickishPassCore) # | |
Data (GenTickish 'TickishPassStg) | |
Defined in GHC.Types.Tickish gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GenTickish 'TickishPassStg -> c (GenTickish 'TickishPassStg) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (GenTickish 'TickishPassStg) # toConstr :: GenTickish 'TickishPassStg -> Constr # dataTypeOf :: GenTickish 'TickishPassStg -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (GenTickish 'TickishPassStg)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (GenTickish 'TickishPassStg)) # gmapT :: (forall b. Data b => b -> b) -> GenTickish 'TickishPassStg -> GenTickish 'TickishPassStg # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GenTickish 'TickishPassStg -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GenTickish 'TickishPassStg -> r # gmapQ :: (forall d. Data d => d -> u) -> GenTickish 'TickishPassStg -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> GenTickish 'TickishPassStg -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> GenTickish 'TickishPassStg -> m (GenTickish 'TickishPassStg) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GenTickish 'TickishPassStg -> m (GenTickish 'TickishPassStg) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GenTickish 'TickishPassStg -> m (GenTickish 'TickishPassStg) # | |
Eq (GenTickish 'TickishPassCmm) | |
Defined in GHC.Types.Tickish (==) :: GenTickish 'TickishPassCmm -> GenTickish 'TickishPassCmm -> Bool # (/=) :: GenTickish 'TickishPassCmm -> GenTickish 'TickishPassCmm -> Bool # | |
Eq (GenTickish 'TickishPassCore) | |
Defined in GHC.Types.Tickish (==) :: GenTickish 'TickishPassCore -> GenTickish 'TickishPassCore -> Bool # (/=) :: GenTickish 'TickishPassCore -> GenTickish 'TickishPassCore -> Bool # | |
Ord (GenTickish 'TickishPassCmm) | |
Defined in GHC.Types.Tickish compare :: GenTickish 'TickishPassCmm -> GenTickish 'TickishPassCmm -> Ordering # (<) :: GenTickish 'TickishPassCmm -> GenTickish 'TickishPassCmm -> Bool # (<=) :: GenTickish 'TickishPassCmm -> GenTickish 'TickishPassCmm -> Bool # (>) :: GenTickish 'TickishPassCmm -> GenTickish 'TickishPassCmm -> Bool # (>=) :: GenTickish 'TickishPassCmm -> GenTickish 'TickishPassCmm -> Bool # max :: GenTickish 'TickishPassCmm -> GenTickish 'TickishPassCmm -> GenTickish 'TickishPassCmm # min :: GenTickish 'TickishPassCmm -> GenTickish 'TickishPassCmm -> GenTickish 'TickishPassCmm # | |
Ord (GenTickish 'TickishPassCore) | |
Defined in GHC.Types.Tickish compare :: GenTickish 'TickishPassCore -> GenTickish 'TickishPassCore -> Ordering # (<) :: GenTickish 'TickishPassCore -> GenTickish 'TickishPassCore -> Bool # (<=) :: GenTickish 'TickishPassCore -> GenTickish 'TickishPassCore -> Bool # (>) :: GenTickish 'TickishPassCore -> GenTickish 'TickishPassCore -> Bool # (>=) :: GenTickish 'TickishPassCore -> GenTickish 'TickishPassCore -> Bool # max :: GenTickish 'TickishPassCore -> GenTickish 'TickishPassCore -> GenTickish 'TickishPassCore # min :: GenTickish 'TickishPassCore -> GenTickish 'TickishPassCore -> GenTickish 'TickishPassCore # |
type CoreTickish = GenTickish 'TickishPassCore #
= XRec p (HsExpr p) | May have |
Located Haskell Expression
A Haskell expression.
HsVar (XVar p) (LIdP p) | Variable See Note [Located RdrNames] |
HsOverLit (XOverLitE p) (HsOverLit p) | Overloaded literals |
ExprWithTySig (XExprWithTySig p) (LHsExpr p) (LHsSigWcType (NoGhcTc p)) | Expression with an explicit type signature. |
Instances
Maps the "normal" id type for a given pass
Used when constructing a term with an unused extension point.
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
).
Found ModLocation Module | The module was found |
NoPackage Unit | The requested unit was not found |
FoundMultiple [(Module, ModuleOrigin)] | _Error_: both in multiple packages |
NotFound [FilePath] (Maybe Unit) [Unit] [Unit] [(Unit, UnusableUnitReason)] [ModuleSuggestion] | Not found |
:: MonadIO m | |
=> Logger | |
-> DynFlags | DynFlags |
-> SDoc | The name of the phase |
-> (a -> ()) | A function to force the result
(often either |
-> m a | The body of the phase to be timed |
-> m a |
Time a compilation phase.
When timings are enabled (e.g. with the -v2
flag), the allocations
and CPU time used by the phase will be reported to stderr. Consider
a typical usage:
withTiming getDynFlags (text "simplify") force PrintTimings pass
.
When timings are enabled the following costs are included in the
produced accounting,
- The cost of executing
pass
to a resultr
in WHNF - The cost of evaluating
force r
to WHNF (e.g.()
)
The choice of the force
function depends upon the amount of forcing
desired; the goal here is to ensure that the cost of evaluating the result
is, to the greatest extent possible, included in the accounting provided by
withTiming
. Often the pass already sufficiently forces its result during
construction; in this case const ()
is a reasonable choice.
In other cases, it is necessary to evaluate the result to normal form, in
which case something like Control.DeepSeq.rnf
is appropriate.
To avoid adversely affecting compiler performance when timings are not requested, the result is only forced when timings are enabled.
See Note [withTiming] for more.
getDynFlags :: HasDynFlags m => m DynFlags #
The GhcMode
tells us whether we're doing multi-module
compilation (controlled via the GHC API) or one-shot
(single-module) compilation. This makes a difference primarily to
the GHC.Unit.Finder: in one-shot mode we look for interface files for
imported modules, but in multi-module mode we look for source files
in order to check whether they need to be recompiled.
CompManager |
|
What to do in the link step, if there is one.
LinkInMemory | Use the in-memory dynamic linker (works for both bytecode and object code). |
updOptLevel :: Int -> DynFlags -> DynFlags #
Sets the DynFlags
to be appropriate to the optimisation level
gopt_set :: DynFlags -> GeneralFlag -> DynFlags #
Set a GeneralFlag
gopt :: GeneralFlag -> DynFlags -> Bool #
Test whether a GeneralFlag
is set
Note that dynamicNow
(i.e., dynamic objects built with `-dynamic-too`)
always implicitly enables Opt_PIC, Opt_ExternalDynamicRefs, and disables
Opt_SplitSections.
data SourceError #
A source error is an error that is caused by one or more errors in the
source code. A SourceError
is thrown by many functions in the
compilation pipeline. Inside GHC these errors are merely printed via
log_action
, but API clients may treat them differently, for example,
insert them into a list box. If you want the default behaviour, use the
idiom:
handleSourceError printExceptionAndWarnings $ do ... api calls that may fail ...
The SourceError
s error messages can be accessed via srcErrorMessages
.
This list may be empty if the compiler failed due to -Werror
(Opt_WarnIsError
).
See printExceptionAndWarnings
for more information on what to take care
of when writing a custom error handler.
Instances
Exception SourceError | |
Defined in GHC.Types.SourceError | |
Show SourceError | |
Defined in GHC.Types.SourceError showsPrec :: Int -> SourceError -> ShowS # show :: SourceError -> String # showList :: [SourceError] -> ShowS # | |
PPrint SourceError Source # | |
Defined in Language.Haskell.Liquid.Types.PrettyPrint pprintTidy :: Tidy -> SourceError -> Doc # pprintPrec :: Int -> Tidy -> SourceError -> Doc # | |
Result SourceError Source # | |
Defined in Language.Haskell.Liquid.GHC.Interface |
data MsgEnvelope e #
An envelope for GHC's facts about a running program, parameterised over the domain-specific (i.e. parsing, typecheck-renaming, etc) diagnostics.
To say things differently, GHC emits diagnostics about the running program, each of which is wrapped
into a MsgEnvelope
that carries specific information like where the error happened, its severity, etc.
Finally, multiple MsgEnvelope
s are aggregated into Messages
that are returned to the user.
Instances
Functor MsgEnvelope | |
Defined in GHC.Types.Error fmap :: (a -> b) -> MsgEnvelope a -> MsgEnvelope b # (<$) :: a -> MsgEnvelope b -> MsgEnvelope a # | |
Show (MsgEnvelope DecoratedSDoc) | |
Defined in GHC.Types.Error showsPrec :: Int -> MsgEnvelope DecoratedSDoc -> ShowS # show :: MsgEnvelope DecoratedSDoc -> String # showList :: [MsgEnvelope DecoratedSDoc] -> ShowS # | |
PPrint (MsgEnvelope DecoratedSDoc) Source # | A whole bunch of PPrint instances follow ---------------------------------- |
Defined in Language.Haskell.Liquid.Types.PrettyPrint pprintTidy :: Tidy -> MsgEnvelope DecoratedSDoc -> Doc # pprintPrec :: Int -> Tidy -> MsgEnvelope DecoratedSDoc -> Doc # |
A collection of messages emitted by GHC during error reporting. A diagnostic message is typically a warning or an error. See Note [Messages].
data DecoratedSDoc #
A DecoratedSDoc
is isomorphic to a '[SDoc]' but it carries the invariant that the input '[SDoc]'
needs to be rendered decorated into its final form, where the typical case would be adding bullets
between each elements of the list.
The type of decoration depends on the formatting function used, but in practice GHC uses the
formatBulleted
.
Instances
RenderableDiagnostic DecoratedSDoc | |
Defined in GHC.Types.Error | |
Show (MsgEnvelope DecoratedSDoc) | |
Defined in GHC.Types.Error showsPrec :: Int -> MsgEnvelope DecoratedSDoc -> ShowS # show :: MsgEnvelope DecoratedSDoc -> String # showList :: [MsgEnvelope DecoratedSDoc] -> ShowS # | |
PPrint (MsgEnvelope DecoratedSDoc) Source # | A whole bunch of PPrint instances follow ---------------------------------- |
Defined in Language.Haskell.Liquid.Types.PrettyPrint pprintTidy :: Tidy -> MsgEnvelope DecoratedSDoc -> Doc # pprintPrec :: Int -> Tidy -> MsgEnvelope DecoratedSDoc -> Doc # |
A constructor-like thing
Instances
Data ConLike | |
Defined in GHC.Core.ConLike gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ConLike -> c ConLike # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ConLike # toConstr :: ConLike -> Constr # dataTypeOf :: ConLike -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ConLike) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ConLike) # gmapT :: (forall b. Data b => b -> b) -> ConLike -> ConLike # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ConLike -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ConLike -> r # gmapQ :: (forall d. Data d => d -> u) -> ConLike -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ConLike -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ConLike -> m ConLike # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ConLike -> m ConLike # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ConLike -> m ConLike # | |
NamedThing ConLike | |
Defined in GHC.Core.ConLike | |
Uniquable ConLike | |
Defined in GHC.Core.ConLike | |
Outputable ConLike | |
Defined in GHC.Core.ConLike | |
OutputableBndr ConLike | |
Defined in GHC.Core.ConLike pprBndr :: BindingSite -> ConLike -> SDoc # pprPrefixOcc :: ConLike -> SDoc # pprInfixOcc :: ConLike -> SDoc # bndrIsJoin_maybe :: ConLike -> Maybe Int # | |
Eq ConLike | |
type Anno ConLike | |
Defined in GHC.Hs.Pat |
data StrictnessMark #
Instances
Outputable StrictnessMark | |
Defined in GHC.Core.DataCon ppr :: StrictnessMark -> SDoc # |
isVanillaDataCon :: DataCon -> Bool #
Vanilla DataCon
s are those that are nice boring Haskell 98 constructors
isTupleDataCon :: DataCon -> Bool #
dataConWrapperType :: DataCon -> Type #
The user-declared type of the data constructor in the nice-to-read form:
T :: forall a b. a -> b -> T [a]
rather than:
T :: forall a c. forall b. (c~[a]) => a -> b -> T c
The type variables are quantified in the order that the user wrote them.
See Note [DataCon user type variable binders]
.
NB: If the constructor is part of a data instance, the result type mentions the family tycon, not the internal one.
dataConWrapId_maybe :: DataCon -> Maybe Id #
Get the Id of the DataCon
wrapper: a function that wraps the "actual"
constructor so it has the type visible in the source program: c.f.
dataConWorkId
.
Returns Nothing if there is no wrapper, which occurs for an algebraic data
constructor and also for a newtype (whose constructor is inlined
compulsorily)
dataConUnivTyVars :: DataCon -> [TyVar] #
The universally-quantified type variables of the constructor
dataConTheta :: DataCon -> ThetaType #
The *full* constraints on the constructor type, including dependent GADT equalities.
dataConRepType :: DataCon -> Type #
The representation type of the data constructor, i.e. the sort type that will represent values of this type at runtime
dataConRepStrictness :: DataCon -> [StrictnessMark] #
Give the demands on the arguments of a Core constructor application (Con dc args)
dataConRepArgTys :: DataCon -> [Scaled Type] #
Returns the arg types of the worker, including *all* non-dependent evidence, after any flattening has been done and without substituting for any type variables
dataConOrigArgTys :: DataCon -> [Scaled Type] #
Returns the argument types of the wrapper, excluding all dictionary arguments and without substituting for any type variables
:: DataCon | A datacon with no existentials or equality constraints However, it can have a dcTheta (notably it can be a class dictionary, with superclasses) |
-> [Type] | Instantiated at these types |
-> [Scaled Type] |
Finds the instantiated types of the arguments required to construct a
DataCon
representation
NB: these INCLUDE any dictionary args
but EXCLUDE the data-declaration context, which is discarded
It's all post-flattening etc; this is a representation type
dataConImplicitTyThings :: DataCon -> [TyThing] #
Find all the Id
s implicitly brought into scope by the data constructor. Currently,
the union of the dataConWorkId
and the dataConWrapId
classDataCon :: Class -> DataCon #
type FamInstEnvs = (FamInstEnv, FamInstEnv) #
type FamInstEnv = UniqDFM TyCon FamilyInstEnv #
FamInst (CoAxiom Unbranched) FamFlavor Name [RoughMatchTc] [TyVar] [CoVar] [Type] Type |
Instances
NamedThing FamInst | |
Defined in GHC.Core.FamInstEnv | |
Outputable FamInst | |
Defined in GHC.Core.FamInstEnv |
topNormaliseType_maybe :: FamInstEnvs -> Type -> Maybe (Coercion, Type) #
Get rid of *outermost* (or toplevel) * type function redex * data family redex * newtypes returning an appropriate Representational coercion. Specifically, if topNormaliseType_maybe env ty = Just (co, ty') then (a) co :: ty ~R ty' (b) ty' is not a newtype, and is not a type-family or data-family redex
However, ty' can be something like (Maybe (F ty)), where (F ty) is a redex.
Always operates homogeneously: the returned type has the same kind as the original type, and the returned coercion is always homogeneous.
famInstEnvElts :: FamInstEnv -> [FamInst] #
tcUnifyTy :: Type -> Type -> Maybe TCvSubst #
Simple unification of two types; all type variables are bindable Precondition: the kinds are already equal
:: TyCoVarSet | template variables |
-> RnEnv2 | |
-> TvSubstEnv | type substitution to extend |
-> Type | Template |
-> Type | Target |
-> Maybe TvSubstEnv |
This one is called from the expression matcher, which already has a MatchEnv in hand
mkClassPred :: Class -> [Type] -> PredType #
isEvVarType :: Type -> Bool #
isEqPrimPred :: PredType -> Bool #
isClassPred :: PredType -> Bool #
getClassPredTys :: HasDebugCallStack => PredType -> (Class, [Type]) #
mkRepReflCo :: Type -> Coercion #
Make a representational reflexive coercion
So-called Literal
s are one of:
- An unboxed numeric literal or floating-point literal which is presumed
to be surrounded by appropriate constructors (
Int#
, etc.), so that the overall thing makes sense.
We maintain the invariant that the Integer
in the LitNumber
constructor is actually in the (possibly target-dependent) range.
The mkLit{Int,Word}*Wrap smart constructors ensure this by applying
the target machine's wrapping semantics. Use these in situations
where you know the wrapping semantics are correct.
- The literal derived from the label mentioned in a "foreign label"
declaration (
LitLabel
) - A
LitRubbish
to be used in place of values ofPrimRep
(i.e.MutVar#
) when the value is never used. - A character
- A string
- The NULL pointer
LitChar Char |
|
LitNumber !LitNumType !Integer | Any numeric literal that can be internally represented with an Integer. |
LitString !ByteString | A string-literal: stored and emitted
UTF-8 encoded, we'll arrange to decode it
at runtime. Also emitted with a |
LitFloat Rational |
|
LitDouble Rational |
|
Instances
Data Literal | |
Defined in GHC.Types.Literal gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Literal -> c Literal # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Literal # toConstr :: Literal -> Constr # dataTypeOf :: Literal -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Literal) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Literal) # gmapT :: (forall b. Data b => b -> b) -> Literal -> Literal # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Literal -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Literal -> r # gmapQ :: (forall d. Data d => d -> u) -> Literal -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Literal -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Literal -> m Literal # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Literal -> m Literal # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Literal -> m Literal # | |
Binary Literal | |
Outputable Literal | |
Defined in GHC.Types.Literal | |
Eq Literal | |
Ord Literal | Needed for the |
data LitNumType #
Numeric literal type
LitNumInt |
|
Instances
literalType :: Literal -> Type #
Find the Haskell Type
the literal occupies
tyConAppArgs_maybe :: Type -> Maybe [Type] #
The same as snd . splitTyConApp
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
splitFunTy_maybe :: Type -> Maybe (Mult, Type, Type) #
Attempts to extract the multiplicity, argument and result types from a type
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.
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.
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.
nonDetCmpType :: Type -> Type -> Ordering #
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.
irrelevantMult :: Scaled a -> a #
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
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.
dropForAlls :: Type -> Type #
Drops all ForAllTys
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
primTyCons :: [TyCon] #
eqPrimTyCon :: TyCon #
substTyWith :: HasCallStack => [TyVar] -> [Type] -> Type -> Type #
Type substitution, see zipTvSubst
substTy :: HasCallStack => TCvSubst -> Type -> Type #
Substitute within a Type
The substitution has to satisfy the invariants described in
Note [The substitution invariant].
mkTvSubstPrs :: [(TyVar, Type)] -> TCvSubst #
Generates the in-scope set for the TCvSubst
from the types in the
incoming environment. No CoVars, please!
mkTyVarTys :: [TyVar] -> [Type] #
mkForAllTys :: [TyCoVarBinder] -> Type -> Type #
Wraps foralls over the type using the provided TyCoVar
s from left to right
data TyConBndrVis #
Instances
Binary TyConBndrVis | |
Defined in GHC.Core.TyCon put_ :: BinHandle -> TyConBndrVis -> IO () # put :: BinHandle -> TyConBndrVis -> IO (Bin TyConBndrVis) # get :: BinHandle -> IO TyConBndrVis # | |
Outputable TyConBndrVis | |
Defined in GHC.Core.TyCon ppr :: TyConBndrVis -> SDoc # | |
OutputableBndr tv => Outputable (VarBndr tv TyConBndrVis) | |
Defined in GHC.Core.TyCon ppr :: VarBndr tv TyConBndrVis -> SDoc # |
type TyConBinder = VarBndr TyVar TyConBndrVis #
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
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
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.
newTyConRhs :: TyCon -> ([TyVar], Type) #
Kind constructors
isVanillaAlgTyCon :: TyCon -> Bool #
Returns True
for vanilla AlgTyCons -- that is, those created
with a data
or newtype
declaration.
isTypeSynonymTyCon :: TyCon -> Bool #
Is this a TyCon
representing a regular H98 type synonym (type
)?
isPromotedDataCon :: TyCon -> Bool #
Is this a PromotedDataCon?
isPrimTyCon :: TyCon -> Bool #
Does this TyCon
represent something that cannot be defined in Haskell?
isNewTyCon :: TyCon -> Bool #
Is this TyCon
that for a newtype
isGadtSyntaxTyCon :: TyCon -> Bool #
Is this an algebraic TyCon
declared with the GADT syntax?
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?
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
varQual_RDR :: Module -> FastString -> RdrName #
ordClassName :: Name #
ordClassKey :: Unique #
numericClassKeys :: [Unique] #
negateName :: Name #
fractionalClassKeys :: [Unique] #
eqClassName :: Name #
eqClassKey :: Unique #
dollarIdKey :: Unique #
dATA_FOLDABLE :: Module #
Instances
Data Class | |
Defined in GHC.Core.Class 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 # | |
Show Class Source # | |
NFData Class Source # | |
Defined in Language.Haskell.Liquid.GHC.Misc | |
NamedThing Class | |
Defined in GHC.Core.Class | |
Uniquable Class | |
Defined in GHC.Core.Class | |
Outputable Class | |
Defined in GHC.Core.Class | |
Eq Class | |
Hashable Class Source # | |
Defined in Language.Haskell.Liquid.GHC.Misc | |
Symbolic Class Source # | |
Defined in Language.Haskell.Liquid.GHC.Misc | |
Fixpoint Class Source # | |
PPrint Class Source # | |
Defined in Language.Haskell.Liquid.Types.PrettyPrint |
classSCTheta :: Class -> [PredType] #
classSCSelIds :: Class -> [Id] #
classMethods :: Class -> [Id] #
classBigSig :: Class -> ([TyVar], [PredType], [Id], [ClassOpItem]) #
classAllSelIds :: Class -> [Id] #
coercionKind :: Coercion -> Pair Type #
If it is the case that
c :: (t1 ~ t2)
i.e. the kind of c
relates t1
and t2
, then coercionKind c = Pair t1 t2
.
Instances
Data Role | |
Defined in GHC.Core.Coercion.Axiom 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 CoAxiomRule #
For now, we work only with nominal equality.
CoAxiomRule FastString [Role] Role ([TypeEqn] -> Maybe TypeEqn) |
Instances
data CoAxiom (br :: BranchFlag) #
A CoAxiom
is a "coercion constructor", i.e. a named equality axiom.
Instances
Typeable br => Data (CoAxiom br) | |
Defined in GHC.Core.Coercion.Axiom gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CoAxiom br -> c (CoAxiom br) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (CoAxiom br) # toConstr :: CoAxiom br -> Constr # dataTypeOf :: CoAxiom br -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (CoAxiom br)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (CoAxiom br)) # gmapT :: (forall b. Data b => b -> b) -> CoAxiom br -> CoAxiom br # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CoAxiom br -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CoAxiom br -> r # gmapQ :: (forall d. Data d => d -> u) -> CoAxiom br -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> CoAxiom br -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> CoAxiom br -> m (CoAxiom br) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CoAxiom br -> m (CoAxiom br) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CoAxiom br -> m (CoAxiom br) # | |
NamedThing (CoAxiom br) | |
Defined in GHC.Core.Coercion.Axiom | |
Uniquable (CoAxiom br) | |
Defined in GHC.Core.Coercion.Axiom | |
Outputable (CoAxiom br) | |
Defined in GHC.Core.Coercion.Axiom | |
Eq (CoAxiom br) | |
coAxiomTyCon :: forall (br :: BranchFlag). CoAxiom br -> TyCon #
type LocatedN = GenLocated SrcSpanAnnN #
noAnnSrcSpan :: SrcSpan -> SrcAnn ann #
Short form for EpAnnNotUsed
getLocA :: GenLocated (SrcSpanAnn' a) e -> SrcSpan #
data Annotation #
Represents an annotation after it has been sufficiently desugared from
it's initial form of AnnDecl
Annotation | |
|
Instances
Outputable Annotation | |
Defined in GHC.Types.Annotations ppr :: Annotation -> SDoc # |
An annotation target
ModuleTarget Module | We are annotating a particular module |
Instances
Functor AnnTarget | |
Binary name => Binary (AnnTarget name) | |
Outputable name => Outputable (AnnTarget name) | |
Defined in GHC.Types.Annotations |
type AnnPayload #
= Serialized | The "payload" of an annotation allows recovery of its value at a given type, and can be persisted to an interface file |
findAnns :: Typeable a => ([Word8] -> a) -> AnnEnv -> CoreAnnTarget -> [a] #
Find the annotations attached to the given target as Typeable
values of your choice. If no deserializer is specified,
only transient annotations will be returned.
Reader Name
Do not use the data constructors of RdrName directly: prefer the family
of functions that creates them, such as mkRdrUnqual
- Note: A Located RdrName will only have API Annotations if it is a compound one, e.g.
`bar` ( ~ )
AnnKeywordId
:AnnType
,AnnOpen
'('
or'['
or'[:'
,AnnClose
')'
or']'
or':]'
,,AnnBackquote
'`'
,AnnVal
AnnTilde
,
Instances
data ImportSpec #
Import Specification
The ImportSpec
of something says how it came to be imported
It's quite elaborate so that we can give accurate unused-name warnings.
Instances
Data ImportSpec | |
Defined in GHC.Types.Name.Reader gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ImportSpec -> c ImportSpec # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ImportSpec # toConstr :: ImportSpec -> Constr # dataTypeOf :: ImportSpec -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ImportSpec) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ImportSpec) # gmapT :: (forall b. Data b => b -> b) -> ImportSpec -> ImportSpec # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ImportSpec -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ImportSpec -> r # gmapQ :: (forall d. Data d => d -> u) -> ImportSpec -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ImportSpec -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ImportSpec -> m ImportSpec # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ImportSpec -> m ImportSpec # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ImportSpec -> m ImportSpec # | |
Outputable ImportSpec | |
Defined in GHC.Types.Name.Reader ppr :: ImportSpec -> SDoc # | |
Eq ImportSpec | |
Defined in GHC.Types.Name.Reader (==) :: ImportSpec -> ImportSpec -> Bool # (/=) :: ImportSpec -> ImportSpec -> Bool # |
data ImpItemSpec #
Import Item Specification
Describes import info a particular Name
ImpAll | The import had no import list, or had a hiding list |
Instances
Data ImpItemSpec | |
Defined in GHC.Types.Name.Reader gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ImpItemSpec -> c ImpItemSpec # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ImpItemSpec # toConstr :: ImpItemSpec -> Constr # dataTypeOf :: ImpItemSpec -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ImpItemSpec) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ImpItemSpec) # gmapT :: (forall b. Data b => b -> b) -> ImpItemSpec -> ImpItemSpec # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ImpItemSpec -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ImpItemSpec -> r # gmapQ :: (forall d. Data d => d -> u) -> ImpItemSpec -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ImpItemSpec -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ImpItemSpec -> m ImpItemSpec # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ImpItemSpec -> m ImpItemSpec # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ImpItemSpec -> m ImpItemSpec # | |
Eq ImpItemSpec | |
Defined in GHC.Types.Name.Reader (==) :: ImpItemSpec -> ImpItemSpec -> Bool # (/=) :: ImpItemSpec -> ImpItemSpec -> Bool # |
data ImpDeclSpec #
Import Declaration Specification
Describes a particular import declaration and is
shared among all the Provenance
s for that decl
ImpDeclSpec | |
|
Instances
Data ImpDeclSpec | |
Defined in GHC.Types.Name.Reader gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ImpDeclSpec -> c ImpDeclSpec # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ImpDeclSpec # toConstr :: ImpDeclSpec -> Constr # dataTypeOf :: ImpDeclSpec -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ImpDeclSpec) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ImpDeclSpec) # gmapT :: (forall b. Data b => b -> b) -> ImpDeclSpec -> ImpDeclSpec # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ImpDeclSpec -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ImpDeclSpec -> r # gmapQ :: (forall d. Data d => d -> u) -> ImpDeclSpec -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ImpDeclSpec -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ImpDeclSpec -> m ImpDeclSpec # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ImpDeclSpec -> m ImpDeclSpec # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ImpDeclSpec -> m ImpDeclSpec # | |
Eq ImpDeclSpec | |
Defined in GHC.Types.Name.Reader (==) :: ImpDeclSpec -> ImpDeclSpec -> Bool # (/=) :: ImpDeclSpec -> ImpDeclSpec -> Bool # |
nameRdrName :: Name -> RdrName #
mkVarUnqual :: FastString -> RdrName #
mkUnqual :: NameSpace -> FastString -> RdrName #
mkQual :: NameSpace -> (FastString, FastString) -> RdrName #
Make a qualified RdrName
in the given namespace and where the ModuleName
and
the OccName
are taken from the first and second elements of the tuple respectively
mkGlobalRdrEnv :: [GlobalRdrElt] -> GlobalRdrEnv #
lookupGRE_RdrName :: RdrName -> GlobalRdrEnv -> [GlobalRdrElt] #
Look for this RdrName
in the global environment. Omits record fields
without selector functions (see Note [NoFieldSelectors] in GHC.Rename.Env).
gresFromAvails :: Maybe ImportSpec -> [AvailInfo] -> [GlobalRdrElt] #
make a GlobalRdrEnv
where all the elements point to the same
Provenance (useful for "hiding" imports, or imports with no details).
greMangledName :: GlobalRdrElt -> Name #
A Name
for the GRE for internal use. Careful: the OccName
of this
Name
is not necessarily the same as the greOccName
(see Note [GreNames]).
globalRdrEnvElts :: GlobalRdrEnv -> [GlobalRdrElt] #
getRdrName :: NamedThing thing => thing -> RdrName #
Records what things are "available", i.e. in scope
Avail GreName | An ordinary identifier in scope, or a field label without a parent type (see Note [Representing pattern synonym fields in AvailInfo]). |
AvailTC | A type or class in scope The AvailTC Invariant: If the type or class is itself to be in scope, it must be first in this list. Thus, typically: AvailTC Eq [Eq, ==, \/=] |
Instances
Data AvailInfo | |
Defined in GHC.Types.Avail gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AvailInfo -> c AvailInfo # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AvailInfo # toConstr :: AvailInfo -> Constr # dataTypeOf :: AvailInfo -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c AvailInfo) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AvailInfo) # gmapT :: (forall b. Data b => b -> b) -> AvailInfo -> AvailInfo # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AvailInfo -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AvailInfo -> r # gmapQ :: (forall d. Data d => d -> u) -> AvailInfo -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> AvailInfo -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> AvailInfo -> m AvailInfo # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AvailInfo -> m AvailInfo # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AvailInfo -> m AvailInfo # | |
Binary AvailInfo | |
Outputable AvailInfo | |
Defined in GHC.Types.Avail | |
Eq AvailInfo | Used when deciding if the interface has changed |
greNameMangledName :: GreName -> Name #
availNames :: AvailInfo -> [Name] #
All names made available by the availability information (excluding overloaded selectors)
data CostCentre #
A Cost Centre is a single {-# SCC #-}
annotation.
Instances
mkRnEnv2 :: InScopeSet -> RnEnv2 #
A non-deterministic Variable Set
A non-deterministic set of variables. See Note [Deterministic UniqFM] in GHC.Types.Unique.DFM for explanation why it's not deterministic and why it matters. Use DVarSet if the set eventually gets converted into a list or folded over in a way where the order changes the generated code, for example when abstracting variables.
unitVarSet :: Var -> VarSet #
extendVarSetList :: VarSet -> [Var] -> VarSet #
extendVarSet :: VarSet -> Var -> VarSet #
emptyVarSet :: VarSet #
elemVarSet :: Var -> VarSet -> Bool #
stableNameCmp :: Name -> Name -> Ordering #
Compare Names lexicographically This only works for Names that originate in the source code or have been tidied.
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 #
nameModule_maybe :: Name -> Maybe Module #
nameModule :: HasDebugCallStack => Name -> Module #
mkSystemName :: Unique -> OccName -> Name #
Create a name brought into being by the compiler
isSystemName :: Name -> Bool #
isInternalName :: Name -> Bool #
isExternalName :: Name -> Bool #
getSrcSpan :: NamedThing a => a -> SrcSpan #
getOccString :: NamedThing a => a -> String #
mkTyVarOcc :: String -> OccName #
type TyVarBinder = VarBndr TyVar ArgFlag #
setVarUnique :: Var -> Unique -> Var #
setVarType :: Var -> Type -> Var #
setVarName :: Var -> Name -> Var #
Is this a type-level (i.e., computationally irrelevant, thus erasable)
variable? Satisfies isTyVar = not . isId
.
Is this a value-level (i.e., computationally relevant) Var
entifier?
Satisfies isId = not . isTyVar
.
Is this a coercion variable?
Satisfies
.isId
v ==> isCoVar
v == not (isNonCoVarId
v)
idInfo :: HasDebugCallStack => Id -> IdInfo #
typeSymbolKind :: Kind #
tupleTyCon :: Boxity -> Arity -> TyCon #
tupleDataCon :: Boxity -> Arity -> DataCon #
liftedTypeKind :: Kind #
A data constructor
Instances
dataConWrapId :: DataCon -> Id #
Returns an Id which looks like the Haskell-source constructor by using
the wrapper if it exists (see dataConWrapId_maybe
) and failing over to
the worker (see dataConWorkId
)
dataConWorkId :: DataCon -> Id #
dataConTyCon :: DataCon -> TyCon #
The type constructor that we are building via this data constructor
dataConFullSig :: DataCon -> ([TyVar], [TyCoVar], [EqSpec], ThetaType, [Scaled Type], Type) #
The "full signature" of the DataCon
returns, in order:
1) The result of dataConUnivTyVars
2) The result of dataConExTyCoVars
3) The non-dependent GADT equalities. Dependent GADT equalities are implied by coercion variables in return value (2).
4) The other constraints of the data constructor type, excluding GADT equalities
5) The original argument types to the DataCon
(i.e. before
any change of the representation of the type) with linearity
annotations
6) The original result type of the DataCon
dataConFieldLabels :: DataCon -> [FieldLabel] #
The labels for the fields of this particular DataCon
dataConExTyCoVars :: DataCon -> [TyCoVar] #
The existentially-quantified type/coercion variables of the constructor including dependent (kind-) GADT equalities
tyConAppTyCon_maybe :: Type -> Maybe TyCon #
The same as fst . splitTyConApp
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
mkTyConApp :: TyCon -> [Type] -> Type #
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
.
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 |
Instances
Data UnivCoProvenance | |
Defined in GHC.Core.TyCo.Rep 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 ppr :: UnivCoProvenance -> SDoc # |
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 AnonArgFlag Mult Type Type | 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 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 # | |
NFData Type Source # | |
Defined in Language.Haskell.Liquid.GHC.Misc | |
Outputable Type | |
Defined in GHC.Core.TyCo.Rep | |
Eq Type Source # | |
Fixpoint Type Source # | |
PPrint Type Source # | |
Defined in Language.Haskell.Liquid.Types.PrettyPrint | |
Subable Type Source # | |
SubsTy TyVar Type SpecType Source # | |
Eq (DeBruijn Type) | |
Show (Axiom Var Type CoreExpr) Source # | |
Instances
Data TyLit | |
Defined in GHC.Core.TyCo.Rep 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 | |
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"
A Coercion
is concrete evidence of the equality/convertibility
of two types.
Instances
Data Coercion | |
Defined in GHC.Core.TyCo.Rep 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 | |
Eq Coercion Source # | |
Subable Coercion Source # | |
Eq (DeBruijn Coercion) | |
A global typecheckable-thing, essentially anything that has a name.
Not to be confused with a TcTyThing
, which is also a typecheckable
thing but in the *local* context. See GHC.Tc.Utils.Env for how to retrieve
a TyThing
given a Name
.
Instances
NamedThing TyThing | |
Defined in GHC.Types.TyThing | |
Outputable TyThing | |
Defined in GHC.Types.TyThing | |
PPrint TyThing Source # | |
Defined in Language.Haskell.Liquid.Types.Types |
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
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 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 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 |
Pair a a |
Instances
Foldable Pair | |
Defined in GHC.Data.Pair fold :: Monoid m => Pair m -> m # foldMap :: Monoid m => (a -> m) -> Pair a -> m # foldMap' :: Monoid m => (a -> m) -> Pair a -> m # foldr :: (a -> b -> b) -> b -> Pair a -> b # foldr' :: (a -> b -> b) -> b -> Pair a -> b # foldl :: (b -> a -> b) -> b -> Pair a -> b # foldl' :: (b -> a -> b) -> b -> Pair a -> b # foldr1 :: (a -> a -> a) -> Pair a -> a # foldl1 :: (a -> a -> a) -> Pair a -> a # elem :: Eq a => a -> Pair a -> Bool # maximum :: Ord a => Pair a -> a # | |
Traversable Pair | |
Applicative Pair | |
Functor Pair | |
(Semigroup a, Monoid a) => Monoid (Pair a) | |
Semigroup a => Semigroup (Pair a) | |
Outputable a => Outputable (Pair a) | |
Defined in GHC.Data.Pair |
data WarnReason #
Used when outputting warnings: if a reason is given, it is displayed. If a warning isn't controlled by a flag, this is made explicit at the point of use.
Instances
Show WarnReason | |
Defined in GHC.Driver.Flags showsPrec :: Int -> WarnReason -> ShowS # show :: WarnReason -> String # showList :: [WarnReason] -> ShowS # | |
ToJson WarnReason | |
Defined in GHC.Driver.Flags json :: WarnReason -> JsonDoc # | |
Outputable WarnReason | |
Defined in GHC.Driver.Flags ppr :: WarnReason -> SDoc # |
data GeneralFlag #
Enumerates the simple on-or-off dynamic flags
Instances
Enum GeneralFlag | |
Defined in GHC.Driver.Flags succ :: GeneralFlag -> GeneralFlag # pred :: GeneralFlag -> GeneralFlag # toEnum :: Int -> GeneralFlag # fromEnum :: GeneralFlag -> Int # enumFrom :: GeneralFlag -> [GeneralFlag] # enumFromThen :: GeneralFlag -> GeneralFlag -> [GeneralFlag] # enumFromTo :: GeneralFlag -> GeneralFlag -> [GeneralFlag] # enumFromThenTo :: GeneralFlag -> GeneralFlag -> GeneralFlag -> [GeneralFlag] # | |
Show GeneralFlag | |
Defined in GHC.Driver.Flags showsPrec :: Int -> GeneralFlag -> ShowS # show :: GeneralFlag -> String # showList :: [GeneralFlag] -> ShowS # | |
Eq GeneralFlag | |
Defined in GHC.Driver.Flags (==) :: GeneralFlag -> GeneralFlag -> Bool # (/=) :: GeneralFlag -> GeneralFlag -> Bool # |
Instances
Show Phase | |
Outputable Phase | |
Defined in GHC.Driver.Phases | |
Eq Phase | |
showSDocDump :: SDocContext -> SDoc -> String #
showPpr :: Outputable a => DynFlags -> a -> String #
data TopLevelFlag #
Instances
Data TopLevelFlag | |
Defined in GHC.Types.Basic 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 ppr :: TopLevelFlag -> SDoc # |
data PromotionFlag #
Is a TyCon a promoted data constructor or just a normal type constructor?
Instances
Data PromotionFlag | |
Defined in GHC.Types.Basic 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 put_ :: BinHandle -> PromotionFlag -> IO () # put :: BinHandle -> PromotionFlag -> IO (Bin PromotionFlag) # get :: BinHandle -> IO PromotionFlag # | |
Outputable PromotionFlag | |
Defined in GHC.Types.Basic ppr :: PromotionFlag -> SDoc # | |
Eq PromotionFlag | |
Defined in GHC.Types.Basic (==) :: PromotionFlag -> PromotionFlag -> Bool # (/=) :: PromotionFlag -> PromotionFlag -> Bool # |
data InlinePragma #
Instances
Data InlinePragma | |
Defined in GHC.Types.Basic 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 put_ :: BinHandle -> InlinePragma -> IO () # put :: BinHandle -> InlinePragma -> IO (Bin InlinePragma) # get :: BinHandle -> IO InlinePragma # | |
Outputable InlinePragma | |
Defined in GHC.Types.Basic ppr :: InlinePragma -> SDoc # | |
Eq InlinePragma | |
Defined in GHC.Types.Basic (==) :: InlinePragma -> InlinePragma -> Bool # (/=) :: InlinePragma -> InlinePragma -> Bool # |
Instances
Data Boxity | |
Defined in GHC.Types.Basic 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
isStrongLoopBreaker :: OccInfo -> Bool #
data FieldLabel #
Fields in an algebraic record type; see Note [FieldLabel].
Instances
Data FieldLabel | |
Defined in GHC.Types.FieldLabel gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FieldLabel -> c FieldLabel # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c FieldLabel # toConstr :: FieldLabel -> Constr # dataTypeOf :: FieldLabel -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c FieldLabel) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c FieldLabel) # gmapT :: (forall b. Data b => b -> b) -> FieldLabel -> FieldLabel # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FieldLabel -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FieldLabel -> r # gmapQ :: (forall d. Data d => d -> u) -> FieldLabel -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> FieldLabel -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> FieldLabel -> m FieldLabel # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> FieldLabel -> m FieldLabel # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> FieldLabel -> m FieldLabel # | |
HasOccName FieldLabel | |
Defined in GHC.Types.FieldLabel occName :: FieldLabel -> OccName # | |
Binary Name => Binary FieldLabel | We need the |
Defined in GHC.Types.FieldLabel put_ :: BinHandle -> FieldLabel -> IO () # put :: BinHandle -> FieldLabel -> IO (Bin FieldLabel) # get :: BinHandle -> IO FieldLabel # | |
Outputable FieldLabel | |
Defined in GHC.Types.FieldLabel ppr :: FieldLabel -> SDoc # | |
Eq FieldLabel | |
Defined in GHC.Types.FieldLabel (==) :: FieldLabel -> FieldLabel -> Bool # (/=) :: FieldLabel -> FieldLabel -> Bool # |
data LexicalFixity #
Captures the fixity of declarations as they are parsed. This is not necessarily the same as the fixity declaration, as the normal fixity may be overridden using parens or backticks.
Instances
Data LexicalFixity | |
Defined in GHC.Types.Fixity gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> LexicalFixity -> c LexicalFixity # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c LexicalFixity # toConstr :: LexicalFixity -> Constr # dataTypeOf :: LexicalFixity -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c LexicalFixity) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c LexicalFixity) # gmapT :: (forall b. Data b => b -> b) -> LexicalFixity -> LexicalFixity # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LexicalFixity -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LexicalFixity -> r # gmapQ :: (forall d. Data d => d -> u) -> LexicalFixity -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> LexicalFixity -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> LexicalFixity -> m LexicalFixity # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LexicalFixity -> m LexicalFixity # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LexicalFixity -> m LexicalFixity # | |
Outputable LexicalFixity | |
Defined in GHC.Types.Fixity ppr :: LexicalFixity -> SDoc # | |
Eq LexicalFixity | |
Defined in GHC.Types.Fixity (==) :: LexicalFixity -> LexicalFixity -> Bool # (/=) :: LexicalFixity -> LexicalFixity -> Bool # |
data FixityDirection #
Instances
Instances
Data Fixity | |
Defined in GHC.Types.Fixity gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Fixity -> c Fixity # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Fixity # toConstr :: Fixity -> Constr # dataTypeOf :: Fixity -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Fixity) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Fixity) # gmapT :: (forall b. Data b => b -> b) -> Fixity -> Fixity # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Fixity -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Fixity -> r # gmapQ :: (forall d. Data d => d -> u) -> Fixity -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Fixity -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Fixity -> m Fixity # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Fixity -> m Fixity # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Fixity -> m Fixity # | |
Binary Fixity | |
Outputable Fixity | |
Defined in GHC.Types.Fixity | |
Eq Fixity | |
Identifier Information
An IdInfo
gives optional information about an Id
. If
present it never lies, but it may not be present, in which case there
is always a conservative assumption which can be made.
Two Id
s may have different info even though they have the same
Unique
(and are hence the same Id
); for example, one might lack
the properties attached to the other.
Most of the IdInfo
gives information about the value, or definition, of
the Id
, independent of its usage. Exceptions to this
are demandInfo
, occInfo
, oneShotInfo
and callArityInfo
.
Performance note: when we update IdInfo
, we have to reallocate this
entire record, so it is a good idea not to let this data structure get
too big.
Identifier Details
The IdDetails
of an Id
give stable, and necessary,
information about the Id.
VanillaId | |
RecSelId RecSelParent Bool | The |
DataConWorkId DataCon | The |
DataConWrapId DataCon | The |
Instances
Outputable IdDetails | |
Defined in GHC.Types.Id.Info |
vanillaIdInfo :: IdInfo #
Basic IdInfo
that carries no useful information whatsoever
Bndr var argf |
Instances
(Data var, Data argf) => Data (VarBndr var argf) | |
Defined in GHC.Types.Var gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> VarBndr var argf -> c (VarBndr var argf) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (VarBndr var argf) # toConstr :: VarBndr var argf -> Constr # dataTypeOf :: VarBndr var argf -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (VarBndr var argf)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (VarBndr var argf)) # gmapT :: (forall b. Data b => b -> b) -> VarBndr var argf -> VarBndr var argf # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> VarBndr var argf -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> VarBndr var argf -> r # gmapQ :: (forall d. Data d => d -> u) -> VarBndr var argf -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> VarBndr var argf -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> VarBndr var argf -> m (VarBndr var argf) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> VarBndr var argf -> m (VarBndr var argf) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> VarBndr var argf -> m (VarBndr var argf) # | |
NamedThing tv => NamedThing (VarBndr tv flag) | |
Defined in GHC.Types.Var | |
(Binary tv, Binary vis) => Binary (VarBndr tv vis) | |
OutputableBndr tv => Outputable (VarBndr tv TyConBndrVis) | |
Defined in GHC.Core.TyCon ppr :: VarBndr tv TyConBndrVis -> SDoc # | |
Outputable tv => Outputable (VarBndr tv ArgFlag) | |
Outputable tv => Outputable (VarBndr tv Specificity) | |
Defined in GHC.Types.Var ppr :: VarBndr tv Specificity -> SDoc # | |
(Eq tyvar, Eq argf) => Eq (VarBndr tyvar argf) Source # | |
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 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 # | |
Show CoreExpr Source # | |
Show Var Source # | |
NFData Var Source # | |
Defined in Language.Haskell.Liquid.GHC.Misc | |
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 | |
Hashable Var Source # | |
Defined in Language.Haskell.Liquid.GHC.Misc | |
Symbolic Var Source # |
|
Defined in Language.Haskell.Liquid.GHC.Misc | |
Fixpoint Var Source # | |
PPrint Var Source # | |
Defined in Language.Haskell.Liquid.Types.PrettyPrint | |
Expression Var Source # | Converting to Fixpoint ---------------------------------------------------- |
Defined in Language.Haskell.Liquid.Types.RefType | |
Loc Var Source # | |
Defined in Language.Haskell.Liquid.GHC.Misc | |
ResolveSym Var Source # | |
Defined in Language.Haskell.Liquid.Bare.Resolve | |
Subable CoreExpr Source # | |
Subable Var Source # | |
CBVisitable CoreBind Source # | |
SubsTy TyVar Type SpecType Source # | |
PPrint (Bind Var) Source # | |
Defined in Language.Haskell.Liquid.Types.PrettyPrint | |
PPrint (Expr Var) Source # | |
Defined in Language.Haskell.Liquid.Types.PrettyPrint | |
Subable (Alt Var) Source # | |
Subable (Bind Var) Source # | |
CBVisitable (Alt Var) Source # | |
CBVisitable (Expr Var) Source # | |
CBVisitable [CoreBind] Source # | |
Show (Axiom Var Type CoreExpr) Source # | |
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.
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
Instances
Data ArgFlag | |
Defined in GHC.Types.Var 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
VisArg | Used for |
Instances
data SourceText #
SourceText String | |
NoSourceText | For when code is generated, e.g. TH, deriving. The pretty printer will then make its own representation of the item. |
Instances
mkIntegralLit :: Integral a => a -> IntegralLit #
moduleStableString :: Module -> String #
Get a string representation of a Module
that's unique and stable
across recompilations.
eg. "$aeson_70dylHtv1FFGeai1IoxcQr$Data.Aeson.Types.Internal"
data ModLocation #
Module Location
Where a module lives on the file system: the actual locations of the .hs, .hi and .o files, if we have them.
For a module in another unit, the ml_hs_file and ml_obj_file components of ModLocation are undefined.
The locations specified by a ModLocation may or may not correspond to actual files yet: for example, even if the object file doesn't exist, the ModLocation still contains the path to where the object file will reside if/when it is created.
Instances
Show ModLocation | |
Defined in GHC.Unit.Module.Location showsPrec :: Int -> ModLocation -> ShowS # show :: ModLocation -> String # showList :: [ModLocation] -> ShowS # | |
Outputable ModLocation | |
Defined in GHC.Unit.Module.Location ppr :: ModLocation -> SDoc # |
data IsBootInterface #
Indicates whether a module name is referring to a boot interface (hs-boot file) or regular module (hs file). We need to treat boot modules specially when building compilation graphs, since they break cycles. Regular source files and signature files are treated equivalently.
Instances
data GenWithIsBoot mod #
This data type just pairs a value mod
with an IsBootInterface flag. In
practice, mod
is usually a Module
or ModuleName
'.
Instances
unitString :: IsUnitId u => u -> String #
Return the UnitId of the Unit. For on-the-fly instantiated units, return the UnitId of the indefinite unit this unit is an instance of.
fsToUnit :: FastString -> Unit #
Create a new simple unit identifier from a FastString
. Internally,
this is primarily used to specify wired-in unit identifiers.
moduleNameString :: ModuleName -> String #
moduleNameFS :: ModuleName -> FastString #
mkModuleNameFS :: FastString -> ModuleName #
mkModuleName :: String -> ModuleName #
class NamedThing a where #
A class allowing convenient access to the Name
of various datatypes
Instances
A unique, unambiguous name for something, containing information about where that thing originated.
Instances
Data Name | |
Defined in GHC.Types.Name 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 # | |
Show Name Source # | |
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 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 |
Symbolic Name Source # | |
Defined in Language.Haskell.Liquid.GHC.Misc | |
Fixpoint Name Source # | |
PPrint Name Source # | |
Defined in Language.Haskell.Liquid.Types.PrettyPrint | |
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 |
nameOccName :: Name -> OccName #
data UnhelpfulSpanReason #
UnhelpfulNoLocationInfo | |
UnhelpfulWiredIn | |
UnhelpfulInteractive | |
UnhelpfulGenerated | |
UnhelpfulOther !FastString |
Instances
Show UnhelpfulSpanReason | |
Defined in GHC.Types.SrcLoc showsPrec :: Int -> UnhelpfulSpanReason -> ShowS # show :: UnhelpfulSpanReason -> String # showList :: [UnhelpfulSpanReason] -> ShowS # | |
Outputable UnhelpfulSpanReason | |
Defined in GHC.Types.SrcLoc ppr :: UnhelpfulSpanReason -> SDoc # | |
Eq UnhelpfulSpanReason | |
Defined in GHC.Types.SrcLoc (==) :: 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.
Instances
Source Location
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 showsPrec :: Int -> RealSrcLoc -> ShowS # show :: RealSrcLoc -> String # showList :: [RealSrcLoc] -> ShowS # | |
Outputable RealSrcLoc | |
Defined in GHC.Types.SrcLoc ppr :: RealSrcLoc -> SDoc # | |
Eq RealSrcLoc | |
Defined in GHC.Types.SrcLoc (==) :: RealSrcLoc -> RealSrcLoc -> Bool # (/=) :: RealSrcLoc -> RealSrcLoc -> Bool # | |
Ord RealSrcLoc | |
Defined in GHC.Types.SrcLoc 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 Located = GenLocated SrcSpan #
data GenLocated l e #
We attach SrcSpans to lots of things, so let's have a datatype for it.
L l e |
Instances
unLoc :: GenLocated l e -> e #
srcSpanStartLine :: RealSrcSpan -> Int #
srcSpanStartCol :: RealSrcSpan -> Int #
srcSpanFileName_maybe :: SrcSpan -> Maybe FastString #
Obtains the filename for a SrcSpan
if it is "good"
srcSpanEndLine :: RealSrcSpan -> Int #
srcSpanEndCol :: RealSrcSpan -> Int #
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
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
isGoodSrcSpan :: SrcSpan -> Bool #
Test if a SrcSpan
is "good", i.e. has precise location information
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.
class Monad m => MonadUnique (m :: Type -> Type) where #
A monad for generating unique identifiers
getUniqueM :: m Unique #
Get a new unique identifier
Instances
MonadUnique UniqSM | |
Defined in GHC.Types.Unique.Supply getUniqueSupplyM :: UniqSM UniqSupply # getUniqueM :: UniqSM Unique # getUniquesM :: UniqSM [Unique] # |
Unique identifier.
The type of unique identifiers that are used in many places in GHC
for fast ordering and equality tests. You should generate these with
the functions from the UniqSupply
module
These are sometimes also referred to as "keys" in comments in GHC.
Instances
Show Unique | |
Uniquable Unique | |
Defined in GHC.Types.Unique | |
Outputable Unique | |
Defined in GHC.Types.Unique | |
Eq Unique | |
Class of things that we can obtain a Unique
from
Instances
data GhcException #
GHC's own exception type error messages all take the form:
<location>: <error>
If the location is on the command line, or in GHC itself, then <location>="ghc". All of the error types below correspond to a <location> of "ghc", except for ProgramError (where the string is assumed to contain a location already, so we don't print one).
CmdLineError String | A problem with the command line arguments, but don't print usage. |
ProgramError String | An error in the user's code, probably. |
Instances
Exception GhcException | |
Defined in GHC.Utils.Panic | |
Show GhcException | |
Defined in GHC.Utils.Panic showsPrec :: Int -> GhcException -> ShowS # show :: GhcException -> String # showList :: [GhcException] -> ShowS # |
throwGhcExceptionIO :: GhcException -> IO a #
throwGhcException :: GhcException -> 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 #
Instances
Outputable QualifyName | |
Defined in GHC.Utils.Outputable 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
.
Wrapper for types having a Outputable instance when an OutputableP instance is required.
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
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.
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.
Instances
Show LabelStyle | |
Defined in GHC.Utils.Outputable showsPrec :: Int -> LabelStyle -> ShowS # show :: LabelStyle -> String # showList :: [LabelStyle] -> ShowS # | |
Eq LabelStyle | |
Defined in GHC.Utils.Outputable (==) :: LabelStyle -> LabelStyle -> Bool # (/=) :: LabelStyle -> LabelStyle -> Bool # | |
Ord LabelStyle | |
Defined in GHC.Utils.Outputable compare :: LabelStyle -> LabelStyle -> Ordering # (<) :: LabelStyle -> LabelStyle -> Bool # (<=) :: LabelStyle -> LabelStyle -> Bool # (>) :: LabelStyle -> LabelStyle -> Bool # (>=) :: LabelStyle -> LabelStyle -> Bool # max :: LabelStyle -> LabelStyle -> LabelStyle # min :: LabelStyle -> LabelStyle -> LabelStyle # |
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
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 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 pprBndr :: BindingSite -> OccName -> SDoc # pprPrefixOcc :: OccName -> SDoc # pprInfixOcc :: OccName -> SDoc # bndrIsJoin_maybe :: OccName -> Maybe Int # | |
Eq OccName | |
Ord OccName | |
occNameString :: OccName -> String #
mkVarOccFS :: FastString -> OccName #
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.
Instances
unpackFS :: FastString -> String #
Unpacks and decodes the FastString
mkFastStringByteString :: ByteString -> FastString #
Create a FastString
by copying an existing ByteString
mkFastString :: String -> FastString #
Creates a UTF-8 encoded FastString
from a String
fsLit :: String -> FastString #
concatFS :: [FastString] -> FastString #
bytesFS :: FastString -> ByteString #
Gives the Modified UTF-8 encoded bytes corresponding to a FastString
Code generation backends.
GHC supports several code generation backends serving different purposes (producing machine code, producing ByteCode for the interpreter) and supporting different platforms.
Interpreter | ByteCode interpreter. Produce ByteCode objects (BCO, see GHC.ByteCode) that can be interpreted. It is used by GHCi. Currently some extensions are not supported (foreign primops). |
Contains not only a collection of GeneralFlag
s but also a plethora of
information relating to the compilation of a single file or GHC session
A UnitId identifies a built library in a database and is used to generate unique symbols, etc. It's usually of the form:
pkgname-1.2:libname+hash
These UnitId are provided to us via the -this-unit-id
flag.
The library in question may be definite or indefinite; if it is indefinite, none of the holes have been filled (we never install partially instantiated libraries as we can cheaply instantiate them on-the-fly, cf VirtUnit). Put another way, an installed unit id is either fully instantiated, or not instantiated at all.
Instances
moduleName :: GenModule unit -> ModuleName #
Module name (e.g. A.B.C)
moduleUnit :: GenModule unit -> unit #
Unit the module belongs to
data SDocContext #
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 fromString :: String -> SDoc # | |
Outputable SDoc | |
Defined in GHC.Utils.Outputable | |
OutputableP env SDoc | |
Defined in GHC.Utils.Outputable |
PprUser PrintUnqualified Depth Coloured | |
PprDump PrintUnqualified | |
PprCode LabelStyle | Print code; either C or assembler |
Instances
Outputable PprStyle | |
Defined in GHC.Utils.Outputable |
data ModuleName #
A ModuleName is essentially a simple string, e.g. Data.List
.
Instances
data StableModule Source #
A newtype wrapper around a Module
which:
- Allows a
Module
to be serialised (i.e. it has aBinary
instance) - It tries to use stable comparison and equality under the hood.
Instances
toStableModule :: Module -> StableModule Source #
Converts a Module
into a StableModule
.
renderModule :: Module -> String Source #
mkStableModule :: UnitId -> ModuleName -> StableModule Source #
Creates a new StableModule
out of a ModuleName
and a UnitId
.
data ApiComment Source #
Abstraction of EpaComment
.
Instances
Show ApiComment Source # | |
Defined in Liquid.GHC.API.Extra showsPrec :: Int -> ApiComment -> ShowS # show :: ApiComment -> String # showList :: [ApiComment] -> ShowS # | |
Eq ApiComment Source # | |
Defined in Liquid.GHC.API.Extra (==) :: ApiComment -> ApiComment -> Bool # (/=) :: ApiComment -> ApiComment -> Bool # |
fsToUnitId :: FastString -> UnitId Source #
moduleUnitId :: Module -> UnitId Source #
thisPackage :: DynFlags -> UnitId Source #
tyConRealArity :: TyCon -> Int Source #
relevantModules :: ModGuts -> Set Module Source #
The collection of dependencies and usages modules which are relevant for liquidHaskell
parseModuleIO :: HscEnv -> ModSummary -> IO ParsedModule Source #
typecheckModuleIO :: HscEnv -> ParsedModule -> IO TypecheckedModuleLH Source #
desugarModuleIO :: HscEnv -> ModSummary -> TypecheckedModuleLH -> IO ModGuts Source #
Desugar a typechecked module.
apiComments :: ParsedModule -> [Located ApiComment] Source #
Extract top-level comments from a module.
lookupModSummary :: HscEnv -> ModuleName -> Maybe ModSummary Source #
moduleInfoTc :: HscEnv -> ModSummary -> TcGblEnv -> IO ModuleInfoLH Source #
isPatErrorAlt :: CoreAlt -> Bool Source #
Tells if a case alternative calls to patError
qualifiedNameFS :: Name -> FastString Source #
showPprQualified :: Outputable a => a -> String Source #
showSDocQualified :: SDoc -> String Source #