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 Type
- data GhcMode = CompManager
- data Name
- data ModuleName
- data UnitId
- type Module = GenModule Unit
- data SrcLoc
- data TyCon
- data Var
- data Pair a = Pair a a
- type Arity = Int
- type Kind = Type
- data ConLike = RealDataCon DataCon
- data Coercion
- = Refl Type
- | GRefl Role Type MCoercionN
- | TyConAppCo Role TyCon [Coercion]
- | AppCo Coercion CoercionN
- | ForAllCo TyCoVar KindCoercion Coercion
- | FunCo Role FunTyFlag FunTyFlag CoercionN Coercion Coercion
- | CoVarCo CoVar
- | AxiomInstCo (CoAxiom Branched) BranchIndex [Coercion]
- | AxiomRuleCo CoAxiomRule [Coercion]
- | UnivCo UnivCoProvenance Role Type Type
- | SymCo Coercion
- | TransCo Coercion Coercion
- | SelCo CoSel Coercion
- | LRCo LeftOrRight CoercionN
- | InstCo Coercion CoercionN
- | KindCo Coercion
- | SubCo CoercionN
- | HoleCo CoercionHole
- data Fixity = Fixity SourceText Int FixityDirection
- data Alt b = Alt AltCon [b] (Expr b)
- data CostCentre
- data Unique
- type Arg b = Expr b
- class (IsOutput doc, IsLine (Line doc)) => IsDoc doc where
- type family Line doc = (r :: Type) | r -> doc
- data Env gbl lcl
- class Outputable a where
- data GhcException
- data SDoc
- data Annotation = Annotation {}
- data HsExpr p
- = HsVar (XVar p) (LIdP p)
- | HsOverLit (XOverLitE p) (HsOverLit p)
- | ExprWithTySig (XExprWithTySig p) (LHsExpr p) (LHsSigWcType (NoGhcTc p))
- data RdrName
- type Id = Var
- data TcGblEnv
- data DynFlags
- data SourceError
- data Plugin = Plugin {
- installCoreToDos :: CorePlugin
- tcPlugin :: TcPlugin
- defaultingPlugin :: DefaultingPlugin
- holeFitPlugin :: HoleFitPlugin
- driverPlugin :: [CommandLineOption] -> HscEnv -> IO HscEnv
- pluginRecompile :: [CommandLineOption] -> IO PluginRecompile
- parsedResultAction :: [CommandLineOption] -> ModSummary -> ParsedResult -> Hsc ParsedResult
- renamedResultAction :: [CommandLineOption] -> TcGblEnv -> HsGroup GhcRn -> TcM (TcGblEnv, HsGroup GhcRn)
- typeCheckResultAction :: [CommandLineOption] -> ModSummary -> TcGblEnv -> TcM TcGblEnv
- spliceRunAction :: [CommandLineOption] -> LHsExpr GhcTc -> TcM (LHsExpr GhcTc)
- interfaceLoadAction :: forall lcl. [CommandLineOption] -> ModIface -> IfM lcl ModIface
- data FastString
- data Role
- data Boxity = Boxed
- type family IdP p
- data OccName
- data IsBootInterface
- class IsOutput doc => IsLine doc where
- class IsOutput doc where
- empty :: doc
- docWithContext :: (SDocContext -> doc) -> doc
- data HDoc
- data HLine
- class Outputable a => OutputableBndr a where
- pprBndr :: BindingSite -> a -> SDoc
- pprPrefixOcc :: a -> SDoc
- pprInfixOcc :: a -> SDoc
- bndrIsJoin_maybe :: a -> Maybe Int
- data BindingSite
- newtype PDoc a = PDoc a
- class OutputableP env a where
- 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
- sdocSuppressCoercionTypes :: !Bool
- sdocSuppressUnfoldings :: !Bool
- sdocSuppressVarKinds :: !Bool
- sdocSuppressUniques :: !Bool
- sdocSuppressModulePrefixes :: !Bool
- sdocSuppressStgExts :: !Bool
- sdocSuppressStgReps :: !Bool
- sdocErrorSpans :: !Bool
- sdocStarIsType :: !Bool
- sdocLinearTypes :: !Bool
- sdocListTuplePuns :: !Bool
- sdocPrintTypeAbbreviations :: !Bool
- sdocUnitIdForUser :: !(FastString -> SDoc)
- data QualifyName
- newtype IsEmptyOrSingleton = IsEmptyOrSingleton Bool
- data PromotedItem
- data PromotionTickContext = PromTickCtx {}
- type QueryPromotionTick = PromotedItem -> Bool
- type QueryQualifyPackage = Unit -> Bool
- type QueryQualifyModule = Module -> Bool
- type QueryQualifyName = Module -> OccName -> QualifyName
- data NamePprCtx = QueryQualify {}
- data Depth
- data PprStyle
- = PprUser NamePprCtx Depth Coloured
- | PprDump NamePprCtx
- | PprCode
- data IdDetails
- data IdInfo
- class Uniquable a where
- class NamedThing a where
- getOccName :: a -> OccName
- getName :: a -> Name
- type TyVar = Var
- data Specificity = SpecifiedSpec
- data VarBndr var argf = Bndr var argf
- data FunTyFlag = FTF_T_T
- data ForAllTyFlag = Required
- type CoreExpr = Expr CoreBndr
- type CoreBndr = Var
- data Expr b
- data TyThing
- type PredType = Type
- data TyLit
- data UnivCoProvenance
- class Monad m => MonadUnique (m :: Type -> Type) where
- getUniqueM :: m Unique
- type Located = GenLocated SrcSpan
- data GenLocated l e = L l e
- data UnhelpfulSpanReason
- data SrcSpan
- data RealSrcSpan
- data RealSrcLoc
- data SourceText
- data FieldLabel
- data Bag a
- data LexicalFixity = Prefix
- data FixityDirection
- data GeneralFlag
- type ModuleNameWithIsBoot = GenWithIsBoot ModuleName
- data GenWithIsBoot mod
- data ModLocation
- data PkgQual = NoPkgQual
- type LHsExpr p = XRec p (HsExpr p)
- data PromotionFlag = NotPromoted
- data InlinePragma
- data Phase = StopLn
- data PprPrec
- data TopLevelFlag = NotTopLevel
- data DataCon
- type TyVarBinder = VarBndr TyVar ForAllTyFlag
- type DFunId = Id
- type VarSet = UniqSet Var
- data AvailInfo
- data ImpItemSpec = ImpAll
- data ImpDeclSpec = ImpDeclSpec {
- is_mod :: ModuleName
- is_as :: ModuleName
- is_qual :: Bool
- is_dloc :: SrcSpan
- data ImportSpec = ImpSpec ImpDeclSpec ImpItemSpec
- type LocatedN = GenLocated SrcSpanAnnN
- type GhcRn = GhcPass 'Renamed
- type GhcPs = GhcPass 'Parsed
- type LImportDecl pass = XRec pass (ImportDecl pass)
- data AnnTarget name = ModuleTarget Module
- type AnnPayload = Serialized
- data CoAxiomRule = CoAxiomRule FastString [Role] Role ([TypeEqn] -> Maybe TypeEqn)
- data CoAxiom (br :: BranchFlag)
- type Branched = 'Branched
- data Class
- data TyConBndrVis = AnonTCB FunTyFlag
- type TyConBinder = VarBndr TyVar TyConBndrVis
- 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
- data LitNumType = LitNumInt
- data Literal
- data Severity = SevWarning
- data MessageClass = MCDiagnostic Severity DiagnosticReason (Maybe DiagnosticCode)
- data MsgEnvelope e
- data DiagnosticReason = WarningWithoutFlag
- class Diagnostic a where
- data Messages e
- data Logger
- data StrictnessMark
- data HsArg tm ty = HsValArg tm
- data HsType pass
- = HsForAllTy (XForAllTy pass) (HsForAllTelescope pass) (LHsType pass)
- | HsQualTy (XQualTy pass) (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 HsWildCardBndrs pass thing = HsWC (XHsWC pass thing) thing
- data HsOuterTyVarBndrs flag pass = HsOuterImplicit (XHsOuterImplicit pass)
- type LHsType pass = XRec pass (HsType pass)
- data FixitySig pass = FixitySig (XFixitySig pass) [LIdP pass] Fixity
- data Sig pass
- = TypeSig (XTypeSig pass) [LIdP pass] (LHsSigWcType pass)
- | FixSig (XFixSig pass) (FixitySig pass)
- | InlineSig (XInlineSig pass) (LIdP pass) InlinePragma
- data HsDecl p = SigD (XSigD p) (Sig p)
- type LHsDecl p = XRec p (HsDecl p)
- data HsModule p
- type CoreAlt = Alt CoreBndr
- type CoreBind = Bind CoreBndr
- type CoreArg = Arg CoreBndr
- type CoreProgram = [CoreBind]
- data Unfolding
- data Bind b
- data AltCon
- data Reduction = Reduction Coercion !Type
- data CafInfo = NoCafRefs
- data FamInstEnv
- type FamInstEnvs = (FamInstEnv, FamInstEnv)
- data FamFlavor = DataFamilyInst TyCon
- data FamInst = FamInst (CoAxiom Unbranched) FamFlavor Name [RoughMatchTc] [TyVar] [CoVar] [Type] Type
- data IfaceAnnotation
- data GhcLink = LinkInMemory
- data TcEvBinds = EvBinds (Bag EvBind)
- data ClsInst
- data FindResult
- = Found ModLocation Module
- | NoPackage Unit
- | FoundMultiple [(Module, ModuleOrigin)]
- | NotFound [FilePath] (Maybe Unit) [Unit] [Unit] [(Unit, UnusableUnitReason)] [ModuleSuggestion]
- data ModGuts
- data ModIface_ (phase :: ModIfacePhase)
- data ExternalPackageState
- data ExternalUnitCache
- type HomePackageTable = DModuleNameEnv HomeModInfo
- data HomeModInfo
- data UnitEnv
- data ModSummary
- data HscEnv
- data Ghc a
- data WhereFrom = ImportBySystem
- type TcM = TcRn
- type TcRn = TcRnIf TcGblEnv TcLclEnv
- type CommandLineOption = String
- type DsM = TcRnIf DsGblEnv DsLclEnv
- data InferMode = NoRestrictions
- data DesugaredModule = DesugaredModule {}
- data TypecheckedModule
- data ParsedModule
- data StableModule
- data ApiComment
- pattern ManyTy :: Mult
- space :: IsLine doc => doc
- comma :: IsLine doc => doc
- colon :: IsLine doc => doc
- int :: IsLine doc => Int -> doc
- word :: Integer -> SDoc
- integer :: IsLine doc => Integer -> doc
- float :: IsLine doc => Float -> doc
- double :: IsLine doc => Double -> doc
- quote :: SDoc -> SDoc
- isTyVar :: Var -> Bool
- rational :: Rational -> SDoc
- liftIO :: MonadIO m => IO a -> m a
- getEnv :: IOEnv env env
- srcLocFile :: RealSrcLoc -> FastString
- parens :: IsLine doc => doc -> doc
- moduleName :: GenModule unit -> ModuleName
- moduleUnit :: GenModule unit -> unit
- mkFunTy :: HasDebugCallStack => FunTyFlag -> Mult -> Type -> Type -> Type
- splitTyConApp :: Type -> (TyCon, [Type])
- newUnique :: TcRnIf gbl lcl Unique
- isEmpty :: SDocContext -> SDoc -> Bool
- mkCoreApps :: CoreExpr -> [CoreExpr] -> CoreExpr
- mkCoreConApps :: DataCon -> [CoreExpr] -> CoreExpr
- mkCoreLams :: [CoreBndr] -> CoreExpr -> CoreExpr
- mkCoreLets :: [CoreBind] -> CoreExpr -> CoreExpr
- expandTypeSynonyms :: Type -> Type
- simplifyInfer :: TcLevel -> InferMode -> [TcIdSigInst] -> [(Name, TcTauType)] -> WantedConstraints -> TcM ([TcTyVar], [EvVar], TcEvBinds, Bool)
- panic :: HasCallStack => String -> a
- bytesFS :: FastString -> ByteString
- mkFastStringByteString :: ByteString -> FastString
- mkFastString :: String -> FastString
- unpackFS :: FastString -> String
- concatFS :: [FastString] -> FastString
- mkPtrString# :: Addr# -> PtrString
- fsLit :: String -> FastString
- ptext :: PtrString -> SDoc
- semi :: IsLine doc => doc
- equals :: IsLine doc => doc
- lparen :: IsLine doc => doc
- rparen :: IsLine doc => doc
- lbrack :: IsLine doc => doc
- rbrack :: IsLine doc => doc
- lbrace :: IsLine doc => doc
- rbrace :: IsLine doc => doc
- quotes :: SDoc -> SDoc
- doubleQuotes :: IsLine doc => doc -> doc
- brackets :: IsLine doc => doc -> doc
- braces :: IsLine doc => doc -> doc
- nest :: Int -> SDoc -> SDoc
- hang :: SDoc -> Int -> SDoc -> SDoc
- hangNotEmpty :: SDoc -> Int -> SDoc -> SDoc
- punctuate :: IsLine doc => doc -> [doc] -> [doc]
- ($+$) :: SDoc -> SDoc -> SDoc
- cat :: [SDoc] -> SDoc
- fcat :: [SDoc] -> SDoc
- noExtField :: NoExtField
- moduleNameFS :: ModuleName -> FastString
- moduleNameString :: ModuleName -> String
- mkModuleName :: String -> ModuleName
- mkModuleNameFS :: FastString -> ModuleName
- mkVarOccFS :: FastString -> OccName
- isListEmptyOrSingleton :: [a] -> IsEmptyOrSingleton
- reallyAlwaysQualifyNames :: QueryQualifyName
- alwaysQualifyNames :: QueryQualifyName
- neverQualifyNames :: QueryQualifyName
- alwaysQualifyModules :: QueryQualifyModule
- neverQualifyModules :: QueryQualifyModule
- alwaysQualifyPackages :: QueryQualifyPackage
- neverQualifyPackages :: QueryQualifyPackage
- alwaysPrintPromTick :: QueryPromotionTick
- reallyAlwaysQualify :: NamePprCtx
- alwaysQualify :: NamePprCtx
- neverQualify :: NamePprCtx
- defaultUserStyle :: PprStyle
- defaultDumpStyle :: PprStyle
- mkDumpStyle :: NamePprCtx -> PprStyle
- defaultErrStyle :: PprStyle
- mkErrStyle :: NamePprCtx -> PprStyle
- cmdlineParserStyle :: PprStyle
- mkUserStyle :: NamePprCtx -> Depth -> PprStyle
- withUserStyle :: NamePprCtx -> Depth -> SDoc -> SDoc
- withErrStyle :: NamePprCtx -> SDoc -> SDoc
- setStyleColoured :: Bool -> PprStyle -> PprStyle
- runSDoc :: SDoc -> SDocContext -> Doc
- defaultSDocContext :: SDocContext
- traceSDocContext :: SDocContext
- withPprStyle :: PprStyle -> SDoc -> SDoc
- pprDeeper :: SDoc -> SDoc
- pprDeeperList :: ([SDoc] -> SDoc) -> [SDoc] -> SDoc
- pprSetDepth :: Depth -> SDoc -> SDoc
- getPprStyle :: (PprStyle -> SDoc) -> SDoc
- sdocWithContext :: (SDocContext -> SDoc) -> SDoc
- sdocOption :: (SDocContext -> a) -> (a -> SDoc) -> SDoc
- updSDocContext :: (SDocContext -> SDocContext) -> SDoc -> SDoc
- qualName :: PprStyle -> QueryQualifyName
- qualModule :: PprStyle -> QueryQualifyModule
- qualPackage :: PprStyle -> QueryQualifyPackage
- promTick :: PprStyle -> QueryPromotionTick
- queryQual :: PprStyle -> NamePprCtx
- codeStyle :: PprStyle -> Bool
- dumpStyle :: PprStyle -> Bool
- userStyle :: PprStyle -> Bool
- getPprDebug :: IsOutput doc => (Bool -> doc) -> doc
- ifPprDebug :: IsOutput doc => doc -> doc -> doc
- whenPprDebug :: IsOutput doc => doc -> doc
- printSDoc :: SDocContext -> Mode -> Handle -> SDoc -> IO ()
- printSDocLn :: SDocContext -> Mode -> Handle -> SDoc -> IO ()
- bufLeftRenderSDoc :: SDocContext -> BufHandle -> SDoc -> IO ()
- pprCode :: SDoc -> SDoc
- renderWithContext :: SDocContext -> SDoc -> String
- showSDocOneLine :: SDocContext -> SDoc -> String
- showSDocUnsafe :: SDoc -> String
- showPprUnsafe :: Outputable a => a -> String
- pprDebugAndThen :: SDocContext -> (String -> a) -> SDoc -> SDoc -> a
- docToSDoc :: Doc -> SDoc
- doublePrec :: Int -> Double -> SDoc
- angleBrackets :: IsLine doc => doc -> doc
- cparen :: Bool -> SDoc -> SDoc
- blankLine :: SDoc
- dcolon :: SDoc
- arrow :: SDoc
- lollipop :: SDoc
- larrow :: SDoc
- darrow :: SDoc
- arrowt :: SDoc
- larrowt :: SDoc
- arrowtt :: SDoc
- larrowtt :: SDoc
- lambda :: SDoc
- underscore :: IsLine doc => doc
- dot :: IsLine doc => doc
- vbar :: IsLine doc => doc
- forAllLit :: SDoc
- bullet :: SDoc
- unicodeSyntax :: SDoc -> SDoc -> SDoc
- ppWhen :: IsOutput doc => Bool -> doc -> doc
- ppUnless :: IsOutput doc => Bool -> doc -> doc
- ppWhenOption :: (SDocContext -> Bool) -> SDoc -> SDoc
- ppUnlessOption :: IsLine doc => (SDocContext -> Bool) -> doc -> doc
- coloured :: PprColour -> SDoc -> SDoc
- keyword :: SDoc -> SDoc
- pprModuleName :: IsLine doc => ModuleName -> doc
- pprHsChar :: Char -> SDoc
- pprHsString :: FastString -> SDoc
- pprHsBytes :: ByteString -> SDoc
- primCharSuffix :: SDoc
- primFloatSuffix :: SDoc
- primIntSuffix :: SDoc
- primDoubleSuffix :: SDoc
- primWordSuffix :: SDoc
- primInt8Suffix :: SDoc
- primWord8Suffix :: SDoc
- primInt16Suffix :: SDoc
- primWord16Suffix :: SDoc
- primInt32Suffix :: SDoc
- primWord32Suffix :: SDoc
- primInt64Suffix :: SDoc
- primWord64Suffix :: SDoc
- pprPrimChar :: Char -> SDoc
- pprPrimInt :: Integer -> SDoc
- pprPrimWord :: Integer -> SDoc
- pprPrimInt8 :: Integer -> SDoc
- pprPrimInt16 :: Integer -> SDoc
- pprPrimInt32 :: Integer -> SDoc
- pprPrimInt64 :: Integer -> SDoc
- pprPrimWord8 :: Integer -> SDoc
- pprPrimWord16 :: Integer -> SDoc
- pprPrimWord32 :: Integer -> SDoc
- pprPrimWord64 :: Integer -> SDoc
- pprPrefixVar :: Bool -> SDoc -> SDoc
- pprInfixVar :: Bool -> SDoc -> SDoc
- pprFastFilePath :: FastString -> SDoc
- pprFilePathString :: IsLine doc => FilePath -> doc
- pprWithCommas :: (a -> SDoc) -> [a] -> SDoc
- pprWithBars :: (a -> SDoc) -> [a] -> SDoc
- spaceIfSingleQuote :: SDoc -> SDoc
- interppSP :: Outputable a => [a] -> SDoc
- interpp'SP :: Outputable a => [a] -> SDoc
- interpp'SP' :: (a -> SDoc) -> [a] -> SDoc
- pprQuotedList :: Outputable a => [a] -> SDoc
- quotedListWithOr :: [SDoc] -> SDoc
- quotedListWithNor :: [SDoc] -> SDoc
- intWithCommas :: Integral a => a -> SDoc
- speakNth :: Int -> SDoc
- speakN :: Int -> SDoc
- speakNOf :: Int -> SDoc -> SDoc
- plural :: [a] -> SDoc
- singular :: [a] -> SDoc
- isOrAre :: [a] -> SDoc
- doOrDoes :: [a] -> SDoc
- itsOrTheir :: [a] -> SDoc
- thisOrThese :: [a] -> SDoc
- hasOrHave :: [a] -> SDoc
- bPutHDoc :: BufHandle -> SDocContext -> HDoc -> IO ()
- throwGhcException :: GhcException -> a
- throwGhcExceptionIO :: GhcException -> IO a
- vanillaIdInfo :: IdInfo
- emptyPlugins :: Plugins
- getKey :: Unique -> Int
- mkUnique :: Char -> Int -> Unique
- hasKey :: Uniquable a => a -> Unique -> Bool
- nameOccName :: Name -> OccName
- isTupleTyCon :: TyCon -> Bool
- mkSrcLoc :: FastString -> Int -> Int -> SrcLoc
- mkRealSrcLoc :: FastString -> Int -> Int -> RealSrcLoc
- srcLocLine :: RealSrcLoc -> Int
- srcLocCol :: RealSrcLoc -> Int
- noSrcSpan :: SrcSpan
- mkGeneralSrcSpan :: FastString -> SrcSpan
- mkRealSrcSpan :: RealSrcLoc -> RealSrcLoc -> RealSrcSpan
- mkSrcSpan :: SrcLoc -> SrcLoc -> SrcSpan
- combineSrcSpans :: SrcSpan -> SrcSpan -> SrcSpan
- isGoodSrcSpan :: SrcSpan -> Bool
- srcSpanStartLine :: RealSrcSpan -> Int
- srcSpanEndLine :: RealSrcSpan -> Int
- srcSpanStartCol :: RealSrcSpan -> Int
- srcSpanEndCol :: RealSrcSpan -> Int
- realSrcSpanStart :: RealSrcSpan -> RealSrcLoc
- srcSpanFileName_maybe :: SrcSpan -> Maybe FastString
- srcSpanToRealSrcSpan :: SrcSpan -> Maybe RealSrcSpan
- unLoc :: GenLocated l e -> e
- mkUniqSet :: Uniquable a => [a] -> UniqSet a
- mkIntegralLit :: Integral a => a -> IntegralLit
- mkTHFractionalLit :: Rational -> FractionalLit
- bagToList :: Bag a -> [a]
- fsToUnit :: FastString -> Unit
- unitString :: IsUnitId u => u -> String
- toUnitId :: Unit -> UnitId
- moduleStableString :: Module -> String
- topPrec :: PprPrec
- funPrec :: PprPrec
- noOccInfo :: OccInfo
- isStrongLoopBreaker :: OccInfo -> Bool
- isDeadOcc :: OccInfo -> Bool
- dataConWrapId :: DataCon -> Id
- dataConFullSig :: DataCon -> ([TyVar], [TyCoVar], [EqSpec], ThetaType, [Scaled Type], Type)
- dataConFieldLabels :: DataCon -> [FieldLabel]
- dataConExTyCoVars :: DataCon -> [TyCoVar]
- dataConTyCon :: DataCon -> TyCon
- dataConWorkId :: DataCon -> Id
- dataConName :: DataCon -> Name
- tupleTyCon :: Boxity -> Arity -> TyCon
- tupleDataCon :: Boxity -> Arity -> DataCon
- naturalTy :: Type
- liftedTypeKind :: Type
- typeSymbolKind :: Kind
- listTyCon :: TyCon
- mkVarOcc :: String -> OccName
- mkTyVarOcc :: String -> OccName
- mkTcOcc :: String -> OccName
- occNameString :: OccName -> String
- nameSrcLoc :: Name -> SrcLoc
- nameSrcSpan :: Name -> SrcSpan
- isExternalName :: Name -> Bool
- isInternalName :: Name -> Bool
- nameModule :: HasDebugCallStack => Name -> Module
- nameModule_maybe :: Name -> Maybe Module
- isSystemName :: Name -> Bool
- mkInternalName :: Unique -> OccName -> SrcSpan -> Name
- mkSystemName :: Unique -> OccName -> Name
- stableNameCmp :: Name -> Name -> Ordering
- nameStableString :: Name -> String
- getSrcSpan :: NamedThing a => a -> SrcSpan
- getOccString :: NamedThing a => a -> String
- varUnique :: Var -> Unique
- setVarUnique :: Var -> Unique -> Var
- setVarName :: Var -> Name -> Var
- setVarType :: Var -> Type -> Var
- binderVar :: VarBndr tv argf -> tv
- tyVarKind :: TyVar -> Kind
- mkTyVar :: Name -> Kind -> TyVar
- idInfo :: HasDebugCallStack => Id -> IdInfo
- idDetails :: Id -> IdDetails
- mkLocalVar :: IdDetails -> Name -> Mult -> Type -> IdInfo -> Id
- isId :: Var -> Bool
- isCoVar :: Var -> Bool
- isLocalId :: Var -> Bool
- tyConAppTyCon_maybe :: Type -> Maybe TyCon
- splitTyConApp_maybe :: HasDebugCallStack => Type -> Maybe (TyCon, [Type])
- mkTyConApp :: TyCon -> [Type] -> Type
- emptyVarSet :: VarSet
- unitVarSet :: Var -> VarSet
- extendVarSet :: VarSet -> Var -> VarSet
- extendVarSetList :: VarSet -> [Var] -> VarSet
- elemVarSet :: Var -> VarSet -> Bool
- emptyInScopeSet :: InScopeSet
- mkRnEnv2 :: InScopeSet -> RnEnv2
- availNames :: AvailInfo -> [Name]
- greNameMangledName :: GreName -> Name
- mkUnqual :: NameSpace -> FastString -> RdrName
- mkVarUnqual :: FastString -> RdrName
- mkQual :: NameSpace -> (FastString, FastString) -> RdrName
- getRdrName :: NamedThing thing => thing -> RdrName
- nameRdrName :: Name -> RdrName
- gresFromAvails :: Maybe ImportSpec -> [AvailInfo] -> [GlobalRdrElt]
- greMangledName :: GlobalRdrElt -> Name
- globalRdrEnvElts :: GlobalRdrEnv -> [GlobalRdrElt]
- lookupGRE_RdrName :: RdrName -> GlobalRdrEnv -> [GlobalRdrElt]
- mkGlobalRdrEnv :: [GlobalRdrElt] -> GlobalRdrEnv
- getLocA :: GenLocated (SrcSpanAnn' a) e -> SrcSpan
- noLocA :: a -> LocatedAn an a
- noAnnSrcSpan :: SrcSpan -> SrcAnn ann
- noAnn :: EpAnn a
- ideclName :: ImportDecl pass -> XRec pass ModuleName
- ideclAs :: ImportDecl pass -> Maybe (XRec pass ModuleName)
- itName :: Unique -> SrcSpan -> Name
- dATA_FOLDABLE :: Module
- gHC_REAL :: Module
- ge_RDR :: RdrName
- le_RDR :: RdrName
- lt_RDR :: RdrName
- gt_RDR :: RdrName
- minus_RDR :: RdrName
- times_RDR :: RdrName
- plus_RDR :: RdrName
- and_RDR :: RdrName
- not_RDR :: RdrName
- varQual_RDR :: Module -> FastString -> RdrName
- eqClassName :: Name
- ordClassName :: Name
- bindMName :: Name
- negateName :: Name
- isStringClassName :: Name
- eqClassKey :: Unique
- fractionalClassKey :: Unique
- ordClassKey :: Unique
- dollarIdKey :: Unique
- numericClassKeys :: [Unique]
- fractionalClassKeys :: [Unique]
- findAnns :: Typeable a => ([Word8] -> a) -> AnnEnv -> CoreAnnTarget -> [a]
- coAxiomTyCon :: forall (br :: BranchFlag). CoAxiom br -> TyCon
- coercionKind :: Coercion -> Pair Type
- classAllSelIds :: Class -> [Id]
- classSCSelIds :: Class -> [Id]
- classMethods :: Class -> [Id]
- classSCTheta :: Class -> [PredType]
- classBigSig :: Class -> ([TyVar], [PredType], [Id], [ClassOpItem])
- mkPrimTyCon :: Name -> [TyConBinder] -> Kind -> [Role] -> TyCon
- isPrimTyCon :: TyCon -> Bool
- isAlgTyCon :: TyCon -> Bool
- isVanillaAlgTyCon :: TyCon -> Bool
- isNewTyCon :: TyCon -> Bool
- isTypeSynonymTyCon :: TyCon -> Bool
- isGadtSyntaxTyCon :: TyCon -> Bool
- isFamilyTyCon :: TyCon -> Bool
- isBoxedTupleTyCon :: TyCon -> Bool
- isPromotedDataCon :: TyCon -> Bool
- tyConDataCons :: TyCon -> [DataCon]
- tyConDataCons_maybe :: TyCon -> Maybe [DataCon]
- tyConSingleDataCon_maybe :: TyCon -> Maybe DataCon
- newTyConRhs :: TyCon -> ([TyVar], Type)
- synTyConDefn_maybe :: TyCon -> Maybe ([TyVar], Type)
- synTyConRhs_maybe :: TyCon -> Maybe Type
- isClassTyCon :: TyCon -> Bool
- tyConClass_maybe :: TyCon -> Maybe Class
- isFamInstTyCon :: TyCon -> Bool
- tyConFamInst_maybe :: TyCon -> Maybe (TyCon, [Type])
- mkTyVarTy :: TyVar -> Type
- mkTyVarTys :: [TyVar] -> [Type]
- mkForAllTys :: [ForAllTyBinder] -> Type -> Type
- primTyCons :: [TyCon]
- isArrowTyCon :: TyCon -> Bool
- eqPrimTyCon :: TyCon
- eqReprPrimTyCon :: TyCon
- emptyTvSubstEnv :: TvSubstEnv
- emptySubst :: Subst
- extendCvSubst :: Subst -> CoVar -> Coercion -> Subst
- mkTvSubstPrs :: [(TyVar, Type)] -> Subst
- substTyWith :: HasDebugCallStack => [TyVar] -> [Type] -> Type -> Type
- substTy :: HasDebugCallStack => Subst -> Type -> Type
- isTyVarTy :: Type -> Bool
- splitAppTys :: Type -> (Type, [Type])
- splitFunTy_maybe :: Type -> Maybe (FunTyFlag, Mult, Type, Type)
- splitFunTys :: Type -> ([Scaled Type], Type)
- piResultTys :: HasDebugCallStack => Type -> [Type] -> Type
- tyConAppArgs_maybe :: Type -> Maybe [Type]
- newTyConInstRhs :: TyCon -> [Type] -> Type
- splitForAllTyCoVars :: Type -> ([TyCoVar], Type)
- isFunTy :: Type -> Bool
- dropForAlls :: Type -> Type
- isTYPEorCONSTRAINT :: Kind -> Bool
- irrelevantMult :: Scaled a -> a
- eqType :: Type -> Type -> Bool
- nonDetCmpType :: Type -> Type -> Ordering
- literalType :: Literal -> Type
- mkRepReflCo :: Type -> Coercion
- mkPlainError :: [GhcHint] -> SDoc -> DiagnosticMessage
- errorsOrFatalWarningsFound :: Messages e -> Bool
- getLogger :: HasLogger m => m Logger
- putLogMsg :: Logger -> LogAction
- pprLocMsgEnvelope :: Diagnostic e => DiagnosticOpts e -> MsgEnvelope e -> SDoc
- withTiming :: MonadIO m => Logger -> SDoc -> (a -> ()) -> m a -> m a
- interpreterBackend :: Backend
- ruleMatchTyKiX :: TyCoVarSet -> RnEnv2 -> TvSubstEnv -> Type -> Type -> Maybe TvSubstEnv
- tcUnifyTy :: Type -> Type -> Maybe Subst
- mkClassPred :: Class -> [Type] -> PredType
- getClassPredTys :: HasDebugCallStack => PredType -> (Class, [Type])
- getClassPredTys_maybe :: PredType -> Maybe (Class, [Type])
- isEvVarType :: Type -> Bool
- isClassPred :: PredType -> Bool
- isEqPred :: PredType -> Bool
- isEqPrimPred :: PredType -> Bool
- isDictId :: Id -> Bool
- dataConRepType :: DataCon -> Type
- dataConUnivTyVars :: DataCon -> [TyVar]
- dataConTheta :: DataCon -> ThetaType
- dataConWrapId_maybe :: DataCon -> Maybe Id
- dataConImplicitTyThings :: DataCon -> [TyThing]
- dataConRepStrictness :: DataCon -> [StrictnessMark]
- dataConWrapperType :: DataCon -> Type
- dataConInstArgTys :: DataCon -> [Type] -> [Scaled Type]
- dataConOrigArgTys :: DataCon -> [Scaled Type]
- dataConRepArgTys :: DataCon -> [Scaled Type]
- isTupleDataCon :: DataCon -> Bool
- isVanillaDataCon :: DataCon -> Bool
- classDataCon :: Class -> DataCon
- maybeUnfoldingTemplate :: Unfolding -> Maybe CoreExpr
- cmpAlt :: Alt a -> Alt a -> Ordering
- mkApps :: Expr b -> [Arg b] -> Expr b
- mkTyApps :: Expr b -> [Type] -> Expr b
- mkTyArg :: Type -> Expr b
- mkLams :: [b] -> Expr b -> Expr b
- bindersOf :: Bind b -> [b]
- flattenBinds :: [Bind b] -> [(b, Expr b)]
- collectBinders :: Expr b -> ([b], Expr b)
- collectTyBinders :: CoreExpr -> ([TyVar], CoreExpr)
- collectTyAndValBinders :: CoreExpr -> ([TyVar], [Id], CoreExpr)
- collectArgs :: Expr b -> (Expr b, [Arg b])
- isTypeArg :: Expr b -> Bool
- cafInfo :: IdInfo -> CafInfo
- setOccInfo :: IdInfo -> OccInfo -> IdInfo
- setCafInfo :: IdInfo -> CafInfo -> IdInfo
- mayHaveCafRefs :: CafInfo -> Bool
- idType :: Id -> Kind
- setIdInfo :: Id -> IdInfo -> Id
- modifyIdInfo :: HasDebugCallStack => (IdInfo -> IdInfo) -> Id -> Id
- mkExportedLocalId :: IdDetails -> Name -> Type -> Id
- mkUserLocal :: OccName -> Unique -> Mult -> Type -> SrcSpan -> Id
- isRecordSelector :: Id -> Bool
- isClassOpId_maybe :: Id -> Maybe Class
- isDFunId :: Id -> Bool
- idDataCon :: Id -> DataCon
- realIdUnfolding :: Id -> Unfolding
- idOccInfo :: Id -> OccInfo
- isConLikeId :: Id -> Bool
- intTyConName :: Name
- boolTyConName :: Name
- listTyConName :: Name
- anyTy :: Type
- true_RDR :: RdrName
- charTyCon :: TyCon
- charDataCon :: DataCon
- stringTy :: Type
- intTy :: Type
- intTyCon :: TyCon
- intDataCon :: DataCon
- boolTy :: Type
- boolTyCon :: TyCon
- falseDataCon :: DataCon
- trueDataCon :: DataCon
- falseDataConId :: Id
- trueDataConId :: Id
- nilDataCon :: DataCon
- consDataCon :: DataCon
- exprFreeVarsList :: CoreExpr -> [Var]
- emptyFamInstEnv :: FamInstEnv
- famInstEnvElts :: FamInstEnv -> [FamInst]
- topNormaliseType_maybe :: FamInstEnvs -> Type -> Maybe Reduction
- exprType :: HasDebugCallStack => CoreExpr -> Type
- extendIdSubst :: Subst -> Id -> CoreExpr -> Subst
- substExpr :: HasDebugCallStack => Subst -> CoreExpr -> CoreExpr
- occurAnalysePgm :: Module -> (Id -> Bool) -> (Activation -> Bool) -> [CoreRule] -> CoreProgram -> CoreProgram
- pAT_ERROR_ID :: Id
- mkHsForAllInvisTele :: forall (p :: Pass). EpAnnForallTy -> [LHsTyVarBndr Specificity (GhcPass p)] -> HsForAllTelescope (GhcPass p)
- getDynFlags :: HasDynFlags m => m DynFlags
- gopt :: GeneralFlag -> DynFlags -> Bool
- gopt_set :: DynFlags -> GeneralFlag -> DynFlags
- xopt_set :: DynFlags -> Extension -> DynFlags
- updOptLevel :: Int -> DynFlags -> DynFlags
- tcSplitDFunTy :: Type -> ([TyVar], [Type], Class, [Type])
- tcSplitMethodTy :: Type -> ([TyVar], PredType, Type)
- instanceDFunId :: ClsInst -> DFunId
- instanceSig :: ClsInst -> ([TyVar], [Type], Class, [Type])
- instEnvElts :: InstEnv -> [ClsInst]
- showSDoc :: DynFlags -> SDoc -> String
- showPpr :: Outputable a => DynFlags -> a -> String
- failM :: IOEnv env a
- mkHsApp :: forall (id :: Pass). LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
- mkHsLam :: forall (p :: Pass). (IsPass p, XMG (GhcPass p) (LHsExpr (GhcPass p)) ~ Origin) => [LPat (GhcPass p)] -> LHsExpr (GhcPass p) -> LHsExpr (GhcPass p)
- mkHsIntegral :: IntegralLit -> HsOverLit GhcPs
- mkHsFractional :: FractionalLit -> HsOverLit GhcPs
- nlHsVar :: forall (p :: Pass) a. IsSrcSpanAnn p a => IdP (GhcPass p) -> LHsExpr (GhcPass p)
- nlVarPat :: forall (p :: Pass) a. IsSrcSpanAnn p a => IdP (GhcPass p) -> LPat (GhcPass p)
- nlHsIf :: LHsExpr GhcPs -> LHsExpr GhcPs -> LHsExpr GhcPs -> LHsExpr GhcPs
- nlList :: [LHsExpr GhcPs] -> LHsExpr GhcPs
- nlHsAppTy :: forall (p :: Pass). LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)
- nlHsTyVar :: forall (p :: Pass) a. IsSrcSpanAnn p a => PromotionFlag -> IdP (GhcPass p) -> LHsType (GhcPass p)
- nlHsFunTy :: forall (p :: Pass). LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)
- nlHsTyConApp :: forall (p :: Pass) a. IsSrcSpanAnn p a => PromotionFlag -> LexicalFixity -> IdP (GhcPass p) -> [LHsTypeArg (GhcPass p)] -> LHsType (GhcPass p)
- hsTypeToHsSigType :: LHsType GhcPs -> LHsSigType GhcPs
- hsTypeToHsSigWcType :: LHsType GhcPs -> LHsSigWcType GhcPs
- mkHsDictLet :: TcEvBinds -> LHsExpr GhcTc -> LHsExpr GhcTc
- lexprCtOrigin :: LHsExpr GhcRn -> CtOrigin
- lookupHpt :: HomePackageTable -> ModuleName -> Maybe HomeModInfo
- ue_hpt :: HasDebugCallStack => UnitEnv -> HomePackageTable
- ms_mod_name :: ModSummary -> ModuleName
- mkTcRnUnknownMessage :: (Diagnostic a, Typeable a, DiagnosticOpts a ~ NoDiagnosticOpts) => a -> TcRnMessage
- srcErrorMessages :: SourceError -> Messages GhcMessage
- printMessages :: Diagnostic a => Logger -> DiagnosticOpts a -> DiagOpts -> Messages a -> IO ()
- initDiagOpts :: DynFlags -> DiagOpts
- initDsMessageOpts :: DynFlags -> DiagnosticOpts DsMessage
- getSession :: GhcMonad m => m HscEnv
- withSession :: GhcMonad m => (HscEnv -> m a) -> m a
- purePlugin :: [CommandLineOption] -> IO PluginRecompile
- defaultPlugin :: Plugin
- findImportedModule :: HscEnv -> ModuleName -> PkgQual -> IO FindResult
- findExposedPackageModule :: FinderCache -> FinderOpts -> UnitState -> ModuleName -> PkgQual -> IO FindResult
- isNumericClass :: Class -> Bool
- cannotFindModule :: HscEnv -> ModuleName -> FindResult -> SDoc
- rnLExpr :: LHsExpr GhcPs -> RnM (LHsExpr GhcRn, FreeVars)
- tcInferRho :: LHsExpr GhcRn -> TcM (LHsExpr GhcTc, TcRhoType)
- addErrAt :: SrcSpan -> TcRnMessage -> TcRn ()
- addErrs :: [(SrcSpan, TcRnMessage)] -> TcRn ()
- reportDiagnostics :: [MsgEnvelope TcRnMessage] -> TcM ()
- reportDiagnostic :: MsgEnvelope TcRnMessage -> TcRn ()
- failIfErrsM :: TcRn ()
- captureConstraints :: TcM a -> TcM (a, WantedConstraints)
- failWithTc :: TcRnMessage -> TcM a
- discardConstraints :: TcM a -> TcM a
- pushTcLevelM :: TcM a -> TcM (TcLevel, a)
- initIfaceTcRn :: IfG a -> TcRn a
- loadInterface :: SDoc -> Module -> WhereFrom -> IfM lcl (MaybeErr SDoc ModIface)
- initDsTc :: DsM a -> TcM (Messages DsMessage, Maybe a)
- initDsWithModGuts :: HscEnv -> ModGuts -> DsM a -> IO (Messages DsMessage, Maybe a)
- dsLExpr :: LHsExpr GhcTc -> DsM CoreExpr
- zonkTopLExpr :: LHsExpr GhcTc -> TcM (LHsExpr GhcTc)
- captureTopConstraints :: TcM a -> TcM (a, WantedConstraints)
- simplifyInteractive :: WantedConstraints -> TcM (Bag EvBind)
- renamePkgQual :: UnitEnv -> ModuleName -> Maybe FastString -> PkgQual
- tcValBinds :: TopLevelFlag -> [(RecFlag, LHsBinds GhcRn)] -> [LSig GhcRn] -> TcM thing -> TcM ([(RecFlag, LHsBinds GhcTc)], thing)
- tcInferSigma :: Bool -> LHsExpr GhcRn -> TcM TcSigmaType
- getModuleInterface :: HscEnv -> Module -> IO (Messages TcRnMessage, Maybe ModIface)
- hscTcRcLookupName :: HscEnv -> Name -> IO (Maybe TyThing)
- hscDesugar :: HscEnv -> ModSummary -> TcGblEnv -> IO ModGuts
- compileFile :: HscEnv -> StopPhase -> (FilePath, Maybe Phase) -> IO (Maybe FilePath)
- modInfoTopLevelScope :: ModuleInfo -> Maybe [Name]
- isDictonaryId :: Id -> Bool
- toSerialized :: Typeable a => (a -> [Word8]) -> a -> Serialized
- fromSerialized :: Typeable a => ([Word8] -> a) -> Serialized -> Maybe a
- deserializeWithData :: Data a => [Word8] -> a
- apiComments :: ParsedModule -> [Located ApiComment]
- apiCommentsParsedSource :: Located (HsModule GhcPs) -> [Located ApiComment]
- dataConSig :: DataCon -> ([TyCoVar], ThetaType, [Type], Type)
- desugarModuleIO :: HscEnv -> ModSummary -> TypecheckedModuleLH -> IO ModGuts
- fsToUnitId :: FastString -> UnitId
- isPatErrorAlt :: CoreAlt -> Bool
- lookupModSummary :: HscEnv -> ModuleName -> Maybe ModSummary
- modInfoLookupNameIO :: HscEnv -> ModuleInfoLH -> Name -> IO (Maybe TyThing)
- moduleInfoTc :: HscEnv -> TcGblEnv -> IO ModuleInfoLH
- parseModuleIO :: HscEnv -> ModSummary -> IO ParsedModule
- qualifiedNameFS :: Name -> FastString
- relevantModules :: ModuleGraph -> ModGuts -> Set Module
- renderWithStyle :: DynFlags -> SDoc -> PprStyle -> String
- showPprQualified :: Outputable a => a -> String
- showSDocQualified :: SDoc -> String
- strictNothing :: Maybe a
- thisPackage :: DynFlags -> UnitId
- tyConRealArity :: TyCon -> Int
- typecheckModuleIO :: HscEnv -> ParsedModule -> IO TypecheckedModuleLH
- mkStableModule :: UnitId -> ModuleName -> StableModule
- toStableModule :: Module -> StableModule
- renderModule :: Module -> String
Documentation
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 !ForAllTyBinder Type | A Π type. Note [When we quantify over a coercion variable] INVARIANT: If the binder is a coercion variable, it must be mentioned in the Type. See Note [Unused coercion variable in ForAllTy] |
FunTy FunTyFlag 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 # | |
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 |
|
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 |
data ModuleName #
A ModuleName is essentially a simple string, e.g. Data.List
.
Instances
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
Data Unit | |
Defined in GHC.Unit.Types gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Unit -> c Unit # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Unit # dataTypeOf :: Unit -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Unit) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Unit) # gmapT :: (forall b. Data b => b -> b) -> Unit -> Unit # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Unit -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Unit -> r # gmapQ :: (forall d. Data d => d -> u) -> Unit -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Unit -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Unit -> m Unit # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Unit -> m Unit # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Unit -> m Unit # | |
Data UnitId | |
Defined in GHC.Unit.Types gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UnitId -> c UnitId # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c UnitId # toConstr :: UnitId -> Constr # dataTypeOf :: UnitId -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c UnitId) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c UnitId) # gmapT :: (forall b. Data b => b -> b) -> UnitId -> UnitId # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UnitId -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UnitId -> r # gmapQ :: (forall d. Data d => d -> u) -> UnitId -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> UnitId -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> UnitId -> m UnitId # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UnitId -> m UnitId # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UnitId -> m UnitId # | |
Show Unit | |
NFData Unit | |
Defined in GHC.Unit.Types | |
Uniquable Module | |
Defined in GHC.Unit.Types | |
Uniquable UnitId | |
Defined in GHC.Unit.Types | |
IsUnitId UnitId | |
Defined in GHC.Unit.Types unitFS :: UnitId -> FastString # | |
Binary InstantiatedUnit | |
Defined in GHC.Unit.Types put_ :: BinHandle -> InstantiatedUnit -> IO () # put :: BinHandle -> InstantiatedUnit -> IO (Bin InstantiatedUnit) # get :: BinHandle -> IO InstantiatedUnit # | |
Binary Unit | |
Binary UnitId | |
Outputable InstalledModule | |
Defined in GHC.Unit.Types ppr :: InstalledModule -> SDoc # | |
Outputable InstantiatedModule | |
Defined in GHC.Unit.Types ppr :: InstantiatedModule -> SDoc # | |
Outputable InstantiatedUnit | |
Defined in GHC.Unit.Types ppr :: InstantiatedUnit -> SDoc # | |
Outputable Module | |
Defined in GHC.Unit.Types | |
Outputable Unit | |
Defined in GHC.Unit.Types | |
Outputable UnitId | |
Defined in GHC.Unit.Types | |
Eq UnitId | |
Ord Unit | |
Ord UnitId | |
Source Location
Instances
Show SrcLoc | |
Outputable SrcLoc | |
Defined in GHC.Types.SrcLoc | |
Eq SrcLoc | |
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.
If you edit this type, you may need to update the GHC formalism See Note [GHC Formalism] in GHC.Core.Lint
Instances
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 # | |
Eq (DeBruijn Var) | |
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 # | |
OutputableBndr (Id, TagSig) | |
Defined in GHC.Stg.InferTags.TagSig | |
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 |
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 |
The number of value arguments that can be applied to a value before it does "real work". So: fib 100 has arity 0 x -> fib x has arity 1 See also Note [Definition of arity] in GHC.Core.Opt.Arity
A 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 |
A Coercion
is concrete evidence of the equality/convertibility
of two types.
Refl Type | |
GRefl Role Type MCoercionN | |
TyConAppCo Role TyCon [Coercion] | |
AppCo Coercion CoercionN | |
ForAllCo TyCoVar KindCoercion Coercion | |
FunCo Role FunTyFlag FunTyFlag CoercionN Coercion Coercion | |
CoVarCo CoVar | |
AxiomInstCo (CoAxiom Branched) BranchIndex [Coercion] | |
AxiomRuleCo CoAxiomRule [Coercion] | |
UnivCo UnivCoProvenance Role Type Type | |
SymCo Coercion | |
TransCo Coercion Coercion | |
SelCo CoSel Coercion | |
LRCo LeftOrRight CoercionN | |
InstCo Coercion CoercionN | |
KindCo Coercion | |
SubCo CoercionN | |
HoleCo CoercionHole | See Note [Coercion holes] Only present during typechecking |
Instances
Data Coercion | |
Defined in GHC.Core.TyCo.Rep 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) | |
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 | |
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 # | |
data CostCentre #
A Cost Centre is a single {-# SCC #-}
annotation.
Instances
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 (IsOutput doc, IsLine (Line doc)) => IsDoc doc where #
A class of types that represent a multiline document, with support for vertical composition.
See Note [HLine versus HDoc] and Note [The outputable class hierarchy] for more details.
Join two doc
s together vertically. If there is no vertical overlap it
"dovetails" the two onto one line.
Concatenate doc
s vertically with dovetailing.
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 # |
class Outputable a where #
Class designating that some type has an SDoc
representation
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 # |
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 # | |
IsDoc SDoc | |
IsLine SDoc | |
Defined in GHC.Utils.Outputable | |
IsOutput SDoc | |
Defined in GHC.Utils.Outputable docWithContext :: (SDocContext -> SDoc) -> SDoc # | |
Outputable SDoc | |
Defined in GHC.Utils.Outputable | |
OutputableP env SDoc | |
Defined in GHC.Utils.Outputable | |
type Line SDoc | |
Defined in GHC.Utils.Outputable |
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 # |
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
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
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 # |
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
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 # | A whole bunch of PPrint instances follow ---------------------------------- |
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 |
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 | |
|
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
See Note [Roles] in GHC.Core.Coercion
Order of constructors matters: the Ord instance coincides with the *super*typing relation on roles.
Instances
Data Role | |
Defined in Language.Haskell.Syntax.Basic 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 # | |
Eq Role | |
Ord Role | |
type Anno (Maybe Role) | |
type Anno (Maybe Role) | |
Instances
Data Boxity | |
Defined in Language.Haskell.Syntax.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 # | |
Eq Boxity | |
Maps the "normal" id type for a given pass
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 | |
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
class IsOutput doc => IsLine doc where #
A class of types that represent a single logical line of text, with support for horizontal composition.
See Note [HLine versus HDoc] and Note [The outputable class hierarchy] for more details.
ftext :: FastString -> doc #
ztext :: FastZString -> doc #
Join two doc
s together horizontally with a gap between them.
A paragraph-fill combinator. It's much like sep
, only it keeps fitting
things on one line until it can't fit any more.
Concatenate doc
s horizontally without gaps.
Concatenate doc
s horizontally with a space between each one.
A superclass for IsLine
and IsDoc
that provides an identity, empty
,
as well as access to the shared SDocContext
.
See Note [The outputable class hierarchy] for more details.
docWithContext :: (SDocContext -> doc) -> doc #
Instances
IsOutput HDoc | |
Defined in GHC.Utils.Outputable docWithContext :: (SDocContext -> HDoc) -> HDoc # | |
IsOutput HLine | |
Defined in GHC.Utils.Outputable docWithContext :: (SDocContext -> HLine) -> HLine # | |
IsOutput SDoc | |
Defined in GHC.Utils.Outputable docWithContext :: (SDocContext -> SDoc) -> SDoc # |
Represents a (possibly empty) sequence of lines that can be efficiently
printed directly to a Handle
(actually a BufHandle
).
See Note [SDoc versus HDoc] and Note [HLine versus HDoc] for more details.
Instances
IsDoc HDoc | |
IsOutput HDoc | |
Defined in GHC.Utils.Outputable docWithContext :: (SDocContext -> HDoc) -> HDoc # | |
type Line HDoc | |
Defined in GHC.Utils.Outputable |
Represents a single line of output that can be efficiently printed directly
to a Handle
(actually a BufHandle
).
See Note [SDoc versus HDoc] and Note [HLine versus HDoc] for more details.
Instances
IsLine HLine | |
IsOutput HLine | |
Defined in GHC.Utils.Outputable docWithContext :: (SDocContext -> HLine) -> HLine # |
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
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) |
Instances
Eq BindingSite | |
Defined in GHC.Utils.Outputable (==) :: BindingSite -> BindingSite -> Bool # (/=) :: BindingSite -> BindingSite -> Bool # |
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
data SDocContext #
data QualifyName #
Instances
Outputable QualifyName | |
Defined in GHC.Utils.Outputable ppr :: QualifyName -> SDoc # |
data PromotedItem #
data PromotionTickContext #
Flags that affect whether a promotion tick is printed.
type QueryPromotionTick = PromotedItem -> Bool #
Given a promoted data constructor, decide whether to print a tick to disambiguate the namespace.
type QueryQualifyPackage = Unit -> Bool #
For a given package, we need to know whether to print it with the component id to disambiguate it.
type QueryQualifyModule = Module -> Bool #
For a given module, we need to know whether to print it with a package name to disambiguate it.
type QueryQualifyName = Module -> OccName -> QualifyName #
data NamePprCtx #
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
.
AllTheWay | |
PartWay Int | 0 => stop |
DefaultDepth | Use |
PprUser NamePprCtx Depth Coloured | |
PprDump NamePprCtx | |
PprCode | Print code; either C or assembler |
Instances
Outputable PprStyle | |
Defined in GHC.Utils.Outputable |
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 |
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.
Class of things that we can obtain a Unique
from
Instances
class NamedThing a where #
A class allowing convenient access to the Name
of various datatypes
Instances
data Specificity #
Whether an Invisible
argument may appear in source Haskell.
SpecifiedSpec | the argument may appear in source Haskell, but isn't required. |
Instances
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 ForAllTyFlag) | |
Defined in GHC.Types.Var ppr :: VarBndr tv ForAllTyFlag -> SDoc # | |
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 # | |
The non-dependent version of ForAllTyFlag
.
See Note [FunTyFlag]
Appears here partly so that it's together with its friends ForAllTyFlag
and ForallVisFlag, but also because it is used in IfaceType, rather
early in the compilation chain
Instances
Data FunTyFlag | |
Defined in GHC.Types.Var gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FunTyFlag -> c FunTyFlag # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c FunTyFlag # toConstr :: FunTyFlag -> Constr # dataTypeOf :: FunTyFlag -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c FunTyFlag) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c FunTyFlag) # gmapT :: (forall b. Data b => b -> b) -> FunTyFlag -> FunTyFlag # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FunTyFlag -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FunTyFlag -> r # gmapQ :: (forall d. Data d => d -> u) -> FunTyFlag -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> FunTyFlag -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> FunTyFlag -> m FunTyFlag # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> FunTyFlag -> m FunTyFlag # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> FunTyFlag -> m FunTyFlag # | |
Binary FunTyFlag | |
Outputable FunTyFlag | |
Defined in GHC.Types.Var | |
Eq FunTyFlag | |
Ord FunTyFlag | |
Defined in GHC.Types.Var |
data ForAllTyFlag #
ForAllTyFlag
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, ForAllTyBinders, TyConBinders, and visibility] in GHC.Core.TyCo.Rep
Instances
The common case for the type of binders and variables when we are manipulating the Core language within GHC
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
Type
. See Note [Representation polymorphism invariants] - Lambda abstraction See Note [Representation 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-can-float invariant] See Note [Representation 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 Type
must be that of all the case alternatives
IMPORTANT: see Note [Case expression invariants]
- Cast an expression to a particular type.
This is used to implement
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 # | |
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 |
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"
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 | |
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 # |
class Monad m => MonadUnique (m :: Type -> Type) where #
A monad for generating unique identifiers
getUniqueM :: m Unique #
Get a new unique identifier
Instances
MonadUnique CoreM | |
Defined in GHC.Core.Opt.Monad | |
MonadUnique TcS | |
Defined in GHC.Tc.Solver.Monad | |
MonadUnique UniqSM | |
Defined in GHC.Types.Unique.Supply getUniqueSupplyM :: UniqSM UniqSupply # getUniqueM :: UniqSM Unique # getUniquesM :: UniqSM [Unique] # |
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
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
FromJSON SrcSpan Source # | |
Defined in Language.Haskell.Liquid.Types.Errors | |
FromJSONKey SrcSpan Source # | |
ToJSON SrcSpan Source # | |
ToJSONKey SrcSpan Source # | |
Data SrcSpan | |
Defined in GHC.Types.SrcLoc gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SrcSpan -> c SrcSpan # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SrcSpan # toConstr :: SrcSpan -> Constr # dataTypeOf :: SrcSpan -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SrcSpan) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SrcSpan) # gmapT :: (forall b. Data b => b -> b) -> SrcSpan -> SrcSpan # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SrcSpan -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SrcSpan -> r # gmapQ :: (forall d. Data d => d -> u) -> SrcSpan -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> SrcSpan -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> SrcSpan -> m SrcSpan # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SrcSpan -> m SrcSpan # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SrcSpan -> m SrcSpan # | |
Show SrcSpan | |
NFData SrcSpan | |
Defined in GHC.Types.SrcLoc | |
ToJson SrcSpan | |
Defined in GHC.Types.SrcLoc | |
Outputable SrcSpan | |
Defined in GHC.Types.SrcLoc | |
Eq SrcSpan | |
Hashable SrcSpan Source # | |
Defined in Language.Haskell.Liquid.GHC.Misc | |
PPrint SrcSpan Source # | |
Defined in Language.Haskell.Liquid.Types.Errors | |
NamedThing e => NamedThing (Located e) | |
Defined in GHC.Types.Name | |
Outputable e => Outputable (Located e) | |
Defined in GHC.Types.SrcLoc |
data RealSrcSpan #
A RealSrcSpan
delimits a portion of a text file. It could be represented
by a pair of (line,column) coordinates, but in fact we optimise
slightly by using more compact representations for single-line and
zero-length spans, both of which are quite common.
The end position is defined to be the column after the end of the span. That is, a span of (1,1)-(1,2) is one character long, and a span of (1,1)-(1,1) is zero characters long.
Real Source Span
Instances
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 # |
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
Data SourceText | |
Defined in GHC.Types.SourceText gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SourceText -> c SourceText # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SourceText # toConstr :: SourceText -> Constr # dataTypeOf :: SourceText -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SourceText) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SourceText) # gmapT :: (forall b. Data b => b -> b) -> SourceText -> SourceText # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SourceText -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SourceText -> r # gmapQ :: (forall d. Data d => d -> u) -> SourceText -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> SourceText -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> SourceText -> m SourceText # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SourceText -> m SourceText # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SourceText -> m SourceText # | |
Show SourceText | |
Defined in GHC.Types.SourceText showsPrec :: Int -> SourceText -> ShowS # show :: SourceText -> String # showList :: [SourceText] -> ShowS # | |
Binary SourceText | |
Defined in GHC.Types.SourceText put_ :: BinHandle -> SourceText -> IO () # put :: BinHandle -> SourceText -> IO (Bin SourceText) # get :: BinHandle -> IO SourceText # | |
Outputable SourceText | |
Defined in GHC.Types.SourceText ppr :: SourceText -> SDoc # | |
Eq SourceText | |
Defined in GHC.Types.SourceText (==) :: SourceText -> SourceText -> Bool # (/=) :: SourceText -> SourceText -> Bool # | |
type Anno (SourceText, RuleName) | |
Defined in GHC.Hs.Decls |
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 # | |
NFData FieldLabel | |
Defined in GHC.Types.FieldLabel rnf :: 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 # |
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) # | |
Monoid (Bag a) | |
Semigroup (Bag a) | |
IsList (Bag a) | |
Outputable a => Outputable (Bag a) | |
Defined in GHC.Data.Bag | |
type Item (Bag a) | |
Defined in GHC.Data.Bag |
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
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 # |
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
data ModLocation #
Module Location
Where a module lives on the file system: the actual locations of the .hs, .hi, .dyn_hi, .o, .dyn_o and .hie 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.
The paths of anything which can affect recompilation should be placed inside ModLocation.
When a ModLocation is created none of the filepaths will have -boot suffixes. This is because in --make mode the ModLocation is put in the finder cache which is indexed by ModuleName, when a ModLocation is retrieved from the FinderCache the boot suffixes are appended. The other case is in -c mode, there the ModLocation immediately gets given the boot suffixes in mkOneShotModLocation.
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 # |
Package-qualifier after renaming
Renaming detects if "this" or the unit-id of the home-unit was used as a package qualifier.
NoPkgQual | No package qualifier |
Instances
Data PkgQual | |
Defined in GHC.Types.PkgQual gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PkgQual -> c PkgQual # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c PkgQual # toConstr :: PkgQual -> Constr # dataTypeOf :: PkgQual -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c PkgQual) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PkgQual) # gmapT :: (forall b. Data b => b -> b) -> PkgQual -> PkgQual # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PkgQual -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PkgQual -> r # gmapQ :: (forall d. Data d => d -> u) -> PkgQual -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> PkgQual -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> PkgQual -> m PkgQual # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PkgQual -> m PkgQual # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PkgQual -> m PkgQual # | |
Outputable PkgQual | |
Defined in GHC.Types.PkgQual | |
Eq PkgQual | |
Ord PkgQual | |
= XRec p (HsExpr p) | May have |
Located Haskell Expression
data PromotionFlag #
Is a TyCon a promoted data constructor or just a normal type constructor?
Instances
Data PromotionFlag | |
Defined in Language.Haskell.Syntax.Type 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 # | |
Eq PromotionFlag | |
Defined in Language.Haskell.Syntax.Type (==) :: 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 # |
Untyped Phase description
Instances
Show Phase | |
Outputable Phase | |
Defined in GHC.Driver.Phases | |
Eq Phase | |
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 # |
A data constructor
Instances
type TyVarBinder = VarBndr TyVar ForAllTyFlag #
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.
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 # | |
NFData AvailInfo | |
Defined in GHC.Types.Avail | |
Binary AvailInfo | |
Outputable AvailInfo | |
Defined in GHC.Types.Avail | |
Eq AvailInfo | Used when deciding if the interface has changed |
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 # |
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 # |
type LocatedN = GenLocated SrcSpanAnnN #
type LImportDecl pass #
= XRec pass (ImportDecl pass) | When in a list this may have |
Located Import Declaration
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 |
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) | |
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 |
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 #
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 #
data LitNumType #
Numeric literal type
LitNumInt |
|
Instances
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 that are 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 |
Used to describe warnings and errors
o The message has a file/line/column heading,
plus "warning:" or "error:",
added by mkLocMessage
o With SevIgnore
the message is suppressed
o Output is intended for end users
Instances
Show Severity | |
ToJson Severity | |
Defined in GHC.Types.Error | |
Outputable Severity | |
Defined in GHC.Types.Error | |
Eq Severity | |
data MessageClass #
The class for a diagnostic message. The main purpose is to classify a
message within GHC, to distinguish it from a debug/dump message vs a proper
diagnostic, for which we include a DiagnosticReason
.
MCDiagnostic Severity DiagnosticReason (Maybe DiagnosticCode) | Diagnostics from the compiler. This constructor is very powerful as
it allows the construction of a The |
Instances
ToJson MessageClass | |
Defined in GHC.Types.Error json :: MessageClass -> JsonDoc # |
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, etc. Finally, multiple
MsgEnvelope
s are aggregated into Messages
that are returned to the
user.
Instances
data DiagnosticReason #
The reason why a Diagnostic
was emitted in the first place.
Diagnostic messages are born within GHC with a very precise reason, which
can be completely statically-computed (i.e. this is an error or a warning
no matter what), or influenced by the specific state of the DynFlags
at
the moment of the creation of a new Diagnostic
. For example, a parsing
error is always going to be an error, whereas a 'WarningWithoutFlag
Opt_WarnUnusedImports' might turn into an error due to '-Werror' or
'-Werror=warn-unused-imports'. Interpreting a DiagnosticReason
together
with its associated Severity
gives us the full picture.
WarningWithoutFlag | Born as a warning. |
Instances
Show DiagnosticReason | |
Defined in GHC.Types.Error showsPrec :: Int -> DiagnosticReason -> ShowS # show :: DiagnosticReason -> String # showList :: [DiagnosticReason] -> ShowS # | |
Outputable DiagnosticReason | |
Defined in GHC.Types.Error ppr :: DiagnosticReason -> SDoc # | |
Eq DiagnosticReason | |
Defined in GHC.Types.Error (==) :: DiagnosticReason -> DiagnosticReason -> Bool # (/=) :: DiagnosticReason -> DiagnosticReason -> Bool # |
class Diagnostic a where #
A class identifying a diagnostic. Dictionary.com defines a diagnostic as:
"a message output by a computer diagnosing an error in a computer program, computer system, or component device".
A Diagnostic
carries the actual description of the message (which, in
GHC's case, it can be an error or a warning) and the reason why such
message was generated in the first place.
Instances
A collection of messages emitted by GHC during error reporting. A diagnostic message is typically a warning or an error. See Note [Messages].
INVARIANT: All the messages in this collection must be relevant, i.e.
their Severity
should not be SevIgnore
. The smart constructor
mkMessages
will filter out any message which Severity
is SevIgnore
.
Instances
Foldable Messages | |
Defined in GHC.Types.Error fold :: Monoid m => Messages m -> m # foldMap :: Monoid m => (a -> m) -> Messages a -> m # foldMap' :: Monoid m => (a -> m) -> Messages a -> m # foldr :: (a -> b -> b) -> b -> Messages a -> b # foldr' :: (a -> b -> b) -> b -> Messages a -> b # foldl :: (b -> a -> b) -> b -> Messages a -> b # foldl' :: (b -> a -> b) -> b -> Messages a -> b # foldr1 :: (a -> a -> a) -> Messages a -> a # foldl1 :: (a -> a -> a) -> Messages a -> a # elem :: Eq a => a -> Messages a -> Bool # maximum :: Ord a => Messages a -> a # minimum :: Ord a => Messages a -> a # | |
Traversable Messages | |
Functor Messages | |
Monoid (Messages e) | |
Semigroup (Messages e) | |
Diagnostic e => Outputable (Messages e) | |
Defined in GHC.Types.Error |
data StrictnessMark #
Instances
Binary StrictnessMark | |
Defined in GHC.Core.DataCon put_ :: BinHandle -> StrictnessMark -> IO () # put :: BinHandle -> StrictnessMark -> IO (Bin StrictnessMark) # get :: BinHandle -> IO StrictnessMark # | |
Outputable StrictnessMark | |
Defined in GHC.Core.DataCon ppr :: StrictnessMark -> SDoc # | |
Eq StrictnessMark | |
Defined in GHC.Core.DataCon (==) :: StrictnessMark -> StrictnessMark -> Bool # (/=) :: StrictnessMark -> StrictnessMark -> Bool # |
Haskell Type
HsForAllTy (XForAllTy pass) (HsForAllTelescope pass) (LHsType pass) |
|
HsQualTy (XQualTy pass) (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 :: PromotionFlag -> 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 |
= XRec pass (HsType pass) | May have |
Located Haskell Type
Fixity Signature
FixitySig (XFixitySig pass) [LIdP pass] Fixity |
Instances
type Anno (FixitySig (GhcPass p)) | |
Defined in GHC.Hs.Binds |
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 |
A Haskell Declaration
Instances
type Anno (HsDecl (GhcPass _1)) | |
Defined in GHC.Hs.Decls |
Haskell Module
All we actually declare here is the top-level structure for a module.
type CoreProgram = [CoreBind] #
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 UnfoldingCache 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 |
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 Reduction
is the result of an operation that rewrites a type ty_in
.
The Reduction
includes the rewritten type ty_out
and a Coercion
co
such that co :: ty_in ~ ty_out
, where the role of the coercion is determined
by the context. That is, the LHS type of the coercion is the original type
ty_in
, while its RHS type is the rewritten type ty_out
.
A Reduction is always homogeneous, unless it is wrapped inside a HetReduction
,
which separately stores the kind coercion.
See Note [The Reduction type].
Instances
Outputable Reduction | |
Defined in GHC.Core.Reduction |
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 | |
data FamInstEnv #
Instances
Outputable FamInstEnv | |
Defined in GHC.Core.FamInstEnv ppr :: FamInstEnv -> SDoc # |
type FamInstEnvs = (FamInstEnv, FamInstEnv) #
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 |
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 # |
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). |
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 |
data FindResult #
The result of searching for an imported module.
NB: FindResult manages both user source-import lookups
(which can result in GenModule
) 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 |
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 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
.
See Note [Strictness in ModIface] to learn about why some fields are strict and others are not.
Instances
Binary ModIface | |
(NFData (IfaceBackendExts phase), NFData (IfaceDeclExts phase)) => NFData (ModIface_ phase) | |
Defined in GHC.Unit.Module.ModIface |
data ExternalPackageState #
Information about other packages that we have slurped in by reading their interface files
data ExternalUnitCache #
Information about the currently loaded external packages. This is mutable because packages will be demand-loaded during a compilation run as required.
type HomePackageTable = DModuleNameEnv HomeModInfo #
Helps us find information about modules in the home package
data HomeModInfo #
Information about modules in the package being compiled
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 # |
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.
Instances
ContainsDynFlags HscEnv | |
Defined in GHC.Driver.Env.Types extractDynFlags :: HscEnv -> DynFlags # |
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
MonadFail Ghc | |
Defined in GHC.Driver.Monad | |
MonadFix Ghc | |
Defined in GHC.Driver.Monad | |
MonadIO Ghc | |
Defined in GHC.Driver.Monad | |
Applicative Ghc | |
Functor Ghc | |
Monad Ghc | |
MonadCatch Ghc | |
Defined in GHC.Driver.Monad | |
MonadMask Ghc | |
Defined in GHC.Driver.Monad mask :: HasCallStack => ((forall a. Ghc a -> Ghc a) -> Ghc b) -> Ghc b # uninterruptibleMask :: HasCallStack => ((forall a. Ghc a -> Ghc a) -> Ghc b) -> Ghc b # generalBracket :: HasCallStack => Ghc a -> (a -> ExitCase b -> Ghc c) -> (a -> Ghc b) -> Ghc (b, c) # | |
MonadThrow Ghc | |
Defined in GHC.Driver.Monad throwM :: (HasCallStack, Exception e) => e -> Ghc a # | |
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 |
Instances
Outputable WhereFrom | |
Defined in GHC.Tc.Types |
type CommandLineOption = String #
Command line options gathered from the -PModule.Name:stuff syntax are given to you as this type
How should we choose which constraints to quantify over?
NoRestrictions | Quantify over any constraint that satisfies pickQuantifiablePreds |
Instances
Outputable InferMode | |
Defined in GHC.Tc.Solver |
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 |
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 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
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 # |
Is this a type-level (i.e., computationally irrelevant, thus erasable)
variable? Satisfies isTyVar = not . isId
.
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
srcLocFile :: RealSrcLoc -> FastString #
Gives the filename of the RealSrcLoc
moduleName :: GenModule unit -> ModuleName #
Module name (e.g. A.B.C)
moduleUnit :: GenModule unit -> unit #
Unit the module belongs to
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
isEmpty :: SDocContext -> SDoc -> Bool #
mkCoreApps 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
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
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
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
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
simplifyInfer :: TcLevel -> InferMode -> [TcIdSigInst] -> [(Name, TcTauType)] -> WantedConstraints -> TcM ([TcTyVar], [EvVar], TcEvBinds, Bool) #
panic :: HasCallStack => String -> a #
Panics and asserts.
bytesFS :: FastString -> ByteString #
Gives the Modified UTF-8 encoded bytes corresponding to a FastString
mkFastStringByteString :: ByteString -> FastString #
Create a FastString
by copying an existing ByteString
mkFastString :: String -> FastString #
Creates a UTF-8 encoded FastString
from a String
unpackFS :: FastString -> String #
Lazily unpacks and decodes the FastString
concatFS :: [FastString] -> FastString #
mkPtrString# :: Addr# -> PtrString #
Wrap an unboxed address into a PtrString
.
fsLit :: String -> FastString #
doubleQuotes :: IsLine doc => doc -> doc #
hangNotEmpty :: SDoc -> Int -> SDoc -> SDoc #
This behaves like hang
, but does not indent the second document
when the header is empty.
:: IsLine doc | |
=> doc | The punctuation |
-> [doc] | The list that will have punctuation added between every adjacent pair of elements |
-> [doc] | Punctuated list |
A paragraph-fill combinator. It's much like sep, only it keeps fitting things on one line until it can't fit any more.
Used when constructing a term with an unused extension point.
moduleNameFS :: ModuleName -> FastString #
moduleNameString :: ModuleName -> String #
mkModuleName :: String -> ModuleName #
mkModuleNameFS :: FastString -> ModuleName #
mkVarOccFS :: FastString -> OccName #
isListEmptyOrSingleton :: [a] -> IsEmptyOrSingleton #
alwaysQualifyNames :: QueryQualifyName #
NB: This won't ever show package IDs
mkDumpStyle :: NamePprCtx -> PprStyle #
Default style for error messages, when we don't know NamePprCtx 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
mkErrStyle :: NamePprCtx -> PprStyle #
Style for printing error messages
mkUserStyle :: NamePprCtx -> Depth -> PprStyle #
withUserStyle :: NamePprCtx -> Depth -> SDoc -> SDoc #
withErrStyle :: NamePprCtx -> SDoc -> SDoc #
setStyleColoured :: Bool -> PprStyle -> PprStyle #
runSDoc :: SDoc -> SDocContext -> Doc #
defaultSDocContext :: SDocContext #
Default pretty-printing options
withPprStyle :: PprStyle -> SDoc -> SDoc #
pprDeeperList :: ([SDoc] -> SDoc) -> [SDoc] -> SDoc #
Truncate a list that is longer than the current depth.
pprSetDepth :: Depth -> SDoc -> SDoc #
getPprStyle :: (PprStyle -> SDoc) -> SDoc #
sdocWithContext :: (SDocContext -> SDoc) -> SDoc #
sdocOption :: (SDocContext -> a) -> (a -> SDoc) -> SDoc #
updSDocContext :: (SDocContext -> SDocContext) -> SDoc -> SDoc #
qualName :: PprStyle -> QueryQualifyName #
promTick :: PprStyle -> QueryPromotionTick #
queryQual :: PprStyle -> NamePprCtx #
getPprDebug :: IsOutput doc => (Bool -> doc) -> doc #
Indicate if -dppr-debug mode is enabled
ifPprDebug :: IsOutput doc => doc -> doc -> doc #
Says what to do with and without -dppr-debug
whenPprDebug :: IsOutput doc => doc -> doc #
Says what to do with -dppr-debug; without, return empty
printSDocLn :: SDocContext -> Mode -> Handle -> SDoc -> IO () #
Like printSDoc
but appends an extra newline.
bufLeftRenderSDoc :: SDocContext -> BufHandle -> SDoc -> IO () #
renderWithContext :: SDocContext -> SDoc -> String #
showSDocOneLine :: SDocContext -> SDoc -> String #
showSDocUnsafe :: SDoc -> String #
showPprUnsafe :: Outputable a => a -> String #
pprDebugAndThen :: SDocContext -> (String -> a) -> SDoc -> SDoc -> a #
doublePrec :: Int -> Double -> SDoc #
doublePrec p n
shows a floating point number n
with p
digits of precision after the decimal point.
angleBrackets :: IsLine doc => doc -> doc #
underscore :: IsLine doc => doc #
unicodeSyntax :: SDoc -> SDoc -> SDoc #
ppWhenOption :: (SDocContext -> Bool) -> SDoc -> SDoc #
ppUnlessOption :: IsLine doc => (SDocContext -> Bool) -> doc -> doc #
coloured :: PprColour -> SDoc -> SDoc #
Apply the given colour/style for the argument.
Only takes effect if colours are enabled.
pprModuleName :: IsLine doc => ModuleName -> doc #
pprHsString :: FastString -> SDoc #
Special combinator for showing string literals.
pprHsBytes :: ByteString -> SDoc #
Special combinator for showing bytestring literals.
primCharSuffix :: SDoc #
primFloatSuffix :: SDoc #
primIntSuffix :: SDoc #
primWordSuffix :: SDoc #
primInt8Suffix :: SDoc #
primWord8Suffix :: SDoc #
primInt16Suffix :: SDoc #
primInt32Suffix :: SDoc #
primInt64Suffix :: SDoc #
pprPrimChar :: Char -> SDoc #
Special combinator for showing unboxed literals.
pprPrimInt :: Integer -> SDoc #
pprPrimWord :: Integer -> SDoc #
pprPrimInt8 :: Integer -> SDoc #
pprPrimInt16 :: Integer -> SDoc #
pprPrimInt32 :: Integer -> SDoc #
pprPrimInt64 :: Integer -> SDoc #
pprPrimWord8 :: Integer -> SDoc #
pprPrimWord16 :: Integer -> SDoc #
pprPrimWord32 :: Integer -> SDoc #
pprPrimWord64 :: Integer -> SDoc #
pprPrefixVar :: Bool -> SDoc -> SDoc #
pprInfixVar :: Bool -> SDoc -> SDoc #
pprFastFilePath :: FastString -> SDoc #
pprFilePathString :: IsLine doc => FilePath -> doc #
Normalise, escape and render a string representing a path
e.g. "c:\whatever"
spaceIfSingleQuote :: SDoc -> SDoc #
interppSP :: Outputable a => [a] -> SDoc #
Returns the separated concatenation of the pretty printed things.
interpp'SP :: Outputable a => [a] -> SDoc #
Returns the comma-separated concatenation of the pretty printed things.
interpp'SP' :: (a -> SDoc) -> [a] -> SDoc #
pprQuotedList :: Outputable a => [a] -> SDoc #
Returns the comma-separated concatenation of the quoted pretty printed things.
[x,y,z] ==> `x', `y', `z'
quotedListWithOr :: [SDoc] -> SDoc #
quotedListWithNor :: [SDoc] -> SDoc #
intWithCommas :: Integral a => a -> SDoc #
Converts an integer to a verbal index:
speakNth 1 = text "first" speakNth 5 = text "fifth" speakNth 21 = text "21st"
Converts an integer to a verbal multiplicity:
speakN 0 = text "none" speakN 5 = text "five" speakN 10 = text "10"
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"
Determines the pluralisation suffix appropriate for the length of a list:
plural [] = char 's' plural ["Hello"] = empty plural ["Hello", "World"] = char 's'
Determines the singular verb suffix appropriate for the length of a list:
singular [] = empty singular["Hello"] = char 's' singular ["Hello", "World"] = empty
Determines the form of to be appropriate for the length of a list:
isOrAre [] = text "are" isOrAre ["Hello"] = text "is" isOrAre ["Hello", "World"] = text "are"
Determines the form of to do appropriate for the length of a list:
doOrDoes [] = text "do" doOrDoes ["Hello"] = text "does" doOrDoes ["Hello", "World"] = text "do"
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
thisOrThese :: [a] -> SDoc #
Determines the form of subject appropriate for the length of a list:
thisOrThese [x] = text "This" thisOrThese [x,y] = text "These" thisOrThese [] = text "These" -- probably avoid this
throwGhcException :: GhcException -> a #
throwGhcExceptionIO :: GhcException -> IO a #
vanillaIdInfo :: IdInfo #
Basic IdInfo
that carries no useful information whatsoever
emptyPlugins :: Plugins #
nameOccName :: Name -> OccName #
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.
mkRealSrcLoc :: FastString -> Int -> Int -> RealSrcLoc #
srcLocLine :: RealSrcLoc -> Int #
Raises an error when used on a "bad" RealSrcLoc
srcLocCol :: RealSrcLoc -> Int #
Raises an error when used on a "bad" RealSrcLoc
mkGeneralSrcSpan :: FastString -> SrcSpan #
Create a "bad" SrcSpan
that has not location information
mkRealSrcSpan :: RealSrcLoc -> RealSrcLoc -> RealSrcSpan #
Create a SrcSpan
between two points in a file
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.
isGoodSrcSpan :: SrcSpan -> Bool #
Test if a SrcSpan
is "good", i.e. has precise location information
srcSpanStartLine :: RealSrcSpan -> Int #
srcSpanEndLine :: RealSrcSpan -> Int #
srcSpanStartCol :: RealSrcSpan -> Int #
srcSpanEndCol :: RealSrcSpan -> Int #
srcSpanFileName_maybe :: SrcSpan -> Maybe FastString #
Obtains the filename for a SrcSpan
if it is "good"
unLoc :: GenLocated l e -> e #
mkIntegralLit :: Integral a => a -> IntegralLit #
fsToUnit :: FastString -> Unit #
Create a new simple unit identifier from a FastString
. Internally,
this is primarily used to specify wired-in unit identifiers.
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.
moduleStableString :: Module -> String #
Get a string representation of a GenModule
that's unique and stable
across recompilations.
eg. "$aeson_70dylHtv1FFGeai1IoxcQr$Data.Aeson.Types.Internal"
isStrongLoopBreaker :: OccInfo -> Bool #
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
)
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
dataConTyCon :: DataCon -> TyCon #
The type constructor that we are building via this data constructor
dataConWorkId :: DataCon -> Id #
tupleTyCon :: Boxity -> Arity -> TyCon #
tupleDataCon :: Boxity -> Arity -> DataCon #
liftedTypeKind :: Type #
typeSymbolKind :: Kind #
mkTyVarOcc :: String -> OccName #
occNameString :: OccName -> String #
nameSrcLoc :: Name -> SrcLoc #
nameSrcSpan :: Name -> SrcSpan #
isExternalName :: Name -> Bool #
isInternalName :: Name -> Bool #
nameModule :: HasDebugCallStack => Name -> Module #
nameModule_maybe :: Name -> Maybe Module #
isSystemName :: Name -> Bool #
mkSystemName :: Unique -> OccName -> Name #
Create a name brought into being by the compiler
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"
getSrcSpan :: NamedThing a => a -> SrcSpan #
getOccString :: NamedThing a => a -> String #
setVarUnique :: Var -> Unique -> Var #
setVarName :: Var -> Name -> Var #
setVarType :: Var -> Type -> Var #
idInfo :: HasDebugCallStack => Id -> IdInfo #
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)
tyConAppTyCon_maybe :: Type -> Maybe TyCon #
The same as fst . splitTyConApp
We can short-cut the FunTy case
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 #
emptyVarSet :: VarSet #
unitVarSet :: Var -> VarSet #
extendVarSet :: VarSet -> Var -> VarSet #
extendVarSetList :: VarSet -> [Var] -> VarSet #
elemVarSet :: Var -> VarSet -> Bool #
mkRnEnv2 :: InScopeSet -> RnEnv2 #
availNames :: AvailInfo -> [Name] #
All names made available by the availability information (excluding overloaded selectors)
greNameMangledName :: GreName -> Name #
mkUnqual :: NameSpace -> FastString -> RdrName #
mkVarUnqual :: 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
getRdrName :: NamedThing thing => thing -> RdrName #
nameRdrName :: Name -> RdrName #
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] #
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).
mkGlobalRdrEnv :: [GlobalRdrElt] -> GlobalRdrEnv #
getLocA :: GenLocated (SrcSpanAnn' a) e -> SrcSpan #
noAnnSrcSpan :: SrcSpan -> SrcAnn ann #
Short form for EpAnnNotUsed
ideclName :: ImportDecl pass -> XRec pass ModuleName #
Module name.
ideclAs :: ImportDecl pass -> Maybe (XRec pass ModuleName) #
as Module
dATA_FOLDABLE :: Module #
varQual_RDR :: Module -> FastString -> RdrName #
eqClassName :: Name #
ordClassName :: Name #
negateName :: Name #
eqClassKey :: Unique #
ordClassKey :: Unique #
dollarIdKey :: Unique #
numericClassKeys :: [Unique] #
fractionalClassKeys :: [Unique] #
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.
coAxiomTyCon :: forall (br :: BranchFlag). CoAxiom br -> TyCon #
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
.
classAllSelIds :: Class -> [Id] #
classSCSelIds :: Class -> [Id] #
classMethods :: Class -> [Id] #
classSCTheta :: Class -> [PredType] #
classBigSig :: Class -> ([TyVar], [PredType], [Id], [ClassOpItem]) #
:: Name | |
-> [TyConBinder] | |
-> Kind | result kind
Must answer |
-> [Role] | |
-> TyCon |
Create an primitive TyCon
, such as Int#
, Type
or RealWorld#
Primitive TyCons are marshalable iff not lifted.
If you'd like to change this, modify marshalablePrimTyCon.
isPrimTyCon :: TyCon -> Bool #
Does this TyCon
represent something that cannot be defined in Haskell?
isAlgTyCon :: TyCon -> Bool #
Returns True
if the supplied TyCon
resulted from either a
data
or newtype
declaration
isVanillaAlgTyCon :: TyCon -> Bool #
Returns True
for vanilla AlgTyCons -- that is, those created
with a data
or newtype
declaration.
isNewTyCon :: TyCon -> Bool #
Is this TyCon
that for a newtype
isTypeSynonymTyCon :: TyCon -> Bool #
Is this a TyCon
representing a regular H98 type synonym (type
)?
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?
isBoxedTupleTyCon :: TyCon -> Bool #
Is this the TyCon
for a boxed tuple?
isPromotedDataCon :: TyCon -> Bool #
Is this a PromotedDataCon?
tyConDataCons :: TyCon -> [DataCon] #
As tyConDataCons_maybe
, but returns the empty list of constructors if no
constructors could be found
tyConDataCons_maybe :: TyCon -> Maybe [DataCon] #
newTyConRhs :: TyCon -> ([TyVar], Type) #
synTyConDefn_maybe :: TyCon -> Maybe ([TyVar], Type) #
Extract the TyVar
s bound by a vanilla type synonym
and the corresponding (unsubstituted) right hand side.
synTyConRhs_maybe :: TyCon -> Maybe Type #
Extract the information pertaining to the right hand side of a type synonym
(type
) declaration.
isClassTyCon :: TyCon -> Bool #
Is this TyCon
that for a class instance?
tyConClass_maybe :: TyCon -> Maybe Class #
If this TyCon
is that for a class instance, return the class it is for.
Otherwise returns Nothing
isFamInstTyCon :: TyCon -> Bool #
Is this TyCon
that for a data family instance?
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
mkTyVarTys :: [TyVar] -> [Type] #
mkForAllTys :: [ForAllTyBinder] -> Type -> Type #
Wraps foralls over the type using the provided TyCoVar
s from left to right
primTyCons :: [TyCon] #
isArrowTyCon :: TyCon -> Bool #
eqPrimTyCon :: TyCon #
emptySubst :: Subst #
mkTvSubstPrs :: [(TyVar, Type)] -> Subst #
Generates the in-scope set for the TCvSubst
from the types in the
incoming environment. No CoVars, please! The InScopeSet is just a thunk
so with a bit of luck it'll never be evaluated
substTyWith :: HasDebugCallStack => [TyVar] -> [Type] -> Type -> Type #
Type substitution, see zipTvSubst
substTy :: HasDebugCallStack => Subst -> Type -> Type #
Substitute within a Type
The substitution has to satisfy the invariants described in
Note [The substitution invariant].
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.
splitFunTy_maybe :: Type -> Maybe (FunTyFlag, Mult, Type, Type) #
Attempts to extract the multiplicity, argument and result types from a type
piResultTys :: HasDebugCallStack => Type -> [Type] -> Type #
(piResultTys f_ty [ty1, .., tyn]) gives the type of (f ty1 .. tyn)
where f :: f_ty
piResultTys
is interesting because:
1. f_ty
may have more for-alls than there are args
2. Less obviously, it may have fewer for-alls
For case 2. think of:
piResultTys (forall a.a) [forall b.b, Int]
This really can happen, but only (I think) in situations involving
undefined. For example:
undefined :: forall a. a
Term: undefined (forall b. b->b)
Int
This term should have type (Int -> Int), but notice that
there are more type args than foralls in undefined
s type.
tyConAppArgs_maybe :: Type -> Maybe [Type] #
The same as snd . splitTyConApp
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.
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.
dropForAlls :: Type -> Type #
Drops all ForAllTys
isTYPEorCONSTRAINT :: Kind -> Bool #
Does this classify a type allowed to have values? Responds True to things like *, TYPE Lifted, TYPE IntRep, TYPE v, Constraint.
True of a kind `TYPE _` or `CONSTRAINT _`
irrelevantMult :: Scaled a -> a #
eqType :: Type -> Type -> Bool #
Type equality on source types. Does not look through newtypes
,
PredType
s or type families, 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.
nonDetCmpType :: Type -> Type -> Ordering #
literalType :: Literal -> Type #
Find the Haskell Type
the literal occupies
mkRepReflCo :: Type -> Coercion #
Make a representational reflexive coercion
mkPlainError :: [GhcHint] -> SDoc -> DiagnosticMessage #
Create an error DiagnosticMessage
holding just a single SDoc
errorsOrFatalWarningsFound :: Messages e -> Bool #
Are there any errors or -Werror warnings here?
pprLocMsgEnvelope :: Diagnostic e => DiagnosticOpts e -> MsgEnvelope e -> SDoc #
:: MonadIO m | |
=> Logger | |
-> 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.
interpreterBackend :: Backend #
The 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).
:: 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
tcUnifyTy :: Type -> Type -> Maybe Subst #
Simple unification of two types; all type variables are bindable Precondition: the kinds are already equal
mkClassPred :: Class -> [Type] -> PredType #
getClassPredTys :: HasDebugCallStack => PredType -> (Class, [Type]) #
isEvVarType :: Type -> Bool #
isClassPred :: PredType -> Bool #
isEqPrimPred :: PredType -> Bool #
dataConRepType :: DataCon -> Type #
The representation type of the data constructor, i.e. the sort type that will represent values of this type at runtime
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.
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)
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
dataConRepStrictness :: DataCon -> [StrictnessMark] #
Give the demands on the arguments of a Core constructor application (Con dc args)
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.
:: 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
dataConOrigArgTys :: DataCon -> [Scaled Type] #
Returns the argument types of the wrapper, excluding all dictionary arguments and without substituting for any type variables
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
isTupleDataCon :: DataCon -> Bool #
isVanillaDataCon :: DataCon -> Bool #
Vanilla DataCon
s are those that are nice boring Haskell 98 constructors
classDataCon :: Class -> DataCon #
maybeUnfoldingTemplate :: Unfolding -> Maybe CoreExpr #
Retrieves the template of an unfolding if possible maybeUnfoldingTemplate is used mainly when specialising, and we do want to specialise DFuns, so it's important to return a template for DFunUnfoldings
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
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
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
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
collectTyBinders :: CoreExpr -> ([TyVar], CoreExpr) #
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
setOccInfo :: IdInfo -> OccInfo -> IdInfo infixl 1 #
setCafInfo :: IdInfo -> CafInfo -> IdInfo infixl 1 #
mayHaveCafRefs :: CafInfo -> Bool #
modifyIdInfo :: HasDebugCallStack => (IdInfo -> IdInfo) -> Id -> Id #
mkExportedLocalId :: IdDetails -> Name -> Type -> Id #
Create a local Id
that is marked as exported.
This prevents things attached to it from being removed as dead code.
See Note [Exported LocalIds]
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
isRecordSelector :: 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
realIdUnfolding :: Id -> Unfolding #
Expose the unfolding if there is one, including for loop breakers
isConLikeId :: Id -> Bool #
intTyConName :: Name #
boolTyConName :: Name #
listTyConName :: Name #
charDataCon :: DataCon #
intDataCon :: DataCon #
falseDataCon :: DataCon #
trueDataCon :: DataCon #
falseDataConId :: Id #
trueDataConId :: Id #
nilDataCon :: DataCon #
consDataCon :: DataCon #
exprFreeVarsList :: CoreExpr -> [Var] #
Find all locally-defined free Ids or type variables in an expression returning a deterministically ordered list.
famInstEnvElts :: FamInstEnv -> [FamInst] #
topNormaliseType_maybe :: FamInstEnvs -> Type -> Maybe Reduction #
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.
exprType :: HasDebugCallStack => 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
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 IdSubstEnv]
occurAnalysePgm :: Module -> (Id -> Bool) -> (Activation -> Bool) -> [CoreRule] -> CoreProgram -> CoreProgram #
pAT_ERROR_ID :: Id #
mkHsForAllInvisTele :: forall (p :: Pass). EpAnnForallTy -> [LHsTyVarBndr Specificity (GhcPass p)] -> HsForAllTelescope (GhcPass p) #
getDynFlags :: HasDynFlags m => m DynFlags #
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.
gopt_set :: DynFlags -> GeneralFlag -> DynFlags #
Set a GeneralFlag
updOptLevel :: Int -> DynFlags -> DynFlags #
Sets the DynFlags
to be appropriate to the optimisation level
instanceDFunId :: ClsInst -> DFunId #
instEnvElts :: InstEnv -> [ClsInst] #
showPpr :: Outputable a => DynFlags -> a -> String #
mkHsApp :: forall (id :: Pass). LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) #
mkHsLam :: forall (p :: Pass). (IsPass p, XMG (GhcPass p) (LHsExpr (GhcPass p)) ~ Origin) => [LPat (GhcPass p)] -> LHsExpr (GhcPass p) -> LHsExpr (GhcPass p) #
mkHsIntegral :: IntegralLit -> HsOverLit GhcPs #
nlHsAppTy :: forall (p :: Pass). LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p) #
nlHsTyVar :: forall (p :: Pass) a. IsSrcSpanAnn p a => PromotionFlag -> IdP (GhcPass p) -> LHsType (GhcPass p) #
nlHsFunTy :: forall (p :: Pass). LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p) #
nlHsTyConApp :: forall (p :: Pass) a. IsSrcSpanAnn p a => PromotionFlag -> LexicalFixity -> IdP (GhcPass p) -> [LHsTypeArg (GhcPass p)] -> LHsType (GhcPass p) #
hsTypeToHsSigType :: LHsType GhcPs -> LHsSigType GhcPs #
Convert an LHsType
to an LHsSigType
.
hsTypeToHsSigWcType :: LHsType GhcPs -> LHsSigWcType GhcPs #
Convert an LHsType
to an LHsSigWcType
.
lexprCtOrigin :: LHsExpr GhcRn -> CtOrigin #
Extract a suitable CtOrigin from a HsExpr
lookupHpt :: HomePackageTable -> ModuleName -> Maybe HomeModInfo #
ue_hpt :: HasDebugCallStack => UnitEnv -> HomePackageTable #
ms_mod_name :: ModSummary -> ModuleName #
mkTcRnUnknownMessage :: (Diagnostic a, Typeable a, DiagnosticOpts a ~ NoDiagnosticOpts) => a -> TcRnMessage #
printMessages :: Diagnostic a => Logger -> DiagnosticOpts a -> DiagOpts -> Messages a -> IO () #
initDiagOpts :: DynFlags -> DiagOpts #
Initialise the general configuration for printing diagnostic messages For example, this configuration controls things like whether warnings are treated like errors.
getSession :: GhcMonad m => m HscEnv #
withSession :: GhcMonad m => (HscEnv -> m a) -> m a #
Call the argument with the current session.
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.
findImportedModule :: HscEnv -> ModuleName -> PkgQual -> 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 :: FinderCache -> FinderOpts -> UnitState -> ModuleName -> PkgQual -> IO FindResult #
isNumericClass :: Class -> Bool #
cannotFindModule :: HscEnv -> ModuleName -> FindResult -> SDoc #
addErrAt :: SrcSpan -> TcRnMessage -> TcRn () #
addErrs :: [(SrcSpan, TcRnMessage)] -> TcRn () #
reportDiagnostics :: [MsgEnvelope TcRnMessage] -> TcM () #
reportDiagnostic :: MsgEnvelope TcRnMessage -> TcRn () #
failIfErrsM :: TcRn () #
captureConstraints :: TcM a -> TcM (a, WantedConstraints) #
failWithTc :: TcRnMessage -> TcM a #
discardConstraints :: TcM a -> TcM a #
Throw out any constraints emitted by the thing_inside
pushTcLevelM :: TcM a -> TcM (TcLevel, a) #
initIfaceTcRn :: IfG a -> TcRn a #
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
; massertPpr (exprType core_expr eqType
hsExprType e)
(ppr e + dcolon + ppr (hsExprType e) $$
ppr core_expr + dcolon + ppr (exprType core_expr))
; return core_expr }
captureTopConstraints :: TcM a -> TcM (a, WantedConstraints) #
simplifyInteractive :: WantedConstraints -> TcM (Bag EvBind) #
renamePkgQual :: UnitEnv -> ModuleName -> Maybe FastString -> PkgQual #
Rename raw package imports
tcValBinds :: TopLevelFlag -> [(RecFlag, LHsBinds GhcRn)] -> [LSig GhcRn] -> TcM thing -> TcM ([(RecFlag, LHsBinds GhcTc)], thing) #
tcInferSigma :: Bool -> LHsExpr GhcRn -> TcM TcSigmaType #
getModuleInterface :: HscEnv -> Module -> IO (Messages TcRnMessage, 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.
hscDesugar :: HscEnv -> ModSummary -> TcGblEnv -> IO ModGuts #
Convert a typechecked module to Core
modInfoTopLevelScope :: ModuleInfo -> Maybe [Name] #
isDictonaryId :: Id -> Bool #
toSerialized :: Typeable a => (a -> [Word8]) -> a -> Serialized #
Put a Typeable value that we are able to actually turn into bytes into a Serialized
value ready for deserialization later
fromSerialized :: Typeable a => ([Word8] -> a) -> Serialized -> Maybe a #
If the Serialized
value contains something of the given type, then use the specified deserializer to return Just
that.
Otherwise return Nothing
.
deserializeWithData :: Data a => [Word8] -> a #
Use a Data
instance to implement a deserialization scheme dual to that of serializeWithData
apiComments :: ParsedModule -> [Located ApiComment] Source #
Extract top-level comments from a module.
apiCommentsParsedSource :: Located (HsModule GhcPs) -> [Located ApiComment] Source #
desugarModuleIO :: HscEnv -> ModSummary -> TypecheckedModuleLH -> IO ModGuts Source #
Desugar a typechecked module.
fsToUnitId :: FastString -> UnitId Source #
isPatErrorAlt :: CoreAlt -> Bool Source #
Tells if a case alternative calls to patError
lookupModSummary :: HscEnv -> ModuleName -> Maybe ModSummary Source #
parseModuleIO :: HscEnv -> ModSummary -> IO ParsedModule Source #
qualifiedNameFS :: Name -> FastString Source #
relevantModules :: ModuleGraph -> ModGuts -> Set Module Source #
The collection of dependencies and usages modules which are relevant for liquidHaskell
showPprQualified :: Outputable a => a -> String Source #
showSDocQualified :: SDoc -> String Source #
strictNothing :: Maybe a Source #
thisPackage :: DynFlags -> UnitId Source #
tyConRealArity :: TyCon -> Int Source #
typecheckModuleIO :: HscEnv -> ParsedModule -> IO TypecheckedModuleLH Source #
mkStableModule :: UnitId -> ModuleName -> StableModule Source #
Creates a new StableModule
out of a ModuleName
and a UnitId
.
toStableModule :: Module -> StableModule Source #
Converts a Module
into a StableModule
.
renderModule :: Module -> String Source #