Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
AutoInstrument.Internal.GhcFacade
Synopsis
- data Levity
- data TyCon
- type Module = GenModule Unit
- data Type
- class (Typeable e, Show e) => Exception e where
- toException :: e -> SomeException
- fromException :: SomeException -> Maybe e
- displayException :: e -> String
- data Fingerprint = Fingerprint !Word64 !Word64
- data SrcLoc
- type HasCallStack = ?callStack :: CallStack
- data Version = Version {
- versionBranch :: [Int]
- versionTags :: [String]
- data FractionalExponentBase
- data Coercion
- data Alt b = Alt AltCon [b] (Expr b)
- data Option
- data Unique
- type Arg b = Expr b
- type Unit = GenUnit UnitId
- data GhcException
- data SDoc
- data AnnDecl pass
- = HsAnnotation (XHsAnnotation pass) (AnnProvenance pass) (XRec pass (HsExpr pass))
- | XAnnDecl !(XXAnnDecl pass)
- data IE pass
- = IEVar (XIEVar pass) (LIEWrappedName pass)
- | IEThingAbs (XIEThingAbs pass) (LIEWrappedName pass)
- | IEThingAll (XIEThingAll pass) (LIEWrappedName pass)
- | IEThingWith (XIEThingWith pass) (LIEWrappedName pass) IEWildcard [LIEWrappedName pass]
- | IEModuleContents (XIEModuleContents pass) (XRec pass ModuleName)
- | IEGroup (XIEGroup pass) Int (LHsDoc pass)
- | IEDoc (XIEDoc pass) (LHsDoc pass)
- | IEDocNamed (XIEDocNamed pass) String
- | XIE !(XXIE pass)
- data Annotation = Annotation {}
- type Kind = Type
- data HsExpr p
- = HsVar (XVar p) (LIdP p)
- | HsUnboundVar (XUnboundVar p) RdrName
- | HsRecSel (XRecSel p) (FieldOcc p)
- | HsOverLabel (XOverLabel p) SourceText FastString
- | HsIPVar (XIPVar p) HsIPName
- | HsOverLit (XOverLitE p) (HsOverLit p)
- | HsLit (XLitE p) (HsLit p)
- | HsLam (XLam p) (MatchGroup p (LHsExpr p))
- | HsLamCase (XLamCase p) LamCaseVariant (MatchGroup p (LHsExpr p))
- | HsApp (XApp p) (LHsExpr p) (LHsExpr p)
- | HsAppType (XAppTypeE p) (LHsExpr p) !(LHsToken "@" p) (LHsWcType (NoGhcTc p))
- | OpApp (XOpApp p) (LHsExpr p) (LHsExpr p) (LHsExpr p)
- | NegApp (XNegApp p) (LHsExpr p) (SyntaxExpr p)
- | HsPar (XPar p) !(LHsToken "(" p) (LHsExpr p) !(LHsToken ")" p)
- | SectionL (XSectionL p) (LHsExpr p) (LHsExpr p)
- | SectionR (XSectionR p) (LHsExpr p) (LHsExpr p)
- | ExplicitTuple (XExplicitTuple p) [HsTupArg p] Boxity
- | ExplicitSum (XExplicitSum p) ConTag SumWidth (LHsExpr p)
- | HsCase (XCase p) (LHsExpr p) (MatchGroup p (LHsExpr p))
- | HsIf (XIf p) (LHsExpr p) (LHsExpr p) (LHsExpr p)
- | HsMultiIf (XMultiIf p) [LGRHS p (LHsExpr p)]
- | HsLet (XLet p) !(LHsToken "let" p) (HsLocalBinds p) !(LHsToken "in" p) (LHsExpr p)
- | HsDo (XDo p) HsDoFlavour (XRec p [ExprLStmt p])
- | ExplicitList (XExplicitList p) [LHsExpr p]
- | RecordCon {
- rcon_ext :: XRecordCon p
- rcon_con :: XRec p (ConLikeP p)
- rcon_flds :: HsRecordBinds p
- | RecordUpd {
- rupd_ext :: XRecordUpd p
- rupd_expr :: LHsExpr p
- rupd_flds :: Either [LHsRecUpdField p] [LHsRecUpdProj p]
- | HsGetField { }
- | HsProjection {
- proj_ext :: XProjection p
- proj_flds :: NonEmpty (XRec p (DotFieldOcc p))
- | ExprWithTySig (XExprWithTySig p) (LHsExpr p) (LHsSigWcType (NoGhcTc p))
- | ArithSeq (XArithSeq p) (Maybe (SyntaxExpr p)) (ArithSeqInfo p)
- | HsTypedBracket (XTypedBracket p) (LHsExpr p)
- | HsUntypedBracket (XUntypedBracket p) (HsQuote p)
- | HsTypedSplice (XTypedSplice p) (LHsExpr p)
- | HsUntypedSplice (XUntypedSplice p) (HsUntypedSplice p)
- | HsProc (XProc p) (LPat p) (LHsCmdTop p)
- | HsStatic (XStatic p) (LHsExpr p)
- | HsPragE (XPragE p) (HsPragE p) (LHsExpr p)
- | XExpr !(XXExpr p)
- data RdrName
- type Id = Var
- data Subst = Subst InScopeSet IdSubstEnv TvSubstEnv CvSubstEnv
- data NoExtField = NoExtField
- data FloatOutSwitches = FloatOutSwitches {}
- data DynFlags = DynFlags {
- ghcMode :: GhcMode
- ghcLink :: GhcLink
- backend :: !Backend
- ghcNameVersion :: !GhcNameVersion
- fileSettings :: !FileSettings
- targetPlatform :: Platform
- toolSettings :: !ToolSettings
- platformMisc :: !PlatformMisc
- rawSettings :: [(String, String)]
- tmpDir :: TempDir
- llvmOptLevel :: Int
- verbosity :: Int
- debugLevel :: Int
- simplPhases :: Int
- maxSimplIterations :: Int
- ruleCheck :: Maybe String
- strictnessBefore :: [Int]
- parMakeCount :: Maybe Int
- enableTimeStats :: Bool
- ghcHeapSize :: Maybe Int
- maxRelevantBinds :: Maybe Int
- maxValidHoleFits :: Maybe Int
- maxRefHoleFits :: Maybe Int
- refLevelHoleFits :: Maybe Int
- maxUncoveredPatterns :: Int
- maxPmCheckModels :: Int
- simplTickFactor :: Int
- dmdUnboxWidth :: !Int
- specConstrThreshold :: Maybe Int
- specConstrCount :: Maybe Int
- specConstrRecursive :: Int
- binBlobThreshold :: Maybe Word
- liberateCaseThreshold :: Maybe Int
- floatLamArgs :: Maybe Int
- liftLamsRecArgs :: Maybe Int
- liftLamsNonRecArgs :: Maybe Int
- liftLamsKnown :: Bool
- cmmProcAlignment :: Maybe Int
- historySize :: Int
- importPaths :: [FilePath]
- mainModuleNameIs :: ModuleName
- mainFunIs :: Maybe String
- reductionDepth :: IntWithInf
- solverIterations :: IntWithInf
- homeUnitId_ :: UnitId
- homeUnitInstanceOf_ :: Maybe UnitId
- homeUnitInstantiations_ :: [(ModuleName, Module)]
- workingDirectory :: Maybe FilePath
- thisPackageName :: Maybe String
- hiddenModules :: Set ModuleName
- reexportedModules :: Set ModuleName
- targetWays_ :: Ways
- splitInfo :: Maybe (String, Int)
- objectDir :: Maybe String
- dylibInstallName :: Maybe String
- hiDir :: Maybe String
- hieDir :: Maybe String
- stubDir :: Maybe String
- dumpDir :: Maybe String
- objectSuf_ :: String
- hcSuf :: String
- hiSuf_ :: String
- hieSuf :: String
- dynObjectSuf_ :: String
- dynHiSuf_ :: String
- outputFile_ :: Maybe String
- dynOutputFile_ :: Maybe String
- outputHi :: Maybe String
- dynOutputHi :: Maybe String
- dynLibLoader :: DynLibLoader
- dynamicNow :: !Bool
- dumpPrefix :: FilePath
- dumpPrefixForce :: Maybe FilePath
- ldInputs :: [Option]
- includePaths :: IncludeSpecs
- libraryPaths :: [String]
- frameworkPaths :: [String]
- cmdlineFrameworks :: [String]
- rtsOpts :: Maybe String
- rtsOptsEnabled :: RtsOptsEnabled
- rtsOptsSuggestions :: Bool
- hpcDir :: String
- pluginModNames :: [ModuleName]
- pluginModNameOpts :: [(ModuleName, String)]
- frontendPluginOpts :: [String]
- externalPluginSpecs :: [ExternalPluginSpec]
- depMakefile :: FilePath
- depIncludePkgDeps :: Bool
- depIncludeCppDeps :: Bool
- depExcludeMods :: [ModuleName]
- depSuffixes :: [String]
- packageDBFlags :: [PackageDBFlag]
- ignorePackageFlags :: [IgnorePackageFlag]
- packageFlags :: [PackageFlag]
- pluginPackageFlags :: [PackageFlag]
- trustFlags :: [TrustFlag]
- packageEnv :: Maybe FilePath
- dumpFlags :: EnumSet DumpFlag
- generalFlags :: EnumSet GeneralFlag
- warningFlags :: EnumSet WarningFlag
- fatalWarningFlags :: EnumSet WarningFlag
- language :: Maybe Language
- safeHaskell :: SafeHaskellMode
- safeInfer :: Bool
- safeInferred :: Bool
- thOnLoc :: SrcSpan
- newDerivOnLoc :: SrcSpan
- deriveViaOnLoc :: SrcSpan
- overlapInstLoc :: SrcSpan
- incoherentOnLoc :: SrcSpan
- pkgTrustOnLoc :: SrcSpan
- warnSafeOnLoc :: SrcSpan
- warnUnsafeOnLoc :: SrcSpan
- trustworthyOnLoc :: SrcSpan
- extensions :: [OnOff Extension]
- extensionFlags :: EnumSet Extension
- unfoldingOpts :: !UnfoldingOpts
- maxWorkerArgs :: Int
- ghciHistSize :: Int
- flushOut :: FlushOut
- ghcVersionFile :: Maybe FilePath
- haddockOptions :: Maybe String
- ghciScripts :: [String]
- pprUserLength :: Int
- pprCols :: Int
- useUnicode :: Bool
- useColor :: OverridingBool
- canUseColor :: Bool
- colScheme :: Scheme
- profAuto :: ProfAuto
- callerCcFilters :: [CallerCcFilter]
- interactivePrint :: Maybe String
- sseVersion :: Maybe SseVersion
- bmiVersion :: Maybe BmiVersion
- avx :: Bool
- avx2 :: Bool
- avx512cd :: Bool
- avx512er :: Bool
- avx512f :: Bool
- avx512pf :: Bool
- rtldInfo :: IORef (Maybe LinkerInfo)
- rtccInfo :: IORef (Maybe CompilerInfo)
- rtasmInfo :: IORef (Maybe CompilerInfo)
- maxInlineAllocSize :: Int
- maxInlineMemcpyInsns :: Int
- maxInlineMemsetInsns :: Int
- reverseErrors :: Bool
- maxErrors :: Maybe Int
- initialUnique :: Word
- uniqueIncrement :: Int
- cfgWeights :: Weights
- newtype SourceError = SourceError (Messages GhcMessage)
- 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 FrontendPlugin = FrontendPlugin {}
- data GenericUnitInfo srcpkgid srcpkgname uid modulename mod = GenericUnitInfo {
- unitId :: uid
- unitInstanceOf :: uid
- unitInstantiations :: [(modulename, mod)]
- unitPackageId :: srcpkgid
- unitPackageName :: srcpkgname
- unitPackageVersion :: Version
- unitComponentName :: Maybe srcpkgname
- unitAbiHash :: ShortText
- unitDepends :: [uid]
- unitAbiDepends :: [(uid, ShortText)]
- unitImportDirs :: [FilePathST]
- unitLibraries :: [ShortText]
- unitExtDepLibsSys :: [ShortText]
- unitExtDepLibsGhc :: [ShortText]
- unitLibraryDirs :: [FilePathST]
- unitLibraryDynDirs :: [FilePathST]
- unitExtDepFrameworks :: [ShortText]
- unitExtDepFrameworkDirs :: [FilePathST]
- unitLinkerOptions :: [ShortText]
- unitCcOptions :: [ShortText]
- unitIncludes :: [ShortText]
- unitIncludeDirs :: [FilePathST]
- unitHaddockInterfaces :: [FilePathST]
- unitHaddockHTMLs :: [FilePathST]
- unitExposedModules :: [(modulename, Maybe mod)]
- unitHiddenModules :: [modulename]
- unitIsIndefinite :: Bool
- unitIsExposed :: Bool
- unitIsTrusted :: Bool
- data ForeignSrcLang
- type HasDebugCallStack = ()
- data Direction
- type Suffix = String
- data PtrString = PtrString !(Ptr Word8) !Int
- newtype LexicalFastString = LexicalFastString FastString
- newtype NonDetFastString = NonDetFastString FastString
- data FastString = FastString {
- uniq :: !Int
- n_chars :: !Int
- fs_sbs :: !ShortByteString
- fs_zenc :: FastZString
- data FastZString
- data SrcUnpackedness
- data SrcStrictness
- data Role
- data FieldLabelString
- type ConTag = Int
- data Boxity
- type family NoGhcTc p
- type family XXIEWrappedName p
- type family XIEType p
- type family XIEPattern p
- type family XIEName p
- type family XXIE x
- type family XIEDocNamed x
- type family XIEDoc x
- type family XIEGroup x
- type family XIEModuleContents x
- type family XIEThingWith x
- type family XIEThingAll x
- type family XIEThingAbs x
- type family XIEVar x
- type family ImportDeclPkgQual x
- type family XXImportDecl x
- type family XCImportDecl x
- type family XXFieldOcc x
- type family XCFieldOcc x
- type family XXConDeclField x
- type family XConDeclField x
- type family XXTyVarBndr x
- type family XKindedTyVar x
- type family XUserTyVar x
- type family XXHsForAllTelescope x
- type family XHsForAllInvis x
- type family XHsForAllVis x
- type family XXTyLit x
- type family XCharTy x
- type family XStrTy x
- type family XNumTy x
- type family XXType x
- type family XWildCardTy x
- type family XTyLit x
- type family XExplicitTupleTy x
- type family XExplicitListTy x
- type family XRecTy x
- type family XBangTy x
- type family XDocTy x
- type family XSpliceTy x
- type family XKindSig x
- type family XStarTy x
- type family XIParamTy x
- type family XParTy x
- type family XOpTy x
- type family XSumTy x
- type family XTupleTy x
- type family XListTy x
- type family XFunTy x
- type family XAppKindTy x
- type family XAppTy x
- type family XTyVar x
- type family XQualTy x
- type family XForAllTy x
- type family XXHsPatSigType x
- type family XHsPS x
- type family XXHsWildCardBndrs x b
- type family XHsWC x b
- type family XXHsSigType x
- type family XHsSig x
- type family XXHsOuterTyVarBndrs x
- type family XHsOuterExplicit x flag
- type family XHsOuterImplicit x
- type family XXLHsQTyVars x
- type family XHsQTvs x
- type family XHsFieldBind x
- type family XXPat x
- type family XCoPat x
- type family XSigPat x
- type family XNPlusKPat x
- type family XNPat x
- type family XLitPat x
- type family XSplicePat x
- type family XViewPat x
- type family XConPat x
- type family XSumPat x
- type family XTuplePat x
- type family XListPat x
- type family XBangPat x
- type family XParPat x
- type family XAsPat x
- type family XLazyPat x
- type family XVarPat x
- type family XWildPat x
- type family XXOverLit x
- type family XOverLit x
- type family XXLit x
- type family XHsDoublePrim x
- type family XHsFloatPrim x
- type family XHsRat x
- type family XHsInteger x
- type family XHsWord64Prim x
- type family XHsInt64Prim x
- type family XHsWordPrim x
- type family XHsIntPrim x
- type family XHsInt x
- type family XHsStringPrim x
- type family XHsString x
- type family XHsCharPrim x
- type family XHsChar x
- type family XXApplicativeArg x
- type family XApplicativeArgMany x
- type family XApplicativeArgOne x
- type family XXParStmtBlock x x'
- type family XParStmtBlock x x'
- type family XXCmd x
- type family XCmdWrap x
- type family XCmdDo x
- type family XCmdLet x
- type family XCmdIf x
- type family XCmdLamCase x
- type family XCmdCase x
- type family XCmdPar x
- type family XCmdLam x
- type family XCmdApp x
- type family XCmdArrForm x
- type family XCmdArrApp x
- type family XXStmtLR x x' b
- type family XRecStmt x x' b
- type family XTransStmt x x' b
- type family XParStmt x x' b
- type family XLetStmt x x' b
- type family XBodyStmt x x' b
- type family XApplicativeStmt x x' b
- type family XBindStmt x x' b
- type family XLastStmt x x' b
- type family XXGRHS x b
- type family XCGRHS x b
- type family XXGRHSs x b
- type family XCGRHSs x b
- type family XXMatch x b
- type family XCMatch x b
- type family XXMatchGroup x b
- type family XMG x b
- type family XXCmdTop x
- type family XCmdTop x
- type family XXQuote x
- type family XVarBr x
- type family XTypBr x
- type family XDecBrG x
- type family XDecBrL x
- type family XPatBr x
- type family XExpBr x
- type family XXUntypedSplice x
- type family XQuasiQuote x
- type family XUntypedSpliceExpr x
- type family XXTupArg x
- type family XMissing x
- type family XPresent x
- type family XXAmbiguousFieldOcc x
- type family XAmbiguous x
- type family XUnambiguous x
- type family XXPragE x
- type family XSCC x
- type family XXDotFieldOcc x
- type family XCDotFieldOcc x
- type family XXExpr x
- type family XPragE x
- type family XBinTick x
- type family XTick x
- type family XStatic x
- type family XProc x
- type family XUntypedSplice x
- type family XTypedSplice x
- type family XUntypedBracket x
- type family XTypedBracket x
- type family XArithSeq x
- type family XExprWithTySig x
- type family XProjection x
- type family XGetField x
- type family XRecordUpd x
- type family XRecordCon x
- type family XExplicitList x
- type family XDo x
- type family XLet x
- type family XMultiIf x
- type family XIf x
- type family XCase x
- type family XExplicitSum x
- type family XExplicitTuple x
- type family XSectionR x
- type family XSectionL x
- type family XPar x
- type family XNegApp x
- type family XOpApp x
- type family XAppTypeE x
- type family XApp x
- type family XLamCase x
- type family XLam x
- type family XLitE x
- type family XOverLitE x
- type family XIPVar x
- type family XOverLabel x
- type family XRecSel x
- type family XUnboundVar x
- type family XVar x
- type family XXModule x
- type family XCModule x
- type family XXInjectivityAnn x
- type family XCInjectivityAnn x
- type family XXRoleAnnotDecl x
- type family XCRoleAnnotDecl x
- type family XXAnnDecl x
- type family XHsAnnotation x
- type family XXWarnDecl x
- type family XWarning x
- type family XXWarnDecls x
- type family XWarnings x
- type family XXRuleBndr x
- type family XRuleBndrSig x
- type family XCRuleBndr x
- type family XXRuleDecl x
- type family XHsRule x
- type family XXRuleDecls x
- type family XCRuleDecls x
- type family XXForeignExport x
- type family XCExport x
- type family XXForeignImport x
- type family XCImport x
- type family XXForeignDecl x
- type family XForeignExport x
- type family XForeignImport x
- type family XXDefaultDecl x
- type family XCDefaultDecl x
- type family XViaStrategy x
- type family XNewtypeStrategy x
- type family XAnyClassStrategy x
- type family XStockStrategy x
- type family XXDerivDecl x
- type family XCDerivDecl x
- type family XXInstDecl x
- type family XTyFamInstD x
- type family XDataFamInstD x
- type family XClsInstD x
- type family XXClsInstDecl x
- type family XCClsInstDecl x
- type family XXTyFamInstDecl x
- type family XCTyFamInstDecl x
- type family XXFamEqn x r
- type family XCFamEqn x r
- type family XXConDecl x
- type family XConDeclH98 x
- type family XConDeclGADT x
- type family XXDerivClauseTys x
- type family XDctMulti x
- type family XDctSingle x
- type family XXHsDerivingClause x
- type family XCHsDerivingClause x
- type family XXHsDataDefn x
- type family XCHsDataDefn x
- type family XXFamilyDecl x
- type family XCFamilyDecl x
- type family XXFamilyResultSig x
- type family XTyVarSig x
- type family XCKindSig x
- type family XNoSig x
- type family XXTyClGroup x
- type family XCTyClGroup x
- type family XXFunDep x
- type family XCFunDep x
- type family XXTyClDecl x
- type family XClassDecl x
- type family XDataDecl x
- type family XSynDecl x
- type family XFamDecl x
- type family XXSpliceDecl x
- type family XSpliceDecl x
- type family XXHsGroup x
- type family XCHsGroup x
- type family XXHsDecl x
- type family XRoleAnnotD x
- type family XDocD x
- type family XSpliceD x
- type family XRuleD x
- type family XAnnD x
- type family XWarningD x
- type family XForD x
- type family XDefD x
- type family XKindSigD x
- type family XSigD x
- type family XValD x
- type family XDerivD x
- type family XInstD x
- type family XTyClD x
- type family XXStandaloneKindSig x
- type family XStandaloneKindSig x
- type family XXFixitySig x
- type family XFixitySig x
- type family XXSig x
- type family XCompleteMatchSig x
- type family XSCCFunSig x
- type family XMinimalSig x
- type family XSpecInstSig x
- type family XSpecSig x
- type family XInlineSig x
- type family XFixSig x
- type family XIdSig x
- type family XClassOpSig x
- type family XPatSynSig x
- type family XTypeSig x
- type family XXIPBind x
- type family XCIPBind x
- type family XXHsIPBinds x
- type family XIPBinds x
- type family XXPatSynBind x x'
- type family XPSB x x'
- type family XXHsBindsLR x x'
- type family XPatSynBind x x'
- type family XVarBind x x'
- type family XPatBind x x'
- type family XFunBind x x'
- type family XXValBindsLR x x'
- type family XValBinds x x'
- type family XXHsLocalBindsLR x x'
- type family XEmptyLocalBinds x x'
- type family XHsIPBinds x x'
- type family XHsValBinds x x'
- type LIdP p = XRec p (IdP p)
- type family IdP p
- class WrapXRec p a where
- class MapXRec p where
- class UnXRec p where
- type family Anno a = (b :: Type)
- type family XRec p a = (r :: Type) | r -> a
- data DataConCantHappen
- newtype ModuleName = ModuleName FastString
- class HasOccName name where
- data OccName
- data IsBootInterface
- data GenUnit uid
- = RealUnit !(Definite uid)
- | VirtUnit !(GenInstantiatedUnit uid)
- | HoleUnit
- data GenModule unit = Module {
- moduleUnit :: !unit
- moduleName :: !ModuleName
- newtype UnitId = UnitId {}
- class (IsOutput doc, IsLine (Line doc)) => IsDoc doc where
- type family Line doc = (r :: Type) | r -> doc
- 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
- class Outputable 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
- data StaticPlugin = StaticPlugin {}
- data LoadedPlugin = LoadedPlugin {}
- data Plugins = Plugins {
- staticPlugins :: ![StaticPlugin]
- externalPlugins :: ![ExternalPlugin]
- loadedPlugins :: ![LoadedPlugin]
- loadedPluginDeps :: !([Linkable], PkgsLoaded)
- class Uniquable a where
- class NamedThing a where
- getOccName :: a -> OccName
- getName :: a -> Name
- data Name
- type InvisTVBinder = VarBndr TyVar Specificity
- type TcTyVar = Var
- type TyCoVar = Id
- type TyVar = Var
- data Specificity
- data VarBndr var argf = Bndr var argf
- data Var
- data FunTyFlag
- data ForAllTyFlag where
- Invisible Specificity
- Required
- pattern Specified :: ForAllTyFlag
- pattern Inferred :: ForAllTyFlag
- type CoreExpr = Expr CoreBndr
- type CoreBndr = Var
- data Expr b
- type TyConRepName = Name
- type MCoercionN = MCoercion
- type CoercionN = Coercion
- type ThetaType = [PredType]
- type RuntimeRepType = Type
- type PredType = Type
- type Mult = Type
- data Scaled a
- data MCoercion
- data UnivCoProvenance
- data CoSel
- newtype NonDetUniqFM key ele = NonDetUniqFM {}
- data UniqFM key ele
- class Monad m => MonadUnique (m :: Type -> Type) where
- getUniqueSupplyM :: m UniqSupply
- getUniqueM :: m Unique
- getUniquesM :: m [Unique]
- data UniqSM result
- data UniqSupply
- data LayoutInfo pass
- = ExplicitBraces !(LHsToken "{" pass) !(LHsToken "}" pass)
- | VirtualBraces !Int
- | NoLayoutInfo
- data HsUniToken (tok :: Symbol) (utok :: Symbol)
- data HsToken (tok :: Symbol) = HsTok
- type LHsUniToken (tok :: Symbol) (utok :: Symbol) p = XRec p (HsUniToken tok utok)
- type LHsToken (tok :: Symbol) p = XRec p (HsToken tok)
- data ProfAuto
- type PsLocated = GenLocated PsSpan
- data PsSpan = PsSpan {
- psRealSpan :: !RealSrcSpan
- psBufSpan :: !BufSpan
- data PsLoc = PsLoc {
- psRealLoc :: !RealSrcLoc
- psBufPos :: !BufPos
- type RealLocated = GenLocated RealSrcSpan
- type Located = GenLocated SrcSpan
- data GenLocated l e = L l e
- data UnhelpfulSpanReason
- data SrcSpan
- data RealSrcSpan
- data BufSpan = BufSpan {
- bufSpanStart :: !BufPos
- bufSpanEnd :: !BufPos
- data RealSrcLoc
- newtype BufPos = BufPos {}
- type FastStringEnv a = UniqFM FastString a
- data UniqSet a
- data StringLiteral = StringLiteral {
- sl_st :: SourceText
- sl_fs :: FastString
- sl_tc :: Maybe RealSrcSpan
- data FractionalLit = FL {}
- data IntegralLit = IL {}
- data SourceText
- data FieldLabel = FieldLabel {}
- data WarningFlag
- = Opt_WarnDuplicateExports
- | Opt_WarnDuplicateConstraints
- | Opt_WarnRedundantConstraints
- | Opt_WarnHiShadows
- | Opt_WarnImplicitPrelude
- | Opt_WarnIncompletePatterns
- | Opt_WarnIncompleteUniPatterns
- | Opt_WarnIncompletePatternsRecUpd
- | Opt_WarnOverflowedLiterals
- | Opt_WarnEmptyEnumerations
- | Opt_WarnMissingFields
- | Opt_WarnMissingImportList
- | Opt_WarnMissingMethods
- | Opt_WarnMissingSignatures
- | Opt_WarnMissingLocalSignatures
- | Opt_WarnNameShadowing
- | Opt_WarnOverlappingPatterns
- | Opt_WarnTypeDefaults
- | Opt_WarnMonomorphism
- | Opt_WarnUnusedTopBinds
- | Opt_WarnUnusedLocalBinds
- | Opt_WarnUnusedPatternBinds
- | Opt_WarnUnusedImports
- | Opt_WarnUnusedMatches
- | Opt_WarnUnusedTypePatterns
- | Opt_WarnUnusedForalls
- | Opt_WarnUnusedRecordWildcards
- | Opt_WarnRedundantBangPatterns
- | Opt_WarnRedundantRecordWildcards
- | Opt_WarnWarningsDeprecations
- | Opt_WarnDeprecatedFlags
- | Opt_WarnMissingMonadFailInstances
- | Opt_WarnSemigroup
- | Opt_WarnDodgyExports
- | Opt_WarnDodgyImports
- | Opt_WarnOrphans
- | Opt_WarnAutoOrphans
- | Opt_WarnIdentities
- | Opt_WarnTabs
- | Opt_WarnUnrecognisedPragmas
- | Opt_WarnMisplacedPragmas
- | Opt_WarnDodgyForeignImports
- | Opt_WarnUnusedDoBind
- | Opt_WarnWrongDoBind
- | Opt_WarnAlternativeLayoutRuleTransitional
- | Opt_WarnUnsafe
- | Opt_WarnSafe
- | Opt_WarnTrustworthySafe
- | Opt_WarnMissedSpecs
- | Opt_WarnAllMissedSpecs
- | Opt_WarnUnsupportedCallingConventions
- | Opt_WarnUnsupportedLlvmVersion
- | Opt_WarnMissedExtraSharedLib
- | Opt_WarnInlineRuleShadowing
- | Opt_WarnTypedHoles
- | Opt_WarnPartialTypeSignatures
- | Opt_WarnMissingExportedSignatures
- | Opt_WarnUntickedPromotedConstructors
- | Opt_WarnDerivingTypeable
- | Opt_WarnDeferredTypeErrors
- | Opt_WarnDeferredOutOfScopeVariables
- | Opt_WarnNonCanonicalMonadInstances
- | Opt_WarnNonCanonicalMonadFailInstances
- | Opt_WarnNonCanonicalMonoidInstances
- | Opt_WarnMissingPatternSynonymSignatures
- | Opt_WarnUnrecognisedWarningFlags
- | Opt_WarnSimplifiableClassConstraints
- | Opt_WarnCPPUndef
- | Opt_WarnUnbangedStrictPatterns
- | Opt_WarnMissingHomeModules
- | Opt_WarnPartialFields
- | Opt_WarnMissingExportList
- | Opt_WarnInaccessibleCode
- | Opt_WarnStarIsType
- | Opt_WarnStarBinder
- | Opt_WarnImplicitKindVars
- | Opt_WarnSpaceAfterBang
- | Opt_WarnMissingDerivingStrategies
- | Opt_WarnPrepositiveQualifiedModule
- | Opt_WarnUnusedPackages
- | Opt_WarnInferredSafeImports
- | Opt_WarnMissingSafeHaskellMode
- | Opt_WarnCompatUnqualifiedImports
- | Opt_WarnDerivingDefaults
- | Opt_WarnInvalidHaddock
- | Opt_WarnOperatorWhitespaceExtConflict
- | Opt_WarnOperatorWhitespace
- | Opt_WarnAmbiguousFields
- | Opt_WarnImplicitLift
- | Opt_WarnMissingKindSignatures
- | Opt_WarnMissingExportedPatternSynonymSignatures
- | Opt_WarnRedundantStrictnessFlags
- | Opt_WarnForallIdentifier
- | Opt_WarnUnicodeBidirectionalFormatCharacters
- | Opt_WarnGADTMonoLocalBinds
- | Opt_WarnTypeEqualityOutOfScope
- | Opt_WarnTypeEqualityRequiresOperators
- | Opt_WarnLoopySuperclassSolve
- data GeneralFlag
- = Opt_DumpToFile
- | Opt_DumpWithWays
- | Opt_D_dump_minimal_imports
- | Opt_DoCoreLinting
- | Opt_DoLinearCoreLinting
- | Opt_DoStgLinting
- | Opt_DoCmmLinting
- | Opt_DoAsmLinting
- | Opt_DoAnnotationLinting
- | Opt_DoBoundsChecking
- | Opt_NoLlvmMangler
- | Opt_FastLlvm
- | Opt_NoTypeableBinds
- | Opt_DistinctConstructorTables
- | Opt_InfoTableMap
- | Opt_InfoTableMapWithFallback
- | Opt_InfoTableMapWithStack
- | Opt_WarnIsError
- | Opt_ShowWarnGroups
- | Opt_HideSourcePaths
- | Opt_PrintExplicitForalls
- | Opt_PrintExplicitKinds
- | Opt_PrintExplicitCoercions
- | Opt_PrintExplicitRuntimeReps
- | Opt_PrintEqualityRelations
- | Opt_PrintAxiomIncomps
- | Opt_PrintUnicodeSyntax
- | Opt_PrintExpandedSynonyms
- | Opt_PrintPotentialInstances
- | Opt_PrintRedundantPromotionTicks
- | Opt_PrintTypecheckerElaboration
- | Opt_CallArity
- | Opt_Exitification
- | Opt_Strictness
- | Opt_LateDmdAnal
- | Opt_KillAbsence
- | Opt_KillOneShot
- | Opt_FullLaziness
- | Opt_FloatIn
- | Opt_LocalFloatOut
- | Opt_LocalFloatOutTopLevel
- | Opt_LateSpecialise
- | Opt_Specialise
- | Opt_SpecialiseAggressively
- | Opt_CrossModuleSpecialise
- | Opt_PolymorphicSpecialisation
- | Opt_InlineGenerics
- | Opt_InlineGenericsAggressively
- | Opt_StaticArgumentTransformation
- | Opt_CSE
- | Opt_StgCSE
- | Opt_StgLiftLams
- | Opt_LiberateCase
- | Opt_SpecConstr
- | Opt_SpecConstrKeen
- | Opt_DoLambdaEtaExpansion
- | Opt_IgnoreAsserts
- | Opt_DoEtaReduction
- | Opt_CaseMerge
- | Opt_CaseFolding
- | Opt_UnboxStrictFields
- | Opt_UnboxSmallStrictFields
- | Opt_DictsCheap
- | Opt_EnableRewriteRules
- | Opt_EnableThSpliceWarnings
- | Opt_RegsGraph
- | Opt_RegsIterative
- | Opt_PedanticBottoms
- | Opt_LlvmTBAA
- | Opt_LlvmFillUndefWithGarbage
- | Opt_IrrefutableTuples
- | Opt_CmmSink
- | Opt_CmmStaticPred
- | Opt_CmmElimCommonBlocks
- | Opt_CmmControlFlow
- | Opt_AsmShortcutting
- | Opt_OmitYields
- | Opt_FunToThunk
- | Opt_DictsStrict
- | Opt_DmdTxDictSel
- | Opt_Loopification
- | Opt_CfgBlocklayout
- | Opt_WeightlessBlocklayout
- | Opt_CprAnal
- | Opt_WorkerWrapper
- | Opt_WorkerWrapperUnlift
- | Opt_SolveConstantDicts
- | Opt_AlignmentSanitisation
- | Opt_CatchNonexhaustiveCases
- | Opt_NumConstantFolding
- | Opt_CoreConstantFolding
- | Opt_FastPAPCalls
- | Opt_DoTagInferenceChecks
- | Opt_SimplPreInlining
- | Opt_IgnoreInterfacePragmas
- | Opt_OmitInterfacePragmas
- | Opt_ExposeAllUnfoldings
- | Opt_WriteInterface
- | Opt_WriteHie
- | Opt_AutoSccsOnIndividualCafs
- | Opt_ProfCountEntries
- | Opt_ProfLateInlineCcs
- | Opt_ProfLateCcs
- | Opt_ProfManualCcs
- | Opt_Pp
- | Opt_ForceRecomp
- | Opt_IgnoreOptimChanges
- | Opt_IgnoreHpcChanges
- | Opt_ExcessPrecision
- | Opt_EagerBlackHoling
- | Opt_NoHsMain
- | Opt_SplitSections
- | Opt_StgStats
- | Opt_HideAllPackages
- | Opt_HideAllPluginPackages
- | Opt_PrintBindResult
- | Opt_Haddock
- | Opt_HaddockOptions
- | Opt_BreakOnException
- | Opt_BreakOnError
- | Opt_PrintEvldWithShow
- | Opt_PrintBindContents
- | Opt_GenManifest
- | Opt_EmbedManifest
- | Opt_SharedImplib
- | Opt_BuildingCabalPackage
- | Opt_IgnoreDotGhci
- | Opt_GhciSandbox
- | Opt_GhciHistory
- | Opt_GhciLeakCheck
- | Opt_ValidateHie
- | Opt_LocalGhciHistory
- | Opt_NoIt
- | Opt_HelpfulErrors
- | Opt_DeferTypeErrors
- | Opt_DeferTypedHoles
- | Opt_DeferOutOfScopeVariables
- | Opt_PIC
- | Opt_PIE
- | Opt_PICExecutable
- | Opt_ExternalDynamicRefs
- | Opt_Ticky
- | Opt_Ticky_Allocd
- | Opt_Ticky_LNE
- | Opt_Ticky_Dyn_Thunk
- | Opt_Ticky_Tag
- | Opt_Ticky_AP
- | Opt_CmmThreadSanitizer
- | Opt_RPath
- | Opt_RelativeDynlibPaths
- | Opt_CompactUnwind
- | Opt_Hpc
- | Opt_FamAppCache
- | Opt_ExternalInterpreter
- | Opt_OptimalApplicativeDo
- | Opt_VersionMacros
- | Opt_WholeArchiveHsLibs
- | Opt_SingleLibFolder
- | Opt_ExposeInternalSymbols
- | Opt_KeepCAFs
- | Opt_KeepGoing
- | Opt_ByteCode
- | Opt_ByteCodeAndObjectCode
- | Opt_LinkRts
- | Opt_ErrorSpans
- | Opt_DeferDiagnostics
- | Opt_DiagnosticsShowCaret
- | Opt_PprCaseAsLet
- | Opt_PprShowTicks
- | Opt_ShowHoleConstraints
- | Opt_ShowValidHoleFits
- | Opt_SortValidHoleFits
- | Opt_SortBySizeHoleFits
- | Opt_SortBySubsumHoleFits
- | Opt_AbstractRefHoleFits
- | Opt_UnclutterValidHoleFits
- | Opt_ShowTypeAppOfHoleFits
- | Opt_ShowTypeAppVarsOfHoleFits
- | Opt_ShowDocsOfHoleFits
- | Opt_ShowTypeOfHoleFits
- | Opt_ShowProvOfHoleFits
- | Opt_ShowMatchesOfHoleFits
- | Opt_ShowLoadedModules
- | Opt_HexWordLiterals
- | Opt_SuppressCoercions
- | Opt_SuppressCoercionTypes
- | Opt_SuppressVarKinds
- | Opt_SuppressModulePrefixes
- | Opt_SuppressTypeApplications
- | Opt_SuppressIdInfo
- | Opt_SuppressUnfoldings
- | Opt_SuppressTypeSignatures
- | Opt_SuppressUniques
- | Opt_SuppressStgExts
- | Opt_SuppressStgReps
- | Opt_SuppressTicks
- | Opt_SuppressTimestamps
- | Opt_SuppressCoreSizes
- | Opt_ShowErrorContext
- | Opt_AutoLinkPackages
- | Opt_ImplicitImportQualified
- | Opt_KeepHscppFiles
- | Opt_KeepHiDiffs
- | Opt_KeepHcFiles
- | Opt_KeepSFiles
- | Opt_KeepTmpFiles
- | Opt_KeepRawTokenStream
- | Opt_KeepLlvmFiles
- | Opt_KeepHiFiles
- | Opt_KeepOFiles
- | Opt_BuildDynamicToo
- | Opt_WriteIfSimplifiedCore
- | Opt_UseBytecodeRatherThanObjects
- | Opt_DistrustAllPackages
- | Opt_PackageTrust
- | Opt_PluginTrustworthy
- | Opt_G_NoStateHack
- | Opt_G_NoOptCoercion
- data DumpFlag
- = Opt_D_dump_cmm
- | Opt_D_dump_cmm_from_stg
- | Opt_D_dump_cmm_raw
- | Opt_D_dump_cmm_verbose_by_proc
- | Opt_D_dump_cmm_verbose
- | Opt_D_dump_cmm_cfg
- | Opt_D_dump_cmm_cbe
- | Opt_D_dump_cmm_switch
- | Opt_D_dump_cmm_proc
- | Opt_D_dump_cmm_sp
- | Opt_D_dump_cmm_sink
- | Opt_D_dump_cmm_caf
- | Opt_D_dump_cmm_procmap
- | Opt_D_dump_cmm_split
- | Opt_D_dump_cmm_info
- | Opt_D_dump_cmm_cps
- | Opt_D_dump_cmm_thread_sanitizer
- | Opt_D_dump_cfg_weights
- | Opt_D_dump_asm
- | Opt_D_dump_asm_native
- | Opt_D_dump_asm_liveness
- | Opt_D_dump_asm_regalloc
- | Opt_D_dump_asm_regalloc_stages
- | Opt_D_dump_asm_conflicts
- | Opt_D_dump_asm_stats
- | Opt_D_dump_c_backend
- | Opt_D_dump_llvm
- | Opt_D_dump_js
- | Opt_D_dump_core_stats
- | Opt_D_dump_deriv
- | Opt_D_dump_ds
- | Opt_D_dump_ds_preopt
- | Opt_D_dump_foreign
- | Opt_D_dump_inlinings
- | Opt_D_dump_verbose_inlinings
- | Opt_D_dump_rule_firings
- | Opt_D_dump_rule_rewrites
- | Opt_D_dump_simpl_trace
- | Opt_D_dump_occur_anal
- | Opt_D_dump_parsed
- | Opt_D_dump_parsed_ast
- | Opt_D_dump_rn
- | Opt_D_dump_rn_ast
- | Opt_D_dump_simpl
- | Opt_D_dump_simpl_iterations
- | Opt_D_dump_spec
- | Opt_D_dump_prep
- | Opt_D_dump_late_cc
- | Opt_D_dump_stg_from_core
- | Opt_D_dump_stg_unarised
- | Opt_D_dump_stg_cg
- | Opt_D_dump_stg_tags
- | Opt_D_dump_stg_final
- | Opt_D_dump_call_arity
- | Opt_D_dump_exitify
- | Opt_D_dump_stranal
- | Opt_D_dump_str_signatures
- | Opt_D_dump_cpranal
- | Opt_D_dump_cpr_signatures
- | Opt_D_dump_tc
- | Opt_D_dump_tc_ast
- | Opt_D_dump_hie
- | Opt_D_dump_types
- | Opt_D_dump_rules
- | Opt_D_dump_cse
- | Opt_D_dump_worker_wrapper
- | Opt_D_dump_rn_trace
- | Opt_D_dump_rn_stats
- | Opt_D_dump_opt_cmm
- | Opt_D_dump_simpl_stats
- | Opt_D_dump_cs_trace
- | Opt_D_dump_tc_trace
- | Opt_D_dump_ec_trace
- | Opt_D_dump_if_trace
- | Opt_D_dump_splices
- | Opt_D_th_dec_file
- | Opt_D_dump_BCOs
- | Opt_D_dump_ticked
- | Opt_D_dump_rtti
- | Opt_D_source_stats
- | Opt_D_verbose_stg2stg
- | Opt_D_dump_hi
- | Opt_D_dump_hi_diffs
- | Opt_D_dump_mod_cycles
- | Opt_D_dump_mod_map
- | Opt_D_dump_timings
- | Opt_D_dump_view_pattern_commoning
- | Opt_D_verbose_core2core
- | Opt_D_dump_debug
- | Opt_D_dump_json
- | Opt_D_ppr_debug
- | Opt_D_no_debug_output
- | Opt_D_dump_faststrings
- | Opt_D_faststring_stats
- | Opt_D_ipe_stats
- data Language
- type ModuleWithIsBoot = GenWithIsBoot Module
- type ModuleNameWithIsBoot = GenWithIsBoot ModuleName
- data GenWithIsBoot mod = GWIB {
- gwib_mod :: mod
- gwib_isBoot :: IsBootInterface
- newtype Definite unit = Definite {
- unDefinite :: unit
- type DefUnitId = Definite UnitId
- type Instantiations = GenInstantiations UnitId
- type GenInstantiations unit = [(ModuleName, GenModule (GenUnit unit))]
- type InstantiatedUnit = GenInstantiatedUnit UnitId
- data GenInstantiatedUnit unit = InstantiatedUnit {
- instUnitFS :: !FastString
- instUnitKey :: !Unique
- instUnitInstanceOf :: !unit
- instUnitInsts :: !(GenInstantiations unit)
- instUnitHoles :: UniqDSet ModuleName
- newtype UnitKey = UnitKey FastString
- class IsUnitId u where
- unitFS :: u -> FastString
- type InstantiatedModule = GenModule InstantiatedUnit
- type HomeUnitModule = GenModule UnitId
- type InstalledModule = GenModule UnitId
- data ModLocation = ModLocation {}
- data InstalledModuleEnv elt
- type DModuleNameEnv elt = UniqDFM ModuleName elt
- type ModuleNameEnv elt = UniqFM ModuleName elt
- type ModuleSet = Set NDModule
- data ModuleEnv elt
- class HasModule (m :: Type -> Type) where
- class ContainsModule t where
- extractModule :: t -> Module
- type HomeUnit = GenHomeUnit UnitId
- data GenHomeUnit u
- = DefiniteHomeUnit UnitId (Maybe (u, GenInstantiations u))
- | IndefiniteHomeUnit UnitId (GenInstantiations u)
- data PkgQual
- data RawPkgQual
- type LPat p = XRec p (Pat p)
- data Pat p
- = WildPat (XWildPat p)
- | VarPat (XVarPat p) (LIdP p)
- | LazyPat (XLazyPat p) (LPat p)
- | AsPat (XAsPat p) (LIdP p) !(LHsToken "@" p) (LPat p)
- | ParPat (XParPat p) !(LHsToken "(" p) (LPat p) !(LHsToken ")" p)
- | BangPat (XBangPat p) (LPat p)
- | ListPat (XListPat p) [LPat p]
- | TuplePat (XTuplePat p) [LPat p] Boxity
- | SumPat (XSumPat p) (LPat p) ConTag SumWidth
- | ConPat {
- pat_con_ext :: XConPat p
- pat_con :: XRec p (ConLikeP p)
- pat_args :: HsConPatDetails p
- | ViewPat (XViewPat p) (LHsExpr p) (LPat p)
- | SplicePat (XSplicePat p) (HsUntypedSplice p)
- | LitPat (XLitPat p) (HsLit p)
- | NPat (XNPat p) (XRec p (HsOverLit p)) (Maybe (SyntaxExpr p)) (SyntaxExpr p)
- | NPlusKPat (XNPlusKPat p) (LIdP p) (XRec p (HsOverLit p)) (HsOverLit p) (SyntaxExpr p) (SyntaxExpr p)
- | SigPat (XSigPat p) (LPat p) (HsPatSigType (NoGhcTc p))
- | XPat !(XXPat p)
- type LHsExpr p = XRec p (HsExpr p)
- type family SyntaxExpr p
- data GRHSs p body
- = GRHSs {
- grhssExt :: XCGRHSs p body
- grhssGRHSs :: [LGRHS p body]
- grhssLocalBinds :: HsLocalBinds p
- | XGRHSs !(XXGRHSs p body)
- = GRHSs {
- data MatchGroup p body
- = MG { }
- | XMatchGroup !(XXMatchGroup p body)
- data HsUntypedSplice id
- = HsUntypedSpliceExpr (XUntypedSpliceExpr id) (LHsExpr id)
- | HsQuasiQuote (XQuasiQuote id) (IdP id) (XRec id FastString)
- | XUntypedSplice !(XXUntypedSplice id)
- data PromotionFlag
- data DefaultingStrategy
- data NonStandardDefaultingStrategy
- data TypeOrConstraint
- data TypeOrKind
- data IntWithInf
- data UnfoldingSource
- data InlineSpec
- data RuleMatchInfo
- data InlinePragma = InlinePragma {}
- data Activation
- data CompilerPhase
- type PhaseNum = Int
- data SuccessFlag
- data DefMethSpec ty
- data TailCallInfo
- data InsideLam
- data InterestingCxt
- type BranchCount = Int
- data OccInfo
- = ManyOccs {
- occ_tail :: !TailCallInfo
- | IAmDead
- | OneOcc { }
- | IAmALoopBreaker {
- occ_rules_only :: !RulesOnly
- occ_tail :: !TailCallInfo
- = ManyOccs {
- data EP a = EP {}
- data UnboxedTupleOrSum
- data TupleSort
- newtype PprPrec = PprPrec Int
- data OverlapMode
- data OverlapFlag = OverlapFlag {}
- data Origin
- data RecFlag
- data CbvMark
- data TopLevelFlag
- type RuleName = FastString
- data FunctionOrData
- = IsFunction
- | IsData
- data SwapFlag
- data OneShotInfo
- data Alignment
- type ConTagZ = Int
- type FullArgCount = Int
- type JoinArity = Int
- type RepArity = Int
- type Arity = Int
- data LeftOrRight
- data EqSpec
- data DataConRep
- = NoDataConRep
- | DCR {
- dcr_wrap_id :: Id
- dcr_boxer :: DataConBoxer
- dcr_arg_tys :: [Scaled Type]
- dcr_stricts :: [StrictnessMark]
- dcr_bangs :: [HsImplBang]
- data DataCon
- type TidyOccEnv = UniqFM FastString Int
- type OccSet = UniqSet OccName
- data OccEnv a
- data NameSpace
- data PlatformMisc = PlatformMisc {}
- data BuiltInSyntax
- type PiTyVarBinder = PiTyBinder
- data PiTyBinder
- type ReqTVBinder = VarBndr TyVar ()
- type TyVarBinder = VarBndr TyVar ForAllTyFlag
- type ReqTyBinder = VarBndr TyCoVar ()
- type InvisTyBinder = VarBndr TyCoVar Specificity
- type ForAllTyBinder = VarBndr TyCoVar ForAllTyFlag
- type OutId = Id
- type OutCoVar = CoVar
- type OutTyVar = TyVar
- type OutVar = Var
- type InId = Id
- type InCoVar = CoVar
- type InTyVar = TyVar
- type InVar = Var
- type JoinId = Id
- type EqVar = EvId
- type IpId = EvId
- type DictId = EvId
- type DFunId = Id
- type EvVar = EvId
- type EvId = Id
- type KindVar = Var
- type TypeVar = Var
- type TKVar = Var
- type NcId = Id
- type CoVar = Id
- type DTyCoVarSet = UniqDSet TyCoVar
- type DTyVarSet = UniqDSet TyVar
- type DIdSet = UniqDSet Id
- type DVarSet = UniqDSet Var
- type TyCoVarSet = UniqSet TyCoVar
- type CoVarSet = UniqSet CoVar
- type TyVarSet = UniqSet TyVar
- type IdSet = UniqSet Id
- type VarSet = UniqSet Var
- type InterestingVarFun = Var -> Bool
- type DTyVarEnv elt = UniqDFM TyVar elt
- type DIdEnv elt = UniqDFM Var elt
- type DVarEnv elt = UniqDFM Var elt
- type CoVarEnv elt = UniqFM CoVar elt
- type TyCoVarEnv elt = UniqFM TyCoVar elt
- type TyVarEnv elt = UniqFM Var elt
- type IdEnv elt = UniqFM Id elt
- type VarEnv elt = UniqFM Var elt
- type TidyEnv = (TidyOccEnv, VarEnv Var)
- data RnEnv2
- newtype InScopeSet = InScope VarSet
- newtype NonCaffySet = NonCaffySet {}
- type DefUses = OrdList DefUse
- type DefUse = (Maybe Defs, Uses)
- type Uses = NameSet
- type Defs = NameSet
- type FreeVars = NameSet
- type NameSet = UniqSet Name
- type DNameEnv a = UniqDFM Name a
- type NameEnv a = UniqFM Name a
- data GreName
- data ImpItemSpec
- data ImpDeclSpec = ImpDeclSpec {
- is_mod :: ModuleName
- is_as :: ModuleName
- is_qual :: Bool
- is_dloc :: SrcSpan
- data ImportSpec = ImpSpec {}
- data Parent
- data GlobalRdrElt = GRE {}
- type GlobalRdrEnv = OccEnv [GlobalRdrElt]
- data LocalRdrEnv
- type SrcSpanAnnA = SrcAnn AnnListItem
- data SrcSpanAnn' a = SrcSpanAnn {}
- type OutputableBndrId (pass :: Pass) = (OutputableBndr (IdGhcP pass), OutputableBndr (IdGhcP (NoGhcTcPass pass)), Outputable (GenLocated (Anno (IdGhcP pass)) (IdGhcP pass)), Outputable (GenLocated (Anno (IdGhcP (NoGhcTcPass pass))) (IdGhcP (NoGhcTcPass pass))), IsPass pass)
- type family NoGhcTcPass (p :: Pass) :: Pass where ...
- type family IdGhcP (pass :: Pass) where ...
- class (NoGhcTcPass (NoGhcTcPass p) ~ NoGhcTcPass p, IsPass (NoGhcTcPass p)) => IsPass (p :: Pass) where
- type GhcTc = GhcPass 'Typechecked
- type GhcRn = GhcPass 'Renamed
- type GhcPs = GhcPass 'Parsed
- data Pass
- = Parsed
- | Renamed
- | Typechecked
- data GhcPass (c :: Pass) where
- type IsSrcSpanAnn (p :: Pass) a = (Anno (IdGhcP p) ~ SrcSpanAnn' (EpAnn a), IsPass p)
- type LIEWrappedName p = XRec p (IEWrappedName p)
- data IEWrappedName p
- = IEName (XIEName p) (LIdP p)
- | IEPattern (XIEPattern p) (LIdP p)
- | IEType (XIEType p) (LIdP p)
- | XIEWrappedName !(XXIEWrappedName p)
- data IEWildcard
- type LIE pass = XRec pass (IE pass)
- data ImportListInterpretation
- data ImportDecl pass
- = ImportDecl {
- ideclExt :: XCImportDecl pass
- ideclName :: XRec pass ModuleName
- ideclPkgQual :: ImportDeclPkgQual pass
- ideclSource :: IsBootInterface
- ideclSafe :: Bool
- ideclQualified :: ImportDeclQualifiedStyle
- ideclAs :: Maybe (XRec pass ModuleName)
- ideclImportList :: Maybe (ImportListInterpretation, XRec pass [LIE pass])
- | XImportDecl !(XXImportDecl pass)
- = ImportDecl {
- data ImportDeclQualifiedStyle
- type LImportDecl pass = XRec pass (ImportDecl pass)
- data AnnEnv
- type CoreAnnTarget = AnnTarget Name
- data AnnTarget name
- = NamedTarget name
- | ModuleTarget Module
- type AnnPayload = Serialized
- data RuleOpts
- data GhcNameVersion = GhcNameVersion {}
- data FileSettings = FileSettings {}
- data Settings = Settings {}
- newtype PackageName = PackageName {}
- newtype PackageId = PackageId FastString
- type UnitInfo = GenUnitInfo UnitId
- type UnitKeyInfo = GenUnitInfo UnitKey
- type GenUnitInfo unit = GenericUnitInfo PackageId PackageName unit ModuleName (GenModule (GenUnit unit))
- newtype Hsc a = Hsc (HscEnv -> Messages GhcMessage -> IO (a, Messages GhcMessage))
- data LiftingContext = LC Subst LiftCoEnv
- data FunDep pass
- data TyConFlavour
- data ExpandSynResult tyco
- = NoExpansion
- | ExpandsSyn [(TyVar, tyco)] Type [tyco]
- data PrimElemRep
- data PrimRep
- data FamTyConFlav
- data Injectivity
- = NotInjective
- | Injective [Bool]
- data AlgTyConFlav
- data PromDataConInfo
- = NoPromInfo
- | RuntimeRep ([Type] -> [PrimRep])
- | VecCount Int
- | VecElem PrimElemRep
- | Levity Levity
- data AlgTyConRhs
- = AbstractTyCon
- | DataTyCon {
- data_cons :: [DataCon]
- data_cons_size :: Int
- is_enum :: Bool
- is_type_data :: Bool
- data_fixed_lev :: Bool
- | TupleTyCon { }
- | SumTyCon {
- data_cons :: [DataCon]
- data_cons_size :: Int
- | NewTyCon {
- data_con :: DataCon
- nt_rhs :: Type
- nt_etad_rhs :: ([TyVar], Type)
- nt_co :: CoAxiom Unbranched
- nt_fixed_rep :: Bool
- data TyConBndrVis
- type TyConPiTyBinder = VarBndr TyCoVar TyConBndrVis
- type TyConBinder = VarBndr TyVar TyConBndrVis
- data TyCoFolder env a = TyCoFolder {
- tcf_view :: Type -> Maybe Type
- tcf_tyvar :: env -> TyVar -> a
- tcf_covar :: env -> CoVar -> a
- tcf_hole :: env -> CoercionHole -> a
- tcf_tycobinder :: env -> TyCoVar -> ForAllTyFlag -> env
- data CoercionHole = CoercionHole {}
- type MCoercionR = MCoercion
- type CoercionP = Coercion
- type CoercionR = Coercion
- data FunSel
- type KnotTied ty = ty
- type FRRType = Type
- type KindOrType = Type
- type CvSubstEnv = CoVarEnv Coercion
- type TvSubstEnv = TyVarEnv Type
- type IdSubstEnv = IdEnv CoreExpr
- data TyCoMapper env (m :: Type -> Type) = TyCoMapper {}
- data OverLitVal
- data HsOverLit p
- data HsLit x
- = HsChar (XHsChar x) Char
- | HsCharPrim (XHsCharPrim x) Char
- | HsString (XHsString x) FastString
- | HsStringPrim (XHsStringPrim x) !ByteString
- | HsInt (XHsInt x) IntegralLit
- | HsIntPrim (XHsIntPrim x) Integer
- | HsWordPrim (XHsWordPrim x) Integer
- | HsInt64Prim (XHsInt64Prim x) Integer
- | HsWord64Prim (XHsWord64Prim x) Integer
- | HsInteger (XHsInteger x) Integer Type
- | HsRat (XHsRat x) FractionalLit Type
- | HsFloatPrim (XHsFloatPrim x) FractionalLit
- | HsDoublePrim (XHsDoublePrim x) FractionalLit
- | XLit !(XXLit x)
- data LitNumType
- data Literal
- type LiftCoEnv = VarEnv Coercion
- data NormaliseStepResult ev
- = NS_Done
- | NS_Abort
- | NS_Step RecTcChecker Type ev
- type NormaliseStepper ev = RecTcChecker -> TyCon -> [Type] -> NormaliseStepResult ev
- data GhcHint
- = (Outputable a, Typeable a) => UnknownHint a
- | SuggestExtension !LanguageExtensionHint
- | SuggestCorrectPragmaName ![String]
- | SuggestMissingDo
- | SuggestLetInDo
- | SuggestAddSignatureCabalFile !ModuleName
- | SuggestSignatureInstantiations !ModuleName [InstantiationSuggestion]
- | SuggestUseSpaces
- | SuggestUseWhitespaceAfter !OperatorWhitespaceSymbol
- | SuggestUseWhitespaceAround !String !OperatorWhitespaceOccurrence
- | SuggestParentheses
- | SuggestIncreaseMaxPmCheckModels
- | SuggestAddTypeSignatures AvailableBindings
- | SuggestBindToWildcard !(LHsExpr GhcTc)
- | SuggestAddInlineOrNoInlinePragma !Var !Activation
- | SuggestAddPhaseToCompetingRule !RuleName
- | SuggestAddToHSigExportList !Name !(Maybe Module)
- | SuggestIncreaseSimplifierIterations
- | SuggestUseTypeFromDataKind (Maybe RdrName)
- | SuggestQualifiedAfterModuleName
- | SuggestThQuotationSyntax
- | SuggestRoles [Role]
- | SuggestQualifyStarOperator
- | SuggestTypeSignatureForm
- | SuggestFixOrphanInstance
- | SuggestAddStandaloneDerivation
- | SuggestFillInWildcardConstraint
- | SuggestRenameForall
- | SuggestAppropriateTHTick NameSpace
- | SuggestDumpSlices
- | SuggestAddTick UntickedPromotedThing
- | SuggestMoveToDeclarationSite SDoc RdrName
- | SuggestSimilarNames RdrName (NonEmpty SimilarName)
- | RemindFieldSelectorSuppressed { }
- | ImportSuggestion ImportSuggestion
- | SuggestImportingDataCon
- | SuggestPlacePragmaInHeader
- | SuggestPatternMatchingSyntax
- | SuggestSpecialiseVisibilityHints Name
- | LoopySuperclassSolveHint PredType ClsInstOrQC
- data LanguageExtensionHint
- data AvailableBindings
- data DiagnosticCode = DiagnosticCode {}
- data Severity
- data MessageClass
- data MsgEnvelope e = MsgEnvelope {}
- data DiagnosticReason
- data DiagnosticMessage = DiagnosticMessage {}
- data DiagnosticHint = DiagnosticHint !SDoc
- data NoDiagnosticOpts = NoDiagnosticOpts
- data UnknownDiagnostic where
- UnknownDiagnostic :: forall a. (DiagnosticOpts a ~ NoDiagnosticOpts, Diagnostic a, Typeable a) => a -> UnknownDiagnostic
- class Diagnostic a where
- type DiagnosticOpts a
- defaultDiagnosticOpts :: DiagnosticOpts a
- diagnosticMessage :: DiagnosticOpts a -> a -> DecoratedSDoc
- diagnosticReason :: a -> DiagnosticReason
- diagnosticHints :: a -> [GhcHint]
- diagnosticCode :: a -> Maybe DiagnosticCode
- type family DiagnosticOpts a
- data DecoratedSDoc
- data Messages e
- type Validity = Validity' SDoc
- data Validity' a
- data DiagOpts = DiagOpts {}
- data Tick
- data SimplCount
- data StrictnessMark
- data HsImplBang
- data HsSrcBang = HsSrcBang SourceText SrcUnpackedness SrcStrictness
- type DataConEnv a = UniqFM DataCon a
- data AmbiguousFieldOcc pass
- = Unambiguous (XUnambiguous pass) (XRec pass RdrName)
- | Ambiguous (XAmbiguous pass) (XRec pass RdrName)
- | XAmbiguousFieldOcc !(XXAmbiguousFieldOcc pass)
- type LAmbiguousFieldOcc pass = XRec pass (AmbiguousFieldOcc pass)
- data FieldOcc pass
- = FieldOcc {
- foExt :: XCFieldOcc pass
- foLabel :: XRec pass RdrName
- | XFieldOcc !(XXFieldOcc pass)
- = FieldOcc {
- type LFieldOcc pass = XRec pass (FieldOcc pass)
- type LHsTypeArg p = HsArg (LHsType p) (LHsKind p)
- data HsArg tm ty
- data HsConDetails tyarg arg rec
- data ConDeclField pass
- = ConDeclField {
- cd_fld_ext :: XConDeclField pass
- cd_fld_names :: [LFieldOcc pass]
- cd_fld_type :: LBangType pass
- cd_fld_doc :: Maybe (LHsDoc pass)
- | XConDeclField !(XXConDeclField pass)
- = ConDeclField {
- type LConDeclField pass = XRec pass (ConDeclField pass)
- data HsTupleSort
- data HsScaled pass a = HsScaled (HsArrow pass) a
- data HsLinearArrowTokens pass
- = HsPct1 !(LHsToken "%1" pass) !(LHsUniToken "->" "\8594" pass)
- | HsLolly !(LHsToken "\8888" pass)
- data HsArrow pass
- = HsUnrestrictedArrow !(LHsUniToken "->" "\8594" pass)
- | HsLinearArrow !(HsLinearArrowTokens pass)
- | HsExplicitMult !(LHsToken "%" pass) !(LHsType pass) !(LHsUniToken "->" "\8594" pass)
- data HsTyLit pass
- data HsType pass
- = HsForAllTy {
- hst_xforall :: XForAllTy pass
- hst_tele :: HsForAllTelescope pass
- hst_body :: LHsType pass
- | HsQualTy { }
- | HsTyVar (XTyVar pass) PromotionFlag (LIdP pass)
- | HsAppTy (XAppTy pass) (LHsType pass) (LHsType pass)
- | HsAppKindTy (XAppKindTy pass) (LHsType pass) (LHsKind pass)
- | HsFunTy (XFunTy pass) (HsArrow pass) (LHsType pass) (LHsType pass)
- | HsListTy (XListTy pass) (LHsType pass)
- | HsTupleTy (XTupleTy pass) HsTupleSort [LHsType pass]
- | HsSumTy (XSumTy pass) [LHsType pass]
- | HsOpTy (XOpTy pass) PromotionFlag (LHsType pass) (LIdP pass) (LHsType pass)
- | HsParTy (XParTy pass) (LHsType pass)
- | HsIParamTy (XIParamTy pass) (XRec pass HsIPName) (LHsType pass)
- | HsStarTy (XStarTy pass) Bool
- | HsKindSig (XKindSig pass) (LHsType pass) (LHsKind pass)
- | HsSpliceTy (XSpliceTy pass) (HsUntypedSplice pass)
- | HsDocTy (XDocTy pass) (LHsType pass) (LHsDoc pass)
- | HsBangTy (XBangTy pass) HsSrcBang (LHsType pass)
- | HsRecTy (XRecTy pass) [LConDeclField pass]
- | HsExplicitListTy (XExplicitListTy pass) PromotionFlag [LHsType pass]
- | HsExplicitTupleTy (XExplicitTupleTy pass) [LHsType pass]
- | HsTyLit (XTyLit pass) (HsTyLit pass)
- | HsWildCardTy (XWildCardTy pass)
- | XHsType !(XXType pass)
- = HsForAllTy {
- data HsTyVarBndr flag pass
- = UserTyVar (XUserTyVar pass) flag (LIdP pass)
- | KindedTyVar (XKindedTyVar pass) flag (LIdP pass) (LHsKind pass)
- | XTyVarBndr !(XXTyVarBndr pass)
- newtype HsIPName = HsIPName FastString
- data HsSigType pass
- = HsSig { }
- | XHsSigType !(XXHsSigType pass)
- type LHsSigWcType pass = HsWildCardBndrs pass (LHsSigType pass)
- type LHsWcType pass = HsWildCardBndrs pass (LHsType pass)
- type LHsSigType pass = XRec pass (HsSigType pass)
- data HsPatSigType pass
- = HsPS { }
- | XHsPatSigType !(XXHsPatSigType pass)
- data HsWildCardBndrs pass thing
- = HsWC { }
- | XHsWildCardBndrs !(XXHsWildCardBndrs pass thing)
- type HsOuterFamEqnTyVarBndrs = HsOuterTyVarBndrs ()
- type HsOuterSigTyVarBndrs = HsOuterTyVarBndrs Specificity
- data HsOuterTyVarBndrs flag pass
- = HsOuterImplicit {
- hso_ximplicit :: XHsOuterImplicit pass
- | HsOuterExplicit {
- hso_xexplicit :: XHsOuterExplicit pass flag
- hso_bndrs :: [LHsTyVarBndr flag (NoGhcTc pass)]
- | XHsOuterTyVarBndrs !(XXHsOuterTyVarBndrs pass)
- = HsOuterImplicit {
- data LHsQTyVars pass
- = HsQTvs {
- hsq_ext :: XHsQTvs pass
- hsq_explicit :: [LHsTyVarBndr () pass]
- | XLHsQTyVars !(XXLHsQTyVars pass)
- = HsQTvs {
- type LHsTyVarBndr flag pass = XRec pass (HsTyVarBndr flag pass)
- data HsForAllTelescope pass
- = HsForAllVis {
- hsf_xvis :: XHsForAllVis pass
- hsf_vis_bndrs :: [LHsTyVarBndr () pass]
- | HsForAllInvis {
- hsf_xinvis :: XHsForAllInvis pass
- hsf_invis_bndrs :: [LHsTyVarBndr Specificity pass]
- | XHsForAllTelescope !(XXHsForAllTelescope pass)
- = HsForAllVis {
- type LHsKind pass = XRec pass (HsKind pass)
- type HsKind pass = HsType pass
- type LHsType pass = XRec pass (HsType pass)
- type HsContext pass = [LHsType pass]
- type LHsContext pass = XRec pass (HsContext pass)
- type BangType pass = HsType pass
- type LBangType pass = XRec pass (BangType pass)
- data HsFieldBind lhs rhs = HsFieldBind {}
- type HsRecUpdField p = HsFieldBind (LAmbiguousFieldOcc p) (LHsExpr p)
- type HsRecField p arg = HsFieldBind (LFieldOcc p) arg
- type LHsRecUpdField p = XRec p (HsRecUpdField p)
- type LHsRecField p arg = XRec p (HsRecField p arg)
- type LHsFieldBind p id arg = XRec p (HsFieldBind id arg)
- newtype RecFieldsDotDot = RecFieldsDotDot {}
- data HsRecFields p arg = HsRecFields {
- rec_flds :: [LHsRecField p arg]
- rec_dotdot :: Maybe (XRec p RecFieldsDotDot)
- type HsConPatDetails p = HsConDetails (HsConPatTyArg (NoGhcTc p)) (LPat p) (HsRecFields p (LPat p))
- data HsConPatTyArg p = HsConPatTyArg !(LHsToken "@" p) (HsPatSigType p)
- type family ConLikeP x
- data HsPatSynDir id
- data RecordPatSynField pass = RecordPatSynField {
- recordPatSynField :: FieldOcc pass
- recordPatSynPatVar :: LIdP pass
- type HsPatSynDetails pass = HsConDetails Void (LIdP pass) [RecordPatSynField pass]
- data FixitySig pass
- = FixitySig (XFixitySig pass) [LIdP pass] Fixity
- | XFixitySig !(XXFixitySig pass)
- type LFixitySig pass = XRec pass (FixitySig pass)
- data Sig pass
- = TypeSig (XTypeSig pass) [LIdP pass] (LHsSigWcType pass)
- | PatSynSig (XPatSynSig pass) [LIdP pass] (LHsSigType pass)
- | ClassOpSig (XClassOpSig pass) Bool [LIdP pass] (LHsSigType pass)
- | FixSig (XFixSig pass) (FixitySig pass)
- | InlineSig (XInlineSig pass) (LIdP pass) InlinePragma
- | SpecSig (XSpecSig pass) (LIdP pass) [LHsSigType pass] InlinePragma
- | SpecInstSig (XSpecInstSig pass) (LHsSigType pass)
- | MinimalSig (XMinimalSig pass) (LBooleanFormula (LIdP pass))
- | SCCFunSig (XSCCFunSig pass) (LIdP pass) (Maybe (XRec pass StringLiteral))
- | CompleteMatchSig (XCompleteMatchSig pass) (XRec pass [LIdP pass]) (Maybe (LIdP pass))
- | XSig !(XXSig pass)
- type LSig pass = XRec pass (Sig pass)
- data IPBind id
- type LIPBind id = XRec id (IPBind id)
- data HsIPBinds id
- = IPBinds (XIPBinds id) [LIPBind id]
- | XHsIPBinds !(XXHsIPBinds id)
- data PatSynBind idL idR
- = PSB {
- psb_ext :: XPSB idL idR
- psb_id :: LIdP idL
- psb_args :: HsPatSynDetails idR
- psb_def :: LPat idR
- psb_dir :: HsPatSynDir idR
- | XPatSynBind !(XXPatSynBind idL idR)
- = PSB {
- data HsBindLR idL idR
- = FunBind {
- fun_ext :: XFunBind idL idR
- fun_id :: LIdP idL
- fun_matches :: MatchGroup idR (LHsExpr idR)
- | PatBind { }
- | VarBind { }
- | PatSynBind (XPatSynBind idL idR) (PatSynBind idL idR)
- | XHsBindsLR !(XXHsBindsLR idL idR)
- = FunBind {
- type LHsBindLR idL idR = XRec idL (HsBindLR idL idR)
- type LHsBindsLR idL idR = Bag (LHsBindLR idL idR)
- type HsBind id = HsBindLR id id
- type LHsBinds id = LHsBindsLR id id
- type LHsBind id = LHsBindLR id id
- data HsValBindsLR idL idR
- = ValBinds (XValBinds idL idR) (LHsBindsLR idL idR) [LSig idR]
- | XValBindsLR !(XXValBindsLR idL idR)
- type HsValBinds id = HsValBindsLR id id
- type LHsLocalBindsLR idL idR = XRec idL (HsLocalBindsLR idL idR)
- data HsLocalBindsLR idL idR
- = HsValBinds (XHsValBinds idL idR) (HsValBindsLR idL idR)
- | HsIPBinds (XHsIPBinds idL idR) (HsIPBinds idR)
- | EmptyLocalBinds (XEmptyLocalBinds idL idR)
- | XHsLocalBindsLR !(XXHsLocalBindsLR idL idR)
- type LHsLocalBinds id = XRec id (HsLocalBinds id)
- type HsLocalBinds id = HsLocalBindsLR id id
- data RoleAnnotDecl pass
- = RoleAnnotDecl (XCRoleAnnotDecl pass) (LIdP pass) [XRec pass (Maybe Role)]
- | XRoleAnnotDecl !(XXRoleAnnotDecl pass)
- type LRoleAnnotDecl pass = XRec pass (RoleAnnotDecl pass)
- data AnnProvenance pass
- = ValueAnnProvenance (LIdP pass)
- | TypeAnnProvenance (LIdP pass)
- | ModuleAnnProvenance
- type LAnnDecl pass = XRec pass (AnnDecl pass)
- data WarnDecl pass
- = Warning (XWarning pass) [LIdP pass] (WarningTxt pass)
- | XWarnDecl !(XXWarnDecl pass)
- type LWarnDecl pass = XRec pass (WarnDecl pass)
- data WarnDecls pass
- = Warnings {
- wd_ext :: XWarnings pass
- wd_warnings :: [LWarnDecl pass]
- | XWarnDecls !(XXWarnDecls pass)
- = Warnings {
- type LWarnDecls pass = XRec pass (WarnDecls pass)
- data DocDecl pass
- = DocCommentNext (LHsDoc pass)
- | DocCommentPrev (LHsDoc pass)
- | DocCommentNamed String (LHsDoc pass)
- | DocGroup Int (LHsDoc pass)
- type LDocDecl pass = XRec pass (DocDecl pass)
- data RuleBndr pass
- = RuleBndr (XCRuleBndr pass) (LIdP pass)
- | RuleBndrSig (XRuleBndrSig pass) (LIdP pass) (HsPatSigType pass)
- | XRuleBndr !(XXRuleBndr pass)
- type LRuleBndr pass = XRec pass (RuleBndr pass)
- data RuleDecl pass
- type LRuleDecl pass = XRec pass (RuleDecl pass)
- data RuleDecls pass
- = HsRules {
- rds_ext :: XCRuleDecls pass
- rds_rules :: [LRuleDecl pass]
- | XRuleDecls !(XXRuleDecls pass)
- = HsRules {
- type LRuleDecls pass = XRec pass (RuleDecls pass)
- data ForeignExport pass
- = CExport (XCExport pass) (XRec pass CExportSpec)
- | XForeignExport !(XXForeignExport pass)
- data CImportSpec
- data ForeignImport pass
- = CImport (XCImport pass) (XRec pass CCallConv) (XRec pass Safety) (Maybe Header) CImportSpec
- | XForeignImport !(XXForeignImport pass)
- data ForeignDecl pass
- = ForeignImport {
- fd_i_ext :: XForeignImport pass
- fd_name :: LIdP pass
- fd_sig_ty :: LHsSigType pass
- fd_fi :: ForeignImport pass
- | ForeignExport {
- fd_e_ext :: XForeignExport pass
- fd_name :: LIdP pass
- fd_sig_ty :: LHsSigType pass
- fd_fe :: ForeignExport pass
- | XForeignDecl !(XXForeignDecl pass)
- = ForeignImport {
- type LForeignDecl pass = XRec pass (ForeignDecl pass)
- data DefaultDecl pass
- = DefaultDecl (XCDefaultDecl pass) [LHsType pass]
- | XDefaultDecl !(XXDefaultDecl pass)
- type LDefaultDecl pass = XRec pass (DefaultDecl pass)
- data DerivStrategy pass
- = StockStrategy (XStockStrategy pass)
- | AnyclassStrategy (XAnyClassStrategy pass)
- | NewtypeStrategy (XNewtypeStrategy pass)
- | ViaStrategy (XViaStrategy pass)
- type LDerivStrategy pass = XRec pass (DerivStrategy pass)
- data DerivDecl pass
- = DerivDecl {
- deriv_ext :: XCDerivDecl pass
- deriv_type :: LHsSigWcType pass
- deriv_strategy :: Maybe (LDerivStrategy pass)
- deriv_overlap_mode :: Maybe (XRec pass OverlapMode)
- | XDerivDecl !(XXDerivDecl pass)
- = DerivDecl {
- type LDerivDecl pass = XRec pass (DerivDecl pass)
- data InstDecl pass
- = ClsInstD {
- cid_d_ext :: XClsInstD pass
- cid_inst :: ClsInstDecl pass
- | DataFamInstD {
- dfid_ext :: XDataFamInstD pass
- dfid_inst :: DataFamInstDecl pass
- | TyFamInstD {
- tfid_ext :: XTyFamInstD pass
- tfid_inst :: TyFamInstDecl pass
- | XInstDecl !(XXInstDecl pass)
- = ClsInstD {
- type LInstDecl pass = XRec pass (InstDecl pass)
- data ClsInstDecl pass
- = ClsInstDecl {
- cid_ext :: XCClsInstDecl pass
- cid_poly_ty :: LHsSigType pass
- cid_binds :: LHsBinds pass
- cid_sigs :: [LSig pass]
- cid_tyfam_insts :: [LTyFamInstDecl pass]
- cid_datafam_insts :: [LDataFamInstDecl pass]
- cid_overlap_mode :: Maybe (XRec pass OverlapMode)
- | XClsInstDecl !(XXClsInstDecl pass)
- = ClsInstDecl {
- type LClsInstDecl pass = XRec pass (ClsInstDecl pass)
- data FamEqn pass rhs
- = FamEqn {
- feqn_ext :: XCFamEqn pass rhs
- feqn_tycon :: LIdP pass
- feqn_bndrs :: HsOuterFamEqnTyVarBndrs pass
- feqn_pats :: HsTyPats pass
- feqn_fixity :: LexicalFixity
- feqn_rhs :: rhs
- | XFamEqn !(XXFamEqn pass rhs)
- = FamEqn {
- newtype DataFamInstDecl pass = DataFamInstDecl {
- dfid_eqn :: FamEqn pass (HsDataDefn pass)
- type LDataFamInstDecl pass = XRec pass (DataFamInstDecl pass)
- data TyFamInstDecl pass
- = TyFamInstDecl {
- tfid_xtn :: XCTyFamInstDecl pass
- tfid_eqn :: TyFamInstEqn pass
- | XTyFamInstDecl !(XXTyFamInstDecl pass)
- = TyFamInstDecl {
- type LTyFamInstDecl pass = XRec pass (TyFamInstDecl pass)
- type LTyFamDefltDecl pass = XRec pass (TyFamDefltDecl pass)
- type TyFamDefltDecl = TyFamInstDecl
- type TyFamInstEqn pass = FamEqn pass (LHsType pass)
- type HsTyPats pass = [LHsTypeArg pass]
- type LTyFamInstEqn pass = XRec pass (TyFamInstEqn pass)
- data HsConDeclGADTDetails pass
- = PrefixConGADT [HsScaled pass (LBangType pass)]
- | RecConGADT (XRec pass [LConDeclField pass]) (LHsUniToken "->" "\8594" pass)
- type HsConDeclH98Details pass = HsConDetails Void (HsScaled pass (LBangType pass)) (XRec pass [LConDeclField pass])
- data ConDecl pass
- = ConDeclGADT {
- con_g_ext :: XConDeclGADT pass
- con_names :: NonEmpty (LIdP pass)
- con_dcolon :: !(LHsUniToken "::" "\8759" pass)
- con_bndrs :: XRec pass (HsOuterSigTyVarBndrs pass)
- con_mb_cxt :: Maybe (LHsContext pass)
- con_g_args :: HsConDeclGADTDetails pass
- con_res_ty :: LHsType pass
- con_doc :: Maybe (LHsDoc pass)
- | ConDeclH98 {
- con_ext :: XConDeclH98 pass
- con_name :: LIdP pass
- con_forall :: Bool
- con_ex_tvs :: [LHsTyVarBndr Specificity pass]
- con_mb_cxt :: Maybe (LHsContext pass)
- con_args :: HsConDeclH98Details pass
- con_doc :: Maybe (LHsDoc pass)
- | XConDecl !(XXConDecl pass)
- = ConDeclGADT {
- type LConDecl pass = XRec pass (ConDecl pass)
- data DataDefnCons a
- = NewTypeCon a
- | DataTypeCons Bool [a]
- data NewOrData
- data StandaloneKindSig pass
- = StandaloneKindSig (XStandaloneKindSig pass) (LIdP pass) (LHsSigType pass)
- | XStandaloneKindSig !(XXStandaloneKindSig pass)
- type LStandaloneKindSig pass = XRec pass (StandaloneKindSig pass)
- data DerivClauseTys pass
- = DctSingle (XDctSingle pass) (LHsSigType pass)
- | DctMulti (XDctMulti pass) [LHsSigType pass]
- | XDerivClauseTys !(XXDerivClauseTys pass)
- type LDerivClauseTys pass = XRec pass (DerivClauseTys pass)
- data HsDerivingClause pass
- = HsDerivingClause {
- deriv_clause_ext :: XCHsDerivingClause pass
- deriv_clause_strategy :: Maybe (LDerivStrategy pass)
- deriv_clause_tys :: LDerivClauseTys pass
- | XHsDerivingClause !(XXHsDerivingClause pass)
- = HsDerivingClause {
- type LHsDerivingClause pass = XRec pass (HsDerivingClause pass)
- type HsDeriving pass = [LHsDerivingClause pass]
- data HsDataDefn pass
- = HsDataDefn {
- dd_ext :: XCHsDataDefn pass
- dd_ctxt :: Maybe (LHsContext pass)
- dd_cType :: Maybe (XRec pass CType)
- dd_kindSig :: Maybe (LHsKind pass)
- dd_cons :: DataDefnCons (LConDecl pass)
- dd_derivs :: HsDeriving pass
- | XHsDataDefn !(XXHsDataDefn pass)
- = HsDataDefn {
- data FamilyInfo pass
- = DataFamily
- | OpenTypeFamily
- | ClosedTypeFamily (Maybe [LTyFamInstEqn pass])
- data InjectivityAnn pass
- = InjectivityAnn (XCInjectivityAnn pass) (LIdP pass) [LIdP pass]
- | XInjectivityAnn !(XXInjectivityAnn pass)
- type LInjectivityAnn pass = XRec pass (InjectivityAnn pass)
- data FamilyDecl pass
- = FamilyDecl {
- fdExt :: XCFamilyDecl pass
- fdInfo :: FamilyInfo pass
- fdTopLevel :: TopLevelFlag
- fdLName :: LIdP pass
- fdTyVars :: LHsQTyVars pass
- fdFixity :: LexicalFixity
- fdResultSig :: LFamilyResultSig pass
- fdInjectivityAnn :: Maybe (LInjectivityAnn pass)
- | XFamilyDecl !(XXFamilyDecl pass)
- = FamilyDecl {
- type LFamilyDecl pass = XRec pass (FamilyDecl pass)
- data FamilyResultSig pass
- = NoSig (XNoSig pass)
- | KindSig (XCKindSig pass) (LHsKind pass)
- | TyVarSig (XTyVarSig pass) (LHsTyVarBndr () pass)
- | XFamilyResultSig !(XXFamilyResultSig pass)
- type LFamilyResultSig pass = XRec pass (FamilyResultSig pass)
- data TyClGroup pass
- = TyClGroup {
- group_ext :: XCTyClGroup pass
- group_tyclds :: [LTyClDecl pass]
- group_roles :: [LRoleAnnotDecl pass]
- group_kisigs :: [LStandaloneKindSig pass]
- group_instds :: [LInstDecl pass]
- | XTyClGroup !(XXTyClGroup pass)
- = TyClGroup {
- type LHsFunDep pass = XRec pass (FunDep pass)
- data TyClDecl pass
- = FamDecl {
- tcdFExt :: XFamDecl pass
- tcdFam :: FamilyDecl pass
- | SynDecl {
- tcdSExt :: XSynDecl pass
- tcdLName :: LIdP pass
- tcdTyVars :: LHsQTyVars pass
- tcdFixity :: LexicalFixity
- tcdRhs :: LHsType pass
- | DataDecl {
- tcdDExt :: XDataDecl pass
- tcdLName :: LIdP pass
- tcdTyVars :: LHsQTyVars pass
- tcdFixity :: LexicalFixity
- tcdDataDefn :: HsDataDefn pass
- | ClassDecl {
- tcdCExt :: XClassDecl pass
- tcdLayout :: !(LayoutInfo pass)
- tcdCtxt :: Maybe (LHsContext pass)
- tcdLName :: LIdP pass
- tcdTyVars :: LHsQTyVars pass
- tcdFixity :: LexicalFixity
- tcdFDs :: [LHsFunDep pass]
- tcdSigs :: [LSig pass]
- tcdMeths :: LHsBinds pass
- tcdATs :: [LFamilyDecl pass]
- tcdATDefs :: [LTyFamDefltDecl pass]
- tcdDocs :: [LDocDecl pass]
- | XTyClDecl !(XXTyClDecl pass)
- = FamDecl {
- type LTyClDecl pass = XRec pass (TyClDecl pass)
- data SpliceDecoration
- data SpliceDecl p
- = SpliceDecl (XSpliceDecl p) (XRec p (HsUntypedSplice p)) SpliceDecoration
- | XSpliceDecl !(XXSpliceDecl p)
- type LSpliceDecl pass = XRec pass (SpliceDecl pass)
- data HsGroup p
- = HsGroup {
- hs_ext :: XCHsGroup p
- hs_valds :: HsValBinds p
- hs_splcds :: [LSpliceDecl p]
- hs_tyclds :: [TyClGroup p]
- hs_derivds :: [LDerivDecl p]
- hs_fixds :: [LFixitySig p]
- hs_defds :: [LDefaultDecl p]
- hs_fords :: [LForeignDecl p]
- hs_warnds :: [LWarnDecls p]
- hs_annds :: [LAnnDecl p]
- hs_ruleds :: [LRuleDecls p]
- hs_docs :: [LDocDecl p]
- | XHsGroup !(XXHsGroup p)
- = HsGroup {
- data HsDecl p
- = TyClD (XTyClD p) (TyClDecl p)
- | InstD (XInstD p) (InstDecl p)
- | DerivD (XDerivD p) (DerivDecl p)
- | ValD (XValD p) (HsBind p)
- | SigD (XSigD p) (Sig p)
- | KindSigD (XKindSigD p) (StandaloneKindSig p)
- | DefD (XDefD p) (DefaultDecl p)
- | ForD (XForD p) (ForeignDecl p)
- | WarningD (XWarningD p) (WarnDecls p)
- | AnnD (XAnnD p) (AnnDecl p)
- | RuleD (XRuleD p) (RuleDecls p)
- | SpliceD (XSpliceD p) (SpliceDecl p)
- | DocD (XDocD p) (DocDecl p)
- | RoleAnnotD (XRoleAnnotD p) (RoleAnnotDecl p)
- | XHsDecl !(XXHsDecl p)
- type LHsDecl p = XRec p (HsDecl p)
- data HsDoFlavour
- = DoExpr (Maybe ModuleName)
- | MDoExpr (Maybe ModuleName)
- | GhciStmtCtxt
- | ListComp
- | MonadComp
- data HsArrowMatchContext
- data HsStmtContext p
- = HsDoStmt HsDoFlavour
- | PatGuard (HsMatchContext p)
- | ParStmtCtxt (HsStmtContext p)
- | TransStmtCtxt (HsStmtContext p)
- | ArrowExpr
- data HsMatchContext p
- data ArithSeqInfo id
- data HsQuote p
- data ApplicativeArg idL
- = ApplicativeArgOne {
- xarg_app_arg_one :: XApplicativeArgOne idL
- app_arg_pattern :: LPat idL
- arg_expr :: LHsExpr idL
- is_body_stmt :: Bool
- | ApplicativeArgMany {
- xarg_app_arg_many :: XApplicativeArgMany idL
- app_stmts :: [ExprLStmt idL]
- final_expr :: HsExpr idL
- bv_pattern :: LPat idL
- stmt_context :: HsDoFlavour
- | XApplicativeArg !(XXApplicativeArg idL)
- = ApplicativeArgOne {
- type FailOperator id = Maybe (SyntaxExpr id)
- data ParStmtBlock idL idR
- = ParStmtBlock (XParStmtBlock idL idR) [ExprLStmt idL] [IdP idR] (SyntaxExpr idR)
- | XParStmtBlock !(XXParStmtBlock idL idR)
- data TransForm
- data StmtLR idL idR body
- = LastStmt (XLastStmt idL idR body) body (Maybe Bool) (SyntaxExpr idR)
- | BindStmt (XBindStmt idL idR body) (LPat idL) body
- | ApplicativeStmt (XApplicativeStmt idL idR body) [(SyntaxExpr idR, ApplicativeArg idL)] (Maybe (SyntaxExpr idR))
- | BodyStmt (XBodyStmt idL idR body) body (SyntaxExpr idR) (SyntaxExpr idR)
- | LetStmt (XLetStmt idL idR body) (HsLocalBindsLR idL idR)
- | ParStmt (XParStmt idL idR body) [ParStmtBlock idL idR] (HsExpr idR) (SyntaxExpr idR)
- | TransStmt { }
- | RecStmt {
- recS_ext :: XRecStmt idL idR body
- recS_stmts :: XRec idR [LStmtLR idL idR body]
- recS_later_ids :: [IdP idR]
- recS_rec_ids :: [IdP idR]
- recS_bind_fn :: SyntaxExpr idR
- recS_ret_fn :: SyntaxExpr idR
- recS_mfix_fn :: SyntaxExpr idR
- | XStmtLR !(XXStmtLR idL idR body)
- type GhciStmt id = Stmt id (LHsExpr id)
- type GhciLStmt id = LStmt id (LHsExpr id)
- type GuardStmt id = Stmt id (LHsExpr id)
- type GuardLStmt id = LStmt id (LHsExpr id)
- type ExprStmt id = Stmt id (LHsExpr id)
- type ExprLStmt id = LStmt id (LHsExpr id)
- type CmdStmt id = Stmt id (LHsCmd id)
- type CmdLStmt id = LStmt id (LHsCmd id)
- type Stmt id body = StmtLR id id body
- type LStmtLR idL idR body = XRec idL (StmtLR idL idR body)
- type LStmt id body = XRec id (StmtLR id id body)
- data GRHS p body
- = GRHS (XCGRHS p body) [GuardLStmt p] body
- | XGRHS !(XXGRHS p body)
- type LGRHS id body = XRec id (GRHS id body)
- data Match p body
- type LMatch id body = XRec id (Match id body)
- type HsRecordBinds p = HsRecFields p (LHsExpr p)
- data HsCmdTop p
- type LHsCmdTop p = XRec p (HsCmdTop p)
- data HsArrAppType
- data HsCmd id
- = HsCmdArrApp (XCmdArrApp id) (LHsExpr id) (LHsExpr id) HsArrAppType Bool
- | HsCmdArrForm (XCmdArrForm id) (LHsExpr id) LexicalFixity (Maybe Fixity) [LHsCmdTop id]
- | HsCmdApp (XCmdApp id) (LHsCmd id) (LHsExpr id)
- | HsCmdLam (XCmdLam id) (MatchGroup id (LHsCmd id))
- | HsCmdPar (XCmdPar id) !(LHsToken "(" id) (LHsCmd id) !(LHsToken ")" id)
- | HsCmdCase (XCmdCase id) (LHsExpr id) (MatchGroup id (LHsCmd id))
- | HsCmdLamCase (XCmdLamCase id) LamCaseVariant (MatchGroup id (LHsCmd id))
- | HsCmdIf (XCmdIf id) (SyntaxExpr id) (LHsExpr id) (LHsCmd id) (LHsCmd id)
- | HsCmdLet (XCmdLet id) !(LHsToken "let" id) (HsLocalBinds id) !(LHsToken "in" id) (LHsCmd id)
- | HsCmdDo (XCmdDo id) (XRec id [CmdLStmt id])
- | XCmd !(XXCmd id)
- type LHsCmd id = XRec id (HsCmd id)
- data LamCaseVariant
- data HsTupArg id
- type LHsTupArg id = XRec id (HsTupArg id)
- data HsPragE p
- = HsPragSCC (XSCC p) StringLiteral
- | XHsPragE !(XXPragE p)
- data DotFieldOcc p
- = DotFieldOcc {
- dfoExt :: XCDotFieldOcc p
- dfoLabel :: XRec p FieldLabelString
- | XDotFieldOcc !(XXDotFieldOcc p)
- = DotFieldOcc {
- type LHsRecUpdProj p = XRec p (RecUpdProj p)
- type RecUpdProj p = RecProj p (LHsExpr p)
- type LHsRecProj p arg = XRec p (RecProj p arg)
- type RecProj p arg = HsFieldBind (LFieldLabelStrings p) arg
- newtype FieldLabelStrings p = FieldLabelStrings [XRec p (DotFieldOcc p)]
- type LFieldLabelStrings p = XRec p (FieldLabelStrings p)
- data HsModule p
- = HsModule {
- hsmodExt :: XCModule p
- hsmodName :: Maybe (XRec p ModuleName)
- hsmodExports :: Maybe (XRec p [LIE p])
- hsmodImports :: [LImportDecl p]
- hsmodDecls :: [LHsDecl p]
- | XModule !(XXModule p)
- = HsModule {
- data AnnBind bndr annot
- data AnnAlt bndr annot = AnnAlt AltCon [bndr] (AnnExpr bndr annot)
- data AnnExpr' bndr annot
- = AnnVar Id
- | AnnLit Literal
- | AnnLam bndr (AnnExpr bndr annot)
- | AnnApp (AnnExpr bndr annot) (AnnExpr bndr annot)
- | AnnCase (AnnExpr bndr annot) bndr Type [AnnAlt bndr annot]
- | AnnLet (AnnBind bndr annot) (AnnExpr bndr annot)
- | AnnCast (AnnExpr bndr annot) (annot, Coercion)
- | AnnTick CoreTickish (AnnExpr bndr annot)
- | AnnType Type
- | AnnCoercion Coercion
- type AnnExpr bndr annot = (annot, AnnExpr' bndr annot)
- type TaggedAlt t = Alt (TaggedBndr t)
- type TaggedArg t = Arg (TaggedBndr t)
- type TaggedExpr t = Expr (TaggedBndr t)
- type TaggedBind t = Bind (TaggedBndr t)
- data TaggedBndr t = TB CoreBndr t
- type CoreAlt = Alt CoreBndr
- type CoreBind = Bind CoreBndr
- type CoreArg = Arg CoreBndr
- type CoreProgram = [CoreBind]
- data UnfoldingGuidance
- = UnfWhen {
- ug_arity :: Arity
- ug_unsat_ok :: Bool
- ug_boring_ok :: Bool
- | UnfIfGoodArgs { }
- | UnfNever
- = UnfWhen {
- data UnfoldingCache = UnfoldingCache {
- uf_is_value :: !Bool
- uf_is_conlike :: !Bool
- uf_is_work_free :: !Bool
- uf_expandable :: !Bool
- data Unfolding
- = NoUnfolding
- | BootUnfolding
- | OtherCon [AltCon]
- | DFunUnfolding { }
- | CoreUnfolding { }
- type IdUnfoldingFun = Id -> Unfolding
- data InScopeEnv = ISE InScopeSet IdUnfoldingFun
- type RuleFun = RuleOpts -> InScopeEnv -> Id -> [CoreExpr] -> Maybe CoreExpr
- data CoreRule
- = Rule { }
- | BuiltinRule { }
- data IsOrphan
- type MOutCoercion = MCoercion
- type OutArg = CoreArg
- type OutAlt = CoreAlt
- type OutExpr = CoreExpr
- type OutBind = CoreBind
- type OutCoercion = Coercion
- type OutKind = Kind
- type OutType = Type
- type OutBndr = CoreBndr
- type InCoercion = Coercion
- type InArg = CoreArg
- type InAlt = CoreAlt
- type InExpr = CoreExpr
- type InBind = CoreBind
- type InKind = Kind
- type InType = Type
- type InBndr = CoreBndr
- data Bind b
- data AltCon
- data LambdaFormInfo
- data TickBoxOp = TickBox Module !TickBoxId
- type TickBoxId = Int
- data CafInfo
- data RuleInfo = RuleInfo [CoreRule] DVarSet
- type InlinePragInfo = InlinePragma
- type ArityInfo = Arity
- data RecSelParent
- data BoxingInfo b
- = BI_NoBoxNeeded
- | BI_NoBoxAvailable
- | BI_Box {
- bi_data_con :: DataCon
- bi_inst_con :: Expr b
- bi_boxed_type :: Type
- type CoreAltWithFVs = AnnAlt Id FVAnn
- type CoreExprWithFVs' = AnnExpr' Id FVAnn
- type CoreExprWithFVs = AnnExpr Id FVAnn
- type CoreBindWithFVs = AnnBind Id FVAnn
- type FVAnn = DVarSet
- type CheapAppFun = Id -> Arity -> Bool
- data FloatBind
- data MkStringIds = MkStringIds {
- unpackCStringId :: !Id
- unpackCStringUtf8Id :: !Id
- data CompilerInfo
- data LinkerInfo
- data PkgDbRef
- data FlagSpec flag = FlagSpec {
- flagSpecName :: String
- flagSpecFlag :: flag
- flagSpecAction :: TurnOnFlag -> DynP ()
- flagSpecGhcMode :: GhcFlagMode
- type TurnOnFlag = Bool
- newtype CmdLineP s a = CmdLineP (forall (m :: Type -> Type). Monad m => StateT s m a)
- data OnOff a
- newtype FlushOut = FlushOut (IO ())
- type FatalMessager = String -> IO ()
- data DynamicTooState
- data RtsOptsEnabled
- data DynLibLoader
- data PackageDBFlag
- data PackageFlag
- data TrustFlag
- newtype IgnorePackageFlag = IgnorePackage String
- data ModRenaming = ModRenaming {}
- data PackageArg
- data GhcLink
- data GhcMode
- class ContainsDynFlags t where
- extractDynFlags :: t -> DynFlags
- class HasDynFlags (m :: Type -> Type) where
- getDynFlags :: m DynFlags
- data IncludeSpecs = IncludeSpecs {}
- data HoleFit
- data HoleFitPlugin = HoleFitPlugin {}
- data HoleFitCandidate
- type ShHoleSubst = ModuleNameEnv Module
- data UnitErr
- = CloseUnitErr !UnitId !(Maybe UnitId)
- | PackageFlagErr !PackageFlag ![(UnitInfo, UnusableUnitReason)]
- | TrustFlagErr !TrustFlag ![(UnitInfo, UnusableUnitReason)]
- data ModuleSuggestion
- data LookupResult
- = LookupFound Module (UnitInfo, ModuleOrigin)
- | LookupMultiple [(Module, ModuleOrigin)]
- | LookupHidden [(Module, ModuleOrigin)] [(Module, ModuleOrigin)]
- | LookupUnusable [(Module, ModuleOrigin)]
- | LookupNotFound [ModuleSuggestion]
- data UnusableUnitReason
- type UnitInfoMap = Map UnitId UnitInfo
- data UnitDatabase unit = UnitDatabase {
- unitDatabasePath :: FilePath
- unitDatabaseUnits :: [GenUnitInfo unit]
- data UnitState = UnitState {
- unitInfoMap :: UnitInfoMap
- preloadClosure :: PreloadUnitClosure
- packageNameMap :: UniqFM PackageName UnitId
- wireMap :: Map UnitId UnitId
- unwireMap :: Map UnitId UnitId
- preloadUnits :: [UnitId]
- explicitUnits :: [(Unit, Maybe PackageArg)]
- homeUnitDepends :: [UnitId]
- moduleNameProvidersMap :: !ModuleNameProvidersMap
- pluginModuleNameProvidersMap :: !ModuleNameProvidersMap
- requirementContext :: Map ModuleName [InstantiatedModule]
- allowVirtualUnits :: !Bool
- type PreloadUnitClosure = UniqSet UnitId
- data ModuleOrigin
- data FinderOpts = FinderOpts {
- finder_importPaths :: [FilePath]
- finder_lookupHomeInterfaces :: Bool
- finder_bypassHiFileCheck :: Bool
- finder_ways :: Ways
- finder_enableSuggestions :: Bool
- finder_workingDirectory :: Maybe FilePath
- finder_thisPackageName :: Maybe FastString
- finder_hiddenModules :: Set ModuleName
- finder_reexportedModules :: Set ModuleName
- finder_hieDir :: Maybe FilePath
- finder_hieSuf :: String
- finder_hiDir :: Maybe FilePath
- finder_hiSuf :: String
- finder_dynHiSuf :: String
- finder_objectDir :: Maybe FilePath
- finder_objectSuf :: String
- finder_dynObjectSuf :: String
- finder_stubDir :: Maybe FilePath
- data FindResult
- = Found ModLocation Module
- | NoPackage Unit
- | FoundMultiple [(Module, ModuleOrigin)]
- | NotFound {
- fr_paths :: [FilePath]
- fr_pkg :: Maybe Unit
- fr_mods_hidden :: [Unit]
- fr_pkgs_hidden :: [Unit]
- fr_unusables :: [(Unit, UnusableUnitReason)]
- fr_suggestions :: [ModuleSuggestion]
- data InstalledFindResult
- data FinderCache
- data HsParsedModule = HsParsedModule {
- hpm_module :: Located (HsModule GhcPs)
- hpm_src_files :: [FilePath]
- data CgGuts = CgGuts {
- cg_module :: !Module
- cg_tycons :: [TyCon]
- cg_binds :: CoreProgram
- cg_ccs :: [CostCentre]
- cg_foreign :: !ForeignStubs
- cg_foreign_files :: ![(ForeignSrcLang, FilePath)]
- cg_dep_pkgs :: !(Set UnitId)
- cg_hpc_info :: !HpcInfo
- cg_modBreaks :: !(Maybe ModBreaks)
- cg_spt_entries :: [SptEntry]
- data ModGuts = ModGuts {
- mg_module :: !Module
- mg_hsc_src :: HscSource
- mg_loc :: SrcSpan
- mg_exports :: ![AvailInfo]
- mg_deps :: !Dependencies
- mg_usages :: ![Usage]
- mg_used_th :: !Bool
- mg_rdr_env :: !GlobalRdrEnv
- mg_fix_env :: !FixityEnv
- mg_tcs :: ![TyCon]
- mg_insts :: ![ClsInst]
- mg_fam_insts :: ![FamInst]
- mg_patsyns :: ![PatSyn]
- mg_rules :: ![CoreRule]
- mg_binds :: !CoreProgram
- mg_foreign :: !ForeignStubs
- mg_foreign_files :: ![(ForeignSrcLang, FilePath)]
- mg_warns :: !(Warnings GhcRn)
- mg_anns :: [Annotation]
- mg_complete_matches :: [CompleteMatch]
- mg_hpc_info :: !HpcInfo
- mg_modBreaks :: !(Maybe ModBreaks)
- mg_inst_env :: InstEnv
- mg_fam_inst_env :: FamInstEnv
- mg_boot_exports :: !NameSet
- mg_safe_haskell :: SafeHaskellMode
- mg_trust_pkg :: Bool
- mg_docs :: !(Maybe Docs)
- data RuleEnv = RuleEnv {}
- type RuleBase = NameEnv [CoreRule]
- type WhetherHasFamInst = Bool
- type WhetherHasOrphans = Bool
- type IfaceExport = AvailInfo
- data ModIface_ (phase :: ModIfacePhase) = ModIface {
- mi_module :: !Module
- mi_sig_of :: !(Maybe Module)
- mi_hsc_src :: !HscSource
- mi_deps :: Dependencies
- mi_usages :: [Usage]
- mi_exports :: ![IfaceExport]
- mi_used_th :: !Bool
- mi_fixities :: [(OccName, Fixity)]
- mi_warns :: Warnings GhcRn
- mi_anns :: [IfaceAnnotation]
- mi_decls :: [IfaceDeclExts phase]
- mi_extra_decls :: Maybe [IfaceBindingX IfaceMaybeRhs IfaceTopBndrInfo]
- mi_globals :: !(Maybe GlobalRdrEnv)
- mi_insts :: [IfaceClsInst]
- mi_fam_insts :: [IfaceFamInst]
- mi_rules :: [IfaceRule]
- mi_hpc :: !AnyHpcUsage
- mi_trust :: !IfaceTrustInfo
- mi_trust_pkg :: !Bool
- mi_complete_matches :: ![IfaceCompleteMatch]
- mi_docs :: !(Maybe Docs)
- mi_final_exts :: !(IfaceBackendExts phase)
- mi_ext_fields :: !ExtensibleFields
- mi_src_hash :: !Fingerprint
- type ModIface = ModIface_ 'ModIfaceFinal
- type family IfaceBackendExts (phase :: ModIfacePhase) = (bk :: Type) | bk -> phase where ...
- type family IfaceDeclExts (phase :: ModIfacePhase) = (decl :: Type) | decl -> phase where ...
- data ModIfaceBackend = ModIfaceBackend {
- mi_iface_hash :: !Fingerprint
- mi_mod_hash :: !Fingerprint
- mi_flag_hash :: !Fingerprint
- mi_opt_hash :: !Fingerprint
- mi_hpc_hash :: !Fingerprint
- mi_plugin_hash :: !Fingerprint
- mi_orphan :: !WhetherHasOrphans
- mi_finsts :: !WhetherHasFamInst
- mi_exp_hash :: !Fingerprint
- mi_orphan_hash :: !Fingerprint
- mi_warn_fn :: !(OccName -> Maybe (WarningTxt GhcRn))
- mi_fix_fn :: !(OccName -> Maybe Fixity)
- mi_hash_fn :: !(OccName -> Maybe (OccName, Fingerprint))
- type PartialModIface = ModIface_ 'ModIfaceCore
- data HscBackendAction
- data HscRecompStatus
- data ModSummary = ModSummary {
- ms_mod :: Module
- ms_hsc_src :: HscSource
- ms_location :: ModLocation
- ms_hs_hash :: Fingerprint
- ms_obj_date :: Maybe UTCTime
- ms_dyn_obj_date :: !(Maybe UTCTime)
- ms_iface_date :: Maybe UTCTime
- ms_hie_date :: Maybe UTCTime
- ms_srcimps :: [(PkgQual, Located ModuleName)]
- ms_textual_imps :: [(PkgQual, Located ModuleName)]
- ms_ghc_prim_import :: !Bool
- ms_parsed_mod :: Maybe HsParsedModule
- ms_hspp_file :: FilePath
- ms_hspp_opts :: DynFlags
- ms_hspp_buf :: Maybe StringBuffer
- data FileHeaderPragmaType
- data TransLayoutReason
- data CmmParserError
- data LexErr
- data LexErrKind
- data NumUnderscoreReason
- data PsErrInPatDetails
- data ParseContext = ParseContext {}
- data PatIncompleteDoBlock
- data PatIsRecursive
- data PsErrParseDetails = PsErrParseDetails {}
- data PsMessage
- = PsUnknownMessage UnknownDiagnostic
- | PsHeaderMessage !PsHeaderMessage
- | PsWarnBidirectionalFormatChars (NonEmpty (PsLoc, Char, String))
- | PsWarnTab !Word
- | PsWarnTransitionalLayout !TransLayoutReason
- | PsWarnUnrecognisedPragma !String ![String]
- | PsWarnMisplacedPragma !FileHeaderPragmaType
- | PsWarnHaddockInvalidPos
- | PsWarnHaddockIgnoreMulti
- | PsWarnStarBinder
- | PsWarnStarIsType
- | PsWarnImportPreQualified
- | PsWarnOperatorWhitespaceExtConflict !OperatorWhitespaceSymbol
- | PsWarnOperatorWhitespace !FastString !OperatorWhitespaceOccurrence
- | PsErrLambdaCase
- | PsErrEmptyLambda
- | PsErrNumUnderscores !NumUnderscoreReason
- | PsErrPrimStringInvalidChar
- | PsErrMissingBlock
- | PsErrLexer !LexErr !LexErrKind
- | PsErrSuffixAT
- | PsErrParse !String !PsErrParseDetails
- | PsErrCmmLexer
- | PsErrUnsupportedBoxedSumExpr !(SumOrTuple (HsExpr GhcPs))
- | PsErrUnsupportedBoxedSumPat !(SumOrTuple (PatBuilder GhcPs))
- | PsErrUnexpectedQualifiedConstructor !RdrName
- | PsErrTupleSectionInPat
- | PsErrIllegalBangPattern !(Pat GhcPs)
- | PsErrOpFewArgs !StarIsType !RdrName
- | PsErrImportQualifiedTwice
- | PsErrImportPostQualified
- | PsErrIllegalExplicitNamespace
- | PsErrVarForTyCon !RdrName
- | PsErrIllegalPatSynExport
- | PsErrMalformedEntityString
- | PsErrDotsInRecordUpdate
- | PsErrPrecedenceOutOfRange !Int
- | PsErrOverloadedRecordDotInvalid
- | PsErrOverloadedRecordUpdateNotEnabled
- | PsErrOverloadedRecordUpdateNoQualifiedFields
- | PsErrInvalidDataCon !(HsType GhcPs)
- | PsErrInvalidInfixDataCon !(HsType GhcPs) !RdrName !(HsType GhcPs)
- | PsErrIllegalPromotionQuoteDataCon !RdrName
- | PsErrUnpackDataCon
- | PsErrUnexpectedKindAppInDataCon !DataConBuilder !(HsType GhcPs)
- | PsErrInvalidRecordCon !(PatBuilder GhcPs)
- | PsErrIllegalUnboxedStringInPat !(HsLit GhcPs)
- | PsErrIllegalUnboxedFloatingLitInPat !(HsLit GhcPs)
- | PsErrDoNotationInPat
- | PsErrIfThenElseInPat
- | PsErrLambdaCaseInPat LamCaseVariant
- | PsErrCaseInPat
- | PsErrLetInPat
- | PsErrLambdaInPat
- | PsErrArrowExprInPat !(HsExpr GhcPs)
- | PsErrArrowCmdInPat !(HsCmd GhcPs)
- | PsErrArrowCmdInExpr !(HsCmd GhcPs)
- | PsErrViewPatInExpr !(LHsExpr GhcPs) !(LHsExpr GhcPs)
- | PsErrTypeAppWithoutSpace !RdrName !(LHsExpr GhcPs)
- | PsErrLazyPatWithoutSpace !(LHsExpr GhcPs)
- | PsErrBangPatWithoutSpace !(LHsExpr GhcPs)
- | PsErrUnallowedPragma !(HsPragE GhcPs)
- | PsErrQualifiedDoInCmd !ModuleName
- | PsErrInvalidInfixHole
- | PsErrSemiColonsInCondExpr !(HsExpr GhcPs) !Bool !(HsExpr GhcPs) !Bool !(HsExpr GhcPs)
- | PsErrSemiColonsInCondCmd !(HsExpr GhcPs) !Bool !(HsCmd GhcPs) !Bool !(HsCmd GhcPs)
- | PsErrAtInPatPos
- | PsErrLambdaCmdInFunAppCmd !(LHsCmd GhcPs)
- | PsErrCaseCmdInFunAppCmd !(LHsCmd GhcPs)
- | PsErrLambdaCaseCmdInFunAppCmd !LamCaseVariant !(LHsCmd GhcPs)
- | PsErrIfCmdInFunAppCmd !(LHsCmd GhcPs)
- | PsErrLetCmdInFunAppCmd !(LHsCmd GhcPs)
- | PsErrDoCmdInFunAppCmd !(LHsCmd GhcPs)
- | PsErrDoInFunAppExpr !(Maybe ModuleName) !(LHsExpr GhcPs)
- | PsErrMDoInFunAppExpr !(Maybe ModuleName) !(LHsExpr GhcPs)
- | PsErrLambdaInFunAppExpr !(LHsExpr GhcPs)
- | PsErrCaseInFunAppExpr !(LHsExpr GhcPs)
- | PsErrLambdaCaseInFunAppExpr !LamCaseVariant !(LHsExpr GhcPs)
- | PsErrLetInFunAppExpr !(LHsExpr GhcPs)
- | PsErrIfInFunAppExpr !(LHsExpr GhcPs)
- | PsErrProcInFunAppExpr !(LHsExpr GhcPs)
- | PsErrMalformedTyOrClDecl !(LHsType GhcPs)
- | PsErrIllegalWhereInDataDecl
- | PsErrIllegalDataTypeContext !(LHsContext GhcPs)
- | PsErrParseErrorOnInput !OccName
- | PsErrMalformedDecl !SDoc !RdrName
- | PsErrUnexpectedTypeAppInDecl !(LHsType GhcPs) !SDoc !RdrName
- | PsErrNotADataCon !RdrName
- | PsErrRecordSyntaxInPatSynDecl !(LPat GhcPs)
- | PsErrEmptyWhereInPatSynDecl !RdrName
- | PsErrInvalidWhereBindInPatSynDecl !RdrName !(HsDecl GhcPs)
- | PsErrNoSingleWhereBindInPatSynDecl !RdrName !(HsDecl GhcPs)
- | PsErrDeclSpliceNotAtTopLevel !(SpliceDecl GhcPs)
- | PsErrInferredTypeVarNotAllowed
- | PsErrMultipleNamesInStandaloneKindSignature [LIdP GhcPs]
- | PsErrIllegalImportBundleForm
- | PsErrIllegalRoleName !FastString [Role]
- | PsErrInvalidTypeSignature !(LHsExpr GhcPs)
- | PsErrUnexpectedTypeInDecl !(LHsType GhcPs) !SDoc !RdrName [LHsTypeArg GhcPs] !SDoc
- | PsErrExpectedHyphen
- | PsErrSpaceInSCC
- | PsErrEmptyDoubleQuotes !Bool
- | PsErrInvalidPackageName !FastString
- | PsErrInvalidRuleActivationMarker
- | PsErrLinearFunction
- | PsErrMultiWayIf
- | PsErrExplicitForall !Bool
- | PsErrIllegalQualifiedDo !SDoc
- | PsErrCmmParser !CmmParserError
- | PsErrIllegalTraditionalRecordSyntax !SDoc
- | PsErrParseErrorInCmd !SDoc
- | PsErrInPat !(PatBuilder GhcPs) !PsErrInPatDetails
- | PsErrParseRightOpSectionInPat !RdrName !(PatBuilder GhcPs)
- | PsErrIllegalGadtRecordMultiplicity !(HsArrow GhcPs)
- | PsErrInvalidCApiImport
- | PsErrMultipleConForNewtype !RdrName !Int
- | PsErrUnicodeCharLooksLike Char Char String
- data PsHeaderMessage
- type PsError = PsMessage
- type PsWarning = PsMessage
- data HscEnv = HscEnv {
- hsc_dflags :: DynFlags
- hsc_targets :: [Target]
- hsc_mod_graph :: ModuleGraph
- hsc_IC :: InteractiveContext
- hsc_NC :: !NameCache
- hsc_FC :: !FinderCache
- hsc_type_env_vars :: KnotVars (IORef TypeEnv)
- hsc_interp :: Maybe Interp
- hsc_plugins :: !Plugins
- hsc_unit_env :: UnitEnv
- hsc_logger :: !Logger
- hsc_hooks :: !Hooks
- hsc_tmpfs :: !TmpFs
- hsc_llvm_config :: !LlvmConfigCache
- data CoreM a
- type MetaHook (f :: Type -> Type) = MetaRequest -> LHsExpr GhcTc -> f MetaResult
- data MetaResult
- data MetaRequest
- = MetaE (LHsExpr GhcPs -> MetaResult)
- | MetaP (LPat GhcPs -> MetaResult)
- | MetaT (LHsType GhcPs -> MetaResult)
- | MetaD ([LHsDecl GhcPs] -> MetaResult)
- | MetaAW (Serialized -> MetaResult)
- data CoreToDo
- = CoreDoSimplify !SimplifyOpts
- | CoreDoPluginPass String CorePluginPass
- | CoreDoFloatInwards
- | CoreDoFloatOutwards FloatOutSwitches
- | CoreLiberateCase
- | CoreDoPrintCore
- | CoreDoStaticArgs
- | CoreDoCallArity
- | CoreDoExitify
- | CoreDoDemand Bool
- | CoreDoCpr
- | CoreDoWorkerWrapper
- | CoreDoSpecialising
- | CoreDoSpecConstr
- | CoreCSE
- | CoreDoRuleCheck CompilerPhase String
- | CoreDoNothing
- | CoreDoPasses [CoreToDo]
- | CoreDesugar
- | CoreDesugarOpt
- | CoreTidy
- | CorePrep
- | CoreAddCallerCcs
- | CoreAddLateCcs
- type CorePluginPass = ModGuts -> CoreM ModGuts
- type DefaultingPlugin = [CommandLineOption] -> Maybe DefaultingPlugin
- type TcPlugin = [CommandLineOption] -> Maybe TcPlugin
- data HoleFitPluginR = HoleFitPluginR {
- hfPluginInit :: TcM (TcRef s)
- hfPluginRun :: TcRef s -> HoleFitPlugin
- hfPluginStop :: TcRef s -> TcM ()
- type FitPlugin = TypedHole -> [HoleFit] -> TcM [HoleFit]
- type CandPlugin = TypedHole -> [HoleFitCandidate] -> TcM [HoleFitCandidate]
- data TypedHole = TypedHole {}
- type FrontendPluginAction = [String] -> [(String, Maybe Phase)] -> Ghc ()
- type CorePlugin = [CommandLineOption] -> [CoreToDo] -> CoreM [CoreToDo]
- data PluginRecompile
- data ExternalPlugin = ExternalPlugin {}
- data PluginWithArgs = PluginWithArgs {}
- data ParsedResult = ParsedResult {}
- data PsMessages = PsMessages {}
- type CommandLineOption = String
- data TcRnExprMode
- data CgInteractiveGuts
- type Messager = HscEnv -> (Int, Int) -> RecompileRequired -> ModuleGraphNode -> IO ()
- data Serialized = Serialized TypeRep [Word8]
- pattern ManyTy :: Mult
- pattern OneTy :: Mult
- try :: Exception e => IO a -> IO (Either e a)
- count :: (a -> Bool) -> [a] -> Int
- rational :: Rational -> SDoc
- double :: IsLine doc => Double -> doc
- space :: IsLine doc => doc
- lengthAtLeast :: [a] -> Int -> Bool
- throwTo :: Exception e => ThreadId -> e -> IO ()
- liftIO :: MonadIO m => IO a -> m a
- srcLocFile :: RealSrcLoc -> FastString
- foldl1' :: HasCallStack => (a -> a -> a) -> [a] -> a
- appPrec :: PprPrec
- infinity :: IntWithInf
- applyWhen :: Bool -> (a -> a) -> a -> a
- parens :: IsLine doc => doc -> doc
- fingerprintString :: String -> Fingerprint
- fingerprintFingerprints :: [Fingerprint] -> Fingerprint
- funResultTy :: HasDebugCallStack => Type -> Type
- mkFunTy :: HasDebugCallStack => FunTyFlag -> Mult -> Type -> Type -> Type
- splitTyConApp :: Type -> (TyCon, [Type])
- singleton :: a -> [a]
- fingerprint0 :: Fingerprint
- fingerprintData :: Ptr Word8 -> Int -> IO Fingerprint
- getFileHash :: FilePath -> IO Fingerprint
- sortWith :: Ord b => (a -> b) -> [a] -> [a]
- isAlgType :: Type -> Bool
- mkNoRepType :: String -> DataType
- spanEnd :: (a -> Bool) -> [a] -> ([a], [a])
- readRational :: String -> Rational
- isEmpty :: SDocContext -> SDoc -> Bool
- split :: Char -> String -> [String]
- compareLength :: [a] -> [b] -> Ordering
- word :: Integer -> SDoc
- unzipWith :: (a -> b -> c) -> [(a, b)] -> [c]
- pprWithUnitState :: UnitState -> SDoc -> SDoc
- mkTyConTy :: TyCon -> Type
- mkCoreApps :: CoreExpr -> [CoreExpr] -> CoreExpr
- mkCoreConApps :: DataCon -> [CoreExpr] -> CoreExpr
- mkIntExpr :: Platform -> Integer -> CoreExpr
- mkWordExpr :: Platform -> Integer -> CoreExpr
- mkCharExpr :: Char -> CoreExpr
- mkStringExpr :: MonadThings m => String -> m CoreExpr
- mkFloatExpr :: Float -> CoreExpr
- mkDoubleExpr :: Double -> CoreExpr
- mkCoreLams :: [CoreBndr] -> CoreExpr -> CoreExpr
- mkCoreLets :: [CoreBind] -> CoreExpr -> CoreExpr
- mkCoreLet :: CoreBind -> CoreExpr -> CoreExpr
- typeLevity_maybe :: HasDebugCallStack => Type -> Maybe Levity
- expandTypeSynonyms :: Type -> Type
- dropList :: [b] -> [a] -> [a]
- panic :: HasCallStack => String -> a
- sorry :: HasCallStack => String -> a
- pgmError :: HasCallStack => String -> a
- cmdLineError :: String -> a
- cmdLineErrorIO :: String -> IO a
- assertPanic :: String -> Int -> a
- nTimes :: Int -> (a -> a) -> a -> a
- const2 :: a -> b -> c -> a
- fstOf3 :: (a, b, c) -> a
- sndOf3 :: (a, b, c) -> b
- thdOf3 :: (a, b, c) -> c
- fst3 :: (a -> d) -> (a, b, c) -> (d, b, c)
- snd3 :: (b -> d) -> (a, b, c) -> (a, d, c)
- third3 :: (c -> d) -> (a, b, c) -> (a, b, d)
- uncurry3 :: (a -> b -> c -> d) -> (a, b, c) -> d
- filterOut :: (a -> Bool) -> [a] -> [a]
- partitionWith :: (a -> Either b c) -> [a] -> ([b], [c])
- chkAppend :: [a] -> [a] -> [a]
- zipEqual :: HasDebugCallStack => String -> [a] -> [b] -> [(a, b)]
- zipWithEqual :: HasDebugCallStack => String -> (a -> b -> c) -> [a] -> [b] -> [c]
- zipWith3Equal :: HasDebugCallStack => String -> (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d]
- zipWith4Equal :: HasDebugCallStack => String -> (a -> b -> c -> d -> e) -> [a] -> [b] -> [c] -> [d] -> [e]
- filterByList :: [Bool] -> [a] -> [a]
- filterByLists :: [Bool] -> [a] -> [a] -> [a]
- partitionByList :: [Bool] -> [a] -> ([a], [a])
- stretchZipWith :: (a -> Bool) -> b -> (a -> b -> c) -> [a] -> [b] -> [c]
- mapFst :: Functor f => (a -> c) -> f (a, b) -> f (c, b)
- mapSnd :: Functor f => (b -> c) -> f (a, b) -> f (a, c)
- mapAndUnzip :: (a -> (b, c)) -> [a] -> ([b], [c])
- mapAndUnzip3 :: (a -> (b, c, d)) -> [a] -> ([b], [c], [d])
- zipWithAndUnzip :: (a -> b -> (c, d)) -> [a] -> [b] -> ([c], [d])
- zipAndUnzip :: [a] -> [b] -> ([a], [b])
- atLength :: ([a] -> b) -> b -> [a] -> Int -> b
- lengthExceeds :: [a] -> Int -> Bool
- lengthIs :: [a] -> Int -> Bool
- lengthIsNot :: [a] -> Int -> Bool
- lengthAtMost :: [a] -> Int -> Bool
- lengthLessThan :: [a] -> Int -> Bool
- listLengthCmp :: [a] -> Int -> Ordering
- equalLength :: [a] -> [b] -> Bool
- leLength :: [a] -> [b] -> Bool
- ltLength :: [a] -> [b] -> Bool
- isSingleton :: [a] -> Bool
- notNull :: Foldable f => f a -> Bool
- only :: [a] -> a
- expectOnly :: HasCallStack => String -> [a] -> a
- chunkList :: Int -> [a] -> [[a]]
- holes :: [a] -> [(a, [a])]
- changeLast :: [a] -> a -> [a]
- mapLastM :: Functor f => (a -> f a) -> NonEmpty a -> f (NonEmpty a)
- whenNonEmpty :: Applicative m => [a] -> (NonEmpty a -> m ()) -> m ()
- mergeListsBy :: (a -> a -> Ordering) -> [[a]] -> [a]
- isSortedBy :: (a -> a -> Ordering) -> [a] -> Bool
- minWith :: Ord b => (a -> b) -> [a] -> a
- nubSort :: Ord a => [a] -> [a]
- ordNub :: Ord a => [a] -> [a]
- ordNubOn :: Ord b => (a -> b) -> [a] -> [a]
- transitiveClosure :: (a -> [a]) -> (a -> a -> Bool) -> [a] -> [a]
- foldl2 :: (acc -> a -> b -> acc) -> acc -> [a] -> [b] -> acc
- all2 :: (a -> b -> Bool) -> [a] -> [b] -> Bool
- countWhile :: (a -> Bool) -> [a] -> Int
- takeList :: [b] -> [a] -> [a]
- splitAtList :: [b] -> [a] -> ([a], [a])
- dropTail :: Int -> [a] -> [a]
- dropWhileEndLE :: (a -> Bool) -> [a] -> [a]
- last2 :: [a] -> Maybe (a, a)
- lastMaybe :: [a] -> Maybe a
- onJust :: b -> Maybe a -> (a -> b) -> b
- snocView :: [a] -> Maybe ([a], a)
- capitalise :: String -> String
- isEqual :: Ordering -> Bool
- removeSpaces :: String -> String
- (<&&>) :: Applicative f => f Bool -> f Bool -> f Bool
- (<||>) :: Applicative f => f Bool -> f Bool -> f Bool
- fuzzyMatch :: String -> [String] -> [String]
- fuzzyLookup :: String -> [(String, a)] -> [a]
- seqList :: [a] -> b -> b
- strictMap :: (a -> b) -> [a] -> [b]
- strictZipWith :: (a -> b -> c) -> [a] -> [b] -> [c]
- strictZipWith3 :: (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d]
- looksLikeModuleName :: String -> Bool
- looksLikePackageName :: String -> Bool
- exactLog2 :: Integer -> Maybe Integer
- readSignificandExponentPair :: String -> (Integer, Integer)
- readHexRational :: String -> Rational
- readHexSignificandExponentPair :: String -> (Integer, Integer)
- doesDirNameExist :: FilePath -> IO Bool
- getModificationUTCTime :: FilePath -> IO UTCTime
- modificationTimeIfExists :: FilePath -> IO (Maybe UTCTime)
- fileHashIfExists :: FilePath -> IO (Maybe Fingerprint)
- withAtomicRename :: MonadIO m => FilePath -> (FilePath -> m a) -> m a
- splitLongestPrefix :: String -> (Char -> Bool) -> (String, String)
- escapeSpaces :: String -> String
- reslash :: Direction -> FilePath -> FilePath
- makeRelativeTo :: FilePath -> FilePath -> FilePath
- abstractConstr :: String -> Constr
- abstractDataType :: String -> DataType
- charToC :: Word8 -> String
- hashString :: String -> Int32
- mapMaybe' :: Foldable f => (a -> Maybe b) -> f a -> [b]
- bytesFS :: FastString -> ByteString
- fastStringToByteString :: FastString -> ByteString
- fastStringToShortByteString :: FastString -> ShortByteString
- fastZStringToByteString :: FastZString -> ByteString
- unsafeMkByteString :: String -> ByteString
- hPutFZS :: Handle -> FastZString -> IO ()
- zString :: FastZString -> String
- zStringTakeN :: Int -> FastZString -> String
- lengthFZS :: FastZString -> Int
- lexicalCompareFS :: FastString -> FastString -> Ordering
- uniqCompareFS :: FastString -> FastString -> Ordering
- mkFastString# :: Addr# -> FastString
- mkFastStringBytes :: Ptr Word8 -> Int -> FastString
- mkFastStringByteString :: ByteString -> FastString
- mkFastStringShortByteString :: ShortByteString -> FastString
- mkFastString :: String -> FastString
- mkFastStringByteList :: [Word8] -> FastString
- lengthFS :: FastString -> Int
- nullFS :: FastString -> Bool
- unpackFS :: FastString -> String
- zEncodeFS :: FastString -> FastZString
- appendFS :: FastString -> FastString -> FastString
- concatFS :: [FastString] -> FastString
- consFS :: Char -> FastString -> FastString
- unconsFS :: FastString -> Maybe (Char, FastString)
- uniqueOfFS :: FastString -> Int
- nilFS :: FastString
- getFastStringTable :: IO [[[FastString]]]
- getFastStringZEncCounter :: IO Int
- hPutFS :: Handle -> FastString -> IO ()
- mkPtrString# :: Addr# -> PtrString
- unpackPtrString :: PtrString -> String
- unpackPtrStringTakeN :: Int -> PtrString -> String
- lengthPS :: PtrString -> Int
- fsLit :: String -> FastString
- ptext :: PtrString -> SDoc
- semi :: IsLine doc => doc
- comma :: IsLine doc => doc
- colon :: 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
- int :: IsLine doc => Int -> doc
- integer :: IsLine doc => Integer -> doc
- float :: IsLine doc => Float -> doc
- quotes :: SDoc -> SDoc
- quote :: 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
- isBoxed :: Boxity -> Bool
- noExtField :: NoExtField
- dataConCantHappen :: DataConCantHappen -> a
- stableModuleNameCmp :: ModuleName -> ModuleName -> Ordering
- moduleNameFS :: ModuleName -> FastString
- moduleNameString :: ModuleName -> String
- mkModuleName :: String -> ModuleName
- mkModuleNameFS :: FastString -> ModuleName
- moduleNameSlashes :: ModuleName -> String
- moduleNameColons :: ModuleName -> String
- parseModuleName :: ReadP ModuleName
- mkVarOccFS :: FastString -> OccName
- mkRecFldSelOcc :: 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 ()
- showException :: Exception e => e -> String
- safeShowException :: Exception e => e -> IO String
- showGhcExceptionUnsafe :: GhcException -> ShowS
- showGhcException :: SDocContext -> GhcException -> ShowS
- throwGhcException :: GhcException -> a
- throwGhcExceptionIO :: GhcException -> IO a
- handleGhcException :: ExceptionMonad m => (GhcException -> m a) -> m a -> m a
- pprPanic :: HasCallStack => String -> SDoc -> a
- panicDoc :: String -> SDoc -> a
- sorryDoc :: String -> SDoc -> a
- pgmErrorDoc :: String -> SDoc -> a
- tryMost :: IO a -> IO (Either SomeException a)
- withSignalHandlers :: ExceptionMonad m => m a -> m a
- callStackDoc :: HasCallStack => SDoc
- prettyCallStackDoc :: CallStack -> SDoc
- assertPprPanic :: HasCallStack => SDoc -> a
- assertPpr :: HasCallStack => Bool -> SDoc -> a -> a
- assertPprMaybe :: HasCallStack => Maybe SDoc -> a -> a
- massertPpr :: (HasCallStack, Applicative m) => Bool -> SDoc -> m ()
- assertPprM :: (HasCallStack, Monad m) => m Bool -> SDoc -> m ()
- pprIdDetails :: IdDetails -> SDoc
- isCoVarDetails :: IdDetails -> Bool
- coVarDetails :: IdDetails
- vanillaIdInfo :: IdInfo
- emptyPlugins :: Plugins
- tidyNameOcc :: Name -> OccName -> Name
- nameOccName :: Name -> OccName
- setNameUnique :: Name -> Unique -> Name
- nameUnique :: Name -> Unique
- idName :: Id -> Name
- mkPrelTyConRepName :: Name -> TyConRepName
- tyConRepName_maybe :: TyCon -> Maybe TyConRepName
- isUnboxedTupleTyCon :: TyCon -> Bool
- isTupleTyCon :: TyCon -> Bool
- mkForAllTy :: ForAllTyBinder -> Type -> Type
- pprCo :: Coercion -> SDoc
- noFreeVarsOfType :: Type -> Bool
- emptyUFM :: UniqFM key elt
- isNullUFM :: UniqFM key elt -> Bool
- unitUFM :: Uniquable key => key -> elt -> UniqFM key elt
- unitDirectlyUFM :: Unique -> elt -> UniqFM key elt
- zipToUFM :: Uniquable key => [key] -> [elt] -> UniqFM key elt
- listToUFM :: Uniquable key => [(key, elt)] -> UniqFM key elt
- listToUFM_Directly :: [(Unique, elt)] -> UniqFM key elt
- listToIdentityUFM :: Uniquable key => [key] -> UniqFM key key
- listToUFM_C :: Uniquable key => (elt -> elt -> elt) -> [(key, elt)] -> UniqFM key elt
- addToUFM :: Uniquable key => UniqFM key elt -> key -> elt -> UniqFM key elt
- addListToUFM :: Uniquable key => UniqFM key elt -> [(key, elt)] -> UniqFM key elt
- addListToUFM_Directly :: UniqFM key elt -> [(Unique, elt)] -> UniqFM key elt
- addToUFM_Directly :: UniqFM key elt -> Unique -> elt -> UniqFM key elt
- addToUFM_C :: Uniquable key => (elt -> elt -> elt) -> UniqFM key elt -> key -> elt -> UniqFM key elt
- addToUFM_Acc :: Uniquable key => (elt -> elts -> elts) -> (elt -> elts) -> UniqFM key elts -> key -> elt -> UniqFM key elts
- addToUFM_L :: Uniquable key => (key -> elt -> elt -> elt) -> key -> elt -> UniqFM key elt -> (Maybe elt, UniqFM key elt)
- alterUFM :: Uniquable key => (Maybe elt -> Maybe elt) -> UniqFM key elt -> key -> UniqFM key elt
- addListToUFM_C :: Uniquable key => (elt -> elt -> elt) -> UniqFM key elt -> [(key, elt)] -> UniqFM key elt
- adjustUFM :: Uniquable key => (elt -> elt) -> UniqFM key elt -> key -> UniqFM key elt
- adjustUFM_Directly :: (elt -> elt) -> UniqFM key elt -> Unique -> UniqFM key elt
- delFromUFM :: Uniquable key => UniqFM key elt -> key -> UniqFM key elt
- delListFromUFM :: Uniquable key => UniqFM key elt -> [key] -> UniqFM key elt
- delListFromUFM_Directly :: UniqFM key elt -> [Unique] -> UniqFM key elt
- delFromUFM_Directly :: UniqFM key elt -> Unique -> UniqFM key elt
- plusUFM :: UniqFM key elt -> UniqFM key elt -> UniqFM key elt
- plusUFM_C :: (elt -> elt -> elt) -> UniqFM key elt -> UniqFM key elt -> UniqFM key elt
- plusUFM_CD :: (elta -> eltb -> eltc) -> UniqFM key elta -> elta -> UniqFM key eltb -> eltb -> UniqFM key eltc
- plusUFM_CD2 :: (Maybe elta -> Maybe eltb -> eltc) -> UniqFM key elta -> UniqFM key eltb -> UniqFM key eltc
- mergeUFM :: (elta -> eltb -> Maybe eltc) -> (UniqFM key elta -> UniqFM key eltc) -> (UniqFM key eltb -> UniqFM key eltc) -> UniqFM key elta -> UniqFM key eltb -> UniqFM key eltc
- plusMaybeUFM_C :: (elt -> elt -> Maybe elt) -> UniqFM key elt -> UniqFM key elt -> UniqFM key elt
- plusUFMList :: [UniqFM key elt] -> UniqFM key elt
- sequenceUFMList :: [UniqFM key elt] -> UniqFM key [elt]
- minusUFM :: UniqFM key elt1 -> UniqFM key elt2 -> UniqFM key elt1
- minusUFM_C :: (elt1 -> elt2 -> Maybe elt1) -> UniqFM key elt1 -> UniqFM key elt2 -> UniqFM key elt1
- intersectUFM :: UniqFM key elt1 -> UniqFM key elt2 -> UniqFM key elt1
- intersectUFM_C :: (elt1 -> elt2 -> elt3) -> UniqFM key elt1 -> UniqFM key elt2 -> UniqFM key elt3
- disjointUFM :: UniqFM key elt1 -> UniqFM key elt2 -> Bool
- foldUFM :: (elt -> a -> a) -> a -> UniqFM key elt -> a
- mapUFM :: (elt1 -> elt2) -> UniqFM key elt1 -> UniqFM key elt2
- mapMaybeUFM :: (elt1 -> Maybe elt2) -> UniqFM key elt1 -> UniqFM key elt2
- mapUFM_Directly :: (Unique -> elt1 -> elt2) -> UniqFM key elt1 -> UniqFM key elt2
- filterUFM :: (elt -> Bool) -> UniqFM key elt -> UniqFM key elt
- filterUFM_Directly :: (Unique -> elt -> Bool) -> UniqFM key elt -> UniqFM key elt
- partitionUFM :: (elt -> Bool) -> UniqFM key elt -> (UniqFM key elt, UniqFM key elt)
- sizeUFM :: UniqFM key elt -> Int
- elemUFM :: Uniquable key => key -> UniqFM key elt -> Bool
- elemUFM_Directly :: Unique -> UniqFM key elt -> Bool
- lookupUFM :: Uniquable key => UniqFM key elt -> key -> Maybe elt
- lookupUFM_Directly :: UniqFM key elt -> Unique -> Maybe elt
- lookupWithDefaultUFM :: Uniquable key => UniqFM key elt -> elt -> key -> elt
- lookupWithDefaultUFM_Directly :: UniqFM key elt -> elt -> Unique -> elt
- ufmToSet_Directly :: UniqFM key elt -> IntSet
- anyUFM :: (elt -> Bool) -> UniqFM key elt -> Bool
- allUFM :: (elt -> Bool) -> UniqFM key elt -> Bool
- seqEltsUFM :: (elt -> ()) -> UniqFM key elt -> ()
- nonDetEltsUFM :: UniqFM key elt -> [elt]
- nonDetKeysUFM :: UniqFM key elt -> [Unique]
- nonDetStrictFoldUFM :: (elt -> a -> a) -> a -> UniqFM key elt -> a
- nonDetStrictFoldUFM_DirectlyM :: Monad m => (Unique -> b -> elt -> m b) -> b -> UniqFM key elt -> m b
- nonDetStrictFoldUFM_Directly :: (Unique -> elt -> a -> a) -> a -> UniqFM key elt -> a
- nonDetUFMToList :: UniqFM key elt -> [(Unique, elt)]
- ufmToIntMap :: UniqFM key elt -> IntMap elt
- unsafeIntMapToUFM :: IntMap elt -> UniqFM key elt
- unsafeCastUFMKey :: UniqFM key1 elt -> UniqFM key2 elt
- equalKeysUFM :: UniqFM key a -> UniqFM key b -> Bool
- pprUniqFM :: (a -> SDoc) -> UniqFM key a -> SDoc
- pprUFM :: UniqFM key a -> ([a] -> SDoc) -> SDoc
- pprUFMWithKeys :: UniqFM key a -> ([(Unique, a)] -> SDoc) -> SDoc
- pluralUFM :: UniqFM key a -> SDoc
- insertList :: Ord key => [(key, elt)] -> Map key elt -> Map key elt
- insertListWith :: Ord key => (elt -> elt -> elt) -> [(key, elt)] -> Map key elt -> Map key elt
- deleteList :: Ord key => [key] -> Map key elt -> Map key elt
- foldRight :: (elt -> a -> a) -> a -> Map key elt -> a
- foldRightWithKey :: (key -> elt -> a -> a) -> a -> Map key elt -> a
- mkSplitUniqSupply :: Char -> IO UniqSupply
- initUniqSupply :: Word -> Int -> IO ()
- uniqFromMask :: Char -> IO Unique
- splitUniqSupply :: UniqSupply -> (UniqSupply, UniqSupply)
- listSplitUniqSupply :: UniqSupply -> [UniqSupply]
- uniqFromSupply :: UniqSupply -> Unique
- uniqsFromSupply :: UniqSupply -> [Unique]
- takeUniqFromSupply :: UniqSupply -> (Unique, UniqSupply)
- initUs :: UniqSupply -> UniqSM a -> (a, UniqSupply)
- initUs_ :: UniqSupply -> UniqSM a -> a
- showOpt :: Option -> String
- mkSrcLoc :: FastString -> Int -> Int -> SrcLoc
- mkRealSrcLoc :: FastString -> Int -> Int -> RealSrcLoc
- leftmostColumn :: Int
- getBufPos :: SrcLoc -> Maybe BufPos
- noSrcLoc :: SrcLoc
- generatedSrcLoc :: SrcLoc
- interactiveSrcLoc :: SrcLoc
- mkGeneralSrcLoc :: FastString -> SrcLoc
- srcLocLine :: RealSrcLoc -> Int
- srcLocCol :: RealSrcLoc -> Int
- advanceSrcLoc :: RealSrcLoc -> Char -> RealSrcLoc
- advanceBufPos :: BufPos -> BufPos
- sortLocated :: [Located a] -> [Located a]
- sortRealLocated :: [RealLocated a] -> [RealLocated a]
- lookupSrcLoc :: SrcLoc -> Map RealSrcLoc a -> Maybe a
- lookupSrcSpan :: SrcSpan -> Map RealSrcSpan a -> Maybe a
- removeBufSpan :: SrcSpan -> SrcSpan
- getBufSpan :: SrcSpan -> Maybe BufSpan
- noSrcSpan :: SrcSpan
- wiredInSrcSpan :: SrcSpan
- interactiveSrcSpan :: SrcSpan
- generatedSrcSpan :: SrcSpan
- isGeneratedSrcSpan :: SrcSpan -> Bool
- isNoSrcSpan :: SrcSpan -> Bool
- mkGeneralSrcSpan :: FastString -> SrcSpan
- srcLocSpan :: SrcLoc -> SrcSpan
- realSrcLocSpan :: RealSrcLoc -> RealSrcSpan
- mkRealSrcSpan :: RealSrcLoc -> RealSrcLoc -> RealSrcSpan
- mkSrcSpan :: SrcLoc -> SrcLoc -> SrcSpan
- combineSrcSpans :: SrcSpan -> SrcSpan -> SrcSpan
- combineRealSrcSpans :: RealSrcSpan -> RealSrcSpan -> RealSrcSpan
- combineBufSpans :: BufSpan -> BufSpan -> BufSpan
- srcSpanFirstCharacter :: SrcSpan -> SrcSpan
- isGoodSrcSpan :: SrcSpan -> Bool
- isOneLineSpan :: SrcSpan -> Bool
- isZeroWidthSpan :: SrcSpan -> Bool
- containsSpan :: RealSrcSpan -> RealSrcSpan -> Bool
- srcSpanStartLine :: RealSrcSpan -> Int
- srcSpanEndLine :: RealSrcSpan -> Int
- srcSpanStartCol :: RealSrcSpan -> Int
- srcSpanEndCol :: RealSrcSpan -> Int
- srcSpanStart :: SrcSpan -> SrcLoc
- srcSpanEnd :: SrcSpan -> SrcLoc
- realSrcSpanStart :: RealSrcSpan -> RealSrcLoc
- realSrcSpanEnd :: RealSrcSpan -> RealSrcLoc
- srcSpanFileName_maybe :: SrcSpan -> Maybe FastString
- srcSpanToRealSrcSpan :: SrcSpan -> Maybe RealSrcSpan
- unhelpfulSpanFS :: UnhelpfulSpanReason -> FastString
- pprUnhelpfulSpanReason :: UnhelpfulSpanReason -> SDoc
- pprUserSpan :: Bool -> SrcSpan -> SDoc
- pprUserRealSpan :: Bool -> RealSrcSpan -> SDoc
- unLoc :: GenLocated l e -> e
- getLoc :: GenLocated l e -> l
- noLoc :: e -> Located e
- mkGeneralLocated :: String -> e -> Located e
- combineLocs :: Located a -> Located b -> SrcSpan
- addCLoc :: Located a -> Located b -> c -> Located c
- eqLocated :: Eq a => GenLocated l a -> GenLocated l a -> Bool
- cmpLocated :: Ord a => GenLocated l a -> GenLocated l a -> Ordering
- cmpBufSpan :: HasDebugCallStack => Located a -> Located a -> Ordering
- pprLocated :: (Outputable l, Outputable e) => GenLocated l e -> SDoc
- pprLocatedAlways :: (Outputable l, Outputable e) => GenLocated l e -> SDoc
- rightmost_smallest :: SrcSpan -> SrcSpan -> Ordering
- leftmost_smallest :: SrcSpan -> SrcSpan -> Ordering
- leftmost_largest :: SrcSpan -> SrcSpan -> Ordering
- spans :: SrcSpan -> (Int, Int) -> Bool
- isSubspanOf :: SrcSpan -> SrcSpan -> Bool
- isRealSubspanOf :: RealSrcSpan -> RealSrcSpan -> Bool
- getRealSrcSpan :: RealLocated a -> RealSrcSpan
- unRealSrcSpan :: RealLocated a -> a
- psLocatedToLocated :: PsLocated a -> Located a
- advancePsLoc :: PsLoc -> Char -> PsLoc
- mkPsSpan :: PsLoc -> PsLoc -> PsSpan
- psSpanStart :: PsSpan -> PsLoc
- psSpanEnd :: PsSpan -> PsLoc
- mkSrcSpanPs :: PsSpan -> SrcSpan
- emptyFsEnv :: FastStringEnv a
- extendFsEnv :: FastStringEnv a -> FastString -> a -> FastStringEnv a
- lookupFsEnv :: FastStringEnv a -> FastString -> Maybe a
- mkFsEnv :: [(FastString, a)] -> FastStringEnv a
- emptyUniqSet :: UniqSet a
- unitUniqSet :: Uniquable a => a -> UniqSet a
- mkUniqSet :: Uniquable a => [a] -> UniqSet a
- addOneToUniqSet :: Uniquable a => UniqSet a -> a -> UniqSet a
- addListToUniqSet :: Uniquable a => UniqSet a -> [a] -> UniqSet a
- delOneFromUniqSet :: Uniquable a => UniqSet a -> a -> UniqSet a
- delOneFromUniqSet_Directly :: UniqSet a -> Unique -> UniqSet a
- delListFromUniqSet :: Uniquable a => UniqSet a -> [a] -> UniqSet a
- delListFromUniqSet_Directly :: UniqSet a -> [Unique] -> UniqSet a
- unionUniqSets :: UniqSet a -> UniqSet a -> UniqSet a
- unionManyUniqSets :: [UniqSet a] -> UniqSet a
- minusUniqSet :: UniqSet a -> UniqSet a -> UniqSet a
- intersectUniqSets :: UniqSet a -> UniqSet a -> UniqSet a
- disjointUniqSets :: UniqSet a -> UniqSet a -> Bool
- restrictUniqSetToUFM :: UniqSet key -> UniqFM key b -> UniqSet key
- uniqSetMinusUFM :: UniqSet key -> UniqFM key b -> UniqSet key
- uniqSetMinusUDFM :: UniqSet key -> UniqDFM key b -> UniqSet key
- elementOfUniqSet :: Uniquable a => a -> UniqSet a -> Bool
- elemUniqSet_Directly :: Unique -> UniqSet a -> Bool
- filterUniqSet :: (a -> Bool) -> UniqSet a -> UniqSet a
- filterUniqSet_Directly :: (Unique -> elt -> Bool) -> UniqSet elt -> UniqSet elt
- partitionUniqSet :: (a -> Bool) -> UniqSet a -> (UniqSet a, UniqSet a)
- uniqSetAny :: (a -> Bool) -> UniqSet a -> Bool
- uniqSetAll :: (a -> Bool) -> UniqSet a -> Bool
- sizeUniqSet :: UniqSet a -> Int
- isEmptyUniqSet :: UniqSet a -> Bool
- lookupUniqSet :: Uniquable key => UniqSet key -> key -> Maybe key
- lookupUniqSet_Directly :: UniqSet a -> Unique -> Maybe a
- nonDetEltsUniqSet :: UniqSet elt -> [elt]
- nonDetKeysUniqSet :: UniqSet elt -> [Unique]
- nonDetStrictFoldUniqSet :: (elt -> a -> a) -> a -> UniqSet elt -> a
- mapUniqSet :: Uniquable b => (a -> b) -> UniqSet a -> UniqSet b
- getUniqSet :: UniqSet a -> UniqFM a a
- unsafeUFMToUniqSet :: UniqFM a a -> UniqSet a
- pprUniqSet :: (a -> SDoc) -> UniqSet a -> SDoc
- pprWithSourceText :: SourceText -> SDoc -> SDoc
- mkIntegralLit :: Integral a => a -> IntegralLit
- negateIntegralLit :: IntegralLit -> IntegralLit
- mkFractionalLit :: SourceText -> Bool -> Rational -> Integer -> FractionalExponentBase -> FractionalLit
- fractionalLitFromRational :: Rational -> FractionalLit
- rationalFromFractionalLit :: FractionalLit -> Rational
- mkTHFractionalLit :: Rational -> FractionalLit
- negateFractionalLit :: FractionalLit -> FractionalLit
- integralFractionalLit :: Bool -> Integer -> FractionalLit
- mkSourceFractionalLit :: String -> Bool -> Integer -> Integer -> FractionalExponentBase -> FractionalLit
- optimisationFlags :: EnumSet GeneralFlag
- codeGenFlags :: EnumSet GeneralFlag
- moduleUnitId :: Module -> UnitId
- mkModule :: u -> ModuleName -> GenModule u
- pprModule :: IsLine doc => Module -> doc
- pprInstantiatedModule :: InstantiatedModule -> SDoc
- isHoleUnit :: GenUnit u -> Bool
- stableUnitCmp :: Unit -> Unit -> Ordering
- pprUnit :: IsLine doc => Unit -> doc
- unitFreeModuleHoles :: GenUnit u -> UniqDSet ModuleName
- moduleFreeHoles :: GenModule (GenUnit u) -> UniqDSet ModuleName
- mkInstantiatedUnit :: IsUnitId u => u -> GenInstantiations u -> GenInstantiatedUnit u
- mkVirtUnit :: IsUnitId u => u -> [(ModuleName, GenModule (GenUnit u))] -> GenUnit u
- mkInstantiatedUnitHash :: IsUnitId u => u -> [(ModuleName, GenModule (GenUnit u))] -> FastString
- fsToUnit :: FastString -> Unit
- unitString :: IsUnitId u => u -> String
- stringToUnit :: String -> Unit
- mapGenUnit :: IsUnitId v => (u -> v) -> GenUnit u -> GenUnit v
- mapInstantiations :: IsUnitId v => (u -> v) -> GenInstantiations u -> GenInstantiations v
- toUnitId :: Unit -> UnitId
- virtualUnitId :: InstantiatedUnit -> UnitId
- unitIsDefinite :: Unit -> Bool
- unitIdString :: UnitId -> String
- stringToUnitId :: String -> UnitId
- primUnitId :: UnitId
- bignumUnitId :: UnitId
- baseUnitId :: UnitId
- rtsUnitId :: UnitId
- thisGhcUnitId :: UnitId
- interactiveUnitId :: UnitId
- thUnitId :: UnitId
- thUnit :: Unit
- primUnit :: Unit
- bignumUnit :: Unit
- baseUnit :: Unit
- rtsUnit :: Unit
- thisGhcUnit :: Unit
- interactiveUnit :: Unit
- mainUnitId :: UnitId
- mainUnit :: Unit
- isInteractiveModule :: Module -> Bool
- wiredInUnitIds :: [UnitId]
- addBootSuffix :: FilePath -> FilePath
- removeBootSuffix :: FilePath -> FilePath
- addBootSuffix_maybe :: IsBootInterface -> FilePath -> FilePath
- addBootSuffixLocn_maybe :: IsBootInterface -> ModLocation -> ModLocation
- addBootSuffixLocn :: ModLocation -> ModLocation
- addBootSuffixLocnOut :: ModLocation -> ModLocation
- filterModuleEnv :: (Module -> a -> Bool) -> ModuleEnv a -> ModuleEnv a
- mapMaybeModuleEnv :: (Module -> a -> Maybe b) -> ModuleEnv a -> ModuleEnv b
- elemModuleEnv :: Module -> ModuleEnv a -> Bool
- extendModuleEnv :: ModuleEnv a -> Module -> a -> ModuleEnv a
- extendModuleEnvWith :: (a -> a -> a) -> ModuleEnv a -> Module -> a -> ModuleEnv a
- extendModuleEnvList :: ModuleEnv a -> [(Module, a)] -> ModuleEnv a
- extendModuleEnvList_C :: (a -> a -> a) -> ModuleEnv a -> [(Module, a)] -> ModuleEnv a
- plusModuleEnv_C :: (a -> a -> a) -> ModuleEnv a -> ModuleEnv a -> ModuleEnv a
- delModuleEnvList :: ModuleEnv a -> [Module] -> ModuleEnv a
- delModuleEnv :: ModuleEnv a -> Module -> ModuleEnv a
- plusModuleEnv :: ModuleEnv a -> ModuleEnv a -> ModuleEnv a
- lookupModuleEnv :: ModuleEnv a -> Module -> Maybe a
- lookupWithDefaultModuleEnv :: ModuleEnv a -> a -> Module -> a
- mapModuleEnv :: (a -> b) -> ModuleEnv a -> ModuleEnv b
- partitionModuleEnv :: (a -> Bool) -> ModuleEnv a -> (ModuleEnv a, ModuleEnv a)
- mkModuleEnv :: [(Module, a)] -> ModuleEnv a
- emptyModuleEnv :: ModuleEnv a
- moduleEnvKeys :: ModuleEnv a -> [Module]
- moduleEnvElts :: ModuleEnv a -> [a]
- moduleEnvToList :: ModuleEnv a -> [(Module, a)]
- unitModuleEnv :: Module -> a -> ModuleEnv a
- isEmptyModuleEnv :: ModuleEnv a -> Bool
- mkModuleSet :: [Module] -> ModuleSet
- extendModuleSet :: ModuleSet -> Module -> ModuleSet
- extendModuleSetList :: ModuleSet -> [Module] -> ModuleSet
- emptyModuleSet :: ModuleSet
- isEmptyModuleSet :: ModuleSet -> Bool
- moduleSetElts :: ModuleSet -> [Module]
- elemModuleSet :: Module -> ModuleSet -> Bool
- intersectModuleSet :: ModuleSet -> ModuleSet -> ModuleSet
- minusModuleSet :: ModuleSet -> ModuleSet -> ModuleSet
- delModuleSet :: ModuleSet -> Module -> ModuleSet
- unionModuleSet :: ModuleSet -> ModuleSet -> ModuleSet
- unionManyModuleSets :: [ModuleSet] -> ModuleSet
- unitModuleSet :: Module -> ModuleSet
- emptyInstalledModuleEnv :: InstalledModuleEnv a
- lookupInstalledModuleEnv :: InstalledModuleEnv a -> InstalledModule -> Maybe a
- extendInstalledModuleEnv :: InstalledModuleEnv a -> InstalledModule -> a -> InstalledModuleEnv a
- filterInstalledModuleEnv :: (InstalledModule -> a -> Bool) -> InstalledModuleEnv a -> InstalledModuleEnv a
- delInstalledModuleEnv :: InstalledModuleEnv a -> InstalledModule -> InstalledModuleEnv a
- installedModuleEnvElts :: InstalledModuleEnv a -> [(InstalledModule, a)]
- mergeInstalledModuleEnv :: (elta -> eltb -> Maybe eltc) -> (InstalledModuleEnv elta -> InstalledModuleEnv eltc) -> (InstalledModuleEnv eltb -> InstalledModuleEnv eltc) -> InstalledModuleEnv elta -> InstalledModuleEnv eltb -> InstalledModuleEnv eltc
- plusInstalledModuleEnv :: (elt -> elt -> elt) -> InstalledModuleEnv elt -> InstalledModuleEnv elt -> InstalledModuleEnv elt
- moduleIsDefinite :: Module -> Bool
- moduleStableString :: Module -> String
- stableModuleCmp :: Module -> Module -> Ordering
- installedModuleEq :: InstalledModule -> Module -> Bool
- getModuleInstantiation :: Module -> (InstalledModule, Maybe InstantiatedModule)
- getUnitInstantiations :: Unit -> (UnitId, Maybe InstantiatedUnit)
- uninstantiateInstantiatedUnit :: InstantiatedUnit -> InstantiatedUnit
- uninstantiateInstantiatedModule :: InstantiatedModule -> InstantiatedModule
- isHoleModule :: GenModule (GenUnit u) -> Bool
- mkHoleModule :: ModuleName -> GenModule (GenUnit u)
- homeUnitId :: GenHomeUnit u -> UnitId
- homeUnitInstantiations :: GenHomeUnit u -> GenInstantiations u
- homeUnitInstanceOf :: HomeUnit -> UnitId
- homeUnitInstanceOfMaybe :: GenHomeUnit u -> Maybe u
- homeUnitAsUnit :: HomeUnit -> Unit
- homeUnitMap :: IsUnitId v => (u -> v) -> GenHomeUnit u -> GenHomeUnit v
- isHomeUnitIndefinite :: GenHomeUnit u -> Bool
- isHomeUnitDefinite :: GenHomeUnit u -> Bool
- isHomeUnitInstantiating :: GenHomeUnit u -> Bool
- isHomeUnit :: HomeUnit -> Unit -> Bool
- isHomeUnitId :: GenHomeUnit u -> UnitId -> Bool
- notHomeUnitId :: Maybe (GenHomeUnit u) -> UnitId -> Bool
- isHomeUnitInstanceOf :: HomeUnit -> UnitId -> Bool
- isHomeModule :: HomeUnit -> Module -> Bool
- isHomeInstalledModule :: GenHomeUnit u -> InstalledModule -> Bool
- notHomeInstalledModule :: GenHomeUnit u -> InstalledModule -> Bool
- notHomeInstalledModuleMaybe :: Maybe (GenHomeUnit u) -> InstalledModule -> Bool
- notHomeModule :: HomeUnit -> Module -> Bool
- notHomeModuleMaybe :: Maybe HomeUnit -> Module -> Bool
- mkHomeModule :: HomeUnit -> ModuleName -> Module
- mkHomeInstalledModule :: GenHomeUnit u -> ModuleName -> InstalledModule
- homeModuleNameInstantiation :: HomeUnit -> ModuleName -> Module
- homeModuleInstantiation :: Maybe HomeUnit -> Module -> Module
- isPromoted :: PromotionFlag -> Bool
- pickLR :: LeftOrRight -> (a, a) -> a
- fIRST_TAG :: ConTag
- mkAlignment :: Int -> Alignment
- alignmentOf :: Int -> Alignment
- noOneShotInfo :: OneShotInfo
- isOneShotInfo :: OneShotInfo -> Bool
- hasNoOneShotInfo :: OneShotInfo -> Bool
- worstOneShot :: OneShotInfo -> OneShotInfo -> OneShotInfo
- bestOneShot :: OneShotInfo -> OneShotInfo -> OneShotInfo
- flipSwap :: SwapFlag -> SwapFlag
- isSwapped :: SwapFlag -> Bool
- unSwap :: SwapFlag -> (a -> a -> b) -> a -> a -> b
- pprRuleName :: RuleName -> SDoc
- isNotTopLevel :: TopLevelFlag -> Bool
- isTopLevel :: TopLevelFlag -> Bool
- isMarkedCbv :: CbvMark -> Bool
- isRec :: RecFlag -> Bool
- isNonRec :: RecFlag -> Bool
- boolToRecFlag :: Bool -> RecFlag
- isGenerated :: Origin -> Bool
- setOverlapModeMaybe :: OverlapFlag -> Maybe OverlapMode -> OverlapFlag
- hasIncoherentFlag :: OverlapMode -> Bool
- hasOverlappableFlag :: OverlapMode -> Bool
- hasOverlappingFlag :: OverlapMode -> Bool
- topPrec :: PprPrec
- sigPrec :: PprPrec
- funPrec :: PprPrec
- opPrec :: PprPrec
- starPrec :: PprPrec
- maxPrec :: PprPrec
- maybeParen :: PprPrec -> PprPrec -> SDoc -> SDoc
- tupleSortBoxity :: TupleSort -> Boxity
- boxityTupleSort :: Boxity -> TupleSort
- tupleParens :: TupleSort -> SDoc -> SDoc
- sumParens :: SDoc -> SDoc
- pprAlternative :: (a -> SDoc) -> a -> ConTag -> Arity -> SDoc
- unboxedTupleOrSumExtension :: UnboxedTupleOrSum -> Extension
- oneBranch :: BranchCount
- noOccInfo :: OccInfo
- isNoOccInfo :: OccInfo -> Bool
- isManyOccs :: OccInfo -> Bool
- seqOccInfo :: OccInfo -> ()
- tailCallInfo :: OccInfo -> TailCallInfo
- zapOccTailCallInfo :: OccInfo -> OccInfo
- isAlwaysTailCalled :: OccInfo -> Bool
- strongLoopBreaker :: OccInfo
- weakLoopBreaker :: OccInfo
- isWeakLoopBreaker :: OccInfo -> Bool
- isStrongLoopBreaker :: OccInfo -> Bool
- isDeadOcc :: OccInfo -> Bool
- isOneOcc :: OccInfo -> Bool
- zapFragileOcc :: OccInfo -> OccInfo
- successIf :: Bool -> SuccessFlag
- succeeded :: SuccessFlag -> Bool
- failed :: SuccessFlag -> Bool
- beginPhase :: Activation -> CompilerPhase
- activeAfter :: CompilerPhase -> Activation
- nextPhase :: CompilerPhase -> CompilerPhase
- laterPhase :: CompilerPhase -> CompilerPhase -> CompilerPhase
- activateAfterInitial :: Activation
- activateDuringFinal :: Activation
- isActive :: CompilerPhase -> Activation -> Bool
- activeInFinalPhase :: Activation -> Bool
- isNeverActive :: Activation -> Bool
- isAlwaysActive :: Activation -> Bool
- competesWith :: Activation -> Activation -> Bool
- isConLike :: RuleMatchInfo -> Bool
- isFunLike :: RuleMatchInfo -> Bool
- noUserInlineSpec :: InlineSpec -> Bool
- defaultInlinePragma :: InlinePragma
- alwaysInlinePragma :: InlinePragma
- neverInlinePragma :: InlinePragma
- alwaysInlineConLikePragma :: InlinePragma
- inlinePragmaSpec :: InlinePragma -> InlineSpec
- inlinePragmaSource :: InlinePragma -> SourceText
- inlineSpecSource :: InlineSpec -> SourceText
- dfunInlinePragma :: InlinePragma
- isDefaultInlinePragma :: InlinePragma -> Bool
- isInlinePragma :: InlinePragma -> Bool
- isInlinablePragma :: InlinePragma -> Bool
- isNoInlinePragma :: InlinePragma -> Bool
- isAnyInlinePragma :: InlinePragma -> Bool
- isOpaquePragma :: InlinePragma -> Bool
- inlinePragmaSat :: InlinePragma -> Maybe Arity
- inlinePragmaActivation :: InlinePragma -> Activation
- inlinePragmaRuleMatchInfo :: InlinePragma -> RuleMatchInfo
- setInlinePragmaActivation :: InlinePragma -> Activation -> InlinePragma
- setInlinePragmaRuleMatchInfo :: InlinePragma -> RuleMatchInfo -> InlinePragma
- inlinePragmaName :: InlineSpec -> SDoc
- pprInline :: InlinePragma -> SDoc
- pprInlineDebug :: InlinePragma -> SDoc
- isStableUserSource :: UnfoldingSource -> Bool
- isStableSystemSource :: UnfoldingSource -> Bool
- isCompulsorySource :: UnfoldingSource -> Bool
- isStableSource :: UnfoldingSource -> Bool
- intGtLimit :: Int -> IntWithInf -> Bool
- subWithInf :: IntWithInf -> Int -> IntWithInf
- treatZeroAsInf :: Int -> IntWithInf
- mkIntWithInf :: Int -> IntWithInf
- isTypeLevel :: TypeOrKind -> Bool
- isKindLevel :: TypeOrKind -> Bool
- mightBeLifted :: Maybe Levity -> Bool
- mightBeUnlifted :: Maybe Levity -> Bool
- defaultNonStandardTyVars :: DefaultingStrategy -> Bool
- promoteDataCon :: DataCon -> TyCon
- dataConWrapId :: DataCon -> Id
- isTypeDataCon :: DataCon -> Bool
- isUnboxedSumDataCon :: DataCon -> Bool
- dataConFullSig :: DataCon -> ([TyVar], [TyCoVar], [EqSpec], ThetaType, [Scaled Type], Type)
- dataConStupidTheta :: DataCon -> ThetaType
- dataConInstOrigArgTys :: DataCon -> [Type] -> [Scaled Type]
- dataConFieldLabels :: DataCon -> [FieldLabel]
- dataConSourceArity :: DataCon -> Arity
- dataConUserTyVarBinders :: DataCon -> [InvisTVBinder]
- dataConUserTyVars :: DataCon -> [TyVar]
- dataConExTyCoVars :: DataCon -> [TyCoVar]
- dataConTyCon :: DataCon -> TyCon
- dataConWorkId :: DataCon -> Id
- dataConName :: DataCon -> Name
- sumTyCon :: Arity -> TyCon
- sumDataCon :: ConTag -> Arity -> DataCon
- cTupleSelIdName :: ConTag -> Arity -> Name
- cTupleTyConName :: Arity -> Name
- cTupleDataConName :: Arity -> Name
- cTupleDataCon :: Arity -> DataCon
- tupleTyCon :: Boxity -> Arity -> TyCon
- tupleDataCon :: Boxity -> Arity -> DataCon
- promotedTupleDataCon :: Boxity -> Arity -> TyCon
- integerTy :: Type
- naturalTy :: Type
- tupleDataConName :: Boxity -> Arity -> Name
- tupleTyConName :: TupleSort -> Arity -> Name
- multMulTyCon :: TyCon
- unrestrictedFunTyCon :: TyCon
- manyDataConTyCon :: TyCon
- manyDataConTy :: Type
- oneDataConTyCon :: TyCon
- oneDataConTy :: Type
- multiplicityTy :: Type
- multiplicityTyCon :: TyCon
- unboxedTupleKind :: [Type] -> Kind
- anyTypeOfKind :: Kind -> Type
- int8ElemRepDataConTy :: Type
- int16ElemRepDataConTy :: Type
- int32ElemRepDataConTy :: Type
- int64ElemRepDataConTy :: Type
- word8ElemRepDataConTy :: Type
- word16ElemRepDataConTy :: Type
- word32ElemRepDataConTy :: Type
- word64ElemRepDataConTy :: Type
- floatElemRepDataConTy :: Type
- doubleElemRepDataConTy :: Type
- vec2DataConTy :: Type
- vec4DataConTy :: Type
- vec8DataConTy :: Type
- vec16DataConTy :: Type
- vec32DataConTy :: Type
- vec64DataConTy :: Type
- intRepDataConTy :: RuntimeRepType
- int8RepDataConTy :: RuntimeRepType
- int16RepDataConTy :: RuntimeRepType
- int32RepDataConTy :: RuntimeRepType
- int64RepDataConTy :: RuntimeRepType
- wordRepDataConTy :: RuntimeRepType
- word8RepDataConTy :: RuntimeRepType
- word16RepDataConTy :: RuntimeRepType
- word32RepDataConTy :: RuntimeRepType
- word64RepDataConTy :: RuntimeRepType
- addrRepDataConTy :: RuntimeRepType
- floatRepDataConTy :: RuntimeRepType
- doubleRepDataConTy :: RuntimeRepType
- liftedDataConTy :: Type
- unliftedDataConTy :: Type
- liftedRepTy :: RuntimeRepType
- unliftedRepTy :: RuntimeRepType
- zeroBitRepTy :: RuntimeRepType
- vecRepDataConTyCon :: TyCon
- tupleRepDataConTyCon :: TyCon
- boxedRepDataConTyCon :: TyCon
- liftedDataConTyCon :: TyCon
- runtimeRepTy :: Type
- levityTy :: Type
- runtimeRepTyCon :: TyCon
- levityTyCon :: TyCon
- vecCountTyCon :: TyCon
- vecElemTyCon :: TyCon
- constraintKind :: Kind
- liftedRepTyCon :: TyCon
- unliftedRepTyCon :: TyCon
- liftedTypeKindTyCon :: TyCon
- unliftedTypeKindTyCon :: TyCon
- liftedTypeKind :: Type
- unliftedTypeKind :: Type
- zeroBitTypeKind :: Type
- constraintKindTyConName :: Name
- liftedTypeKindTyConName :: Name
- unitTy :: Type
- coercibleTyCon :: TyCon
- heqTyCon :: TyCon
- mkBoxedTupleTy :: [Type] -> Type
- charTy :: Type
- typeSymbolKind :: Kind
- listTyCon :: TyCon
- tcName :: NameSpace
- clsName :: NameSpace
- tcClsName :: NameSpace
- dataName :: NameSpace
- srcDataName :: NameSpace
- tvName :: NameSpace
- isDataConNameSpace :: NameSpace -> Bool
- isTcClsNameSpace :: NameSpace -> Bool
- isTvNameSpace :: NameSpace -> Bool
- isVarNameSpace :: NameSpace -> Bool
- isValNameSpace :: NameSpace -> Bool
- pprNameSpace :: NameSpace -> SDoc
- pprNonVarNameSpace :: NameSpace -> SDoc
- pprNameSpaceBrief :: IsLine doc => NameSpace -> doc
- pprOccName :: IsLine doc => OccName -> doc
- mkOccName :: NameSpace -> String -> OccName
- mkOccNameFS :: NameSpace -> FastString -> OccName
- mkVarOcc :: String -> OccName
- mkDataOcc :: String -> OccName
- mkDataOccFS :: FastString -> OccName
- mkTyVarOcc :: String -> OccName
- mkTyVarOccFS :: FastString -> OccName
- mkTcOcc :: String -> OccName
- mkTcOccFS :: FastString -> OccName
- mkClsOcc :: String -> OccName
- mkClsOccFS :: FastString -> OccName
- demoteOccName :: OccName -> Maybe OccName
- promoteOccName :: OccName -> Maybe OccName
- emptyOccEnv :: OccEnv a
- unitOccEnv :: OccName -> a -> OccEnv a
- extendOccEnv :: OccEnv a -> OccName -> a -> OccEnv a
- extendOccEnvList :: OccEnv a -> [(OccName, a)] -> OccEnv a
- lookupOccEnv :: OccEnv a -> OccName -> Maybe a
- mkOccEnv :: [(OccName, a)] -> OccEnv a
- elemOccEnv :: OccName -> OccEnv a -> Bool
- foldOccEnv :: (a -> b -> b) -> b -> OccEnv a -> b
- nonDetOccEnvElts :: OccEnv a -> [a]
- plusOccEnv :: OccEnv a -> OccEnv a -> OccEnv a
- plusOccEnv_C :: (a -> a -> a) -> OccEnv a -> OccEnv a -> OccEnv a
- extendOccEnv_C :: (a -> a -> a) -> OccEnv a -> OccName -> a -> OccEnv a
- extendOccEnv_Acc :: (a -> b -> b) -> (a -> b) -> OccEnv b -> OccName -> a -> OccEnv b
- mapOccEnv :: (a -> b) -> OccEnv a -> OccEnv b
- mkOccEnv_C :: (a -> a -> a) -> [(OccName, a)] -> OccEnv a
- delFromOccEnv :: OccEnv a -> OccName -> OccEnv a
- delListFromOccEnv :: OccEnv a -> [OccName] -> OccEnv a
- filterOccEnv :: (elt -> Bool) -> OccEnv elt -> OccEnv elt
- alterOccEnv :: (Maybe elt -> Maybe elt) -> OccEnv elt -> OccName -> OccEnv elt
- minusOccEnv :: OccEnv a -> OccEnv b -> OccEnv a
- minusOccEnv_C :: (a -> b -> Maybe a) -> OccEnv a -> OccEnv b -> OccEnv a
- pprOccEnv :: (a -> SDoc) -> OccEnv a -> SDoc
- emptyOccSet :: OccSet
- unitOccSet :: OccName -> OccSet
- mkOccSet :: [OccName] -> OccSet
- extendOccSet :: OccSet -> OccName -> OccSet
- extendOccSetList :: OccSet -> [OccName] -> OccSet
- unionOccSets :: OccSet -> OccSet -> OccSet
- unionManyOccSets :: [OccSet] -> OccSet
- minusOccSet :: OccSet -> OccSet -> OccSet
- elemOccSet :: OccName -> OccSet -> Bool
- isEmptyOccSet :: OccSet -> Bool
- intersectOccSet :: OccSet -> OccSet -> OccSet
- filterOccSet :: (OccName -> Bool) -> OccSet -> OccSet
- occSetToEnv :: OccSet -> OccEnv OccName
- occNameString :: OccName -> String
- setOccNameSpace :: NameSpace -> OccName -> OccName
- isVarOcc :: OccName -> Bool
- isTvOcc :: OccName -> Bool
- isTcOcc :: OccName -> Bool
- isValOcc :: OccName -> Bool
- isDataOcc :: OccName -> Bool
- isDataSymOcc :: OccName -> Bool
- isSymOcc :: OccName -> Bool
- parenSymOcc :: OccName -> SDoc -> SDoc
- startsWithUnderscore :: OccName -> Bool
- isDerivedOccName :: OccName -> Bool
- isDefaultMethodOcc :: OccName -> Bool
- isTypeableBindOcc :: OccName -> Bool
- mkDataConWrapperOcc :: OccName -> OccName
- mkWorkerOcc :: OccName -> OccName
- mkMatcherOcc :: OccName -> OccName
- mkBuilderOcc :: OccName -> OccName
- mkDefaultMethodOcc :: OccName -> OccName
- mkClassOpAuxOcc :: OccName -> OccName
- mkDictOcc :: OccName -> OccName
- mkIPOcc :: OccName -> OccName
- mkSpecOcc :: OccName -> OccName
- mkForeignExportOcc :: OccName -> OccName
- mkRepEqOcc :: OccName -> OccName
- mkClassDataConOcc :: OccName -> OccName
- mkNewTyCoOcc :: OccName -> OccName
- mkInstTyCoOcc :: OccName -> OccName
- mkEqPredCoOcc :: OccName -> OccName
- mkCon2TagOcc :: OccName -> OccName
- mkTag2ConOcc :: OccName -> OccName
- mkMaxTagOcc :: OccName -> OccName
- mkDataTOcc :: OccName -> OccName
- mkDataCOcc :: OccName -> OccName
- mkTyConRepOcc :: OccName -> OccName
- mkGenR :: OccName -> OccName
- mkGen1R :: OccName -> OccName
- mkDataConWorkerOcc :: OccName -> OccName
- mkSuperDictAuxOcc :: Int -> OccName -> OccName
- mkSuperDictSelOcc :: Int -> OccName -> OccName
- mkLocalOcc :: Unique -> OccName -> OccName
- mkInstTyTcOcc :: String -> OccSet -> OccName
- mkDFunOcc :: String -> Bool -> OccSet -> OccName
- mkMethodOcc :: OccName -> OccName
- emptyTidyOccEnv :: TidyOccEnv
- initTidyOccEnv :: [OccName] -> TidyOccEnv
- delTidyOccEnvList :: TidyOccEnv -> [FastString] -> TidyOccEnv
- avoidClashesOccEnv :: TidyOccEnv -> [OccName] -> TidyOccEnv
- tidyOccName :: TidyOccEnv -> OccName -> (TidyOccEnv, OccName)
- wordAlignment :: Platform -> Alignment
- nameNameSpace :: Name -> NameSpace
- nameSrcLoc :: Name -> SrcLoc
- nameSrcSpan :: Name -> SrcSpan
- isWiredInName :: Name -> Bool
- isWiredIn :: NamedThing thing => thing -> Bool
- wiredInNameTyThing_maybe :: Name -> Maybe TyThing
- isBuiltInSyntax :: Name -> Bool
- isExternalName :: Name -> Bool
- isInternalName :: Name -> Bool
- isHoleName :: Name -> Bool
- isDynLinkName :: Platform -> Module -> Name -> Bool
- nameModule :: HasDebugCallStack => Name -> Module
- nameModule_maybe :: Name -> Maybe Module
- namePun_maybe :: Name -> Maybe FastString
- nameIsLocalOrFrom :: Module -> Name -> Bool
- nameIsExternalOrFrom :: Module -> Name -> Bool
- nameIsHomePackage :: Module -> Name -> Bool
- nameIsHomePackageImport :: Module -> Name -> Bool
- nameIsFromExternalPackage :: HomeUnit -> Name -> Bool
- isTyVarName :: Name -> Bool
- isTyConName :: Name -> Bool
- isDataConName :: Name -> Bool
- isValName :: Name -> Bool
- isVarName :: Name -> Bool
- isSystemName :: Name -> Bool
- mkInternalName :: Unique -> OccName -> SrcSpan -> Name
- mkClonedInternalName :: Unique -> Name -> Name
- mkDerivedInternalName :: (OccName -> OccName) -> Unique -> Name -> Name
- mkExternalName :: Unique -> Module -> OccName -> SrcSpan -> Name
- mkWiredInName :: Module -> OccName -> Unique -> TyThing -> BuiltInSyntax -> Name
- mkSystemName :: Unique -> OccName -> Name
- mkSystemNameAt :: Unique -> OccName -> SrcSpan -> Name
- mkSystemVarName :: Unique -> FastString -> Name
- mkSysTvName :: Unique -> FastString -> Name
- mkFCallName :: Unique -> FastString -> Name
- setNameLoc :: Name -> SrcSpan -> Name
- localiseName :: Name -> Name
- stableNameCmp :: Name -> Name -> Ordering
- pprName :: IsLine doc => Name -> doc
- pprFullName :: Module -> Name -> SDoc
- pprTickyName :: Module -> Name -> SDoc
- pprNameUnqualified :: Name -> SDoc
- pprModulePrefix :: IsLine doc => PprStyle -> Module -> OccName -> doc
- pprDefinedAt :: Name -> SDoc
- pprNameDefnLoc :: Name -> SDoc
- nameStableString :: Name -> String
- getSrcLoc :: NamedThing a => a -> SrcLoc
- getSrcSpan :: NamedThing a => a -> SrcSpan
- getOccString :: NamedThing a => a -> String
- getOccFS :: NamedThing a => a -> FastString
- pprInfixName :: (Outputable a, NamedThing a) => a -> SDoc
- pprPrefixName :: NamedThing a => a -> SDoc
- nonDetCmpVar :: Var -> Var -> Ordering
- varUnique :: Var -> Unique
- varMultMaybe :: Id -> Maybe Mult
- setVarUnique :: Var -> Unique -> Var
- setVarName :: Var -> Name -> Var
- setVarType :: Var -> Type -> Var
- updateVarType :: (Type -> Type) -> Var -> Var
- updateVarTypeM :: Monad m => (Type -> m Type) -> Var -> m Var
- isVisibleForAllTyFlag :: ForAllTyFlag -> Bool
- isInvisibleForAllTyFlag :: ForAllTyFlag -> Bool
- isInferredForAllTyFlag :: ForAllTyFlag -> Bool
- mkFunTyFlag :: TypeOrConstraint -> TypeOrConstraint -> FunTyFlag
- visArg :: TypeOrConstraint -> FunTyFlag
- visArgTypeLike :: FunTyFlag
- visArgConstraintLike :: FunTyFlag
- invisArg :: TypeOrConstraint -> FunTyFlag
- invisArgTypeLike :: FunTyFlag
- invisArgConstraintLike :: FunTyFlag
- isInvisibleFunArg :: FunTyFlag -> Bool
- isVisibleFunArg :: FunTyFlag -> Bool
- isFUNArg :: FunTyFlag -> Bool
- funTyFlagResultTypeOrConstraint :: FunTyFlag -> TypeOrConstraint
- tyVarSpecToBinders :: [VarBndr a Specificity] -> [VarBndr a ForAllTyFlag]
- tyVarSpecToBinder :: VarBndr a Specificity -> VarBndr a ForAllTyFlag
- tyVarReqToBinders :: [VarBndr a ()] -> [VarBndr a ForAllTyFlag]
- tyVarReqToBinder :: VarBndr a () -> VarBndr a ForAllTyFlag
- binderVar :: VarBndr tv argf -> tv
- binderVars :: [VarBndr tv argf] -> [tv]
- binderFlag :: VarBndr tv argf -> argf
- binderFlags :: [VarBndr tv argf] -> [argf]
- binderType :: VarBndr TyCoVar argf -> Type
- isTyVarBinder :: VarBndr TyCoVar vis -> Bool
- mkForAllTyBinder :: vis -> TyCoVar -> VarBndr TyCoVar vis
- mkTyVarBinder :: vis -> TyVar -> VarBndr TyVar vis
- mkForAllTyBinders :: vis -> [TyCoVar] -> [VarBndr TyCoVar vis]
- mkTyVarBinders :: vis -> [TyVar] -> [VarBndr TyVar vis]
- mapVarBndr :: (var -> var') -> VarBndr var flag -> VarBndr var' flag
- mapVarBndrs :: (var -> var') -> [VarBndr var flag] -> [VarBndr var' flag]
- isInvisiblePiTyBinder :: PiTyBinder -> Bool
- isVisiblePiTyBinder :: PiTyBinder -> Bool
- isNamedPiTyBinder :: PiTyBinder -> Bool
- namedPiTyBinder_maybe :: PiTyBinder -> Maybe TyCoVar
- isAnonPiTyBinder :: PiTyBinder -> Bool
- anonPiTyBinderType_maybe :: PiTyBinder -> Maybe Type
- isTyBinder :: PiTyBinder -> Bool
- piTyBinderType :: PiTyBinder -> Type
- tyVarName :: TyVar -> Name
- tyVarKind :: TyVar -> Kind
- setTyVarUnique :: TyVar -> Unique -> TyVar
- setTyVarName :: TyVar -> Name -> TyVar
- setTyVarKind :: TyVar -> Kind -> TyVar
- updateTyVarKind :: (Kind -> Kind) -> TyVar -> TyVar
- updateTyVarKindM :: Monad m => (Kind -> m Kind) -> TyVar -> m TyVar
- mkTyVar :: Name -> Kind -> TyVar
- mkTcTyVar :: Name -> Kind -> TcTyVarDetails -> TyVar
- tcTyVarDetails :: TyVar -> TcTyVarDetails
- setTcTyVarDetails :: TyVar -> TcTyVarDetails -> TyVar
- idInfo :: HasDebugCallStack => Id -> IdInfo
- idDetails :: Id -> IdDetails
- mkGlobalVar :: IdDetails -> Name -> Type -> IdInfo -> Id
- mkLocalVar :: IdDetails -> Name -> Mult -> Type -> IdInfo -> Id
- mkCoVar :: Name -> Type -> CoVar
- mkExportedLocalVar :: IdDetails -> Name -> Type -> IdInfo -> Id
- lazySetIdInfo :: Id -> IdInfo -> Var
- setIdDetails :: Id -> IdDetails -> Id
- globaliseId :: Id -> Id
- setIdExported :: Id -> Id
- setIdNotExported :: Id -> Id
- updateIdTypeButNotMult :: (Type -> Type) -> Id -> Id
- updateIdTypeAndMult :: (Type -> Type) -> Id -> Id
- updateIdTypeAndMultM :: Monad m => (Type -> m Type) -> Id -> m Id
- setIdMult :: Id -> Mult -> Id
- isTyVar :: Var -> Bool
- isTcTyVar :: Var -> Bool
- isTyCoVar :: Var -> Bool
- isId :: Var -> Bool
- isCoVar :: Var -> Bool
- isNonCoVarId :: Var -> Bool
- isLocalId :: Var -> Bool
- isLocalVar :: Var -> Bool
- isGlobalId :: Var -> Bool
- mustHaveLocalBinding :: Var -> Bool
- isExportedId :: Var -> Bool
- chooseFunTyFlag :: HasDebugCallStack => Type -> Type -> FunTyFlag
- partitionInvisibleTypes :: TyCon -> [Type] -> ([Type], [Type])
- getLevity :: HasDebugCallStack => Type -> Type
- getTyVar_maybe :: Type -> Maybe TyVar
- tyConAppTyCon_maybe :: Type -> Maybe TyCon
- splitTyConApp_maybe :: HasDebugCallStack => Type -> Maybe (TyCon, [Type])
- isLiftedTypeKind :: Kind -> Bool
- isMultiplicityTy :: Type -> Bool
- isLevityTy :: Type -> Bool
- isRuntimeRepTy :: Type -> Bool
- coreView :: Type -> Maybe Type
- typeTypeOrConstraint :: HasDebugCallStack => Type -> TypeOrConstraint
- typeKind :: HasDebugCallStack => Type -> Kind
- piResultTy :: HasDebugCallStack => Type -> Type -> Type
- mkCoercionTy :: Coercion -> Type
- mkTyConApp :: TyCon -> [Type] -> Type
- mkCastTy :: Type -> Coercion -> Type
- mkAppTy :: Type -> Type -> Type
- isCoercionTy :: Type -> Bool
- isPredTy :: HasDebugCallStack => Type -> Bool
- emptyVarSet :: VarSet
- unitVarSet :: Var -> VarSet
- extendVarSet :: VarSet -> Var -> VarSet
- extendVarSetList :: VarSet -> [Var] -> VarSet
- intersectVarSet :: VarSet -> VarSet -> VarSet
- unionVarSet :: VarSet -> VarSet -> VarSet
- unionVarSets :: [VarSet] -> VarSet
- elemVarSet :: Var -> VarSet -> Bool
- minusVarSet :: VarSet -> VarSet -> VarSet
- delVarSet :: VarSet -> Var -> VarSet
- delVarSetList :: VarSet -> [Var] -> VarSet
- isEmptyVarSet :: VarSet -> Bool
- mkVarSet :: [Var] -> VarSet
- lookupVarSet_Directly :: VarSet -> Unique -> Maybe Var
- lookupVarSet :: VarSet -> Var -> Maybe Var
- lookupVarSetByName :: VarSet -> Name -> Maybe Var
- sizeVarSet :: VarSet -> Int
- filterVarSet :: (Var -> Bool) -> VarSet -> VarSet
- delVarSetByKey :: VarSet -> Unique -> VarSet
- elemVarSetByKey :: Unique -> VarSet -> Bool
- partitionVarSet :: (Var -> Bool) -> VarSet -> (VarSet, VarSet)
- mapUnionVarSet :: (a -> VarSet) -> [a] -> VarSet
- intersectsVarSet :: VarSet -> VarSet -> Bool
- disjointVarSet :: VarSet -> VarSet -> Bool
- subVarSet :: VarSet -> VarSet -> Bool
- anyVarSet :: (Var -> Bool) -> VarSet -> Bool
- allVarSet :: (Var -> Bool) -> VarSet -> Bool
- mapVarSet :: Uniquable b => (a -> b) -> UniqSet a -> UniqSet b
- nonDetStrictFoldVarSet :: (Var -> a -> a) -> a -> VarSet -> a
- fixVarSet :: (VarSet -> VarSet) -> VarSet -> VarSet
- transCloVarSet :: (VarSet -> VarSet) -> VarSet -> VarSet
- seqVarSet :: VarSet -> ()
- pluralVarSet :: VarSet -> SDoc
- pprVarSet :: VarSet -> ([Var] -> SDoc) -> SDoc
- emptyDVarSet :: DVarSet
- unitDVarSet :: Var -> DVarSet
- mkDVarSet :: [Var] -> DVarSet
- extendDVarSet :: DVarSet -> Var -> DVarSet
- elemDVarSet :: Var -> DVarSet -> Bool
- dVarSetElems :: DVarSet -> [Var]
- subDVarSet :: DVarSet -> DVarSet -> Bool
- unionDVarSet :: DVarSet -> DVarSet -> DVarSet
- unionDVarSets :: [DVarSet] -> DVarSet
- mapUnionDVarSet :: (a -> DVarSet) -> [a] -> DVarSet
- intersectDVarSet :: DVarSet -> DVarSet -> DVarSet
- dVarSetIntersectVarSet :: DVarSet -> VarSet -> DVarSet
- disjointDVarSet :: DVarSet -> DVarSet -> Bool
- intersectsDVarSet :: DVarSet -> DVarSet -> Bool
- isEmptyDVarSet :: DVarSet -> Bool
- delDVarSet :: DVarSet -> Var -> DVarSet
- minusDVarSet :: DVarSet -> DVarSet -> DVarSet
- dVarSetMinusVarSet :: DVarSet -> VarSet -> DVarSet
- nonDetStrictFoldDVarSet :: (Var -> a -> a) -> a -> DVarSet -> a
- anyDVarSet :: (Var -> Bool) -> DVarSet -> Bool
- allDVarSet :: (Var -> Bool) -> DVarSet -> Bool
- mapDVarSet :: Uniquable b => (a -> b) -> UniqDSet a -> UniqDSet b
- filterDVarSet :: (Var -> Bool) -> DVarSet -> DVarSet
- sizeDVarSet :: DVarSet -> Int
- partitionDVarSet :: (Var -> Bool) -> DVarSet -> (DVarSet, DVarSet)
- delDVarSetList :: DVarSet -> [Var] -> DVarSet
- seqDVarSet :: DVarSet -> ()
- extendDVarSetList :: DVarSet -> [Var] -> DVarSet
- dVarSetToVarSet :: DVarSet -> VarSet
- transCloDVarSet :: (DVarSet -> DVarSet) -> DVarSet -> DVarSet
- unitFV :: Name -> FreeVars
- delFV :: Name -> FreeVars -> FreeVars
- delFVs :: [Name] -> FreeVars -> FreeVars
- mkFVs :: [Name] -> FreeVars
- emptyInScopeSet :: InScopeSet
- getInScopeVars :: InScopeSet -> VarSet
- mkInScopeSet :: VarSet -> InScopeSet
- mkInScopeSetList :: [Var] -> InScopeSet
- extendInScopeSet :: InScopeSet -> Var -> InScopeSet
- extendInScopeSetList :: InScopeSet -> [Var] -> InScopeSet
- extendInScopeSetSet :: InScopeSet -> VarSet -> InScopeSet
- delInScopeSet :: InScopeSet -> Var -> InScopeSet
- elemInScopeSet :: Var -> InScopeSet -> Bool
- lookupInScope :: InScopeSet -> Var -> Maybe Var
- lookupInScope_Directly :: InScopeSet -> Unique -> Maybe Var
- unionInScope :: InScopeSet -> InScopeSet -> InScopeSet
- varSetInScope :: VarSet -> InScopeSet -> Bool
- uniqAway :: InScopeSet -> Var -> Var
- unsafeGetFreshLocalUnique :: InScopeSet -> Unique
- mkRnEnv2 :: InScopeSet -> RnEnv2
- extendRnInScopeSetList :: RnEnv2 -> [Var] -> RnEnv2
- rnInScope :: Var -> RnEnv2 -> Bool
- rnInScopeSet :: RnEnv2 -> InScopeSet
- rnEnvL :: RnEnv2 -> VarEnv Var
- rnEnvR :: RnEnv2 -> VarEnv Var
- rnBndrs2 :: RnEnv2 -> [Var] -> [Var] -> RnEnv2
- rnBndr2 :: RnEnv2 -> Var -> Var -> RnEnv2
- rnBndr2_var :: RnEnv2 -> Var -> Var -> (RnEnv2, Var)
- rnBndrL :: RnEnv2 -> Var -> (RnEnv2, Var)
- rnBndrR :: RnEnv2 -> Var -> (RnEnv2, Var)
- rnEtaL :: RnEnv2 -> Var -> (RnEnv2, Var)
- rnEtaR :: RnEnv2 -> Var -> (RnEnv2, Var)
- delBndrL :: RnEnv2 -> Var -> RnEnv2
- delBndrR :: RnEnv2 -> Var -> RnEnv2
- delBndrsL :: RnEnv2 -> [Var] -> RnEnv2
- delBndrsR :: RnEnv2 -> [Var] -> RnEnv2
- rnOccL :: RnEnv2 -> Var -> Var
- rnOccR :: RnEnv2 -> Var -> Var
- rnOccL_maybe :: RnEnv2 -> Var -> Maybe Var
- rnOccR_maybe :: RnEnv2 -> Var -> Maybe Var
- inRnEnvL :: RnEnv2 -> Var -> Bool
- inRnEnvR :: RnEnv2 -> Var -> Bool
- anyInRnEnvR :: RnEnv2 -> VarSet -> Bool
- lookupRnInScope :: RnEnv2 -> Var -> Var
- nukeRnEnvL :: RnEnv2 -> RnEnv2
- nukeRnEnvR :: RnEnv2 -> RnEnv2
- rnSwap :: RnEnv2 -> RnEnv2
- emptyTidyEnv :: TidyEnv
- mkEmptyTidyEnv :: TidyOccEnv -> TidyEnv
- delTidyEnvList :: TidyEnv -> [Var] -> TidyEnv
- elemVarEnv :: Var -> VarEnv a -> Bool
- elemVarEnvByKey :: Unique -> VarEnv a -> Bool
- disjointVarEnv :: VarEnv a -> VarEnv a -> Bool
- alterVarEnv :: (Maybe a -> Maybe a) -> VarEnv a -> Var -> VarEnv a
- extendVarEnv :: VarEnv a -> Var -> a -> VarEnv a
- extendVarEnv_C :: (a -> a -> a) -> VarEnv a -> Var -> a -> VarEnv a
- extendVarEnv_Acc :: (a -> b -> b) -> (a -> b) -> VarEnv b -> Var -> a -> VarEnv b
- extendVarEnvList :: VarEnv a -> [(Var, a)] -> VarEnv a
- plusVarEnv_C :: (a -> a -> a) -> VarEnv a -> VarEnv a -> VarEnv a
- plusVarEnv_CD :: (a -> a -> a) -> VarEnv a -> a -> VarEnv a -> a -> VarEnv a
- plusMaybeVarEnv_C :: (a -> a -> Maybe a) -> VarEnv a -> VarEnv a -> VarEnv a
- delVarEnvList :: VarEnv a -> [Var] -> VarEnv a
- delVarEnv :: VarEnv a -> Var -> VarEnv a
- minusVarEnv :: VarEnv a -> VarEnv b -> VarEnv a
- plusVarEnv :: VarEnv a -> VarEnv a -> VarEnv a
- plusVarEnvList :: [VarEnv a] -> VarEnv a
- lookupVarEnv :: VarEnv a -> Var -> Maybe a
- lookupVarEnv_Directly :: VarEnv a -> Unique -> Maybe a
- filterVarEnv :: (a -> Bool) -> VarEnv a -> VarEnv a
- anyVarEnv :: (elt -> Bool) -> UniqFM key elt -> Bool
- lookupWithDefaultVarEnv :: VarEnv a -> a -> Var -> a
- mapVarEnv :: (a -> b) -> VarEnv a -> VarEnv b
- mkVarEnv :: [(Var, a)] -> VarEnv a
- mkVarEnv_Directly :: [(Unique, a)] -> VarEnv a
- emptyVarEnv :: VarEnv a
- unitVarEnv :: Var -> a -> VarEnv a
- isEmptyVarEnv :: VarEnv a -> Bool
- partitionVarEnv :: (a -> Bool) -> VarEnv a -> (VarEnv a, VarEnv a)
- varEnvDomain :: VarEnv elt -> UnVarSet
- restrictVarEnv :: VarEnv a -> VarSet -> VarEnv a
- zipVarEnv :: [Var] -> [a] -> VarEnv a
- lookupVarEnv_NF :: VarEnv a -> Var -> a
- modifyVarEnv :: (a -> a) -> VarEnv a -> Var -> VarEnv a
- modifyVarEnv_Directly :: (a -> a) -> UniqFM key a -> Unique -> UniqFM key a
- emptyDVarEnv :: DVarEnv a
- dVarEnvElts :: DVarEnv a -> [a]
- mkDVarEnv :: [(Var, a)] -> DVarEnv a
- extendDVarEnv :: DVarEnv a -> Var -> a -> DVarEnv a
- minusDVarEnv :: DVarEnv a -> DVarEnv a' -> DVarEnv a
- lookupDVarEnv :: DVarEnv a -> Var -> Maybe a
- foldDVarEnv :: (a -> b -> b) -> b -> DVarEnv a -> b
- nonDetStrictFoldDVarEnv :: (a -> b -> b) -> b -> DVarEnv a -> b
- mapDVarEnv :: (a -> b) -> DVarEnv a -> DVarEnv b
- filterDVarEnv :: (a -> Bool) -> DVarEnv a -> DVarEnv a
- alterDVarEnv :: (Maybe a -> Maybe a) -> DVarEnv a -> Var -> DVarEnv a
- plusDVarEnv :: DVarEnv a -> DVarEnv a -> DVarEnv a
- plusDVarEnv_C :: (a -> a -> a) -> DVarEnv a -> DVarEnv a -> DVarEnv a
- unitDVarEnv :: Var -> a -> DVarEnv a
- delDVarEnv :: DVarEnv a -> Var -> DVarEnv a
- delDVarEnvList :: DVarEnv a -> [Var] -> DVarEnv a
- isEmptyDVarEnv :: DVarEnv a -> Bool
- elemDVarEnv :: Var -> DVarEnv a -> Bool
- extendDVarEnv_C :: (a -> a -> a) -> DVarEnv a -> Var -> a -> DVarEnv a
- modifyDVarEnv :: (a -> a) -> DVarEnv a -> Var -> DVarEnv a
- partitionDVarEnv :: (a -> Bool) -> DVarEnv a -> (DVarEnv a, DVarEnv a)
- extendDVarEnvList :: DVarEnv a -> [(Var, a)] -> DVarEnv a
- anyDVarEnv :: (a -> Bool) -> DVarEnv a -> Bool
- isEmptyNameSet :: NameSet -> Bool
- emptyNameSet :: NameSet
- unitNameSet :: Name -> NameSet
- mkNameSet :: [Name] -> NameSet
- extendNameSetList :: NameSet -> [Name] -> NameSet
- extendNameSet :: NameSet -> Name -> NameSet
- unionNameSet :: NameSet -> NameSet -> NameSet
- unionNameSets :: [NameSet] -> NameSet
- minusNameSet :: NameSet -> NameSet -> NameSet
- elemNameSet :: Name -> NameSet -> Bool
- delFromNameSet :: NameSet -> Name -> NameSet
- filterNameSet :: (Name -> Bool) -> NameSet -> NameSet
- intersectNameSet :: NameSet -> NameSet -> NameSet
- disjointNameSet :: NameSet -> NameSet -> Bool
- delListFromNameSet :: NameSet -> [Name] -> NameSet
- intersectsNameSet :: NameSet -> NameSet -> Bool
- nameSetAny :: (Name -> Bool) -> NameSet -> Bool
- nameSetAll :: (Name -> Bool) -> NameSet -> Bool
- nameSetElemsStable :: NameSet -> [Name]
- isEmptyFVs :: NameSet -> Bool
- emptyFVs :: FreeVars
- plusFVs :: [FreeVars] -> FreeVars
- plusFV :: FreeVars -> FreeVars -> FreeVars
- addOneFV :: FreeVars -> Name -> FreeVars
- intersectFVs :: FreeVars -> FreeVars -> FreeVars
- emptyDUs :: DefUses
- usesOnly :: Uses -> DefUses
- mkDUs :: [(Defs, Uses)] -> DefUses
- plusDU :: DefUses -> DefUses -> DefUses
- duDefs :: DefUses -> Defs
- allUses :: DefUses -> Uses
- duUses :: DefUses -> Uses
- findUses :: DefUses -> Uses -> Uses
- depAnal :: (node -> [Name]) -> (node -> [Name]) -> [node] -> [SCC node]
- nonDetNameEnvElts :: NameEnv a -> [a]
- emptyNameEnv :: NameEnv a
- isEmptyNameEnv :: NameEnv a -> Bool
- unitNameEnv :: Name -> a -> NameEnv a
- extendNameEnv :: NameEnv a -> Name -> a -> NameEnv a
- extendNameEnvList :: NameEnv a -> [(Name, a)] -> NameEnv a
- lookupNameEnv :: NameEnv a -> Name -> Maybe a
- alterNameEnv :: (Maybe a -> Maybe a) -> NameEnv a -> Name -> NameEnv a
- mkNameEnv :: [(Name, a)] -> NameEnv a
- mkNameEnvWith :: (a -> Name) -> [a] -> NameEnv a
- elemNameEnv :: Name -> NameEnv a -> Bool
- plusNameEnv :: NameEnv a -> NameEnv a -> NameEnv a
- plusNameEnv_C :: (a -> a -> a) -> NameEnv a -> NameEnv a -> NameEnv a
- plusNameEnv_CD :: (a -> a -> a) -> NameEnv a -> a -> NameEnv a -> a -> NameEnv a
- plusNameEnv_CD2 :: (Maybe a -> Maybe a -> a) -> NameEnv a -> NameEnv a -> NameEnv a
- extendNameEnv_C :: (a -> a -> a) -> NameEnv a -> Name -> a -> NameEnv a
- mapNameEnv :: (elt1 -> elt2) -> NameEnv elt1 -> NameEnv elt2
- extendNameEnv_Acc :: (a -> b -> b) -> (a -> b) -> NameEnv b -> Name -> a -> NameEnv b
- extendNameEnvList_C :: (a -> a -> a) -> NameEnv a -> [(Name, a)] -> NameEnv a
- delFromNameEnv :: NameEnv a -> Name -> NameEnv a
- delListFromNameEnv :: NameEnv a -> [Name] -> NameEnv a
- filterNameEnv :: (elt -> Bool) -> NameEnv elt -> NameEnv elt
- mapMaybeNameEnv :: (a -> Maybe b) -> NameEnv a -> NameEnv b
- anyNameEnv :: (elt -> Bool) -> NameEnv elt -> Bool
- disjointNameEnv :: NameEnv a -> NameEnv a -> Bool
- seqEltsNameEnv :: (elt -> ()) -> NameEnv elt -> ()
- lookupNameEnv_NF :: NameEnv a -> Name -> a
- emptyDNameEnv :: DNameEnv a
- isEmptyDNameEnv :: DNameEnv a -> Bool
- lookupDNameEnv :: DNameEnv a -> Name -> Maybe a
- delFromDNameEnv :: DNameEnv a -> Name -> DNameEnv a
- filterDNameEnv :: (a -> Bool) -> DNameEnv a -> DNameEnv a
- mapDNameEnv :: (a -> b) -> DNameEnv a -> DNameEnv b
- adjustDNameEnv :: (a -> a) -> DNameEnv a -> Name -> DNameEnv a
- alterDNameEnv :: (Maybe a -> Maybe a) -> DNameEnv a -> Name -> DNameEnv a
- extendDNameEnv :: DNameEnv a -> Name -> a -> DNameEnv a
- extendDNameEnv_C :: (a -> a -> a) -> DNameEnv a -> Name -> a -> DNameEnv a
- eltsDNameEnv :: DNameEnv a -> [a]
- foldDNameEnv :: (a -> b -> b) -> b -> DNameEnv a -> b
- plusDNameEnv_C :: (elt -> elt -> elt) -> DNameEnv elt -> DNameEnv elt -> DNameEnv elt
- nonDetStrictFoldDNameEnv :: (a -> b -> b) -> b -> DNameEnv a -> b
- greNameSrcSpan :: GreName -> SrcSpan
- rdrNameOcc :: RdrName -> OccName
- rdrNameSpace :: RdrName -> NameSpace
- demoteRdrName :: RdrName -> Maybe RdrName
- promoteRdrName :: RdrName -> Maybe RdrName
- mkRdrUnqual :: OccName -> RdrName
- mkRdrQual :: ModuleName -> OccName -> RdrName
- mkOrig :: Module -> OccName -> RdrName
- mkUnqual :: NameSpace -> FastString -> RdrName
- mkVarUnqual :: FastString -> RdrName
- mkQual :: NameSpace -> (FastString, FastString) -> RdrName
- getRdrName :: NamedThing thing => thing -> RdrName
- nameRdrName :: Name -> RdrName
- isRdrDataCon :: RdrName -> Bool
- isRdrTyVar :: RdrName -> Bool
- isRdrTc :: RdrName -> Bool
- isSrcRdrName :: RdrName -> Bool
- isUnqual :: RdrName -> Bool
- isQual :: RdrName -> Bool
- isQual_maybe :: RdrName -> Maybe (ModuleName, OccName)
- isOrig :: RdrName -> Bool
- isOrig_maybe :: RdrName -> Maybe (Module, OccName)
- isExact :: RdrName -> Bool
- isExact_maybe :: RdrName -> Maybe Name
- emptyLocalRdrEnv :: LocalRdrEnv
- extendLocalRdrEnv :: LocalRdrEnv -> Name -> LocalRdrEnv
- extendLocalRdrEnvList :: LocalRdrEnv -> [Name] -> LocalRdrEnv
- lookupLocalRdrEnv :: LocalRdrEnv -> RdrName -> Maybe Name
- lookupLocalRdrOcc :: LocalRdrEnv -> OccName -> Maybe Name
- elemLocalRdrEnv :: RdrName -> LocalRdrEnv -> Bool
- localRdrEnvElts :: LocalRdrEnv -> [Name]
- inLocalRdrEnvScope :: Name -> LocalRdrEnv -> Bool
- minusLocalRdrEnv :: LocalRdrEnv -> OccEnv a -> LocalRdrEnv
- gresFromAvails :: Maybe ImportSpec -> [AvailInfo] -> [GlobalRdrElt]
- localGREsFromAvail :: AvailInfo -> [GlobalRdrElt]
- gresFromAvail :: (Name -> Maybe ImportSpec) -> AvailInfo -> [GlobalRdrElt]
- greOccName :: GlobalRdrElt -> OccName
- greMangledName :: GlobalRdrElt -> Name
- grePrintableName :: GlobalRdrElt -> Name
- greDefinitionSrcSpan :: GlobalRdrElt -> SrcSpan
- greDefinitionModule :: GlobalRdrElt -> Maybe Module
- greQualModName :: GlobalRdrElt -> ModuleName
- greRdrNames :: GlobalRdrElt -> [RdrName]
- greSrcSpan :: GlobalRdrElt -> SrcSpan
- greParent_maybe :: GlobalRdrElt -> Maybe Name
- gresToAvailInfo :: [GlobalRdrElt] -> [AvailInfo]
- availFromGRE :: GlobalRdrElt -> AvailInfo
- emptyGlobalRdrEnv :: GlobalRdrEnv
- globalRdrEnvElts :: GlobalRdrEnv -> [GlobalRdrElt]
- pprGlobalRdrEnv :: Bool -> GlobalRdrEnv -> SDoc
- lookupGlobalRdrEnv :: GlobalRdrEnv -> OccName -> [GlobalRdrElt]
- lookupGRE_RdrName :: RdrName -> GlobalRdrEnv -> [GlobalRdrElt]
- lookupGRE_RdrName' :: RdrName -> GlobalRdrEnv -> [GlobalRdrElt]
- lookupGRE_Name :: GlobalRdrEnv -> Name -> Maybe GlobalRdrElt
- lookupGRE_GreName :: GlobalRdrEnv -> GreName -> Maybe GlobalRdrElt
- lookupGRE_FieldLabel :: GlobalRdrEnv -> FieldLabel -> Maybe GlobalRdrElt
- lookupGRE_Name_OccName :: GlobalRdrEnv -> Name -> OccName -> Maybe GlobalRdrElt
- getGRE_NameQualifier_maybes :: GlobalRdrEnv -> Name -> [Maybe [ModuleName]]
- isLocalGRE :: GlobalRdrElt -> Bool
- isRecFldGRE :: GlobalRdrElt -> Bool
- isDuplicateRecFldGRE :: GlobalRdrElt -> Bool
- isNoFieldSelectorGRE :: GlobalRdrElt -> Bool
- isFieldSelectorGRE :: GlobalRdrElt -> Bool
- greFieldLabel :: GlobalRdrElt -> Maybe FieldLabel
- unQualOK :: GlobalRdrElt -> Bool
- pickGREs :: RdrName -> [GlobalRdrElt] -> [GlobalRdrElt]
- pickGREsModExp :: ModuleName -> [GlobalRdrElt] -> [(GlobalRdrElt, GlobalRdrElt)]
- plusGlobalRdrEnv :: GlobalRdrEnv -> GlobalRdrEnv -> GlobalRdrEnv
- mkGlobalRdrEnv :: [GlobalRdrElt] -> GlobalRdrEnv
- transformGREs :: (GlobalRdrElt -> GlobalRdrElt) -> [OccName] -> GlobalRdrEnv -> GlobalRdrEnv
- extendGlobalRdrEnv :: GlobalRdrEnv -> GlobalRdrElt -> GlobalRdrEnv
- shadowNames :: GlobalRdrEnv -> OccEnv a -> GlobalRdrEnv
- bestImport :: [ImportSpec] -> ImportSpec
- unQualSpecOK :: ImportSpec -> Bool
- qualSpecOK :: ModuleName -> ImportSpec -> Bool
- importSpecLoc :: ImportSpec -> SrcSpan
- importSpecModule :: ImportSpec -> ModuleName
- isExplicitItem :: ImpItemSpec -> Bool
- pprNameProvenance :: GlobalRdrElt -> SDoc
- opIsAt :: RdrName -> Bool
- realSrcSpan :: SrcSpan -> RealSrcSpan
- noSrcSpanA :: SrcAnn ann
- noAnn :: EpAnn a
- pprIfPs :: forall (p :: Pass). IsPass p => (p ~ 'Parsed => SDoc) -> SDoc
- pprIfRn :: forall (p :: Pass). IsPass p => (p ~ 'Renamed => SDoc) -> SDoc
- pprIfTc :: forall (p :: Pass). IsPass p => (p ~ 'Typechecked => SDoc) -> SDoc
- noHsTok :: forall (tok :: Symbol). GenLocated TokenLocation (HsToken tok)
- noHsUniTok :: forall (tok :: Symbol) (utok :: Symbol). GenLocated TokenLocation (HsUniToken tok utok)
- listTyConKey :: Unique
- nilDataConKey :: Unique
- emptyAnnEnv :: AnnEnv
- mkAnnEnv :: [Annotation] -> AnnEnv
- extendAnnEnvList :: AnnEnv -> [Annotation] -> AnnEnv
- plusAnnEnv :: AnnEnv -> AnnEnv -> AnnEnv
- findAnns :: Typeable a => ([Word8] -> a) -> AnnEnv -> CoreAnnTarget -> [a]
- findAnnsByTypeRep :: AnnEnv -> CoreAnnTarget -> TypeRep -> [[Word8]]
- deserializeAnns :: Typeable a => ([Word8] -> a) -> AnnEnv -> (ModuleEnv [a], NameEnv [a])
- sProgramName :: Settings -> String
- sProjectVersion :: Settings -> String
- sGhcUsagePath :: Settings -> FilePath
- sGhciUsagePath :: Settings -> FilePath
- sToolDir :: Settings -> Maybe FilePath
- sTopDir :: Settings -> FilePath
- sGlobalPackageDatabasePath :: Settings -> FilePath
- sLdSupportsCompactUnwind :: Settings -> Bool
- sLdSupportsFilelist :: Settings -> Bool
- sLdIsGnuLd :: Settings -> Bool
- sGccSupportsNoPie :: Settings -> Bool
- sPgm_L :: Settings -> String
- sPgm_P :: Settings -> (String, [Option])
- sPgm_F :: Settings -> String
- sPgm_c :: Settings -> String
- sPgm_cxx :: Settings -> String
- sPgm_a :: Settings -> (String, [Option])
- sPgm_l :: Settings -> (String, [Option])
- sPgm_lm :: Settings -> Maybe (String, [Option])
- sPgm_dll :: Settings -> (String, [Option])
- sPgm_T :: Settings -> String
- sPgm_windres :: Settings -> String
- sPgm_ar :: Settings -> String
- sPgm_ranlib :: Settings -> String
- sPgm_lo :: Settings -> (String, [Option])
- sPgm_lc :: Settings -> (String, [Option])
- sPgm_lcc :: Settings -> (String, [Option])
- sPgm_i :: Settings -> String
- sOpt_L :: Settings -> [String]
- sOpt_P :: Settings -> [String]
- sOpt_P_fingerprint :: Settings -> Fingerprint
- sOpt_F :: Settings -> [String]
- sOpt_c :: Settings -> [String]
- sOpt_cxx :: Settings -> [String]
- sOpt_a :: Settings -> [String]
- sOpt_l :: Settings -> [String]
- sOpt_lm :: Settings -> [String]
- sOpt_windres :: Settings -> [String]
- sOpt_lo :: Settings -> [String]
- sOpt_lc :: Settings -> [String]
- sOpt_lcc :: Settings -> [String]
- sOpt_i :: Settings -> [String]
- sExtraGccViaCFlags :: Settings -> [String]
- sTargetPlatformString :: Settings -> String
- sGhcWithInterpreter :: Settings -> Bool
- sLibFFI :: Settings -> Bool
- mkUnitKeyInfo :: DbUnitInfo -> UnitKeyInfo
- mapUnitInfo :: IsUnitId v => (u -> v) -> GenUnitInfo u -> GenUnitInfo v
- unitPackageIdString :: GenUnitInfo u -> String
- unitPackageNameString :: GenUnitInfo u -> String
- pprUnitInfo :: UnitInfo -> SDoc
- mkUnit :: UnitInfo -> Unit
- mkUnitPprInfo :: (u -> FastString) -> GenUnitInfo u -> UnitPprInfo
- collectIncludeDirs :: [UnitInfo] -> [FilePath]
- collectExtraCcOpts :: [UnitInfo] -> [String]
- collectLibraryDirs :: Ways -> [UnitInfo] -> [FilePath]
- collectFrameworks :: [UnitInfo] -> [String]
- collectFrameworksDirs :: [UnitInfo] -> [String]
- unitHsLibs :: GhcNameVersion -> Ways -> UnitInfo -> [String]
- topNormaliseNewType_maybe :: Type -> Maybe (Coercion, Type)
- coercionType :: Coercion -> Type
- coercionRKind :: Coercion -> Type
- coercionLKind :: Coercion -> Type
- coercionKind :: Coercion -> Pair Type
- seqCo :: Coercion -> ()
- liftCoSubst :: HasDebugCallStack => Role -> LiftingContext -> Type -> Coercion
- mkCoercionType :: Role -> Type -> Type -> Type
- coVarRole :: CoVar -> Role
- coVarKindsTypesRole :: HasDebugCallStack => CoVar -> (Kind, Kind, Type, Type, Role)
- decomposePiCos :: HasDebugCallStack => CoercionN -> Pair Type -> [Type] -> ([CoercionN], CoercionN)
- isReflexiveCo :: Coercion -> Bool
- isReflCo :: Coercion -> Bool
- isGReflCo :: Coercion -> Bool
- mkAxiomRuleCo :: CoAxiomRule -> [Coercion] -> Coercion
- mkProofIrrelCo :: Role -> CoercionN -> Coercion -> Coercion -> Coercion
- mkSubCo :: HasDebugCallStack => Coercion -> Coercion
- mkKindCo :: Coercion -> Coercion
- mkNomReflCo :: Type -> Coercion
- mkGReflCo :: Role -> Type -> MCoercionN -> Coercion
- mkInstCo :: Coercion -> CoercionN -> Coercion
- mkLRCo :: LeftOrRight -> Coercion -> Coercion
- mkSelCo :: HasDebugCallStack => CoSel -> Coercion -> Coercion
- mkTransCo :: Coercion -> Coercion -> Coercion
- mkSymCo :: Coercion -> Coercion
- mkUnivCo :: UnivCoProvenance -> Role -> Type -> Type -> Coercion
- mkPhantomCo :: Coercion -> Type -> Type -> Coercion
- mkAxiomInstCo :: CoAxiom Branched -> BranchIndex -> [Coercion] -> Coercion
- mkCoVarCo :: CoVar -> Coercion
- mkFunCo2 :: HasDebugCallStack => Role -> FunTyFlag -> FunTyFlag -> CoercionN -> Coercion -> Coercion -> Coercion
- mkNakedFunCo1 :: Role -> FunTyFlag -> CoercionN -> Coercion -> Coercion -> Coercion
- mkFunCo1 :: HasDebugCallStack => Role -> FunTyFlag -> CoercionN -> Coercion -> Coercion -> Coercion
- mkForAllCo :: TyCoVar -> CoercionN -> Coercion -> Coercion
- mkAppCo :: Coercion -> Coercion -> Coercion
- mkTyConAppCo :: HasDebugCallStack => Role -> TyCon -> [Coercion] -> Coercion
- mkReflCo :: Role -> Type -> Coercion
- algTcFields :: TyConDetails -> FieldLabelEnv
- mkAnonTyConBinder :: TyVar -> TyConBinder
- mkAnonTyConBinders :: [TyVar] -> [TyConBinder]
- mkInvisAnonTyConBinder :: TyVar -> TyConBinder
- mkNamedTyConBinder :: ForAllTyFlag -> TyVar -> TyConBinder
- mkNamedTyConBinders :: ForAllTyFlag -> [TyVar] -> [TyConBinder]
- mkRequiredTyConBinder :: TyCoVarSet -> TyVar -> TyConBinder
- tyConBinderForAllTyFlag :: TyConBinder -> ForAllTyFlag
- tyConBndrVisForAllTyFlag :: TyConBndrVis -> ForAllTyFlag
- isNamedTyConBinder :: TyConBinder -> Bool
- isVisibleTyConBinder :: VarBndr tv TyConBndrVis -> Bool
- isVisibleTcbVis :: TyConBndrVis -> Bool
- isInvisibleTyConBinder :: VarBndr tv TyConBndrVis -> Bool
- mkTyConKind :: [TyConBinder] -> Kind -> Kind
- tyConInvisTVBinders :: [TyConBinder] -> [InvisTVBinder]
- tyConVisibleTyVars :: TyCon -> [TyVar]
- mkLevPolyDataTyConRhs :: Bool -> Bool -> [DataCon] -> AlgTyConRhs
- mkDataTyConRhs :: [DataCon] -> AlgTyConRhs
- visibleDataCons :: AlgTyConRhs -> [DataCon]
- isNoParent :: AlgTyConFlav -> Bool
- tyConRepModOcc :: Module -> OccName -> (Module, OccName)
- isVoidRep :: PrimRep -> Bool
- isGcPtrRep :: PrimRep -> Bool
- primRepCompatible :: Platform -> PrimRep -> PrimRep -> Bool
- primRepsCompatible :: Platform -> [PrimRep] -> [PrimRep] -> Bool
- primRepSizeB :: Platform -> PrimRep -> Int
- primElemRepSizeB :: Platform -> PrimElemRep -> Int
- primElemRepToPrimRep :: PrimElemRep -> PrimRep
- primRepIsFloat :: PrimRep -> Maybe Bool
- primRepIsWord :: PrimRep -> Bool
- primRepIsInt :: PrimRep -> Bool
- tyConFieldLabels :: TyCon -> [FieldLabel]
- lookupTyConFieldLabel :: FieldLabelString -> TyCon -> Maybe FieldLabel
- mkAlgTyCon :: Name -> [TyConBinder] -> Kind -> [Role] -> Maybe CType -> [PredType] -> AlgTyConRhs -> AlgTyConFlav -> Bool -> TyCon
- mkClassTyCon :: Name -> [TyConBinder] -> [Role] -> AlgTyConRhs -> Class -> Name -> TyCon
- mkTupleTyCon :: Name -> [TyConBinder] -> Kind -> DataCon -> TupleSort -> AlgTyConFlav -> TyCon
- mkSumTyCon :: Name -> [TyConBinder] -> Kind -> [DataCon] -> AlgTyConFlav -> TyCon
- mkTcTyCon :: Name -> [TyConBinder] -> Kind -> [(Name, TcTyVar)] -> Bool -> TyConFlavour -> TyCon
- noTcTyConScopedTyVars :: [(Name, TcTyVar)]
- mkPrimTyCon :: Name -> [TyConBinder] -> Kind -> [Role] -> TyCon
- mkSynonymTyCon :: Name -> [TyConBinder] -> Kind -> [Role] -> Type -> Bool -> Bool -> Bool -> TyCon
- mkFamilyTyCon :: Name -> [TyConBinder] -> Kind -> Maybe Name -> FamTyConFlav -> Maybe Class -> Injectivity -> TyCon
- mkPromotedDataCon :: DataCon -> Name -> TyConRepName -> [TyConPiTyBinder] -> Kind -> [Role] -> PromDataConInfo -> TyCon
- isAbstractTyCon :: TyCon -> Bool
- isPrimTyCon :: TyCon -> Bool
- isAlgTyCon :: TyCon -> Bool
- isVanillaAlgTyCon :: TyCon -> Bool
- isDataTyCon :: TyCon -> Bool
- isTypeDataTyCon :: TyCon -> Bool
- isInjectiveTyCon :: TyCon -> Role -> Bool
- isGenerativeTyCon :: TyCon -> Role -> Bool
- isGenInjAlgRhs :: AlgTyConRhs -> Bool
- isNewTyCon :: TyCon -> Bool
- unwrapNewTyCon_maybe :: TyCon -> Maybe ([TyVar], Type, CoAxiom Unbranched)
- unwrapNewTyConEtad_maybe :: TyCon -> Maybe ([TyVar], Type, CoAxiom Unbranched)
- isTypeSynonymTyCon :: TyCon -> Bool
- isTauTyCon :: TyCon -> Bool
- isFamFreeTyCon :: TyCon -> Bool
- isForgetfulSynTyCon :: TyCon -> Bool
- tyConMustBeSaturated :: TyCon -> Bool
- isGadtSyntaxTyCon :: TyCon -> Bool
- isEnumerationTyCon :: TyCon -> Bool
- isFamilyTyCon :: TyCon -> Bool
- isOpenFamilyTyCon :: TyCon -> Bool
- isTypeFamilyTyCon :: TyCon -> Bool
- isDataFamilyTyCon :: TyCon -> Bool
- isOpenTypeFamilyTyCon :: TyCon -> Bool
- isClosedSynFamilyTyConWithAxiom_maybe :: TyCon -> Maybe (CoAxiom Branched)
- isBuiltInSynFamTyCon_maybe :: TyCon -> Maybe BuiltInSynFamily
- tyConFamilyResVar_maybe :: TyCon -> Maybe Name
- tyConInjectivityInfo :: TyCon -> Injectivity
- isTyConAssoc :: TyCon -> Bool
- tyConAssoc_maybe :: TyCon -> Maybe TyCon
- tyConFlavourAssoc_maybe :: TyConFlavour -> Maybe TyCon
- tyConTuple_maybe :: TyCon -> Maybe TupleSort
- isBoxedTupleTyCon :: TyCon -> Bool
- isUnboxedSumTyCon :: TyCon -> Bool
- isLiftedAlgTyCon :: TyCon -> Bool
- isPromotedDataCon_maybe :: TyCon -> Maybe DataCon
- isPromotedTupleTyCon :: TyCon -> Bool
- isPromotedDataCon :: TyCon -> Bool
- isDataKindsPromotedDataCon :: TyCon -> Bool
- isKindTyCon :: TyCon -> Bool
- isLiftedTypeKindTyConName :: Name -> Bool
- isImplicitTyCon :: TyCon -> Bool
- tyConCType_maybe :: TyCon -> Maybe CType
- tcHasFixedRuntimeRep :: TyCon -> Bool
- isConcreteTyCon :: TyCon -> Bool
- isTcTyCon :: TyCon -> Bool
- setTcTyConKind :: TyCon -> Kind -> TyCon
- isMonoTcTyCon :: TyCon -> Bool
- tcTyConScopedTyVars :: TyCon -> [(Name, TcTyVar)]
- expandSynTyCon_maybe :: TyCon -> [tyco] -> ExpandSynResult tyco
- isTyConWithSrcDataCons :: TyCon -> Bool
- tyConDataCons :: TyCon -> [DataCon]
- tyConDataCons_maybe :: TyCon -> Maybe [DataCon]
- tyConSingleDataCon_maybe :: TyCon -> Maybe DataCon
- tyConSingleDataCon :: TyCon -> DataCon
- tyConSingleAlgDataCon_maybe :: TyCon -> Maybe DataCon
- tyConAlgDataCons_maybe :: TyCon -> Maybe [DataCon]
- tyConFamilySize :: TyCon -> Int
- algTyConRhs :: TyCon -> AlgTyConRhs
- newTyConRhs :: TyCon -> ([TyVar], Type)
- newTyConEtadArity :: TyCon -> Int
- newTyConEtadRhs :: TyCon -> ([TyVar], Type)
- newTyConCo_maybe :: TyCon -> Maybe (CoAxiom Unbranched)
- newTyConCo :: TyCon -> CoAxiom Unbranched
- newTyConDataCon_maybe :: TyCon -> Maybe DataCon
- tyConStupidTheta :: TyCon -> [PredType]
- synTyConDefn_maybe :: TyCon -> Maybe ([TyVar], Type)
- synTyConRhs_maybe :: TyCon -> Maybe Type
- famTyConFlav_maybe :: TyCon -> Maybe FamTyConFlav
- isClassTyCon :: TyCon -> Bool
- tyConClass_maybe :: TyCon -> Maybe Class
- tyConATs :: TyCon -> [TyCon]
- isFamInstTyCon :: TyCon -> Bool
- tyConFamInstSig_maybe :: TyCon -> Maybe (TyCon, [Type], CoAxiom Unbranched)
- tyConFamInst_maybe :: TyCon -> Maybe (TyCon, [Type])
- tyConFamilyCoercion_maybe :: TyCon -> Maybe (CoAxiom Unbranched)
- tyConPromDataConInfo :: TyCon -> PromDataConInfo
- mkTyConTagMap :: TyCon -> NameEnv ConTag
- tyConFlavour :: TyCon -> TyConFlavour
- tcFlavourIsOpen :: TyConFlavour -> Bool
- pprPromotionQuote :: TyCon -> SDoc
- tyConSkolem :: TyCon -> Bool
- mkTyVarTy :: TyVar -> Type
- mkTyVarTys :: [TyVar] -> [Type]
- mkInvisFunTy :: HasDebugCallStack => Type -> Type -> Type
- mkInvisFunTys :: HasDebugCallStack => [Type] -> Type -> Type
- tcMkVisFunTy :: Mult -> Type -> Type -> Type
- tcMkInvisFunTy :: TypeOrConstraint -> Type -> Type -> Type
- mkVisFunTy :: HasDebugCallStack => Mult -> Type -> Type -> Type
- mkVisFunTyMany :: HasDebugCallStack => Type -> Type -> Type
- mkVisFunTysMany :: [Type] -> Type -> Type
- mkScaledFunTys :: HasDebugCallStack => [Scaled Type] -> Type -> Type
- tcMkScaledFunTys :: [Scaled Type] -> Type -> Type
- mkForAllTys :: [ForAllTyBinder] -> Type -> Type
- mkInvisForAllTys :: [InvisTVBinder] -> Type -> Type
- mkPiTy :: PiTyBinder -> Type -> Type
- mkPiTys :: [PiTyBinder] -> Type -> Type
- coHoleCoVar :: CoercionHole -> CoVar
- setCoHoleCoVar :: CoercionHole -> CoVar -> CoercionHole
- foldTyCo :: Monoid a => TyCoFolder env a -> env -> (Type -> a, [Type] -> a, Coercion -> a, [Coercion] -> a)
- noView :: Type -> Maybe Type
- typeSize :: Type -> Int
- coercionSize :: Coercion -> Int
- funTyFlagTyCon :: FunTyFlag -> TyCon
- tYPETyCon :: TyCon
- tYPETyConName :: Name
- tYPEKind :: Type
- cONSTRAINTTyCon :: TyCon
- cONSTRAINTTyConName :: Name
- cONSTRAINTKind :: Type
- tyCoVarsOfType :: Type -> TyCoVarSet
- tyCoVarsOfTypes :: [Type] -> TyCoVarSet
- tyCoVarsOfCo :: Coercion -> TyCoVarSet
- tyCoVarsOfCos :: [Coercion] -> TyCoVarSet
- coVarsOfType :: Type -> CoVarSet
- coVarsOfTypes :: [Type] -> CoVarSet
- coVarsOfCo :: Coercion -> CoVarSet
- closeOverKinds :: TyCoVarSet -> TyCoVarSet
- closeOverKindsList :: [TyVar] -> [TyVar]
- closeOverKindsDSet :: DTyVarSet -> DTyVarSet
- tyCoVarsOfTypeDSet :: Type -> DTyCoVarSet
- tyCoFVsOfType :: Type -> FV
- tyCoFVsBndr :: ForAllTyBinder -> FV -> FV
- tyCoFVsVarBndrs :: [Var] -> FV -> FV
- tyCoFVsVarBndr :: Var -> FV -> FV
- tyCoVarsOfCoDSet :: Coercion -> DTyCoVarSet
- tyCoFVsOfCo :: Coercion -> FV
- tyCoFVsOfCos :: [Coercion] -> FV
- anyFreeVarsOfType :: (TyCoVar -> Bool) -> Type -> Bool
- anyFreeVarsOfTypes :: (TyCoVar -> Bool) -> [Type] -> Bool
- anyFreeVarsOfCo :: (TyCoVar -> Bool) -> Coercion -> Bool
- scopedSort :: [TyCoVar] -> [TyCoVar]
- tyCoVarsOfTypeWellScoped :: Type -> [TyVar]
- tyCoVarsOfTypesWellScoped :: [Type] -> [TyVar]
- tyConsOfType :: Type -> UniqSet TyCon
- occCheckExpand :: [Var] -> Type -> Maybe Type
- emptyTvSubstEnv :: TvSubstEnv
- emptyCvSubstEnv :: CvSubstEnv
- composeTCvSubst :: Subst -> Subst -> Subst
- emptySubst :: Subst
- mkEmptySubst :: InScopeSet -> Subst
- isEmptySubst :: Subst -> Bool
- isEmptyTCvSubst :: Subst -> Bool
- mkSubst :: InScopeSet -> TvSubstEnv -> CvSubstEnv -> IdSubstEnv -> Subst
- getTvSubstEnv :: Subst -> TvSubstEnv
- getCvSubstEnv :: Subst -> CvSubstEnv
- getSubstInScope :: Subst -> InScopeSet
- setInScope :: Subst -> InScopeSet -> Subst
- getSubstRangeTyCoFVs :: Subst -> VarSet
- isInScope :: Var -> Subst -> Bool
- notElemSubst :: Var -> Subst -> Bool
- zapSubst :: Subst -> Subst
- extendSubstInScope :: Subst -> Var -> Subst
- extendSubstInScopeList :: Subst -> [Var] -> Subst
- extendSubstInScopeSet :: Subst -> VarSet -> Subst
- extendTCvSubst :: Subst -> TyCoVar -> Type -> Subst
- extendTCvSubstWithClone :: Subst -> TyCoVar -> TyCoVar -> Subst
- extendTvSubst :: Subst -> TyVar -> Type -> Subst
- extendTvSubstBinderAndInScope :: Subst -> PiTyBinder -> Type -> Subst
- extendTvSubstWithClone :: Subst -> TyVar -> TyVar -> Subst
- extendCvSubst :: Subst -> CoVar -> Coercion -> Subst
- extendTvSubstAndInScope :: Subst -> TyVar -> Type -> Subst
- extendTvSubstList :: Subst -> [(TyVar, Type)] -> Subst
- extendTCvSubstList :: Subst -> [Var] -> [Type] -> Subst
- unionSubst :: Subst -> Subst -> Subst
- zipTvSubst :: HasDebugCallStack => [TyVar] -> [Type] -> Subst
- zipTCvSubst :: HasDebugCallStack => [TyCoVar] -> [Type] -> Subst
- mkTvSubstPrs :: [(TyVar, Type)] -> Subst
- zipTyEnv :: HasDebugCallStack => [TyVar] -> [Type] -> TvSubstEnv
- zipCoEnv :: HasDebugCallStack => [CoVar] -> [Coercion] -> CvSubstEnv
- substTyWith :: HasDebugCallStack => [TyVar] -> [Type] -> Type -> Type
- substTyWithUnchecked :: [TyVar] -> [Type] -> Type -> Type
- substCoWith :: HasDebugCallStack => [TyVar] -> [Type] -> Coercion -> Coercion
- substCoWithUnchecked :: [TyVar] -> [Type] -> Coercion -> Coercion
- substTysWith :: [TyVar] -> [Type] -> [Type] -> [Type]
- substTyAddInScope :: Subst -> Type -> Type
- substTyUnchecked :: Subst -> Type -> Type
- substScaledTy :: HasDebugCallStack => Subst -> Scaled Type -> Scaled Type
- substScaledTyUnchecked :: HasDebugCallStack => Subst -> Scaled Type -> Scaled Type
- substTys :: HasDebugCallStack => Subst -> [Type] -> [Type]
- substScaledTys :: HasDebugCallStack => Subst -> [Scaled Type] -> [Scaled Type]
- substTysUnchecked :: Subst -> [Type] -> [Type]
- substScaledTysUnchecked :: Subst -> [Scaled Type] -> [Scaled Type]
- substTheta :: HasDebugCallStack => Subst -> ThetaType -> ThetaType
- substThetaUnchecked :: Subst -> ThetaType -> ThetaType
- substTyVar :: Subst -> TyVar -> Type
- substTyVarToTyVar :: HasDebugCallStack => Subst -> TyVar -> TyVar
- substTyVars :: Subst -> [TyVar] -> [Type]
- lookupTyVar :: Subst -> TyVar -> Maybe Type
- substCo :: HasDebugCallStack => Subst -> Coercion -> Coercion
- substCoUnchecked :: Subst -> Coercion -> Coercion
- substCos :: HasDebugCallStack => Subst -> [Coercion] -> [Coercion]
- substCoVar :: Subst -> CoVar -> Coercion
- substCoVars :: Subst -> [CoVar] -> [Coercion]
- lookupCoVar :: Subst -> Var -> Maybe Coercion
- substTyVarBndr :: HasDebugCallStack => Subst -> TyVar -> (Subst, TyVar)
- substTyVarBndrs :: HasDebugCallStack => Subst -> [TyVar] -> (Subst, [TyVar])
- substVarBndr :: HasDebugCallStack => Subst -> TyCoVar -> (Subst, TyCoVar)
- substVarBndrs :: HasDebugCallStack => Subst -> [TyCoVar] -> (Subst, [TyCoVar])
- substCoVarBndr :: HasDebugCallStack => Subst -> CoVar -> (Subst, CoVar)
- cloneTyVarBndr :: Subst -> TyVar -> Unique -> (Subst, TyVar)
- cloneTyVarBndrs :: Subst -> [TyVar] -> UniqSupply -> (Subst, [TyVar])
- substTyCoBndr :: Subst -> PiTyBinder -> (Subst, PiTyBinder)
- tidyVarBndrs :: TidyEnv -> [TyCoVar] -> (TidyEnv, [TyCoVar])
- tidyVarBndr :: TidyEnv -> TyCoVar -> (TidyEnv, TyCoVar)
- tidyForAllTyBinder :: TidyEnv -> VarBndr TyCoVar vis -> (TidyEnv, VarBndr TyCoVar vis)
- tidyForAllTyBinders :: TidyEnv -> [VarBndr TyCoVar vis] -> (TidyEnv, [VarBndr TyCoVar vis])
- tidyFreeTyCoVars :: TidyEnv -> [TyCoVar] -> TidyEnv
- tidyOpenTyCoVars :: TidyEnv -> [TyCoVar] -> (TidyEnv, [TyCoVar])
- tidyOpenTyCoVar :: TidyEnv -> TyCoVar -> (TidyEnv, TyCoVar)
- tidyTyCoVarOcc :: TidyEnv -> TyCoVar -> TyCoVar
- tidyTypes :: TidyEnv -> [Type] -> [Type]
- tidyType :: TidyEnv -> Type -> Type
- tidyOpenTypes :: TidyEnv -> [Type] -> (TidyEnv, [Type])
- tidyOpenType :: TidyEnv -> Type -> (TidyEnv, Type)
- tidyTopType :: Type -> Type
- tidyCo :: TidyEnv -> Coercion -> Coercion
- tidyCos :: TidyEnv -> [Coercion] -> [Coercion]
- kindRep :: HasDebugCallStack => Kind -> RuntimeRepType
- kindRep_maybe :: HasDebugCallStack => Kind -> Maybe RuntimeRepType
- isUnliftedTypeKind :: Kind -> Bool
- pickyIsLiftedTypeKind :: Kind -> Bool
- kindBoxedRepLevity_maybe :: Type -> Maybe Levity
- isLiftedRuntimeRep :: RuntimeRepType -> Bool
- isUnliftedRuntimeRep :: RuntimeRepType -> Bool
- isLiftedLevity :: Type -> Bool
- isUnliftedLevity :: Type -> Bool
- isRuntimeRepVar :: TyVar -> Bool
- isLevityVar :: TyVar -> Bool
- isMultiplicityVar :: TyVar -> Bool
- splitRuntimeRep_maybe :: RuntimeRepType -> Maybe (TyCon, [Type])
- isBoxedRuntimeRep :: RuntimeRepType -> Bool
- runtimeRepLevity_maybe :: RuntimeRepType -> Maybe Levity
- levityType_maybe :: LevityType -> Maybe Levity
- mapTyCo :: Monad m => TyCoMapper () m -> (Type -> m Type, [Type] -> m [Type], Coercion -> m Coercion, [Coercion] -> m [Coercion])
- mapTyCoX :: Monad m => TyCoMapper env m -> (env -> Type -> m Type, env -> [Type] -> m [Type], env -> Coercion -> m Coercion, env -> [Coercion] -> m [Coercion])
- getTyVar :: HasDebugCallStack => Type -> TyVar
- repGetTyVar_maybe :: Type -> Maybe TyVar
- isTyVarTy :: Type -> Bool
- getCastedTyVar_maybe :: Type -> Maybe (TyVar, CoercionN)
- mkAppTys :: Type -> [Type] -> Type
- splitAppTy_maybe :: Type -> Maybe (Type, Type)
- splitAppTy :: Type -> (Type, Type)
- splitAppTyNoView_maybe :: HasDebugCallStack => Type -> Maybe (Type, Type)
- tcSplitAppTyNoView_maybe :: Type -> Maybe (Type, Type)
- splitAppTys :: Type -> (Type, [Type])
- splitAppTysNoView :: HasDebugCallStack => Type -> (Type, [Type])
- mkNumLitTy :: Integer -> Type
- isNumLitTy :: Type -> Maybe Integer
- mkStrLitTy :: FastString -> Type
- isStrLitTy :: Type -> Maybe FastString
- mkCharLitTy :: Char -> Type
- isCharLitTy :: Type -> Maybe Char
- isLitTy :: Type -> Maybe TyLit
- userTypeError_maybe :: Type -> Maybe Type
- pprUserTypeErrorTy :: Type -> SDoc
- funTyConAppTy_maybe :: FunTyFlag -> Type -> Type -> Type -> Maybe (TyCon, [Type])
- tyConAppFunTy_maybe :: HasDebugCallStack => TyCon -> [Type] -> Maybe Type
- tyConAppFunCo_maybe :: HasDebugCallStack => Role -> TyCon -> [Coercion] -> Maybe Coercion
- mkFunctionType :: HasDebugCallStack => Mult -> Type -> Type -> Type
- mkScaledFunctionTys :: [Scaled Type] -> Type -> Type
- splitFunTy :: Type -> (Mult, Type, Type)
- splitFunTy_maybe :: Type -> Maybe (FunTyFlag, Mult, Type, Type)
- splitFunTys :: Type -> ([Scaled Type], Type)
- funArgTy :: Type -> Type
- piResultTys :: HasDebugCallStack => Type -> [Type] -> Type
- applyTysX :: HasDebugCallStack => [TyVar] -> Type -> [Type] -> Type
- tyConAppTyConPicky_maybe :: Type -> Maybe TyCon
- tyConAppTyCon :: HasDebugCallStack => Type -> TyCon
- tyConAppArgs_maybe :: Type -> Maybe [Type]
- tyConAppArgs :: HasCallStack => Type -> [Type]
- splitTyConAppNoView_maybe :: Type -> Maybe (TyCon, [Type])
- tcSplitTyConApp_maybe :: HasCallStack => Type -> Maybe (TyCon, [Type])
- tcSplitTyConApp :: Type -> (TyCon, [Type])
- newTyConInstRhs :: TyCon -> [Type] -> Type
- splitCastTy_maybe :: Type -> Maybe (Type, Coercion)
- isCoercionTy_maybe :: Type -> Maybe Coercion
- stripCoercionTy :: Type -> Coercion
- tyConBindersPiTyBinders :: [TyConBinder] -> [PiTyBinder]
- mkTyCoInvForAllTy :: TyCoVar -> Type -> Type
- mkInfForAllTy :: TyVar -> Type -> Type
- mkTyCoInvForAllTys :: [TyCoVar] -> Type -> Type
- mkInfForAllTys :: [TyVar] -> Type -> Type
- mkSpecForAllTy :: TyVar -> Type -> Type
- mkSpecForAllTys :: [TyVar] -> Type -> Type
- mkVisForAllTys :: [TyVar] -> Type -> Type
- mkTyConBindersPreferAnon :: [TyVar] -> TyCoVarSet -> [TyConBinder]
- splitForAllForAllTyBinders :: Type -> ([ForAllTyBinder], Type)
- splitForAllTyCoVars :: Type -> ([TyCoVar], Type)
- splitForAllTyVars :: Type -> ([TyVar], Type)
- splitForAllReqTyBinders :: Type -> ([ReqTyBinder], Type)
- splitForAllInvisTyBinders :: Type -> ([InvisTyBinder], Type)
- isForAllTy :: Type -> Bool
- isForAllTy_ty :: Type -> Bool
- isForAllTy_co :: Type -> Bool
- isPiTy :: Type -> Bool
- isFunTy :: Type -> Bool
- splitForAllTyCoVar :: Type -> (TyCoVar, Type)
- dropForAlls :: Type -> Type
- splitForAllTyCoVar_maybe :: Type -> Maybe (TyCoVar, Type)
- splitForAllTyVar_maybe :: Type -> Maybe (TyVar, Type)
- splitForAllCoVar_maybe :: Type -> Maybe (CoVar, Type)
- splitPiTy_maybe :: Type -> Maybe (PiTyBinder, Type)
- splitPiTy :: Type -> (PiTyBinder, Type)
- splitPiTys :: Type -> ([PiTyBinder], Type)
- getRuntimeArgTys :: Type -> [(Scaled Type, FunTyFlag)]
- invisibleTyBndrCount :: Type -> Int
- splitInvisPiTys :: Type -> ([PiTyBinder], Type)
- splitInvisPiTysN :: Int -> Type -> ([PiTyBinder], Type)
- filterOutInvisibleTypes :: TyCon -> [Type] -> [Type]
- filterOutInferredTypes :: TyCon -> [Type] -> [Type]
- partitionInvisibles :: [(a, ForAllTyFlag)] -> ([a], [a])
- tyConForAllTyFlags :: TyCon -> [Type] -> [ForAllTyFlag]
- appTyForAllTyFlags :: Type -> [Type] -> [ForAllTyFlag]
- isTauTy :: Type -> Bool
- isAtomicTy :: Type -> Bool
- mkFamilyTyConApp :: TyCon -> [Type] -> Type
- coAxNthLHS :: forall (br :: BranchFlag). CoAxiom br -> Int -> Type
- isFamFreeTy :: Type -> Bool
- isCoVarType :: Type -> Bool
- buildSynTyCon :: Name -> [KnotTied TyConBinder] -> Kind -> [Role] -> KnotTied Type -> TyCon
- isUnliftedType :: HasDebugCallStack => Type -> Bool
- mightBeLiftedType :: Type -> Bool
- mightBeUnliftedType :: Type -> Bool
- isBoxedType :: Type -> Bool
- isRuntimeRepKindedTy :: Type -> Bool
- dropRuntimeRepArgs :: [Type] -> [Type]
- getRuntimeRep :: HasDebugCallStack => Type -> RuntimeRepType
- isUnboxedTupleType :: Type -> Bool
- isUnboxedSumType :: Type -> Bool
- isDataFamilyAppType :: Type -> Bool
- isStrictType :: HasDebugCallStack => Type -> Bool
- isPrimitiveType :: Type -> Bool
- isValidJoinPointType :: JoinArity -> Type -> Bool
- seqType :: Type -> ()
- seqTypes :: [Type] -> ()
- sORTKind_maybe :: Kind -> Maybe (TypeOrConstraint, Type)
- isTYPEorCONSTRAINT :: Kind -> Bool
- tyConIsTYPEorCONSTRAINT :: TyCon -> Bool
- isConstraintLikeKind :: Kind -> Bool
- isConstraintKind :: Kind -> Bool
- tcIsLiftedTypeKind :: Kind -> Bool
- tcIsBoxedTypeKind :: Kind -> Bool
- isTypeLikeKind :: Kind -> Bool
- returnsConstraintKind :: Kind -> Bool
- typeHasFixedRuntimeRep :: HasDebugCallStack => Type -> Bool
- argsHaveFixedRuntimeRep :: Type -> Bool
- isFixedRuntimeRepKind :: HasDebugCallStack => Kind -> Bool
- isConcrete :: Type -> Bool
- tyConAppNeedsKindSig :: Bool -> TyCon -> Int -> Bool
- unrestricted :: a -> Scaled a
- linear :: a -> Scaled a
- tymult :: a -> Scaled a
- irrelevantMult :: Scaled a -> a
- mkScaled :: Mult -> a -> Scaled a
- scaledSet :: Scaled a -> b -> Scaled b
- isManyTy :: Mult -> Bool
- isOneTy :: Mult -> Bool
- isLinearType :: Type -> Bool
- mkTYPEapp :: RuntimeRepType -> Type
- mkTYPEapp_maybe :: RuntimeRepType -> Maybe Type
- mkCONSTRAINTapp :: RuntimeRepType -> Type
- mkCONSTRAINTapp_maybe :: RuntimeRepType -> Maybe Type
- mkBoxedRepApp_maybe :: LevityType -> Maybe Type
- mkTupleRepApp_maybe :: Type -> Maybe Type
- typeOrConstraintKind :: TypeOrConstraint -> RuntimeRepType -> Kind
- negateOverLitVal :: OverLitVal -> OverLitVal
- litNumIsSigned :: LitNumType -> Bool
- litNumBitSize :: Platform -> LitNumType -> Maybe Word
- mkLitNumberWrap :: Platform -> LitNumType -> Integer -> Literal
- litNumWrap :: Platform -> Literal -> Literal
- litNumCoerce :: LitNumType -> Platform -> Literal -> Literal
- litNumNarrow :: LitNumType -> Platform -> Literal -> Literal
- litNumCheckRange :: Platform -> LitNumType -> Integer -> Bool
- litNumRange :: Platform -> LitNumType -> (Maybe Integer, Maybe Integer)
- mkLitNumber :: Platform -> LitNumType -> Integer -> Literal
- mkLitInt :: Platform -> Integer -> Literal
- mkLitIntWrap :: Platform -> Integer -> Literal
- mkLitIntUnchecked :: Integer -> Literal
- mkLitIntWrapC :: Platform -> Integer -> (Literal, Bool)
- mkLitWord :: Platform -> Integer -> Literal
- mkLitWordWrap :: Platform -> Integer -> Literal
- mkLitWordUnchecked :: Integer -> Literal
- mkLitWordWrapC :: Platform -> Integer -> (Literal, Bool)
- mkLitInt8 :: Integer -> Literal
- mkLitInt8Wrap :: Integer -> Literal
- mkLitInt8Unchecked :: Integer -> Literal
- mkLitWord8 :: Integer -> Literal
- mkLitWord8Wrap :: Integer -> Literal
- mkLitWord8Unchecked :: Integer -> Literal
- mkLitInt16 :: Integer -> Literal
- mkLitInt16Wrap :: Integer -> Literal
- mkLitInt16Unchecked :: Integer -> Literal
- mkLitWord16 :: Integer -> Literal
- mkLitWord16Wrap :: Integer -> Literal
- mkLitWord16Unchecked :: Integer -> Literal
- mkLitInt32 :: Integer -> Literal
- mkLitInt32Wrap :: Integer -> Literal
- mkLitInt32Unchecked :: Integer -> Literal
- mkLitWord32 :: Integer -> Literal
- mkLitWord32Wrap :: Integer -> Literal
- mkLitWord32Unchecked :: Integer -> Literal
- mkLitInt64 :: Integer -> Literal
- mkLitInt64Wrap :: Integer -> Literal
- mkLitInt64Unchecked :: Integer -> Literal
- mkLitWord64 :: Integer -> Literal
- mkLitWord64Wrap :: Integer -> Literal
- mkLitWord64Unchecked :: Integer -> Literal
- mkLitFloat :: Rational -> Literal
- mkLitDouble :: Rational -> Literal
- mkLitChar :: Char -> Literal
- mkLitString :: String -> Literal
- mkLitBigNat :: Integer -> Literal
- isLitRubbish :: Literal -> Bool
- isMinBound :: Platform -> Literal -> Bool
- isMaxBound :: Platform -> Literal -> Bool
- inCharRange :: Char -> Bool
- isZeroLit :: Literal -> Bool
- isOneLit :: Literal -> Bool
- litValue :: Literal -> Integer
- isLitValue_maybe :: Literal -> Maybe Integer
- mapLitValue :: Platform -> (Integer -> Integer) -> Literal -> Literal
- narrowInt8Lit :: Literal -> Literal
- narrowInt16Lit :: Literal -> Literal
- narrowInt32Lit :: Literal -> Literal
- narrowInt64Lit :: Literal -> Literal
- narrowWord8Lit :: Literal -> Literal
- narrowWord16Lit :: Literal -> Literal
- narrowWord32Lit :: Literal -> Literal
- narrowWord64Lit :: Literal -> Literal
- convertToWordLit :: Platform -> Literal -> Literal
- convertToIntLit :: Platform -> Literal -> Literal
- charToIntLit :: Literal -> Literal
- intToCharLit :: Literal -> Literal
- floatToIntLit :: Literal -> Literal
- intToFloatLit :: Literal -> Literal
- doubleToIntLit :: Literal -> Literal
- intToDoubleLit :: Literal -> Literal
- floatToDoubleLit :: Literal -> Literal
- doubleToFloatLit :: Literal -> Literal
- nullAddrLit :: Literal
- litIsTrivial :: Literal -> Bool
- litIsDupable :: Platform -> Literal -> Bool
- litFitsInChar :: Literal -> Bool
- litIsLifted :: Literal -> Bool
- literalType :: Literal -> Type
- pprLiteral :: (SDoc -> SDoc) -> Literal -> SDoc
- pprParendCo :: Coercion -> SDoc
- coVarName :: CoVar -> Name
- setCoVarUnique :: CoVar -> Unique -> CoVar
- setCoVarName :: CoVar -> Name -> CoVar
- etaExpandCoAxBranch :: CoAxBranch -> ([TyVar], [Type], Type)
- pprCoAxiom :: forall (br :: BranchFlag). CoAxiom br -> SDoc
- pprCoAxBranchUser :: TyCon -> CoAxBranch -> SDoc
- pprCoAxBranchLHS :: TyCon -> CoAxBranch -> SDoc
- pprCoAxBranch :: TyCon -> CoAxBranch -> SDoc
- tidyCoAxBndrsForUser :: TidyEnv -> [Var] -> (TidyEnv, [Var])
- coToMCo :: Coercion -> MCoercion
- checkReflexiveMCo :: MCoercion -> MCoercion
- isGReflMCo :: MCoercion -> Bool
- mkTransMCo :: MCoercion -> MCoercion -> MCoercion
- mkTransMCoL :: MCoercion -> Coercion -> MCoercion
- mkTransMCoR :: Coercion -> MCoercion -> MCoercion
- mkSymMCo :: MCoercion -> MCoercion
- mkCastTyMCo :: Type -> MCoercion -> Type
- mkHomoForAllMCo :: TyCoVar -> MCoercion -> MCoercion
- mkPiMCos :: [Var] -> MCoercion -> MCoercion
- mkFunResMCo :: Id -> MCoercionR -> MCoercionR
- mkGReflLeftMCo :: Role -> Type -> MCoercionN -> Coercion
- mkGReflRightMCo :: Role -> Type -> MCoercionN -> Coercion
- mkCoherenceRightMCo :: Role -> Type -> MCoercionN -> Coercion -> Coercion
- isReflMCo :: MCoercion -> Bool
- decomposeCo :: Arity -> Coercion -> Infinite Role -> [Coercion]
- decomposeFunCo :: HasDebugCallStack => Coercion -> (CoercionN, Coercion, Coercion)
- getCoVar_maybe :: Coercion -> Maybe CoVar
- multToCo :: Mult -> Coercion
- splitAppCo_maybe :: Coercion -> Maybe (Coercion, Coercion)
- splitFunCo_maybe :: Coercion -> Maybe (Coercion, Coercion)
- splitForAllCo_maybe :: Coercion -> Maybe (TyCoVar, Coercion, Coercion)
- splitForAllCo_ty_maybe :: Coercion -> Maybe (TyVar, Coercion, Coercion)
- splitForAllCo_co_maybe :: Coercion -> Maybe (CoVar, Coercion, Coercion)
- coVarLType :: HasDebugCallStack => CoVar -> Type
- coVarRType :: HasDebugCallStack => CoVar -> Type
- coVarTypes :: HasDebugCallStack => CoVar -> Pair Type
- coVarKind :: CoVar -> Type
- mkRuntimeRepCo :: HasDebugCallStack => Coercion -> Coercion
- isReflCoVar_maybe :: Var -> Maybe Coercion
- isGReflCo_maybe :: Coercion -> Maybe (Type, Role)
- isReflCo_maybe :: Coercion -> Maybe (Type, Role)
- isReflexiveCo_maybe :: Coercion -> Maybe (Type, Role)
- mkRepReflCo :: Type -> Coercion
- mkFunCoNoFTF :: HasDebugCallStack => Role -> CoercionN -> Coercion -> Coercion -> Coercion
- mkNakedFunCo2 :: Role -> FunTyFlag -> FunTyFlag -> CoercionN -> Coercion -> Coercion -> Coercion
- mkAppCos :: Coercion -> [Coercion] -> Coercion
- mkForAllCos :: [(TyCoVar, CoercionN)] -> Coercion -> Coercion
- mkHomoForAllCos :: [TyCoVar] -> Coercion -> Coercion
- mkCoVarCos :: [CoVar] -> [Coercion]
- mkAxInstCo :: forall (br :: BranchFlag). Role -> CoAxiom br -> BranchIndex -> [Type] -> [Coercion] -> Coercion
- mkUnbranchedAxInstCo :: Role -> CoAxiom Unbranched -> [Type] -> [Coercion] -> Coercion
- mkAxInstRHS :: forall (br :: BranchFlag). CoAxiom br -> BranchIndex -> [Type] -> [Coercion] -> Type
- mkUnbranchedAxInstRHS :: CoAxiom Unbranched -> [Type] -> [Coercion] -> Type
- mkAxInstLHS :: forall (br :: BranchFlag). CoAxiom br -> BranchIndex -> [Type] -> [Coercion] -> Type
- mkUnbranchedAxInstLHS :: CoAxiom Unbranched -> [Type] -> [Coercion] -> Type
- mkHoleCo :: CoercionHole -> Coercion
- getNthFun :: FunSel -> a -> a -> a -> a
- mkGReflRightCo :: Role -> Type -> CoercionN -> Coercion
- mkGReflLeftCo :: Role -> Type -> CoercionN -> Coercion
- mkCoherenceLeftCo :: Role -> Type -> CoercionN -> Coercion -> Coercion
- mkCoherenceRightCo :: Role -> Type -> CoercionN -> Coercion -> Coercion
- downgradeRole :: Role -> Role -> Coercion -> Coercion
- setNominalRole_maybe :: Role -> Coercion -> Maybe CoercionN
- tyConRolesX :: Role -> TyCon -> Infinite Role
- tyConRoleListX :: Role -> TyCon -> [Role]
- tyConRolesRepresentational :: TyCon -> Infinite Role
- tyConRoleListRepresentational :: TyCon -> [Role]
- tyConRole :: Role -> TyCon -> Int -> Role
- funRole :: Role -> FunSel -> Role
- ltRole :: Role -> Role -> Bool
- promoteCoercion :: Coercion -> CoercionN
- castCoercionKind2 :: Coercion -> Role -> Type -> Type -> CoercionN -> CoercionN -> Coercion
- castCoercionKind1 :: Coercion -> Role -> Type -> Type -> CoercionN -> Coercion
- castCoercionKind :: Coercion -> CoercionN -> CoercionN -> Coercion
- mkPiCos :: Role -> [Var] -> Coercion -> Coercion
- mkPiCo :: Role -> Var -> Coercion -> Coercion
- mkFunResCo :: Role -> Id -> Coercion -> Coercion
- mkCoCast :: Coercion -> CoercionR -> Coercion
- instNewTyCon_maybe :: TyCon -> [Type] -> Maybe (Type, Coercion)
- composeSteppers :: NormaliseStepper ev -> NormaliseStepper ev -> NormaliseStepper ev
- unwrapNewTypeStepper :: NormaliseStepper Coercion
- topNormaliseTypeX :: NormaliseStepper ev -> (ev -> ev -> ev) -> Type -> Maybe (ev, Type)
- eqCoercion :: Coercion -> Coercion -> Bool
- eqCoercionX :: RnEnv2 -> Coercion -> Coercion -> Bool
- liftCoSubstWithEx :: Role -> [TyVar] -> [Coercion] -> [TyCoVar] -> [Type] -> (Type -> Coercion, [Type])
- liftCoSubstWith :: Role -> [TyCoVar] -> [Coercion] -> Type -> Coercion
- emptyLiftingContext :: InScopeSet -> LiftingContext
- mkSubstLiftingContext :: Subst -> LiftingContext
- extendLiftingContext :: LiftingContext -> TyCoVar -> Coercion -> LiftingContext
- extendLiftingContextAndInScope :: LiftingContext -> TyCoVar -> Coercion -> LiftingContext
- zapLiftingContext :: LiftingContext -> LiftingContext
- substForAllCoBndrUsingLC :: Bool -> (Coercion -> Coercion) -> LiftingContext -> TyCoVar -> Coercion -> (LiftingContext, TyCoVar, Coercion)
- liftCoSubstTyVar :: LiftingContext -> Role -> TyVar -> Maybe Coercion
- liftCoSubstVarBndrUsing :: (r -> CoercionN) -> (LiftingContext -> Type -> r) -> LiftingContext -> TyCoVar -> (LiftingContext, TyCoVar, r)
- isMappedByLC :: TyCoVar -> LiftingContext -> Bool
- substLeftCo :: LiftingContext -> Coercion -> Coercion
- substRightCo :: LiftingContext -> Coercion -> Coercion
- swapLiftCoEnv :: LiftCoEnv -> LiftCoEnv
- lcSubstLeft :: LiftingContext -> Subst
- lcSubstRight :: LiftingContext -> Subst
- liftEnvSubstLeft :: Subst -> LiftCoEnv -> Subst
- liftEnvSubstRight :: Subst -> LiftCoEnv -> Subst
- lcSubst :: LiftingContext -> Subst
- lcInScopeSet :: LiftingContext -> InScopeSet
- coercionKinds :: [Coercion] -> Pair [Type]
- coercionKindRole :: Coercion -> (Pair Type, Role)
- getNthFromType :: HasDebugCallStack => CoSel -> Type -> Type
- coercionRole :: Coercion -> Role
- mkPrimEqPred :: Type -> Type -> Type
- mkPrimEqPredRole :: Role -> Type -> Type -> PredType
- mkHeteroPrimEqPred :: Kind -> Kind -> Type -> Type -> Type
- mkHeteroReprPrimEqPred :: Kind -> Kind -> Type -> Type -> Type
- mkReprPrimEqPred :: Type -> Type -> Type
- buildCoercion :: Type -> Type -> CoercionN
- hasCoercionHoleTy :: Type -> Bool
- hasCoercionHoleCo :: Coercion -> Bool
- hasThisCoercionHoleTy :: Type -> CoercionHole -> Bool
- setCoHoleType :: CoercionHole -> Type -> CoercionHole
- suggestExtension :: Extension -> GhcHint
- suggestExtensionWithInfo :: SDoc -> Extension -> GhcHint
- suggestExtensions :: [Extension] -> GhcHint
- suggestExtensionsWithInfo :: SDoc -> [Extension] -> GhcHint
- suggestAnyExtension :: [Extension] -> GhcHint
- suggestAnyExtensionWithInfo :: SDoc -> [Extension] -> GhcHint
- useExtensionInOrderTo :: SDoc -> Extension -> GhcHint
- emptyMessages :: Messages e
- mkMessages :: Bag (MsgEnvelope e) -> Messages e
- isEmptyMessages :: Messages e -> Bool
- singleMessage :: MsgEnvelope e -> Messages e
- addMessage :: MsgEnvelope e -> Messages e -> Messages e
- unionMessages :: Messages e -> Messages e -> Messages e
- unionManyMessages :: Foldable f => f (Messages e) -> Messages e
- mkDecorated :: [SDoc] -> DecoratedSDoc
- mkSimpleDecorated :: SDoc -> DecoratedSDoc
- unionDecoratedSDoc :: DecoratedSDoc -> DecoratedSDoc -> DecoratedSDoc
- mapDecoratedSDoc :: (SDoc -> SDoc) -> DecoratedSDoc -> DecoratedSDoc
- noHints :: [GhcHint]
- mkPlainDiagnostic :: DiagnosticReason -> [GhcHint] -> SDoc -> DiagnosticMessage
- mkPlainError :: [GhcHint] -> SDoc -> DiagnosticMessage
- mkDecoratedDiagnostic :: DiagnosticReason -> [GhcHint] -> [SDoc] -> DiagnosticMessage
- mkDecoratedError :: [GhcHint] -> [SDoc] -> DiagnosticMessage
- pprMessageBag :: Bag SDoc -> SDoc
- mkLocMessage :: MessageClass -> SrcSpan -> SDoc -> SDoc
- mkLocMessageWarningGroups :: Bool -> MessageClass -> SrcSpan -> SDoc -> SDoc
- getCaretDiagnostic :: MessageClass -> SrcSpan -> IO SDoc
- isIntrinsicErrorMessage :: Diagnostic e => MsgEnvelope e -> Bool
- isWarningMessage :: Diagnostic e => MsgEnvelope e -> Bool
- errorsFound :: Diagnostic e => Messages e -> Bool
- isExtrinsicErrorMessage :: MsgEnvelope e -> Bool
- errorsOrFatalWarningsFound :: Messages e -> Bool
- getWarningMessages :: Diagnostic e => Messages e -> Bag (MsgEnvelope e)
- getErrorMessages :: Diagnostic e => Messages e -> Bag (MsgEnvelope e)
- partitionMessages :: Diagnostic e => Messages e -> (Messages e, Messages e)
- diag_wopt :: WarningFlag -> DiagOpts -> Bool
- diag_fatal_wopt :: WarningFlag -> DiagOpts -> Bool
- diagReasonSeverity :: DiagOpts -> DiagnosticReason -> Severity
- mkMCDiagnostic :: DiagOpts -> DiagnosticReason -> Maybe DiagnosticCode -> MessageClass
- errorDiagnostic :: MessageClass
- mkMsgEnvelope :: Diagnostic e => DiagOpts -> SrcSpan -> NamePprCtx -> e -> MsgEnvelope e
- mkErrorMsgEnvelope :: Diagnostic e => SrcSpan -> NamePprCtx -> e -> MsgEnvelope e
- mkPlainMsgEnvelope :: Diagnostic e => DiagOpts -> SrcSpan -> e -> MsgEnvelope e
- mkPlainErrorMsgEnvelope :: Diagnostic e => SrcSpan -> e -> MsgEnvelope e
- andValid :: Validity' a -> Validity' a -> Validity' a
- allValid :: [Validity' a] -> Validity' a
- getInvalids :: [Validity' a] -> [a]
- formatBulleted :: SDocContext -> DecoratedSDoc -> SDoc
- pprMessages :: Diagnostic e => DiagnosticOpts e -> Messages e -> SDoc
- pprMsgEnvelopeBagWithLoc :: Diagnostic e => DiagnosticOpts e -> Bag (MsgEnvelope e) -> [SDoc]
- pprMsgEnvelopeBagWithLocDefault :: Diagnostic e => Bag (MsgEnvelope e) -> [SDoc]
- pprLocMsgEnvelopeDefault :: Diagnostic e => MsgEnvelope e -> SDoc
- pprLocMsgEnvelope :: Diagnostic e => DiagnosticOpts e -> MsgEnvelope e -> SDoc
- sortMsgBag :: Maybe DiagOpts -> Bag (MsgEnvelope e) -> [MsgEnvelope e]
- ghcExit :: Logger -> Int -> IO ()
- errorMsg :: Logger -> SDoc -> IO ()
- fatalErrorMsg :: Logger -> SDoc -> IO ()
- compilationProgressMsg :: Logger -> SDoc -> IO ()
- showPass :: Logger -> String -> IO ()
- withTiming :: MonadIO m => Logger -> SDoc -> (a -> ()) -> m a -> m a
- withTimingSilent :: MonadIO m => Logger -> SDoc -> (a -> ()) -> m a -> m a
- debugTraceMsg :: Logger -> Int -> SDoc -> IO ()
- putMsg :: Logger -> SDoc -> IO ()
- printInfoForUser :: Logger -> NamePprCtx -> SDoc -> IO ()
- printOutputForUser :: Logger -> NamePprCtx -> SDoc -> IO ()
- logInfo :: Logger -> SDoc -> IO ()
- logOutput :: Logger -> SDoc -> IO ()
- prettyPrintGhcErrors :: ExceptionMonad m => Logger -> m a -> m a
- traceCmd :: Logger -> String -> String -> IO a -> IO a
- traceSystoolCommand :: Logger -> String -> IO a -> IO a
- simplCountN :: SimplCount -> Int
- zeroSimplCount :: Bool -> SimplCount
- isZeroSimplCount :: SimplCount -> Bool
- hasDetailedCounts :: SimplCount -> Bool
- doFreeSimplTick :: Tick -> SimplCount -> SimplCount
- doSimplTick :: Int -> Tick -> SimplCount -> SimplCount
- plusSimplCount :: SimplCount -> SimplCount -> SimplCount
- pprSimplCount :: SimplCount -> SDoc
- mkEqSpec :: TyVar -> Type -> EqSpec
- eqSpecTyVar :: EqSpec -> TyVar
- eqSpecType :: EqSpec -> Type
- eqSpecPair :: EqSpec -> (TyVar, Type)
- eqSpecPreds :: [EqSpec] -> ThetaType
- eqHsBang :: HsImplBang -> HsImplBang -> Bool
- isBanged :: HsImplBang -> Bool
- isSrcStrict :: SrcStrictness -> Bool
- isSrcUnpacked :: SrcUnpackedness -> Bool
- isMarkedStrict :: StrictnessMark -> Bool
- cbvFromStrictMark :: StrictnessMark -> CbvMark
- mkDataCon :: Name -> Bool -> TyConRepName -> [HsSrcBang] -> [FieldLabel] -> [TyVar] -> [TyCoVar] -> [InvisTVBinder] -> [EqSpec] -> KnotTied ThetaType -> [KnotTied (Scaled Type)] -> KnotTied Type -> PromDataConInfo -> KnotTied TyCon -> ConTag -> ThetaType -> Id -> DataConRep -> DataCon
- dataConTag :: DataCon -> ConTag
- dataConTagZ :: DataCon -> ConTagZ
- dataConOrigTyCon :: DataCon -> TyCon
- dataConRepType :: DataCon -> Type
- dataConIsInfix :: DataCon -> Bool
- dataConUnivTyVars :: DataCon -> [TyVar]
- dataConUnivAndExTyCoVars :: DataCon -> [TyCoVar]
- dataConTheta :: DataCon -> ThetaType
- dataConWrapId_maybe :: DataCon -> Maybe Id
- dataConImplicitTyThings :: DataCon -> [TyThing]
- dataConFieldType :: DataCon -> FieldLabelString -> Type
- dataConFieldType_maybe :: DataCon -> FieldLabelString -> Maybe (FieldLabel, Type)
- dataConSrcBangs :: DataCon -> [HsSrcBang]
- dataConRepArity :: DataCon -> Arity
- isNullarySrcDataCon :: DataCon -> Bool
- isNullaryRepDataCon :: DataCon -> Bool
- dataConRepStrictness :: DataCon -> [StrictnessMark]
- dataConImplBangs :: DataCon -> [HsImplBang]
- dataConBoxer :: DataCon -> Maybe DataConBoxer
- dataConInstSig :: DataCon -> [Type] -> ([TyCoVar], ThetaType, [Type])
- dataConOrigResTy :: DataCon -> Type
- dataConWrapperType :: DataCon -> Type
- dataConNonlinearType :: DataCon -> Type
- dataConDisplayType :: Bool -> DataCon -> Type
- dataConInstArgTys :: DataCon -> [Type] -> [Scaled Type]
- dataConInstUnivs :: DataCon -> [Type] -> [Type]
- dataConOrigArgTys :: DataCon -> [Scaled Type]
- dataConOtherTheta :: DataCon -> ThetaType
- dataConRepArgTys :: DataCon -> [Scaled Type]
- dataConIdentity :: DataCon -> ByteString
- isTupleDataCon :: DataCon -> Bool
- isBoxedTupleDataCon :: DataCon -> Bool
- isUnboxedTupleDataCon :: DataCon -> Bool
- isVanillaDataCon :: DataCon -> Bool
- isNewDataCon :: DataCon -> Bool
- isCovertGadtDataCon :: DataCon -> Bool
- specialPromotedDc :: DataCon -> Bool
- classDataCon :: Class -> DataCon
- dataConCannotMatch :: [Type] -> DataCon -> Bool
- dataConResRepTyArgs :: DataCon -> [Type]
- checkDataConTyVars :: DataCon -> Bool
- dataConUserTyVarsNeedWrapper :: DataCon -> Bool
- splitDataProductType_maybe :: Type -> Maybe (TyCon, [Type], DataCon, [Scaled Type])
- hsQTvExplicit :: LHsQTyVars pass -> [LHsTyVarBndr () pass]
- hsPatSigType :: HsPatSigType pass -> LHsType pass
- mapHsOuterImplicit :: (XHsOuterImplicit pass -> XHsOuterImplicit pass) -> HsOuterTyVarBndrs flag pass -> HsOuterTyVarBndrs flag pass
- hsIPNameFS :: HsIPName -> FastString
- isHsKindedTyVar :: HsTyVarBndr flag pass -> Bool
- hsMult :: HsScaled pass a -> HsArrow pass
- hsScaledThing :: HsScaled pass a -> a
- noTypeArgs :: [Void]
- hsConPatArgs :: UnXRec p => HsConPatDetails p -> [LPat p]
- hsRecFields :: UnXRec p => HsRecFields p arg -> [XCFieldOcc p]
- hsRecFieldsArgs :: UnXRec p => HsRecFields p arg -> [arg]
- hsRecFieldSel :: UnXRec p => HsRecField p arg -> XCFieldOcc p
- isFixityLSig :: UnXRec p => LSig p -> Bool
- isTypeLSig :: UnXRec p => LSig p -> Bool
- isSpecLSig :: UnXRec p => LSig p -> Bool
- isSpecInstLSig :: UnXRec p => LSig p -> Bool
- isPragLSig :: UnXRec p => LSig p -> Bool
- isInlineLSig :: UnXRec p => LSig p -> Bool
- isMinimalLSig :: UnXRec p => LSig p -> Bool
- isSCCFunSig :: UnXRec p => LSig p -> Bool
- isCompleteMatchSig :: UnXRec p => LSig p -> Bool
- hsGroupInstDecls :: HsGroup id -> [LInstDecl id]
- isDataDecl :: TyClDecl pass -> Bool
- isSynDecl :: TyClDecl pass -> Bool
- isClassDecl :: TyClDecl pass -> Bool
- isFamilyDecl :: TyClDecl pass -> Bool
- isTypeFamilyDecl :: TyClDecl pass -> Bool
- isOpenTypeFamilyInfo :: FamilyInfo pass -> Bool
- isClosedTypeFamilyInfo :: FamilyInfo pass -> Bool
- isDataFamilyDecl :: TyClDecl pass -> Bool
- tyClDeclTyVars :: TyClDecl pass -> LHsQTyVars pass
- tyClGroupTyClDecls :: [TyClGroup pass] -> [LTyClDecl pass]
- tyClGroupInstDecls :: [TyClGroup pass] -> [LInstDecl pass]
- tyClGroupRoleDecls :: [TyClGroup pass] -> [LRoleAnnotDecl pass]
- tyClGroupKindSigs :: [TyClGroup pass] -> [LStandaloneKindSig pass]
- dataDefnConsNewOrData :: DataDefnCons a -> NewOrData
- isTypeDataDefnCons :: DataDefnCons a -> Bool
- collectRuleBndrSigTys :: [RuleBndr pass] -> [HsPatSigType pass]
- docDeclDoc :: DocDecl pass -> LHsDoc pass
- annProvenanceName_maybe :: UnXRec p => AnnProvenance p -> Maybe (IdP p)
- isInfixMatch :: Match id body -> Bool
- isPatSynCtxt :: HsMatchContext p -> Bool
- qualifiedDoModuleName_maybe :: HsStmtContext p -> Maybe ModuleName
- isComprehensionContext :: HsStmtContext id -> Bool
- isDoComprehensionContext :: HsDoFlavour -> Bool
- isMonadStmtContext :: HsStmtContext id -> Bool
- isMonadDoStmtContext :: HsDoFlavour -> Bool
- isMonadCompContext :: HsStmtContext id -> Bool
- isMonadDoCompContext :: HsDoFlavour -> Bool
- isOrphan :: IsOrphan -> Bool
- notOrphan :: IsOrphan -> Bool
- chooseOrphanAnchor :: NameSet -> IsOrphan
- isBuiltinRule :: CoreRule -> Bool
- isAutoRule :: CoreRule -> Bool
- ruleArity :: CoreRule -> Int
- ruleName :: CoreRule -> RuleName
- ruleModule :: CoreRule -> Maybe Module
- ruleActivation :: CoreRule -> Activation
- ruleIdName :: CoreRule -> Name
- isLocalRule :: CoreRule -> Bool
- setRuleIdName :: Name -> CoreRule -> CoreRule
- needSaturated :: Bool
- unSaturatedOk :: Bool
- boringCxtOk :: Bool
- boringCxtNotOk :: Bool
- noUnfolding :: Unfolding
- evaldUnfolding :: Unfolding
- bootUnfolding :: Unfolding
- mkOtherCon :: [AltCon] -> Unfolding
- unfoldingTemplate :: Unfolding -> CoreExpr
- maybeUnfoldingTemplate :: Unfolding -> Maybe CoreExpr
- otherCons :: Unfolding -> [AltCon]
- isValueUnfolding :: Unfolding -> Bool
- isEvaldUnfolding :: Unfolding -> Bool
- isConLikeUnfolding :: Unfolding -> Bool
- isCheapUnfolding :: Unfolding -> Bool
- isExpandableUnfolding :: Unfolding -> Bool
- expandUnfolding_maybe :: Unfolding -> Maybe CoreExpr
- isCompulsoryUnfolding :: Unfolding -> Bool
- isStableUnfolding :: Unfolding -> Bool
- isStableUserUnfolding :: Unfolding -> Bool
- isStableSystemUnfolding :: Unfolding -> Bool
- isInlineUnfolding :: Unfolding -> Bool
- hasSomeUnfolding :: Unfolding -> Bool
- isBootUnfolding :: Unfolding -> Bool
- neverUnfoldGuidance :: UnfoldingGuidance -> Bool
- hasCoreUnfolding :: Unfolding -> Bool
- canUnfold :: Unfolding -> Bool
- cmpAlt :: Alt a -> Alt a -> Ordering
- ltAlt :: Alt a -> Alt a -> Bool
- cmpAltCon :: AltCon -> AltCon -> Ordering
- deTagExpr :: TaggedExpr t -> CoreExpr
- mkApps :: Expr b -> [Arg b] -> Expr b
- mkCoApps :: Expr b -> [Coercion] -> Expr b
- mkVarApps :: Expr b -> [Var] -> Expr b
- mkConApp :: DataCon -> [Arg b] -> Expr b
- mkTyApps :: Expr b -> [Type] -> Expr b
- mkConApp2 :: DataCon -> [Type] -> [Var] -> Expr b
- mkTyArg :: Type -> Expr b
- mkIntLit :: Platform -> Integer -> Expr b
- mkIntLitWrap :: Platform -> Integer -> Expr b
- mkWordLit :: Platform -> Integer -> Expr b
- mkWordLitWrap :: Platform -> Integer -> Expr b
- mkWord8Lit :: Integer -> Expr b
- mkWord64LitWord64 :: Word64 -> Expr b
- mkInt64LitInt64 :: Int64 -> Expr b
- mkCharLit :: Char -> Expr b
- mkStringLit :: String -> Expr b
- mkFloatLit :: Rational -> Expr b
- mkFloatLitFloat :: Float -> Expr b
- mkDoubleLit :: Rational -> Expr b
- mkDoubleLitDouble :: Double -> Expr b
- mkLams :: [b] -> Expr b -> Expr b
- mkLets :: [Bind b] -> Expr b -> Expr b
- mkLet :: Bind b -> Expr b -> Expr b
- mkLetNonRec :: b -> Expr b -> Expr b -> Expr b
- mkLetRec :: [(b, Expr b)] -> Expr b -> Expr b
- mkTyBind :: TyVar -> Type -> CoreBind
- mkCoBind :: CoVar -> Coercion -> CoreBind
- varToCoreExpr :: CoreBndr -> Expr b
- varsToCoreExprs :: [CoreBndr] -> [Expr b]
- exprToType :: CoreExpr -> Type
- bindersOf :: Bind b -> [b]
- bindersOfBinds :: [Bind b] -> [b]
- foldBindersOfBindStrict :: (a -> b -> a) -> a -> Bind b -> a
- foldBindersOfBindsStrict :: (a -> b -> a) -> a -> [Bind b] -> a
- rhssOfBind :: Bind b -> [Expr b]
- rhssOfAlts :: [Alt b] -> [Expr b]
- flattenBinds :: [Bind b] -> [(b, Expr b)]
- collectBinders :: Expr b -> ([b], Expr b)
- collectTyBinders :: CoreExpr -> ([TyVar], CoreExpr)
- collectTyAndValBinders :: CoreExpr -> ([TyVar], [Id], CoreExpr)
- collectNBinders :: JoinArity -> Expr b -> ([b], Expr b)
- collectNValBinders_maybe :: Arity -> CoreExpr -> Maybe ([Var], CoreExpr)
- collectArgs :: Expr b -> (Expr b, [Arg b])
- collectFunSimple :: Expr b -> Expr b
- wrapLamBody :: (CoreExpr -> CoreExpr) -> CoreExpr -> CoreExpr
- stripNArgs :: Word -> Expr a -> Maybe (Expr a)
- collectArgsTicks :: (CoreTickish -> Bool) -> Expr b -> (Expr b, [Arg b], [CoreTickish])
- isRuntimeVar :: Var -> Bool
- isRuntimeArg :: CoreExpr -> Bool
- isValArg :: Expr b -> Bool
- isTyCoArg :: Expr b -> Bool
- isCoArg :: Expr b -> Bool
- isTypeArg :: Expr b -> Bool
- valBndrCount :: [CoreBndr] -> Int
- valArgCount :: [Arg b] -> Int
- collectAnnArgs :: AnnExpr b a -> (AnnExpr b a, [AnnExpr b a])
- collectAnnArgsTicks :: (CoreTickish -> Bool) -> AnnExpr b a -> (AnnExpr b a, [AnnExpr b a], [CoreTickish])
- deAnnotate :: AnnExpr bndr annot -> Expr bndr
- deAnnotate' :: AnnExpr' bndr annot -> Expr bndr
- deAnnAlt :: AnnAlt bndr annot -> Alt bndr
- deAnnBind :: AnnBind b annot -> Bind b
- collectAnnBndrs :: AnnExpr bndr annot -> ([bndr], AnnExpr bndr annot)
- collectNAnnBndrs :: Int -> AnnExpr bndr annot -> ([bndr], AnnExpr bndr annot)
- isJoinIdDetails_maybe :: IdDetails -> Maybe (JoinArity, Maybe [CbvMark])
- oneShotInfo :: IdInfo -> OneShotInfo
- arityInfo :: IdInfo -> ArityInfo
- cafInfo :: IdInfo -> CafInfo
- callArityInfo :: IdInfo -> ArityInfo
- tagSigInfo :: IdInfo -> Maybe TagSig
- setRuleInfo :: IdInfo -> RuleInfo -> IdInfo
- setInlinePragInfo :: IdInfo -> InlinePragma -> IdInfo
- setOccInfo :: IdInfo -> OccInfo -> IdInfo
- unfoldingInfo :: IdInfo -> Unfolding
- setUnfoldingInfo :: IdInfo -> Unfolding -> IdInfo
- hasInlineUnfolding :: IdInfo -> Bool
- setArityInfo :: IdInfo -> ArityInfo -> IdInfo
- setCallArityInfo :: IdInfo -> ArityInfo -> IdInfo
- setCafInfo :: IdInfo -> CafInfo -> IdInfo
- setLFInfo :: IdInfo -> LambdaFormInfo -> IdInfo
- setTagSig :: IdInfo -> TagSig -> IdInfo
- setOneShotInfo :: IdInfo -> OneShotInfo -> IdInfo
- setDemandInfo :: IdInfo -> Demand -> IdInfo
- setDmdSigInfo :: IdInfo -> DmdSig -> IdInfo
- setCprSigInfo :: IdInfo -> CprSig -> IdInfo
- noCafIdInfo :: IdInfo
- unknownArity :: Arity
- ppArityInfo :: Int -> SDoc
- pprStrictness :: DmdSig -> SDoc
- emptyRuleInfo :: RuleInfo
- isEmptyRuleInfo :: RuleInfo -> Bool
- ruleInfoFreeVars :: RuleInfo -> DVarSet
- ruleInfoRules :: RuleInfo -> [CoreRule]
- setRuleInfoHead :: Name -> RuleInfo -> RuleInfo
- mayHaveCafRefs :: CafInfo -> Bool
- ppCafInfo :: CafInfo -> SDoc
- zapLamInfo :: IdInfo -> Maybe IdInfo
- zapDemandInfo :: IdInfo -> Maybe IdInfo
- zapUsageInfo :: IdInfo -> Maybe IdInfo
- zapUsageEnvInfo :: IdInfo -> Maybe IdInfo
- zapUsedOnceInfo :: IdInfo -> Maybe IdInfo
- zapFragileInfo :: IdInfo -> Maybe IdInfo
- trimUnfolding :: Unfolding -> Unfolding
- zapTailCallInfo :: IdInfo -> Maybe IdInfo
- zapCallArityInfo :: IdInfo -> IdInfo
- idUnique :: Id -> Unique
- idType :: Id -> Kind
- idMult :: Id -> Mult
- idScaledType :: Id -> Scaled Type
- scaleIdBy :: Mult -> Id -> Id
- scaleVarBy :: Mult -> Var -> Var
- setIdName :: Id -> Name -> Id
- setIdUnique :: Id -> Unique -> Id
- setIdType :: Id -> Type -> Id
- localiseId :: Id -> Id
- setIdInfo :: Id -> IdInfo -> Id
- modifyIdInfo :: HasDebugCallStack => (IdInfo -> IdInfo) -> Id -> Id
- maybeModifyIdInfo :: Maybe IdInfo -> Id -> Id
- mkGlobalId :: IdDetails -> Name -> Type -> IdInfo -> Id
- mkVanillaGlobal :: Name -> Type -> Id
- mkVanillaGlobalWithInfo :: Name -> Type -> IdInfo -> Id
- mkLocalId :: HasDebugCallStack => Name -> Mult -> Type -> Id
- mkLocalCoVar :: Name -> Type -> CoVar
- mkLocalIdOrCoVar :: Name -> Mult -> Type -> Id
- mkLocalIdWithInfo :: HasDebugCallStack => Name -> Mult -> Type -> IdInfo -> Id
- mkExportedLocalId :: IdDetails -> Name -> Type -> Id
- mkExportedVanillaId :: Name -> Type -> Id
- mkSysLocal :: FastString -> Unique -> Mult -> Type -> Id
- mkSysLocalOrCoVar :: FastString -> Unique -> Mult -> Type -> Id
- mkSysLocalM :: MonadUnique m => FastString -> Mult -> Type -> m Id
- mkSysLocalOrCoVarM :: MonadUnique m => FastString -> Mult -> Type -> m Id
- mkUserLocal :: OccName -> Unique -> Mult -> Type -> SrcSpan -> Id
- mkUserLocalOrCoVar :: OccName -> Unique -> Mult -> Type -> SrcSpan -> Id
- mkWorkerId :: Unique -> Id -> Type -> Id
- mkTemplateLocal :: Int -> Type -> Id
- mkScaledTemplateLocal :: Int -> Scaled Type -> Id
- mkTemplateLocals :: [Type] -> [Id]
- mkTemplateLocalsNum :: Int -> [Type] -> [Id]
- recordSelectorTyCon :: Id -> RecSelParent
- recordSelectorTyCon_maybe :: Id -> Maybe RecSelParent
- isRecordSelector :: Id -> Bool
- isDataConRecordSelector :: Id -> Bool
- isPatSynRecordSelector :: Id -> Bool
- isNaughtyRecordSelector :: Id -> Bool
- isClassOpId :: Id -> Bool
- isClassOpId_maybe :: Id -> Maybe Class
- isPrimOpId :: Id -> Bool
- isDFunId :: Id -> Bool
- isPrimOpId_maybe :: Id -> Maybe PrimOp
- isFCallId :: Id -> Bool
- isFCallId_maybe :: Id -> Maybe ForeignCall
- isDataConWorkId :: Id -> Bool
- isDataConWorkId_maybe :: Id -> Maybe DataCon
- isDataConWrapId :: Id -> Bool
- isDataConWrapId_maybe :: Id -> Maybe DataCon
- isDataConId_maybe :: Id -> Maybe DataCon
- isWorkerLikeId :: Id -> Bool
- isJoinId :: Var -> Bool
- isJoinId_maybe :: Var -> Maybe JoinArity
- idDataCon :: Id -> DataCon
- hasNoBinding :: Id -> Bool
- isImplicitId :: Id -> Bool
- idIsFrom :: Module -> Id -> Bool
- isDeadBinder :: Id -> Bool
- idJoinArity :: JoinId -> JoinArity
- asJoinId :: Id -> JoinArity -> JoinId
- zapJoinId :: Id -> Id
- asJoinId_maybe :: Id -> Maybe JoinArity -> Id
- idArity :: Id -> Arity
- setIdArity :: Id -> Arity -> Id
- idCallArity :: Id -> Arity
- setIdCallArity :: Id -> Arity -> Id
- idFunRepArity :: Id -> RepArity
- isDeadEndId :: Var -> Bool
- idDmdSig :: Id -> DmdSig
- setIdDmdSig :: Id -> DmdSig -> Id
- idCprSig :: Id -> CprSig
- setIdCprSig :: Id -> CprSig -> Id
- zapIdDmdSig :: Id -> Id
- isStrictId :: Id -> Bool
- idTagSig_maybe :: Id -> Maybe TagSig
- idUnfolding :: IdUnfoldingFun
- noUnfoldingFun :: IdUnfoldingFun
- alwaysActiveUnfoldingFun :: IdUnfoldingFun
- whenActiveUnfoldingFun :: (Activation -> Bool) -> IdUnfoldingFun
- realIdUnfolding :: Id -> Unfolding
- setIdUnfolding :: Id -> Unfolding -> Id
- idDemandInfo :: Id -> Demand
- setIdDemandInfo :: Id -> Demand -> Id
- setIdTagSig :: Id -> TagSig -> Id
- setIdCbvMarks :: Id -> [CbvMark] -> Id
- idCbvMarks_maybe :: Id -> Maybe [CbvMark]
- idCbvMarkArity :: Id -> Arity
- asNonWorkerLikeId :: Id -> Id
- asWorkerLikeId :: Id -> Id
- setCaseBndrEvald :: StrictnessMark -> Id -> Id
- zapIdUnfolding :: Id -> Id
- idSpecialisation :: Id -> RuleInfo
- idCoreRules :: Id -> [CoreRule]
- idHasRules :: Id -> Bool
- setIdSpecialisation :: Id -> RuleInfo -> Id
- idCafInfo :: Id -> CafInfo
- setIdCafInfo :: Id -> CafInfo -> Id
- idLFInfo_maybe :: Id -> Maybe LambdaFormInfo
- setIdLFInfo :: Id -> LambdaFormInfo -> Id
- idOccInfo :: Id -> OccInfo
- setIdOccInfo :: Id -> OccInfo -> Id
- zapIdOccInfo :: Id -> Id
- idInlinePragma :: Id -> InlinePragma
- setInlinePragma :: Id -> InlinePragma -> Id
- modifyInlinePragma :: Id -> (InlinePragma -> InlinePragma) -> Id
- idInlineActivation :: Id -> Activation
- setInlineActivation :: Id -> Activation -> Id
- idRuleMatchInfo :: Id -> RuleMatchInfo
- isConLikeId :: Id -> Bool
- idOneShotInfo :: Id -> OneShotInfo
- setOneShotLambda :: Id -> Id
- clearOneShotLambda :: Id -> Id
- setIdOneShotInfo :: Id -> OneShotInfo -> Id
- updOneShotInfo :: Id -> OneShotInfo -> Id
- zapLamIdInfo :: Id -> Id
- zapFragileIdInfo :: Id -> Id
- zapIdDemandInfo :: Id -> Id
- zapIdUsageInfo :: Id -> Id
- zapIdUsageEnvInfo :: Id -> Id
- zapIdUsedOnceInfo :: Id -> Id
- zapIdTailCallInfo :: Id -> Id
- zapStableUnfolding :: Id -> Id
- transferPolyIdInfo :: Id -> [Var] -> Id -> Id
- wiredInTyCons :: [TyCon]
- mkWiredInTyConName :: BuiltInSyntax -> Module -> FastString -> Unique -> TyCon -> Name
- mkWiredInIdName :: Module -> FastString -> Unique -> Id -> Name
- eqTyConName :: Name
- eqTyCon_RDR :: RdrName
- heqTyConName :: Name
- coercibleTyConName :: Name
- charTyConName :: Name
- intTyConName :: Name
- boolTyConName :: Name
- listTyConName :: Name
- nilDataConName :: Name
- consDataConName :: Name
- maybeTyConName :: Name
- nothingDataConName :: Name
- justDataConName :: Name
- wordTyConName :: Name
- floatTyConName :: Name
- doubleTyConName :: Name
- anyTyCon :: TyCon
- anyTy :: Type
- makeRecoveryTyCon :: TyCon -> TyCon
- boolTyCon_RDR :: RdrName
- false_RDR :: RdrName
- true_RDR :: RdrName
- intTyCon_RDR :: RdrName
- charTyCon_RDR :: RdrName
- stringTyCon_RDR :: RdrName
- intDataCon_RDR :: RdrName
- listTyCon_RDR :: RdrName
- consDataCon_RDR :: RdrName
- typeSymbolKindCon :: TyCon
- isBuiltInOcc_maybe :: OccName -> Maybe Name
- isPunOcc_maybe :: Module -> OccName -> Maybe Name
- mkTupleStr :: Boxity -> NameSpace -> Arity -> String
- cTupleTyCon :: Arity -> TyCon
- cTupleTyConNames :: [Name]
- isCTupleTyConName :: Name -> Bool
- cTupleTyConNameArity_maybe :: Name -> Maybe Arity
- cTupleDataConNames :: [Name]
- cTupleSelId :: ConTag -> Arity -> Id
- mkPromotedPairTy :: Kind -> Kind -> Type -> Type -> Type
- isPromotedPairType :: Type -> Maybe (Type, Type)
- unitTyCon :: TyCon
- unitTyConKey :: Unique
- unitDataCon :: DataCon
- unitDataConId :: Id
- soloTyCon :: TyCon
- pairTyCon :: TyCon
- unboxedUnitTy :: Type
- unboxedUnitTyCon :: TyCon
- unboxedUnitDataCon :: DataCon
- unboxedSumKind :: [Type] -> Kind
- eqTyCon :: TyCon
- eqClass :: Class
- eqDataCon :: DataCon
- heqClass :: Class
- heqDataCon :: DataCon
- coercibleClass :: Class
- coercibleDataCon :: DataCon
- multiplicityTyConName :: Name
- oneDataConName :: Name
- manyDataConName :: Name
- oneDataCon :: DataCon
- manyDataCon :: DataCon
- unrestrictedFunTyConName :: Name
- constraintKindTyCon :: TyCon
- typeToTypeKind :: Type
- unliftedTypeKindTyConName :: Name
- unliftedDataConTyCon :: TyCon
- sumRepDataConTyCon :: TyCon
- liftedRepTyConName :: Name
- unliftedRepTyConName :: Name
- charTyCon :: TyCon
- charDataCon :: DataCon
- stringTy :: Type
- intTy :: Type
- intTyCon :: TyCon
- intDataCon :: DataCon
- wordTy :: Type
- wordTyCon :: TyCon
- wordDataCon :: DataCon
- word8Ty :: Type
- word8TyCon :: TyCon
- word8DataCon :: DataCon
- floatTy :: Type
- floatTyCon :: TyCon
- floatDataCon :: DataCon
- doubleTy :: Type
- doubleTyCon :: TyCon
- doubleDataCon :: DataCon
- boxingDataCon :: Type -> BoxingInfo b
- boolTy :: Type
- boolTyCon :: TyCon
- falseDataCon :: DataCon
- trueDataCon :: DataCon
- falseDataConId :: Id
- trueDataConId :: Id
- orderingTyCon :: TyCon
- ordLTDataCon :: DataCon
- ordEQDataCon :: DataCon
- ordGTDataCon :: DataCon
- ordLTDataConId :: Id
- ordEQDataConId :: Id
- ordGTDataConId :: Id
- mkListTy :: Type -> Type
- nilDataCon :: DataCon
- consDataCon :: DataCon
- maybeTyCon :: TyCon
- nothingDataCon :: DataCon
- justDataCon :: DataCon
- mkPromotedMaybeTy :: Kind -> Maybe Type -> Type
- mkMaybeTy :: Type -> Kind
- isPromotedMaybeTy :: Type -> Maybe (Maybe Type)
- mkTupleTy :: Boxity -> [Type] -> Type
- mkTupleTy1 :: Boxity -> [Type] -> Type
- mkConstraintTupleTy :: [Type] -> Type
- mkSumTy :: [Type] -> Type
- promotedTrueDataCon :: TyCon
- promotedFalseDataCon :: TyCon
- promotedNothingDataCon :: TyCon
- promotedJustDataCon :: TyCon
- promotedLTDataCon :: TyCon
- promotedEQDataCon :: TyCon
- promotedGTDataCon :: TyCon
- promotedConsDataCon :: TyCon
- promotedNilDataCon :: TyCon
- mkPromotedListTy :: Kind -> [Type] -> Type
- integerTyConName :: Name
- integerISDataConName :: Name
- integerIPDataConName :: Name
- integerINDataConName :: Name
- integerTyCon :: TyCon
- integerISDataCon :: DataCon
- integerIPDataCon :: DataCon
- integerINDataCon :: DataCon
- naturalTyConName :: Name
- naturalNSDataConName :: Name
- naturalNBDataConName :: Name
- naturalTyCon :: TyCon
- naturalNSDataCon :: DataCon
- naturalNBDataCon :: DataCon
- filterCTuple :: RdrName -> RdrName
- lookupOrigNameCache :: OrigNameCache -> Module -> OccName -> Maybe Name
- exprFreeVars :: CoreExpr -> VarSet
- exprFVs :: CoreExpr -> FV
- exprFreeVarsDSet :: CoreExpr -> DVarSet
- exprFreeVarsList :: CoreExpr -> [Var]
- exprFreeIds :: CoreExpr -> IdSet
- exprsFreeIds :: [CoreExpr] -> IdSet
- exprFreeIdsDSet :: CoreExpr -> DIdSet
- exprFreeIdsList :: CoreExpr -> [Id]
- exprsFreeIdsDSet :: [CoreExpr] -> DIdSet
- exprsFreeIdsList :: [CoreExpr] -> [Id]
- exprsFreeVars :: [CoreExpr] -> VarSet
- exprsFreeVarsList :: [CoreExpr] -> [Var]
- bindFreeVars :: CoreBind -> VarSet
- exprSomeFreeVars :: InterestingVarFun -> CoreExpr -> VarSet
- exprSomeFreeVarsList :: InterestingVarFun -> CoreExpr -> [Var]
- exprsSomeFreeVars :: InterestingVarFun -> [CoreExpr] -> VarSet
- exprsSomeFreeVarsList :: InterestingVarFun -> [CoreExpr] -> [Var]
- exprsOrphNames :: [CoreExpr] -> NameSet
- orphNamesOfType :: Type -> NameSet
- orphNamesOfTypes :: [Type] -> NameSet
- orphNamesOfCo :: Coercion -> NameSet
- orphNamesOfCoCon :: forall (br :: BranchFlag). CoAxiom br -> NameSet
- orphNamesOfAxiomLHS :: forall (br :: BranchFlag). CoAxiom br -> NameSet
- ruleRhsFreeVars :: CoreRule -> VarSet
- rulesRhsFreeIds :: [CoreRule] -> VarSet
- ruleLhsFreeIds :: CoreRule -> VarSet
- ruleLhsFreeIdsList :: CoreRule -> [Var]
- ruleFreeVars :: CoreRule -> VarSet
- rulesFreeVarsDSet :: [CoreRule] -> DVarSet
- rulesFreeVars :: [CoreRule] -> VarSet
- mkRuleInfo :: [CoreRule] -> RuleInfo
- freeVarsOf :: CoreExprWithFVs -> DIdSet
- freeVarsOfAnn :: FVAnn -> DIdSet
- varTypeTyCoVars :: Var -> TyCoVarSet
- varTypeTyCoFVs :: Var -> FV
- idFreeVars :: Id -> VarSet
- dIdFreeVars :: Id -> DVarSet
- idFVs :: Id -> FV
- bndrRuleAndUnfoldingVarsDSet :: Id -> DVarSet
- bndrRuleAndUnfoldingIds :: Id -> IdSet
- idRuleVars :: Id -> VarSet
- idUnfoldingVars :: Id -> VarSet
- stableUnfoldingVars :: Unfolding -> Maybe VarSet
- freeVarsBind :: CoreBind -> DVarSet -> (CoreBindWithFVs, DVarSet)
- freeVars :: CoreExpr -> CoreExprWithFVs
- exprType :: HasDebugCallStack => CoreExpr -> Type
- coreAltType :: CoreAlt -> Type
- coreAltsType :: [CoreAlt] -> Type
- mkLamType :: HasDebugCallStack => Var -> Type -> Type
- mkLamTypes :: [Var] -> Type -> Type
- applyTypeToArgs :: HasDebugCallStack => SDoc -> Type -> [CoreExpr] -> Type
- mkCastMCo :: CoreExpr -> MCoercionR -> CoreExpr
- mkPiMCo :: Var -> MCoercionR -> MCoercionR
- mkCast :: HasDebugCallStack => CoreExpr -> CoercionR -> CoreExpr
- mkTick :: CoreTickish -> CoreExpr -> CoreExpr
- mkTicks :: [CoreTickish] -> CoreExpr -> CoreExpr
- isSaturatedConApp :: CoreExpr -> Bool
- mkTickNoHNF :: CoreTickish -> CoreExpr -> CoreExpr
- tickHNFArgs :: CoreTickish -> CoreExpr -> CoreExpr
- stripTicksTop :: (CoreTickish -> Bool) -> Expr b -> ([CoreTickish], Expr b)
- stripTicksTopE :: (CoreTickish -> Bool) -> Expr b -> Expr b
- stripTicksTopT :: (CoreTickish -> Bool) -> Expr b -> [CoreTickish]
- stripTicksE :: (CoreTickish -> Bool) -> Expr b -> Expr b
- stripTicksT :: (CoreTickish -> Bool) -> Expr b -> [CoreTickish]
- bindNonRec :: HasDebugCallStack => Id -> CoreExpr -> CoreExpr -> CoreExpr
- needsCaseBinding :: Type -> CoreExpr -> Bool
- mkAltExpr :: AltCon -> [CoreBndr] -> [Type] -> CoreExpr
- mkDefaultCase :: CoreExpr -> Id -> CoreExpr -> CoreExpr
- mkSingleAltCase :: CoreExpr -> Id -> AltCon -> [Var] -> CoreExpr -> CoreExpr
- findDefault :: [Alt b] -> ([Alt b], Maybe (Expr b))
- addDefault :: [Alt b] -> Maybe (Expr b) -> [Alt b]
- isDefaultAlt :: Alt b -> Bool
- findAlt :: AltCon -> [Alt b] -> Maybe (Alt b)
- mergeAlts :: [Alt a] -> [Alt a] -> [Alt a]
- trimConArgs :: AltCon -> [CoreArg] -> [CoreArg]
- filterAlts :: TyCon -> [Type] -> [AltCon] -> [Alt b] -> ([AltCon], [Alt b])
- refineDefaultAlt :: [Unique] -> Mult -> TyCon -> [Type] -> [AltCon] -> [CoreAlt] -> (Bool, [CoreAlt])
- combineIdenticalAlts :: [AltCon] -> [CoreAlt] -> (Bool, [AltCon], [CoreAlt])
- scaleAltsBy :: Mult -> [CoreAlt] -> [CoreAlt]
- exprIsTrivial :: CoreExpr -> Bool
- getIdFromTrivialExpr :: HasDebugCallStack => CoreExpr -> Id
- getIdFromTrivialExpr_maybe :: CoreExpr -> Maybe Id
- exprIsDupable :: Platform -> CoreExpr -> Bool
- exprIsWorkFree :: CoreExpr -> Bool
- exprIsCheap :: CoreExpr -> Bool
- exprIsCheapX :: CheapAppFun -> CoreExpr -> Bool
- exprIsExpandable :: CoreExpr -> Bool
- isCheapApp :: CheapAppFun
- isExpandableApp :: CheapAppFun
- exprOkForSpeculation :: CoreExpr -> Bool
- exprOkForSideEffects :: CoreExpr -> Bool
- exprOkForSpecEval :: (Id -> Bool) -> CoreExpr -> Bool
- altsAreExhaustive :: [Alt b] -> Bool
- etaExpansionTick :: forall (pass :: TickishPass). Id -> GenTickish pass -> Bool
- exprIsHNF :: CoreExpr -> Bool
- exprIsConLike :: CoreExpr -> Bool
- exprIsTopLevelBindable :: CoreExpr -> Type -> Bool
- exprIsTickedString :: CoreExpr -> Bool
- exprIsTickedString_maybe :: CoreExpr -> Maybe ByteString
- dataConRepInstPat :: [Unique] -> Mult -> DataCon -> [Type] -> ([TyCoVar], [Id])
- dataConRepFSInstPat :: [FastString] -> [Unique] -> Mult -> DataCon -> [Type] -> ([TyCoVar], [Id])
- cheapEqExpr :: Expr b -> Expr b -> Bool
- cheapEqExpr' :: (CoreTickish -> Bool) -> Expr b -> Expr b -> Bool
- diffBinds :: Bool -> RnEnv2 -> [(Var, CoreExpr)] -> [(Var, CoreExpr)] -> ([SDoc], RnEnv2)
- isEmptyTy :: Type -> Bool
- normSplitTyConApp_maybe :: FamInstEnvs -> Type -> Maybe (TyCon, [Type], Coercion)
- extendInScopeSetBind :: InScopeSet -> CoreBind -> InScopeSet
- extendInScopeSetBndrs :: InScopeSet -> [CoreBind] -> InScopeSet
- mkInScopeSetBndrs :: [CoreBind] -> InScopeSet
- collectMakeStaticArgs :: CoreExpr -> Maybe (CoreExpr, Type, CoreExpr, CoreExpr)
- isJoinBind :: CoreBind -> Bool
- dumpIdInfoOfProgram :: Bool -> (IdInfo -> SDoc) -> CoreProgram -> SDoc
- mkStrictFieldSeqs :: [(Id, StrictnessMark)] -> CoreExpr -> CoreExpr
- shouldStrictifyIdForCbv :: Var -> Bool
- shouldUseCbvForId :: Var -> Bool
- isUnsafeEqualityProof :: CoreExpr -> Bool
- extendIdSubst :: Subst -> Id -> CoreExpr -> Subst
- extendIdSubstWithClone :: Subst -> Id -> Id -> Subst
- extendIdSubstList :: Subst -> [(Id, CoreExpr)] -> Subst
- extendSubst :: Subst -> Var -> CoreArg -> Subst
- extendSubstWithVar :: Subst -> Var -> Var -> Subst
- extendSubstList :: Subst -> [(Var, CoreArg)] -> Subst
- lookupIdSubst :: HasDebugCallStack => Subst -> Id -> CoreExpr
- lookupIdSubst_maybe :: HasDebugCallStack => Subst -> Id -> Maybe CoreExpr
- delBndr :: Subst -> Var -> Subst
- delBndrs :: Subst -> [Var] -> Subst
- mkOpenSubst :: InScopeSet -> [(Var, CoreArg)] -> Subst
- substExprSC :: HasDebugCallStack => Subst -> CoreExpr -> CoreExpr
- substExpr :: HasDebugCallStack => Subst -> CoreExpr -> CoreExpr
- substBindSC :: HasDebugCallStack => Subst -> CoreBind -> (Subst, CoreBind)
- substBind :: HasDebugCallStack => Subst -> CoreBind -> (Subst, CoreBind)
- deShadowBinds :: CoreProgram -> CoreProgram
- substBndr :: Subst -> Var -> (Subst, Var)
- substBndrs :: Traversable f => Subst -> f Var -> (Subst, f Var)
- substRecBndrs :: Traversable f => Subst -> f Id -> (Subst, f Id)
- cloneIdBndr :: Subst -> UniqSupply -> Id -> (Subst, Id)
- cloneIdBndrs :: Subst -> UniqSupply -> [Id] -> (Subst, [Id])
- cloneBndrs :: Subst -> UniqSupply -> [Var] -> (Subst, [Var])
- cloneBndr :: Subst -> Unique -> Var -> (Subst, Var)
- cloneRecIdBndrs :: Subst -> UniqSupply -> [Id] -> (Subst, [Id])
- substIdType :: Subst -> Id -> Id
- substIdInfo :: Subst -> Id -> IdInfo -> Maybe IdInfo
- substUnfoldingSC :: Subst -> Unfolding -> Unfolding
- substUnfolding :: Subst -> Unfolding -> Unfolding
- substIdOcc :: Subst -> Id -> Id
- substRuleInfo :: Subst -> Id -> RuleInfo -> RuleInfo
- substRulesForImportedIds :: Subst -> [CoreRule] -> [CoreRule]
- substDVarSet :: HasDebugCallStack => Subst -> DVarSet -> DVarSet
- substTickish :: Subst -> CoreTickish -> CoreTickish
- sortQuantVars :: [Var] -> [Var]
- mkCoreApp :: SDoc -> CoreExpr -> CoreExpr -> CoreExpr
- mkWildEvBinder :: PredType -> EvVar
- mkWildValBinder :: Mult -> Type -> Id
- mkWildCase :: CoreExpr -> Scaled Type -> Type -> [CoreAlt] -> CoreExpr
- mkIfThenElse :: CoreExpr -> CoreExpr -> CoreExpr -> CoreExpr
- castBottomExpr :: CoreExpr -> Type -> CoreExpr
- mkLitRubbish :: Type -> Maybe CoreExpr
- mkUncheckedIntExpr :: Integer -> CoreExpr
- mkIntExprInt :: Platform -> Int -> CoreExpr
- mkIntegerExpr :: Platform -> Integer -> CoreExpr
- mkNaturalExpr :: Platform -> Integer -> CoreExpr
- mkStringExprFS :: MonadThings m => FastString -> m CoreExpr
- getMkStringIds :: Applicative m => (Name -> m Id) -> m MkStringIds
- mkStringExprFSWith :: MkStringIds -> FastString -> CoreExpr
- mkCoreUnboxedTuple :: [CoreExpr] -> CoreExpr
- mkCoreTupBoxity :: Boxity -> [CoreExpr] -> CoreExpr
- mkCoreVarTupTy :: [Id] -> Type
- mkCoreTup :: [CoreExpr] -> CoreExpr
- mkCoreUnboxedSum :: Int -> Int -> [Type] -> CoreExpr -> CoreExpr
- mkBigCoreVarTupSolo :: [Id] -> CoreExpr
- mkBigCoreVarTup :: [Id] -> CoreExpr
- mkBigCoreTup :: [CoreExpr] -> CoreExpr
- mkBigCoreVarTupTy :: [Id] -> Type
- mkBigCoreTupTy :: [Type] -> Type
- unitExpr :: CoreExpr
- mkChunkified :: ([a] -> a) -> [a] -> a
- chunkify :: [a] -> [[a]]
- mkBigTupleSelector :: [Id] -> Id -> Id -> CoreExpr -> CoreExpr
- mkBigTupleSelectorSolo :: [Id] -> Id -> Id -> CoreExpr -> CoreExpr
- mkBigTupleCase :: UniqSupply -> [Id] -> CoreExpr -> CoreExpr -> CoreExpr
- wrapFloat :: FloatBind -> CoreExpr -> CoreExpr
- wrapFloats :: [FloatBind] -> CoreExpr -> CoreExpr
- floatBindings :: FloatBind -> [Var]
- mkNilExpr :: Type -> CoreExpr
- mkConsExpr :: Type -> CoreExpr -> CoreExpr -> CoreExpr
- mkListExpr :: Type -> [CoreExpr] -> CoreExpr
- mkFoldrExpr :: MonadThings m => Type -> Type -> CoreExpr -> CoreExpr -> CoreExpr -> m CoreExpr
- mkBuildExpr :: (MonadFail m, MonadThings m, MonadUnique m) => Type -> ((Id, Type) -> (Id, Type) -> m CoreExpr) -> m CoreExpr
- mkNothingExpr :: Type -> CoreExpr
- mkJustExpr :: Type -> CoreExpr -> CoreExpr
- mkRuntimeErrorApp :: Id -> Type -> String -> CoreExpr
- errorIds :: [Id]
- rEC_SEL_ERROR_ID :: Id
- rEC_CON_ERROR_ID :: Id
- pAT_ERROR_ID :: Id
- nO_METHOD_BINDING_ERROR_ID :: Id
- nON_EXHAUSTIVE_GUARDS_ERROR_ID :: Id
- tYPE_ERROR_ID :: Id
- aBSENT_SUM_FIELD_ERROR_ID :: Id
- mkImpossibleExpr :: Type -> String -> CoreExpr
- mkAbsentErrorApp :: Type -> String -> CoreExpr
- addGlobalInclude :: IncludeSpecs -> [String] -> IncludeSpecs
- addQuoteInclude :: IncludeSpecs -> [String] -> IncludeSpecs
- addImplicitQuoteInclude :: IncludeSpecs -> [String] -> IncludeSpecs
- flattenIncludes :: IncludeSpecs -> [String]
- settings :: DynFlags -> Settings
- programName :: DynFlags -> String
- projectVersion :: DynFlags -> String
- ghcUsagePath :: DynFlags -> FilePath
- ghciUsagePath :: DynFlags -> FilePath
- topDir :: DynFlags -> FilePath
- extraGccViaCFlags :: DynFlags -> [String]
- globalPackageDatabasePath :: DynFlags -> FilePath
- pgm_L :: DynFlags -> String
- pgm_P :: DynFlags -> (String, [Option])
- pgm_F :: DynFlags -> String
- pgm_c :: DynFlags -> String
- pgm_cxx :: DynFlags -> String
- pgm_a :: DynFlags -> (String, [Option])
- pgm_l :: DynFlags -> (String, [Option])
- pgm_lm :: DynFlags -> Maybe (String, [Option])
- pgm_dll :: DynFlags -> (String, [Option])
- pgm_T :: DynFlags -> String
- pgm_windres :: DynFlags -> String
- pgm_lcc :: DynFlags -> (String, [Option])
- pgm_ar :: DynFlags -> String
- pgm_ranlib :: DynFlags -> String
- pgm_lo :: DynFlags -> (String, [Option])
- pgm_lc :: DynFlags -> (String, [Option])
- pgm_i :: DynFlags -> String
- opt_L :: DynFlags -> [String]
- opt_P :: DynFlags -> [String]
- opt_P_signature :: DynFlags -> ([String], Fingerprint)
- opt_F :: DynFlags -> [String]
- opt_c :: DynFlags -> [String]
- opt_cxx :: DynFlags -> [String]
- opt_a :: DynFlags -> [String]
- opt_l :: DynFlags -> [String]
- opt_lm :: DynFlags -> [String]
- opt_windres :: DynFlags -> [String]
- opt_lcc :: DynFlags -> [String]
- opt_lo :: DynFlags -> [String]
- opt_lc :: DynFlags -> [String]
- opt_i :: DynFlags -> [String]
- versionedAppDir :: String -> ArchOS -> MaybeT IO FilePath
- versionedFilePath :: ArchOS -> FilePath
- isOneShot :: GhcMode -> Bool
- isNoLink :: GhcLink -> Bool
- packageFlagsChanged :: DynFlags -> DynFlags -> Bool
- positionIndependent :: DynFlags -> Bool
- dynamicTooState :: DynFlags -> DynamicTooState
- setDynamicNow :: DynFlags -> DynFlags
- initDynFlags :: DynFlags -> IO DynFlags
- defaultDynFlags :: Settings -> DynFlags
- defaultFatalMessager :: FatalMessager
- defaultFlushOut :: FlushOut
- languageExtensions :: Maybe Language -> [Extension]
- hasPprDebug :: DynFlags -> Bool
- hasNoDebugOutput :: DynFlags -> Bool
- hasNoStateHack :: DynFlags -> Bool
- hasNoOptCoercion :: DynFlags -> Bool
- dopt :: DumpFlag -> DynFlags -> Bool
- dopt_set :: DynFlags -> DumpFlag -> DynFlags
- dopt_unset :: DynFlags -> DumpFlag -> DynFlags
- gopt :: GeneralFlag -> DynFlags -> Bool
- gopt_set :: DynFlags -> GeneralFlag -> DynFlags
- gopt_unset :: DynFlags -> GeneralFlag -> DynFlags
- wopt :: WarningFlag -> DynFlags -> Bool
- wopt_set :: DynFlags -> WarningFlag -> DynFlags
- wopt_unset :: DynFlags -> WarningFlag -> DynFlags
- wopt_fatal :: WarningFlag -> DynFlags -> Bool
- wopt_set_fatal :: DynFlags -> WarningFlag -> DynFlags
- wopt_unset_fatal :: DynFlags -> WarningFlag -> DynFlags
- xopt :: Extension -> DynFlags -> Bool
- xopt_set :: DynFlags -> Extension -> DynFlags
- xopt_unset :: DynFlags -> Extension -> DynFlags
- xopt_set_unlessExplSpec :: Extension -> (DynFlags -> Extension -> DynFlags) -> DynFlags -> DynFlags
- xopt_DuplicateRecordFields :: DynFlags -> DuplicateRecordFields
- xopt_FieldSelectors :: DynFlags -> FieldSelectors
- lang_set :: DynFlags -> Maybe Language -> DynFlags
- packageTrustOn :: DynFlags -> Bool
- safeHaskellOn :: DynFlags -> Bool
- safeHaskellModeEnabled :: DynFlags -> Bool
- safeLanguageOn :: DynFlags -> Bool
- safeInferOn :: DynFlags -> Bool
- safeImportsOn :: DynFlags -> Bool
- safeDirectImpsReq :: DynFlags -> Bool
- safeImplicitImpsReq :: DynFlags -> Bool
- unsafeFlags :: [(String, DynFlags -> SrcSpan, DynFlags -> Bool, DynFlags -> DynFlags)]
- unsafeFlagsForInfer :: [(String, DynFlags -> SrcSpan, DynFlags -> Bool, DynFlags -> DynFlags)]
- getOpts :: DynFlags -> (DynFlags -> [a]) -> [a]
- getVerbFlags :: DynFlags -> [String]
- setOutputFile :: Maybe String -> DynFlags -> DynFlags
- setDynOutputFile :: Maybe String -> DynFlags -> DynFlags
- setOutputHi :: Maybe String -> DynFlags -> DynFlags
- setDynOutputHi :: Maybe String -> DynFlags -> DynFlags
- addPluginModuleName :: String -> DynFlags -> DynFlags
- updOptLevel :: Int -> DynFlags -> DynFlags
- parseDynamicFlagsCmdLine :: MonadIO m => DynFlags -> [Located String] -> m (DynFlags, [Located String], [Warn])
- parseDynamicFilePragma :: MonadIO m => DynFlags -> [Located String] -> m (DynFlags, [Located String], [Warn])
- getCmdLineState :: CmdLineP s s
- putCmdLineState :: s -> CmdLineP s ()
- runCmdLineP :: CmdLineP s a -> s -> (a, s)
- processCmdLineP :: forall s m. MonadIO m => [Flag (CmdLineP s)] -> s -> [Located String] -> m (([Located String], [Err], [Warn]), s)
- parseDynamicFlagsFull :: MonadIO m => [Flag (CmdLineP DynFlags)] -> Bool -> DynFlags -> [Located String] -> m (DynFlags, [Located String], [Warn])
- allNonDeprecatedFlags :: [String]
- flagsAll :: [Flag (CmdLineP DynFlags)]
- flagsDynamic :: [Flag (CmdLineP DynFlags)]
- flagsPackage :: [Flag (CmdLineP DynFlags)]
- flagsForCompletion :: Bool -> [String]
- turnOn :: TurnOnFlag
- turnOff :: TurnOnFlag
- flagSpecOf :: WarningFlag -> Maybe (FlagSpec WarningFlag)
- wWarningFlags :: [FlagSpec WarningFlag]
- fFlags :: [FlagSpec GeneralFlag]
- fLangFlags :: [FlagSpec Extension]
- supportedLanguagesAndExtensions :: ArchOS -> [String]
- xFlags :: [FlagSpec Extension]
- impliedGFlags :: [(GeneralFlag, TurnOnFlag, GeneralFlag)]
- impliedOffGFlags :: [(GeneralFlag, TurnOnFlag, GeneralFlag)]
- impliedXFlags :: [(Extension, TurnOnFlag, Extension)]
- glasgowExtsFlags :: [Extension]
- setGeneralFlag' :: GeneralFlag -> DynFlags -> DynFlags
- unSetGeneralFlag' :: GeneralFlag -> DynFlags -> DynFlags
- setUnitId :: String -> DynFlags -> DynFlags
- augmentByWorkingDirectory :: DynFlags -> FilePath -> FilePath
- setFlagsFromEnvFile :: FilePath -> String -> DynP ()
- setTmpDir :: FilePath -> DynFlags -> DynFlags
- picCCOpts :: DynFlags -> [String]
- pieCCLDOpts :: DynFlags -> [String]
- picPOpts :: DynFlags -> [String]
- compilerInfo :: DynFlags -> [(String, String)]
- targetProfile :: DynFlags -> Profile
- makeDynFlagsConsistent :: DynFlags -> (DynFlags, [Located String])
- setUnsafeGlobalDynFlags :: DynFlags -> IO ()
- isSse4_2Enabled :: DynFlags -> Bool
- isAvxEnabled :: DynFlags -> Bool
- isAvx2Enabled :: DynFlags -> Bool
- isAvx512cdEnabled :: DynFlags -> Bool
- isAvx512erEnabled :: DynFlags -> Bool
- isAvx512fEnabled :: DynFlags -> Bool
- isAvx512pfEnabled :: DynFlags -> Bool
- isBmiEnabled :: DynFlags -> Bool
- isBmi2Enabled :: DynFlags -> Bool
- sccProfilingEnabled :: DynFlags -> Bool
- needSourceNotes :: DynFlags -> Bool
- useXLinkerRPath :: DynFlags -> OS -> Bool
- initSDocContext :: DynFlags -> PprStyle -> SDocContext
- initDefaultSDocContext :: DynFlags -> SDocContext
- initPromotionTickContext :: DynFlags -> PromotionTickContext
- outputFile :: DynFlags -> Maybe String
- objectSuf :: DynFlags -> String
- ways :: DynFlags -> Ways
- pprDynFlagsDiff :: DynFlags -> DynFlags -> SDoc
- updatePlatformConstants :: DynFlags -> Maybe PlatformConstants -> IO DynFlags
- emptyUnitState :: UnitState
- lookupUnit :: UnitState -> Unit -> Maybe UnitInfo
- lookupUnit' :: Bool -> UnitInfoMap -> PreloadUnitClosure -> Unit -> Maybe UnitInfo
- lookupUnitId :: UnitState -> UnitId -> Maybe UnitInfo
- lookupUnitId' :: UnitInfoMap -> UnitId -> Maybe UnitInfo
- unsafeLookupUnit :: HasDebugCallStack => UnitState -> Unit -> UnitInfo
- unsafeLookupUnitId :: HasDebugCallStack => UnitState -> UnitId -> UnitInfo
- lookupPackageName :: UnitState -> PackageName -> Maybe UnitId
- searchPackageId :: UnitState -> PackageId -> [UnitInfo]
- resolvePackageImport :: UnitState -> ModuleName -> PackageName -> Maybe UnitId
- listUnitInfo :: UnitState -> [UnitInfo]
- initUnits :: Logger -> DynFlags -> Maybe [UnitDatabase UnitId] -> Set UnitId -> IO ([UnitDatabase UnitId], UnitState, HomeUnit, Maybe PlatformConstants)
- readUnitDatabases :: Logger -> UnitConfig -> IO [UnitDatabase UnitId]
- getUnitDbRefs :: UnitConfig -> IO [PkgDbRef]
- resolveUnitDatabase :: UnitConfig -> PkgDbRef -> IO (Maybe FilePath)
- readUnitDatabase :: Logger -> UnitConfig -> FilePath -> IO (UnitDatabase UnitId)
- pprFlag :: PackageFlag -> SDoc
- pprReason :: SDoc -> UnusableUnitReason -> SDoc
- unwireUnit :: UnitState -> Unit -> Unit
- lookupModuleInAllUnits :: UnitState -> ModuleName -> [(Module, UnitInfo)]
- lookupModuleWithSuggestions :: UnitState -> ModuleName -> PkgQual -> LookupResult
- lookupModulePackage :: UnitState -> ModuleName -> PkgQual -> Maybe [UnitInfo]
- lookupPluginModuleWithSuggestions :: UnitState -> ModuleName -> PkgQual -> LookupResult
- listVisibleModuleNames :: UnitState -> [ModuleName]
- closeUnitDeps :: UnitInfoMap -> [(UnitId, Maybe UnitId)] -> MaybeErr UnitErr [UnitId]
- closeUnitDeps' :: UnitInfoMap -> [UnitId] -> [(UnitId, Maybe UnitId)] -> MaybeErr UnitErr [UnitId]
- mayThrowUnitErr :: MaybeErr UnitErr a -> IO a
- requirementMerges :: UnitState -> ModuleName -> [InstantiatedModule]
- pprUnitIdForUser :: UnitState -> UnitId -> SDoc
- pprUnitInfoForUser :: UnitInfo -> SDoc
- pprUnits :: UnitState -> SDoc
- pprUnitsSimple :: UnitState -> SDoc
- pprModuleMap :: ModuleNameProvidersMap -> SDoc
- improveUnit :: UnitState -> Unit -> Unit
- instUnitToUnit :: UnitState -> InstantiatedUnit -> Unit
- renameHoleModule :: UnitState -> ShHoleSubst -> Module -> Module
- renameHoleUnit :: UnitState -> ShHoleSubst -> Unit -> Unit
- renameHoleModule' :: UnitInfoMap -> PreloadUnitClosure -> ShHoleSubst -> Module -> Module
- renameHoleUnit' :: UnitInfoMap -> PreloadUnitClosure -> ShHoleSubst -> Unit -> Unit
- instModuleToModule :: UnitState -> InstantiatedModule -> Module
- implicitPackageDeps :: DynFlags -> [UnitId]
- showSDoc :: DynFlags -> SDoc -> String
- showPpr :: Outputable a => DynFlags -> a -> String
- showSDocForUser :: DynFlags -> UnitState -> NamePprCtx -> SDoc -> String
- printForUser :: DynFlags -> Handle -> NamePprCtx -> Depth -> SDoc -> IO ()
- mg_mnwib :: ModGuts -> ModuleNameWithIsBoot
- mkRule :: Module -> Bool -> Bool -> RuleName -> Activation -> Name -> [CoreBndr] -> [CoreExpr] -> CoreExpr -> CoreRule
- mkSpecRule :: DynFlags -> Module -> Bool -> Activation -> SDoc -> Id -> [CoreBndr] -> [CoreExpr] -> CoreExpr -> CoreRule
- roughTopNames :: [CoreExpr] -> [Maybe Name]
- pprRulesForUser :: [CoreRule] -> SDoc
- extendRuleInfo :: RuleInfo -> [CoreRule] -> RuleInfo
- addRuleInfo :: RuleInfo -> RuleInfo -> RuleInfo
- addIdSpecialisations :: Id -> [CoreRule] -> Id
- addRulesToId :: RuleBase -> Id -> Id
- rulesOfBinds :: [CoreBind] -> [CoreRule]
- emptyRuleBase :: RuleBase
- mkRuleBase :: [CoreRule] -> RuleBase
- extendRuleBaseList :: RuleBase -> [CoreRule] -> RuleBase
- pprRuleBase :: RuleBase -> SDoc
- mkRuleEnv :: ModGuts -> RuleBase -> RuleBase -> RuleEnv
- updExternalPackageRules :: RuleEnv -> RuleBase -> RuleEnv
- updLocalRules :: RuleEnv -> [CoreRule] -> RuleEnv
- addLocalRules :: RuleEnv -> [CoreRule] -> RuleEnv
- emptyRuleEnv :: RuleEnv
- getRules :: RuleEnv -> Id -> [CoreRule]
- lookupRule :: RuleOpts -> InScopeEnv -> (Activation -> Bool) -> Id -> [CoreExpr] -> [CoreRule] -> Maybe (CoreRule, CoreExpr)
- ruleCheckProgram :: RuleOpts -> CompilerPhase -> String -> (Id -> [CoreRule]) -> CoreProgram -> SDoc
- mi_boot :: ModIface -> IsBootInterface
- mi_mnwib :: ModIface -> ModuleNameWithIsBoot
- mi_fix :: ModIface -> OccName -> Fixity
- mi_semantic_module :: forall (a :: ModIfacePhase). ModIface_ a -> Module
- mi_free_holes :: ModIface -> UniqDSet ModuleName
- renameFreeHoles :: UniqDSet ModuleName -> [(ModuleName, Module)] -> UniqDSet ModuleName
- emptyPartialModIface :: Module -> PartialModIface
- emptyFullModIface :: Module -> ModIface
- mkIfaceHashCache :: [(Fingerprint, IfaceDecl)] -> OccName -> Maybe (OccName, Fingerprint)
- emptyIfaceHashCache :: OccName -> Maybe (OccName, Fingerprint)
- forceModIface :: ModIface -> IO ()
- ms_unitid :: ModSummary -> UnitId
- ms_installed_mod :: ModSummary -> InstalledModule
- ms_mod_name :: ModSummary -> ModuleName
- ms_imps :: ModSummary -> [(PkgQual, Located ModuleName)]
- ms_plugin_imps :: ModSummary -> [(PkgQual, Located ModuleName)]
- ms_home_srcimps :: ModSummary -> [Located ModuleName]
- ms_home_imps :: ModSummary -> [(PkgQual, Located ModuleName)]
- msHsFilePath :: ModSummary -> FilePath
- msHiFilePath :: ModSummary -> FilePath
- msDynHiFilePath :: ModSummary -> FilePath
- msObjFilePath :: ModSummary -> FilePath
- msDynObjFilePath :: ModSummary -> FilePath
- isBootSummary :: ModSummary -> IsBootInterface
- ms_mnwib :: ModSummary -> ModuleNameWithIsBoot
- msDeps :: ModSummary -> [(PkgQual, GenWithIsBoot (Located ModuleName))]
- findTarget :: ModSummary -> [Target] -> Maybe Target
- noParseContext :: ParseContext
- incompleteDoBlock :: ParseContext
- fromParseContext :: ParseContext -> PsErrInPatDetails
- mkSrcErr :: Messages GhcMessage -> SourceError
- srcErrorMessages :: SourceError -> Messages GhcMessage
- throwErrors :: MonadIO io => Messages GhcMessage -> io a
- throwOneError :: MonadIO io => MsgEnvelope GhcMessage -> io a
- handleSourceError :: MonadCatch m => (SourceError -> m a) -> m a -> m a
- runHsc :: HscEnv -> Hsc a -> IO a
- runHsc' :: HscEnv -> Hsc a -> IO (a, Messages GhcMessage)
- mkInteractiveHscEnv :: HscEnv -> HscEnv
- runInteractiveHsc :: HscEnv -> Hsc a -> IO a
- hsc_home_unit :: HscEnv -> HomeUnit
- hsc_home_unit_maybe :: HscEnv -> Maybe HomeUnit
- hsc_units :: HasDebugCallStack => HscEnv -> UnitState
- hsc_HPT :: HscEnv -> HomePackageTable
- hsc_HUE :: HscEnv -> HomeUnitEnv
- hsc_HUG :: HscEnv -> HomeUnitGraph
- hsc_all_home_unit_ids :: HscEnv -> Set UnitId
- hscUpdateHPT_lazy :: (HomePackageTable -> HomePackageTable) -> HscEnv -> HscEnv
- hscUpdateHPT :: (HomePackageTable -> HomePackageTable) -> HscEnv -> HscEnv
- hscUpdateHUG :: (HomeUnitGraph -> HomeUnitGraph) -> HscEnv -> HscEnv
- hscEPS :: HscEnv -> IO ExternalPackageState
- hptCompleteSigs :: HscEnv -> [CompleteMatch]
- hptAllInstances :: HscEnv -> (InstEnv, [FamInst])
- hptInstancesBelow :: HscEnv -> UnitId -> ModuleNameWithIsBoot -> (InstEnv, [FamInst])
- hptRules :: HscEnv -> UnitId -> ModuleNameWithIsBoot -> [CoreRule]
- hptAnns :: HscEnv -> Maybe (UnitId, ModuleNameWithIsBoot) -> [Annotation]
- hptAllThings :: (HomeModInfo -> [a]) -> HscEnv -> [a]
- hptSomeThingsBelowUs :: (HomeModInfo -> [a]) -> Bool -> HscEnv -> UnitId -> ModuleNameWithIsBoot -> [a]
- prepareAnnotations :: HscEnv -> Maybe ModGuts -> IO AnnEnv
- lookupType :: HscEnv -> Name -> IO (Maybe TyThing)
- lookupIfaceByModule :: HomeUnitGraph -> PackageIfaceTable -> Module -> Maybe ModIface
- mainModIs :: HomeUnitEnv -> Module
- hscInterp :: HscEnv -> Interp
- hscUpdateLoggerFlags :: HscEnv -> HscEnv
- hscUpdateFlags :: (DynFlags -> DynFlags) -> HscEnv -> HscEnv
- hscSetFlags :: HasDebugCallStack => DynFlags -> HscEnv -> HscEnv
- hscSetActiveHomeUnit :: HasDebugCallStack => HomeUnit -> HscEnv -> HscEnv
- hscSetActiveUnitId :: HasDebugCallStack => UnitId -> HscEnv -> HscEnv
- hscActiveUnitId :: HscEnv -> UnitId
- discardIC :: HscEnv -> HscEnv
- runCoreM :: HscEnv -> RuleBase -> Char -> Module -> NamePprCtx -> SrcSpan -> CoreM a -> IO (a, SimplCount)
- liftIOWithCount :: IO (SimplCount, a) -> CoreM a
- getHscEnv :: Hsc HscEnv
- initRuleEnv :: ModGuts -> CoreM RuleEnv
- getExternalRuleBase :: CoreM RuleBase
- getNamePprCtx :: CoreM NamePprCtx
- getSrcSpanM :: CoreM SrcSpan
- addSimplCount :: SimplCount -> CoreM ()
- getUniqMask :: CoreM Char
- mapDynFlagsCoreM :: (DynFlags -> DynFlags) -> CoreM a -> CoreM a
- dropSimplCount :: CoreM a -> CoreM a
- getInteractiveContext :: CoreM InteractiveContext
- getPackageFamInstEnv :: CoreM PackageFamInstEnv
- getAnnotations :: Typeable a => ([Word8] -> a) -> ModGuts -> CoreM (ModuleEnv [a], NameEnv [a])
- getFirstAnnotations :: Typeable a => ([Word8] -> a) -> ModGuts -> CoreM (ModuleEnv a, NameEnv a)
- msg :: MessageClass -> SDoc -> CoreM ()
- putMsgS :: String -> CoreM ()
- fatalErrorMsgS :: String -> CoreM ()
- debugTraceMsgS :: String -> CoreM ()
- metaRequestE :: Functor f => MetaHook f -> LHsExpr GhcTc -> f (LHsExpr GhcPs)
- metaRequestP :: Functor f => MetaHook f -> LHsExpr GhcTc -> f (LPat GhcPs)
- metaRequestT :: Functor f => MetaHook f -> LHsExpr GhcTc -> f (LHsType GhcPs)
- metaRequestD :: Functor f => MetaHook f -> LHsExpr GhcTc -> f [LHsDecl GhcPs]
- metaRequestAW :: Functor f => MetaHook f -> LHsExpr GhcTc -> f Serialized
- bindsOnlyPass :: (CoreProgram -> CoreM CoreProgram) -> ModGuts -> CoreM ModGuts
- pprPassDetails :: CoreToDo -> SDoc
- pprHoleFitCand :: HoleFitCandidate -> SDoc
- hfIsLcl :: HoleFit -> Bool
- lpModuleName :: LoadedPlugin -> ModuleName
- pluginRecompile' :: PluginWithArgs -> IO PluginRecompile
- purePlugin :: [CommandLineOption] -> IO PluginRecompile
- impurePlugin :: [CommandLineOption] -> IO PluginRecompile
- flagRecompile :: [CommandLineOption] -> IO PluginRecompile
- defaultPlugin :: Plugin
- keepRenamedSource :: [CommandLineOption] -> TcGblEnv -> HsGroup GhcRn -> TcM (TcGblEnv, HsGroup GhcRn)
- pluginsWithArgs :: Plugins -> [PluginWithArgs]
- withPlugins :: Monad m => Plugins -> PluginOperation m a -> a -> m a
- mapPlugins :: Plugins -> (Plugin -> [CommandLineOption] -> a) -> [a]
- withPlugins_ :: Monad m => Plugins -> ConstPluginOperation m a -> a -> m ()
- defaultFrontendPlugin :: FrontendPlugin
- loadExternalPlugins :: [ExternalPluginSpec] -> IO [ExternalPlugin]
- initFinderCache :: IO FinderCache
- flushFinderCaches :: FinderCache -> UnitEnv -> IO ()
- lookupFileCache :: FinderCache -> FilePath -> IO Fingerprint
- findImportedModule :: HscEnv -> ModuleName -> PkgQual -> IO FindResult
- findPluginModule :: FinderCache -> FinderOpts -> UnitState -> Maybe HomeUnit -> ModuleName -> IO FindResult
- findExactModule :: FinderCache -> FinderOpts -> UnitEnvGraph FinderOpts -> UnitState -> Maybe HomeUnit -> InstalledModule -> IO InstalledFindResult
- findExposedPackageModule :: FinderCache -> FinderOpts -> UnitState -> ModuleName -> PkgQual -> IO FindResult
- addModuleToFinder :: FinderCache -> Module -> ModLocation -> IO ()
- addHomeModuleToFinder :: FinderCache -> HomeUnit -> ModuleName -> ModLocation -> IO Module
- uncacheModule :: FinderCache -> HomeUnit -> ModuleName -> IO ()
- findHomeModule :: FinderCache -> FinderOpts -> HomeUnit -> ModuleName -> IO FindResult
- mkHomeModLocation :: FinderOpts -> ModuleName -> FilePath -> ModLocation
- mkHomeModLocation2 :: FinderOpts -> ModuleName -> FilePath -> String -> ModLocation
- mkHiOnlyModLocation :: FinderOpts -> Suffix -> Suffix -> FilePath -> String -> ModLocation
- mkObjPath :: FinderOpts -> FilePath -> String -> FilePath
- mkHiPath :: FinderOpts -> FilePath -> String -> FilePath
- mkStubPaths :: FinderOpts -> ModuleName -> ModLocation -> FilePath
- findObjectLinkableMaybe :: Module -> ModLocation -> IO (Maybe Linkable)
- findObjectLinkable :: Module -> FilePath -> UTCTime -> IO Linkable
- newGlobalBinder :: Module -> OccName -> SrcSpan -> TcRnIf a b Name
- newInteractiveBinder :: HscEnv -> OccName -> SrcSpan -> IO Name
- allocateGlobalBinder :: NameCache -> Module -> OccName -> SrcSpan -> IO Name
- ifaceExportNames :: [IfaceExport] -> TcRnIf gbl lcl [AvailInfo]
- lookupOrig :: Module -> OccName -> TcRnIf a b Name
- lookupNameCache :: NameCache -> Module -> OccName -> IO Name
- externaliseName :: Module -> Name -> TcRnIf m n Name
- setNameModule :: Maybe Module -> Name -> TcRnIf m n Name
- tcIfaceLclId :: FastString -> IfL Id
- extendIfaceIdEnv :: [Id] -> IfL a -> IfL a
- tcIfaceTyVar :: FastString -> IfL TyVar
- lookupIfaceTyVar :: IfaceTvBndr -> IfL (Maybe TyVar)
- lookupIfaceVar :: IfaceBndr -> IfL (Maybe TyCoVar)
- extendIfaceTyVarEnv :: [TyVar] -> IfL a -> IfL a
- extendIfaceEnvs :: [TyCoVar] -> IfL a -> IfL a
- lookupIfaceTop :: OccName -> IfL Name
- newIfaceName :: OccName -> IfL Name
- newIfaceNames :: [OccName] -> IfL [Name]
- trace_if :: Logger -> SDoc -> IO ()
- trace_hi_diffs :: Logger -> SDoc -> IO ()
- thNameToGhcName :: Name -> CoreM (Maybe Name)
- thNameToGhcNameIO :: NameCache -> Name -> IO (Maybe Name)
- newHscEnv :: FilePath -> DynFlags -> IO HscEnv
- newHscEnvWithHUG :: FilePath -> DynFlags -> UnitId -> HomeUnitGraph -> IO HscEnv
- initHscEnv :: Maybe FilePath -> IO HscEnv
- ioMsgMaybe :: IO (Messages GhcMessage, Maybe a) -> Hsc a
- hscTcRnLookupRdrName :: HscEnv -> LocatedN RdrName -> IO (NonEmpty Name)
- hscTcRcLookupName :: HscEnv -> Name -> IO (Maybe TyThing)
- hscTcRnGetInfo :: HscEnv -> Name -> IO (Maybe (TyThing, Fixity, [ClsInst], [FamInst], SDoc))
- hscIsGHCiMonad :: HscEnv -> String -> IO Name
- hscGetModuleInterface :: HscEnv -> Module -> IO ModIface
- hscRnImportDecls :: HscEnv -> [LImportDecl GhcPs] -> IO GlobalRdrEnv
- hscParse :: HscEnv -> ModSummary -> IO HsParsedModule
- hscParse' :: ModSummary -> Hsc HsParsedModule
- hscTypecheckRename :: HscEnv -> ModSummary -> HsParsedModule -> IO (TcGblEnv, RenamedStuff)
- hscTypecheckAndGetWarnings :: HscEnv -> ModSummary -> IO (FrontendResult, WarningMessages)
- tcRnModule' :: ModSummary -> Bool -> HsParsedModule -> Hsc TcGblEnv
- hscDesugar :: HscEnv -> ModSummary -> TcGblEnv -> IO ModGuts
- hscDesugar' :: ModLocation -> TcGblEnv -> Hsc ModGuts
- makeSimpleDetails :: Logger -> TcGblEnv -> IO ModDetails
- hscRecompStatus :: Maybe Messager -> HscEnv -> ModSummary -> Maybe ModIface -> HomeModLinkable -> (Int, Int) -> IO HscRecompStatus
- initModDetails :: HscEnv -> ModIface -> IO ModDetails
- initWholeCoreBindings :: HscEnv -> ModIface -> ModDetails -> Linkable -> IO Linkable
- hscDesugarAndSimplify :: ModSummary -> FrontendResult -> Messages GhcMessage -> Maybe Fingerprint -> Hsc HscBackendAction
- hscMaybeWriteIface :: Logger -> DynFlags -> Bool -> ModIface -> Maybe Fingerprint -> ModLocation -> IO ()
- oneShotMsg :: Logger -> RecompileRequired -> IO ()
- batchMsg :: Messager
- batchMultiMsg :: Messager
- hscCheckSafe :: HscEnv -> Module -> SrcSpan -> IO Bool
- hscGetSafe :: HscEnv -> Module -> SrcSpan -> IO (Bool, Set UnitId)
- hscSimplify :: HscEnv -> [String] -> ModGuts -> IO ModGuts
- hscSimplify' :: [String] -> ModGuts -> Hsc ModGuts
- hscSimpleIface' :: Maybe CoreProgram -> TcGblEnv -> ModSummary -> Hsc (ModIface, ModDetails)
- hscGenHardCode :: HscEnv -> CgGuts -> ModLocation -> FilePath -> IO (FilePath, Maybe FilePath, [(ForeignSrcLang, FilePath)], Maybe StgCgInfos, Maybe CmmCgInfos)
- mkCgInteractiveGuts :: CgGuts -> CgInteractiveGuts
- hscInteractive :: HscEnv -> CgInteractiveGuts -> ModLocation -> IO (Maybe FilePath, CompiledByteCode, [SptEntry])
- generateByteCode :: HscEnv -> CgInteractiveGuts -> ModLocation -> IO [Unlinked]
- generateFreshByteCode :: HscEnv -> ModuleName -> CgInteractiveGuts -> ModLocation -> IO Linkable
- hscCompileCmmFile :: HscEnv -> FilePath -> FilePath -> FilePath -> IO (Maybe FilePath)
- doCodeGen :: HscEnv -> Module -> InfoTableProvMap -> [TyCon] -> CollectedCCs -> [CgStgTopBinding] -> HpcInfo -> IO (Stream IO CmmGroupSRTs CmmCgInfos)
- hscStmt :: HscEnv -> String -> IO (Maybe ([Id], ForeignHValue, FixityEnv))
- hscStmtWithLocation :: HscEnv -> String -> String -> Int -> IO (Maybe ([Id], ForeignHValue, FixityEnv))
- hscParsedStmt :: HscEnv -> GhciLStmt GhcPs -> IO (Maybe ([Id], ForeignHValue, FixityEnv))
- hscDecls :: HscEnv -> String -> IO ([TyThing], InteractiveContext)
- hscParseModuleWithLocation :: HscEnv -> String -> Int -> String -> IO (HsModule GhcPs)
- hscParseDeclsWithLocation :: HscEnv -> String -> Int -> String -> IO [LHsDecl GhcPs]
- hscDeclsWithLocation :: HscEnv -> String -> String -> Int -> IO ([TyThing], InteractiveContext)
- hscParsedDecls :: HscEnv -> [LHsDecl GhcPs] -> IO ([TyThing], InteractiveContext)
- hscAddSptEntries :: HscEnv -> [SptEntry] -> IO ()
- hscImport :: HscEnv -> String -> IO (ImportDecl GhcPs)
- hscTcExpr :: HscEnv -> TcRnExprMode -> String -> IO Type
- hscKcType :: HscEnv -> Bool -> String -> IO (Type, Kind)
- hscParseExpr :: String -> Hsc (LHsExpr GhcPs)
- hscParseStmtWithLocation :: String -> Int -> String -> Hsc (Maybe (GhciLStmt GhcPs))
- hscParseType :: String -> Hsc (LHsType GhcPs)
- hscParseIdentifier :: HscEnv -> String -> IO (LocatedN RdrName)
- hscTidy :: HscEnv -> ModGuts -> IO (CgGuts, ModDetails)
- hscCompileCoreExpr :: HscEnv -> SrcSpan -> CoreExpr -> IO (ForeignHValue, [Linkable], PkgsLoaded)
- hscCompileCoreExpr' :: HscEnv -> SrcSpan -> CoreExpr -> IO (ForeignHValue, [Linkable], PkgsLoaded)
- dumpIfaceStats :: HscEnv -> IO ()
- showModuleIndex :: (Int, Int) -> SDoc
- writeInterfaceOnlyMode :: DynFlags -> Bool
- toSerialized :: Typeable a => (a -> [Word8]) -> a -> Serialized
- fromSerialized :: Typeable a => ([Word8] -> a) -> Serialized -> Maybe a
- serializeWithData :: Data a => a -> [Word8]
- deserializeWithData :: Data a => [Word8] -> a
- mkParseError :: String -> MsgEnvelope PsMessage
Documentation
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
Data TyCon | |
Defined in GHC.Core.TyCon Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TyCon -> c TyCon # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TyCon # dataTypeOf :: TyCon -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TyCon) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TyCon) # gmapT :: (forall b. Data b => b -> b) -> TyCon -> TyCon # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TyCon -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TyCon -> r # gmapQ :: (forall d. Data d => d -> u) -> TyCon -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> TyCon -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> TyCon -> m TyCon # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TyCon -> m TyCon # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TyCon -> m TyCon # | |
NamedThing TyCon | |
Defined in GHC.Core.TyCon | |
Uniquable TyCon | |
Defined in GHC.Core.TyCon | |
Outputable TyCon | |
Defined in GHC.Core.TyCon | |
Eq TyCon | |
Instances
Data Type | |
Defined in GHC.Core.TyCo.Rep Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Type -> c Type # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Type # dataTypeOf :: Type -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Type) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Type) # gmapT :: (forall b. Data b => b -> b) -> Type -> Type # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Type -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Type -> r # gmapQ :: (forall d. Data d => d -> u) -> Type -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Type -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Type -> m Type # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Type -> m Type # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Type -> m Type # | |
Outputable Type | |
Defined in GHC.Core.TyCo.Rep | |
Eq (DeBruijn Type) | |
class (Typeable e, Show e) => Exception e where #
Any type that you wish to throw or catch as an exception must be an
instance of the Exception
class. The simplest case is a new exception
type directly below the root:
data MyException = ThisException | ThatException deriving Show instance Exception MyException
The default method definitions in the Exception
class do what we need
in this case. You can now throw and catch ThisException
and
ThatException
as exceptions:
*Main> throw ThisException `catch` \e -> putStrLn ("Caught " ++ show (e :: MyException)) Caught ThisException
In more complicated examples, you may wish to define a whole hierarchy of exceptions:
--------------------------------------------------------------------- -- Make the root exception type for all the exceptions in a compiler data SomeCompilerException = forall e . Exception e => SomeCompilerException e instance Show SomeCompilerException where show (SomeCompilerException e) = show e instance Exception SomeCompilerException compilerExceptionToException :: Exception e => e -> SomeException compilerExceptionToException = toException . SomeCompilerException compilerExceptionFromException :: Exception e => SomeException -> Maybe e compilerExceptionFromException x = do SomeCompilerException a <- fromException x cast a --------------------------------------------------------------------- -- Make a subhierarchy for exceptions in the frontend of the compiler data SomeFrontendException = forall e . Exception e => SomeFrontendException e instance Show SomeFrontendException where show (SomeFrontendException e) = show e instance Exception SomeFrontendException where toException = compilerExceptionToException fromException = compilerExceptionFromException frontendExceptionToException :: Exception e => e -> SomeException frontendExceptionToException = toException . SomeFrontendException frontendExceptionFromException :: Exception e => SomeException -> Maybe e frontendExceptionFromException x = do SomeFrontendException a <- fromException x cast a --------------------------------------------------------------------- -- Make an exception type for a particular frontend compiler exception data MismatchedParentheses = MismatchedParentheses deriving Show instance Exception MismatchedParentheses where toException = frontendExceptionToException fromException = frontendExceptionFromException
We can now catch a MismatchedParentheses
exception as
MismatchedParentheses
, SomeFrontendException
or
SomeCompilerException
, but not other types, e.g. IOException
:
*Main> throw MismatchedParentheses `catch` \e -> putStrLn ("Caught " ++ show (e :: MismatchedParentheses)) Caught MismatchedParentheses *Main> throw MismatchedParentheses `catch` \e -> putStrLn ("Caught " ++ show (e :: SomeFrontendException)) Caught MismatchedParentheses *Main> throw MismatchedParentheses `catch` \e -> putStrLn ("Caught " ++ show (e :: SomeCompilerException)) Caught MismatchedParentheses *Main> throw MismatchedParentheses `catch` \e -> putStrLn ("Caught " ++ show (e :: IOException)) *** Exception: MismatchedParentheses
Minimal complete definition
Nothing
Methods
toException :: e -> SomeException #
fromException :: SomeException -> Maybe e #
displayException :: e -> String #
Render this exception value in a human-friendly manner.
Default implementation:
.show
Since: base-4.8.0.0
Instances
data Fingerprint #
Constructors
Fingerprint !Word64 !Word64 |
Instances
Source Location
Constructors
RealSrcLoc !RealSrcLoc !(Maybe BufPos) | |
UnhelpfulLoc !FastString |
Instances
Show SrcLoc | |
Outputable SrcLoc | |
Defined in GHC.Types.SrcLoc | |
Eq SrcLoc | |
type HasCallStack = ?callStack :: CallStack #
Request a CallStack.
NOTE: The implicit parameter ?callStack :: CallStack
is an
implementation detail and should not be considered part of the
CallStack
API, we may decide to change the implementation in the
future.
Since: base-4.9.0.0
A Version
represents the version of a software entity.
An instance of Eq
is provided, which implements exact equality
modulo reordering of the tags in the versionTags
field.
An instance of Ord
is also provided, which gives lexicographic
ordering on the versionBranch
fields (i.e. 2.1 > 2.0, 1.2.3 > 1.2.2,
etc.). This is expected to be sufficient for many uses, but note that
you may need to use a more specific ordering for your versioning
scheme. For example, some versioning schemes may include pre-releases
which have tags "pre1"
, "pre2"
, and so on, and these would need to
be taken into account when determining ordering. In some cases, date
ordering may be more appropriate, so the application would have to
look for date
tags in the versionTags
field and compare those.
The bottom line is, don't always assume that compare
and other Ord
operations are the right thing for every Version
.
Similarly, concrete representations of versions may differ. One
possible concrete representation is provided (see showVersion
and
parseVersion
), but depending on the application a different concrete
representation may be more appropriate.
Constructors
Version | |
Fields
|
Instances
Data Version | Since: base-4.7.0.0 |
Defined in Data.Data Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Version -> c Version # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Version # toConstr :: Version -> Constr # dataTypeOf :: Version -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Version) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Version) # gmapT :: (forall b. Data b => b -> b) -> Version -> Version # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Version -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Version -> r # gmapQ :: (forall d. Data d => d -> u) -> Version -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Version -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Version -> m Version # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Version -> m Version # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Version -> m Version # | |
Generic Version | |
IsList Version | Since: base-4.8.0.0 |
Read Version | Since: base-2.1 |
Show Version | Since: base-2.1 |
Eq Version | Since: base-2.1 |
Ord Version | Since: base-2.1 |
Hashable Version | |
Defined in Data.Hashable.Class | |
type Rep Version | Since: base-4.9.0.0 |
Defined in Data.Version type Rep Version = D1 ('MetaData "Version" "Data.Version" "base" 'False) (C1 ('MetaCons "Version" 'PrefixI 'True) (S1 ('MetaSel ('Just "versionBranch") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Int]) :*: S1 ('MetaSel ('Just "versionTags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [String]))) | |
type Item Version | |
Defined in GHC.IsList |
data FractionalExponentBase #
Instances
A Coercion
is concrete evidence of the equality/convertibility
of two types.
Instances
Data Coercion | |
Defined in GHC.Core.TyCo.Rep Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Coercion -> c Coercion # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Coercion # toConstr :: Coercion -> Constr # dataTypeOf :: Coercion -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Coercion) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Coercion) # gmapT :: (forall b. Data b => b -> b) -> Coercion -> Coercion # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Coercion -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Coercion -> r # gmapQ :: (forall d. Data d => d -> u) -> Coercion -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Coercion -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Coercion -> m Coercion # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Coercion -> m Coercion # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Coercion -> m Coercion # | |
Outputable Coercion | |
Defined in GHC.Core.TyCo.Rep | |
Eq (DeBruijn Coercion) | |
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 Methods 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) # |
When invoking external tools as part of the compilation pipeline, we pass these a sequence of options on the command-line. Rather than just using a list of Strings, we use a type that allows us to distinguish between filepaths and 'other stuff'. The reason for this is that this type gives us a handle on transforming filenames, and filenames only, to whatever format they're expected to be on a particular platform.
Constructors
FileOption String String | |
Option String |
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 | |
data GhcException #
GHC's own exception type error messages all take the form:
<location>: <error>
If the location is on the command line, or in GHC itself, then <location>="ghc". All of the error types below correspond to a <location> of "ghc", except for ProgramError (where the string is assumed to contain a location already, so we don't print one).
Constructors
Signal Int | Some other fatal signal (SIGHUP,SIGTERM) |
UsageError String | Prints the short usage msg after the error |
CmdLineError String | A problem with the command line arguments, but don't print usage. |
Panic String | The |
PprPanic String SDoc | |
Sorry String | The user tickled something that's known not to work yet, but we're not counting it as a bug. |
PprSorry String SDoc | |
InstallationError String | An installation problem. |
ProgramError String | An error in the user's code, probably. |
PprProgramError String SDoc |
Instances
Exception GhcException | |
Defined in GHC.Utils.Panic Methods toException :: GhcException -> SomeException # fromException :: SomeException -> Maybe GhcException # displayException :: GhcException -> String # | |
Show GhcException | |
Defined in GHC.Utils.Panic Methods 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 Methods fromString :: String -> SDoc # | |
IsDoc SDoc | |
IsLine SDoc | |
IsOutput SDoc | |
Defined in GHC.Utils.Outputable | |
Outputable SDoc | |
Defined in GHC.Utils.Outputable | |
OutputableP env SDoc | |
Defined in GHC.Utils.Outputable | |
type Line SDoc | |
Defined in GHC.Utils.Outputable |
Annotation Declaration
Constructors
HsAnnotation (XHsAnnotation pass) (AnnProvenance pass) (XRec pass (HsExpr pass)) | |
XAnnDecl !(XXAnnDecl pass) |
Instances
type Anno (AnnDecl (GhcPass p)) | |
Defined in GHC.Hs.Decls |
Imported or exported entity.
Constructors
IEVar (XIEVar pass) (LIEWrappedName pass) | Imported or Exported Variable |
IEThingAbs (XIEThingAbs pass) (LIEWrappedName pass) | Imported or exported Thing with Absent list The thing is a Class/Type (can't tell)
- |
IEThingAll (XIEThingAll pass) (LIEWrappedName pass) | Imported or exported Thing with All imported or exported The thing is a ClassType and the All refers to methodsconstructors |
IEThingWith (XIEThingWith pass) (LIEWrappedName pass) IEWildcard [LIEWrappedName pass] | Imported or exported Thing With given imported or exported The thing is a Class/Type and the imported or exported things are
methods/constructors and record fields; see Note [IEThingWith]
- |
IEModuleContents (XIEModuleContents pass) (XRec pass ModuleName) | Imported or exported module contents (Export Only) |
IEGroup (XIEGroup pass) Int (LHsDoc pass) | Doc section heading |
IEDoc (XIEDoc pass) (LHsDoc pass) | Some documentation |
IEDocNamed (XIEDocNamed pass) String | Reference to named doc |
XIE !(XXIE pass) |
Instances
type Anno (LocatedA (IE (GhcPass p))) | |
Defined in GHC.Hs.ImpExp | |
type Anno (IE (GhcPass p)) | |
Defined in GHC.Hs.ImpExp | |
type Anno [LocatedA (IE (GhcPass p))] | |
Defined in GHC.Hs.ImpExp |
data Annotation #
Represents an annotation after it has been sufficiently desugared from
it's initial form of AnnDecl
Constructors
Annotation | |
Fields
|
Instances
Outputable Annotation | |
Defined in GHC.Types.Annotations Methods ppr :: Annotation -> SDoc # |
A Haskell expression.
Constructors
HsVar (XVar p) (LIdP p) | Variable See Note [Located RdrNames] |
HsUnboundVar (XUnboundVar p) RdrName | Unbound variable; also used for "holes" (_ or _x). Turned from HsVar to HsUnboundVar by the renamer, when it finds an out-of-scope variable or hole. The (XUnboundVar p) field becomes an HoleExprRef after typechecking; this is where the erroring expression will be written after solving. See Note [Holes] in GHC.Tc.Types.Constraint. |
HsRecSel (XRecSel p) (FieldOcc p) | Variable pointing to record selector See Note [Non-overloaded record field selectors] and Note [Record selectors in the AST] |
HsOverLabel (XOverLabel p) SourceText FastString | Overloaded label (Note [Overloaded labels] in GHC.OverloadedLabels) Note [Pragma source text] in GHC.Types.SourceText |
HsIPVar (XIPVar p) HsIPName | Implicit parameter (not in use after typechecking) |
HsOverLit (XOverLitE p) (HsOverLit p) | Overloaded literals |
HsLit (XLitE p) (HsLit p) | Simple (non-overloaded) literals |
HsLam (XLam p) (MatchGroup p (LHsExpr p)) | Lambda abstraction. Currently always a single match |
HsLamCase (XLamCase p) LamCaseVariant (MatchGroup p (LHsExpr p)) | Lambda-case |
HsApp (XApp p) (LHsExpr p) (LHsExpr p) | Application |
HsAppType (XAppTypeE p) (LHsExpr p) !(LHsToken "@" p) (LHsWcType (NoGhcTc p)) | Visible type application Explicit type argument; e.g f @Int x y NB: Has wildcards, but no implicit quantification |
OpApp (XOpApp p) (LHsExpr p) (LHsExpr p) (LHsExpr p) | Operator applications: NB Bracketed ops such as (+) come out as Vars. |
NegApp (XNegApp p) (LHsExpr p) (SyntaxExpr p) | Negation operator. Contains the negated expression and the name
of |
HsPar |
|
SectionL (XSectionL p) (LHsExpr p) (LHsExpr p) | |
SectionR (XSectionR p) (LHsExpr p) (LHsExpr p) | |
ExplicitTuple (XExplicitTuple p) [HsTupArg p] Boxity | Used for explicit tuples and sections thereof |
ExplicitSum (XExplicitSum p) ConTag SumWidth (LHsExpr p) | Used for unboxed sum types
There will be multiple |
HsCase (XCase p) (LHsExpr p) (MatchGroup p (LHsExpr p)) |
|
HsIf (XIf p) (LHsExpr p) (LHsExpr p) (LHsExpr p) | |
HsMultiIf (XMultiIf p) [LGRHS p (LHsExpr p)] | Multi-way if |
HsLet (XLet p) !(LHsToken "let" p) (HsLocalBinds p) !(LHsToken "in" p) (LHsExpr p) | let(rec)
|
HsDo (XDo p) HsDoFlavour (XRec p [ExprLStmt p]) | |
ExplicitList (XExplicitList p) [LHsExpr p] | Syntactic list: [a,b,c,...]
|
RecordCon | Record construction
|
Fields
| |
RecordUpd | Record update |
Fields
| |
HsGetField | Record field selection e.g |
HsProjection | Record field selector. e.g. This case only arises when the OverloadedRecordDot langauge extensions is enabled. See Note [Record selectors in the AST]. |
Fields
| |
ExprWithTySig (XExprWithTySig p) (LHsExpr p) (LHsSigWcType (NoGhcTc p)) | Expression with an explicit type signature. |
ArithSeq (XArithSeq p) (Maybe (SyntaxExpr p)) (ArithSeqInfo p) | Arithmetic sequence
|
HsTypedBracket (XTypedBracket p) (LHsExpr p) | |
HsUntypedBracket (XUntypedBracket p) (HsQuote p) | |
HsTypedSplice (XTypedSplice p) (LHsExpr p) | |
HsUntypedSplice (XUntypedSplice p) (HsUntypedSplice p) | |
HsProc (XProc p) (LPat p) (LHsCmdTop p) |
|
HsStatic (XStatic p) (LHsExpr p) | |
HsPragE (XPragE p) (HsPragE p) (LHsExpr p) | |
XExpr !(XXExpr p) |
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
,
Constructors
Unqual OccName | Unqualified name Used for ordinary, unqualified occurrences, e.g. |
Qual ModuleName OccName | Qualified name A qualified name written by the user in
source code. The module isn't necessarily
the module where the thing is defined;
just the one from which it is imported.
Examples are |
Orig Module OccName | Original name An original name; the module is the defining module.
This is used when GHC generates code that will be fed
into the renamer (e.g. from deriving clauses), but where
we want to say "Use Prelude.map dammit". One of these
can be created with |
Exact Name | Exact name We know exactly the
Such a |
Instances
Type & coercion & id substitution
The Subst data type defined in this module contains substitution for tyvar, covar and id. However, operations on IdSubstEnv (mapping from Id to CoreExpr) that require the definition of the Expr data type are defined in GHC.Core.Subst to avoid circular module dependency.
Constructors
Subst InScopeSet IdSubstEnv TvSubstEnv CvSubstEnv |
Instances
Outputable Subst | |
Defined in GHC.Core.TyCo.Subst |
data NoExtField #
A placeholder type for TTG extension points that are not currently unused to represent any particular value.
This should not be confused with DataConCantHappen
, which are found in unused
extension constructors and therefore should never be inhabited. In
contrast, NoExtField
is used in extension points (e.g., as the field of
some constructor), so it must have an inhabitant to construct AST passes
that manipulate fields with that extension point as their type.
Constructors
NoExtField |
Instances
Data NoExtField | |
Defined in Language.Haskell.Syntax.Extension Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> NoExtField -> c NoExtField # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c NoExtField # toConstr :: NoExtField -> Constr # dataTypeOf :: NoExtField -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c NoExtField) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NoExtField) # gmapT :: (forall b. Data b => b -> b) -> NoExtField -> NoExtField # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NoExtField -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NoExtField -> r # gmapQ :: (forall d. Data d => d -> u) -> NoExtField -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> NoExtField -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> NoExtField -> m NoExtField # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> NoExtField -> m NoExtField # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> NoExtField -> m NoExtField # | |
Eq NoExtField | |
Defined in Language.Haskell.Syntax.Extension | |
Ord NoExtField | |
Defined in Language.Haskell.Syntax.Extension Methods compare :: NoExtField -> NoExtField -> Ordering # (<) :: NoExtField -> NoExtField -> Bool # (<=) :: NoExtField -> NoExtField -> Bool # (>) :: NoExtField -> NoExtField -> Bool # (>=) :: NoExtField -> NoExtField -> Bool # max :: NoExtField -> NoExtField -> NoExtField # min :: NoExtField -> NoExtField -> NoExtField # |
data FloatOutSwitches #
Constructors
FloatOutSwitches | |
Fields
|
Instances
Outputable FloatOutSwitches | |
Defined in GHC.Core.Opt.Monad Methods ppr :: FloatOutSwitches -> SDoc # |
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
Constructors
DynFlags | |
Fields
|
newtype 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.
Constructors
SourceError (Messages GhcMessage) |
Instances
Exception SourceError | |
Defined in GHC.Types.SourceError Methods toException :: SourceError -> SomeException # fromException :: SomeException -> Maybe SourceError # displayException :: SourceError -> String # | |
Show SourceError | |
Defined in GHC.Types.SourceError Methods showsPrec :: Int -> SourceError -> ShowS # show :: SourceError -> String # showList :: [SourceError] -> ShowS # |
Plugin
is the compiler plugin data type. Try to avoid
constructing one of these directly, and just modify some fields of
defaultPlugin
instead: this is to try and preserve source-code
compatibility when we add fields to this.
Nonetheless, this API is preliminary and highly likely to change in the future.
Constructors
Plugin | |
Fields
|
data FrontendPlugin #
Constructors
FrontendPlugin | |
Fields |
data GenericUnitInfo srcpkgid srcpkgname uid modulename mod #
Information about an unit (a unit is an installed module library).
This is a subset of Cabal's InstalledPackageInfo
, with just the bits
that GHC is interested in.
Some types are left as parameters to be instantiated differently in ghc-pkg and in ghc itself.
Constructors
GenericUnitInfo | |
Fields
|
Instances
Binary DbUnitInfo | |
Defined in GHC.Unit.Database | |
(Show uid, Show modulename, Show mod, Show srcpkgid, Show srcpkgname) => Show (GenericUnitInfo srcpkgid srcpkgname uid modulename mod) | |
Defined in GHC.Unit.Database Methods showsPrec :: Int -> GenericUnitInfo srcpkgid srcpkgname uid modulename mod -> ShowS # show :: GenericUnitInfo srcpkgid srcpkgname uid modulename mod -> String # showList :: [GenericUnitInfo srcpkgid srcpkgname uid modulename mod] -> ShowS # | |
(Eq uid, Eq modulename, Eq mod, Eq srcpkgid, Eq srcpkgname) => Eq (GenericUnitInfo srcpkgid srcpkgname uid modulename mod) | |
Defined in GHC.Unit.Database Methods (==) :: GenericUnitInfo srcpkgid srcpkgname uid modulename mod -> GenericUnitInfo srcpkgid srcpkgname uid modulename mod -> Bool # (/=) :: GenericUnitInfo srcpkgid srcpkgname uid modulename mod -> GenericUnitInfo srcpkgid srcpkgname uid modulename mod -> Bool # |
data ForeignSrcLang #
Foreign formats supported by GHC via TH
Constructors
LangC | C |
LangCxx | C++ |
LangObjc | Objective C |
LangObjcxx | Objective C++ |
LangAsm | Assembly language (.s) |
LangJs | JavaScript |
RawObject | Object (.o) |
Instances
type HasDebugCallStack = () #
A call stack constraint, but only when isDebugOn
.
A PtrString
is a pointer to some array of Latin-1 encoded chars.
newtype LexicalFastString #
Lexical FastString
This is a simple FastString wrapper with an Ord instance using
lexicalCompareFS
(i.e. which compares FastStrings on their String
representation). Hence it is deterministic from one run to the other.
Constructors
LexicalFastString FastString |
Instances
newtype NonDetFastString #
Non-deterministic FastString
This is a simple FastString wrapper with an Ord instance using
uniqCompareFS
(i.e. which compares FastStrings on their Uniques). Hence it
is not deterministic from one run to the other.
Constructors
NonDetFastString FastString |
Instances
data FastString #
A FastString
is a UTF-8 encoded string together with a unique ID. All
FastString
s are stored in a global hashtable to support fast O(1)
comparison.
It is also associated with a lazy reference to the Z-encoding of this string which is used by the compiler internally.
Constructors
FastString | |
Fields
|
Instances
data FastZString #
Instances
NFData FastZString | |
Defined in GHC.Data.FastString Methods rnf :: FastZString -> () # |
data SrcUnpackedness #
Source Unpackedness
What unpackedness the user requested
Constructors
SrcUnpack | {-# UNPACK #-} specified |
SrcNoUnpack | {-# NOUNPACK #-} specified |
NoSrcUnpack | no unpack pragma |
Instances
Data SrcUnpackedness | |
Defined in Language.Haskell.Syntax.Basic Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SrcUnpackedness -> c SrcUnpackedness # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SrcUnpackedness # toConstr :: SrcUnpackedness -> Constr # dataTypeOf :: SrcUnpackedness -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SrcUnpackedness) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SrcUnpackedness) # gmapT :: (forall b. Data b => b -> b) -> SrcUnpackedness -> SrcUnpackedness # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SrcUnpackedness -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SrcUnpackedness -> r # gmapQ :: (forall d. Data d => d -> u) -> SrcUnpackedness -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> SrcUnpackedness -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> SrcUnpackedness -> m SrcUnpackedness # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SrcUnpackedness -> m SrcUnpackedness # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SrcUnpackedness -> m SrcUnpackedness # | |
Eq SrcUnpackedness | |
Defined in Language.Haskell.Syntax.Basic Methods (==) :: SrcUnpackedness -> SrcUnpackedness -> Bool # (/=) :: SrcUnpackedness -> SrcUnpackedness -> Bool # |
data SrcStrictness #
Source Strictness
What strictness annotation the user wrote
Constructors
SrcLazy | Lazy, ie |
SrcStrict | Strict, ie |
NoSrcStrict | no strictness annotation |
Instances
Data SrcStrictness | |
Defined in Language.Haskell.Syntax.Basic Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SrcStrictness -> c SrcStrictness # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SrcStrictness # toConstr :: SrcStrictness -> Constr # dataTypeOf :: SrcStrictness -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SrcStrictness) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SrcStrictness) # gmapT :: (forall b. Data b => b -> b) -> SrcStrictness -> SrcStrictness # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SrcStrictness -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SrcStrictness -> r # gmapQ :: (forall d. Data d => d -> u) -> SrcStrictness -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> SrcStrictness -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> SrcStrictness -> m SrcStrictness # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SrcStrictness -> m SrcStrictness # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SrcStrictness -> m SrcStrictness # | |
Eq SrcStrictness | |
Defined in Language.Haskell.Syntax.Basic Methods (==) :: SrcStrictness -> SrcStrictness -> Bool # (/=) :: SrcStrictness -> SrcStrictness -> Bool # |
See Note [Roles] in GHC.Core.Coercion
Order of constructors matters: the Ord instance coincides with the *super*typing relation on roles.
Constructors
Nominal | |
Representational | |
Phantom |
Instances
Data Role | |
Defined in Language.Haskell.Syntax.Basic Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Role -> c Role # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Role # dataTypeOf :: Role -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Role) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Role) # gmapT :: (forall b. Data b => b -> b) -> Role -> Role # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Role -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Role -> r # gmapQ :: (forall d. Data d => d -> u) -> Role -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Role -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Role -> m Role # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Role -> m Role # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Role -> m Role # | |
Eq Role | |
Ord Role | |
type Anno (Maybe Role) | |
type Anno (Maybe Role) | |
data FieldLabelString #
Field labels are just represented as strings; they are not necessarily unique (even within a module)
Instances
A *one-index* constructor tag
Type of the tags associated with each constructor possibility or superclass selector
Instances
Data Boxity | |
Defined in Language.Haskell.Syntax.Basic Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Boxity -> c Boxity # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Boxity # toConstr :: Boxity -> Constr # dataTypeOf :: Boxity -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Boxity) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Boxity) # gmapT :: (forall b. Data b => b -> b) -> Boxity -> Boxity # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Boxity -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Boxity -> r # gmapQ :: (forall d. Data d => d -> u) -> Boxity -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Boxity -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Boxity -> m Boxity # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Boxity -> m Boxity # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Boxity -> m Boxity # | |
Eq Boxity | |
See Note [NoGhcTc] in GHC.Hs.Extension. It has to be in this module because it is used like an extension point (in the data definitions of types that should be parameter-agnostic.
Instances
type NoGhcTc (GhcPass pass) | Marks that a field uses the GhcRn variant even when the pass parameter is GhcTc. Useful for storing HsTypes in GHC.Hs.Exprs, say, because HsType GhcTc should never occur. See Note [NoGhcTc] |
Defined in GHC.Hs.Extension |
type family XXIEWrappedName p #
Instances
type XXIEWrappedName (GhcPass _1) | |
Defined in GHC.Hs.ImpExp |
Instances
type XIEType (GhcPass _1) | |
Defined in GHC.Hs.ImpExp |
type family XIEPattern p #
Instances
type XIEPattern (GhcPass _1) | |
Defined in GHC.Hs.ImpExp |
Instances
type XIEName (GhcPass _1) | |
Defined in GHC.Hs.ImpExp |
Instances
type XXIE (GhcPass _1) | |
Defined in GHC.Hs.ImpExp |
type family XIEDocNamed x #
Instances
type XIEDocNamed (GhcPass _1) | |
Defined in GHC.Hs.ImpExp |
Instances
type XIEDoc (GhcPass _1) | |
Defined in GHC.Hs.ImpExp |
Instances
type XIEGroup (GhcPass _1) | |
Defined in GHC.Hs.ImpExp |
type family XIEModuleContents x #
Instances
type XIEModuleContents GhcPs | |
Defined in GHC.Hs.ImpExp | |
type XIEModuleContents GhcRn | |
Defined in GHC.Hs.ImpExp | |
type XIEModuleContents GhcTc | |
Defined in GHC.Hs.ImpExp |
type family XIEThingWith x #
Instances
type XIEThingWith (GhcPass 'Parsed) | |
Defined in GHC.Hs.ImpExp | |
type XIEThingWith (GhcPass 'Renamed) | |
Defined in GHC.Hs.ImpExp | |
type XIEThingWith (GhcPass 'Typechecked) | |
Defined in GHC.Hs.ImpExp |
type family XIEThingAll x #
Instances
type XIEThingAll (GhcPass _1) | |
Defined in GHC.Hs.ImpExp |
type family XIEThingAbs x #
Instances
type XIEThingAbs (GhcPass _1) | |
Defined in GHC.Hs.ImpExp |
Instances
type XIEVar GhcPs | |
Defined in GHC.Hs.ImpExp | |
type XIEVar GhcRn | |
Defined in GHC.Hs.ImpExp | |
type XIEVar GhcTc | |
Defined in GHC.Hs.ImpExp |
type family ImportDeclPkgQual x #
Instances
type ImportDeclPkgQual GhcPs | |
Defined in GHC.Hs.ImpExp | |
type ImportDeclPkgQual GhcRn | |
Defined in GHC.Hs.ImpExp | |
type ImportDeclPkgQual GhcTc | |
Defined in GHC.Hs.ImpExp |
type family XXImportDecl x #
Instances
type XXImportDecl (GhcPass _1) | |
Defined in GHC.Hs.ImpExp |
type family XCImportDecl x #
Instances
type XCImportDecl GhcPs | |
Defined in GHC.Hs.ImpExp | |
type XCImportDecl GhcRn | |
Defined in GHC.Hs.ImpExp | |
type XCImportDecl GhcTc | |
Defined in GHC.Hs.ImpExp |
type family XXFieldOcc x #
Instances
type XXFieldOcc (GhcPass _1) | |
Defined in GHC.Hs.Type |
type family XCFieldOcc x #
Instances
type XCFieldOcc GhcPs | |
Defined in GHC.Hs.Type | |
type XCFieldOcc GhcRn | |
Defined in GHC.Hs.Type | |
type XCFieldOcc GhcTc | |
Defined in GHC.Hs.Type |
type family XXConDeclField x #
Instances
type XXConDeclField (GhcPass _1) | |
Defined in GHC.Hs.Type |
type family XConDeclField x #
Instances
type XConDeclField (GhcPass _1) | |
Defined in GHC.Hs.Type |
type family XXTyVarBndr x #
Instances
type XXTyVarBndr (GhcPass _1) | |
Defined in GHC.Hs.Type |
type family XKindedTyVar x #
Instances
type XKindedTyVar (GhcPass _1) | |
Defined in GHC.Hs.Type |
type family XUserTyVar x #
Instances
type XUserTyVar (GhcPass _1) | |
Defined in GHC.Hs.Type |
type family XXHsForAllTelescope x #
Instances
type XXHsForAllTelescope (GhcPass _1) | |
Defined in GHC.Hs.Type |
type family XHsForAllInvis x #
Instances
type XHsForAllInvis (GhcPass _1) | |
Defined in GHC.Hs.Type |
type family XHsForAllVis x #
Instances
type XHsForAllVis (GhcPass _1) | |
Defined in GHC.Hs.Type |
Instances
type XXTyLit (GhcPass _1) | |
Defined in GHC.Hs.Type |
Instances
type XCharTy (GhcPass _1) | |
Defined in GHC.Hs.Type |
Instances
type XStrTy (GhcPass _1) | |
Defined in GHC.Hs.Type |
Instances
type XNumTy (GhcPass _1) | |
Defined in GHC.Hs.Type |
type family XWildCardTy x #
Instances
type XWildCardTy (GhcPass _1) | |
Defined in GHC.Hs.Type |
Instances
type XTyLit (GhcPass _1) | |
Defined in GHC.Hs.Type |
type family XExplicitTupleTy x #
Instances
type XExplicitTupleTy GhcPs | |
Defined in GHC.Hs.Type | |
type XExplicitTupleTy GhcRn | |
Defined in GHC.Hs.Type | |
type XExplicitTupleTy GhcTc | |
Defined in GHC.Hs.Type |
type family XExplicitListTy x #
Instances
type XExplicitListTy GhcPs | |
Defined in GHC.Hs.Type | |
type XExplicitListTy GhcRn | |
Defined in GHC.Hs.Type | |
type XExplicitListTy GhcTc | |
Defined in GHC.Hs.Type |
Instances
type XRecTy GhcPs | |
Defined in GHC.Hs.Type | |
type XRecTy GhcRn | |
Defined in GHC.Hs.Type | |
type XRecTy GhcTc | |
Defined in GHC.Hs.Type |
Instances
type XSpliceTy GhcPs | |
Defined in GHC.Hs.Type | |
type XSpliceTy GhcRn | |
Defined in GHC.Hs.Type | |
type XSpliceTy GhcTc | |
Defined in GHC.Hs.Type |
Instances
type XStarTy (GhcPass _1) | |
Defined in GHC.Hs.Type |
type family XAppKindTy x #
Instances
type XAppKindTy (GhcPass _1) | |
Defined in GHC.Hs.Type |
Instances
type XAppTy (GhcPass _1) | |
Defined in GHC.Hs.Type |
Instances
type XQualTy (GhcPass _1) | |
Defined in GHC.Hs.Type |
Instances
type XForAllTy (GhcPass _1) | |
Defined in GHC.Hs.Type |
type family XXHsPatSigType x #
Instances
type XXHsPatSigType (GhcPass _1) | |
Defined in GHC.Hs.Type |
type family XXHsWildCardBndrs x b #
Instances
type XXHsWildCardBndrs (GhcPass _1) _2 | |
Defined in GHC.Hs.Type |
Instances
type XHsWC GhcPs b | |
Defined in GHC.Hs.Type | |
type XHsWC GhcRn b | |
Defined in GHC.Hs.Type | |
type XHsWC GhcTc b | |
Defined in GHC.Hs.Type |
type family XXHsSigType x #
Instances
type XXHsSigType (GhcPass _1) | |
Defined in GHC.Hs.Type |
Instances
type XHsSig (GhcPass _1) | |
Defined in GHC.Hs.Type |
type family XXHsOuterTyVarBndrs x #
Instances
type XXHsOuterTyVarBndrs (GhcPass _1) | |
Defined in GHC.Hs.Type |
type family XHsOuterExplicit x flag #
Instances
type XHsOuterExplicit GhcPs _1 | |
Defined in GHC.Hs.Type | |
type XHsOuterExplicit GhcRn _1 | |
Defined in GHC.Hs.Type | |
type XHsOuterExplicit GhcTc flag | |
Defined in GHC.Hs.Type |
type family XHsOuterImplicit x #
Instances
type XHsOuterImplicit GhcPs | |
Defined in GHC.Hs.Type | |
type XHsOuterImplicit GhcRn | |
Defined in GHC.Hs.Type | |
type XHsOuterImplicit GhcTc | |
Defined in GHC.Hs.Type |
type family XXLHsQTyVars x #
Instances
type XXLHsQTyVars (GhcPass _1) | |
Defined in GHC.Hs.Type |
Instances
type XHsQTvs GhcPs | |
Defined in GHC.Hs.Type | |
type XHsQTvs GhcRn | |
Defined in GHC.Hs.Type | |
type XHsQTvs GhcTc | |
Defined in GHC.Hs.Type |
type family XHsFieldBind x #
Instances
type XHsFieldBind _1 | |
Defined in GHC.Hs.Pat |
Instances
type XXPat GhcPs | |
Defined in GHC.Hs.Pat | |
type XXPat GhcRn | |
Defined in GHC.Hs.Pat | |
type XXPat GhcTc | |
Defined in GHC.Hs.Pat |
Instances
type XSigPat GhcPs | |
Defined in GHC.Hs.Pat | |
type XSigPat GhcRn | |
Defined in GHC.Hs.Pat | |
type XSigPat GhcTc | |
Defined in GHC.Hs.Pat |
type family XNPlusKPat x #
Instances
type XNPlusKPat GhcPs | |
Defined in GHC.Hs.Pat | |
type XNPlusKPat GhcRn | |
Defined in GHC.Hs.Pat | |
type XNPlusKPat GhcTc | |
Defined in GHC.Hs.Pat |
Instances
type XLitPat (GhcPass _1) | |
Defined in GHC.Hs.Pat |
type family XSplicePat x #
Instances
type XSplicePat GhcPs | |
Defined in GHC.Hs.Pat | |
type XSplicePat GhcRn | |
Defined in GHC.Hs.Pat | |
type XSplicePat GhcTc | |
Defined in GHC.Hs.Pat |
Instances
type XConPat GhcPs | |
Defined in GHC.Hs.Pat | |
type XConPat GhcRn | |
Defined in GHC.Hs.Pat | |
type XConPat GhcTc | |
Defined in GHC.Hs.Pat |
Instances
type XSumPat GhcPs | |
Defined in GHC.Hs.Pat | |
type XSumPat GhcRn | |
Defined in GHC.Hs.Pat | |
type XSumPat GhcTc | |
Defined in GHC.Hs.Pat |
Instances
type XTuplePat GhcPs | |
Defined in GHC.Hs.Pat | |
type XTuplePat GhcRn | |
Defined in GHC.Hs.Pat | |
type XTuplePat GhcTc | |
Defined in GHC.Hs.Pat |
Instances
type XListPat GhcPs | |
Defined in GHC.Hs.Pat | |
type XListPat GhcRn | |
Defined in GHC.Hs.Pat | |
type XListPat GhcTc | |
Defined in GHC.Hs.Pat |
Instances
type XBangPat GhcPs | |
Defined in GHC.Hs.Pat | |
type XBangPat GhcRn | |
Defined in GHC.Hs.Pat | |
type XBangPat GhcTc | |
Defined in GHC.Hs.Pat |
Instances
type XAsPat GhcPs | |
Defined in GHC.Hs.Pat | |
type XAsPat GhcRn | |
Defined in GHC.Hs.Pat | |
type XAsPat GhcTc | |
Defined in GHC.Hs.Pat |
Instances
type XLazyPat GhcPs | |
Defined in GHC.Hs.Pat | |
type XLazyPat GhcRn | |
Defined in GHC.Hs.Pat | |
type XLazyPat GhcTc | |
Defined in GHC.Hs.Pat |
Instances
type XVarPat (GhcPass _1) | |
Defined in GHC.Hs.Pat |
Instances
type XWildPat GhcPs | |
Defined in GHC.Hs.Pat | |
type XWildPat GhcRn | |
Defined in GHC.Hs.Pat | |
type XWildPat GhcTc | |
Defined in GHC.Hs.Pat |
Instances
type XXOverLit (GhcPass _1) | |
Defined in GHC.Hs.Lit |
Instances
type XOverLit GhcPs | |
Defined in GHC.Hs.Lit | |
type XOverLit GhcRn | |
Defined in GHC.Hs.Lit | |
type XOverLit GhcTc | |
Defined in GHC.Hs.Lit |
Instances
type XXLit (GhcPass _1) | |
Defined in GHC.Hs.Lit |
type family XHsDoublePrim x #
Instances
type XHsDoublePrim (GhcPass _1) | |
Defined in GHC.Hs.Lit |
type family XHsFloatPrim x #
Instances
type XHsFloatPrim (GhcPass _1) | |
Defined in GHC.Hs.Lit |
Instances
type XHsRat (GhcPass _1) | |
Defined in GHC.Hs.Lit |
type family XHsInteger x #
Instances
type XHsInteger (GhcPass _1) | |
Defined in GHC.Hs.Lit |
type family XHsWord64Prim x #
Instances
type XHsWord64Prim (GhcPass _1) | |
Defined in GHC.Hs.Lit |
type family XHsInt64Prim x #
Instances
type XHsInt64Prim (GhcPass _1) | |
Defined in GHC.Hs.Lit |
type family XHsWordPrim x #
Instances
type XHsWordPrim (GhcPass _1) | |
Defined in GHC.Hs.Lit |
type family XHsIntPrim x #
Instances
type XHsIntPrim (GhcPass _1) | |
Defined in GHC.Hs.Lit |
Instances
type XHsInt (GhcPass _1) | |
Defined in GHC.Hs.Lit |
type family XHsStringPrim x #
Instances
type XHsStringPrim (GhcPass _1) | |
Defined in GHC.Hs.Lit |
Instances
type XHsString (GhcPass _1) | |
Defined in GHC.Hs.Lit |
type family XHsCharPrim x #
Instances
type XHsCharPrim (GhcPass _1) | |
Defined in GHC.Hs.Lit |
Instances
type XHsChar (GhcPass _1) | |
Defined in GHC.Hs.Lit |
type family XXApplicativeArg x #
Instances
type XXApplicativeArg (GhcPass _1) | |
Defined in GHC.Hs.Expr |
type family XApplicativeArgMany x #
Instances
type XApplicativeArgMany (GhcPass _1) | |
Defined in GHC.Hs.Expr |
type family XApplicativeArgOne x #
Instances
type XApplicativeArgOne GhcPs | |
Defined in GHC.Hs.Expr | |
type XApplicativeArgOne GhcRn | |
Defined in GHC.Hs.Expr | |
type XApplicativeArgOne GhcTc | |
Defined in GHC.Hs.Expr |
type family XXParStmtBlock x x' #
Instances
type XXParStmtBlock (GhcPass pL) (GhcPass pR) | |
Defined in GHC.Hs.Expr |
type family XParStmtBlock x x' #
Instances
type XParStmtBlock (GhcPass pL) (GhcPass pR) | |
Defined in GHC.Hs.Expr |
Instances
type XXCmd GhcPs | |
Defined in GHC.Hs.Expr | |
type XXCmd GhcRn | |
Defined in GHC.Hs.Expr | |
type XXCmd GhcTc | |
Defined in GHC.Hs.Expr |
Instances
type XCmdWrap (GhcPass _1) | |
Defined in GHC.Hs.Expr |
Instances
type XCmdDo GhcPs | |
Defined in GHC.Hs.Expr | |
type XCmdDo GhcRn | |
Defined in GHC.Hs.Expr | |
type XCmdDo GhcTc | |
Defined in GHC.Hs.Expr |
Instances
type XCmdLet GhcPs | |
Defined in GHC.Hs.Expr | |
type XCmdLet GhcRn | |
Defined in GHC.Hs.Expr | |
type XCmdLet GhcTc | |
Defined in GHC.Hs.Expr |
Instances
type XCmdIf GhcPs | |
Defined in GHC.Hs.Expr | |
type XCmdIf GhcRn | |
Defined in GHC.Hs.Expr | |
type XCmdIf GhcTc | |
Defined in GHC.Hs.Expr |
type family XCmdLamCase x #
Instances
type XCmdLamCase (GhcPass _1) | |
Defined in GHC.Hs.Expr |
Instances
type XCmdCase GhcPs | |
Defined in GHC.Hs.Expr | |
type XCmdCase GhcRn | |
Defined in GHC.Hs.Expr | |
type XCmdCase GhcTc | |
Defined in GHC.Hs.Expr |
Instances
type XCmdLam (GhcPass _1) | |
Defined in GHC.Hs.Expr |
type family XCmdArrForm x #
Instances
type XCmdArrForm GhcPs | |
Defined in GHC.Hs.Expr | |
type XCmdArrForm GhcRn | |
Defined in GHC.Hs.Expr | |
type XCmdArrForm GhcTc | |
Defined in GHC.Hs.Expr |
type family XCmdArrApp x #
Instances
type XCmdArrApp GhcPs | |
Defined in GHC.Hs.Expr | |
type XCmdArrApp GhcRn | |
Defined in GHC.Hs.Expr | |
type XCmdArrApp GhcTc | |
Defined in GHC.Hs.Expr |
Instances
type XXStmtLR (GhcPass _1) (GhcPass _2) b | |
Defined in GHC.Hs.Expr |
type family XTransStmt x x' b #
Instances
type XTransStmt (GhcPass _1) GhcPs b | |
Defined in GHC.Hs.Expr | |
type XTransStmt (GhcPass _1) GhcRn b | |
Defined in GHC.Hs.Expr | |
type XTransStmt (GhcPass _1) GhcTc b | |
Defined in GHC.Hs.Expr |
Instances
type XParStmt (GhcPass _1) GhcPs b | |
Defined in GHC.Hs.Expr | |
type XParStmt (GhcPass _1) GhcRn b | |
Defined in GHC.Hs.Expr | |
type XParStmt (GhcPass _1) GhcTc b | |
Defined in GHC.Hs.Expr |
type family XBodyStmt x x' b #
Instances
type XBodyStmt (GhcPass _1) GhcPs b | |
Defined in GHC.Hs.Expr | |
type XBodyStmt (GhcPass _1) GhcRn b | |
Defined in GHC.Hs.Expr | |
type XBodyStmt (GhcPass _1) GhcTc b | |
Defined in GHC.Hs.Expr |
type family XApplicativeStmt x x' b #
Instances
type XApplicativeStmt (GhcPass _1) GhcPs b | |
Defined in GHC.Hs.Expr | |
type XApplicativeStmt (GhcPass _1) GhcRn b | |
Defined in GHC.Hs.Expr | |
type XApplicativeStmt (GhcPass _1) GhcTc b | |
Defined in GHC.Hs.Expr |
type family XLastStmt x x' b #
Instances
type XLastStmt (GhcPass _1) (GhcPass _2) b | |
Defined in GHC.Hs.Expr |
Instances
type XXGRHS (GhcPass _1) b | |
Defined in GHC.Hs.Expr |
Instances
type XXGRHSs (GhcPass _1) _2 | |
Defined in GHC.Hs.Expr |
Instances
type XCGRHSs (GhcPass _1) _2 | |
Defined in GHC.Hs.Expr |
Instances
type XXMatch (GhcPass _1) b | |
Defined in GHC.Hs.Expr |
type family XXMatchGroup x b #
Instances
type XXMatchGroup (GhcPass _1) b | |
Defined in GHC.Hs.Expr |
Instances
type XMG GhcPs b | |
Defined in GHC.Hs.Expr | |
type XMG GhcRn b | |
Defined in GHC.Hs.Expr | |
type XMG GhcTc b | |
Defined in GHC.Hs.Expr |
Instances
type XXCmdTop (GhcPass _1) | |
Defined in GHC.Hs.Expr |
Instances
type XCmdTop GhcPs | |
Defined in GHC.Hs.Expr | |
type XCmdTop GhcRn | |
Defined in GHC.Hs.Expr | |
type XCmdTop GhcTc | |
Defined in GHC.Hs.Expr |
Instances
type XXQuote GhcPs | |
Defined in GHC.Hs.Expr | |
type XXQuote GhcRn | |
Defined in GHC.Hs.Expr | |
type XXQuote GhcTc | |
Defined in GHC.Hs.Expr |
Instances
type XVarBr GhcPs | |
Defined in GHC.Hs.Expr | |
type XVarBr GhcRn | |
Defined in GHC.Hs.Expr | |
type XVarBr GhcTc | |
Defined in GHC.Hs.Expr |
Instances
type XTypBr GhcPs | |
Defined in GHC.Hs.Expr | |
type XTypBr GhcRn | |
Defined in GHC.Hs.Expr | |
type XTypBr GhcTc | |
Defined in GHC.Hs.Expr |
Instances
type XDecBrG GhcPs | |
Defined in GHC.Hs.Expr | |
type XDecBrG GhcRn | |
Defined in GHC.Hs.Expr | |
type XDecBrG GhcTc | |
Defined in GHC.Hs.Expr |
Instances
type XDecBrL GhcPs | |
Defined in GHC.Hs.Expr | |
type XDecBrL GhcRn | |
Defined in GHC.Hs.Expr | |
type XDecBrL GhcTc | |
Defined in GHC.Hs.Expr |
Instances
type XPatBr GhcPs | |
Defined in GHC.Hs.Expr | |
type XPatBr GhcRn | |
Defined in GHC.Hs.Expr | |
type XPatBr GhcTc | |
Defined in GHC.Hs.Expr |
Instances
type XExpBr GhcPs | |
Defined in GHC.Hs.Expr | |
type XExpBr GhcRn | |
Defined in GHC.Hs.Expr | |
type XExpBr GhcTc | |
Defined in GHC.Hs.Expr |
type family XXUntypedSplice x #
Instances
type XXUntypedSplice p | |
Defined in GHC.Hs.Expr |
type family XQuasiQuote x #
Instances
type XQuasiQuote p | |
Defined in GHC.Hs.Expr |
type family XUntypedSpliceExpr x #
Instances
type XUntypedSpliceExpr GhcPs | |
Defined in GHC.Hs.Expr | |
type XUntypedSpliceExpr GhcRn | |
Defined in GHC.Hs.Expr | |
type XUntypedSpliceExpr GhcTc | |
Defined in GHC.Hs.Expr |
Instances
type XXTupArg (GhcPass _1) | |
Defined in GHC.Hs.Expr |
Instances
type XMissing GhcPs | |
Defined in GHC.Hs.Expr | |
type XMissing GhcRn | |
Defined in GHC.Hs.Expr | |
type XMissing GhcTc | |
Defined in GHC.Hs.Expr |
type family XXAmbiguousFieldOcc x #
Instances
type XXAmbiguousFieldOcc (GhcPass _1) | |
Defined in GHC.Hs.Type |
type family XAmbiguous x #
Instances
type XAmbiguous GhcPs | |
Defined in GHC.Hs.Type | |
type XAmbiguous GhcRn | |
Defined in GHC.Hs.Type | |
type XAmbiguous GhcTc | |
Defined in GHC.Hs.Type |
type family XUnambiguous x #
Instances
type XUnambiguous GhcPs | |
Defined in GHC.Hs.Type | |
type XUnambiguous GhcRn | |
Defined in GHC.Hs.Type | |
type XUnambiguous GhcTc | |
Defined in GHC.Hs.Type |
Instances
type XXPragE (GhcPass _1) | |
Defined in GHC.Hs.Expr |
Instances
type XSCC (GhcPass _1) | |
Defined in GHC.Hs.Expr |
type family XXDotFieldOcc x #
Instances
type XXDotFieldOcc (GhcPass _1) | |
Defined in GHC.Hs.Expr |
type family XCDotFieldOcc x #
Instances
type XCDotFieldOcc (GhcPass _1) | |
Defined in GHC.Hs.Expr |
Instances
type XXExpr GhcPs | |
Defined in GHC.Hs.Expr | |
type XXExpr GhcRn | |
Defined in GHC.Hs.Expr | |
type XXExpr GhcTc | |
Defined in GHC.Hs.Expr |
Instances
type XPragE (GhcPass _1) | |
Defined in GHC.Hs.Expr |
type family XUntypedSplice x #
Instances
type XUntypedSplice GhcPs | |
Defined in GHC.Hs.Expr | |
type XUntypedSplice GhcRn | |
Defined in GHC.Hs.Expr | |
type XUntypedSplice GhcTc | |
Defined in GHC.Hs.Expr |
type family XTypedSplice x #
Instances
type XTypedSplice GhcPs | |
Defined in GHC.Hs.Expr | |
type XTypedSplice GhcRn | |
Defined in GHC.Hs.Expr | |
type XTypedSplice GhcTc | |
Defined in GHC.Hs.Expr |
type family XUntypedBracket x #
Instances
type XUntypedBracket GhcPs | |
Defined in GHC.Hs.Expr | |
type XUntypedBracket GhcRn | |
Defined in GHC.Hs.Expr | |
type XUntypedBracket GhcTc | |
Defined in GHC.Hs.Expr |
type family XTypedBracket x #
Instances
type XTypedBracket GhcPs | |
Defined in GHC.Hs.Expr | |
type XTypedBracket GhcRn | |
Defined in GHC.Hs.Expr | |
type XTypedBracket GhcTc | |
Defined in GHC.Hs.Expr |
Instances
type XArithSeq GhcPs | |
Defined in GHC.Hs.Expr | |
type XArithSeq GhcRn | |
Defined in GHC.Hs.Expr | |
type XArithSeq GhcTc | |
Defined in GHC.Hs.Expr |
type family XExprWithTySig x #
Instances
type XExprWithTySig GhcPs | |
Defined in GHC.Hs.Expr | |
type XExprWithTySig GhcRn | |
Defined in GHC.Hs.Expr | |
type XExprWithTySig GhcTc | |
Defined in GHC.Hs.Expr |
type family XProjection x #
Instances
type XProjection GhcPs | |
Defined in GHC.Hs.Expr | |
type XProjection GhcRn | |
Defined in GHC.Hs.Expr | |
type XProjection GhcTc | |
Defined in GHC.Hs.Expr |
Instances
type XGetField GhcPs | |
Defined in GHC.Hs.Expr | |
type XGetField GhcRn | |
Defined in GHC.Hs.Expr | |
type XGetField GhcTc | |
Defined in GHC.Hs.Expr |
type family XRecordUpd x #
Instances
type XRecordUpd GhcPs | |
Defined in GHC.Hs.Expr | |
type XRecordUpd GhcRn | |
Defined in GHC.Hs.Expr | |
type XRecordUpd GhcTc | |
Defined in GHC.Hs.Expr |
type family XRecordCon x #
Instances
type XRecordCon GhcPs | |
Defined in GHC.Hs.Expr | |
type XRecordCon GhcRn | |
Defined in GHC.Hs.Expr | |
type XRecordCon GhcTc | |
Defined in GHC.Hs.Expr |
type family XExplicitList x #
Instances
type XExplicitList GhcPs | |
Defined in GHC.Hs.Expr | |
type XExplicitList GhcRn | |
Defined in GHC.Hs.Expr | |
type XExplicitList GhcTc | |
Defined in GHC.Hs.Expr |
Instances
type XDo GhcPs | |
Defined in GHC.Hs.Expr | |
type XDo GhcRn | |
Defined in GHC.Hs.Expr | |
type XDo GhcTc | |
Defined in GHC.Hs.Expr |
Instances
type XLet GhcPs | |
Defined in GHC.Hs.Expr | |
type XLet GhcRn | |
Defined in GHC.Hs.Expr | |
type XLet GhcTc | |
Defined in GHC.Hs.Expr |
Instances
type XMultiIf GhcPs | |
Defined in GHC.Hs.Expr | |
type XMultiIf GhcRn | |
Defined in GHC.Hs.Expr | |
type XMultiIf GhcTc | |
Defined in GHC.Hs.Expr |
Instances
type XIf GhcPs | |
Defined in GHC.Hs.Expr | |
type XIf GhcRn | |
Defined in GHC.Hs.Expr | |
type XIf GhcTc | |
Defined in GHC.Hs.Expr |
Instances
type XCase GhcPs | |
Defined in GHC.Hs.Expr | |
type XCase GhcRn | |
Defined in GHC.Hs.Expr | |
type XCase GhcTc | |
Defined in GHC.Hs.Expr |
type family XExplicitSum x #
Instances
type XExplicitSum GhcPs | |
Defined in GHC.Hs.Expr | |
type XExplicitSum GhcRn | |
Defined in GHC.Hs.Expr | |
type XExplicitSum GhcTc | |
Defined in GHC.Hs.Expr |
type family XExplicitTuple x #
Instances
type XExplicitTuple GhcPs | |
Defined in GHC.Hs.Expr | |
type XExplicitTuple GhcRn | |
Defined in GHC.Hs.Expr | |
type XExplicitTuple GhcTc | |
Defined in GHC.Hs.Expr |
Instances
type XSectionR GhcPs | |
Defined in GHC.Hs.Expr | |
type XSectionR GhcRn | |
Defined in GHC.Hs.Expr | |
type XSectionR GhcTc | |
Defined in GHC.Hs.Expr |
Instances
type XSectionL GhcPs | |
Defined in GHC.Hs.Expr | |
type XSectionL GhcRn | |
Defined in GHC.Hs.Expr | |
type XSectionL GhcTc | |
Defined in GHC.Hs.Expr |
Instances
type XNegApp GhcPs | |
Defined in GHC.Hs.Expr | |
type XNegApp GhcRn | |
Defined in GHC.Hs.Expr | |
type XNegApp GhcTc | |
Defined in GHC.Hs.Expr |
Instances
type XOpApp GhcPs | |
Defined in GHC.Hs.Expr | |
type XOpApp GhcRn | |
Defined in GHC.Hs.Expr | |
type XOpApp GhcTc | |
Defined in GHC.Hs.Expr |
Instances
type XAppTypeE GhcPs | |
Defined in GHC.Hs.Expr | |
type XAppTypeE GhcRn | |
Defined in GHC.Hs.Expr | |
type XAppTypeE GhcTc | |
Defined in GHC.Hs.Expr |
Instances
type XLam (GhcPass _1) | |
Defined in GHC.Hs.Expr | |
type XLam (GhcPass _1) | |
Defined in GHC.Hs.Expr |
Instances
type XIPVar GhcPs | |
Defined in GHC.Hs.Expr | |
type XIPVar GhcRn | |
Defined in GHC.Hs.Expr | |
type XIPVar GhcTc | |
Defined in GHC.Hs.Expr |
type family XOverLabel x #
Instances
type XOverLabel GhcPs | |
Defined in GHC.Hs.Expr | |
type XOverLabel GhcRn | |
Defined in GHC.Hs.Expr | |
type XOverLabel GhcTc | |
Defined in GHC.Hs.Expr |
Instances
type XRecSel GhcPs | |
Defined in GHC.Hs.Expr | |
type XRecSel GhcRn | |
Defined in GHC.Hs.Expr | |
type XRecSel GhcTc | |
Defined in GHC.Hs.Expr |
type family XUnboundVar x #
Instances
type XUnboundVar GhcPs | |
Defined in GHC.Hs.Expr | |
type XUnboundVar GhcRn | |
Defined in GHC.Hs.Expr | |
type XUnboundVar GhcTc | |
Defined in GHC.Hs.Expr |
Instances
type XVar (GhcPass _1) | |
Defined in GHC.Hs.Expr | |
type XVar (GhcPass _1) | |
Defined in GHC.Hs.Expr |
type family XXInjectivityAnn x #
Instances
type XXInjectivityAnn (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XCInjectivityAnn x #
Instances
type XCInjectivityAnn (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XXRoleAnnotDecl x #
Instances
type XXRoleAnnotDecl (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XCRoleAnnotDecl x #
Instances
type XCRoleAnnotDecl GhcPs | |
Defined in GHC.Hs.Decls | |
type XCRoleAnnotDecl GhcRn | |
Defined in GHC.Hs.Decls | |
type XCRoleAnnotDecl GhcTc | |
Defined in GHC.Hs.Decls |
Instances
type XXAnnDecl (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XHsAnnotation x #
Instances
type XHsAnnotation (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XXWarnDecl x #
Instances
type XXWarnDecl (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XXWarnDecls x #
Instances
type XXWarnDecls (GhcPass _1) | |
Defined in GHC.Hs.Decls |
Instances
type XWarnings GhcPs | |
Defined in GHC.Hs.Decls | |
type XWarnings GhcRn | |
Defined in GHC.Hs.Decls | |
type XWarnings GhcTc | |
Defined in GHC.Hs.Decls |
type family XXRuleBndr x #
Instances
type XXRuleBndr (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XRuleBndrSig x #
Instances
type XRuleBndrSig (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XCRuleBndr x #
Instances
type XCRuleBndr (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XXRuleDecl x #
Instances
type XXRuleDecl (GhcPass _1) | |
Defined in GHC.Hs.Decls |
Instances
type XHsRule GhcPs | |
Defined in GHC.Hs.Decls | |
type XHsRule GhcRn | |
Defined in GHC.Hs.Decls | |
type XHsRule GhcTc | |
Defined in GHC.Hs.Decls |
type family XXRuleDecls x #
Instances
type XXRuleDecls (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XCRuleDecls x #
Instances
type XCRuleDecls GhcPs | |
Defined in GHC.Hs.Decls | |
type XCRuleDecls GhcRn | |
Defined in GHC.Hs.Decls | |
type XCRuleDecls GhcTc | |
Defined in GHC.Hs.Decls |
type family XXForeignExport x #
Instances
type XXForeignExport (GhcPass _1) | |
Defined in GHC.Hs.Decls |
Instances
type XCExport (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XXForeignImport x #
Instances
type XXForeignImport (GhcPass _1) | |
Defined in GHC.Hs.Decls |
Instances
type XCImport (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XXForeignDecl x #
Instances
type XXForeignDecl (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XForeignExport x #
Instances
type XForeignExport GhcPs | |
Defined in GHC.Hs.Decls | |
type XForeignExport GhcRn | |
Defined in GHC.Hs.Decls | |
type XForeignExport GhcTc | |
Defined in GHC.Hs.Decls |
type family XForeignImport x #
Instances
type XForeignImport GhcPs | |
Defined in GHC.Hs.Decls | |
type XForeignImport GhcRn | |
Defined in GHC.Hs.Decls | |
type XForeignImport GhcTc | |
Defined in GHC.Hs.Decls |
type family XXDefaultDecl x #
Instances
type XXDefaultDecl (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XCDefaultDecl x #
Instances
type XCDefaultDecl GhcPs | |
Defined in GHC.Hs.Decls | |
type XCDefaultDecl GhcRn | |
Defined in GHC.Hs.Decls | |
type XCDefaultDecl GhcTc | |
Defined in GHC.Hs.Decls |
type family XViaStrategy x #
Instances
type XViaStrategy GhcPs | |
Defined in GHC.Hs.Decls | |
type XViaStrategy GhcRn | |
Defined in GHC.Hs.Decls | |
type XViaStrategy GhcTc | |
Defined in GHC.Hs.Decls |
type family XNewtypeStrategy x #
Instances
type XNewtypeStrategy GhcPs | |
Defined in GHC.Hs.Decls | |
type XNewtypeStrategy GhcRn | |
Defined in GHC.Hs.Decls | |
type XNewtypeStrategy GhcTc | |
Defined in GHC.Hs.Decls |
type family XAnyClassStrategy x #
Instances
type XAnyClassStrategy GhcPs | |
Defined in GHC.Hs.Decls | |
type XAnyClassStrategy GhcRn | |
Defined in GHC.Hs.Decls | |
type XAnyClassStrategy GhcTc | |
Defined in GHC.Hs.Decls |
type family XStockStrategy x #
Instances
type XStockStrategy GhcPs | |
Defined in GHC.Hs.Decls | |
type XStockStrategy GhcRn | |
Defined in GHC.Hs.Decls | |
type XStockStrategy GhcTc | |
Defined in GHC.Hs.Decls |
type family XXDerivDecl x #
Instances
type XXDerivDecl (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XCDerivDecl x #
Instances
type XCDerivDecl (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XXInstDecl x #
Instances
type XXInstDecl (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XTyFamInstD x #
Instances
type XTyFamInstD GhcPs | |
Defined in GHC.Hs.Decls | |
type XTyFamInstD GhcRn | |
Defined in GHC.Hs.Decls | |
type XTyFamInstD GhcTc | |
Defined in GHC.Hs.Decls |
type family XDataFamInstD x #
Instances
type XDataFamInstD (GhcPass _1) | |
Defined in GHC.Hs.Decls |
Instances
type XClsInstD (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XXClsInstDecl x #
Instances
type XXClsInstDecl (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XCClsInstDecl x #
Instances
type XCClsInstDecl GhcPs | |
Defined in GHC.Hs.Decls | |
type XCClsInstDecl GhcRn | |
Defined in GHC.Hs.Decls | |
type XCClsInstDecl GhcTc | |
Defined in GHC.Hs.Decls |
type family XXTyFamInstDecl x #
Instances
type XXTyFamInstDecl (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XCTyFamInstDecl x #
Instances
type XCTyFamInstDecl (GhcPass _1) | |
Defined in GHC.Hs.Decls |
Instances
type XXFamEqn (GhcPass _1) r | |
Defined in GHC.Hs.Decls |
Instances
type XXConDecl (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XConDeclH98 x #
Instances
type XConDeclH98 (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XConDeclGADT x #
Instances
type XConDeclGADT (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XXDerivClauseTys x #
Instances
type XXDerivClauseTys (GhcPass _1) | |
Defined in GHC.Hs.Decls |
Instances
type XDctMulti (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XDctSingle x #
Instances
type XDctSingle (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XXHsDerivingClause x #
Instances
type XXHsDerivingClause (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XCHsDerivingClause x #
Instances
type XCHsDerivingClause (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XXHsDataDefn x #
Instances
type XXHsDataDefn (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XCHsDataDefn x #
Instances
type XCHsDataDefn (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XXFamilyDecl x #
Instances
type XXFamilyDecl (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XCFamilyDecl x #
Instances
type XCFamilyDecl (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XXFamilyResultSig x #
Instances
type XXFamilyResultSig (GhcPass _1) | |
Defined in GHC.Hs.Decls |
Instances
type XTyVarSig (GhcPass _1) | |
Defined in GHC.Hs.Decls |
Instances
type XCKindSig (GhcPass _1) | |
Defined in GHC.Hs.Decls |
Instances
type XNoSig (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XXTyClGroup x #
Instances
type XXTyClGroup (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XCTyClGroup x #
Instances
type XCTyClGroup (GhcPass _1) | |
Defined in GHC.Hs.Decls |
Instances
type XXFunDep (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XXTyClDecl x #
Instances
type XXTyClDecl (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XClassDecl x #
Instances
type XClassDecl GhcPs | |
Defined in GHC.Hs.Decls | |
type XClassDecl GhcRn | |
Defined in GHC.Hs.Decls | |
type XClassDecl GhcTc | |
Defined in GHC.Hs.Decls |
Instances
type XDataDecl GhcPs | |
Defined in GHC.Hs.Decls | |
type XDataDecl GhcRn | |
Defined in GHC.Hs.Decls | |
type XDataDecl GhcTc | |
Defined in GHC.Hs.Decls |
Instances
type XFamDecl (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XXSpliceDecl x #
Instances
type XXSpliceDecl (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XSpliceDecl x #
Instances
type XSpliceDecl (GhcPass _1) | |
Defined in GHC.Hs.Decls |
Instances
type XXHsGroup (GhcPass _1) | |
Defined in GHC.Hs.Decls |
Instances
type XCHsGroup (GhcPass _1) | |
Defined in GHC.Hs.Decls |
Instances
type XXHsDecl (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XRoleAnnotD x #
Instances
type XRoleAnnotD (GhcPass _1) | |
Defined in GHC.Hs.Decls |
Instances
type XDocD (GhcPass _1) | |
Defined in GHC.Hs.Decls |
Instances
type XSpliceD (GhcPass _1) | |
Defined in GHC.Hs.Decls |
Instances
type XRuleD (GhcPass _1) | |
Defined in GHC.Hs.Decls |
Instances
type XAnnD (GhcPass _1) | |
Defined in GHC.Hs.Decls |
Instances
type XWarningD (GhcPass _1) | |
Defined in GHC.Hs.Decls |
Instances
type XForD (GhcPass _1) | |
Defined in GHC.Hs.Decls |
Instances
type XDefD (GhcPass _1) | |
Defined in GHC.Hs.Decls |
Instances
type XKindSigD (GhcPass _1) | |
Defined in GHC.Hs.Decls |
Instances
type XSigD (GhcPass _1) | |
Defined in GHC.Hs.Decls |
Instances
type XValD (GhcPass _1) | |
Defined in GHC.Hs.Decls |
Instances
type XDerivD (GhcPass _1) | |
Defined in GHC.Hs.Decls |
Instances
type XInstD (GhcPass _1) | |
Defined in GHC.Hs.Decls |
Instances
type XTyClD (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XXStandaloneKindSig x #
Instances
type XXStandaloneKindSig (GhcPass p) | |
Defined in GHC.Hs.Decls |
type family XStandaloneKindSig x #
Instances
type XStandaloneKindSig GhcPs | |
Defined in GHC.Hs.Decls | |
type XStandaloneKindSig GhcRn | |
Defined in GHC.Hs.Decls | |
type XStandaloneKindSig GhcTc | |
Defined in GHC.Hs.Decls |
type family XXFixitySig x #
Instances
type XXFixitySig (GhcPass p) | |
Defined in GHC.Hs.Binds |
type family XFixitySig x #
Instances
type XFixitySig (GhcPass p) | |
Defined in GHC.Hs.Binds |
Instances
type XXSig GhcPs | |
Defined in GHC.Hs.Binds | |
type XXSig GhcRn | |
Defined in GHC.Hs.Binds | |
type XXSig GhcTc | |
Defined in GHC.Hs.Binds |
type family XCompleteMatchSig x #
Instances
type XCompleteMatchSig (GhcPass p) | |
Defined in GHC.Hs.Binds |
type family XSCCFunSig x #
Instances
type XSCCFunSig (GhcPass p) | |
Defined in GHC.Hs.Binds |
type family XMinimalSig x #
Instances
type XMinimalSig (GhcPass p) | |
Defined in GHC.Hs.Binds |
type family XSpecInstSig x #
Instances
type XSpecInstSig (GhcPass p) | |
Defined in GHC.Hs.Binds |
type family XInlineSig x #
Instances
type XInlineSig (GhcPass p) | |
Defined in GHC.Hs.Binds |
type family XClassOpSig x #
Instances
type XClassOpSig (GhcPass p) | |
Defined in GHC.Hs.Binds |
type family XPatSynSig x #
Instances
type XPatSynSig (GhcPass p) | |
Defined in GHC.Hs.Binds |
Instances
type XXIPBind (GhcPass p) | |
Defined in GHC.Hs.Binds |
Instances
type XCIPBind GhcPs | |
Defined in GHC.Hs.Binds | |
type XCIPBind GhcRn | |
Defined in GHC.Hs.Binds | |
type XCIPBind GhcTc | |
Defined in GHC.Hs.Binds |
type family XXHsIPBinds x #
Instances
type XXHsIPBinds (GhcPass p) | |
Defined in GHC.Hs.Binds |
Instances
type XIPBinds GhcPs | |
Defined in GHC.Hs.Binds | |
type XIPBinds GhcRn | |
Defined in GHC.Hs.Binds | |
type XIPBinds GhcTc | |
Defined in GHC.Hs.Binds |
type family XXPatSynBind x x' #
Instances
type XXPatSynBind (GhcPass idL) (GhcPass idR) | |
Defined in GHC.Hs.Binds |
Instances
type family XXHsBindsLR x x' #
Instances
type XXHsBindsLR GhcPs pR | |
Defined in GHC.Hs.Binds | |
type XXHsBindsLR GhcRn pR | |
Defined in GHC.Hs.Binds | |
type XXHsBindsLR GhcTc pR | |
Defined in GHC.Hs.Binds |
type family XPatSynBind x x' #
Instances
type XPatSynBind (GhcPass pL) (GhcPass pR) | |
Defined in GHC.Hs.Binds |
Instances
type XVarBind (GhcPass pL) (GhcPass pR) | |
Defined in GHC.Hs.Binds |
Instances
type XFunBind (GhcPass pL) GhcPs | |
Defined in GHC.Hs.Binds | |
type XFunBind (GhcPass pL) GhcRn | After the renamer (but before the type-checker), the FunBind extension field contains the locally-bound free variables of this defn. See Note [Bind free vars] |
Defined in GHC.Hs.Binds | |
type XFunBind (GhcPass pL) GhcTc | After the type-checker, the FunBind extension field contains the ticks to put on the rhs, if any, and a coercion from the type of the MatchGroup to the type of the Id. Example: f :: Int -> forall a. a -> a f x y = y Then the MatchGroup will have type (Int -> a' -> a') (with a free type variable a'). The coercion will take a CoreExpr of this type and convert it to a CoreExpr of type Int -> forall a'. a' -> a' Notice that the coercion captures the free a'. |
Defined in GHC.Hs.Binds |
type family XXValBindsLR x x' #
Instances
type XXValBindsLR (GhcPass pL) pR | |
Defined in GHC.Hs.Binds |
Instances
type XValBinds (GhcPass pL) (GhcPass pR) | |
Defined in GHC.Hs.Binds |
type family XXHsLocalBindsLR x x' #
Instances
type XXHsLocalBindsLR (GhcPass pL) (GhcPass pR) | |
Defined in GHC.Hs.Binds |
type family XEmptyLocalBinds x x' #
Instances
type XEmptyLocalBinds (GhcPass pL) (GhcPass pR) | |
Defined in GHC.Hs.Binds |
type family XHsIPBinds x x' #
Instances
type XHsIPBinds (GhcPass pL) (GhcPass pR) | |
Defined in GHC.Hs.Binds |
type family XHsValBinds x x' #
Instances
type XHsValBinds (GhcPass pL) (GhcPass pR) | |
Defined in GHC.Hs.Binds |
Maps the "normal" id type for a given pass
The trivial wrapper that carries no additional information See Note [XRec and SrcSpans in the AST]
We can map over the underlying type contained in an XRec
while preserving
the annotation as is.
We can strip off the XRec to access the underlying data. See Note [XRec and SrcSpans in the AST]
type family Anno a = (b :: Type) #
Instances
type family XRec p a = (r :: Type) | r -> a #
GHC's L prefixed variants wrap their vanilla variant in this type family,
to add SrcLoc
info via Located
. Other passes than GhcPass
not
interested in location information can define this as
type instance XRec NoLocated a = a
.
See Note [XRec and SrcSpans in the AST]
Instances
type XRec (GhcPass p) a | |
Defined in GHC.Hs.Extension |
data DataConCantHappen #
Instances
newtype ModuleName #
A ModuleName is essentially a simple string, e.g. Data.List
.
Constructors
ModuleName FastString |
Instances
class HasOccName name where #
Other names in the compiler add additional information to an OccName. This class provides a consistent way to access the underlying OccName.
Instances
HasOccName IfaceClassOp | |
Defined in GHC.Iface.Syntax Methods occName :: IfaceClassOp -> OccName # | |
HasOccName IfaceConDecl | |
Defined in GHC.Iface.Syntax Methods occName :: IfaceConDecl -> OccName # | |
HasOccName IfaceDecl | |
Defined in GHC.Iface.Syntax | |
HasOccName HoleFitCandidate | |
Defined in GHC.Tc.Errors.Hole.FitTypes Methods occName :: HoleFitCandidate -> OccName # | |
HasOccName TcBinder | |
Defined in GHC.Tc.Types | |
HasOccName GreName | |
Defined in GHC.Types.Avail | |
HasOccName FieldLabel | |
Defined in GHC.Types.FieldLabel Methods occName :: FieldLabel -> OccName # | |
HasOccName Name | |
Defined in GHC.Types.Name | |
HasOccName OccName | |
Defined in GHC.Types.Name.Occurrence | |
HasOccName GlobalRdrElt | |
Defined in GHC.Types.Name.Reader Methods occName :: GlobalRdrElt -> OccName # | |
HasOccName RdrName | |
Defined in GHC.Types.Name.Reader | |
HasOccName Var | |
Defined in GHC.Types.Var |
Occurrence Name
In this context that means: "classified (i.e. as a type name, value name, etc) but not qualified and not yet resolved"
Instances
Data OccName | |
Defined in GHC.Types.Name.Occurrence Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> OccName -> c OccName # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c OccName # toConstr :: OccName -> Constr # dataTypeOf :: OccName -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c OccName) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c OccName) # gmapT :: (forall b. Data b => b -> b) -> OccName -> OccName # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> OccName -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> OccName -> r # gmapQ :: (forall d. Data d => d -> u) -> OccName -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> OccName -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> OccName -> m OccName # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> OccName -> m OccName # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> OccName -> m OccName # | |
NFData OccName | |
Defined in GHC.Types.Name.Occurrence | |
HasOccName OccName | |
Defined in GHC.Types.Name.Occurrence | |
Uniquable OccName | |
Defined in GHC.Types.Name.Occurrence | |
Binary OccName | |
Outputable OccName | |
Defined in GHC.Types.Name.Occurrence | |
OutputableBndr OccName | |
Defined in GHC.Types.Name.Occurrence Methods pprBndr :: BindingSite -> OccName -> SDoc # pprPrefixOcc :: OccName -> SDoc # pprInfixOcc :: OccName -> SDoc # bndrIsJoin_maybe :: OccName -> Maybe Int # | |
Eq OccName | |
Ord OccName | |
Defined in GHC.Types.Name.Occurrence |
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
A unit identifier identifies a (possibly partially) instantiated library.
It is primarily used as part of GenModule
, which in turn is used in Name
,
which is used to give names to entities when typechecking.
There are two possible forms for a Unit
:
1) It can be a RealUnit
, in which case we just have a DefUnitId
that
uniquely identifies some fully compiled, installed library we have on disk.
2) It can be an VirtUnit
. When we are typechecking a library with missing
holes, we may need to instantiate a library on the fly (in which case we
don't have any on-disk representation.) In that case, you have an
GenInstantiatedUnit
, which explicitly records the instantiation, so that we
can substitute over it.
Constructors
RealUnit !(Definite uid) | Installed definite unit (either a fully instantiated unit or a closed unit) |
VirtUnit !(GenInstantiatedUnit uid) | Virtual unit instantiated on-the-fly. It may be definite if all the holes are instantiated but we don't have code objects for it. |
HoleUnit | Fake hole unit |
Instances
Data Unit | |
Defined in GHC.Unit.Types Methods 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 # | |
Show Unit | |
NFData Unit | |
Defined in GHC.Unit.Types | |
Uniquable Module | |
Defined in GHC.Unit.Types | |
Binary Unit | |
Outputable Module | |
Defined in GHC.Unit.Types | |
Outputable Unit | |
Defined in GHC.Unit.Types | |
Ord Unit | |
IsUnitId u => Uniquable (GenUnit u) | |
Defined in GHC.Unit.Types | |
IsUnitId u => IsUnitId (GenUnit u) | |
Defined in GHC.Unit.Types Methods unitFS :: GenUnit u -> FastString # | |
IsUnitId u => Eq (GenUnit u) | |
A generic module is a pair of a unit identifier and a ModuleName
.
Constructors
Module | |
Fields
|
Instances
Functor GenModule | |
Uniquable Module | |
Defined in GHC.Unit.Types | |
Outputable InstalledModule | |
Defined in GHC.Unit.Types Methods ppr :: InstalledModule -> SDoc # | |
Outputable InstantiatedModule | |
Defined in GHC.Unit.Types Methods ppr :: InstantiatedModule -> SDoc # | |
Outputable Module | |
Defined in GHC.Unit.Types | |
Data unit => Data (GenModule unit) | |
Defined in GHC.Unit.Types Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GenModule unit -> c (GenModule unit) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (GenModule unit) # toConstr :: GenModule unit -> Constr # dataTypeOf :: GenModule unit -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (GenModule unit)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (GenModule unit)) # gmapT :: (forall b. Data b => b -> b) -> GenModule unit -> GenModule unit # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GenModule unit -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GenModule unit -> r # gmapQ :: (forall d. Data d => d -> u) -> GenModule unit -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> GenModule unit -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> GenModule unit -> m (GenModule unit) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GenModule unit -> m (GenModule unit) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GenModule unit -> m (GenModule unit) # | |
NFData (GenModule a) | |
Defined in GHC.Unit.Types | |
Binary a => Binary (GenModule a) | |
Eq unit => Eq (GenModule unit) | |
Ord unit => Ord (GenModule unit) | |
Defined in GHC.Unit.Types Methods compare :: GenModule unit -> GenModule unit -> Ordering # (<) :: GenModule unit -> GenModule unit -> Bool # (<=) :: GenModule unit -> GenModule unit -> Bool # (>) :: GenModule unit -> GenModule unit -> Bool # (>=) :: GenModule unit -> GenModule unit -> Bool # |
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.
Constructors
UnitId | |
Fields
|
Instances
Data Unit | |
Defined in GHC.Unit.Types Methods 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 Methods 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 Methods unitFS :: UnitId -> FastString # | |
Binary InstantiatedUnit | |
Defined in GHC.Unit.Types Methods 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 Methods ppr :: InstalledModule -> SDoc # | |
Outputable InstantiatedModule | |
Defined in GHC.Unit.Types Methods ppr :: InstantiatedModule -> SDoc # | |
Outputable InstantiatedUnit | |
Defined in GHC.Unit.Types Methods 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 | |
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.
Methods
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.
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.
Methods
ftext :: FastString -> doc #
ztext :: FastZString -> doc #
Join two doc
s together horizontally without a gap.
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.
Instances
IsLine HLine | |
IsLine SDoc | |
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.
Instances
IsOutput HDoc | |
Defined in GHC.Utils.Outputable | |
IsOutput HLine | |
Defined in GHC.Utils.Outputable | |
IsOutput SDoc | |
Defined in GHC.Utils.Outputable |
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 | |
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.
class Outputable a => OutputableBndr a where #
When we print a binder, we often want to print its type too.
The OutputableBndr
class encapsulates this idea.
Minimal complete definition
Methods
pprBndr :: BindingSite -> a -> SDoc #
pprPrefixOcc :: a -> SDoc #
pprInfixOcc :: a -> SDoc #
bndrIsJoin_maybe :: a -> Maybe Int #
Instances
data BindingSite #
BindingSite
is used to tell the thing that prints binder what
language construct is binding the identifier. This can be used
to decide how much info to print.
Also see Note [Binding-site specific printing] in GHC.Core.Ppr
Constructors
LambdaBind | The x in (x. e) |
CaseBind | The x in case scrut of x { (y,z) -> ... } |
CasePatBind | The y,z in case scrut of x { (y,z) -> ... } |
LetBind | The x in (let x = rhs in e) |
Instances
Eq BindingSite | |
Defined in GHC.Utils.Outputable |
Wrapper for types having a Outputable instance when an OutputableP instance is required.
Constructors
PDoc a |
Instances
Outputable a => OutputableP env (PDoc a) | |
Defined in GHC.Utils.Outputable |
class OutputableP env a where #
Outputable class with an additional environment value
See Note [The OutputableP class]
Instances
class Outputable a where #
Class designating that some type has an SDoc
representation
Instances
data SDocContext #
Constructors
data QualifyName #
Constructors
NameUnqual | |
NameQual ModuleName | |
NameNotInScope1 | |
NameNotInScope2 |
Instances
Outputable QualifyName | |
Defined in GHC.Utils.Outputable Methods ppr :: QualifyName -> SDoc # |
newtype IsEmptyOrSingleton #
Constructors
IsEmptyOrSingleton Bool |
data PromotedItem #
data PromotionTickContext #
Flags that affect whether a promotion tick is printed.
Constructors
PromTickCtx | |
Fields |
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
.
Constructors
AllTheWay | |
PartWay Int | 0 => stop |
DefaultDepth | Use |
Constructors
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.
Constructors
VanillaId | |
RecSelId | The |
Fields
| |
DataConWorkId DataCon | The |
DataConWrapId DataCon | The |
ClassOpId Class | The |
PrimOpId PrimOp Bool | The |
FCallId ForeignCall | The |
TickBoxOpId TickBoxOp | The |
DFunId Bool | A dictionary function. Bool = True = the class has only one method, so may be implemented with a newtype, so it might be bad to be strict on this dictionary |
CoVarId | A coercion variable This only covers un-lifted coercions, of type (t1 ~# t2) or (t1 ~R# t2), not their lifted variants |
JoinId JoinArity (Maybe [CbvMark]) | An |
WorkerLikeId [CbvMark] | An |
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.
data StaticPlugin #
A static plugin with its arguments. For registering compiled-in plugins through the GHC API.
Constructors
StaticPlugin | |
Fields
|
data LoadedPlugin #
A plugin with its arguments. The result of loading the plugin.
Constructors
LoadedPlugin | |
Fields
|
Constructors
Plugins | |
Fields
|
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
Minimal complete definition
Instances
NamedThing Class | |
Defined in GHC.Core.Class | |
NamedThing DataCon | |
Defined in GHC.Core.DataCon | |
NamedThing FamInst | |
Defined in GHC.Core.FamInstEnv | |
NamedThing ClsInst | |
Defined in GHC.Core.InstEnv | |
NamedThing PatSyn | |
Defined in GHC.Core.PatSyn | |
NamedThing TyCon | |
Defined in GHC.Core.TyCon | |
NamedThing IfaceClassOp | |
Defined in GHC.Iface.Syntax | |
NamedThing IfaceConDecl | |
Defined in GHC.Iface.Syntax | |
NamedThing IfaceDecl | |
Defined in GHC.Iface.Syntax | |
NamedThing HoleFitCandidate | |
Defined in GHC.Tc.Errors.Hole.FitTypes | |
NamedThing Name | |
Defined in GHC.Types.Name | |
NamedThing TyThing | |
Defined in GHC.Types.TyThing | |
NamedThing Var | |
Defined in GHC.Types.Var | |
NamedThing (CoAxiom br) | |
Defined in GHC.Core.Coercion.Axiom | |
NamedThing e => NamedThing (Located e) | |
Defined in GHC.Types.Name | |
NamedThing (Located a) => NamedThing (LocatedAn an a) | |
Defined in GHC.Parser.Annotation | |
NamedThing tv => NamedThing (VarBndr tv flag) | |
Defined in GHC.Types.Var |
A unique, unambiguous name for something, containing information about where that thing originated.
Instances
Data Name | |
Defined in GHC.Types.Name Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Name -> c Name # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Name # dataTypeOf :: Name -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Name) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Name) # gmapT :: (forall b. Data b => b -> b) -> Name -> Name # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Name -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Name -> r # gmapQ :: (forall d. Data d => d -> u) -> Name -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Name -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Name -> m Name # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Name -> m Name # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Name -> m Name # | |
NFData Name | |
Defined in GHC.Types.Name | |
NamedThing Name | |
Defined in GHC.Types.Name | |
HasOccName Name | |
Defined in GHC.Types.Name | |
Uniquable Name | |
Defined in GHC.Types.Name | |
Binary Name | Assumes that the |
Outputable Name | |
Defined in GHC.Types.Name | |
OutputableBndr Name | |
Defined in GHC.Types.Name Methods pprBndr :: BindingSite -> Name -> SDoc # pprPrefixOcc :: Name -> SDoc # pprInfixOcc :: Name -> SDoc # bndrIsJoin_maybe :: Name -> Maybe Int # | |
Eq Name | |
Ord Name | Caution: This instance is implemented via See |
type Anno Name | |
Defined in GHC.Hs.Extension | |
type Anno (LocatedN Name) | |
Defined in GHC.Hs.Binds | |
type Anno [LocatedN Name] | |
Defined in GHC.Hs.Binds |
type InvisTVBinder = VarBndr TyVar Specificity #
data Specificity #
Whether an Invisible
argument may appear in source Haskell.
Constructors
InferredSpec | the argument may not appear in source Haskell, it is only inferred. |
SpecifiedSpec | the argument may appear in source Haskell, but isn't required. |
Instances
Constructors
Bndr var argf |
Instances
(Data var, Data argf) => Data (VarBndr var argf) | |
Defined in GHC.Types.Var Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> VarBndr var argf -> c (VarBndr var argf) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (VarBndr var argf) # toConstr :: VarBndr var argf -> Constr # dataTypeOf :: VarBndr var argf -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (VarBndr var argf)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (VarBndr var argf)) # gmapT :: (forall b. Data b => b -> b) -> VarBndr var argf -> VarBndr var argf # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> VarBndr var argf -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> VarBndr var argf -> r # gmapQ :: (forall d. Data d => d -> u) -> VarBndr var argf -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> VarBndr var argf -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> VarBndr var argf -> m (VarBndr var argf) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> VarBndr var argf -> m (VarBndr var argf) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> VarBndr var argf -> m (VarBndr var argf) # | |
NamedThing tv => NamedThing (VarBndr tv flag) | |
Defined in GHC.Types.Var | |
(Binary tv, Binary vis) => Binary (VarBndr tv vis) | |
OutputableBndr tv => Outputable (VarBndr tv TyConBndrVis) | |
Defined in GHC.Core.TyCon Methods ppr :: VarBndr tv TyConBndrVis -> SDoc # | |
Outputable tv => Outputable (VarBndr tv ForAllTyFlag) | |
Defined in GHC.Types.Var Methods ppr :: VarBndr tv ForAllTyFlag -> SDoc # | |
Outputable tv => Outputable (VarBndr tv Specificity) | |
Defined in GHC.Types.Var Methods ppr :: VarBndr tv Specificity -> SDoc # |
Variable
Essentially a typed Name
, that may also contain some additional information
about the Var
and its use sites.
Instances
Data Var | |
Defined in GHC.Types.Var Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Var -> c Var # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Var # dataTypeOf :: Var -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Var) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Var) # gmapT :: (forall b. Data b => b -> b) -> Var -> Var # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Var -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Var -> r # gmapQ :: (forall d. Data d => d -> u) -> Var -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Var -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Var -> m Var # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Var -> m Var # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Var -> m Var # | |
NamedThing Var | |
Defined in GHC.Types.Var | |
HasOccName Var | |
Defined in GHC.Types.Var | |
Uniquable Var | |
Defined in GHC.Types.Var | |
Outputable Var | |
Defined in GHC.Types.Var | |
Eq Var | |
Ord Var | |
Eq (DeBruijn Var) | |
OutputableBndr (Id, TagSig) | |
Defined in GHC.Stg.InferTags.TagSig | |
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 |
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 Methods 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 | |
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
Constructors
Invisible Specificity | |
Required |
Bundled Patterns
pattern Specified :: ForAllTyFlag | |
pattern Inferred :: ForAllTyFlag |
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
Constructors
Var Id | |
Lit Literal | |
App (Expr b) (Arg b) infixl 4 | |
Lam b (Expr b) | |
Let (Bind b) (Expr b) | |
Case (Expr b) b Type [Alt b] | |
Cast (Expr b) CoercionR | |
Tick CoreTickish (Expr b) | |
Type Type | |
Coercion Coercion |
Instances
Data b => Data (Expr b) | |
Defined in GHC.Core Methods gfoldl :: (forall d b0. Data d => c (d -> b0) -> d -> c b0) -> (forall g. g -> c g) -> Expr b -> c (Expr b) # gunfold :: (forall b0 r. Data b0 => c (b0 -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Expr b) # toConstr :: Expr b -> Constr # dataTypeOf :: Expr b -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Expr b)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Expr b)) # gmapT :: (forall b0. Data b0 => b0 -> b0) -> Expr b -> Expr b # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Expr b -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Expr b -> r # gmapQ :: (forall d. Data d => d -> u) -> Expr b -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Expr b -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Expr b -> m (Expr b) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Expr b -> m (Expr b) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Expr b -> m (Expr b) # |
type TyConRepName = Name #
type MCoercionN = MCoercion #
type RuntimeRepType = Type #
Type synonym used for types of kind RuntimeRep.
A type of the form p
of constraint kind represents a value whose type is
the Haskell predicate p
, where a predicate is what occurs before
the =>
in a Haskell type.
We use PredType
as documentation to mark those types that we guarantee to
have this kind.
It can be expanded into its representation, but:
- The type checker must treat it as opaque
- The rest of the compiler treats it as transparent
Consider these examples:
f :: (Eq a) => a -> Int g :: (?x :: Int -> Int) => a -> Int h :: (r\l) => {r} => {l::Int | r}
Here the Eq a
and ?x :: Int -> Int
and rl
are all called "predicates"
Mult is a type alias for Type.
Mult must contain Type because multiplicity variables are mere type variables (of kind Multiplicity) in Haskell. So the simplest implementation is to make Mult be Type.
Multiplicities can be formed with: - One: GHC.Types.One (= oneDataCon) - Many: GHC.Types.Many (= manyDataCon) - Multiplication: GHC.Types.MultMul (= multMulTyCon)
So that Mult feels a bit more structured, we provide pattern synonyms and smart constructors for these.
A shorthand for data with an attached Mult
element (the multiplicity).
Instances
Data a => Data (Scaled a) | |
Defined in GHC.Core.TyCo.Rep Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Scaled a -> c (Scaled a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Scaled a) # toConstr :: Scaled a -> Constr # dataTypeOf :: Scaled a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Scaled a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Scaled a)) # gmapT :: (forall b. Data b => b -> b) -> Scaled a -> Scaled a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Scaled a -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Scaled a -> r # gmapQ :: (forall d. Data d => d -> u) -> Scaled a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Scaled a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Scaled a -> m (Scaled a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Scaled a -> m (Scaled a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Scaled a -> m (Scaled a) # | |
Outputable a => Outputable (Scaled a) | |
Defined in GHC.Core.TyCo.Rep |
A semantically more meaningful type to represent what may or may not be a
useful Coercion
.
Instances
Data MCoercion | |
Defined in GHC.Core.TyCo.Rep Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> MCoercion -> c MCoercion # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c MCoercion # toConstr :: MCoercion -> Constr # dataTypeOf :: MCoercion -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c MCoercion) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c MCoercion) # gmapT :: (forall b. Data b => b -> b) -> MCoercion -> MCoercion # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> MCoercion -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> MCoercion -> r # gmapQ :: (forall d. Data d => d -> u) -> MCoercion -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> MCoercion -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> MCoercion -> m MCoercion # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> MCoercion -> m MCoercion # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> MCoercion -> m MCoercion # | |
Outputable MCoercion | |
Defined in GHC.Core.TyCo.Rep |
data UnivCoProvenance #
For simplicity, we have just one UnivCo that represents a coercion from
some type to some other type, with (in general) no restrictions on the
type. The UnivCoProvenance specifies more exactly what the coercion really
is and why a program should (or shouldn't!) trust the coercion.
It is reasonable to consider each constructor of UnivCoProvenance
as a totally independent coercion form; their only commonality is
that they don't tell you what types they coercion between. (That info
is in the UnivCo
constructor of Coercion
.
Instances
Data UnivCoProvenance | |
Defined in GHC.Core.TyCo.Rep Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UnivCoProvenance -> c UnivCoProvenance # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c UnivCoProvenance # toConstr :: UnivCoProvenance -> Constr # dataTypeOf :: UnivCoProvenance -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c UnivCoProvenance) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c UnivCoProvenance) # gmapT :: (forall b. Data b => b -> b) -> UnivCoProvenance -> UnivCoProvenance # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UnivCoProvenance -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UnivCoProvenance -> r # gmapQ :: (forall d. Data d => d -> u) -> UnivCoProvenance -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> UnivCoProvenance -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> UnivCoProvenance -> m UnivCoProvenance # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UnivCoProvenance -> m UnivCoProvenance # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UnivCoProvenance -> m UnivCoProvenance # | |
Outputable UnivCoProvenance | |
Defined in GHC.Core.TyCo.Rep Methods ppr :: UnivCoProvenance -> SDoc # |
Instances
Data CoSel | |
Defined in GHC.Core.TyCo.Rep Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CoSel -> c CoSel # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CoSel # dataTypeOf :: CoSel -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c CoSel) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CoSel) # gmapT :: (forall b. Data b => b -> b) -> CoSel -> CoSel # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CoSel -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CoSel -> r # gmapQ :: (forall d. Data d => d -> u) -> CoSel -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> CoSel -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> CoSel -> m CoSel # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CoSel -> m CoSel # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CoSel -> m CoSel # | |
NFData CoSel | |
Defined in GHC.Core.TyCo.Rep | |
Binary CoSel | |
Outputable CoSel | |
Defined in GHC.Core.TyCo.Rep | |
Eq CoSel | |
newtype NonDetUniqFM key ele #
A wrapper around UniqFM
with the sole purpose of informing call sites
that the provided Foldable
and Traversable
instances are
nondeterministic.
If you use this please provide a justification why it doesn't introduce
nondeterminism.
See Note [Deterministic UniqFM] in GHC.Types.Unique.DFM to learn about determinism.
Constructors
NonDetUniqFM | |
Instances
Foldable (NonDetUniqFM key) | Inherently nondeterministic. If you use this please provide a justification why it doesn't introduce nondeterminism. See Note [Deterministic UniqFM] in GHC.Types.Unique.DFM to learn about determinism. |
Defined in GHC.Types.Unique.FM Methods fold :: Monoid m => NonDetUniqFM key m -> m # foldMap :: Monoid m => (a -> m) -> NonDetUniqFM key a -> m # foldMap' :: Monoid m => (a -> m) -> NonDetUniqFM key a -> m # foldr :: (a -> b -> b) -> b -> NonDetUniqFM key a -> b # foldr' :: (a -> b -> b) -> b -> NonDetUniqFM key a -> b # foldl :: (b -> a -> b) -> b -> NonDetUniqFM key a -> b # foldl' :: (b -> a -> b) -> b -> NonDetUniqFM key a -> b # foldr1 :: (a -> a -> a) -> NonDetUniqFM key a -> a # foldl1 :: (a -> a -> a) -> NonDetUniqFM key a -> a # toList :: NonDetUniqFM key a -> [a] # null :: NonDetUniqFM key a -> Bool # length :: NonDetUniqFM key a -> Int # elem :: Eq a => a -> NonDetUniqFM key a -> Bool # maximum :: Ord a => NonDetUniqFM key a -> a # minimum :: Ord a => NonDetUniqFM key a -> a # sum :: Num a => NonDetUniqFM key a -> a # product :: Num a => NonDetUniqFM key a -> a # | |
Traversable (NonDetUniqFM key) | Inherently nondeterministic. If you use this please provide a justification why it doesn't introduce nondeterminism. See Note [Deterministic UniqFM] in GHC.Types.Unique.DFM to learn about determinism. |
Defined in GHC.Types.Unique.FM Methods traverse :: Applicative f => (a -> f b) -> NonDetUniqFM key a -> f (NonDetUniqFM key b) # sequenceA :: Applicative f => NonDetUniqFM key (f a) -> f (NonDetUniqFM key a) # mapM :: Monad m => (a -> m b) -> NonDetUniqFM key a -> m (NonDetUniqFM key b) # sequence :: Monad m => NonDetUniqFM key (m a) -> m (NonDetUniqFM key a) # | |
Functor (NonDetUniqFM key) | |
Defined in GHC.Types.Unique.FM Methods fmap :: (a -> b) -> NonDetUniqFM key a -> NonDetUniqFM key b # (<$) :: a -> NonDetUniqFM key b -> NonDetUniqFM key a # |
A finite map from uniques
of one type to
elements in another type.
The key is just here to keep us honest. It's always safe to use a single type as key. If two types don't overlap in their uniques it's also safe to index the same map at multiple key types. But this is very much discouraged.
Instances
Functor (UniqFM key) | |
(Data key, Data ele) => Data (UniqFM key ele) | |
Defined in GHC.Types.Unique.FM Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UniqFM key ele -> c (UniqFM key ele) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (UniqFM key ele) # toConstr :: UniqFM key ele -> Constr # dataTypeOf :: UniqFM key ele -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (UniqFM key ele)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (UniqFM key ele)) # gmapT :: (forall b. Data b => b -> b) -> UniqFM key ele -> UniqFM key ele # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UniqFM key ele -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UniqFM key ele -> r # gmapQ :: (forall d. Data d => d -> u) -> UniqFM key ele -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> UniqFM key ele -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> UniqFM key ele -> m (UniqFM key ele) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UniqFM key ele -> m (UniqFM key ele) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UniqFM key ele -> m (UniqFM key ele) # | |
Monoid (UniqFM key a) | |
Semigroup (UniqFM key a) | |
Outputable a => Outputable (UniqFM key a) | |
Defined in GHC.Types.Unique.FM | |
Eq ele => Eq (UniqFM key ele) | |
class Monad m => MonadUnique (m :: Type -> Type) where #
A monad for generating unique identifiers
Minimal complete definition
Methods
getUniqueSupplyM :: m UniqSupply #
Get a new UniqueSupply
getUniqueM :: m Unique #
Get a new unique identifier
getUniquesM :: m [Unique] #
Get an infinite list of new unique identifiers
Instances
MonadUnique CoreM | |
Defined in GHC.Core.Opt.Monad Methods getUniqueSupplyM :: CoreM UniqSupply # getUniqueM :: CoreM Unique # getUniquesM :: CoreM [Unique] # | |
MonadUnique StgM | |
Defined in GHC.Stg.Pipeline Methods getUniqueSupplyM :: StgM UniqSupply # getUniqueM :: StgM Unique # getUniquesM :: StgM [Unique] # | |
MonadUnique TcS | |
Defined in GHC.Tc.Solver.Monad | |
MonadUnique UniqSM | |
Defined in GHC.Types.Unique.Supply Methods getUniqueSupplyM :: UniqSM UniqSupply # getUniqueM :: UniqSM Unique # getUniquesM :: UniqSM [Unique] # |
A monad which just gives the ability to obtain Unique
s
Instances
MonadFail UniqSM | |
Defined in GHC.Types.Unique.Supply | |
MonadFix UniqSM | |
Defined in GHC.Types.Unique.Supply | |
Applicative UniqSM | |
Functor UniqSM | |
Monad UniqSM | |
MonadUnique UniqSM | |
Defined in GHC.Types.Unique.Supply Methods getUniqueSupplyM :: UniqSM UniqSupply # getUniqueM :: UniqSM Unique # getUniquesM :: UniqSM [Unique] # |
data UniqSupply #
Unique Supply
A value of type UniqSupply
is unique, and it can
supply one distinct Unique
. Also, from the supply, one can
also manufacture an arbitrary number of further UniqueSupply
values,
which will be distinct from the first and from all others.
data LayoutInfo pass #
Layout information for declarations.
Constructors
ExplicitBraces !(LHsToken "{" pass) !(LHsToken "}" pass) | Explicit braces written by the user. class C a where { foo :: a; bar :: a } |
VirtualBraces | Virtual braces inserted by the layout algorithm. class C a where foo :: a bar :: a |
Fields
| |
NoLayoutInfo | Empty or compiler-generated blocks do not have layout information associated with them. |
Instances
Typeable p => Data (LayoutInfo (GhcPass p)) | |
Defined in GHC.Hs.Extension Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> LayoutInfo (GhcPass p) -> c (LayoutInfo (GhcPass p)) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (LayoutInfo (GhcPass p)) # toConstr :: LayoutInfo (GhcPass p) -> Constr # dataTypeOf :: LayoutInfo (GhcPass p) -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (LayoutInfo (GhcPass p))) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (LayoutInfo (GhcPass p))) # gmapT :: (forall b. Data b => b -> b) -> LayoutInfo (GhcPass p) -> LayoutInfo (GhcPass p) # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LayoutInfo (GhcPass p) -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LayoutInfo (GhcPass p) -> r # gmapQ :: (forall d. Data d => d -> u) -> LayoutInfo (GhcPass p) -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> LayoutInfo (GhcPass p) -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> LayoutInfo (GhcPass p) -> m (LayoutInfo (GhcPass p)) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LayoutInfo (GhcPass p) -> m (LayoutInfo (GhcPass p)) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LayoutInfo (GhcPass p) -> m (LayoutInfo (GhcPass p)) # |
data HsUniToken (tok :: Symbol) (utok :: Symbol) #
With UnicodeSyntax
, there might be multiple ways to write the same
token. For example an arrow could be either ->
or →
. This choice must be
recorded in order to exactprint such tokens, so instead of HsToken "->"
we
introduce HsUniToken "->" "→"
.
See also IsUnicodeSyntax
in GHC.Parser.Annotation
; we do not use here to
avoid a dependency.
Constructors
HsNormalTok | |
HsUnicodeTok |
Instances
(KnownSymbol tok, KnownSymbol utok) => Data (HsUniToken tok utok) | |
Defined in Language.Haskell.Syntax.Concrete Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsUniToken tok utok -> c (HsUniToken tok utok) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsUniToken tok utok) # toConstr :: HsUniToken tok utok -> Constr # dataTypeOf :: HsUniToken tok utok -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsUniToken tok utok)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsUniToken tok utok)) # gmapT :: (forall b. Data b => b -> b) -> HsUniToken tok utok -> HsUniToken tok utok # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsUniToken tok utok -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsUniToken tok utok -> r # gmapQ :: (forall d. Data d => d -> u) -> HsUniToken tok utok -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsUniToken tok utok -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsUniToken tok utok -> m (HsUniToken tok utok) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsUniToken tok utok -> m (HsUniToken tok utok) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsUniToken tok utok -> m (HsUniToken tok utok) # | |
type Anno (HsUniToken tok utok) | |
Defined in GHC.Hs.Extension |
data HsToken (tok :: Symbol) #
A token stored in the syntax tree. For example, when parsing a
let-expression, we store HsToken "let"
and HsToken "in"
.
The locations of those tokens can be used to faithfully reproduce
(exactprint) the original program text.
Constructors
HsTok |
Instances
KnownSymbol tok => Data (HsToken tok) | |
Defined in Language.Haskell.Syntax.Concrete Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsToken tok -> c (HsToken tok) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsToken tok) # toConstr :: HsToken tok -> Constr # dataTypeOf :: HsToken tok -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsToken tok)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsToken tok)) # gmapT :: (forall b. Data b => b -> b) -> HsToken tok -> HsToken tok # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsToken tok -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsToken tok -> r # gmapQ :: (forall d. Data d => d -> u) -> HsToken tok -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsToken tok -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsToken tok -> m (HsToken tok) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsToken tok -> m (HsToken tok) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsToken tok -> m (HsToken tok) # | |
type Anno (HsToken tok) | |
Defined in GHC.Hs.Extension |
type LHsUniToken (tok :: Symbol) (utok :: Symbol) p = XRec p (HsUniToken tok utok) #
What kind of {-# SCC #-} to add automatically
Constructors
NoProfAuto | no SCC annotations added |
ProfAutoAll | top-level and nested functions are annotated |
ProfAutoTop | top-level functions annotated only |
ProfAutoExports | exported functions annotated only |
ProfAutoCalls | annotate call-sites |
Instances
Enum ProfAuto | |
Defined in GHC.Types.ProfAuto | |
Eq ProfAuto | |
type PsLocated = GenLocated PsSpan #
Constructors
PsSpan | |
Fields
|
Instances
Data PsSpan | |
Defined in GHC.Types.SrcLoc Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PsSpan -> c PsSpan # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c PsSpan # toConstr :: PsSpan -> Constr # dataTypeOf :: PsSpan -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c PsSpan) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PsSpan) # gmapT :: (forall b. Data b => b -> b) -> PsSpan -> PsSpan # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PsSpan -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PsSpan -> r # gmapQ :: (forall d. Data d => d -> u) -> PsSpan -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> PsSpan -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> PsSpan -> m PsSpan # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PsSpan -> m PsSpan # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PsSpan -> m PsSpan # | |
Show PsSpan | |
Eq PsSpan | |
Ord PsSpan | |
A location as produced by the parser. Consists of two components:
- The location in the file, adjusted for #line and {-# LINE ... #-} pragmas (RealSrcLoc)
- The location in the string buffer (BufPos) with monotonicity guarantees (see #17632)
Constructors
PsLoc | |
Fields
|
type RealLocated = GenLocated RealSrcSpan #
type Located = GenLocated SrcSpan #
data GenLocated l e #
We attach SrcSpans to lots of things, so let's have a datatype for it.
Constructors
L l e |
Instances
data UnhelpfulSpanReason #
Constructors
UnhelpfulNoLocationInfo | |
UnhelpfulWiredIn | |
UnhelpfulInteractive | |
UnhelpfulGenerated | |
UnhelpfulOther !FastString |
Instances
Show UnhelpfulSpanReason | |
Defined in GHC.Types.SrcLoc Methods showsPrec :: Int -> UnhelpfulSpanReason -> ShowS # show :: UnhelpfulSpanReason -> String # showList :: [UnhelpfulSpanReason] -> ShowS # | |
Outputable UnhelpfulSpanReason | |
Defined in GHC.Types.SrcLoc Methods ppr :: UnhelpfulSpanReason -> SDoc # | |
Eq UnhelpfulSpanReason | |
Defined in GHC.Types.SrcLoc Methods (==) :: UnhelpfulSpanReason -> UnhelpfulSpanReason -> Bool # (/=) :: UnhelpfulSpanReason -> UnhelpfulSpanReason -> Bool # |
Source Span
A SrcSpan
identifies either a specific portion of a text file
or a human-readable description of a location.
Constructors
RealSrcSpan !RealSrcSpan !(Maybe BufSpan) | |
UnhelpfulSpan !UnhelpfulSpanReason |
Instances
Data SrcSpan | |
Defined in GHC.Types.SrcLoc Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SrcSpan -> c SrcSpan # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SrcSpan # toConstr :: SrcSpan -> Constr # dataTypeOf :: SrcSpan -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SrcSpan) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SrcSpan) # gmapT :: (forall b. Data b => b -> b) -> SrcSpan -> SrcSpan # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SrcSpan -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SrcSpan -> r # gmapQ :: (forall d. Data d => d -> u) -> SrcSpan -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> SrcSpan -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> SrcSpan -> m SrcSpan # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SrcSpan -> m SrcSpan # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SrcSpan -> m SrcSpan # | |
Show SrcSpan | |
NFData SrcSpan | |
Defined in GHC.Types.SrcLoc | |
ToJson SrcSpan | |
Defined in GHC.Types.SrcLoc | |
Outputable SrcSpan | |
Defined in GHC.Types.SrcLoc | |
Eq SrcSpan | |
NamedThing e => NamedThing (Located e) | |
Defined in GHC.Types.Name | |
Outputable e => Outputable (Located e) | |
Defined in GHC.Types.SrcLoc |
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
StringBuffer Source Span
Constructors
BufSpan | |
Fields
|
Instances
Data BufSpan | |
Defined in GHC.Types.SrcLoc Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> BufSpan -> c BufSpan # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c BufSpan # toConstr :: BufSpan -> Constr # dataTypeOf :: BufSpan -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c BufSpan) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BufSpan) # gmapT :: (forall b. Data b => b -> b) -> BufSpan -> BufSpan # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> BufSpan -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> BufSpan -> r # gmapQ :: (forall d. Data d => d -> u) -> BufSpan -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> BufSpan -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> BufSpan -> m BufSpan # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> BufSpan -> m BufSpan # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> BufSpan -> m BufSpan # | |
Semigroup BufSpan | |
Show BufSpan | |
Eq BufSpan | |
Ord BufSpan | |
data RealSrcLoc #
Real Source Location
Represents a single point within a file
Instances
Show RealSrcLoc | |
Defined in GHC.Types.SrcLoc Methods showsPrec :: Int -> RealSrcLoc -> ShowS # show :: RealSrcLoc -> String # showList :: [RealSrcLoc] -> ShowS # | |
Outputable RealSrcLoc | |
Defined in GHC.Types.SrcLoc Methods ppr :: RealSrcLoc -> SDoc # | |
Eq RealSrcLoc | |
Defined in GHC.Types.SrcLoc | |
Ord RealSrcLoc | |
Defined in GHC.Types.SrcLoc Methods compare :: RealSrcLoc -> RealSrcLoc -> Ordering # (<) :: RealSrcLoc -> RealSrcLoc -> Bool # (<=) :: RealSrcLoc -> RealSrcLoc -> Bool # (>) :: RealSrcLoc -> RealSrcLoc -> Bool # (>=) :: RealSrcLoc -> RealSrcLoc -> Bool # max :: RealSrcLoc -> RealSrcLoc -> RealSrcLoc # min :: RealSrcLoc -> RealSrcLoc -> RealSrcLoc # |
0-based offset identifying the raw location in the StringBuffer
.
The lexer increments the BufPos
every time a character (UTF-8 code point)
is read from the input buffer. As UTF-8 is a variable-length encoding and
StringBuffer
needs a byte offset for indexing, a BufPos
cannot be used
for indexing.
The parser guarantees that BufPos
are monotonic. See #17632. This means
that syntactic constructs that appear later in the StringBuffer
are guaranteed to
have a higher BufPos
. Contrast that with RealSrcLoc
, which does *not* make the
analogous guarantee about higher line/column numbers.
This is due to #line and {-# LINE ... #-} pragmas that can arbitrarily
modify RealSrcLoc
. Notice how setSrcLoc
and resetAlrLastLoc
in
GHC.Parser.Lexer update PsLoc
, modifying RealSrcLoc
but preserving
BufPos
.
Monotonicity makes BufPos
useful to determine the order in which syntactic
elements appear in the source. Consider this example (haddockA041 in the test suite):
haddockA041.hs {-# LANGUAGE CPP #-} -- | Module header documentation module Comments_and_CPP_include where #include "IncludeMe.hs"
IncludeMe.hs: -- | Comment on T data T = MkT -- ^ Comment on MkT
After the C preprocessor runs, the StringBuffer
will contain a program that
looks like this (unimportant lines at the beginning removed):
# 1 "haddockA041.hs" {-# LANGUAGE CPP #-} -- | Module header documentation module Comments_and_CPP_include where # 1 "IncludeMe.hs" 1 -- | Comment on T data T = MkT -- ^ Comment on MkT # 7 "haddockA041.hs" 2
The line pragmas inserted by CPP make the error messages more informative. The downside is that we can't use RealSrcLoc to determine the ordering of syntactic elements.
With RealSrcLoc, we have the following location information recorded in the AST: * The module name is located at haddockA041.hs:3:8-31 * The Haddock comment "Comment on T" is located at IncludeMe:1:1-17 * The data declaration is located at IncludeMe.hs:2:1-32
Is the Haddock comment located between the module name and the data declaration? This is impossible to tell because the locations are not comparable; they even refer to different files.
On the other hand, with BufPos
, we have the following location information:
* The module name is located at 846-870
* The Haddock comment "Comment on T" is located at 898-915
* The data declaration is located at 916-928
Aside: if you're wondering why the numbers are so high, try running
ghc -E haddockA041.hs
and see the extra fluff that CPP inserts at the start of the file.
For error messages, BufPos
is not useful at all. On the other hand, this is
exactly what we need to determine the order of syntactic elements:
870 < 898, therefore the Haddock comment appears *after* the module name.
915 < 916, therefore the Haddock comment appears *before* the data declaration.
We use BufPos
in in GHC.Parser.PostProcess.Haddock to associate Haddock
comments with parts of the AST using location information (#17544).
Instances
Data BufPos | |
Defined in GHC.Types.SrcLoc Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> BufPos -> c BufPos # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c BufPos # toConstr :: BufPos -> Constr # dataTypeOf :: BufPos -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c BufPos) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BufPos) # gmapT :: (forall b. Data b => b -> b) -> BufPos -> BufPos # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> BufPos -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> BufPos -> r # gmapQ :: (forall d. Data d => d -> u) -> BufPos -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> BufPos -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> BufPos -> m BufPos # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> BufPos -> m BufPos # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> BufPos -> m BufPos # | |
Show BufPos | |
Eq BufPos | |
Ord BufPos | |
type FastStringEnv a = UniqFM FastString a #
A non-deterministic set of FastStrings. See Note [Deterministic UniqFM] in GHC.Types.Unique.DFM for explanation why it's not deterministic and why it matters. Use DFastStringEnv if the set eventually gets converted into a list or folded over in a way where the order changes the generated code.
Instances
Data a => Data (UniqSet a) | |
Defined in GHC.Types.Unique.Set Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UniqSet a -> c (UniqSet a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (UniqSet a) # toConstr :: UniqSet a -> Constr # dataTypeOf :: UniqSet a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (UniqSet a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (UniqSet a)) # gmapT :: (forall b. Data b => b -> b) -> UniqSet a -> UniqSet a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UniqSet a -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UniqSet a -> r # gmapQ :: (forall d. Data d => d -> u) -> UniqSet a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> UniqSet a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> UniqSet a -> m (UniqSet a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UniqSet a -> m (UniqSet a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UniqSet a -> m (UniqSet a) # | |
Monoid (UniqSet a) | |
Semigroup (UniqSet a) | |
Outputable a => Outputable (UniqSet a) | |
Defined in GHC.Types.Unique.Set | |
Eq (UniqSet a) | |
data StringLiteral #
A String Literal in the source, including its original raw format for use by source to source manipulation tools.
Constructors
StringLiteral | |
Fields
|
Instances
Data StringLiteral | |
Defined in GHC.Types.SourceText Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> StringLiteral -> c StringLiteral # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c StringLiteral # toConstr :: StringLiteral -> Constr # dataTypeOf :: StringLiteral -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c StringLiteral) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c StringLiteral) # gmapT :: (forall b. Data b => b -> b) -> StringLiteral -> StringLiteral # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> StringLiteral -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> StringLiteral -> r # gmapQ :: (forall d. Data d => d -> u) -> StringLiteral -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> StringLiteral -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> StringLiteral -> m StringLiteral # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> StringLiteral -> m StringLiteral # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> StringLiteral -> m StringLiteral # | |
Binary StringLiteral | |
Defined in GHC.Types.SourceText Methods put_ :: BinHandle -> StringLiteral -> IO () # put :: BinHandle -> StringLiteral -> IO (Bin StringLiteral) # get :: BinHandle -> IO StringLiteral # | |
Outputable StringLiteral | |
Defined in GHC.Types.SourceText Methods ppr :: StringLiteral -> SDoc # | |
Eq StringLiteral | |
Defined in GHC.Types.SourceText Methods (==) :: StringLiteral -> StringLiteral -> Bool # (/=) :: StringLiteral -> StringLiteral -> Bool # | |
type Anno StringLiteral | |
Defined in GHC.Hs.Binds |
data FractionalLit #
Fractional Literal
Used (instead of Rational) to represent exactly the floating point literal that we encountered in the user's source program. This allows us to pretty-print exactly what the user wrote, which is important e.g. for floating point numbers that can't represented as Doubles (we used to via Double for pretty-printing). See also #2245. Note [FractionalLit representation] in GHC.HsToCore.Match.Literal The actual value then is: sign * fl_signi * (fl_exp_base^fl_exp) where sign = if fl_neg then (-1) else 1
For example FL { fl_neg = True, fl_signi = 5.3, fl_exp = 4, fl_exp_base = Base10 } denotes -5300
Constructors
FL | |
Fields
|
Instances
Data FractionalLit | |
Defined in GHC.Types.SourceText Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FractionalLit -> c FractionalLit # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c FractionalLit # toConstr :: FractionalLit -> Constr # dataTypeOf :: FractionalLit -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c FractionalLit) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c FractionalLit) # gmapT :: (forall b. Data b => b -> b) -> FractionalLit -> FractionalLit # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FractionalLit -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FractionalLit -> r # gmapQ :: (forall d. Data d => d -> u) -> FractionalLit -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> FractionalLit -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> FractionalLit -> m FractionalLit # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> FractionalLit -> m FractionalLit # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> FractionalLit -> m FractionalLit # | |
Show FractionalLit | |
Defined in GHC.Types.SourceText Methods showsPrec :: Int -> FractionalLit -> ShowS # show :: FractionalLit -> String # showList :: [FractionalLit] -> ShowS # | |
Outputable FractionalLit | |
Defined in GHC.Types.SourceText Methods ppr :: FractionalLit -> SDoc # | |
Eq FractionalLit | Be wary of using this instance to compare for equal *values* when exponents are large. The same value expressed in different syntactic form won't compare as equal when any of the exponents is >= 100. |
Defined in GHC.Types.SourceText Methods (==) :: FractionalLit -> FractionalLit -> Bool # (/=) :: FractionalLit -> FractionalLit -> Bool # | |
Ord FractionalLit | Be wary of using this instance to compare for equal *values* when exponents are large. The same value expressed in different syntactic form won't compare as equal when any of the exponents is >= 100. |
Defined in GHC.Types.SourceText Methods compare :: FractionalLit -> FractionalLit -> Ordering # (<) :: FractionalLit -> FractionalLit -> Bool # (<=) :: FractionalLit -> FractionalLit -> Bool # (>) :: FractionalLit -> FractionalLit -> Bool # (>=) :: FractionalLit -> FractionalLit -> Bool # max :: FractionalLit -> FractionalLit -> FractionalLit # min :: FractionalLit -> FractionalLit -> FractionalLit # |
data IntegralLit #
Integral Literal
Used (instead of Integer) to represent negative zegative zero which is required for NegativeLiterals extension to correctly parse `-0::Double` as negative zero. See also #13211.
Instances
data SourceText #
Constructors
SourceText String | |
NoSourceText | For when code is generated, e.g. TH, deriving. The pretty printer will then make its own representation of the item. |
Instances
Data SourceText | |
Defined in GHC.Types.SourceText Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SourceText -> c SourceText # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SourceText # toConstr :: SourceText -> Constr # dataTypeOf :: SourceText -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SourceText) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SourceText) # gmapT :: (forall b. Data b => b -> b) -> SourceText -> SourceText # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SourceText -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SourceText -> r # gmapQ :: (forall d. Data d => d -> u) -> SourceText -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> SourceText -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> SourceText -> m SourceText # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SourceText -> m SourceText # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SourceText -> m SourceText # | |
Show SourceText | |
Defined in GHC.Types.SourceText Methods showsPrec :: Int -> SourceText -> ShowS # show :: SourceText -> String # showList :: [SourceText] -> ShowS # | |
Binary SourceText | |
Defined in GHC.Types.SourceText Methods put_ :: BinHandle -> SourceText -> IO () # put :: BinHandle -> SourceText -> IO (Bin SourceText) # get :: BinHandle -> IO SourceText # | |
Outputable SourceText | |
Defined in GHC.Types.SourceText Methods ppr :: SourceText -> SDoc # | |
Eq SourceText | |
Defined in GHC.Types.SourceText | |
type Anno (SourceText, RuleName) | |
Defined in GHC.Hs.Decls |
data FieldLabel #
Fields in an algebraic record type; see Note [FieldLabel].
Constructors
FieldLabel | |
Fields
|
Instances
Data FieldLabel | |
Defined in GHC.Types.FieldLabel Methods 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 Methods rnf :: FieldLabel -> () # | |
HasOccName FieldLabel | |
Defined in GHC.Types.FieldLabel Methods occName :: FieldLabel -> OccName # | |
Binary Name => Binary FieldLabel | We need the |
Defined in GHC.Types.FieldLabel Methods put_ :: BinHandle -> FieldLabel -> IO () # put :: BinHandle -> FieldLabel -> IO (Bin FieldLabel) # get :: BinHandle -> IO FieldLabel # | |
Outputable FieldLabel | |
Defined in GHC.Types.FieldLabel Methods ppr :: FieldLabel -> SDoc # | |
Eq FieldLabel | |
Defined in GHC.Types.FieldLabel |
data WarningFlag #
Constructors
Instances
data GeneralFlag #
Enumerates the simple on-or-off dynamic flags
Constructors
Instances
Enum GeneralFlag | |
Defined in GHC.Driver.Flags Methods succ :: GeneralFlag -> GeneralFlag # pred :: GeneralFlag -> GeneralFlag # toEnum :: Int -> GeneralFlag # fromEnum :: GeneralFlag -> Int # enumFrom :: GeneralFlag -> [GeneralFlag] # enumFromThen :: GeneralFlag -> GeneralFlag -> [GeneralFlag] # enumFromTo :: GeneralFlag -> GeneralFlag -> [GeneralFlag] # enumFromThenTo :: GeneralFlag -> GeneralFlag -> GeneralFlag -> [GeneralFlag] # | |
Show GeneralFlag | |
Defined in GHC.Driver.Flags Methods showsPrec :: Int -> GeneralFlag -> ShowS # show :: GeneralFlag -> String # showList :: [GeneralFlag] -> ShowS # | |
Eq GeneralFlag | |
Defined in GHC.Driver.Flags |
Debugging flags
Constructors
Instances
Enum DumpFlag | |
Show DumpFlag | |
Eq DumpFlag | |
Constructors
Haskell98 | |
Haskell2010 | |
GHC2021 |
Instances
Bounded Language | |
Enum Language | |
Show Language | |
NFData Language | |
Defined in GHC.Driver.Flags | |
Binary Language | |
Outputable Language | |
Defined in GHC.Driver.Flags | |
Eq Language | |
type ModuleWithIsBoot = GenWithIsBoot Module #
data GenWithIsBoot mod #
This data type just pairs a value mod
with an IsBootInterface flag. In
practice, mod
is usually a Module
or ModuleName
'.
Constructors
GWIB | |
Fields
|
Instances
A definite unit (i.e. without any free module hole)
Constructors
Definite | |
Fields
|
Instances
Functor Definite | |
Uniquable unit => Uniquable (Definite unit) | |
Defined in GHC.Unit.Types | |
IsUnitId unit => IsUnitId (Definite unit) | |
Defined in GHC.Unit.Types Methods unitFS :: Definite unit -> FastString # | |
Binary unit => Binary (Definite unit) | |
Outputable unit => Outputable (Definite unit) | |
Defined in GHC.Unit.Types | |
Eq unit => Eq (Definite unit) | |
Ord unit => Ord (Definite unit) | |
Defined in GHC.Unit.Types Methods compare :: Definite unit -> Definite unit -> Ordering # (<) :: Definite unit -> Definite unit -> Bool # (<=) :: Definite unit -> Definite unit -> Bool # (>) :: Definite unit -> Definite unit -> Bool # (>=) :: Definite unit -> Definite unit -> Bool # |
type Instantiations = GenInstantiations UnitId #
type GenInstantiations unit = [(ModuleName, GenModule (GenUnit unit))] #
data GenInstantiatedUnit unit #
An instantiated unit.
It identifies an indefinite library (with holes) that has been instantiated.
This unit may be indefinite or not (i.e. with remaining holes or not). If it is definite, we don't know if it has already been compiled and installed in a database. Nevertheless, we have a mechanism called "improvement" to try to match a fully instantiated unit with existing compiled and installed units: see Note [VirtUnit to RealUnit improvement].
An indefinite unit identifier pretty-prints to something like
p[H=H,A=aimpl:A>]
(p
is the UnitId
, and the
brackets enclose the module substitution).
Constructors
InstantiatedUnit | |
Fields
|
Instances
A unit key in the database
Constructors
UnitKey FastString |
Instances
IsUnitId UnitKey | |
Defined in GHC.Unit.Types Methods unitFS :: UnitKey -> FastString # |
Class for types that are used as unit identifiers (UnitKey, UnitId, Unit)
We need this class because we create new unit ids for virtual units (see VirtUnit) and they have to to be made from units with different kinds of identifiers.
Methods
unitFS :: u -> FastString #
Instances
IsUnitId UnitId | |
Defined in GHC.Unit.Types Methods unitFS :: UnitId -> FastString # | |
IsUnitId UnitKey | |
Defined in GHC.Unit.Types Methods unitFS :: UnitKey -> FastString # | |
IsUnitId unit => IsUnitId (Definite unit) | |
Defined in GHC.Unit.Types Methods unitFS :: Definite unit -> FastString # | |
IsUnitId u => IsUnitId (GenUnit u) | |
Defined in GHC.Unit.Types Methods unitFS :: GenUnit u -> FastString # |
type InstantiatedModule = GenModule InstantiatedUnit #
An InstantiatedModule
is a GenModule
whose unit is identified with an GenInstantiatedUnit
.
type HomeUnitModule = GenModule UnitId #
A HomeUnitModule
is like an InstalledModule
but we expect to find it in
one of the home units rather than the package database.
type InstalledModule = GenModule UnitId #
A InstalledModule
is a GenModule
whose unit is identified with an
UnitId
.
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.
Constructors
ModLocation | |
Fields
|
Instances
Show ModLocation | |
Defined in GHC.Unit.Module.Location Methods showsPrec :: Int -> ModLocation -> ShowS # show :: ModLocation -> String # showList :: [ModLocation] -> ShowS # | |
Outputable ModLocation | |
Defined in GHC.Unit.Module.Location Methods ppr :: ModLocation -> SDoc # |
data InstalledModuleEnv elt #
A map keyed off of InstalledModule
Instances
Outputable elt => Outputable (InstalledModuleEnv elt) | |
Defined in GHC.Unit.Module.Env Methods ppr :: InstalledModuleEnv elt -> SDoc # |
type DModuleNameEnv elt = UniqDFM ModuleName elt #
A map keyed off of ModuleName
s (actually, their Unique
s)
Has deterministic folds and can be deterministically converted to a list
type ModuleNameEnv elt = UniqFM ModuleName elt #
A map keyed off of ModuleName
s (actually, their Unique
s)
A map keyed off of GenModule
s
Instances
Outputable a => Outputable (ModuleEnv a) | |
Defined in GHC.Unit.Module.Env |
class ContainsModule t where #
Methods
extractModule :: t -> Module #
Instances
ContainsModule DsGblEnv | |
Defined in GHC.HsToCore.Types Methods extractModule :: DsGblEnv -> Module # | |
ContainsModule TcGblEnv | |
Defined in GHC.Tc.Types Methods extractModule :: TcGblEnv -> Module # | |
ContainsModule gbl => ContainsModule (Env gbl lcl) | |
Defined in GHC.Tc.Types Methods extractModule :: Env gbl lcl -> Module # |
type HomeUnit = GenHomeUnit UnitId #
data GenHomeUnit u #
Information about the home unit (i.e., the until that will contain the modules we are compiling)
The unit identifier of the instantiating units is left open to allow
switching from UnitKey (what is provided by the user) to UnitId (internal
unit identifier) with homeUnitMap
.
TODO: this isn't implemented yet. UnitKeys are still converted too early into UnitIds in GHC.Unit.State.readUnitDataBase
Constructors
DefiniteHomeUnit UnitId (Maybe (u, GenInstantiations u)) | Definite home unit (i.e. that we can compile). Nothing: not an instantiated unit Just (i,insts): made definite by instantiating "i" with "insts" |
IndefiniteHomeUnit UnitId (GenInstantiations u) | Indefinite home unit (i.e. that we can only typecheck) All the holes are instantiated with fake modules from the Hole unit. See Note [Representation of module/name variables] in GHC.Unit |
Package-qualifier after renaming
Renaming detects if "this" or the unit-id of the home-unit was used as a package qualifier.
Constructors
NoPkgQual | No package qualifier |
ThisPkg UnitId | Import from home-unit |
OtherPkg UnitId | Import from another unit |
Instances
Data PkgQual | |
Defined in GHC.Types.PkgQual Methods 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 | |
data RawPkgQual #
Package-qualifier as it was parsed
Constructors
NoRawPkgQual | No package qualifier |
RawPkgQual StringLiteral | Raw package qualifier string. |
Instances
Data RawPkgQual | |
Defined in GHC.Types.PkgQual Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> RawPkgQual -> c RawPkgQual # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c RawPkgQual # toConstr :: RawPkgQual -> Constr # dataTypeOf :: RawPkgQual -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c RawPkgQual) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c RawPkgQual) # gmapT :: (forall b. Data b => b -> b) -> RawPkgQual -> RawPkgQual # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> RawPkgQual -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> RawPkgQual -> r # gmapQ :: (forall d. Data d => d -> u) -> RawPkgQual -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> RawPkgQual -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> RawPkgQual -> m RawPkgQual # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> RawPkgQual -> m RawPkgQual # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> RawPkgQual -> m RawPkgQual # | |
Outputable RawPkgQual | |
Defined in GHC.Types.PkgQual Methods ppr :: RawPkgQual -> SDoc # |
Pattern
Constructors
WildPat (XWildPat p) | Wildcard Pattern The sole reason for a type on a WildPat is to support hsPatType :: Pat Id -> Type |
VarPat (XVarPat p) (LIdP p) | Variable Pattern |
LazyPat (XLazyPat p) (LPat p) | Lazy Pattern
^ - |
AsPat (XAsPat p) (LIdP p) !(LHsToken "@" p) (LPat p) | As pattern
^ - |
ParPat | |
BangPat (XBangPat p) (LPat p) | Bang pattern
^ - |
ListPat (XListPat p) [LPat p] | Syntactic List
|
TuplePat (XTuplePat p) [LPat p] Boxity | Tuple sub-patterns
|
SumPat (XSumPat p) (LPat p) ConTag SumWidth | Anonymous sum pattern
|
ConPat | Constructor Pattern |
Fields
| |
ViewPat | |
SplicePat |
|
Fields
| |
LitPat (XLitPat p) (HsLit p) | Literal Pattern Used for *non-overloaded* literal patterns: Int#, Char#, Int, Char, String, etc. |
NPat (XNPat p) (XRec p (HsOverLit p)) (Maybe (SyntaxExpr p)) (SyntaxExpr p) | Natural Pattern
|
NPlusKPat (XNPlusKPat p) (LIdP p) (XRec p (HsOverLit p)) (HsOverLit p) (SyntaxExpr p) (SyntaxExpr p) | n+k pattern |
SigPat | |
Fields
| |
XPat !(XXPat p) |
Instances
type Anno (Pat (GhcPass p)) | |
Defined in GHC.Hs.Pat |
Arguments
= XRec p (HsExpr p) | May have |
Located Haskell Expression
type family SyntaxExpr p #
Syntax Expression
SyntaxExpr is represents the function used in interpreting rebindable
syntax. In the parser, we have no information to supply; in the renamer,
we have the name of the function (but see
Note [Monad fail : Rebindable syntax, overloaded strings] for a wrinkle)
and in the type-checker we have a more elaborate structure SyntaxExprTc
.
In some contexts, rebindable syntax is not implemented, and so we have constructors to represent that possibility in both the renamer and typechecker instantiations.
E.g. (>>=)
is filled in before the renamer by the appropriate Name
for
(>>=)
, and then instantiated by the type checker with its type args
etc
Instances
type SyntaxExpr (GhcPass p) | |
Defined in GHC.Hs.Expr |
Guarded Right-Hand Sides
GRHSs are used both for pattern bindings and for Matches
Constructors
GRHSs | |
Fields
| |
XGRHSs !(XXGRHSs p body) |
data MatchGroup p body #
Constructors
MG | |
XMatchGroup !(XXMatchGroup p body) |
data HsUntypedSplice id #
Haskell Splice
Constructors
HsUntypedSpliceExpr (XUntypedSpliceExpr id) (LHsExpr id) | |
HsQuasiQuote (XQuasiQuote id) (IdP id) (XRec id FastString) | |
XUntypedSplice !(XXUntypedSplice id) |
Instances
type Anno (HsUntypedSplice (GhcPass p)) | |
Defined in GHC.Hs.Expr |
data PromotionFlag #
Is a TyCon a promoted data constructor or just a normal type constructor?
Constructors
NotPromoted | |
IsPromoted |
Instances
Data PromotionFlag | |
Defined in Language.Haskell.Syntax.Type Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PromotionFlag -> c PromotionFlag # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c PromotionFlag # toConstr :: PromotionFlag -> Constr # dataTypeOf :: PromotionFlag -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c PromotionFlag) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PromotionFlag) # gmapT :: (forall b. Data b => b -> b) -> PromotionFlag -> PromotionFlag # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PromotionFlag -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PromotionFlag -> r # gmapQ :: (forall d. Data d => d -> u) -> PromotionFlag -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> PromotionFlag -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> PromotionFlag -> m PromotionFlag # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PromotionFlag -> m PromotionFlag # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PromotionFlag -> m PromotionFlag # | |
Eq PromotionFlag | |
Defined in Language.Haskell.Syntax.Type Methods (==) :: PromotionFlag -> PromotionFlag -> Bool # (/=) :: PromotionFlag -> PromotionFlag -> Bool # |
data DefaultingStrategy #
Specify whether to default kind variables, and type variables
of kind RuntimeRep
Levity
Multiplicity
.
Constructors
DefaultKindVars | Default kind variables:
When this strategy is used, it means that we have determined that the variables we are considering defaulting are all kind variables. Usually, we pass this option when -XNoPolyKinds is enabled. |
NonStandardDefaulting NonStandardDefaultingStrategy | Default (or don't default) non-standard variables, of kinds
|
Instances
Outputable DefaultingStrategy | |
Defined in GHC.Types.Basic Methods ppr :: DefaultingStrategy -> SDoc # |
data NonStandardDefaultingStrategy #
Specify whether to default type variables of kind RuntimeRep
Levity
Multiplicity
.
Constructors
DefaultNonStandardTyVars | Default type variables of the given kinds: |
TryNotToDefaultNonStandardTyVars | Try not to default type variables of the kinds Note that these might get defaulted anyway, if they are kind variables and `-XNoPolyKinds` is enabled. |
Instances
Outputable NonStandardDefaultingStrategy | |
Defined in GHC.Types.Basic Methods |
data TypeOrConstraint #
Constructors
TypeLike | |
ConstraintLike |
Instances
data TypeOrKind #
Flag to see whether we're type-checking terms or kind-checking types
Instances
Outputable TypeOrKind | |
Defined in GHC.Types.Basic Methods ppr :: TypeOrKind -> SDoc # | |
Eq TypeOrKind | |
Defined in GHC.Types.Basic |
data IntWithInf #
An integer or infinity
Instances
Num IntWithInf | |
Defined in GHC.Types.Basic Methods (+) :: IntWithInf -> IntWithInf -> IntWithInf # (-) :: IntWithInf -> IntWithInf -> IntWithInf # (*) :: IntWithInf -> IntWithInf -> IntWithInf # negate :: IntWithInf -> IntWithInf # abs :: IntWithInf -> IntWithInf # signum :: IntWithInf -> IntWithInf # fromInteger :: Integer -> IntWithInf # | |
Outputable IntWithInf | |
Defined in GHC.Types.Basic Methods ppr :: IntWithInf -> SDoc # | |
Eq IntWithInf | |
Defined in GHC.Types.Basic | |
Ord IntWithInf | |
Defined in GHC.Types.Basic Methods compare :: IntWithInf -> IntWithInf -> Ordering # (<) :: IntWithInf -> IntWithInf -> Bool # (<=) :: IntWithInf -> IntWithInf -> Bool # (>) :: IntWithInf -> IntWithInf -> Bool # (>=) :: IntWithInf -> IntWithInf -> Bool # max :: IntWithInf -> IntWithInf -> IntWithInf # min :: IntWithInf -> IntWithInf -> IntWithInf # |
data UnfoldingSource #
Constructors
VanillaSrc | |
StableUserSrc | |
StableSystemSrc | |
CompulsorySrc |
Instances
Binary UnfoldingSource | |
Defined in GHC.Types.Basic Methods put_ :: BinHandle -> UnfoldingSource -> IO () # put :: BinHandle -> UnfoldingSource -> IO (Bin UnfoldingSource) # get :: BinHandle -> IO UnfoldingSource # | |
Outputable UnfoldingSource | |
Defined in GHC.Types.Basic Methods ppr :: UnfoldingSource -> SDoc # |
data InlineSpec #
Inline Specification
Constructors
Inline SourceText | |
Inlinable SourceText | |
NoInline SourceText | |
Opaque SourceText | |
NoUserInlinePrag |
Instances
Data InlineSpec | |
Defined in GHC.Types.Basic Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> InlineSpec -> c InlineSpec # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c InlineSpec # toConstr :: InlineSpec -> Constr # dataTypeOf :: InlineSpec -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c InlineSpec) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c InlineSpec) # gmapT :: (forall b. Data b => b -> b) -> InlineSpec -> InlineSpec # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> InlineSpec -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> InlineSpec -> r # gmapQ :: (forall d. Data d => d -> u) -> InlineSpec -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> InlineSpec -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> InlineSpec -> m InlineSpec # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> InlineSpec -> m InlineSpec # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> InlineSpec -> m InlineSpec # | |
Show InlineSpec | |
Defined in GHC.Types.Basic Methods showsPrec :: Int -> InlineSpec -> ShowS # show :: InlineSpec -> String # showList :: [InlineSpec] -> ShowS # | |
Binary InlineSpec | |
Defined in GHC.Types.Basic Methods put_ :: BinHandle -> InlineSpec -> IO () # put :: BinHandle -> InlineSpec -> IO (Bin InlineSpec) # get :: BinHandle -> IO InlineSpec # | |
Outputable InlineSpec | |
Defined in GHC.Types.Basic Methods ppr :: InlineSpec -> SDoc # | |
Eq InlineSpec | |
Defined in GHC.Types.Basic |
data RuleMatchInfo #
Rule Match Information
Instances
data InlinePragma #
Constructors
InlinePragma | |
Fields
|
Instances
Data InlinePragma | |
Defined in GHC.Types.Basic Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> InlinePragma -> c InlinePragma # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c InlinePragma # toConstr :: InlinePragma -> Constr # dataTypeOf :: InlinePragma -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c InlinePragma) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c InlinePragma) # gmapT :: (forall b. Data b => b -> b) -> InlinePragma -> InlinePragma # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> InlinePragma -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> InlinePragma -> r # gmapQ :: (forall d. Data d => d -> u) -> InlinePragma -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> InlinePragma -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> InlinePragma -> m InlinePragma # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> InlinePragma -> m InlinePragma # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> InlinePragma -> m InlinePragma # | |
Binary InlinePragma | |
Defined in GHC.Types.Basic Methods put_ :: BinHandle -> InlinePragma -> IO () # put :: BinHandle -> InlinePragma -> IO (Bin InlinePragma) # get :: BinHandle -> IO InlinePragma # | |
Outputable InlinePragma | |
Defined in GHC.Types.Basic Methods ppr :: InlinePragma -> SDoc # | |
Eq InlinePragma | |
Defined in GHC.Types.Basic |
data Activation #
Constructors
AlwaysActive | |
ActiveBefore SourceText PhaseNum | |
ActiveAfter SourceText PhaseNum | |
FinalActive | |
NeverActive |
Instances
Data Activation | |
Defined in GHC.Types.Basic Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Activation -> c Activation # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Activation # toConstr :: Activation -> Constr # dataTypeOf :: Activation -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Activation) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Activation) # gmapT :: (forall b. Data b => b -> b) -> Activation -> Activation # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Activation -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Activation -> r # gmapQ :: (forall d. Data d => d -> u) -> Activation -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Activation -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Activation -> m Activation # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Activation -> m Activation # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Activation -> m Activation # | |
Binary Activation | |
Defined in GHC.Types.Basic Methods put_ :: BinHandle -> Activation -> IO () # put :: BinHandle -> Activation -> IO (Bin Activation) # get :: BinHandle -> IO Activation # | |
Outputable Activation | |
Defined in GHC.Types.Basic Methods ppr :: Activation -> SDoc # | |
Eq Activation | |
Defined in GHC.Types.Basic |
data CompilerPhase #
Constructors
InitialPhase | |
Phase PhaseNum | |
FinalPhase |
Instances
Outputable CompilerPhase | |
Defined in GHC.Types.Basic Methods ppr :: CompilerPhase -> SDoc # | |
Eq CompilerPhase | |
Defined in GHC.Types.Basic Methods (==) :: CompilerPhase -> CompilerPhase -> Bool # (/=) :: CompilerPhase -> CompilerPhase -> Bool # |
data SuccessFlag #
Instances
Semigroup SuccessFlag | |
Defined in GHC.Types.Basic Methods (<>) :: SuccessFlag -> SuccessFlag -> SuccessFlag # sconcat :: NonEmpty SuccessFlag -> SuccessFlag # stimes :: Integral b => b -> SuccessFlag -> SuccessFlag # | |
Outputable SuccessFlag | |
Defined in GHC.Types.Basic Methods ppr :: SuccessFlag -> SDoc # |
data DefMethSpec ty #
Default Method Specification
Instances
Binary (DefMethSpec IfaceType) | |
Defined in GHC.Iface.Type | |
Outputable (DefMethSpec ty) | |
Defined in GHC.Types.Basic Methods ppr :: DefMethSpec ty -> SDoc # |
data TailCallInfo #
Constructors
AlwaysTailCalled JoinArity | |
NoTailCallInfo |
Instances
Outputable TailCallInfo | |
Defined in GHC.Types.Basic Methods ppr :: TailCallInfo -> SDoc # | |
Eq TailCallInfo | |
Defined in GHC.Types.Basic |
Inside Lambda
Constructors
IsInsideLam | Occurs inside a non-linear lambda Substituting a redex for this occurrence is dangerous because it might duplicate work. |
NotInsideLam |
data InterestingCxt #
Interesting Context
Constructors
IsInteresting | Function: is applied Data value: scrutinised by a case with at least one non-DEFAULT branch |
NotInteresting |
Instances
Monoid InterestingCxt | |
Defined in GHC.Types.Basic Methods mappend :: InterestingCxt -> InterestingCxt -> InterestingCxt # mconcat :: [InterestingCxt] -> InterestingCxt # | |
Semigroup InterestingCxt | If there is any |
Defined in GHC.Types.Basic Methods (<>) :: InterestingCxt -> InterestingCxt -> InterestingCxt # sconcat :: NonEmpty InterestingCxt -> InterestingCxt # stimes :: Integral b => b -> InterestingCxt -> InterestingCxt # | |
Eq InterestingCxt | |
Defined in GHC.Types.Basic Methods (==) :: InterestingCxt -> InterestingCxt -> Bool # (/=) :: InterestingCxt -> InterestingCxt -> Bool # |
type BranchCount = Int #
identifier Occurrence Information
Constructors
ManyOccs | There are many occurrences, or unknown occurrences |
Fields
| |
IAmDead | Marks unused variables. Sometimes useful for lambda and case-bound variables. |
OneOcc | Occurs exactly once (per branch), not inside a rule |
Fields
| |
IAmALoopBreaker | This identifier breaks a loop of mutually recursive functions. The field marks whether it is only a loop breaker due to a reference in a rule |
Fields
|
data UnboxedTupleOrSum #
Are we dealing with an unboxed tuple or an unboxed sum?
Used when validity checking, see check_ubx_tuple_or_sum
.
Constructors
UnboxedTupleType | |
UnboxedSumType |
Instances
Outputable UnboxedTupleOrSum | |
Defined in GHC.Types.Basic Methods ppr :: UnboxedTupleOrSum -> SDoc # | |
Eq UnboxedTupleOrSum | |
Defined in GHC.Types.Basic Methods (==) :: UnboxedTupleOrSum -> UnboxedTupleOrSum -> Bool # (/=) :: UnboxedTupleOrSum -> UnboxedTupleOrSum -> Bool # |
Constructors
BoxedTuple | |
UnboxedTuple | |
ConstraintTuple |
Instances
Data TupleSort | |
Defined in GHC.Types.Basic Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TupleSort -> c TupleSort # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TupleSort # toConstr :: TupleSort -> Constr # dataTypeOf :: TupleSort -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TupleSort) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TupleSort) # gmapT :: (forall b. Data b => b -> b) -> TupleSort -> TupleSort # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TupleSort -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TupleSort -> r # gmapQ :: (forall d. Data d => d -> u) -> TupleSort -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> TupleSort -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> TupleSort -> m TupleSort # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TupleSort -> m TupleSort # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TupleSort -> m TupleSort # | |
Binary TupleSort | |
Outputable TupleSort | |
Defined in GHC.Types.Basic | |
Eq TupleSort | |
data OverlapMode #
Constructors
NoOverlap SourceText | This instance must not overlap another |
Overlappable SourceText | Silently ignore this instance if you find a more specific one that matches the constraint you are trying to resolve Example: constraint (Foo [Int]) instance Foo [Int] instance {-# OVERLAPPABLE #-} Foo [a] Since the second instance has the Overlappable flag, the first instance will be chosen (otherwise its ambiguous which to choose) |
Overlapping SourceText | Silently ignore any more general instances that may be used to solve the constraint. Example: constraint (Foo [Int]) instance {-# OVERLAPPING #-} Foo [Int] instance Foo [a] Since the first instance has the Overlapping flag, the second---more general---instance will be ignored (otherwise it is ambiguous which to choose) |
Overlaps SourceText | Equivalent to having both |
Incoherent SourceText | Behave like Overlappable and Overlapping, and in addition pick an arbitrary one if there are multiple matching candidates, and don't worry about later instantiation Example: constraint (Foo [b])
instance {-# INCOHERENT -} Foo [Int]
instance Foo [a]
Without the Incoherent flag, we'd complain that
instantiating |
Instances
Data OverlapMode | |
Defined in GHC.Types.Basic Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> OverlapMode -> c OverlapMode # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c OverlapMode # toConstr :: OverlapMode -> Constr # dataTypeOf :: OverlapMode -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c OverlapMode) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c OverlapMode) # gmapT :: (forall b. Data b => b -> b) -> OverlapMode -> OverlapMode # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> OverlapMode -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> OverlapMode -> r # gmapQ :: (forall d. Data d => d -> u) -> OverlapMode -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> OverlapMode -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> OverlapMode -> m OverlapMode # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> OverlapMode -> m OverlapMode # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> OverlapMode -> m OverlapMode # | |
Binary OverlapMode | |
Defined in GHC.Types.Basic Methods put_ :: BinHandle -> OverlapMode -> IO () # put :: BinHandle -> OverlapMode -> IO (Bin OverlapMode) # get :: BinHandle -> IO OverlapMode # | |
Outputable OverlapMode | |
Defined in GHC.Types.Basic Methods ppr :: OverlapMode -> SDoc # | |
Eq OverlapMode | |
Defined in GHC.Types.Basic | |
type Anno OverlapMode | |
Defined in GHC.Hs.Decls | |
type Anno OverlapMode | |
Defined in GHC.Hs.Decls |
data OverlapFlag #
The semantics allowed for overlapping instances for a particular
instance. See Note [Safe Haskell isSafeOverlap] in GHC.Core.InstEnv for a
explanation of the isSafeOverlap
field.
AnnKeywordId
:AnnOpen
'{-# OVERLAPPABLE'
or'{-# OVERLAPPING'
or'{-# OVERLAPS'
or'{-# INCOHERENT'
,AnnClose
`#-}`
,
Constructors
OverlapFlag | |
Fields |
Instances
Data OverlapFlag | |
Defined in GHC.Types.Basic Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> OverlapFlag -> c OverlapFlag # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c OverlapFlag # toConstr :: OverlapFlag -> Constr # dataTypeOf :: OverlapFlag -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c OverlapFlag) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c OverlapFlag) # gmapT :: (forall b. Data b => b -> b) -> OverlapFlag -> OverlapFlag # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> OverlapFlag -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> OverlapFlag -> r # gmapQ :: (forall d. Data d => d -> u) -> OverlapFlag -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> OverlapFlag -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> OverlapFlag -> m OverlapFlag # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> OverlapFlag -> m OverlapFlag # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> OverlapFlag -> m OverlapFlag # | |
Binary OverlapFlag | |
Defined in GHC.Types.Basic Methods put_ :: BinHandle -> OverlapFlag -> IO () # put :: BinHandle -> OverlapFlag -> IO (Bin OverlapFlag) # get :: BinHandle -> IO OverlapFlag # | |
Outputable OverlapFlag | |
Defined in GHC.Types.Basic Methods ppr :: OverlapFlag -> SDoc # | |
Eq OverlapFlag | |
Defined in GHC.Types.Basic |
Constructors
FromSource | |
Generated |
Instances
Data Origin | |
Defined in GHC.Types.Basic Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Origin -> c Origin # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Origin # toConstr :: Origin -> Constr # dataTypeOf :: Origin -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Origin) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Origin) # gmapT :: (forall b. Data b => b -> b) -> Origin -> Origin # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Origin -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Origin -> r # gmapQ :: (forall d. Data d => d -> u) -> Origin -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Origin -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Origin -> m Origin # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Origin -> m Origin # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Origin -> m Origin # | |
Outputable Origin | |
Defined in GHC.Types.Basic | |
Eq Origin | |
Recursivity Flag
Constructors
Recursive | |
NonRecursive |
Instances
Data RecFlag | |
Defined in GHC.Types.Basic Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> RecFlag -> c RecFlag # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c RecFlag # toConstr :: RecFlag -> Constr # dataTypeOf :: RecFlag -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c RecFlag) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c RecFlag) # gmapT :: (forall b. Data b => b -> b) -> RecFlag -> RecFlag # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> RecFlag -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> RecFlag -> r # gmapQ :: (forall d. Data d => d -> u) -> RecFlag -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> RecFlag -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> RecFlag -> m RecFlag # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> RecFlag -> m RecFlag # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> RecFlag -> m RecFlag # | |
Binary RecFlag | |
Outputable RecFlag | |
Defined in GHC.Types.Basic | |
Eq RecFlag | |
Should an argument be passed evaluated *and* tagged.
Constructors
MarkedCbv | |
NotMarkedCbv |
Instances
Binary CbvMark | |
Outputable CbvMark | |
Defined in GHC.Types.Basic | |
Eq CbvMark | |
data TopLevelFlag #
Constructors
TopLevel | |
NotTopLevel |
Instances
Data TopLevelFlag | |
Defined in GHC.Types.Basic Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TopLevelFlag -> c TopLevelFlag # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TopLevelFlag # toConstr :: TopLevelFlag -> Constr # dataTypeOf :: TopLevelFlag -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TopLevelFlag) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TopLevelFlag) # gmapT :: (forall b. Data b => b -> b) -> TopLevelFlag -> TopLevelFlag # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TopLevelFlag -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TopLevelFlag -> r # gmapQ :: (forall d. Data d => d -> u) -> TopLevelFlag -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> TopLevelFlag -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> TopLevelFlag -> m TopLevelFlag # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TopLevelFlag -> m TopLevelFlag # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TopLevelFlag -> m TopLevelFlag # | |
Outputable TopLevelFlag | |
Defined in GHC.Types.Basic Methods ppr :: TopLevelFlag -> SDoc # |
type RuleName = FastString #
data FunctionOrData #
Constructors
IsFunction | |
IsData |
Instances
Constructors
NotSwapped | |
IsSwapped |
Instances
Outputable SwapFlag | |
Defined in GHC.Types.Basic |
data OneShotInfo #
If the Id
is a lambda-bound variable then it may have lambda-bound
variable info. Sometimes we know whether the lambda binding this variable
is a "one-shot" lambda; that is, whether it is applied at most once.
This information may be useful in optimisation, as computations may safely be floated inside such a lambda without risk of duplicating work.
See also Note [OneShotInfo overview] above.
Constructors
NoOneShotInfo | No information |
OneShotLam | The lambda is applied at most once. |
Instances
Outputable OneShotInfo | |
Defined in GHC.Types.Basic Methods ppr :: OneShotInfo -> SDoc # | |
Eq OneShotInfo | |
Defined in GHC.Types.Basic |
A power-of-two alignment
Instances
Outputable Alignment | |
Defined in GHC.Types.Basic | |
Eq Alignment | |
Ord Alignment | |
OutputableP env Alignment | |
Defined in GHC.Types.Basic |
type FullArgCount = Int #
FullArgCount is the number of type or value arguments in an application, or the number of type or value binders in a lambda. Note: it includes both type and value arguments!
The number of arguments that a join point takes. Unlike the arity of a function, this is a purely syntactic property and is fixed when the join point is created (or converted from a value). Both type and value arguments are counted.
Representation Arity
The number of represented arguments that can be applied to a value before it does "real work". So: fib 100 has representation arity 0 x -> fib x has representation arity 1 (# x, y #) -> fib (x + y) has representation arity 2
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
data LeftOrRight #
Instances
Data LeftOrRight | |
Defined in GHC.Types.Basic Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> LeftOrRight -> c LeftOrRight # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c LeftOrRight # toConstr :: LeftOrRight -> Constr # dataTypeOf :: LeftOrRight -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c LeftOrRight) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c LeftOrRight) # gmapT :: (forall b. Data b => b -> b) -> LeftOrRight -> LeftOrRight # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LeftOrRight -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LeftOrRight -> r # gmapQ :: (forall d. Data d => d -> u) -> LeftOrRight -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> LeftOrRight -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> LeftOrRight -> m LeftOrRight # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LeftOrRight -> m LeftOrRight # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LeftOrRight -> m LeftOrRight # | |
Binary LeftOrRight | |
Defined in GHC.Types.Basic Methods put_ :: BinHandle -> LeftOrRight -> IO () # put :: BinHandle -> LeftOrRight -> IO (Bin LeftOrRight) # get :: BinHandle -> IO LeftOrRight # | |
Outputable LeftOrRight | |
Defined in GHC.Types.Basic Methods ppr :: LeftOrRight -> SDoc # | |
Eq LeftOrRight | |
Defined in GHC.Types.Basic |
An EqSpec
is a tyvar/type pair representing an equality made in
rejigging a GADT constructor
Instances
Outputable EqSpec | |
Defined in GHC.Core.DataCon |
data DataConRep #
Data Constructor Representation See Note [Data constructor workers and wrappers]
Constructors
NoDataConRep | |
DCR | |
Fields
|
A data constructor
Instances
Data DataCon | |
Defined in GHC.Core.DataCon Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DataCon -> c DataCon # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DataCon # toConstr :: DataCon -> Constr # dataTypeOf :: DataCon -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DataCon) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DataCon) # gmapT :: (forall b. Data b => b -> b) -> DataCon -> DataCon # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DataCon -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DataCon -> r # gmapQ :: (forall d. Data d => d -> u) -> DataCon -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> DataCon -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> DataCon -> m DataCon # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DataCon -> m DataCon # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DataCon -> m DataCon # | |
NamedThing DataCon | |
Defined in GHC.Core.DataCon | |
Uniquable DataCon | |
Defined in GHC.Core.DataCon | |
Outputable DataCon | |
Defined in GHC.Core.DataCon | |
OutputableBndr DataCon | |
Defined in GHC.Core.DataCon Methods pprBndr :: BindingSite -> DataCon -> SDoc # pprPrefixOcc :: DataCon -> SDoc # pprInfixOcc :: DataCon -> SDoc # bndrIsJoin_maybe :: DataCon -> Maybe Int # | |
Eq DataCon | |
type TidyOccEnv = UniqFM FastString Int #
Instances
Data a => Data (OccEnv a) | |
Defined in GHC.Types.Name.Occurrence Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> OccEnv a -> c (OccEnv a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (OccEnv a) # toConstr :: OccEnv a -> Constr # dataTypeOf :: OccEnv a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (OccEnv a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (OccEnv a)) # gmapT :: (forall b. Data b => b -> b) -> OccEnv a -> OccEnv a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> OccEnv a -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> OccEnv a -> r # gmapQ :: (forall d. Data d => d -> u) -> OccEnv a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> OccEnv a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> OccEnv a -> m (OccEnv a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> OccEnv a -> m (OccEnv a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> OccEnv a -> m (OccEnv a) # | |
Outputable a => Outputable (OccEnv a) | |
Defined in GHC.Types.Name.Occurrence |
Instances
Binary NameSpace | |
Eq NameSpace | |
Ord NameSpace | |
data PlatformMisc #
Platform-specific settings formerly hard-coded in Config.hs.
These should probably be all be triaged whether they can be computed from
other settings or belong in another another place (like Platform
above).
Constructors
PlatformMisc | |
data BuiltInSyntax #
BuiltInSyntax is for things like (:)
, []
and tuples,
which have special syntactic forms. They aren't in scope
as such.
Constructors
BuiltInSyntax | |
UserSyntax |
type PiTyVarBinder = PiTyBinder #
PiTyVarBinder
is like PiTyBinder
, but there can only be Var
in the Named
field.
data PiTyBinder #
A PiTyBinder
represents an argument to a function. PiTyBinders can be
dependent (Named
) or nondependent (Anon
). They may also be visible or
not. See Note [PiTyBinders]
Instances
Data PiTyBinder | |
Defined in GHC.Types.Var Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PiTyBinder -> c PiTyBinder # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c PiTyBinder # toConstr :: PiTyBinder -> Constr # dataTypeOf :: PiTyBinder -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c PiTyBinder) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PiTyBinder) # gmapT :: (forall b. Data b => b -> b) -> PiTyBinder -> PiTyBinder # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PiTyBinder -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PiTyBinder -> r # gmapQ :: (forall d. Data d => d -> u) -> PiTyBinder -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> PiTyBinder -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> PiTyBinder -> m PiTyBinder # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PiTyBinder -> m PiTyBinder # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PiTyBinder -> m PiTyBinder # | |
Outputable PiTyBinder | |
Defined in GHC.Types.Var Methods ppr :: PiTyBinder -> SDoc # |
type ReqTVBinder = VarBndr TyVar () #
type TyVarBinder = VarBndr TyVar ForAllTyFlag #
type ReqTyBinder = VarBndr TyCoVar () #
type InvisTyBinder = VarBndr TyCoVar Specificity #
type ForAllTyBinder = VarBndr TyCoVar ForAllTyFlag #
Variable Binder
A ForAllTyBinder
is the binder of a ForAllTy
It's convenient to define this synonym here rather its natural
home in GHC.Core.TyCo.Rep, because it's used in GHC.Core.DataCon.hs-boot
A TyVarBinder
is a binder with only TyVar
type DTyCoVarSet = UniqDSet TyCoVar #
Deterministic Type or Coercion Variable Set
type TyCoVarSet = UniqSet TyCoVar #
Type or Coercion Variable Set
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.
type InterestingVarFun = Var -> Bool #
Predicate on possible free variables: returns True
iff the variable is
interesting
type DIdEnv elt = UniqDFM Var elt #
Deterministic Identifier Environment Sadly not always indexed by Id, but it is in the common case.
type TyCoVarEnv elt = UniqFM TyCoVar elt #
Type or Coercion Variable Environment
type TidyEnv = (TidyOccEnv, VarEnv Var) #
Tidy Environment
When tidying up print names, we keep a mapping of in-scope occ-names
(the TidyOccEnv
) and a Var-to-Var of the current renamings
Rename Environment 2
When we are comparing (or matching) types or terms, we are faced with "going under" corresponding binders. E.g. when comparing:
\x. e1 ~ \y. e2
Basically we want to rename [x
-> y
] or [y
-> x
], but there are lots of
things we must be careful of. In particular, x
might be free in e2
, or
y in e1
. So the idea is that we come up with a fresh binder that is free
in neither, and rename x
and y
respectively. That means we must maintain:
- A renaming for the left-hand expression
- A renaming for the right-hand expressions
- An in-scope set
Furthermore, when matching, we want to be able to have an 'occurs check', to prevent:
\x. f ~ \y. y
matching with [f
-> y
]. So for each expression we want to know that set of
locally-bound variables. That is precisely the domain of the mappings 1.
and 2., but we must ensure that we always extend the mappings as we go in.
All of this information is bundled up in the RnEnv2
newtype InScopeSet #
A set of variables that are in scope at some point.
Note that this is a superset of the variables that are currently in scope. See Note [The InScopeSet invariant].
"Secrets of the Glasgow Haskell Compiler inliner" Section 3.2 provides the motivation for this abstraction.
Instances
Outputable InScopeSet | |
Defined in GHC.Types.Var.Env Methods ppr :: InScopeSet -> SDoc # |
newtype NonCaffySet #
Id
s which have no CAF references. This is a result of analysis of C--.
It is always safe to use an empty NonCaffySet
. TODO Refer to Note.
Constructors
NonCaffySet | |
Fields |
Instances
Monoid NonCaffySet | |
Defined in GHC.Types.Name.Set Methods mempty :: NonCaffySet # mappend :: NonCaffySet -> NonCaffySet -> NonCaffySet # mconcat :: [NonCaffySet] -> NonCaffySet # | |
Semigroup NonCaffySet | |
Defined in GHC.Types.Name.Set Methods (<>) :: NonCaffySet -> NonCaffySet -> NonCaffySet # sconcat :: NonEmpty NonCaffySet -> NonCaffySet # stimes :: Integral b => b -> NonCaffySet -> NonCaffySet # |
type DefUse = (Maybe Defs, Uses) #
(Just ds, us) =>
The use of any member of the ds
implies that all the us
are used too.
Also, us
may mention ds
.
Nothing =>
Nothing is defined in this group, but
nevertheless all the uses are essential.
Used for instance declarations, for example
type DNameEnv a = UniqDFM Name a #
Deterministic Name Environment
See Note [Deterministic UniqFM] in GHC.Types.Unique.DFM for explanation why we need DNameEnv.
Used where we may have an ordinary name or a record field label. See Note [GreNames] in GHC.Types.Name.Reader.
Constructors
NormalGreName Name | |
FieldGreName FieldLabel |
Instances
Data GreName | |
Defined in GHC.Types.Avail Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GreName -> c GreName # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c GreName # toConstr :: GreName -> Constr # dataTypeOf :: GreName -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c GreName) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c GreName) # gmapT :: (forall b. Data b => b -> b) -> GreName -> GreName # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GreName -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GreName -> r # gmapQ :: (forall d. Data d => d -> u) -> GreName -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> GreName -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> GreName -> m GreName # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GreName -> m GreName # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GreName -> m GreName # | |
NFData GreName | |
Defined in GHC.Types.Avail | |
HasOccName GreName | |
Defined in GHC.Types.Avail | |
Binary GreName | |
Outputable GreName | |
Defined in GHC.Types.Avail | |
Eq GreName | |
Ord GreName | |
data ImpItemSpec #
Import Item Specification
Describes import info a particular Name
Constructors
ImpAll | The import had no import list, or had a hiding list |
ImpSome | The import had an import list.
The import C( T(..) ) Here the constructors of |
Fields
|
Instances
Data ImpItemSpec | |
Defined in GHC.Types.Name.Reader Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ImpItemSpec -> c ImpItemSpec # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ImpItemSpec # toConstr :: ImpItemSpec -> Constr # dataTypeOf :: ImpItemSpec -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ImpItemSpec) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ImpItemSpec) # gmapT :: (forall b. Data b => b -> b) -> ImpItemSpec -> ImpItemSpec # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ImpItemSpec -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ImpItemSpec -> r # gmapQ :: (forall d. Data d => d -> u) -> ImpItemSpec -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ImpItemSpec -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ImpItemSpec -> m ImpItemSpec # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ImpItemSpec -> m ImpItemSpec # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ImpItemSpec -> m ImpItemSpec # | |
Eq ImpItemSpec | |
Defined in GHC.Types.Name.Reader |
data ImpDeclSpec #
Import Declaration Specification
Describes a particular import declaration and is
shared among all the Provenance
s for that decl
Constructors
ImpDeclSpec | |
Fields
|
Instances
Data ImpDeclSpec | |
Defined in GHC.Types.Name.Reader Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ImpDeclSpec -> c ImpDeclSpec # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ImpDeclSpec # toConstr :: ImpDeclSpec -> Constr # dataTypeOf :: ImpDeclSpec -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ImpDeclSpec) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ImpDeclSpec) # gmapT :: (forall b. Data b => b -> b) -> ImpDeclSpec -> ImpDeclSpec # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ImpDeclSpec -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ImpDeclSpec -> r # gmapQ :: (forall d. Data d => d -> u) -> ImpDeclSpec -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ImpDeclSpec -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ImpDeclSpec -> m ImpDeclSpec # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ImpDeclSpec -> m ImpDeclSpec # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ImpDeclSpec -> m ImpDeclSpec # | |
Eq ImpDeclSpec | |
Defined in GHC.Types.Name.Reader |
data ImportSpec #
Import Specification
The ImportSpec
of something says how it came to be imported
It's quite elaborate so that we can give accurate unused-name warnings.
Constructors
ImpSpec | |
Fields
|
Instances
Data ImportSpec | |
Defined in GHC.Types.Name.Reader Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ImportSpec -> c ImportSpec # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ImportSpec # toConstr :: ImportSpec -> Constr # dataTypeOf :: ImportSpec -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ImportSpec) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ImportSpec) # gmapT :: (forall b. Data b => b -> b) -> ImportSpec -> ImportSpec # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ImportSpec -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ImportSpec -> r # gmapQ :: (forall d. Data d => d -> u) -> ImportSpec -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ImportSpec -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ImportSpec -> m ImportSpec # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ImportSpec -> m ImportSpec # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ImportSpec -> m ImportSpec # | |
Outputable ImportSpec | |
Defined in GHC.Types.Name.Reader Methods ppr :: ImportSpec -> SDoc # | |
Eq ImportSpec | |
Defined in GHC.Types.Name.Reader |
See Note [Parents]
Instances
Data Parent | |
Defined in GHC.Types.Name.Reader Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Parent -> c Parent # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Parent # toConstr :: Parent -> Constr # dataTypeOf :: Parent -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Parent) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Parent) # gmapT :: (forall b. Data b => b -> b) -> Parent -> Parent # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Parent -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Parent -> r # gmapQ :: (forall d. Data d => d -> u) -> Parent -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Parent -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Parent -> m Parent # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Parent -> m Parent # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Parent -> m Parent # | |
Outputable Parent | |
Defined in GHC.Types.Name.Reader | |
Eq Parent | |
data GlobalRdrElt #
Global Reader Element
An element of the GlobalRdrEnv
Constructors
GRE | |
Instances
Data GlobalRdrElt | |
Defined in GHC.Types.Name.Reader Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GlobalRdrElt -> c GlobalRdrElt # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c GlobalRdrElt # toConstr :: GlobalRdrElt -> Constr # dataTypeOf :: GlobalRdrElt -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c GlobalRdrElt) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c GlobalRdrElt) # gmapT :: (forall b. Data b => b -> b) -> GlobalRdrElt -> GlobalRdrElt # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GlobalRdrElt -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GlobalRdrElt -> r # gmapQ :: (forall d. Data d => d -> u) -> GlobalRdrElt -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> GlobalRdrElt -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> GlobalRdrElt -> m GlobalRdrElt # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GlobalRdrElt -> m GlobalRdrElt # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GlobalRdrElt -> m GlobalRdrElt # | |
HasOccName GlobalRdrElt | |
Defined in GHC.Types.Name.Reader Methods occName :: GlobalRdrElt -> OccName # | |
Outputable GlobalRdrElt | |
Defined in GHC.Types.Name.Reader Methods ppr :: GlobalRdrElt -> SDoc # |
type GlobalRdrEnv = OccEnv [GlobalRdrElt] #
Global Reader Environment
Keyed by OccName
; when looking up a qualified name
we look up the OccName
part, and then check the Provenance
to see if the appropriate qualification is valid. This
saves routinely doubling the size of the env by adding both
qualified and unqualified names to the domain.
The list in the codomain is required because there may be name clashes These only get reported on lookup, not on construction
INVARIANT 1: All the members of the list have distinct
gre_name
fields; that is, no duplicate Names
INVARIANT 2: Imported provenance => Name is an ExternalName However LocalDefs can have an InternalName. This happens only when type-checking a [d| ... |] Template Haskell quotation; see this note in GHC.Rename.Names Note [Top-level Names in Template Haskell decl quotes]
INVARIANT 3: If the GlobalRdrEnv maps [occ -> gre], then greOccName gre = occ
NB: greOccName gre is usually the same as nameOccName (greMangledName gre), but not always in the case of record selectors; see Note [GreNames]
data LocalRdrEnv #
Local Reader Environment See Note [LocalRdrEnv]
Instances
Outputable LocalRdrEnv | |
Defined in GHC.Types.Name.Reader Methods ppr :: LocalRdrEnv -> SDoc # |
type SrcSpanAnnA = SrcAnn AnnListItem #
data SrcSpanAnn' a #
The 'SrcSpanAnn'' type wraps a normal SrcSpan
, together with
an extra annotation type. This is mapped to a specific GenLocated
usage in the AST through the XRec
and Anno
type families.
Constructors
SrcSpanAnn | |
Instances
type OutputableBndrId (pass :: Pass) = (OutputableBndr (IdGhcP pass), OutputableBndr (IdGhcP (NoGhcTcPass pass)), Outputable (GenLocated (Anno (IdGhcP pass)) (IdGhcP pass)), Outputable (GenLocated (Anno (IdGhcP (NoGhcTcPass pass))) (IdGhcP (NoGhcTcPass pass))), IsPass pass) #
Constraint type to bundle up the requirement for OutputableBndr
on both
the id
and the NoGhcTc
of it. See Note [NoGhcTc].
type family NoGhcTcPass (p :: Pass) :: Pass where ... #
Equations
NoGhcTcPass 'Typechecked = 'Renamed | |
NoGhcTcPass other = other |
class (NoGhcTcPass (NoGhcTcPass p) ~ NoGhcTcPass p, IsPass (NoGhcTcPass p)) => IsPass (p :: Pass) where #
Allows us to check what phase we're in at GHC's runtime. For example, this class allows us to write > f :: forall p. IsPass p => HsExpr (GhcPass p) -> blah > f e = case ghcPass @p of > GhcPs -> ... in this RHS we have HsExpr GhcPs... > GhcRn -> ... in this RHS we have HsExpr GhcRn... > GhcTc -> ... in this RHS we have HsExpr GhcTc... which is very useful, for example, when pretty-printing. See Note [IsPass].
Instances
IsPass 'Parsed | |
Defined in GHC.Hs.Extension | |
IsPass 'Renamed | |
Defined in GHC.Hs.Extension | |
IsPass 'Typechecked | |
Defined in GHC.Hs.Extension Methods ghcPass :: GhcPass 'Typechecked # |
type GhcTc = GhcPass 'Typechecked #
Constructors
Parsed | |
Renamed | |
Typechecked |
Instances
Data Pass | |
Defined in GHC.Hs.Extension Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Pass -> c Pass # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Pass # dataTypeOf :: Pass -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Pass) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Pass) # gmapT :: (forall b. Data b => b -> b) -> Pass -> Pass # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Pass -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Pass -> r # gmapQ :: (forall d. Data d => d -> u) -> Pass -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Pass -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Pass -> m Pass # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Pass -> m Pass # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Pass -> m Pass # |
data GhcPass (c :: Pass) where #
Used as a data type index for the hsSyn AST; also serves as a singleton type for Pass
Instances
type IsSrcSpanAnn (p :: Pass) a = (Anno (IdGhcP p) ~ SrcSpanAnn' (EpAnn a), IsPass p) #
type LIEWrappedName p = XRec p (IEWrappedName p) #
Located name with possible adornment
- AnnKeywordId
s : AnnType
,
AnnPattern
data IEWrappedName p #
A name in an import or export specification which may have
adornments. Used primarily for accurate pretty printing of
ParsedSource, and API Annotation placement. The
Annotation
is the location of the adornment in
the original source.
Constructors
IEName (XIEName p) (LIdP p) | no extra |
IEPattern (XIEPattern p) (LIdP p) | pattern X |
IEType (XIEType p) (LIdP p) | type (:+:) |
XIEWrappedName !(XXIEWrappedName p) |
Instances
type Anno (IEWrappedName (GhcPass _1)) | |
Defined in GHC.Hs.ImpExp |
data IEWildcard #
Wildcard in an import or export sublist, like the ..
in
import Mod ( T(Mk1, Mk2, ..) )
.
Constructors
NoIEWildcard | no wildcard in this list |
IEWildcard Int | wildcard after the given # of items in this list
The |
Instances
Data IEWildcard | |
Defined in Language.Haskell.Syntax.ImpExp Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> IEWildcard -> c IEWildcard # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c IEWildcard # toConstr :: IEWildcard -> Constr # dataTypeOf :: IEWildcard -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c IEWildcard) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c IEWildcard) # gmapT :: (forall b. Data b => b -> b) -> IEWildcard -> IEWildcard # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> IEWildcard -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> IEWildcard -> r # gmapQ :: (forall d. Data d => d -> u) -> IEWildcard -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> IEWildcard -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> IEWildcard -> m IEWildcard # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> IEWildcard -> m IEWildcard # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> IEWildcard -> m IEWildcard # | |
Eq IEWildcard | |
Defined in Language.Haskell.Syntax.ImpExp |
data ImportListInterpretation #
Whether the import list is exactly what to import, or whether hiding
was
used, and therefore everything but what was listed should be imported
Constructors
Exactly | |
EverythingBut |
Instances
data ImportDecl pass #
Import Declaration
A single Haskell import
declaration.
Constructors
ImportDecl | |
Fields
| |
XImportDecl !(XXImportDecl pass) |
Instances
type Anno (ImportDecl (GhcPass p)) | |
Defined in GHC.Hs.ImpExp |
data ImportDeclQualifiedStyle #
If/how an import is qualified
.
Constructors
QualifiedPre |
|
QualifiedPost |
|
NotQualified | Not qualified. |
Instances
type LImportDecl pass #
Arguments
= XRec pass (ImportDecl pass) | When in a list this may have |
Located Import Declaration
type CoreAnnTarget = AnnTarget Name #
The kind of annotation target found in the middle end of the compiler
An annotation target
Constructors
NamedTarget name | We are annotating something with a name: a type or identifier |
ModuleTarget Module | We are annotating a particular module |
Instances
Functor AnnTarget | |
Binary name => Binary (AnnTarget name) | |
Outputable name => Outputable (AnnTarget name) | |
Defined in GHC.Types.Annotations |
type AnnPayload #
Arguments
= Serialized | The "payload" of an annotation allows recovery of its value at a given type, and can be persisted to an interface file |
data FileSettings #
Paths to various files and directories used by GHC, including those that provide more settings.
Constructors
Settings | |
Fields
|
newtype PackageName #
Constructors
PackageName | |
Fields |
Instances
Uniquable PackageName | |
Defined in GHC.Unit.Info Methods getUnique :: PackageName -> Unique # | |
Outputable PackageName | |
Defined in GHC.Unit.Info Methods ppr :: PackageName -> SDoc # | |
Eq PackageName | |
Defined in GHC.Unit.Info |
Constructors
PackageId FastString |
Instances
type UnitInfo = GenUnitInfo UnitId #
Information about an installed unit (units are identified by their internal UnitId)
type UnitKeyInfo = GenUnitInfo UnitKey #
Information about an installed unit (units are identified by their database UnitKey)
type GenUnitInfo unit = GenericUnitInfo PackageId PackageName unit ModuleName (GenModule (GenUnit unit)) #
Information about an installed unit
We parameterize on the unit identifier:
* UnitKey: identifier used in the database (cf UnitKeyInfo
)
* UnitId: identifier used to generate code (cf UnitInfo
)
These two identifiers are different for wired-in packages. See Note [About units] in GHC.Unit
The Hsc monad: Passing an environment and diagnostic state
Constructors
Hsc (HscEnv -> Messages GhcMessage -> IO (a, Messages GhcMessage)) |
Instances
MonadIO Hsc | |
Defined in GHC.Driver.Env.Types | |
Applicative Hsc | |
Functor Hsc | |
Monad Hsc | |
HasDynFlags Hsc | |
Defined in GHC.Driver.Env.Types Methods getDynFlags :: Hsc DynFlags # | |
HasLogger Hsc | |
Defined in GHC.Driver.Env.Types |
data LiftingContext #
Instances
Outputable LiftingContext | |
Defined in GHC.Core.Coercion Methods ppr :: LiftingContext -> SDoc # |
Instances
type Anno (FunDep (GhcPass p)) | |
Defined in GHC.Hs.Decls |
data TyConFlavour #
Paints a picture of what a TyCon
represents, in broad strokes.
This is used towards more informative error messages.
Constructors
Instances
Outputable TyConFlavour | |
Defined in GHC.Core.TyCon Methods ppr :: TyConFlavour -> SDoc # | |
Eq TyConFlavour | |
Defined in GHC.Core.TyCon |
data ExpandSynResult tyco #
Constructors
NoExpansion | |
ExpandsSyn [(TyVar, tyco)] Type [tyco] |
data PrimElemRep #
Constructors
Int8ElemRep | |
Int16ElemRep | |
Int32ElemRep | |
Int64ElemRep | |
Word8ElemRep | |
Word16ElemRep | |
Word32ElemRep | |
Word64ElemRep | |
FloatElemRep | |
DoubleElemRep |
Instances
A PrimRep
is an abstraction of a type. It contains information that
the code generator needs in order to pass arguments, return results,
and store values of this type. See also Note [RuntimeRep and PrimRep] in
GHC.Types.RepType and Note [VoidRep] in GHC.Types.RepType.
Constructors
VoidRep | |
LiftedRep | |
UnliftedRep | Unlifted pointer |
Int8Rep | Signed, 8-bit value |
Int16Rep | Signed, 16-bit value |
Int32Rep | Signed, 32-bit value |
Int64Rep | Signed, 64 bit value |
IntRep | Signed, word-sized value |
Word8Rep | Unsigned, 8 bit value |
Word16Rep | Unsigned, 16 bit value |
Word32Rep | Unsigned, 32 bit value |
Word64Rep | Unsigned, 64 bit value |
WordRep | Unsigned, word-sized value |
AddrRep | A pointer, but not to a Haskell value (use '(Un)liftedRep') |
FloatRep | |
DoubleRep | |
VecRep Int PrimElemRep | A vector |
Instances
Data PrimRep | |
Defined in GHC.Core.TyCon Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PrimRep -> c PrimRep # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c PrimRep # toConstr :: PrimRep -> Constr # dataTypeOf :: PrimRep -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c PrimRep) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PrimRep) # gmapT :: (forall b. Data b => b -> b) -> PrimRep -> PrimRep # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PrimRep -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PrimRep -> r # gmapQ :: (forall d. Data d => d -> u) -> PrimRep -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> PrimRep -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> PrimRep -> m PrimRep # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PrimRep -> m PrimRep # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PrimRep -> m PrimRep # | |
Show PrimRep | |
Binary PrimRep | |
Outputable PrimRep | |
Defined in GHC.Core.TyCon | |
Eq PrimRep | |
Ord PrimRep | |
data FamTyConFlav #
Information pertaining to the expansion of a type synonym (type
)
Constructors
DataFamilyTyCon TyConRepName | Represents an open type family without a fixed right hand side. Additional instances can appear at any time. These are introduced by either a top level declaration: data family T a :: * Or an associated data type declaration, within a class declaration: class C a b where data T b :: * |
OpenSynFamilyTyCon | An open type synonym family e.g. |
ClosedSynFamilyTyCon (Maybe (CoAxiom Branched)) | A closed type synonym family e.g.
|
AbstractClosedSynFamilyTyCon | A closed type synonym family declared in an hs-boot file with type family F a where .. |
BuiltInSynFamTyCon BuiltInSynFamily | Built-in type family used by the TypeNats solver |
Instances
Outputable FamTyConFlav | |
Defined in GHC.Core.TyCon Methods ppr :: FamTyConFlav -> SDoc # |
data Injectivity #
Constructors
NotInjective | |
Injective [Bool] |
Instances
Binary Injectivity | |
Defined in GHC.Core.TyCon Methods put_ :: BinHandle -> Injectivity -> IO () # put :: BinHandle -> Injectivity -> IO (Bin Injectivity) # get :: BinHandle -> IO Injectivity # | |
Eq Injectivity | |
Defined in GHC.Core.TyCon |
data AlgTyConFlav #
Describes the flavour of an algebraic type constructor. For
classes and data families, this flavour includes a reference to
the parent TyCon
.
Constructors
VanillaAlgTyCon TyConRepName | An ordinary algebraic type constructor. This includes unlifted and representation-polymorphic datatypes and newtypes and unboxed tuples, but NOT unboxed sums; see UnboxedSumTyCon. |
UnboxedSumTyCon | An unboxed sum type constructor. This is distinct from VanillaAlgTyCon because we currently don't allow unboxed sums to be Typeable since there are too many of them. See #13276. |
ClassTyCon Class TyConRepName | Type constructors representing a class dictionary. See Note [ATyCon for classes] in GHC.Core.TyCo.Rep |
DataFamInstTyCon (CoAxiom Unbranched) TyCon [Type] | Type constructors representing an *instance* of a *data* family. Parameters: 1) The type family in question 2) Instance types; free variables are the 3) A |
Instances
Outputable AlgTyConFlav | |
Defined in GHC.Core.TyCon Methods ppr :: AlgTyConFlav -> SDoc # |
data PromDataConInfo #
Some promoted datacons signify extra info relevant to GHC. For example,
the IntRep
constructor of RuntimeRep
corresponds to the IntRep
constructor of PrimRep
. This data structure allows us to store this
information right in the TyCon
. The other approach would be to look
up things like RuntimeRep
's PrimRep
by known-key every time.
See also Note [Getting from RuntimeRep to PrimRep] in GHC.Types.RepType
Constructors
NoPromInfo | an ordinary promoted data con |
RuntimeRep ([Type] -> [PrimRep]) | A constructor of |
VecCount Int | A constructor of |
VecElem PrimElemRep | A constructor of |
Levity Levity | A constructor of |
data AlgTyConRhs #
Represents right-hand-sides of TyCon
s for algebraic types
Constructors
AbstractTyCon | Says that we know nothing about this data type, except that it's represented by a pointer. Used when we export a data type abstractly into an .hi file. |
DataTyCon | Information about those |
Fields
| |
TupleTyCon | |
SumTyCon | An unboxed sum type. |
Fields
| |
NewTyCon | Information about those |
Fields
|
data TyConBndrVis #
Constructors
NamedTCB ForAllTyFlag | |
AnonTCB FunTyFlag |
Instances
Binary TyConBndrVis | |
Defined in GHC.Core.TyCon Methods put_ :: BinHandle -> TyConBndrVis -> IO () # put :: BinHandle -> TyConBndrVis -> IO (Bin TyConBndrVis) # get :: BinHandle -> IO TyConBndrVis # | |
Outputable TyConBndrVis | |
Defined in GHC.Core.TyCon Methods ppr :: TyConBndrVis -> SDoc # | |
OutputableBndr tv => Outputable (VarBndr tv TyConBndrVis) | |
Defined in GHC.Core.TyCon Methods ppr :: VarBndr tv TyConBndrVis -> SDoc # |
type TyConPiTyBinder = VarBndr TyCoVar TyConBndrVis #
type TyConBinder = VarBndr TyVar TyConBndrVis #
data TyCoFolder env a #
Constructors
TyCoFolder | |
Fields
|
data CoercionHole #
A coercion to be filled in by the type-checker. See Note [Coercion holes]
Instances
Data CoercionHole | |
Defined in GHC.Core.TyCo.Rep Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CoercionHole -> c CoercionHole # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CoercionHole # toConstr :: CoercionHole -> Constr # dataTypeOf :: CoercionHole -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c CoercionHole) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CoercionHole) # gmapT :: (forall b. Data b => b -> b) -> CoercionHole -> CoercionHole # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CoercionHole -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CoercionHole -> r # gmapQ :: (forall d. Data d => d -> u) -> CoercionHole -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> CoercionHole -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> CoercionHole -> m CoercionHole # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CoercionHole -> m CoercionHole # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CoercionHole -> m CoercionHole # | |
Uniquable CoercionHole | |
Defined in GHC.Core.TyCo.Rep Methods getUnique :: CoercionHole -> Unique # | |
Outputable CoercionHole | |
Defined in GHC.Core.TyCo.Rep Methods ppr :: CoercionHole -> SDoc # |
type MCoercionR = MCoercion #
Instances
Data FunSel | |
Defined in GHC.Core.TyCo.Rep Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FunSel -> c FunSel # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c FunSel # toConstr :: FunSel -> Constr # dataTypeOf :: FunSel -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c FunSel) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c FunSel) # gmapT :: (forall b. Data b => b -> b) -> FunSel -> FunSel # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FunSel -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FunSel -> r # gmapQ :: (forall d. Data d => d -> u) -> FunSel -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> FunSel -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> FunSel -> m FunSel # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> FunSel -> m FunSel # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> FunSel -> m FunSel # | |
Outputable FunSel | |
Defined in GHC.Core.TyCo.Rep | |
Eq FunSel | |
A type labeled KnotTied
might have knot-tied tycons in it. See
Note [Type checking recursive type and class declarations] in
GHC.Tc.TyCl
type KindOrType = Type #
The key representation of types within the compiler
type IdSubstEnv = IdEnv CoreExpr #
A substitution of Expr
s for non-coercion Id
s
data TyCoMapper env (m :: Type -> Type) #
This describes how a "map" operation over a type/coercion should behave
Constructors
TyCoMapper | |
Fields
|
data OverLitVal #
Overloaded Literal Value
Constructors
HsIntegral !IntegralLit | Integer-looking literals; |
HsFractional !FractionalLit | Frac-looking literals |
HsIsString !SourceText !FastString | String-looking literals |
Instances
Data OverLitVal | |
Defined in Language.Haskell.Syntax.Lit Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> OverLitVal -> c OverLitVal # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c OverLitVal # toConstr :: OverLitVal -> Constr # dataTypeOf :: OverLitVal -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c OverLitVal) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c OverLitVal) # gmapT :: (forall b. Data b => b -> b) -> OverLitVal -> OverLitVal # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> OverLitVal -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> OverLitVal -> r # gmapQ :: (forall d. Data d => d -> u) -> OverLitVal -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> OverLitVal -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> OverLitVal -> m OverLitVal # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> OverLitVal -> m OverLitVal # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> OverLitVal -> m OverLitVal # | |
Eq OverLitVal | |
Defined in Language.Haskell.Syntax.Lit | |
Ord OverLitVal | |
Defined in Language.Haskell.Syntax.Lit Methods compare :: OverLitVal -> OverLitVal -> Ordering # (<) :: OverLitVal -> OverLitVal -> Bool # (<=) :: OverLitVal -> OverLitVal -> Bool # (>) :: OverLitVal -> OverLitVal -> Bool # (>=) :: OverLitVal -> OverLitVal -> Bool # max :: OverLitVal -> OverLitVal -> OverLitVal # min :: OverLitVal -> OverLitVal -> OverLitVal # |
Haskell Overloaded Literal
Instances
Eq (XXOverLit p) => Eq (HsOverLit p) | |
Ord (XXOverLit p) => Ord (HsOverLit p) | |
Defined in Language.Haskell.Syntax.Lit | |
type Anno (HsOverLit (GhcPass p)) | |
Haskell Literal
Constructors
HsChar (XHsChar x) Char | Character |
HsCharPrim (XHsCharPrim x) Char | Unboxed character |
HsString (XHsString x) FastString | String |
HsStringPrim (XHsStringPrim x) !ByteString | Packed bytes |
HsInt (XHsInt x) IntegralLit | Genuinely an Int; arises from GHC.Tc.Deriv.Generate, and from TRANSLATION |
HsIntPrim (XHsIntPrim x) Integer | literal |
HsWordPrim (XHsWordPrim x) Integer | literal |
HsInt64Prim (XHsInt64Prim x) Integer | literal |
HsWord64Prim (XHsWord64Prim x) Integer | literal |
HsInteger (XHsInteger x) Integer Type | Genuinely an integer; arises only from TRANSLATION (overloaded literals are done with HsOverLit) |
HsRat (XHsRat x) FractionalLit Type | Genuinely a rational; arises only from TRANSLATION (overloaded literals are done with HsOverLit) |
HsFloatPrim (XHsFloatPrim x) FractionalLit | Unboxed Float |
HsDoublePrim (XHsDoublePrim x) FractionalLit | Unboxed Double |
XLit !(XXLit x) |
data LitNumType #
Numeric literal type
Constructors
LitNumBigNat |
|
LitNumInt |
|
LitNumInt8 |
|
LitNumInt16 |
|
LitNumInt32 |
|
LitNumInt64 |
|
LitNumWord |
|
LitNumWord8 |
|
LitNumWord16 |
|
LitNumWord32 |
|
LitNumWord64 |
|
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
Constructors
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 |
LitNullAddr | The |
LitRubbish TypeOrConstraint RuntimeRepType | A nonsense value; See Note [Rubbish literals]. |
LitFloat Rational |
|
LitDouble Rational |
|
LitLabel FastString (Maybe Int) FunctionOrData | A label literal. Parameters: 1) The name of the symbol mentioned in the declaration 2) The size (in bytes) of the arguments
the label expects. Only applicable with
3) Flag indicating whether the symbol references a function or a data |
Instances
Data Literal | |
Defined in GHC.Types.Literal Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Literal -> c Literal # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Literal # toConstr :: Literal -> Constr # dataTypeOf :: Literal -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Literal) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Literal) # gmapT :: (forall b. Data b => b -> b) -> Literal -> Literal # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Literal -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Literal -> r # gmapQ :: (forall d. Data d => d -> u) -> Literal -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Literal -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Literal -> m Literal # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Literal -> m Literal # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Literal -> m Literal # | |
Binary Literal | |
Outputable Literal | |
Defined in GHC.Types.Literal | |
Eq Literal | |
Ord Literal | Needed for the |
data NormaliseStepResult ev #
The result of stepping in a normalisation function.
See topNormaliseTypeX
.
Constructors
NS_Done | Nothing more to do |
NS_Abort | Utter failure. The outer function should fail too. |
NS_Step RecTcChecker Type ev | We stepped, yielding new bits; ^ ev is evidence; Usually a co :: old type ~ new type |
Instances
Functor NormaliseStepResult | |
Defined in GHC.Core.Coercion Methods fmap :: (a -> b) -> NormaliseStepResult a -> NormaliseStepResult b # (<$) :: a -> NormaliseStepResult b -> NormaliseStepResult a # | |
Outputable ev => Outputable (NormaliseStepResult ev) | |
Defined in GHC.Core.Coercion Methods ppr :: NormaliseStepResult ev -> SDoc # |
type NormaliseStepper ev = RecTcChecker -> TyCon -> [Type] -> NormaliseStepResult ev #
A function to check if we can reduce a type by one step. Used
with topNormaliseTypeX
.
A type for hints emitted by GHC. A hint suggests a possible way to deal with a particular warning or error.
Constructors
(Outputable a, Typeable a) => UnknownHint a | An "unknown" hint. This type constructor allows arbitrary -- hints to be embedded. The typical use case would be GHC plugins -- willing to emit hints alongside their custom diagnostics. |
SuggestExtension !LanguageExtensionHint | Suggests adding a particular language extension. GHC will do its best trying to guess when the user is using the syntax of a particular language extension without having the relevant extension enabled. Example: If the user uses the keyword "mdo" (and we are in a monadic block), but the relevant extension is not enabled, GHC will emit a 'SuggestExtension RecursiveDo'. Test case(s): parsershould_failT12429, parsershould_failT8501c, parsershould_failT18251e, ... (and many more) |
SuggestCorrectPragmaName ![String] | Suggests possible corrections of a misspelled pragma. Its argument represents all applicable suggestions. Example: {-# LNGUAGE BangPatterns #-} Test case(s): parsershould_compileT21589 |
SuggestMissingDo | Suggests that a monadic code block is probably missing a "do" keyword. Example: main = putStrLn "hello" putStrLn "world" Test case(s): parsershould_failT8501a, parsershould_failreadFail007, parsershould_failInfixAppPatErr, parsershould_failT984 |
SuggestLetInDo | Suggests that a "let" expression is needed in a "do" block. Test cases: None (that explicitly test this particular hint is emitted). |
SuggestAddSignatureCabalFile !ModuleName | Suggests to add an ".hsig" signature file to the Cabal manifest. Triggered by: Example: See comment of Test case(s): driver/T12955 |
SuggestSignatureInstantiations !ModuleName [InstantiationSuggestion] | Suggests to explicitly list the instantiations for the signatures in the GHC invocation command. Triggered by: Example: See comment of Test case(s): driver/T12955 |
SuggestUseSpaces | Suggests to use spaces instead of tabs. Triggered by: Examples: None Test Case(s): None |
SuggestUseWhitespaceAfter !OperatorWhitespaceSymbol | Suggests adding a whitespace after the given symbol. Examples: None Test Case(s): parsershould_compileT18834a.hs |
SuggestUseWhitespaceAround !String !OperatorWhitespaceOccurrence | Suggests adding a whitespace around the given operator symbol, as it might be repurposed as special syntax by a future language extension. The second parameter is how such operator occurred, if in a prefix, suffix or tight infix position. Triggered by: Example:
h a b = a+b -- not OK, no spaces around Test Case(s): parsershould_compileT18834b.hs |
SuggestParentheses | Suggests wrapping an expression in parentheses Examples: None Test Case(s): None |
SuggestIncreaseMaxPmCheckModels | Suggests to increase the -fmax-pmcheck-models limit for the pattern match checker. Triggered by: Test case(s): pmcheckshould_compileTooManyDeltas pmcheckshould_compileTooManyDeltas pmcheckshould_compileT11822 |
SuggestAddTypeSignatures AvailableBindings | Suggests adding a type signature, typically to resolve ambiguity or help GHC inferring types. |
SuggestBindToWildcard !(LHsExpr GhcTc) | Suggests to explicitly discard the result of a monadic action by binding the result to the '_' wilcard. Example: main = do _ <- getCurrentTime |
SuggestAddInlineOrNoInlinePragma !Var !Activation | |
SuggestAddPhaseToCompetingRule !RuleName | |
SuggestAddToHSigExportList !Name !(Maybe Module) | Suggests adding an identifier to the export list of a signature. |
SuggestIncreaseSimplifierIterations | Suggests increasing the limit for the number of iterations in the simplifier. |
SuggestUseTypeFromDataKind (Maybe RdrName) | Suggests to explicitly import Triggered by: |
SuggestQualifiedAfterModuleName | Suggests placing the Triggered by: |
SuggestThQuotationSyntax | Suggests using TemplateHaskell quotation syntax. Triggered by: |
SuggestRoles [Role] | Suggests alternative roles in case we found an illegal one. Triggered by: |
SuggestQualifyStarOperator | Suggests qualifying the Triggered by: |
SuggestTypeSignatureForm | Suggests that a type signature should have form variable :: type in order to be accepted by GHC. Triggered by: |
SuggestFixOrphanInstance | Suggests to move an orphan instance or to newtype-wrap it. Triggered by: |
SuggestAddStandaloneDerivation | Suggests to use a standalone deriving declaration when GHC can't derive a typeclass instance in a trivial way. Triggered by: |
SuggestFillInWildcardConstraint | Suggests the user to fill in the wildcard constraint to disambiguate which constraint that is. Example: deriving instance _ => Eq (Foo f a) Triggered by: |
SuggestRenameForall | Suggests to use an identifier other than |
SuggestAppropriateTHTick NameSpace | Suggests to use the appropriate Template Haskell tick:
a single tick for a term-level Triggered by: |
SuggestDumpSlices | Suggests enabling -ddump-splices to help debug an issue
when a Concomitant with |
SuggestAddTick UntickedPromotedThing | Suggests adding a tick to refer to something which has been promoted to the type level, e.g. a data constructor. Test cases: T9778, T19984. |
SuggestMoveToDeclarationSite | Something is split off from its corresponding declaration. For example, a datatype is given a role declaration in a different module. Test cases: T495, T8485, T2713, T5533. |
SuggestSimilarNames RdrName (NonEmpty SimilarName) | Suggest a similar name that the user might have meant,
e.g. suggest Test case: mod73. |
RemindFieldSelectorSuppressed | Remind the user that the field selector has been suppressed because of -XNoFieldSelectors. Test cases: NFSSuppressed, records-nofieldselectors. |
Fields | |
ImportSuggestion ImportSuggestion | Suggest importing from a module, removing a Test cases: mod28, mod36, mod87, mod114, ... |
SuggestImportingDataCon | Suggest importing a data constructor to bring it into scope
Triggered by: Test cases: ccfail004 |
SuggestPlacePragmaInHeader | |
SuggestPatternMatchingSyntax | Suggest using pattern matching syntax for a non-bidirectional pattern synonym Test cases: patsynshould_failrecord-exquant typecheckshould_failT3176 |
SuggestSpecialiseVisibilityHints Name | Suggest tips for making a definition visible for the purpose of writing a SPECIALISE pragma for it in a different module. Test cases: none |
LoopySuperclassSolveHint PredType ClsInstOrQC |
data LanguageExtensionHint #
Constructors
SuggestSingleExtension !SDoc !Extension | Suggest to enable the input extension. This is the hint that
GHC emits if this is not a "known" fix, i.e. this is GHC giving
its best guess on what extension might be necessary to make a
certain program compile. For example, GHC might suggests to
enable |
SuggestAnyExtension !SDoc [Extension] | Suggest to enable the input extensions. The list
is to be intended as disjunctive i.e. the user is
suggested to enable any of the extensions listed. If
the input |
SuggestExtensions !SDoc [Extension] | Suggest to enable the input extensions. The list
is to be intended as conjunctive i.e. the user is
suggested to enable all the extensions listed. If
the input |
SuggestExtensionInOrderTo !SDoc !Extension | Suggest to enable the input extension in order to fix
a certain problem. This is the suggestion that GHC emits when
is more-or-less clear "what's going on". For example, if
both |
data AvailableBindings #
The bindings we have available in scope when suggesting an explicit type signature.
Constructors
NamedBindings (NonEmpty Name) | |
UnnamedBinding | An unknown binding (i.e. too complicated to turn into a |
data DiagnosticCode #
A diagnostic code is a namespaced numeric identifier unique to the given diagnostic (error or warning).
All diagnostic codes defined within GHC are given the GHC namespace.
See Note [Diagnostic codes] in GHC.Types.Error.Codes.
Constructors
DiagnosticCode | |
Fields
|
Instances
Outputable DiagnosticCode | |
Defined in GHC.Types.Error Methods ppr :: DiagnosticCode -> SDoc # |
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
Constructors
SevIgnore | Ignore this message, for example in case of suppression of warnings users don't want to see. See Note [Suppressing Messages] |
SevWarning | |
SevError |
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
.
Constructors
MCOutput | |
MCFatal | |
MCInteractive | |
MCDump | Log message intended for compiler developers No file/line/column stuff |
MCInfo | Log messages intended for end users. No file/line/column stuff. |
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 Methods 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.
Constructors
MsgEnvelope | |
Fields
|
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.
Constructors
WarningWithoutFlag | Born as a warning. |
WarningWithFlag !WarningFlag | Warning was enabled with the flag. |
ErrorWithoutFlag | Born as an error. |
Instances
Show DiagnosticReason | |
Defined in GHC.Types.Error Methods showsPrec :: Int -> DiagnosticReason -> ShowS # show :: DiagnosticReason -> String # showList :: [DiagnosticReason] -> ShowS # | |
Outputable DiagnosticReason | |
Defined in GHC.Types.Error Methods ppr :: DiagnosticReason -> SDoc # | |
Eq DiagnosticReason | |
Defined in GHC.Types.Error Methods (==) :: DiagnosticReason -> DiagnosticReason -> Bool # (/=) :: DiagnosticReason -> DiagnosticReason -> Bool # |
data DiagnosticMessage #
A generic Diagnostic
message, without any further classification or
provenance: By looking at a DiagnosticMessage
we don't know neither
where it was generated nor how to intepret its payload (as it's just a
structured document). All we can do is to print it out and look at its
DiagnosticReason
.
Constructors
DiagnosticMessage | |
Fields
|
Instances
Diagnostic DiagnosticMessage | |
Defined in GHC.Types.Error Associated Types Methods defaultDiagnosticOpts :: DiagnosticOpts DiagnosticMessage # diagnosticMessage :: DiagnosticOpts DiagnosticMessage -> DiagnosticMessage -> DecoratedSDoc # diagnosticReason :: DiagnosticMessage -> DiagnosticReason # diagnosticHints :: DiagnosticMessage -> [GhcHint] # diagnosticCode :: DiagnosticMessage -> Maybe DiagnosticCode # | |
Show (MsgEnvelope DiagnosticMessage) | |
Defined in GHC.Types.Error Methods showsPrec :: Int -> MsgEnvelope DiagnosticMessage -> ShowS # show :: MsgEnvelope DiagnosticMessage -> String # showList :: [MsgEnvelope DiagnosticMessage] -> ShowS # | |
type DiagnosticOpts DiagnosticMessage | |
Defined in GHC.Types.Error |
data DiagnosticHint #
A generic Hint
message, to be used with DiagnosticMessage
.
Constructors
DiagnosticHint !SDoc |
Instances
Outputable DiagnosticHint | |
Defined in GHC.Types.Error Methods ppr :: DiagnosticHint -> SDoc # |
data NoDiagnosticOpts #
Constructors
NoDiagnosticOpts |
data UnknownDiagnostic where #
An existential wrapper around an unknown diagnostic.
Constructors
UnknownDiagnostic :: forall a. (DiagnosticOpts a ~ NoDiagnosticOpts, Diagnostic a, Typeable a) => a -> UnknownDiagnostic |
Instances
Diagnostic UnknownDiagnostic | |
Defined in GHC.Types.Error Associated Types Methods defaultDiagnosticOpts :: DiagnosticOpts UnknownDiagnostic # diagnosticMessage :: DiagnosticOpts UnknownDiagnostic -> UnknownDiagnostic -> DecoratedSDoc # diagnosticReason :: UnknownDiagnostic -> DiagnosticReason # diagnosticHints :: UnknownDiagnostic -> [GhcHint] # diagnosticCode :: UnknownDiagnostic -> Maybe DiagnosticCode # | |
type DiagnosticOpts UnknownDiagnostic | |
Defined in GHC.Types.Error |
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.
Methods
defaultDiagnosticOpts :: DiagnosticOpts a #
diagnosticMessage :: DiagnosticOpts a -> a -> DecoratedSDoc #
Extract the error message text from a Diagnostic
.
diagnosticReason :: a -> DiagnosticReason #
Extract the reason for this diagnostic. For warnings,
a DiagnosticReason
includes the warning flag.
diagnosticHints :: a -> [GhcHint] #
Extract any hints a user might use to repair their code to avoid this diagnostic.
diagnosticCode :: a -> Maybe DiagnosticCode #
Get the DiagnosticCode
associated with this Diagnostic
.
This can return Nothing
for at least two reasons:
- The message might be from a plugin that does not supply codes.
- The message might not yet have been assigned a code. See the
Diagnostic
instance forDiagnosticMessage
.
Ideally, case (2) would not happen, but because some errors in GHC still use the old system of just writing the error message in-place (instead of using a dedicated error type and constructor), we do not have error codes for all errors. #18516 tracks our progress toward this goal.
Instances
Diagnostic DiagnosticMessage | |
Defined in GHC.Types.Error Associated Types Methods defaultDiagnosticOpts :: DiagnosticOpts DiagnosticMessage # diagnosticMessage :: DiagnosticOpts DiagnosticMessage -> DiagnosticMessage -> DecoratedSDoc # diagnosticReason :: DiagnosticMessage -> DiagnosticReason # diagnosticHints :: DiagnosticMessage -> [GhcHint] # diagnosticCode :: DiagnosticMessage -> Maybe DiagnosticCode # | |
Diagnostic UnknownDiagnostic | |
Defined in GHC.Types.Error Associated Types Methods defaultDiagnosticOpts :: DiagnosticOpts UnknownDiagnostic # diagnosticMessage :: DiagnosticOpts UnknownDiagnostic -> UnknownDiagnostic -> DecoratedSDoc # diagnosticReason :: UnknownDiagnostic -> DiagnosticReason # diagnosticHints :: UnknownDiagnostic -> [GhcHint] # diagnosticCode :: UnknownDiagnostic -> Maybe DiagnosticCode # |
type family DiagnosticOpts a #
Type of configuration options for the diagnostic.
Instances
type DiagnosticOpts DriverMessage | |
Defined in GHC.Driver.Errors.Ppr | |
type DiagnosticOpts GhcMessage | |
Defined in GHC.Driver.Errors.Ppr | |
type DiagnosticOpts DsMessage | |
Defined in GHC.HsToCore.Errors.Ppr | |
type DiagnosticOpts PsMessage | |
Defined in GHC.Parser.Errors.Ppr | |
type DiagnosticOpts TcRnMessage | |
Defined in GHC.Tc.Errors.Ppr | |
type DiagnosticOpts DiagnosticMessage | |
Defined in GHC.Types.Error | |
type DiagnosticOpts UnknownDiagnostic | |
Defined in GHC.Types.Error |
data DecoratedSDoc #
A DecoratedSDoc
is isomorphic to a '[SDoc]' but it carries the
invariant that the input '[SDoc]' needs to be rendered decorated into its
final form, where the typical case would be adding bullets between each
elements of the list. The type of decoration depends on the formatting
function used, but in practice GHC uses the formatBulleted
.
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 Methods 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 |
Constructors
DiagOpts | |
Fields
|
Constructors
Instances
Outputable Tick | |
Defined in GHC.Core.Opt.Stats | |
Eq Tick | |
Ord Tick | |
data SimplCount #
data StrictnessMark #
Constructors
MarkedStrict | |
NotMarkedStrict |
Instances
Binary StrictnessMark | |
Defined in GHC.Core.DataCon Methods put_ :: BinHandle -> StrictnessMark -> IO () # put :: BinHandle -> StrictnessMark -> IO (Bin StrictnessMark) # get :: BinHandle -> IO StrictnessMark # | |
Outputable StrictnessMark | |
Defined in GHC.Core.DataCon Methods ppr :: StrictnessMark -> SDoc # | |
Eq StrictnessMark | |
Defined in GHC.Core.DataCon Methods (==) :: StrictnessMark -> StrictnessMark -> Bool # (/=) :: StrictnessMark -> StrictnessMark -> Bool # |
data HsImplBang #
Haskell Implementation Bang
Bangs of data constructor arguments as generated by the compiler after consulting HsSrcBang, flags, etc.
Constructors
HsLazy | Lazy field, or one with an unlifted type |
HsStrict Bool | Strict but not unpacked field True = we could have unpacked, but opted not to because of -O0. See Note [Detecting useless UNPACK pragmas] |
HsUnpack (Maybe Coercion) | Strict and unpacked field co :: arg-ty ~ product-ty HsBang |
Instances
Data HsImplBang | |
Defined in GHC.Core.DataCon Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsImplBang -> c HsImplBang # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HsImplBang # toConstr :: HsImplBang -> Constr # dataTypeOf :: HsImplBang -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c HsImplBang) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HsImplBang) # gmapT :: (forall b. Data b => b -> b) -> HsImplBang -> HsImplBang # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsImplBang -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsImplBang -> r # gmapQ :: (forall d. Data d => d -> u) -> HsImplBang -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsImplBang -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsImplBang -> m HsImplBang # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsImplBang -> m HsImplBang # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsImplBang -> m HsImplBang # | |
Outputable HsImplBang | |
Defined in GHC.Core.DataCon Methods ppr :: HsImplBang -> SDoc # |
Haskell Source Bang
Bangs on data constructor arguments as the user wrote them in the source code.
(HsSrcBang _ SrcUnpack SrcLazy)
and
(HsSrcBang _ SrcUnpack NoSrcStrict)
(without StrictData) makes no sense, we
emit a warning (in checkValidDataCon) and treat it like
(HsSrcBang _ NoSrcUnpack SrcLazy)
Constructors
HsSrcBang SourceText SrcUnpackedness SrcStrictness |
Instances
Data HsSrcBang | |
Defined in GHC.Core.DataCon Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsSrcBang -> c HsSrcBang # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HsSrcBang # toConstr :: HsSrcBang -> Constr # dataTypeOf :: HsSrcBang -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c HsSrcBang) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HsSrcBang) # gmapT :: (forall b. Data b => b -> b) -> HsSrcBang -> HsSrcBang # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsSrcBang -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsSrcBang -> r # gmapQ :: (forall d. Data d => d -> u) -> HsSrcBang -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsSrcBang -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsSrcBang -> m HsSrcBang # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsSrcBang -> m HsSrcBang # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsSrcBang -> m HsSrcBang # | |
Outputable HsSrcBang | |
Defined in GHC.Core.DataCon |
type DataConEnv a = UniqFM DataCon a #
data AmbiguousFieldOcc pass #
Ambiguous Field Occurrence
Represents an *occurrence* of a field that is potentially
ambiguous after the renamer, with the ambiguity resolved by the
typechecker. We always store the RdrName
that the user
originally wrote, and store the selector function after the renamer
(for unambiguous occurrences) or the typechecker (for ambiguous
occurrences).
See Note [HsRecField and HsRecUpdField] in GHC.Hs.Pat. See Note [Located RdrNames] in GHC.Hs.Expr.
Constructors
Unambiguous (XUnambiguous pass) (XRec pass RdrName) | |
Ambiguous (XAmbiguous pass) (XRec pass RdrName) | |
XAmbiguousFieldOcc !(XXAmbiguousFieldOcc pass) |
Instances
type Anno (AmbiguousFieldOcc (GhcPass p)) | |
Defined in GHC.Hs.Type |
type LAmbiguousFieldOcc pass = XRec pass (AmbiguousFieldOcc pass) #
Located Ambiguous Field Occurence
Field Occurrence
Represents an *occurrence* of a field. This may or may not be a
binding occurrence (e.g. this type is used in ConDeclField
and
RecordPatSynField
which bind their fields, but also in
HsRecField
for record construction and patterns, which do not).
We store both the RdrName
the user originally wrote, and after
the renamer we use the extension field to store the selector
function.
Constructors
FieldOcc | |
Fields
| |
XFieldOcc !(XXFieldOcc pass) |
type LHsTypeArg p = HsArg (LHsType p) (LHsKind p) #
Arguments in an expression/type after splitting
data HsConDetails tyarg arg rec #
Describes the arguments to a data constructor. This is a common representation for several constructor-related concepts, including:
- The arguments in a Haskell98-style constructor declaration
(see
HsConDeclH98Details
in GHC.Hs.Decls). - The arguments in constructor patterns in
case
/function definitions (seeHsConPatDetails
in GHC.Hs.Pat). - The left-hand side arguments in a pattern synonym binding
(see
HsPatSynDetails
in GHC.Hs.Binds).
One notable exception is the arguments in a GADT constructor, which uses
a separate data type entirely (see HsConDeclGADTDetails
in
GHC.Hs.Decls). This is because GADT constructors cannot be declared with
infix syntax, unlike the concepts above (#18844).
Instances
(Data tyarg, Data rec, Data arg) => Data (HsConDetails tyarg arg rec) | |
Defined in Language.Haskell.Syntax.Type Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsConDetails tyarg arg rec -> c (HsConDetails tyarg arg rec) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsConDetails tyarg arg rec) # toConstr :: HsConDetails tyarg arg rec -> Constr # dataTypeOf :: HsConDetails tyarg arg rec -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsConDetails tyarg arg rec)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsConDetails tyarg arg rec)) # gmapT :: (forall b. Data b => b -> b) -> HsConDetails tyarg arg rec -> HsConDetails tyarg arg rec # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsConDetails tyarg arg rec -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsConDetails tyarg arg rec -> r # gmapQ :: (forall d. Data d => d -> u) -> HsConDetails tyarg arg rec -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsConDetails tyarg arg rec -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsConDetails tyarg arg rec -> m (HsConDetails tyarg arg rec) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsConDetails tyarg arg rec -> m (HsConDetails tyarg arg rec) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsConDetails tyarg arg rec -> m (HsConDetails tyarg arg rec) # |
data ConDeclField pass #
Constructor Declaration Field
Constructors
ConDeclField | |
Fields
| |
XConDeclField !(XXConDeclField pass) |
Instances
type Anno (ConDeclField (GhcPass p)) | |
Defined in GHC.Hs.Type | |
type Anno [LocatedA (ConDeclField (GhcPass _1))] | |
Defined in GHC.Hs.Decls |
type LConDeclField pass #
Arguments
= XRec pass (ConDeclField pass) | May have |
Located Constructor Declaration Field
data HsTupleSort #
Haskell Tuple Sort
Constructors
HsUnboxedTuple | |
HsBoxedOrConstraintTuple |
Instances
Data HsTupleSort | |
Defined in Language.Haskell.Syntax.Type Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsTupleSort -> c HsTupleSort # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HsTupleSort # toConstr :: HsTupleSort -> Constr # dataTypeOf :: HsTupleSort -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c HsTupleSort) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HsTupleSort) # gmapT :: (forall b. Data b => b -> b) -> HsTupleSort -> HsTupleSort # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsTupleSort -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsTupleSort -> r # gmapQ :: (forall d. Data d => d -> u) -> HsTupleSort -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsTupleSort -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsTupleSort -> m HsTupleSort # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsTupleSort -> m HsTupleSort # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsTupleSort -> m HsTupleSort # |
This is used in the syntax. In constructor declaration. It must keep the arrow representation.
data HsLinearArrowTokens pass #
Constructors
HsPct1 !(LHsToken "%1" pass) !(LHsUniToken "->" "\8594" pass) | |
HsLolly !(LHsToken "\8888" pass) |
Denotes the type of arrows in the surface language
Constructors
HsUnrestrictedArrow !(LHsUniToken "->" "\8594" pass) | a -> b or a → b |
HsLinearArrow !(HsLinearArrowTokens pass) | a %1 -> b or a %1 → b, or a ⊸ b |
HsExplicitMult !(LHsToken "%" pass) !(LHsType pass) !(LHsUniToken "->" "\8594" pass) | a %m -> b or a %m → b (very much including `a %Many -> b`!
This is how the programmer wrote it). It is stored as an
|
Haskell Type Literal
Haskell Type
Constructors
Instances
DisambTD (HsType GhcPs) | |
Defined in GHC.Parser.PostProcess Methods mkHsAppTyHeadPV :: LHsType GhcPs -> PV (LocatedA (HsType GhcPs)) # mkHsAppTyPV :: LocatedA (HsType GhcPs) -> LHsType GhcPs -> PV (LocatedA (HsType GhcPs)) # mkHsAppKindTyPV :: LocatedA (HsType GhcPs) -> SrcSpan -> LHsType GhcPs -> PV (LocatedA (HsType GhcPs)) # mkHsOpTyPV :: 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.
Constructors
UserTyVar (XUserTyVar pass) flag (LIdP pass) | |
KindedTyVar (XKindedTyVar pass) flag (LIdP pass) (LHsKind pass) | |
XTyVarBndr !(XXTyVarBndr pass) |
Instances
type Anno (HsTyVarBndr _flag (GhcPass _1)) | |
Defined in GHC.Hs.Type | |
type Anno (HsTyVarBndr _flag GhcPs) | |
Defined in GHC.Hs.Type | |
type Anno (HsTyVarBndr _flag GhcRn) | |
Defined in GHC.Hs.Type | |
type Anno (HsTyVarBndr _flag GhcTc) | |
Defined in GHC.Hs.Type |
These names are used early on to store the names of implicit parameters. They completely disappear after type-checking.
Constructors
HsIPName FastString |
Instances
Data HsIPName | |
Defined in Language.Haskell.Syntax.Type Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsIPName -> c HsIPName # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HsIPName # toConstr :: HsIPName -> Constr # dataTypeOf :: HsIPName -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c HsIPName) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HsIPName) # gmapT :: (forall b. Data b => b -> b) -> HsIPName -> HsIPName # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsIPName -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsIPName -> r # gmapQ :: (forall d. Data d => d -> u) -> HsIPName -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsIPName -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsIPName -> m HsIPName # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsIPName -> m HsIPName # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsIPName -> m HsIPName # | |
Eq HsIPName | |
type Anno HsIPName | |
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]
.
Constructors
HsSig | |
XHsSigType !(XXHsSigType pass) |
Instances
type Anno (HsSigType (GhcPass p)) | |
Defined in GHC.Hs.Type |
type LHsSigWcType pass = HsWildCardBndrs pass (LHsSigType pass) #
Located Haskell Signature Wildcard Type
type LHsWcType pass = HsWildCardBndrs pass (LHsType pass) #
Located Haskell Wildcard Type
type LHsSigType pass = XRec pass (HsSigType pass) #
Located Haskell Signature Type
data HsPatSigType pass #
Types that can appear in pattern signatures, as well as the signatures for
term-level binders in RULES.
See Note [Pattern signature binders and scoping]
.
This is very similar to HsSigWcType
, but with
slightly different semantics: see Note [HsType binders]
.
See also Note [The wildcard story for types]
.
Constructors
HsPS | |
XHsPatSigType !(XXHsPatSigType pass) |
data HsWildCardBndrs pass thing #
Haskell Wildcard Binders
Constructors
HsWC | |
XHsWildCardBndrs !(XXHsWildCardBndrs pass thing) |
type HsOuterFamEqnTyVarBndrs = HsOuterTyVarBndrs () #
Used for type-family instance equations, e.g.,
type instance forall a. F [a] = Tree a
The notion of specificity is irrelevant in type family equations, so we use
()
for the HsOuterTyVarBndrs
flag
.
type HsOuterSigTyVarBndrs = HsOuterTyVarBndrs Specificity #
Used for signatures, e.g.,
f :: forall a {b}. blah
We use Specificity
for the HsOuterTyVarBndrs
flag
to allow
distinguishing between specified and inferred type variables.
data HsOuterTyVarBndrs flag pass #
The outermost type variables in a type that obeys the forall
-or-nothing
rule. See Note [forall-or-nothing rule]
.
Constructors
HsOuterImplicit | Implicit forall, e.g.,
|
Fields
| |
HsOuterExplicit | Explicit forall, e.g.,
|
Fields
| |
XHsOuterTyVarBndrs !(XXHsOuterTyVarBndrs pass) |
Instances
type Anno (HsOuterTyVarBndrs _1 (GhcPass _2)) | |
Defined in GHC.Hs.Type |
data LHsQTyVars pass #
Located Haskell Quantified Type Variables
Constructors
HsQTvs | |
Fields
| |
XLHsQTyVars !(XXLHsQTyVars pass) |
type LHsTyVarBndr flag pass = XRec pass (HsTyVarBndr flag pass) #
Located Haskell Type Variable Binder
data HsForAllTelescope pass #
The type variable binders in an HsForAllTy
.
See also Note [Variable Specificity and Forall Visibility]
in
GHC.Tc.Gen.HsType.
Constructors
HsForAllVis | A visible |
Fields
| |
HsForAllInvis | An invisible |
Fields
| |
XHsForAllTelescope !(XXHsForAllTelescope pass) |
Arguments
= XRec pass (HsType pass) | May have |
Located Haskell Type
type LHsContext pass #
Arguments
= XRec pass (HsContext pass) |
|
Located Haskell Context
data HsFieldBind lhs rhs #
Haskell Field Binding
For details on above see Note [exact print annotations] in GHC.Parser.Annotation
Constructors
HsFieldBind | |
Instances
Foldable (HsFieldBind lhs) | |
Defined in Language.Haskell.Syntax.Pat Methods fold :: Monoid m => HsFieldBind lhs m -> m # foldMap :: Monoid m => (a -> m) -> HsFieldBind lhs a -> m # foldMap' :: Monoid m => (a -> m) -> HsFieldBind lhs a -> m # foldr :: (a -> b -> b) -> b -> HsFieldBind lhs a -> b # foldr' :: (a -> b -> b) -> b -> HsFieldBind lhs a -> b # foldl :: (b -> a -> b) -> b -> HsFieldBind lhs a -> b # foldl' :: (b -> a -> b) -> b -> HsFieldBind lhs a -> b # foldr1 :: (a -> a -> a) -> HsFieldBind lhs a -> a # foldl1 :: (a -> a -> a) -> HsFieldBind lhs a -> a # toList :: HsFieldBind lhs a -> [a] # null :: HsFieldBind lhs a -> Bool # length :: HsFieldBind lhs a -> Int # elem :: Eq a => a -> HsFieldBind lhs a -> Bool # maximum :: Ord a => HsFieldBind lhs a -> a # minimum :: Ord a => HsFieldBind lhs a -> a # sum :: Num a => HsFieldBind lhs a -> a # product :: Num a => HsFieldBind lhs a -> a # | |
Traversable (HsFieldBind lhs) | |
Defined in Language.Haskell.Syntax.Pat Methods traverse :: Applicative f => (a -> f b) -> HsFieldBind lhs a -> f (HsFieldBind lhs b) # sequenceA :: Applicative f => HsFieldBind lhs (f a) -> f (HsFieldBind lhs a) # mapM :: Monad m => (a -> m b) -> HsFieldBind lhs a -> m (HsFieldBind lhs b) # sequence :: Monad m => HsFieldBind lhs (m a) -> m (HsFieldBind lhs a) # | |
Functor (HsFieldBind lhs) | |
Defined in Language.Haskell.Syntax.Pat Methods fmap :: (a -> b) -> HsFieldBind lhs a -> HsFieldBind lhs b # (<$) :: a -> HsFieldBind lhs b -> HsFieldBind lhs a # | |
type Anno (HsFieldBind lhs rhs) | |
Defined in GHC.Hs.Pat |
type HsRecUpdField p = HsFieldBind (LAmbiguousFieldOcc p) (LHsExpr p) #
Haskell Record Update Field
type HsRecField p arg = HsFieldBind (LFieldOcc p) arg #
Haskell Record Field
type LHsRecUpdField p = XRec p (HsRecUpdField p) #
Located Haskell Record Update Field
type LHsRecField p arg = XRec p (HsRecField p arg) #
Located Haskell Record Field
type LHsFieldBind p id arg = XRec p (HsFieldBind id arg) #
Located Haskell Record Field
newtype RecFieldsDotDot #
Newtype to be able to have a specific XRec instance for the Int in rec_dotdot
Constructors
RecFieldsDotDot | |
Fields |
Instances
data HsRecFields p arg #
Haskell Record Fields
HsRecFields is used only for patterns and expressions (not data type declarations)
Constructors
HsRecFields | |
Fields
|
type HsConPatDetails p = HsConDetails (HsConPatTyArg (NoGhcTc p)) (LPat p) (HsRecFields p (LPat p)) #
Haskell Constructor Pattern Details
data HsConPatTyArg p #
Type argument in a data constructor pattern,
e.g. the @a
in f (Just @a x) = ...
.
Constructors
HsConPatTyArg !(LHsToken "@" p) (HsPatSigType p) |
data HsPatSynDir id #
Haskell Pattern Synonym Direction
Constructors
Unidirectional | |
ImplicitBidirectional | |
ExplicitBidirectional (MatchGroup id (LHsExpr id)) |
data RecordPatSynField pass #
Record Pattern Synonym Field
Constructors
RecordPatSynField | |
Fields
|
type HsPatSynDetails pass = HsConDetails Void (LIdP pass) [RecordPatSynField pass] #
Haskell Pattern Synonym Details
Fixity Signature
Constructors
FixitySig (XFixitySig pass) [LIdP pass] Fixity | |
XFixitySig !(XXFixitySig pass) |
Instances
type Anno (FixitySig (GhcPass p)) | |
Defined in GHC.Hs.Binds |
type LFixitySig pass = XRec pass (FixitySig pass) #
Located Fixity Signature
Signatures and pragmas
Constructors
TypeSig (XTypeSig pass) [LIdP pass] (LHsSigWcType pass) | An ordinary type signature f :: Num a => a -> a After renaming, this list of Names contains the named
wildcards brought into scope by this signature. For a signature
|
PatSynSig (XPatSynSig pass) [LIdP pass] (LHsSigType pass) | A pattern synonym type signature pattern Single :: () => (Show a) => a -> [a] |
ClassOpSig (XClassOpSig pass) Bool [LIdP pass] (LHsSigType pass) | A signature for a class method False: ordinary class-method signature True: generic-default class method signature e.g. class C a where op :: a -> a -- Ordinary default op :: Eq a => a -> a -- Generic default No wildcards allowed here |
FixSig (XFixSig pass) (FixitySig pass) | An ordinary fixity declaration infixl 8 *** |
InlineSig (XInlineSig pass) (LIdP pass) InlinePragma | An inline pragma {#- INLINE f #-} |
SpecSig (XSpecSig pass) (LIdP pass) [LHsSigType pass] InlinePragma | A specialisation pragma {-# SPECIALISE f :: Int -> Int #-} |
SpecInstSig (XSpecInstSig pass) (LHsSigType pass) | A specialisation pragma for instance declarations only {-# SPECIALISE instance Eq [Int] #-} (Class tys); should be a specialisation of the current instance declaration |
MinimalSig (XMinimalSig pass) (LBooleanFormula (LIdP pass)) | A minimal complete definition pragma {-# MINIMAL a | (b, c | (d | e)) #-} |
SCCFunSig (XSCCFunSig pass) (LIdP pass) (Maybe (XRec pass StringLiteral)) | A "set cost centre" pragma for declarations {-# SCC funName #-} or {-# SCC funName "cost_centre_name" #-} |
CompleteMatchSig (XCompleteMatchSig pass) (XRec pass [LIdP pass]) (Maybe (LIdP pass)) | A complete match pragma {-# COMPLETE C, D [:: T] #-} Used to inform the pattern match checker about additional complete matchings which, for example, arise from pattern synonym definitions. |
XSig !(XXSig pass) |
Instances
type Anno (Sig (GhcPass p)) | |
Defined in GHC.Hs.Binds |
Implicit parameter bindings.
Instances
type Anno (IPBind (GhcPass p)) | |
Defined in GHC.Hs.Binds |
type LIPBind id = XRec id (IPBind id) #
Located Implicit Parameter Binding
May have AnnKeywordId
: AnnSemi
when in a
list
Haskell Implicit Parameter Bindings
Constructors
IPBinds (XIPBinds id) [LIPBind id] | |
XHsIPBinds !(XXHsIPBinds id) |
data PatSynBind idL idR #
AnnKeywordId
:AnnPattern
,AnnEqual
,AnnLarrow
,AnnWhere
,AnnOpen
'{'
,AnnClose
'}'
,
Pattern Synonym binding
Constructors
PSB | |
Fields
| |
XPatSynBind !(XXPatSynBind idL idR) |
Haskell Binding with separate Left and Right id's
Constructors
FunBind | Function-like Binding FunBind is used for both functions Reason 1: Special case for type inference: see Reason 2: Instance decls can only have FunBinds, which is convenient. If you change this, you'll need to change e.g. rnMethodBinds But note that the form Strict bindings have their strictness recorded in the |
Fields
| |
PatBind | Pattern Binding The pattern is never a simple variable; That case is done by FunBind. See Note [FunBind vs PatBind] for details about the relationship between FunBind and PatBind. |
VarBind | Variable Binding Dictionary binding and suchlike. All VarBinds are introduced by the type checker |
PatSynBind | Patterns Synonym Binding |
Fields
| |
XHsBindsLR !(XXHsBindsLR idL idR) |
Instances
type Anno (HsBindLR (GhcPass idL) (GhcPass idR)) | |
Defined in GHC.Hs.Binds |
type LHsBindLR idL idR = XRec idL (HsBindLR idL idR) #
Located Haskell Binding with separate Left and Right identifier types
type LHsBindsLR idL idR = Bag (LHsBindLR idL idR) #
Located Haskell Bindings with separate Left and Right identifier types
type LHsBinds id = LHsBindsLR id id #
Located Haskell Bindings
data HsValBindsLR idL idR #
Haskell Value bindings with separate Left and Right identifier types (not implicit parameters) Used for both top level and nested bindings May contain pattern synonym bindings
Constructors
ValBinds (XValBinds idL idR) (LHsBindsLR idL idR) [LSig idR] | Value Bindings In Before renaming RHS; idR is always RdrName Not dependency analysed Recursive by default |
XValBindsLR !(XXValBindsLR idL idR) | Value Bindings Out After renaming RHS; idR can be Name or Id Dependency analysed, later bindings in the list may depend on earlier ones. |
type HsValBinds id = HsValBindsLR id id #
Haskell Value Bindings
type LHsLocalBindsLR idL idR = XRec idL (HsLocalBindsLR idL idR) #
data HsLocalBindsLR idL idR #
Haskell Local Bindings with separate Left and Right identifier types
Bindings in a 'let' expression or a 'where' clause
Constructors
HsValBinds (XHsValBinds idL idR) (HsValBindsLR idL idR) | Haskell Value Bindings |
HsIPBinds (XHsIPBinds idL idR) (HsIPBinds idR) | Haskell Implicit Parameter Bindings |
EmptyLocalBinds (XEmptyLocalBinds idL idR) | Empty Local Bindings |
XHsLocalBindsLR !(XXHsLocalBindsLR idL idR) |
type LHsLocalBinds id = XRec id (HsLocalBinds id) #
Located Haskell local bindings
type HsLocalBinds id = HsLocalBindsLR id id #
Haskell Local Bindings
data RoleAnnotDecl pass #
Role Annotation Declaration
Constructors
RoleAnnotDecl (XCRoleAnnotDecl pass) (LIdP pass) [XRec pass (Maybe Role)] | |
XRoleAnnotDecl !(XXRoleAnnotDecl pass) |
Instances
type Anno (RoleAnnotDecl (GhcPass p)) | |
Defined in GHC.Hs.Decls |
type LRoleAnnotDecl pass = XRec pass (RoleAnnotDecl pass) #
Located Role Annotation Declaration
data AnnProvenance pass #
Annotation Provenance
Constructors
ValueAnnProvenance (LIdP pass) | |
TypeAnnProvenance (LIdP pass) | |
ModuleAnnProvenance |
Warning pragma Declaration
Constructors
Warning (XWarning pass) [LIdP pass] (WarningTxt pass) | |
XWarnDecl !(XXWarnDecl pass) |
Instances
type Anno (WarnDecl (GhcPass p)) | |
Defined in GHC.Hs.Decls |
Warning pragma Declarations
Constructors
Warnings | |
Fields
| |
XWarnDecls !(XXWarnDecls pass) |
Instances
type Anno (WarnDecls (GhcPass p)) | |
Defined in GHC.Hs.Decls |
type LWarnDecls pass = XRec pass (WarnDecls pass) #
Located Warning Declarations
Documentation comment Declaration
Constructors
DocCommentNext (LHsDoc pass) | |
DocCommentPrev (LHsDoc pass) | |
DocCommentNamed String (LHsDoc pass) | |
DocGroup Int (LHsDoc pass) |
Instances
(Data pass, Data (IdP pass)) => Data (DocDecl pass) | |
Defined in Language.Haskell.Syntax.Decls Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DocDecl pass -> c (DocDecl pass) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (DocDecl pass) # toConstr :: DocDecl pass -> Constr # dataTypeOf :: DocDecl pass -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (DocDecl pass)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (DocDecl pass)) # gmapT :: (forall b. Data b => b -> b) -> DocDecl pass -> DocDecl pass # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DocDecl pass -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DocDecl pass -> r # gmapQ :: (forall d. Data d => d -> u) -> DocDecl pass -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> DocDecl pass -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> DocDecl pass -> m (DocDecl pass) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DocDecl pass -> m (DocDecl pass) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DocDecl pass -> m (DocDecl pass) # | |
type Anno (DocDecl (GhcPass p)) | |
Defined in GHC.Hs.Decls |
Rule Binder
Constructors
RuleBndr (XCRuleBndr pass) (LIdP pass) | |
RuleBndrSig (XRuleBndrSig pass) (LIdP pass) (HsPatSigType pass) | |
XRuleBndr !(XXRuleBndr pass) |
Rule Declaration
Constructors
HsRule | |
Fields
| |
XRuleDecl !(XXRuleDecl pass) |
Instances
type Anno (RuleDecl (GhcPass p)) | |
Defined in GHC.Hs.Decls |
Rule Declarations
Constructors
HsRules | |
Fields
| |
XRuleDecls !(XXRuleDecls pass) |
Instances
type Anno (RuleDecls (GhcPass p)) | |
Defined in GHC.Hs.Decls |
type LRuleDecls pass = XRec pass (RuleDecls pass) #
Located Rule Declarations
data ForeignExport pass #
Constructors
CExport (XCExport pass) (XRec pass CExportSpec) | |
XForeignExport !(XXForeignExport pass) |
data CImportSpec #
Constructors
CLabel CLabelString | |
CFunction CCallTarget | |
CWrapper |
Instances
Data CImportSpec | |
Defined in Language.Haskell.Syntax.Decls Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CImportSpec -> c CImportSpec # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CImportSpec # toConstr :: CImportSpec -> Constr # dataTypeOf :: CImportSpec -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c CImportSpec) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CImportSpec) # gmapT :: (forall b. Data b => b -> b) -> CImportSpec -> CImportSpec # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CImportSpec -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CImportSpec -> r # gmapQ :: (forall d. Data d => d -> u) -> CImportSpec -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> CImportSpec -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> CImportSpec -> m CImportSpec # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CImportSpec -> m CImportSpec # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CImportSpec -> m CImportSpec # |
data ForeignImport pass #
Constructors
CImport (XCImport pass) (XRec pass CCallConv) (XRec pass Safety) (Maybe Header) CImportSpec | |
XForeignImport !(XXForeignImport pass) |
data ForeignDecl pass #
Foreign Declaration
Constructors
ForeignImport | |
Fields
| |
ForeignExport | |
Fields
| |
XForeignDecl !(XXForeignDecl pass) |
Instances
type Anno (ForeignDecl (GhcPass p)) | |
Defined in GHC.Hs.Decls |
type LForeignDecl pass = XRec pass (ForeignDecl pass) #
Located Foreign Declaration
data DefaultDecl pass #
Default Declaration
Constructors
DefaultDecl (XCDefaultDecl pass) [LHsType pass] | |
XDefaultDecl !(XXDefaultDecl pass) |
Instances
type Anno (DefaultDecl (GhcPass p)) | |
Defined in GHC.Hs.Decls |
type LDefaultDecl pass = XRec pass (DefaultDecl pass) #
Located Default Declaration
data DerivStrategy pass #
Which technique the user explicitly requested when deriving an instance.
Constructors
StockStrategy (XStockStrategy pass) | GHC's "standard" strategy, which is to implement a
custom instance for the data type. This only works
for certain types that GHC knows about (e.g., |
AnyclassStrategy (XAnyClassStrategy pass) | -XDeriveAnyClass |
NewtypeStrategy (XNewtypeStrategy pass) | -XGeneralizedNewtypeDeriving |
ViaStrategy (XViaStrategy pass) | -XDerivingVia |
Instances
type Anno (DerivStrategy (GhcPass p)) | |
Defined in GHC.Hs.Decls |
type LDerivStrategy pass = XRec pass (DerivStrategy pass) #
A Located
DerivStrategy
.
Stand-alone 'deriving instance' declaration
Constructors
DerivDecl | |
Fields
| |
XDerivDecl !(XXDerivDecl pass) |
Instances
type Anno (DerivDecl (GhcPass p)) | |
Defined in GHC.Hs.Decls |
type LDerivDecl pass = XRec pass (DerivDecl pass) #
Located stand-alone 'deriving instance' declaration
Instance Declaration
Constructors
ClsInstD | |
Fields
| |
DataFamInstD | |
Fields
| |
TyFamInstD | |
Fields
| |
XInstDecl !(XXInstDecl pass) |
Instances
type Anno (InstDecl (GhcPass p)) | |
Defined in GHC.Hs.Decls |
data ClsInstDecl pass #
Class Instance Declaration
- AnnKeywordId
: AnnInstance
,
AnnWhere
,
AnnOpen
,AnnClose
,
For details on above see Note [exact print annotations] in GHC.Parser.Annotation
Constructors
ClsInstDecl | |
Fields
| |
XClsInstDecl !(XXClsInstDecl pass) |
Instances
type Anno (ClsInstDecl (GhcPass p)) | |
Defined in GHC.Hs.Decls |
type LClsInstDecl pass = XRec pass (ClsInstDecl pass) #
Located Class Instance Declaration
Family Equation
One equation in a type family instance declaration, data family instance declaration, or type family default. See Note [Type family instance declarations in HsSyn] See Note [Family instance declaration binders]
Constructors
FamEqn | |
Fields
| |
XFamEqn !(XXFamEqn pass rhs) |
Instances
type Anno (FamEqn (GhcPass p) _1) | |
Defined in GHC.Hs.Decls | |
type Anno (FamEqn (GhcPass p) _1) | |
Defined in GHC.Hs.Decls | |
type Anno (FamEqn p (LocatedA (HsType p))) | |
Defined in GHC.Hs.Decls |
newtype DataFamInstDecl pass #
Data Family Instance Declaration
Constructors
DataFamInstDecl | |
Fields
|
Instances
type Anno (DataFamInstDecl (GhcPass p)) | |
Defined in GHC.Hs.Decls |
type LDataFamInstDecl pass = XRec pass (DataFamInstDecl pass) #
Located Data Family Instance Declaration
data TyFamInstDecl pass #
Type Family Instance Declaration
Constructors
TyFamInstDecl | |
Fields
| |
XTyFamInstDecl !(XXTyFamInstDecl pass) |
Instances
type Anno (TyFamInstDecl (GhcPass p)) | |
Defined in GHC.Hs.Decls |
type LTyFamInstDecl pass = XRec pass (TyFamInstDecl pass) #
Located Type Family Instance Declaration
type LTyFamDefltDecl pass = XRec pass (TyFamDefltDecl pass) #
Located type family default declarations.
type TyFamDefltDecl = TyFamInstDecl #
Type family default declarations.
A convenient synonym for TyFamInstDecl
.
See Note [Type family instance declarations in HsSyn]
.
type TyFamInstEqn pass = FamEqn pass (LHsType pass) #
Type Family Instance Equation
type HsTyPats pass = [LHsTypeArg pass] #
Haskell Type Patterns
type LTyFamInstEqn pass #
Arguments
= XRec pass (TyFamInstEqn pass) | May have |
Located Type Family Instance Equation
data HsConDeclGADTDetails pass #
The arguments in a GADT constructor. Unlike Haskell98-style constructors,
GADT constructors cannot be declared with infix syntax. As a result, we do
not use HsConDetails
here, as InfixCon
would be an unrepresentable
state. (There is a notion of infix GADT constructors for the purposes of
derived Show instances—see Note [Infix GADT constructors] in
GHC.Tc.TyCl—but that is an orthogonal concern.)
Constructors
PrefixConGADT [HsScaled pass (LBangType pass)] | |
RecConGADT (XRec pass [LConDeclField pass]) (LHsUniToken "->" "\8594" pass) |
type HsConDeclH98Details pass = HsConDetails Void (HsScaled pass (LBangType pass)) (XRec pass [LConDeclField pass]) #
The arguments in a Haskell98-style data constructor.
data T b = forall a. Eq a => MkT a b MkT :: forall b a. Eq a => MkT a b data T b where MkT1 :: Int -> T Int data T = IntMkT
Int | MkT2 data T a where IntMkT
Int :: T Int
AnnKeywordId
s :AnnOpen
,AnnDotdot
,AnnCLose
,AnnEqual
,AnnVbar
,AnnDarrow
,AnnDarrow
,AnnForall
,AnnDot
data Constructor Declaration
Constructors
ConDeclGADT | |
Fields
| |
ConDeclH98 | |
Fields
| |
XConDecl !(XXConDecl pass) |
Instances
type Anno (ConDecl (GhcPass p)) | |
Defined in GHC.Hs.Decls |
Arguments
= XRec pass (ConDecl pass) | May have |
Located data Constructor Declaration
data DataDefnCons a #
Whether a data-type declaration is data
or newtype
, and its constructors.
Constructors
NewTypeCon a | |
DataTypeCons Bool [a] |
Instances
Foldable DataDefnCons | |
Defined in Language.Haskell.Syntax.Decls Methods fold :: Monoid m => DataDefnCons m -> m # foldMap :: Monoid m => (a -> m) -> DataDefnCons a -> m # foldMap' :: Monoid m => (a -> m) -> DataDefnCons a -> m # foldr :: (a -> b -> b) -> b -> DataDefnCons a -> b # foldr' :: (a -> b -> b) -> b -> DataDefnCons a -> b # foldl :: (b -> a -> b) -> b -> DataDefnCons a -> b # foldl' :: (b -> a -> b) -> b -> DataDefnCons a -> b # foldr1 :: (a -> a -> a) -> DataDefnCons a -> a # foldl1 :: (a -> a -> a) -> DataDefnCons a -> a # toList :: DataDefnCons a -> [a] # null :: DataDefnCons a -> Bool # length :: DataDefnCons a -> Int # elem :: Eq a => a -> DataDefnCons a -> Bool # maximum :: Ord a => DataDefnCons a -> a # minimum :: Ord a => DataDefnCons a -> a # sum :: Num a => DataDefnCons a -> a # product :: Num a => DataDefnCons a -> a # | |
Traversable DataDefnCons | |
Defined in Language.Haskell.Syntax.Decls Methods traverse :: Applicative f => (a -> f b) -> DataDefnCons a -> f (DataDefnCons b) # sequenceA :: Applicative f => DataDefnCons (f a) -> f (DataDefnCons a) # mapM :: Monad m => (a -> m b) -> DataDefnCons a -> m (DataDefnCons b) # sequence :: Monad m => DataDefnCons (m a) -> m (DataDefnCons a) # | |
Functor DataDefnCons | |
Defined in Language.Haskell.Syntax.Decls Methods fmap :: (a -> b) -> DataDefnCons a -> DataDefnCons b # (<$) :: a -> DataDefnCons b -> DataDefnCons a # | |
Data a => Data (DataDefnCons a) | |
Defined in Language.Haskell.Syntax.Decls Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DataDefnCons a -> c (DataDefnCons a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (DataDefnCons a) # toConstr :: DataDefnCons a -> Constr # dataTypeOf :: DataDefnCons a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (DataDefnCons a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (DataDefnCons a)) # gmapT :: (forall b. Data b => b -> b) -> DataDefnCons a -> DataDefnCons a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DataDefnCons a -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DataDefnCons a -> r # gmapQ :: (forall d. Data d => d -> u) -> DataDefnCons a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> DataDefnCons a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> DataDefnCons a -> m (DataDefnCons a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DataDefnCons a -> m (DataDefnCons a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DataDefnCons a -> m (DataDefnCons a) # | |
Eq a => Eq (DataDefnCons a) | |
Defined in Language.Haskell.Syntax.Decls Methods (==) :: DataDefnCons a -> DataDefnCons a -> Bool # (/=) :: DataDefnCons a -> DataDefnCons a -> Bool # |
When we only care whether a data-type declaration is `data` or `newtype`, but not what constructors it has
Instances
Data NewOrData | |
Defined in Language.Haskell.Syntax.Decls Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> NewOrData -> c NewOrData # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c NewOrData # toConstr :: NewOrData -> Constr # dataTypeOf :: NewOrData -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c NewOrData) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NewOrData) # gmapT :: (forall b. Data b => b -> b) -> NewOrData -> NewOrData # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NewOrData -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NewOrData -> r # gmapQ :: (forall d. Data d => d -> u) -> NewOrData -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> NewOrData -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> NewOrData -> m NewOrData # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> NewOrData -> m NewOrData # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> NewOrData -> m NewOrData # | |
Eq NewOrData | |
data StandaloneKindSig pass #
Constructors
StandaloneKindSig (XStandaloneKindSig pass) (LIdP pass) (LHsSigType pass) | |
XStandaloneKindSig !(XXStandaloneKindSig pass) |
Instances
type Anno (StandaloneKindSig (GhcPass p)) | |
Defined in GHC.Hs.Decls |
type LStandaloneKindSig pass = XRec pass (StandaloneKindSig pass) #
Located Standalone Kind Signature
data DerivClauseTys pass #
The types mentioned in a single deriving
clause. This can come in two
forms, DctSingle
or DctMulti
, depending on whether the types are
surrounded by enclosing parentheses or not. These parentheses are
semantically different than HsParTy
. For example, deriving ()
means
"derive zero classes" rather than "derive an instance of the 0-tuple".
DerivClauseTys
use LHsSigType
because deriving
clauses can mention
type variables that aren't bound by the datatype, e.g.
data T b = ... deriving (C [a])
should produce a derived instance for C [a] (T b)
.
Constructors
DctSingle (XDctSingle pass) (LHsSigType pass) | A Example: |
DctMulti (XDctMulti pass) [LHsSigType pass] | A Example: |
XDerivClauseTys !(XXDerivClauseTys pass) |
Instances
type Anno (DerivClauseTys (GhcPass _1)) | |
Defined in GHC.Hs.Decls |
type LDerivClauseTys pass = XRec pass (DerivClauseTys pass) #
data HsDerivingClause pass #
A single deriving
clause of a data declaration.
Constructors
HsDerivingClause | |
Fields
| |
XHsDerivingClause !(XXHsDerivingClause pass) |
Instances
type Anno (HsDerivingClause (GhcPass p)) | |
Defined in GHC.Hs.Decls |
type LHsDerivingClause pass = XRec pass (HsDerivingClause pass) #
type HsDeriving pass #
Arguments
= [LHsDerivingClause pass] | The optional The list of |
Haskell Deriving clause
data HsDataDefn pass #
Haskell Data type Definition
Constructors
HsDataDefn | Declares a data type or newtype, giving its constructors
|
Fields
| |
XHsDataDefn !(XXHsDataDefn pass) |
data FamilyInfo pass #
Constructors
DataFamily | |
OpenTypeFamily | |
ClosedTypeFamily (Maybe [LTyFamInstEqn pass]) |
|
data InjectivityAnn pass #
If the user supplied an injectivity annotation it is represented using InjectivityAnn. At the moment this is a single injectivity condition - see Note [Injectivity annotation]. `Located name` stores the LHS of injectivity condition. `[Located name]` stores the RHS of injectivity condition. Example:
type family Foo a b c = r | r -> a c where ...
This will be represented as "InjectivityAnn r
[a
, c
]"
Constructors
InjectivityAnn (XCInjectivityAnn pass) (LIdP pass) [LIdP pass] | |
XInjectivityAnn !(XXInjectivityAnn pass) |
Instances
type Anno (InjectivityAnn (GhcPass p)) | |
Defined in GHC.Hs.Decls |
type LInjectivityAnn pass = XRec pass (InjectivityAnn pass) #
Located Injectivity Annotation
data FamilyDecl pass #
type Family Declaration
Constructors
FamilyDecl | |
Fields
| |
XFamilyDecl !(XXFamilyDecl pass) |
Instances
type Anno (FamilyDecl (GhcPass p)) | |
Defined in GHC.Hs.Decls |
type LFamilyDecl pass = XRec pass (FamilyDecl pass) #
Located type Family Declaration
data FamilyResultSig pass #
type Family Result Signature
Constructors
NoSig (XNoSig pass) | |
KindSig (XCKindSig pass) (LHsKind pass) | |
TyVarSig (XTyVarSig pass) (LHsTyVarBndr () pass) | |
XFamilyResultSig !(XXFamilyResultSig pass) |
Instances
type Anno (FamilyResultSig (GhcPass p)) | |
Defined in GHC.Hs.Decls |
type LFamilyResultSig pass = XRec pass (FamilyResultSig pass) #
Located type Family Result Signature
Type or Class Group
Constructors
TyClGroup | |
Fields
| |
XTyClGroup !(XXTyClGroup pass) |
A type or class declaration.
Constructors
FamDecl | type/data family T :: *->* |
Fields
| |
SynDecl |
|
Fields
| |
DataDecl |
|
Fields
| |
ClassDecl | |
Fields
| |
XTyClDecl !(XXTyClDecl pass) |
Instances
type Anno (TyClDecl (GhcPass p)) | |
Defined in GHC.Hs.Decls |
data SpliceDecoration #
A splice can appear with various decorations wrapped around it. This data type captures explicitly how it was originally written, for use in the pretty printer.
Constructors
DollarSplice | $splice |
BareSplice | bare splice |
Instances
data SpliceDecl p #
Splice Declaration
Constructors
SpliceDecl (XSpliceDecl p) (XRec p (HsUntypedSplice p)) SpliceDecoration | |
XSpliceDecl !(XXSpliceDecl p) |
Instances
type Anno (SpliceDecl (GhcPass p)) | |
Defined in GHC.Hs.Decls |
type LSpliceDecl pass = XRec pass (SpliceDecl pass) #
Located Splice Declaration
Constructors
HsGroup | |
Fields
| |
XHsGroup !(XXHsGroup p) |
A Haskell Declaration
Constructors
TyClD (XTyClD p) (TyClDecl p) | Type or Class Declaration |
InstD (XInstD p) (InstDecl p) | Instance declaration |
DerivD (XDerivD p) (DerivDecl p) | Deriving declaration |
ValD (XValD p) (HsBind p) | Value declaration |
SigD (XSigD p) (Sig p) | Signature declaration |
KindSigD (XKindSigD p) (StandaloneKindSig p) | Standalone kind signature |
DefD (XDefD p) (DefaultDecl p) | 'default' declaration |
ForD (XForD p) (ForeignDecl p) | Foreign declaration |
WarningD (XWarningD p) (WarnDecls p) | Warning declaration |
AnnD (XAnnD p) (AnnDecl p) | Annotation declaration |
RuleD (XRuleD p) (RuleDecls p) | Rule declaration |
SpliceD (XSpliceD p) (SpliceDecl p) | Splice declaration (Includes quasi-quotes) |
DocD (XDocD p) (DocDecl p) | Documentation comment declaration |
RoleAnnotD (XRoleAnnotD p) (RoleAnnotDecl p) | Role annotation declaration |
XHsDecl !(XXHsDecl p) |
Instances
type Anno (HsDecl (GhcPass _1)) | |
Defined in GHC.Hs.Decls |
data HsDoFlavour #
Constructors
DoExpr (Maybe ModuleName) |
|
MDoExpr (Maybe ModuleName) |
|
GhciStmtCtxt | A command-line Stmt in GHCi pat <- rhs |
ListComp | |
MonadComp |
data HsArrowMatchContext #
Haskell arrow match context.
Constructors
ProcExpr | A proc expression |
ArrowCaseAlt | A case alternative inside arrow notation |
ArrowLamCaseAlt LamCaseVariant | A case or cases alternative inside arrow notation |
KappaExpr | An arrow kappa abstraction |
data HsStmtContext p #
Haskell Statement Context.
Constructors
HsDoStmt HsDoFlavour | Context for HsDo (do-notation and comprehensions) |
PatGuard (HsMatchContext p) | Pattern guard for specified thing |
ParStmtCtxt (HsStmtContext p) | A branch of a parallel stmt |
TransStmtCtxt (HsStmtContext p) | A branch of a transform stmt |
ArrowExpr | do-notation in an arrow-command context |
data HsMatchContext p #
Haskell Match Context
Context of a pattern match. This is more subtle than it would seem. See Note [FunBind vs PatBind].
Constructors
FunRhs | A pattern matching on an argument of a function binding |
Fields
| |
LambdaExpr | Patterns of a lambda |
CaseAlt | Patterns and guards in a case alternative |
LamCaseAlt LamCaseVariant | Patterns and guards in |
IfAlt | Guards of a multi-way if alternative |
ArrowMatchCtxt HsArrowMatchContext | A pattern match inside arrow notation |
PatBindRhs | A pattern binding eg [y] <- e = e |
PatBindGuards | Guards of pattern bindings, e.g., (Just b) | Just _ <- x = e | otherwise = e' |
RecUpd | Record update [used only in GHC.HsToCore.Expr to tell matchWrapper what sort of runtime error message to generate] |
StmtCtxt (HsStmtContext p) | Pattern of a do-stmt, list comprehension, pattern guard, etc |
ThPatSplice | A Template Haskell pattern splice |
ThPatQuote | A Template Haskell pattern quotation [p| (a,b) |] |
PatSyn | A pattern synonym declaration |
data ArithSeqInfo id #
Arithmetic Sequence Information
Haskell (Untyped) Quote = Expr + Pat + Type + Var
data ApplicativeArg idL #
Applicative Argument
Constructors
ApplicativeArgOne | |
Fields
| |
ApplicativeArgMany | |
Fields
| |
XApplicativeArg !(XXApplicativeArg idL) |
type FailOperator id = Maybe (SyntaxExpr id) #
The fail operator
This is used for `.. <-` "bind statements" in do notation, including non-monadic "binds" in applicative.
The fail operator is 'Just expr' if it potentially fail monadically. if the
pattern match cannot fail, or shouldn't fail monadically (regular incomplete
pattern exception), it is Nothing
.
See Note [Monad fail : Rebindable syntax, overloaded strings] for the type of
expression in the Just
case, and why it is so.
See Note [Failing pattern matches in Stmts] for which contexts for
'BindStmt
's should use the monadic fail and which shouldn't.
data ParStmtBlock idL idR #
Parenthesised Statement Block
Constructors
ParStmtBlock (XParStmtBlock idL idR) [ExprLStmt idL] [IdP idR] (SyntaxExpr idR) | |
XParStmtBlock !(XXParStmtBlock idL idR) |
Instances
Data TransForm | |
Defined in Language.Haskell.Syntax.Expr Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TransForm -> c TransForm # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TransForm # toConstr :: TransForm -> Constr # dataTypeOf :: TransForm -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TransForm) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TransForm) # gmapT :: (forall b. Data b => b -> b) -> TransForm -> TransForm # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TransForm -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TransForm -> r # gmapQ :: (forall d. Data d => d -> u) -> TransForm -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> TransForm -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> TransForm -> m TransForm # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TransForm -> m TransForm # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TransForm -> m TransForm # |
Exact print annotations when in qualifier lists or guards
- AnnKeywordId
: AnnVbar
,
AnnComma
,AnnThen
,
AnnBy
,AnnBy
,
AnnGroup
,AnnUsing
Constructors
LastStmt (XLastStmt idL idR body) body (Maybe Bool) (SyntaxExpr idR) | |
BindStmt | |
Fields | |
ApplicativeStmt (XApplicativeStmt idL idR body) [(SyntaxExpr idR, ApplicativeArg idL)] (Maybe (SyntaxExpr idR)) |
For full details, see Note [ApplicativeDo] in GHC.Rename.Expr |
BodyStmt (XBodyStmt idL idR body) body (SyntaxExpr idR) (SyntaxExpr idR) | |
LetStmt (XLetStmt idL idR body) (HsLocalBindsLR idL idR) |
|
ParStmt (XParStmt idL idR body) [ParStmtBlock idL idR] (HsExpr idR) (SyntaxExpr idR) | |
TransStmt | |
RecStmt | |
Fields
| |
XStmtLR !(XXStmtLR idL idR body) |
Instances
type GuardLStmt id = LStmt id (LHsExpr id) #
Guard Located Statement
type LStmtLR idL idR body = XRec idL (StmtLR idL idR body) #
Located Statement with separate Left and Right id's
Guarded Right Hand Side.
Constructors
GRHS (XCGRHS p body) [GuardLStmt p] body | |
XGRHS !(XXGRHS p body) |
Instances
type Anno [LocatedA (Match (GhcPass p) (LocatedA (HsCmd (GhcPass p))))] | |
Defined in GHC.Hs.Expr | |
type Anno [LocatedA (Match (GhcPass p) (LocatedA (HsExpr (GhcPass p))))] | |
Defined in GHC.Hs.Expr | |
type Anno [LocatedA (Match GhcPs (LocatedA (PatBuilder GhcPs)))] | |
Defined in GHC.Parser.PostProcess | |
type Anno (Match (GhcPass p) (LocatedA (HsCmd (GhcPass p)))) | |
Defined in GHC.Hs.Expr | |
type Anno (Match (GhcPass p) (LocatedA (HsExpr (GhcPass p)))) | |
Defined in GHC.Hs.Expr | |
type Anno (Match GhcPs (LocatedA (PatBuilder GhcPs))) | |
Defined in GHC.Parser.PostProcess |
type LMatch id body = XRec id (Match id body) #
Located Match
May have AnnKeywordId
: AnnSemi
when in a
list
type HsRecordBinds p = HsRecFields p (LHsExpr p) #
Haskell Record Bindings
Haskell Top-level Command
type LHsCmdTop p = XRec p (HsCmdTop p) #
Top-level command, introducing a new arrow. This may occur inside a proc (where the stack is empty) or as an argument of a command-forming operator.
Located Haskell Top-level Command
data HsArrAppType #
Haskell arrow application type.
Constructors
HsHigherOrderApp | First order arrow application |
HsFirstOrderApp | Higher order arrow application |
Instances
Data HsArrAppType | |
Defined in Language.Haskell.Syntax.Expr Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsArrAppType -> c HsArrAppType # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HsArrAppType # toConstr :: HsArrAppType -> Constr # dataTypeOf :: HsArrAppType -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c HsArrAppType) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HsArrAppType) # gmapT :: (forall b. Data b => b -> b) -> HsArrAppType -> HsArrAppType # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsArrAppType -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsArrAppType -> r # gmapQ :: (forall d. Data d => d -> u) -> HsArrAppType -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsArrAppType -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsArrAppType -> m HsArrAppType # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsArrAppType -> m HsArrAppType # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsArrAppType -> m HsArrAppType # |
Haskell Command (e.g. a "statement" in an Arrow proc block)
Constructors
Instances
data LamCaseVariant #
Which kind of lambda case are we dealing with?
Instances
Data LamCaseVariant | |
Defined in Language.Haskell.Syntax.Expr Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> LamCaseVariant -> c LamCaseVariant # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c LamCaseVariant # toConstr :: LamCaseVariant -> Constr # dataTypeOf :: LamCaseVariant -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c LamCaseVariant) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c LamCaseVariant) # gmapT :: (forall b. Data b => b -> b) -> LamCaseVariant -> LamCaseVariant # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LamCaseVariant -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LamCaseVariant -> r # gmapQ :: (forall d. Data d => d -> u) -> LamCaseVariant -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> LamCaseVariant -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> LamCaseVariant -> m LamCaseVariant # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LamCaseVariant -> m LamCaseVariant # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LamCaseVariant -> m LamCaseVariant # | |
Eq LamCaseVariant | |
Defined in Language.Haskell.Syntax.Expr Methods (==) :: LamCaseVariant -> LamCaseVariant -> Bool # (/=) :: LamCaseVariant -> LamCaseVariant -> Bool # |
Haskell Tuple Argument
type LHsTupArg id = XRec id (HsTupArg id) #
Located Haskell Tuple Argument
HsTupArg
is used for tuple sections
(,a,)
is represented by
ExplicitTuple [Missing ty1, Present a, Missing ty3]
Which in turn stands for (x:ty1 y:ty2. (x,a,y))
A pragma, written as {-# ... #-}, that may appear within an expression.
data DotFieldOcc p #
Constructors
DotFieldOcc | |
Fields
| |
XDotFieldOcc !(XXDotFieldOcc p) |
Instances
type Anno (DotFieldOcc (GhcPass p)) | |
Defined in GHC.Hs.Expr |
type LHsRecUpdProj p = XRec p (RecUpdProj p) #
type RecUpdProj p = RecProj p (LHsExpr p) #
type LHsRecProj p arg = XRec p (RecProj p arg) #
type RecProj p arg = HsFieldBind (LFieldLabelStrings p) arg #
newtype FieldLabelStrings p #
Constructors
FieldLabelStrings [XRec p (DotFieldOcc p)] |
Instances
type Anno (FieldLabelStrings (GhcPass p)) | |
Defined in GHC.Hs.Expr |
type LFieldLabelStrings p = XRec p (FieldLabelStrings p) #
RecordDotSyntax field updates
Haskell Module
All we actually declare here is the top-level structure for a module.
Constructors
HsModule | |
Fields
| |
XModule !(XXModule p) |
A clone of the Bind
type but allowing annotation at every tree node
A clone of the Alt
type but allowing annotation at every tree node
A clone of the Expr
type but allowing annotation at every tree node
Constructors
AnnVar Id | |
AnnLit Literal | |
AnnLam bndr (AnnExpr bndr annot) | |
AnnApp (AnnExpr bndr annot) (AnnExpr bndr annot) | |
AnnCase (AnnExpr bndr annot) bndr Type [AnnAlt bndr annot] | |
AnnLet (AnnBind bndr annot) (AnnExpr bndr annot) | |
AnnCast (AnnExpr bndr annot) (annot, Coercion) | |
AnnTick CoreTickish (AnnExpr bndr annot) | |
AnnType Type | |
AnnCoercion Coercion |
type AnnExpr bndr annot = (annot, AnnExpr' bndr annot) #
Annotated core: allows annotation at every node in the tree
type TaggedAlt t = Alt (TaggedBndr t) #
type TaggedArg t = Arg (TaggedBndr t) #
type TaggedExpr t = Expr (TaggedBndr t) #
type TaggedBind t = Bind (TaggedBndr t) #
data TaggedBndr t #
Binders are tagged with a t
Instances
Outputable b => Outputable (TaggedBndr b) | |
Defined in GHC.Core Methods ppr :: TaggedBndr b -> SDoc # |
type CoreProgram = [CoreBind] #
data UnfoldingGuidance #
UnfoldingGuidance
says when unfolding should take place
Constructors
UnfWhen | |
Fields
| |
UnfIfGoodArgs | |
UnfNever |
Instances
Eq UnfoldingGuidance | |
Defined in GHC.Core Methods (==) :: UnfoldingGuidance -> UnfoldingGuidance -> Bool # (/=) :: UnfoldingGuidance -> UnfoldingGuidance -> Bool # |
data UnfoldingCache #
Properties of a CoreUnfolding
that could be computed on-demand from its template.
See Note [UnfoldingCache]
Constructors
UnfoldingCache | |
Fields
|
Instances
Eq UnfoldingCache | |
Defined in GHC.Core Methods (==) :: UnfoldingCache -> UnfoldingCache -> Bool # (/=) :: UnfoldingCache -> UnfoldingCache -> Bool # |
Records the unfolding of an identifier, which is approximately the form the identifier would have if we substituted its definition in for the identifier. This type should be treated as abstract everywhere except in GHC.Core.Unfold
Constructors
NoUnfolding | We have no information about the unfolding. |
BootUnfolding | We have no information about the unfolding, because
this |
OtherCon [AltCon] | It ain't one of these constructors.
data C = C !(Int -> Int) case x of { C f -> ... } Here, |
DFunUnfolding | |
CoreUnfolding | An unfolding with redundant cached information. Parameters: uf_tmpl: Template used to perform unfolding; NB: Occurrence info is guaranteed correct: see Note [OccInfo in unfoldings and rules] uf_is_top: Is this a top level binding? uf_is_value: uf_is_work_free: Does this waste only a little work if we expand it inside an inlining?
Basically this is a cached version of uf_guidance: Tells us about the size of the unfolding template |
Fields |
type IdUnfoldingFun = Id -> Unfolding #
data InScopeEnv #
The InScopeSet
in the InScopeEnv
is a superset of variables that are
currently in scope. See Note [The InScopeSet invariant].
Constructors
ISE InScopeSet IdUnfoldingFun |
A CoreRule
is:
- "Local" if the function it is a rule for is defined in the same module as the rule itself.
- "Orphan" if nothing on the LHS is defined in the same module as the rule itself
Constructors
Rule | |
Fields
| |
BuiltinRule | Built-in rules are used for constant folding and suchlike. They have no free variables. A built-in rule is always visible (there is no such thing as an orphan built-in rule.) |
Fields |
Is this instance an orphan? If it is not an orphan, contains an OccName
witnessing the instance's non-orphanhood.
See Note [Orphans]
Instances
Data IsOrphan | |
Defined in GHC.Core Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> IsOrphan -> c IsOrphan # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c IsOrphan # toConstr :: IsOrphan -> Constr # dataTypeOf :: IsOrphan -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c IsOrphan) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c IsOrphan) # gmapT :: (forall b. Data b => b -> b) -> IsOrphan -> IsOrphan # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> IsOrphan -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> IsOrphan -> r # gmapQ :: (forall d. Data d => d -> u) -> IsOrphan -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> IsOrphan -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> IsOrphan -> m IsOrphan # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> IsOrphan -> m IsOrphan # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> IsOrphan -> m IsOrphan # | |
Binary IsOrphan | |
type MOutCoercion = MCoercion #
type OutCoercion = Coercion #
type InCoercion = Coercion #
Binding, used for top level bindings in a module and local bindings in a let
.
Instances
Data b => Data (Bind b) | |
Defined in GHC.Core Methods gfoldl :: (forall d b0. Data d => c (d -> b0) -> d -> c b0) -> (forall g. g -> c g) -> Bind b -> c (Bind b) # gunfold :: (forall b0 r. Data b0 => c (b0 -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Bind b) # toConstr :: Bind b -> Constr # dataTypeOf :: Bind b -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Bind b)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Bind b)) # gmapT :: (forall b0. Data b0 => b0 -> b0) -> Bind b -> Bind b # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Bind b -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Bind b -> r # gmapQ :: (forall d. Data d => d -> u) -> Bind b -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Bind b -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Bind b -> m (Bind b) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Bind b -> m (Bind b) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Bind b -> m (Bind b) # |
A case alternative constructor (i.e. pattern match)
Constructors
DataAlt DataCon | |
LitAlt Literal | A literal: |
DEFAULT | Trivial alternative: |
Instances
Data AltCon | |
Defined in GHC.Core Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AltCon -> c AltCon # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AltCon # toConstr :: AltCon -> Constr # dataTypeOf :: AltCon -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c AltCon) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AltCon) # gmapT :: (forall b. Data b => b -> b) -> AltCon -> AltCon # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AltCon -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AltCon -> r # gmapQ :: (forall d. Data d => d -> u) -> AltCon -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> AltCon -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> AltCon -> m AltCon # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AltCon -> m AltCon # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AltCon -> m AltCon # | |
Outputable AltCon | |
Eq AltCon | |
Ord AltCon | |
data LambdaFormInfo #
Information about an identifier, from the code generator's point of view. Every identifier is bound to a LambdaFormInfo in the environment, which gives the code generator enough info to be able to tail call or return that identifier.
Instances
Outputable LambdaFormInfo | |
Defined in GHC.StgToCmm.Types Methods ppr :: LambdaFormInfo -> SDoc # |
Tick box for Hpc-style coverage
Instances
Outputable TickBoxOp | |
Defined in GHC.Types.Id.Info |
Constant applicative form Information
Records whether an Id
makes Constant Applicative Form references
Constructors
MayHaveCafRefs | Indicates that the
|
NoCafRefs | A function or static constructor that refers to no CAFs. |
Instances
Outputable CafInfo | |
Defined in GHC.Types.Id.Info | |
Eq CafInfo | |
Ord CafInfo | |
Rule Information
Records the specializations of this Id
that we know about
in the form of rewrite CoreRule
s that target them
type InlinePragInfo = InlinePragma #
Inline Pragma Information
Tells when the inlining is active. When it is active the thing may be inlined, depending on how big it is.
If there was an INLINE
pragma, then as a separate matter, the
RHS will have been made to look small with a Core inline Note
The default InlinePragInfo
is AlwaysActive
, so the info serves
entirely as a way to inhibit inlining until we want it
Arity Information
An ArityInfo
of n
tells us that partial application of this
Id
to up to n-1
value arguments does essentially no work.
That is not necessarily the same as saying that it has n
leading
lambdas, because coerces may get in the way.
The arity might increase later in the compilation process, if an extra lambda floats up to the binding site.
Invariant: the Arity
of an Id
must never exceed the number of
value arguments that appear in the type of the Id
.
See Note [Arity and function types].
data RecSelParent #
Recursive Selector Parent
Constructors
RecSelData TyCon | |
RecSelPatSyn PatSyn |
Instances
Outputable RecSelParent | |
Defined in GHC.Types.Id.Info Methods ppr :: RecSelParent -> SDoc # | |
Eq RecSelParent | |
Defined in GHC.Types.Id.Info |
data BoxingInfo b #
Constructors
BI_NoBoxNeeded | |
BI_NoBoxAvailable | |
BI_Box | |
Fields
|
type CoreAltWithFVs = AnnAlt Id FVAnn #
Every node in an expression annotated with its (non-global) free variables, both Ids and TyVars, and type.
type CoreExprWithFVs' = AnnExpr' Id FVAnn #
type CoreExprWithFVs = AnnExpr Id FVAnn #
Every node in an expression annotated with its (non-global) free variables, both Ids and TyVars, and type. NB: see Note [The FVAnn invariant]
type CoreBindWithFVs = AnnBind Id FVAnn #
Every node in a binding group annotated with its (non-global) free variables, both Ids and TyVars, and type.
type CheapAppFun = Id -> Arity -> Bool #
Instances
Outputable FloatBind | |
Defined in GHC.Core.Make |
data MkStringIds #
Constructors
MkStringIds | |
Fields
|
data CompilerInfo #
Constructors
GCC | |
Clang | |
AppleClang | |
AppleClang51 | |
Emscripten | |
UnknownCC |
Instances
Eq CompilerInfo | |
Defined in GHC.Driver.Session |
data LinkerInfo #
Constructors
GnuLD [Option] | |
GnuGold [Option] | |
LlvmLLD [Option] | |
DarwinLD [Option] | |
SolarisLD [Option] | |
AixLD [Option] | |
UnknownLD |
Instances
Eq LinkerInfo | |
Defined in GHC.Driver.Session |
Constructors
GlobalPkgDb | |
UserPkgDb | |
PkgDbPath FilePath |
Constructors
FlagSpec | |
Fields
|
type TurnOnFlag = Bool #
Instances
Applicative (CmdLineP s) | |
Defined in GHC.Driver.Session | |
Functor (CmdLineP s) | |
Monad (CmdLineP s) | |
Instances
Show a => Show (OnOff a) | |
Outputable a => Outputable (OnOff a) | |
Defined in GHC.Driver.Session | |
Eq a => Eq (OnOff a) | |
type FatalMessager = String -> IO () #
data DynamicTooState #
Constructors
DT_Dont | Don't try to build dynamic objects too |
DT_OK | Will still try to generate dynamic objects |
DT_Dyn | Currently generating dynamic objects (in the backend) |
Instances
Show DynamicTooState | |
Defined in GHC.Driver.Session Methods showsPrec :: Int -> DynamicTooState -> ShowS # show :: DynamicTooState -> String # showList :: [DynamicTooState] -> ShowS # | |
Eq DynamicTooState | |
Defined in GHC.Driver.Session Methods (==) :: DynamicTooState -> DynamicTooState -> Bool # (/=) :: DynamicTooState -> DynamicTooState -> Bool # | |
Ord DynamicTooState | |
Defined in GHC.Driver.Session Methods compare :: DynamicTooState -> DynamicTooState -> Ordering # (<) :: DynamicTooState -> DynamicTooState -> Bool # (<=) :: DynamicTooState -> DynamicTooState -> Bool # (>) :: DynamicTooState -> DynamicTooState -> Bool # (>=) :: DynamicTooState -> DynamicTooState -> Bool # max :: DynamicTooState -> DynamicTooState -> DynamicTooState # min :: DynamicTooState -> DynamicTooState -> DynamicTooState # |
data RtsOptsEnabled #
Instances
Show RtsOptsEnabled | |
Defined in GHC.Driver.Session Methods showsPrec :: Int -> RtsOptsEnabled -> ShowS # show :: RtsOptsEnabled -> String # showList :: [RtsOptsEnabled] -> ShowS # |
data DynLibLoader #
Constructors
Deployable | |
SystemDependent |
Instances
Eq DynLibLoader | |
Defined in GHC.Driver.Session |
data PackageDBFlag #
Constructors
PackageDB PkgDbRef | |
NoUserPackageDB | |
NoGlobalPackageDB | |
ClearPackageDBs |
Instances
Eq PackageDBFlag | |
Defined in GHC.Driver.Session Methods (==) :: PackageDBFlag -> PackageDBFlag -> Bool # (/=) :: PackageDBFlag -> PackageDBFlag -> Bool # |
data PackageFlag #
Flags for manipulating packages visibility.
Constructors
ExposePackage String PackageArg ModRenaming |
|
HidePackage String | -hide-package |
Instances
Outputable PackageFlag | |
Defined in GHC.Driver.Session Methods ppr :: PackageFlag -> SDoc # | |
Eq PackageFlag | |
Defined in GHC.Driver.Session |
Flags for manipulating package trust.
Constructors
TrustPackage String | -trust |
DistrustPackage String | -distrust |
newtype IgnorePackageFlag #
Flags for manipulating the set of non-broken packages.
Constructors
IgnorePackage String | -ignore-package |
Instances
Eq IgnorePackageFlag | |
Defined in GHC.Driver.Session Methods (==) :: IgnorePackageFlag -> IgnorePackageFlag -> Bool # (/=) :: IgnorePackageFlag -> IgnorePackageFlag -> Bool # |
data ModRenaming #
Represents the renaming that may be associated with an exposed
package, e.g. the rns
part of -package "foo (rns)"
.
Here are some example parsings of the package flags (where
a string literal is punned to be a ModuleName
:
Constructors
ModRenaming | |
Fields
|
Instances
Outputable ModRenaming | |
Defined in GHC.Driver.Session Methods ppr :: ModRenaming -> SDoc # | |
Eq ModRenaming | |
Defined in GHC.Driver.Session |
data PackageArg #
We accept flags which make packages visible, but how they select the package varies; this data type reflects what selection criterion is used.
Constructors
PackageArg String |
|
UnitIdArg Unit |
|
Instances
Show PackageArg | |
Defined in GHC.Driver.Session Methods showsPrec :: Int -> PackageArg -> ShowS # show :: PackageArg -> String # showList :: [PackageArg] -> ShowS # | |
Outputable PackageArg | |
Defined in GHC.Driver.Session Methods ppr :: PackageArg -> SDoc # | |
Eq PackageArg | |
Defined in GHC.Driver.Session |
What to do in the link step, if there is one.
Constructors
NoLink | Don't link at all |
LinkBinary | Link object code into a binary |
LinkInMemory | Use the in-memory dynamic linker (works for both bytecode and object code). |
LinkDynLib | Link objects into a dynamic lib (DLL on Windows, DSO on ELF platforms) |
LinkStaticLib | Link objects into a static lib |
LinkMergedObj | Link objects into a merged "GHCi object" |
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.
Constructors
CompManager |
|
OneShot | ghc -c Foo.hs |
MkDepend |
|
class ContainsDynFlags t where #
Methods
extractDynFlags :: t -> DynFlags #
Instances
ContainsDynFlags HscEnv | |
Defined in GHC.Driver.Env.Types Methods extractDynFlags :: HscEnv -> DynFlags # | |
ContainsDynFlags (Env gbl lcl) | |
Defined in GHC.Tc.Types Methods extractDynFlags :: Env gbl lcl -> DynFlags # |
class HasDynFlags (m :: Type -> Type) where #
Methods
getDynFlags :: m DynFlags #
Instances
HasDynFlags CoreM | |
Defined in GHC.Core.Opt.Monad Methods | |
HasDynFlags Hsc | |
Defined in GHC.Driver.Env.Types Methods getDynFlags :: Hsc DynFlags # | |
HasDynFlags TcS | |
Defined in GHC.Tc.Solver.Monad Methods getDynFlags :: TcS DynFlags # | |
ContainsDynFlags env => HasDynFlags (IOEnv env) | |
Defined in GHC.Data.IOEnv Methods getDynFlags :: IOEnv env DynFlags # | |
(Monad m, HasDynFlags m) => HasDynFlags (MaybeT m) | |
Defined in GHC.Driver.Session Methods getDynFlags :: MaybeT m DynFlags # | |
(Monad m, HasDynFlags m) => HasDynFlags (ExceptT e m) | |
Defined in GHC.Driver.Session Methods getDynFlags :: ExceptT e m DynFlags # | |
(Monad m, HasDynFlags m) => HasDynFlags (ReaderT a m) | |
Defined in GHC.Driver.Session Methods getDynFlags :: ReaderT a m DynFlags # | |
(Monoid a, Monad m, HasDynFlags m) => HasDynFlags (WriterT a m) | |
Defined in GHC.Driver.Session Methods getDynFlags :: WriterT a m DynFlags # |
data IncludeSpecs #
Used to differentiate the scope an include needs to apply to. We have to split the include paths to avoid accidentally forcing recursive includes since -I overrides the system search paths. See #14312.
Constructors
IncludeSpecs | |
Fields
|
Instances
Show IncludeSpecs | |
Defined in GHC.Driver.Session Methods showsPrec :: Int -> IncludeSpecs -> ShowS # show :: IncludeSpecs -> String # showList :: [IncludeSpecs] -> ShowS # |
HoleFit is the type we use for valid hole fits. It contains the
element that was checked, the Id of that element as found by tcLookup
,
and the refinement level of the fit, which is the number of extra argument
holes that this fit uses (e.g. if hfRefLvl is 2, the fit is for `Id _ _`).
Constructors
HoleFit | |
Fields
| |
RawHoleFit SDoc | A fit that is just displayed as is. Here so thatHoleFitPlugins can inject any fit they want. |
Instances
Outputable HoleFit | |
Defined in GHC.Tc.Errors.Hole.FitTypes | |
Eq HoleFit | |
Ord HoleFit | |
Defined in GHC.Tc.Errors.Hole.FitTypes |
data HoleFitPlugin #
A HoleFitPlugin is a pair of candidate and fit plugins.
Constructors
HoleFitPlugin | |
Fields |
data HoleFitCandidate #
HoleFitCandidates are passed to hole fit plugins and then checked whether they fit a given typed-hole.
Constructors
IdHFCand Id | |
NameHFCand Name | |
GreHFCand GlobalRdrElt |
Instances
NamedThing HoleFitCandidate | |
Defined in GHC.Tc.Errors.Hole.FitTypes | |
HasOccName HoleFitCandidate | |
Defined in GHC.Tc.Errors.Hole.FitTypes Methods occName :: HoleFitCandidate -> OccName # | |
Outputable HoleFitCandidate | |
Defined in GHC.Tc.Errors.Hole.FitTypes Methods ppr :: HoleFitCandidate -> SDoc # | |
Eq HoleFitCandidate | |
Defined in GHC.Tc.Errors.Hole.FitTypes Methods (==) :: HoleFitCandidate -> HoleFitCandidate -> Bool # (/=) :: HoleFitCandidate -> HoleFitCandidate -> Bool # | |
Ord HoleFitCandidate | |
Defined in GHC.Tc.Errors.Hole.FitTypes Methods compare :: HoleFitCandidate -> HoleFitCandidate -> Ordering # (<) :: HoleFitCandidate -> HoleFitCandidate -> Bool # (<=) :: HoleFitCandidate -> HoleFitCandidate -> Bool # (>) :: HoleFitCandidate -> HoleFitCandidate -> Bool # (>=) :: HoleFitCandidate -> HoleFitCandidate -> Bool # max :: HoleFitCandidate -> HoleFitCandidate -> HoleFitCandidate # min :: HoleFitCandidate -> HoleFitCandidate -> HoleFitCandidate # |
type ShHoleSubst = ModuleNameEnv Module #
Substitution on module variables, mapping module names to module identifiers.
Constructors
CloseUnitErr !UnitId !(Maybe UnitId) | |
PackageFlagErr !PackageFlag ![(UnitInfo, UnusableUnitReason)] | |
TrustFlagErr !TrustFlag ![(UnitInfo, UnusableUnitReason)] |
Instances
Outputable UnitErr | |
Defined in GHC.Unit.State |
data ModuleSuggestion #
data LookupResult #
The result of performing a lookup
Constructors
LookupFound Module (UnitInfo, ModuleOrigin) | Found the module uniquely, nothing else to do |
LookupMultiple [(Module, ModuleOrigin)] | Multiple modules with the same name in scope |
LookupHidden [(Module, ModuleOrigin)] [(Module, ModuleOrigin)] | No modules found, but there were some hidden ones with an exact name match. First is due to package hidden, second is due to module being hidden |
LookupUnusable [(Module, ModuleOrigin)] | No modules found, but there were some unusable ones with an exact name match |
LookupNotFound [ModuleSuggestion] | Nothing found, here are some suggested different names |
data UnusableUnitReason #
The reason why a unit is unusable.
Constructors
IgnoredWithFlag | We ignored it explicitly using |
BrokenDependencies [UnitId] | This unit transitively depends on a unit that was never present in any of the provided databases. |
CyclicDependencies [UnitId] | This unit transitively depends on a unit involved in a cycle.
Note that the list of |
IgnoredDependencies [UnitId] | This unit transitively depends on a unit which was ignored. |
ShadowedDependencies [UnitId] | This unit transitively depends on a unit which was shadowed by an ABI-incompatible unit. |
Instances
Outputable UnusableUnitReason | |
Defined in GHC.Unit.State Methods ppr :: UnusableUnitReason -> SDoc # |
type UnitInfoMap = Map UnitId UnitInfo #
data UnitDatabase unit #
Unit database
Constructors
UnitDatabase | |
Fields
|
Instances
Outputable u => Outputable (UnitDatabase u) | |
Defined in GHC.Unit.State Methods ppr :: UnitDatabase u -> SDoc # |
Constructors
UnitState | |
Fields
|
type PreloadUnitClosure = UniqSet UnitId #
data ModuleOrigin #
Given a module name, there may be multiple ways it came into scope, possibly simultaneously. This data type tracks all the possible ways it could have come into scope. Warning: don't use the record functions, they're partial!
Constructors
ModHidden | Module is hidden, and thus never will be available for import. (But maybe the user didn't realize), so we'll still keep track of these modules.) |
ModUnusable UnusableUnitReason | Module is unavailable because the package is unusable. |
ModOrigin | Module is public, and could have come from some places. |
Fields
|
Instances
Monoid ModuleOrigin | |
Defined in GHC.Unit.State Methods mempty :: ModuleOrigin # mappend :: ModuleOrigin -> ModuleOrigin -> ModuleOrigin # mconcat :: [ModuleOrigin] -> ModuleOrigin # | |
Semigroup ModuleOrigin | |
Defined in GHC.Unit.State Methods (<>) :: ModuleOrigin -> ModuleOrigin -> ModuleOrigin # sconcat :: NonEmpty ModuleOrigin -> ModuleOrigin # stimes :: Integral b => b -> ModuleOrigin -> ModuleOrigin # | |
Outputable ModuleOrigin | |
Defined in GHC.Unit.State Methods ppr :: ModuleOrigin -> SDoc # |
data FinderOpts #
Locations and information the finder cares about.
Should be taken from DynFlags
via initFinderOpts
.
Constructors
FinderOpts | |
Fields
|
Instances
Show FinderOpts | |
Defined in GHC.Unit.Finder.Types Methods showsPrec :: Int -> FinderOpts -> ShowS # show :: FinderOpts -> String # showList :: [FinderOpts] -> ShowS # |
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
).
Constructors
Found ModLocation Module | The module was found |
NoPackage Unit | The requested unit was not found |
FoundMultiple [(Module, ModuleOrigin)] | _Error_: both in multiple packages |
NotFound | Not found |
Fields
|
data InstalledFindResult #
data FinderCache #
data HsParsedModule #
Constructors
HsParsedModule | |
Fields
|
A restricted form of ModGuts
for code generation purposes
Constructors
CgGuts | |
Fields
|
A ModGuts is carried through the compiler, accumulating stuff as it goes
There is only one ModGuts at any time, the one for the module
being compiled right now. Once it is compiled, a ModIface
and
ModDetails
are extracted and the ModGuts is discarded.
Constructors
ModGuts | |
Fields
|
A full rule environment which we can apply rules from. Like a RuleBase
,
but it also includes the set of visible orphans we use to filter out orphan
rules which are not visible (even though we can see them...)
See Note [Orphans] in GHC.Core
Constructors
RuleEnv | |
Fields
|
type WhetherHasFamInst = Bool #
Does this module define family instances?
type WhetherHasOrphans = Bool #
Records whether a module has orphans. An "orphan" is one of:
- An instance declaration in a module other than the definition module for one of the type constructors or classes in the instance head
- A rewrite rule in a module other than the one defining the function in the head of the rule
type IfaceExport = AvailInfo #
The original names declared of a certain module that are exported
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.
Constructors
ModIface | |
Fields
|
Instances
Binary ModIface | |
(NFData (IfaceBackendExts phase), NFData (IfaceDeclExts phase)) => NFData (ModIface_ phase) | |
Defined in GHC.Unit.Module.ModIface |
type family IfaceBackendExts (phase :: ModIfacePhase) = (bk :: Type) | bk -> phase where ... #
Equations
IfaceBackendExts 'ModIfaceCore = () | |
IfaceBackendExts 'ModIfaceFinal = ModIfaceBackend |
type family IfaceDeclExts (phase :: ModIfacePhase) = (decl :: Type) | decl -> phase where ... #
Selects a IfaceDecl representation. For fully instantiated interfaces we also maintain a fingerprint, which is used for recompilation checks.
Equations
IfaceDeclExts 'ModIfaceCore = IfaceDecl | |
IfaceDeclExts 'ModIfaceFinal = (Fingerprint, IfaceDecl) |
data ModIfaceBackend #
Extends a PartialModIface with information which is either: * Computed after codegen * Or computed just before writing the iface to disk. (Hashes) In order to fully instantiate it.
Constructors
ModIfaceBackend | |
Fields
|
Instances
NFData ModIfaceBackend | |
Defined in GHC.Unit.Module.ModIface Methods rnf :: ModIfaceBackend -> () # |
type PartialModIface = ModIface_ 'ModIfaceCore #
data HscBackendAction #
Action to perform in backend compilation
Constructors
HscUpdate ModIface | Update the boot and signature file results. |
HscRecomp | Recompile this module. |
Fields
|
Instances
Outputable HscBackendAction | |
Defined in GHC.Unit.Module.Status Methods ppr :: HscBackendAction -> SDoc # |
data HscRecompStatus #
Status of a module in incremental compilation
Constructors
HscUpToDate ModIface HomeModLinkable | Nothing to do because code already exists. |
HscRecompNeeded (Maybe Fingerprint) | Recompilation of module, or update of interface is required. Optionally pass the old interface hash to avoid updating the existing interface when it has not changed. |
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
Constructors
ModSummary | |
Fields
|
Instances
Outputable ModSummary | |
Defined in GHC.Unit.Module.ModSummary Methods ppr :: ModSummary -> SDoc # |
data FileHeaderPragmaType #
Constructors
OptionsPrag | |
IncludePrag | |
LanguagePrag | |
DocOptionsPrag |
data TransLayoutReason #
Constructors
TransLayout_Where | "`where' clause at the same depth as implicit layout block" |
TransLayout_Pipe | "`|' at the same depth as implicit layout block") |
data CmmParserError #
Errors from the Cmm parser
Constructors
CmmUnknownPrimitive !FastString | Unknown Cmm primitive |
CmmUnknownMacro !FastString | Unknown macro |
CmmUnknownCConv !String | Unknown calling convention |
CmmUnrecognisedSafety !String | Unrecognised safety |
CmmUnrecognisedHint !String | Unrecognised hint |
Constructors
LexError | Lexical error |
LexUnknownPragma | Unknown pragma |
LexErrorInPragma | Lexical error in pragma |
LexNumEscapeRange | Numeric escape sequence out of range |
LexStringCharLit | Lexical error in string/character literal |
LexStringCharLitEOF | Unexpected end-of-file in string/character literal |
LexUnterminatedComment | Unterminated `{-' |
LexUnterminatedOptions | Unterminated OPTIONS pragma |
LexUnterminatedQQ | Unterminated quasiquotation |
data LexErrKind #
Constructors
LexErrKind_EOF | End of input |
LexErrKind_UTF8 | UTF-8 decoding error |
LexErrKind_Char !Char | Error at given character |
Instances
Show LexErrKind | |
Defined in GHC.Parser.Errors.Types Methods showsPrec :: Int -> LexErrKind -> ShowS # show :: LexErrKind -> String # showList :: [LexErrKind] -> ShowS # | |
Eq LexErrKind | |
Defined in GHC.Parser.Errors.Types | |
Ord LexErrKind | |
Defined in GHC.Parser.Errors.Types Methods compare :: LexErrKind -> LexErrKind -> Ordering # (<) :: LexErrKind -> LexErrKind -> Bool # (<=) :: LexErrKind -> LexErrKind -> Bool # (>) :: LexErrKind -> LexErrKind -> Bool # (>=) :: LexErrKind -> LexErrKind -> Bool # max :: LexErrKind -> LexErrKind -> LexErrKind # min :: LexErrKind -> LexErrKind -> LexErrKind # |
data NumUnderscoreReason #
Constructors
NumUnderscore_Integral | |
NumUnderscore_Float |
Instances
Show NumUnderscoreReason | |
Defined in GHC.Parser.Errors.Types Methods showsPrec :: Int -> NumUnderscoreReason -> ShowS # show :: NumUnderscoreReason -> String # showList :: [NumUnderscoreReason] -> ShowS # | |
Eq NumUnderscoreReason | |
Defined in GHC.Parser.Errors.Types Methods (==) :: NumUnderscoreReason -> NumUnderscoreReason -> Bool # (/=) :: NumUnderscoreReason -> NumUnderscoreReason -> Bool # | |
Ord NumUnderscoreReason | |
Defined in GHC.Parser.Errors.Types Methods compare :: NumUnderscoreReason -> NumUnderscoreReason -> Ordering # (<) :: NumUnderscoreReason -> NumUnderscoreReason -> Bool # (<=) :: NumUnderscoreReason -> NumUnderscoreReason -> Bool # (>) :: NumUnderscoreReason -> NumUnderscoreReason -> Bool # (>=) :: NumUnderscoreReason -> NumUnderscoreReason -> Bool # max :: NumUnderscoreReason -> NumUnderscoreReason -> NumUnderscoreReason # min :: NumUnderscoreReason -> NumUnderscoreReason -> NumUnderscoreReason # |
data PsErrInPatDetails #
Constructors
PEIP_NegApp | Negative application pattern? |
PEIP_TypeArgs [HsConPatTyArg GhcPs] | The list of type arguments for the pattern |
PEIP_RecPattern | |
Fields
| |
PEIP_OtherPatDetails !ParseContext |
data ParseContext #
Extra information for the expression GHC is currently inspecting/parsing. It can be used to generate more informative parser diagnostics and hints.
Constructors
ParseContext | |
Fields
|
Instances
Eq ParseContext | |
Defined in GHC.Parser.Errors.Types |
data PatIncompleteDoBlock #
Constructors
YesIncompleteDoBlock | |
NoIncompleteDoBlock |
Instances
Eq PatIncompleteDoBlock | |
Defined in GHC.Parser.Errors.Types Methods (==) :: PatIncompleteDoBlock -> PatIncompleteDoBlock -> Bool # (/=) :: PatIncompleteDoBlock -> PatIncompleteDoBlock -> Bool # |
data PsErrParseDetails #
Extra details about a parse error, which helps us in determining which should be the hints to suggest.
Constructors
PsErrParseDetails | |
Fields
|
Constructors
PsUnknownMessage UnknownDiagnostic | An "unknown" message from the parser. This type constructor allows arbitrary messages to be embedded. The typical use case would be GHC plugins willing to emit custom diagnostics. |
PsHeaderMessage !PsHeaderMessage | A group of parser messages emitted in |
PsWarnBidirectionalFormatChars (NonEmpty (PsLoc, Char, String)) | PsWarnBidirectionalFormatChars is a warning (controlled by the -Wwarn-bidirectional-format-characters flag) that occurs when unicode bi-directional format characters are found within in a file The |
PsWarnTab | PsWarnTab is a warning (controlled by the -Wwarn-tabs flag) that occurs when tabulations (tabs) are found within a file. Test case(s): parsershould_failT12610 parsershould_compileT9723b parsershould_compileT9723a parsershould_compileread043 parsershould_failT16270 warningsshould_compileT9230 |
Fields
| |
PsWarnTransitionalLayout !TransLayoutReason | PsWarnTransitionalLayout is a warning (controlled by the -Walternative-layout-rule-transitional flag) that occurs when pipes ('|') or 'where' are at the same depth of an implicit layout block. Example(s): f :: IO () f | True = do let x = () y = () return () | True = return () Test case(s): layout/layout006 layout/layout003 layout/layout001 |
PsWarnUnrecognisedPragma !String ![String] | Unrecognised pragma. First field is the actual pragma name which might be empty. Second field is the set of valid candidate pragmas. |
PsWarnMisplacedPragma !FileHeaderPragmaType | |
PsWarnHaddockInvalidPos | Invalid Haddock comment position |
PsWarnHaddockIgnoreMulti | Multiple Haddock comment for the same entity |
PsWarnStarBinder | Found binding occurrence of "*" while StarIsType is enabled |
PsWarnStarIsType | Using "*" for Type without StarIsType enabled |
PsWarnImportPreQualified | Pre qualified import with |
PsWarnOperatorWhitespaceExtConflict !OperatorWhitespaceSymbol | |
PsWarnOperatorWhitespace !FastString !OperatorWhitespaceOccurrence | |
PsErrLambdaCase | LambdaCase syntax used without the extension enabled |
PsErrEmptyLambda | A lambda requires at least one parameter |
PsErrNumUnderscores !NumUnderscoreReason | Underscores in literals without the extension enabled |
PsErrPrimStringInvalidChar | Invalid character in primitive string |
PsErrMissingBlock | Missing block |
PsErrLexer !LexErr !LexErrKind | Lexer error |
PsErrSuffixAT | Suffix occurrence of |
PsErrParse !String !PsErrParseDetails | Parse errors |
PsErrCmmLexer | Cmm lexer error |
PsErrUnsupportedBoxedSumExpr !(SumOrTuple (HsExpr GhcPs)) | Unsupported boxed sum in expression |
PsErrUnsupportedBoxedSumPat !(SumOrTuple (PatBuilder GhcPs)) | Unsupported boxed sum in pattern |
PsErrUnexpectedQualifiedConstructor !RdrName | Unexpected qualified constructor |
PsErrTupleSectionInPat | Tuple section in pattern context |
PsErrIllegalBangPattern !(Pat GhcPs) | Bang-pattern without BangPattterns enabled |
PsErrOpFewArgs !StarIsType !RdrName | Operator applied to too few arguments |
PsErrImportQualifiedTwice | Import: multiple occurrences of |
PsErrImportPostQualified | Post qualified import without |
PsErrIllegalExplicitNamespace | Explicit namespace keyword without |
PsErrVarForTyCon !RdrName | Expecting a type constructor but found a variable |
PsErrIllegalPatSynExport | Illegal export form allowed by PatternSynonyms |
PsErrMalformedEntityString | Malformed entity string |
PsErrDotsInRecordUpdate | Dots used in record update |
PsErrPrecedenceOutOfRange !Int | Precedence out of range |
PsErrOverloadedRecordDotInvalid | Invalid use of record dot syntax |
PsErrOverloadedRecordUpdateNotEnabled |
|
PsErrOverloadedRecordUpdateNoQualifiedFields | Can't use qualified fields when OverloadedRecordUpdate is enabled. |
PsErrInvalidDataCon !(HsType GhcPs) | Cannot parse data constructor in a data/newtype declaration |
PsErrInvalidInfixDataCon !(HsType GhcPs) !RdrName !(HsType GhcPs) | Cannot parse data constructor in a data/newtype declaration |
PsErrIllegalPromotionQuoteDataCon !RdrName | Illegal DataKinds quote mark in data/newtype constructor declaration |
PsErrUnpackDataCon | UNPACK applied to a data constructor |
PsErrUnexpectedKindAppInDataCon !DataConBuilder !(HsType GhcPs) | Unexpected kind application in data/newtype declaration |
PsErrInvalidRecordCon !(PatBuilder GhcPs) | Not a record constructor |
PsErrIllegalUnboxedStringInPat !(HsLit GhcPs) | Illegal unboxed string literal in pattern |
PsErrIllegalUnboxedFloatingLitInPat !(HsLit GhcPs) | Illegal primitive floating point literal in pattern |
PsErrDoNotationInPat | Do-notation in pattern |
PsErrIfThenElseInPat | If-then-else syntax in pattern |
PsErrLambdaCaseInPat LamCaseVariant | Lambda-case in pattern |
PsErrCaseInPat | case..of in pattern |
PsErrLetInPat | let-syntax in pattern |
PsErrLambdaInPat | Lambda-syntax in pattern |
PsErrArrowExprInPat !(HsExpr GhcPs) | Arrow expression-syntax in pattern |
PsErrArrowCmdInPat !(HsCmd GhcPs) | Arrow command-syntax in pattern |
PsErrArrowCmdInExpr !(HsCmd GhcPs) | Arrow command-syntax in expression |
PsErrViewPatInExpr !(LHsExpr GhcPs) !(LHsExpr GhcPs) | View-pattern in expression |
PsErrTypeAppWithoutSpace !RdrName !(LHsExpr GhcPs) | Type-application without space before |
PsErrLazyPatWithoutSpace !(LHsExpr GhcPs) | Lazy-pattern ( |
PsErrBangPatWithoutSpace !(LHsExpr GhcPs) | Bang-pattern ( |
PsErrUnallowedPragma !(HsPragE GhcPs) | Pragma not allowed in this position |
PsErrQualifiedDoInCmd !ModuleName | Qualified do block in command |
PsErrInvalidInfixHole | Invalid infix hole, expected an infix operator |
PsErrSemiColonsInCondExpr | Unexpected semi-colons in conditional expression |
PsErrSemiColonsInCondCmd | Unexpected semi-colons in conditional command |
PsErrAtInPatPos | @-operator in a pattern position |
PsErrLambdaCmdInFunAppCmd !(LHsCmd GhcPs) | Unexpected lambda command in function application |
PsErrCaseCmdInFunAppCmd !(LHsCmd GhcPs) | Unexpected case command in function application |
PsErrLambdaCaseCmdInFunAppCmd !LamCaseVariant !(LHsCmd GhcPs) | Unexpected case(s) command in function application |
PsErrIfCmdInFunAppCmd !(LHsCmd GhcPs) | Unexpected if command in function application |
PsErrLetCmdInFunAppCmd !(LHsCmd GhcPs) | Unexpected let command in function application |
PsErrDoCmdInFunAppCmd !(LHsCmd GhcPs) | Unexpected do command in function application |
PsErrDoInFunAppExpr !(Maybe ModuleName) !(LHsExpr GhcPs) | Unexpected do block in function application |
PsErrMDoInFunAppExpr !(Maybe ModuleName) !(LHsExpr GhcPs) | Unexpected mdo block in function application |
PsErrLambdaInFunAppExpr !(LHsExpr GhcPs) | Unexpected lambda expression in function application |
PsErrCaseInFunAppExpr !(LHsExpr GhcPs) | Unexpected case expression in function application |
PsErrLambdaCaseInFunAppExpr !LamCaseVariant !(LHsExpr GhcPs) | Unexpected case(s) expression in function application |
PsErrLetInFunAppExpr !(LHsExpr GhcPs) | Unexpected let expression in function application |
PsErrIfInFunAppExpr !(LHsExpr GhcPs) | Unexpected if expression in function application |
PsErrProcInFunAppExpr !(LHsExpr GhcPs) | Unexpected proc expression in function application |
PsErrMalformedTyOrClDecl !(LHsType GhcPs) | Malformed head of type or class declaration |
PsErrIllegalWhereInDataDecl | Illegal 'where' keyword in data declaration |
PsErrIllegalDataTypeContext !(LHsContext GhcPs) | Illegal datatype context |
PsErrParseErrorOnInput !OccName | Parse error on input |
PsErrMalformedDecl !SDoc !RdrName | Malformed ... declaration for ... |
PsErrUnexpectedTypeAppInDecl !(LHsType GhcPs) !SDoc !RdrName | Unexpected type application in a declaration |
PsErrNotADataCon !RdrName | Not a data constructor |
PsErrRecordSyntaxInPatSynDecl !(LPat GhcPs) | Record syntax used in pattern synonym declaration |
PsErrEmptyWhereInPatSynDecl !RdrName | Empty 'where' clause in pattern-synonym declaration |
PsErrInvalidWhereBindInPatSynDecl !RdrName !(HsDecl GhcPs) | Invalid binding name in 'where' clause of pattern-synonym declaration |
PsErrNoSingleWhereBindInPatSynDecl !RdrName !(HsDecl GhcPs) | Multiple bindings in 'where' clause of pattern-synonym declaration |
PsErrDeclSpliceNotAtTopLevel !(SpliceDecl GhcPs) | Declaration splice not a top-level |
PsErrInferredTypeVarNotAllowed | Inferred type variables not allowed here |
PsErrMultipleNamesInStandaloneKindSignature [LIdP GhcPs] | Multiple names in standalone kind signatures |
PsErrIllegalImportBundleForm | Illegal import bundle form |
PsErrIllegalRoleName !FastString [Role] | Illegal role name |
PsErrInvalidTypeSignature !(LHsExpr GhcPs) | Invalid type signature |
PsErrUnexpectedTypeInDecl !(LHsType GhcPs) !SDoc !RdrName [LHsTypeArg GhcPs] !SDoc | Unexpected type in declaration |
PsErrExpectedHyphen | Expected a hyphen |
PsErrSpaceInSCC | Found a space in a SCC |
PsErrEmptyDoubleQuotes | Found two single quotes |
Fields
| |
PsErrInvalidPackageName !FastString | Invalid package name |
PsErrInvalidRuleActivationMarker | Invalid rule activation marker |
PsErrLinearFunction | Linear function found but LinearTypes not enabled |
PsErrMultiWayIf | Multi-way if-expression found but MultiWayIf not enabled |
PsErrExplicitForall | Explicit forall found but no extension allowing it is enabled |
Fields
| |
PsErrIllegalQualifiedDo !SDoc | Found qualified-do without QualifiedDo enabled |
PsErrCmmParser !CmmParserError | Cmm parser error |
PsErrIllegalTraditionalRecordSyntax !SDoc | Illegal traditional record syntax TODO: distinguish errors without using SDoc |
PsErrParseErrorInCmd !SDoc | Parse error in command TODO: distinguish errors without using SDoc |
PsErrInPat !(PatBuilder GhcPs) !PsErrInPatDetails | Parse error in pattern |
PsErrParseRightOpSectionInPat !RdrName !(PatBuilder GhcPs) | Parse error in right operator section pattern TODO: embed the proper operator, if possible |
PsErrIllegalGadtRecordMultiplicity !(HsArrow GhcPs) | Illegal linear arrow or multiplicity annotation in GADT record syntax |
PsErrInvalidCApiImport | |
PsErrMultipleConForNewtype !RdrName !Int | |
PsErrUnicodeCharLooksLike | |
Instances
data PsHeaderMessage #
Constructors
PsErrParseLanguagePragma | |
PsErrUnsupportedExt !String ![String] | |
PsErrParseOptionsPragma !String | |
PsErrUnknownOptionsPragma !String | PsErrUnsupportedOptionsPragma is an error that occurs when an unknown OPTIONS_GHC pragma is supplied is found. Example(s): {-# OPTIONS_GHC foo #-} Test case(s): testssafeHaskellflags/SafeFlags28 testssafeHaskellflags/SafeFlags19 testssafeHaskellflags/SafeFlags29 testsparsershould_fail/T19923c testsparsershould_fail/T19923b testsparsershould_fail/readFail044 testsdriverT2499 |
Instances
HscEnv is like Session
, except that some of the fields are immutable.
An HscEnv is used to compile a single module from plain Haskell source
code (after preprocessing) to either C, assembly or C--. It's also used
to store the dynamic linker state to allow for multiple linkers in the
same address space.
Things like the module graph don't change during a single compilation.
Historical note: "hsc" used to be the name of the compiler binary, when there was a separate driver and compiler. To compile a single module, the driver would invoke hsc on the source code... so nowadays we think of hsc as the layer of the compiler that deals with compiling a single module.
Constructors
HscEnv | |
Fields
|
Instances
ContainsDynFlags HscEnv | |
Defined in GHC.Driver.Env.Types Methods extractDynFlags :: HscEnv -> DynFlags # |
The monad used by Core-to-Core passes to register simplification statistics. Also used to have common state (in the form of UniqueSupply) for generating Uniques.
Instances
MonadIO CoreM | |
Defined in GHC.Core.Opt.Monad | |
Alternative CoreM | |
Applicative CoreM | |
Functor CoreM | |
Monad CoreM | |
MonadPlus CoreM | |
HasDynFlags CoreM | |
Defined in GHC.Core.Opt.Monad Methods | |
MonadUnique CoreM | |
Defined in GHC.Core.Opt.Monad Methods getUniqueSupplyM :: CoreM UniqSupply # getUniqueM :: CoreM Unique # getUniquesM :: CoreM [Unique] # | |
HasModule CoreM | |
Defined in GHC.Core.Opt.Monad | |
HasLogger CoreM | |
Defined in GHC.Core.Opt.Monad |
type MetaHook (f :: Type -> Type) = MetaRequest -> LHsExpr GhcTc -> f MetaResult #
data MetaResult #
data constructors not exported to ensure correct result type
data MetaRequest #
The supported metaprogramming result types
Constructors
MetaE (LHsExpr GhcPs -> MetaResult) | |
MetaP (LPat GhcPs -> MetaResult) | |
MetaT (LHsType GhcPs -> MetaResult) | |
MetaD ([LHsDecl GhcPs] -> MetaResult) | |
MetaAW (Serialized -> MetaResult) |
Constructors
Instances
Outputable CoreToDo | |
Defined in GHC.Core.Opt.Pipeline.Types |
type CorePluginPass = ModGuts -> CoreM ModGuts #
A description of the plugin pass itself
type DefaultingPlugin = [CommandLineOption] -> Maybe DefaultingPlugin #
type TcPlugin = [CommandLineOption] -> Maybe TcPlugin #
data HoleFitPluginR #
HoleFitPluginR adds a TcRef to hole fit plugins so that plugins can track internal state. Note the existential quantification, ensuring that the state cannot be modified from outside the plugin.
Constructors
HoleFitPluginR | |
Fields
|
type FitPlugin = TypedHole -> [HoleFit] -> TcM [HoleFit] #
A plugin for modifying hole fits *after* they've been found.
type CandPlugin = TypedHole -> [HoleFitCandidate] -> TcM [HoleFitCandidate] #
A plugin for modifying the candidate hole fits *before* they're checked.
Constructors
TypedHole | |
Fields
|
Instances
Outputable TypedHole | |
Defined in GHC.Tc.Errors.Hole.FitTypes |
type CorePlugin = [CommandLineOption] -> [CoreToDo] -> CoreM [CoreToDo] #
data PluginRecompile #
Constructors
ForceRecompile | |
NoForceRecompile | |
MaybeRecompile Fingerprint |
Instances
Monoid PluginRecompile | |
Defined in GHC.Driver.Plugins Methods mappend :: PluginRecompile -> PluginRecompile -> PluginRecompile # mconcat :: [PluginRecompile] -> PluginRecompile # | |
Semigroup PluginRecompile | |
Defined in GHC.Driver.Plugins Methods (<>) :: PluginRecompile -> PluginRecompile -> PluginRecompile # sconcat :: NonEmpty PluginRecompile -> PluginRecompile # stimes :: Integral b => b -> PluginRecompile -> PluginRecompile # | |
Outputable PluginRecompile | |
Defined in GHC.Driver.Plugins Methods ppr :: PluginRecompile -> SDoc # |
data ExternalPlugin #
External plugin loaded directly from a library without loading module interfaces
Constructors
ExternalPlugin | |
data PluginWithArgs #
Constructors
PluginWithArgs | |
Fields
|
data ParsedResult #
Result of running the parser and the parser plugin
Constructors
ParsedResult | |
Fields
|
type CommandLineOption = String #
Command line options gathered from the -PModule.Name:stuff syntax are given to you as this type
data TcRnExprMode #
How should we infer a type? See Note [TcRnExprMode]
Constructors
TM_Inst | Instantiate inferred quantifiers only (:type) |
TM_Default | Instantiate all quantifiers, and do eager defaulting (:type +d) |
data CgInteractiveGuts #
type Messager = HscEnv -> (Int, Int) -> RecompileRequired -> ModuleGraphNode -> IO () #
data Serialized #
Represents a serialized value of a particular type. Attempts can be made to deserialize it at certain types
Constructors
Serialized TypeRep [Word8] |
Instances
Outputable Serialized | |
Defined in GHC.Utils.Outputable Methods ppr :: Serialized -> SDoc # |
try :: Exception e => IO a -> IO (Either e a) #
Similar to catch
, but returns an Either
result which is
(
if no exception of type Right
a)e
was raised, or (
if an exception of type Left
ex)e
was raised and its value is ex
.
If any other type of exception is raised then it will be propagated
up to the next enclosing exception handler.
try a = catch (Right `liftM` a) (return . Left)
lengthAtLeast :: [a] -> Int -> Bool #
(lengthAtLeast xs n) = (length xs >= n)
throwTo :: Exception e => ThreadId -> e -> IO () #
throwTo
raises an arbitrary exception in the target thread (GHC only).
Exception delivery synchronizes between the source and target thread:
throwTo
does not return until the exception has been raised in the
target thread. The calling thread can thus be certain that the target
thread has received the exception. Exception delivery is also atomic
with respect to other exceptions. Atomicity is a useful property to have
when dealing with race conditions: e.g. if there are two threads that
can kill each other, it is guaranteed that only one of the threads
will get to kill the other.
Whatever work the target thread was doing when the exception was raised is not lost: the computation is suspended until required by another thread.
If the target thread is currently making a foreign call, then the
exception will not be raised (and hence throwTo
will not return)
until the call has completed. This is the case regardless of whether
the call is inside a mask
or not. However, in GHC a foreign call
can be annotated as interruptible
, in which case a throwTo
will
cause the RTS to attempt to cause the call to return; see the GHC
documentation for more details.
Important note: the behaviour of throwTo
differs from that described in
the paper "Asynchronous exceptions in Haskell"
(http://research.microsoft.com/~simonpj/Papers/asynch-exns.htm).
In the paper, throwTo
is non-blocking; but the library implementation adopts
a more synchronous design in which throwTo
does not return until the exception
is received by the target thread. The trade-off is discussed in Section 9 of the paper.
Like any blocking operation, throwTo
is therefore interruptible (see Section 5.3 of
the paper). Unlike other interruptible operations, however, throwTo
is always interruptible, even if it does not actually block.
There is no guarantee that the exception will be delivered promptly,
although the runtime will endeavour to ensure that arbitrary
delays don't occur. In GHC, an exception can only be raised when a
thread reaches a safe point, where a safe point is where memory
allocation occurs. Some loops do not perform any memory allocation
inside the loop and therefore cannot be interrupted by a throwTo
.
If the target of throwTo
is the calling thread, then the behaviour
is the same as throwIO
, except that the exception
is thrown as an asynchronous exception. This means that if there is
an enclosing pure computation, which would be the case if the current
IO operation is inside unsafePerformIO
or unsafeInterleaveIO
, that
computation is not permanently replaced by the exception, but is
suspended as if it had received an asynchronous exception.
Note that if throwTo
is called with the current thread as the
target, the exception will be thrown even if the thread is currently
inside mask
or uninterruptibleMask
.
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
foldl1' :: HasCallStack => (a -> a -> a) -> [a] -> a #
A strict version of foldl1
.
infinity :: IntWithInf #
A representation of infinity
fingerprintString :: String -> Fingerprint #
funResultTy :: HasDebugCallStack => Type -> Type #
Extract the function result type and panic if that is not possible
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
fingerprintData :: Ptr Word8 -> Int -> IO Fingerprint #
getFileHash :: FilePath -> IO Fingerprint #
Computes the hash of a given file. This function loops over the handle, running in constant memory.
Since: base-4.7.0.0
sortWith :: Ord b => (a -> b) -> [a] -> [a] #
The sortWith
function sorts a list of elements using the
user supplied function to project something out of each element
In general if the user supplied function is expensive to compute then
you should probably be using sortOn
, as it only needs
to compute it once for each element. sortWith
, on the other hand
must compute the mapping function for every comparison that it performs.
See Type for what an algebraic type is. Should only be applied to types, as opposed to e.g. partially saturated type constructors
mkNoRepType :: String -> DataType #
Constructs a non-representation for a non-representable type
spanEnd :: (a -> Bool) -> [a] -> ([a], [a]) #
spanEnd p l == reverse (span p (reverse l))
. The first list
returns actually comes after the second list (when you look at the
input list).
readRational :: String -> Rational #
isEmpty :: SDocContext -> SDoc -> Bool #
compareLength :: [a] -> [b] -> Ordering #
pprWithUnitState :: UnitState -> SDoc -> SDoc #
Print unit-ids with UnitInfo found in the given UnitState
(mkTyConTy tc) returns (TyConApp tc []) but arranges to share that TyConApp among all calls See Note [Sharing nullary TyConApps] So it's just an alias for tyConNullaryTy!
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
mkIntExpr :: Platform -> Integer -> CoreExpr #
Create a CoreExpr
which will evaluate to the given Int
mkWordExpr :: Platform -> Integer -> CoreExpr #
Create a CoreExpr
which will evaluate to a Word
with the given value
mkCharExpr :: Char -> CoreExpr #
Create a CoreExpr
which will evaluate to the given Char
mkStringExpr :: MonadThings m => String -> m CoreExpr #
Create a CoreExpr
which will evaluate to the given String
mkFloatExpr :: Float -> CoreExpr #
Create a CoreExpr
which will evaluate to the given Float
mkDoubleExpr :: Double -> CoreExpr #
Create a CoreExpr
which will evaluate to the given Double
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
mkCoreLet :: CoreBind -> CoreExpr -> CoreExpr #
Bind a binding group over an expression, using a let
or case
as
appropriate (see GHC.Core)
typeLevity_maybe :: HasDebugCallStack => Type -> Maybe Levity #
Tries to compute the PromDataConInfo
of the given type. Returns either
a definite PromDataConInfo
, or Nothing
if we aren't sure (e.g. the
type is representation-polymorphic).
Panics if the kind does not have the shape TYPE r
.
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
panic :: HasCallStack => String -> a #
Panics and asserts.
sorry :: HasCallStack => String -> a #
Panics and asserts.
pgmError :: HasCallStack => String -> a #
Panics and asserts.
cmdLineError :: String -> a #
cmdLineErrorIO :: String -> IO a #
assertPanic :: String -> Int -> a #
Throw a failed assertion exception for a given filename and line number.
partitionWith :: (a -> Either b c) -> [a] -> ([b], [c]) #
Uses a function to determine which of two output lists an input element should join
zipEqual :: HasDebugCallStack => String -> [a] -> [b] -> [(a, b)] #
zipWithEqual :: HasDebugCallStack => String -> (a -> b -> c) -> [a] -> [b] -> [c] #
zipWith3Equal :: HasDebugCallStack => String -> (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d] #
zipWith4Equal :: HasDebugCallStack => String -> (a -> b -> c -> d -> e) -> [a] -> [b] -> [c] -> [d] -> [e] #
filterByList :: [Bool] -> [a] -> [a] #
filterByList
takes a list of Bools and a list of some elements and
filters out these elements for which the corresponding value in the list of
Bools is False. This function does not check whether the lists have equal
length.
filterByLists :: [Bool] -> [a] -> [a] -> [a] #
filterByLists
takes a list of Bools and two lists as input, and
outputs a new list consisting of elements from the last two input lists. For
each Bool in the list, if it is True
, then it takes an element from the
former list. If it is False
, it takes an element from the latter list.
The elements taken correspond to the index of the Bool in its list.
For example:
filterByLists [True, False, True, False] "abcd" "wxyz" = "axcz"
This function does not check whether the lists have equal length.
partitionByList :: [Bool] -> [a] -> ([a], [a]) #
partitionByList
takes a list of Bools and a list of some elements and
partitions the list according to the list of Bools. Elements corresponding
to True
go to the left; elements corresponding to False
go to the right.
For example, partitionByList [True, False, True] [1,2,3] == ([1,3], [2])
This function does not check whether the lists have equal
length; when one list runs out, the function stops.
stretchZipWith :: (a -> Bool) -> b -> (a -> b -> c) -> [a] -> [b] -> [c] #
stretchZipWith p z f xs ys
stretches ys
by inserting z
in
the places where p
returns True
mapAndUnzip :: (a -> (b, c)) -> [a] -> ([b], [c]) #
mapAndUnzip3 :: (a -> (b, c, d)) -> [a] -> ([b], [c], [d]) #
zipWithAndUnzip :: (a -> b -> (c, d)) -> [a] -> [b] -> ([c], [d]) #
zipAndUnzip :: [a] -> [b] -> ([a], [b]) #
This has the effect of making the two lists have equal length by dropping the tail of the longer one.
atLength :: ([a] -> b) -> b -> [a] -> Int -> b #
atLength atLen atEnd ls n
unravels list ls
to position n
. Precisely:
atLength atLenPred atEndPred ls n | n < 0 = atLenPred ls | length ls < n = atEndPred (n - length ls) | otherwise = atLenPred (drop n ls)
lengthExceeds :: [a] -> Int -> Bool #
(lengthExceeds xs n) = (length xs > n)
lengthIsNot :: [a] -> Int -> Bool #
(lengthIsNot xs n) = (length xs /= n)
lengthAtMost :: [a] -> Int -> Bool #
(lengthAtMost xs n) = (length xs <= n)
lengthLessThan :: [a] -> Int -> Bool #
(lengthLessThan xs n) == (length xs < n)
listLengthCmp :: [a] -> Int -> Ordering #
equalLength :: [a] -> [b] -> Bool #
True if length xs == length ys
isSingleton :: [a] -> Bool #
Utility function to go from a singleton list to it's element.
Wether or not the argument is a singleton list is only checked in debug builds.
expectOnly :: HasCallStack => String -> [a] -> a #
Extract the single element of a list and panic with the given message if
there are more elements or the list was empty.
Like expectJust
, but for lists.
Compute all the ways of removing a single element from a list.
holes [1,2,3] = [(1, [2,3]), (2, [1,3]), (3, [1,2])]
changeLast :: [a] -> a -> [a] #
Replace the last element of a list with another element.
mapLastM :: Functor f => (a -> f a) -> NonEmpty a -> f (NonEmpty a) #
Apply an effectful function to the last list element.
whenNonEmpty :: Applicative m => [a] -> (NonEmpty a -> m ()) -> m () #
mergeListsBy :: (a -> a -> Ordering) -> [[a]] -> [a] #
Merge an unsorted list of sorted lists, for example:
mergeListsBy compare [ [2,5,15], [1,10,100] ] = [1,2,5,10,15,100]
\( O(n \log{} k) \)
isSortedBy :: (a -> a -> Ordering) -> [a] -> Bool #
ordNubOn :: Ord b => (a -> b) -> [a] -> [a] #
Remove duplicates but keep elements in order. O(n * log n)
transitiveClosure :: (a -> [a]) -> (a -> a -> Bool) -> [a] -> [a] #
countWhile :: (a -> Bool) -> [a] -> Int #
splitAtList :: [b] -> [a] -> ([a], [a]) #
Given two lists xs and ys, return `splitAt (length xs) ys`.
dropWhileEndLE :: (a -> Bool) -> [a] -> [a] #
onJust :: b -> Maybe a -> (a -> b) -> b #
onJust x m f
applies f to the value inside the Just or returns the default.
snocView :: [a] -> Maybe ([a], a) #
Split a list into its last element and the initial part of the list.
snocView xs = Just (init xs, last xs)
for non-empty lists.
snocView xs = Nothing
otherwise.
Unless both parts of the result are guaranteed to be used
prefer separate calls to last
+ init
.
If you are guaranteed to use both, this will
be more efficient.
capitalise :: String -> String #
Convert a word to title case by capitalising the first letter
removeSpaces :: String -> String #
fuzzyMatch :: String -> [String] -> [String] #
fuzzyLookup :: String -> [(String, a)] -> [a] #
Search for possible matches to the users input in the given list, returning a small number of ranked results
strictZipWith :: (a -> b -> c) -> [a] -> [b] -> [c] #
strictZipWith3 :: (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d] #
looksLikeModuleName :: String -> Bool #
looksLikePackageName :: String -> Bool #
readSignificandExponentPair :: String -> (Integer, Integer) #
Parse a string into a significand and exponent. A trivial example might be: ghci> readSignificandExponentPair "1E2" (1,2) In a more complex case we might return a exponent different than that which the user wrote. This is needed in order to use a Integer significand. ghci> readSignificandExponentPair "-1.11E5" (-111,3)
readHexRational :: String -> Rational #
readHexSignificandExponentPair :: String -> (Integer, Integer) #
Parse a string into a significand and exponent according to the "Hexadecimal Floats in Haskell" proposal. A trivial example might be: ghci> readHexSignificandExponentPair "0x1p+1" (1,1) Behaves similar to readSignificandExponentPair but the base is 16 and numbers are given in hexadecimal: ghci> readHexSignificandExponentPair "0xAp-4" (10,-4) ghci> readHexSignificandExponentPair "0x1.2p3" (18,-1)
doesDirNameExist :: FilePath -> IO Bool #
getModificationUTCTime :: FilePath -> IO UTCTime #
fileHashIfExists :: FilePath -> IO (Maybe Fingerprint) #
withAtomicRename :: MonadIO m => FilePath -> (FilePath -> m a) -> m a #
escapeSpaces :: String -> String #
makeRelativeTo :: FilePath -> FilePath -> FilePath #
abstractConstr :: String -> Constr #
abstractDataType :: String -> DataType #
hashString :: String -> Int32 #
A sample hash function for Strings. We keep multiplying by the golden ratio and adding. The implementation is:
hashString = foldl' f golden where f m c = fromIntegral (ord c) * magic + hashInt32 m magic = 0xdeadbeef
Where hashInt32 works just as hashInt shown above.
Knuth argues that repeated multiplication by the golden ratio will minimize gaps in the hash space, and thus it's a good choice for combining together multiple keys to form one.
Here we know that individual characters c are often small, and this produces frequent collisions if we use ord c alone. A particular problem are the shorter low ASCII and ISO-8859-1 character strings. We pre-multiply by a magic twiddle factor to obtain a good distribution. In fact, given the following test:
testp :: Int32 -> Int testp k = (n - ) . length . group . sort . map hs . take n $ ls where ls = [] : [c : l | l <- ls, c <- ['\0'..'\xff']] hs = foldl' f golden f m c = fromIntegral (ord c) * k + hashInt32 m n = 100000
We discover that testp magic = 0.
bytesFS :: FastString -> ByteString #
Gives the Modified UTF-8 encoded bytes corresponding to a FastString
fastStringToByteString :: FastString -> ByteString #
Gives the Modified UTF-8 encoded bytes corresponding to a FastString
unsafeMkByteString :: String -> ByteString #
hPutFZS :: Handle -> FastZString -> IO () #
zString :: FastZString -> String #
zStringTakeN :: Int -> FastZString -> String #
zStringTakeN n =
but is performed in \(O(\min(n,l))\) rather than \(O(l)\),
where \(l\) is the length of the take
n . zString
FastZString
.
lengthFZS :: FastZString -> Int #
lexicalCompareFS :: FastString -> FastString -> Ordering #
Compare FastString lexically
If you don't care about the lexical ordering, use uniqCompareFS
instead.
uniqCompareFS :: FastString -> FastString -> Ordering #
Compare FastString by their Unique (not lexically).
Much cheaper than lexicalCompareFS
but non-deterministic!
mkFastString# :: Addr# -> FastString #
mkFastStringBytes :: Ptr Word8 -> Int -> FastString #
mkFastStringByteString :: ByteString -> FastString #
Create a FastString
by copying an existing ByteString
mkFastStringShortByteString :: ShortByteString -> FastString #
Create a FastString
from an existing ShortByteString
without
copying.
mkFastString :: String -> FastString #
Creates a UTF-8 encoded FastString
from a String
mkFastStringByteList :: [Word8] -> FastString #
Creates a FastString
from a UTF-8 encoded [Word8]
lengthFS :: FastString -> Int #
Returns the length of the FastString
in characters
nullFS :: FastString -> Bool #
Returns True
if the FastString
is empty
unpackFS :: FastString -> String #
Lazily unpacks and decodes the FastString
zEncodeFS :: FastString -> FastZString #
Returns a Z-encoded version of a FastString
. This might be the
original, if it was already Z-encoded. The first time this
function is applied to a particular FastString
, the results are
memoized.
appendFS :: FastString -> FastString -> FastString #
concatFS :: [FastString] -> FastString #
consFS :: Char -> FastString -> FastString #
unconsFS :: FastString -> Maybe (Char, FastString) #
uniqueOfFS :: FastString -> Int #
nilFS :: FastString #
getFastStringTable :: IO [[[FastString]]] #
hPutFS :: Handle -> FastString -> IO () #
Outputs a FastString
with no decoding at all, that is, you
get the actual bytes in the FastString
written to the Handle
.
mkPtrString# :: Addr# -> PtrString #
Wrap an unboxed address into a PtrString
.
unpackPtrString :: PtrString -> String #
unpackPtrStringTakeN :: Int -> PtrString -> String #
unpackPtrStringTakeN n =
but is performed in \(O(\min(n,l))\) rather than \(O(l)\),
where \(l\) is the length of the take
n . unpackPtrString
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.
Arguments
:: 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.
dataConCantHappen :: DataConCantHappen -> a #
Eliminate a DataConCantHappen
. See Note [Constructor cannot occur].
stableModuleNameCmp :: ModuleName -> ModuleName -> Ordering #
Compares module names lexically, rather than by their Unique
s
moduleNameFS :: ModuleName -> FastString #
moduleNameString :: ModuleName -> String #
mkModuleName :: String -> ModuleName #
mkModuleNameFS :: FastString -> ModuleName #
moduleNameSlashes :: ModuleName -> String #
Returns the string version of the module name, with dots replaced by slashes.
moduleNameColons :: ModuleName -> String #
Returns the string version of the module name, with dots replaced by colons.
mkVarOccFS :: FastString -> OccName #
mkRecFldSelOcc :: 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
showException :: Exception e => e -> String #
Show an exception as a string.
safeShowException :: Exception e => e -> IO String #
Show an exception which can possibly throw other exceptions. Used when displaying exception thrown within TH code.
showGhcExceptionUnsafe :: GhcException -> ShowS #
Append a description of the given exception to this string.
Note that this uses defaultSDocContext
, which doesn't use the options
set by the user via DynFlags.
showGhcException :: SDocContext -> GhcException -> ShowS #
Append a description of the given exception to this string.
throwGhcException :: GhcException -> a #
throwGhcExceptionIO :: GhcException -> IO a #
handleGhcException :: ExceptionMonad m => (GhcException -> m a) -> m a -> m a #
pprPanic :: HasCallStack => String -> SDoc -> a #
Throw an exception saying "bug in GHC" with a callstack
pgmErrorDoc :: String -> SDoc -> a #
Throw an exception saying "bug in pgm being compiled" (used for unusual program errors)
tryMost :: IO a -> IO (Either SomeException a) #
Like try, but pass through UserInterrupt and Panic exceptions. Used when we want soft failures when reading interface files, for example. TODO: I'm not entirely sure if this is catching what we really want to catch
withSignalHandlers :: ExceptionMonad m => m a -> m a #
Temporarily install standard signal handlers for catching ^C, which just throw an exception in the current thread.
callStackDoc :: HasCallStack => SDoc #
prettyCallStackDoc :: CallStack -> SDoc #
assertPprPanic :: HasCallStack => SDoc -> a #
Panic with an assertion failure, recording the given file and line number. Should typically be accessed with the ASSERT family of macros
assertPpr :: HasCallStack => Bool -> SDoc -> a -> a #
assertPprMaybe :: HasCallStack => Maybe SDoc -> a -> a #
massertPpr :: (HasCallStack, Applicative m) => Bool -> SDoc -> m () #
assertPprM :: (HasCallStack, Monad m) => m Bool -> SDoc -> m () #
pprIdDetails :: IdDetails -> SDoc #
Just a synonym for CoVarId
. Written separately so it can be
exported in the hs-boot file.
vanillaIdInfo :: IdInfo #
Basic IdInfo
that carries no useful information whatsoever
emptyPlugins :: Plugins #
tidyNameOcc :: Name -> OccName -> Name #
nameOccName :: Name -> OccName #
setNameUnique :: Name -> Unique -> Name #
nameUnique :: Name -> Unique #
mkPrelTyConRepName :: Name -> TyConRepName #
Make a Name
for the Typeable
representation of the given wired-in type
isUnboxedTupleTyCon :: TyCon -> Bool #
Is this the TyCon
for an unboxed tuple?
isTupleTyCon :: TyCon -> Bool #
Does this TyCon
represent a tuple?
NB: when compiling Data.Tuple
, the tycons won't reply True
to
isTupleTyCon
, because they are built as AlgTyCons
. However they
get spat into the interface file as tuple tycons, so I don't think
it matters.
mkForAllTy :: ForAllTyBinder -> Type -> Type #
Like mkTyCoForAllTy
, but does not check the occurrence of the binder
See Note [Unused coercion variable in ForAllTy]
noFreeVarsOfType :: Type -> Bool #
unitDirectlyUFM :: Unique -> elt -> UniqFM key elt #
listToUFM_Directly :: [(Unique, elt)] -> UniqFM key elt #
listToIdentityUFM :: Uniquable key => [key] -> UniqFM key key #
listToUFM_C :: Uniquable key => (elt -> elt -> elt) -> [(key, elt)] -> UniqFM key elt #
addListToUFM :: Uniquable key => UniqFM key elt -> [(key, elt)] -> UniqFM key elt #
addListToUFM_Directly :: UniqFM key elt -> [(Unique, elt)] -> UniqFM key elt #
addToUFM_Directly :: UniqFM key elt -> Unique -> elt -> UniqFM key elt #
addToUFM_C :: Uniquable key => (elt -> elt -> elt) -> UniqFM key elt -> key -> elt -> UniqFM key elt #
addToUFM_Acc :: Uniquable key => (elt -> elts -> elts) -> (elt -> elts) -> UniqFM key elts -> key -> elt -> UniqFM key elts #
addToUFM_L :: Uniquable key => (key -> elt -> elt -> elt) -> key -> elt -> UniqFM key elt -> (Maybe elt, UniqFM key elt) #
Add an element, returns previous lookup result and new map. If old element doesn't exist, add the passed element directly, otherwise compute the element to add using the passed function.
addListToUFM_C :: Uniquable key => (elt -> elt -> elt) -> UniqFM key elt -> [(key, elt)] -> UniqFM key elt #
Add elements to the map, combining existing values with inserted ones using the given function.
adjustUFM_Directly :: (elt -> elt) -> UniqFM key elt -> Unique -> UniqFM key elt #
delFromUFM :: Uniquable key => UniqFM key elt -> key -> UniqFM key elt #
delListFromUFM :: Uniquable key => UniqFM key elt -> [key] -> UniqFM key elt #
delListFromUFM_Directly :: UniqFM key elt -> [Unique] -> UniqFM key elt #
delFromUFM_Directly :: UniqFM key elt -> Unique -> UniqFM key elt #
plusUFM_CD :: (elta -> eltb -> eltc) -> UniqFM key elta -> elta -> UniqFM key eltb -> eltb -> UniqFM key eltc #
`plusUFM_CD f m1 d1 m2 d2` merges the maps using f
as the
combinding function and d1
resp. d2
as the default value if
there is no entry in m1
reps. m2
. The domain is the union of
the domains of m1
and m2
.
IMPORTANT NOTE: This function strictly applies the modification function and forces the result unlike most the other functions in this module.
Representative example:
plusUFM_CD f {A: 1, B: 2} 23 {B: 3, C: 4} 42 == {A: f 1 42, B: f 2 3, C: f 23 4 }
plusUFM_CD2 :: (Maybe elta -> Maybe eltb -> eltc) -> UniqFM key elta -> UniqFM key eltb -> UniqFM key eltc #
`plusUFM_CD2 f m1 m2` merges the maps using f
as the combining
function. Unlike plusUFM_CD
, a missing value is not defaulted: it is
instead passed as Nothing
to f
. f
can never have both its arguments
be Nothing
.
IMPORTANT NOTE: This function strictly applies the modification function and forces the result.
`plusUFM_CD2 f m1 m2` is the same as `plusUFM_CD f (mapUFM Just m1) Nothing (mapUFM Just m2) Nothing`.
mergeUFM :: (elta -> eltb -> Maybe eltc) -> (UniqFM key elta -> UniqFM key eltc) -> (UniqFM key eltb -> UniqFM key eltc) -> UniqFM key elta -> UniqFM key eltb -> UniqFM key eltc #
plusUFMList :: [UniqFM key elt] -> UniqFM key elt #
sequenceUFMList :: [UniqFM key elt] -> UniqFM key [elt] #
minusUFM_C :: (elt1 -> elt2 -> Maybe elt1) -> UniqFM key elt1 -> UniqFM key elt2 -> UniqFM key elt1 #
intersectUFM :: UniqFM key elt1 -> UniqFM key elt2 -> UniqFM key elt1 #
intersectUFM_C :: (elt1 -> elt2 -> elt3) -> UniqFM key elt1 -> UniqFM key elt2 -> UniqFM key elt3 #
disjointUFM :: UniqFM key elt1 -> UniqFM key elt2 -> Bool #
mapMaybeUFM :: (elt1 -> Maybe elt2) -> UniqFM key elt1 -> UniqFM key elt2 #
mapUFM_Directly :: (Unique -> elt1 -> elt2) -> UniqFM key elt1 -> UniqFM key elt2 #
elemUFM_Directly :: Unique -> UniqFM key elt -> Bool #
lookupUFM_Directly :: UniqFM key elt -> Unique -> Maybe elt #
lookupWithDefaultUFM :: Uniquable key => UniqFM key elt -> elt -> key -> elt #
lookupWithDefaultUFM_Directly :: UniqFM key elt -> elt -> Unique -> elt #
ufmToSet_Directly :: UniqFM key elt -> IntSet #
seqEltsUFM :: (elt -> ()) -> UniqFM key elt -> () #
nonDetEltsUFM :: UniqFM key elt -> [elt] #
nonDetKeysUFM :: UniqFM key elt -> [Unique] #
nonDetStrictFoldUFM :: (elt -> a -> a) -> a -> UniqFM key elt -> a #
nonDetStrictFoldUFM_DirectlyM :: Monad m => (Unique -> b -> elt -> m b) -> b -> UniqFM key elt -> m b #
In essence foldM See Note [Deterministic UniqFM] to learn about nondeterminism. If you use this please provide a justification why it doesn't introduce nondeterminism.
nonDetStrictFoldUFM_Directly :: (Unique -> elt -> a -> a) -> a -> UniqFM key elt -> a #
nonDetUFMToList :: UniqFM key elt -> [(Unique, elt)] #
ufmToIntMap :: UniqFM key elt -> IntMap elt #
unsafeIntMapToUFM :: IntMap elt -> UniqFM key elt #
unsafeCastUFMKey :: UniqFM key1 elt -> UniqFM key2 elt #
Cast the key domain of a UniqFM.
As long as the domains don't overlap in their uniques this is safe.
equalKeysUFM :: UniqFM key a -> UniqFM key b -> Bool #
Arguments
:: UniqFM key a | The things to be pretty printed |
-> ([a] -> SDoc) | The pretty printing function to use on the elements |
-> SDoc |
|
Pretty-print a non-deterministic set. The order of variables is non-deterministic and for pretty-printing that shouldn't be a problem. Having this function helps contain the non-determinism created with nonDetEltsUFM.
Arguments
:: UniqFM key a | The things to be pretty printed |
-> ([(Unique, a)] -> SDoc) | The pretty printing function to use on the elements |
-> SDoc |
|
Pretty-print a non-deterministic set. The order of variables is non-deterministic and for pretty-printing that shouldn't be a problem. Having this function helps contain the non-determinism created with nonDetUFMToList.
pluralUFM :: UniqFM key a -> SDoc #
Determines the pluralisation suffix appropriate for the length of a set in the same way that plural from Outputable does for lists.
insertList :: Ord key => [(key, elt)] -> Map key elt -> Map key elt #
insertListWith :: Ord key => (elt -> elt -> elt) -> [(key, elt)] -> Map key elt -> Map key elt #
deleteList :: Ord key => [key] -> Map key elt -> Map key elt #
foldRightWithKey :: (key -> elt -> a -> a) -> a -> Map key elt -> a #
mkSplitUniqSupply :: Char -> IO UniqSupply #
Create a unique supply out of thin air. The "mask" (Char) supplied is purely cosmetic, making it easier to figure out where a Unique was born. See Note [Uniques and masks].
The payload part of the Uniques allocated from this UniqSupply are
guaranteed distinct wrt all other supplies, regardless of their "mask".
This is achieved by allocating the payload part from
a single source of Uniques, namely genSym
, shared across
all UniqSupply's.
initUniqSupply :: Word -> Int -> IO () #
uniqFromMask :: Char -> IO Unique #
splitUniqSupply :: UniqSupply -> (UniqSupply, UniqSupply) #
Build two UniqSupply
from a single one, each of which
can supply its own Unique
.
listSplitUniqSupply :: UniqSupply -> [UniqSupply] #
Create an infinite list of UniqSupply
from a single one
uniqFromSupply :: UniqSupply -> Unique #
Obtain the Unique
from this particular UniqSupply
uniqsFromSupply :: UniqSupply -> [Unique] #
Obtain an infinite list of Unique
that can be generated by constant splitting of the supply
takeUniqFromSupply :: UniqSupply -> (Unique, UniqSupply) #
Obtain the Unique
from this particular UniqSupply
, and a new supply
initUs :: UniqSupply -> UniqSM a -> (a, UniqSupply) #
Run the UniqSM
action, returning the final UniqSupply
initUs_ :: UniqSupply -> UniqSM a -> a #
Run the UniqSM
action, discarding the final UniqSupply
mkRealSrcLoc :: FastString -> Int -> Int -> RealSrcLoc #
leftmostColumn :: Int #
Indentation level is 1-indexed, so the leftmost column is 1.
Built-in "bad" RealSrcLoc
values for particular locations
Built-in "bad" RealSrcLoc
values for particular locations
Built-in "bad" RealSrcLoc
values for particular locations
mkGeneralSrcLoc :: FastString -> SrcLoc #
Creates a "bad" RealSrcLoc
that has no detailed information about its location
srcLocLine :: RealSrcLoc -> Int #
Raises an error when used on a "bad" RealSrcLoc
srcLocCol :: RealSrcLoc -> Int #
Raises an error when used on a "bad" RealSrcLoc
advanceSrcLoc :: RealSrcLoc -> Char -> RealSrcLoc #
Move the RealSrcLoc
down by one line if the character is a newline,
to the next 8-char tabstop if it is a tab, and across by one
character in any other case
advanceBufPos :: BufPos -> BufPos #
sortLocated :: [Located a] -> [Located a] #
sortRealLocated :: [RealLocated a] -> [RealLocated a] #
lookupSrcLoc :: SrcLoc -> Map RealSrcLoc a -> Maybe a #
lookupSrcSpan :: SrcSpan -> Map RealSrcSpan a -> Maybe a #
removeBufSpan :: SrcSpan -> SrcSpan #
getBufSpan :: SrcSpan -> Maybe BufSpan #
Built-in "bad" SrcSpan
s for common sources of location uncertainty
interactiveSrcSpan :: SrcSpan #
Built-in "bad" SrcSpan
s for common sources of location uncertainty
Built-in "bad" SrcSpan
s for common sources of location uncertainty
isGeneratedSrcSpan :: SrcSpan -> Bool #
isNoSrcSpan :: SrcSpan -> Bool #
mkGeneralSrcSpan :: FastString -> SrcSpan #
Create a "bad" SrcSpan
that has not location information
srcLocSpan :: SrcLoc -> SrcSpan #
Create a SrcSpan
corresponding to a single point
realSrcLocSpan :: RealSrcLoc -> RealSrcSpan #
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.
combineRealSrcSpans :: RealSrcSpan -> RealSrcSpan -> RealSrcSpan #
Combines two SrcSpan
into one that spans at least all the characters
within both spans. Assumes the "file" part is the same in both inputs
combineBufSpans :: BufSpan -> BufSpan -> BufSpan #
srcSpanFirstCharacter :: SrcSpan -> SrcSpan #
Convert a SrcSpan into one that represents only its first character
isGoodSrcSpan :: SrcSpan -> Bool #
Test if a SrcSpan
is "good", i.e. has precise location information
isOneLineSpan :: SrcSpan -> Bool #
True if the span is known to straddle only one line.
For "bad" SrcSpan
, it returns False
isZeroWidthSpan :: SrcSpan -> Bool #
True if the span has a width of zero, as returned for "virtual"
semicolons in the lexer.
For "bad" SrcSpan
, it returns False
containsSpan :: RealSrcSpan -> RealSrcSpan -> Bool #
Tests whether the first span "contains" the other span, meaning that it covers at least as much source code. True where spans are equal.
srcSpanStartLine :: RealSrcSpan -> Int #
srcSpanEndLine :: RealSrcSpan -> Int #
srcSpanStartCol :: RealSrcSpan -> Int #
srcSpanEndCol :: RealSrcSpan -> Int #
srcSpanStart :: SrcSpan -> SrcLoc #
srcSpanEnd :: SrcSpan -> SrcLoc #
realSrcSpanEnd :: RealSrcSpan -> RealSrcLoc #
srcSpanFileName_maybe :: SrcSpan -> Maybe FastString #
Obtains the filename for a SrcSpan
if it is "good"
pprUserSpan :: Bool -> SrcSpan -> SDoc #
pprUserRealSpan :: Bool -> RealSrcSpan -> SDoc #
unLoc :: GenLocated l e -> e #
getLoc :: GenLocated l e -> l #
mkGeneralLocated :: String -> e -> Located e #
combineLocs :: Located a -> Located b -> SrcSpan #
addCLoc :: Located a -> Located b -> c -> Located c #
Combine locations from two Located
things and add them to a third thing
eqLocated :: Eq a => GenLocated l a -> GenLocated l a -> Bool #
Tests whether the two located things are equal
cmpLocated :: Ord a => GenLocated l a -> GenLocated l a -> Ordering #
Tests the ordering of the two located things
cmpBufSpan :: HasDebugCallStack => Located a -> Located a -> Ordering #
pprLocated :: (Outputable l, Outputable e) => GenLocated l e -> SDoc #
pprLocatedAlways :: (Outputable l, Outputable e) => GenLocated l e -> SDoc #
Always prints the location, even without -dppr-debug
spans :: SrcSpan -> (Int, Int) -> Bool #
Determines whether a span encloses a given line and column index
Arguments
:: SrcSpan | The span that may be enclosed by the other |
-> SrcSpan | The span it may be enclosed by |
-> Bool |
Determines whether a span is enclosed by another one
Arguments
:: RealSrcSpan | The span that may be enclosed by the other |
-> RealSrcSpan | The span it may be enclosed by |
-> Bool |
Determines whether a span is enclosed by another one
getRealSrcSpan :: RealLocated a -> RealSrcSpan #
unRealSrcSpan :: RealLocated a -> a #
psLocatedToLocated :: PsLocated a -> Located a #
advancePsLoc :: PsLoc -> Char -> PsLoc #
psSpanStart :: PsSpan -> PsLoc #
mkSrcSpanPs :: PsSpan -> SrcSpan #
emptyFsEnv :: FastStringEnv a #
extendFsEnv :: FastStringEnv a -> FastString -> a -> FastStringEnv a #
lookupFsEnv :: FastStringEnv a -> FastString -> Maybe a #
mkFsEnv :: [(FastString, a)] -> FastStringEnv a #
emptyUniqSet :: UniqSet a #
unitUniqSet :: Uniquable a => a -> UniqSet a #
addOneToUniqSet :: Uniquable a => UniqSet a -> a -> UniqSet a #
addListToUniqSet :: Uniquable a => UniqSet a -> [a] -> UniqSet a #
delOneFromUniqSet :: Uniquable a => UniqSet a -> a -> UniqSet a #
delOneFromUniqSet_Directly :: UniqSet a -> Unique -> UniqSet a #
delListFromUniqSet :: Uniquable a => UniqSet a -> [a] -> UniqSet a #
delListFromUniqSet_Directly :: UniqSet a -> [Unique] -> UniqSet a #
unionUniqSets :: UniqSet a -> UniqSet a -> UniqSet a #
unionManyUniqSets :: [UniqSet a] -> UniqSet a #
minusUniqSet :: UniqSet a -> UniqSet a -> UniqSet a #
intersectUniqSets :: UniqSet a -> UniqSet a -> UniqSet a #
disjointUniqSets :: UniqSet a -> UniqSet a -> Bool #
restrictUniqSetToUFM :: UniqSet key -> UniqFM key b -> UniqSet key #
uniqSetMinusUFM :: UniqSet key -> UniqFM key b -> UniqSet key #
uniqSetMinusUDFM :: UniqSet key -> UniqDFM key b -> UniqSet key #
elementOfUniqSet :: Uniquable a => a -> UniqSet a -> Bool #
elemUniqSet_Directly :: Unique -> UniqSet a -> Bool #
filterUniqSet :: (a -> Bool) -> UniqSet a -> UniqSet a #
uniqSetAny :: (a -> Bool) -> UniqSet a -> Bool #
uniqSetAll :: (a -> Bool) -> UniqSet a -> Bool #
sizeUniqSet :: UniqSet a -> Int #
isEmptyUniqSet :: UniqSet a -> Bool #
lookupUniqSet :: Uniquable key => UniqSet key -> key -> Maybe key #
What's the point you might ask? We might have changed an object without it's key changing. In which case this lookup makes sense.
lookupUniqSet_Directly :: UniqSet a -> Unique -> Maybe a #
nonDetEltsUniqSet :: UniqSet elt -> [elt] #
nonDetKeysUniqSet :: UniqSet elt -> [Unique] #
nonDetStrictFoldUniqSet :: (elt -> a -> a) -> a -> UniqSet elt -> a #
mapUniqSet :: Uniquable b => (a -> b) -> UniqSet a -> UniqSet b #
getUniqSet :: UniqSet a -> UniqFM a a #
unsafeUFMToUniqSet :: UniqFM a a -> UniqSet a #
unsafeUFMToUniqSet
converts a
into a UniqFM
a
assuming, without checking, that it maps each UniqSet
aUnique
to a value
that has that Unique
. See Note [UniqSet invariant].
pprUniqSet :: (a -> SDoc) -> UniqSet a -> SDoc #
pprWithSourceText :: SourceText -> SDoc -> SDoc #
Special combinator for showing string literals.
mkIntegralLit :: Integral a => a -> IntegralLit #
mkFractionalLit :: SourceText -> Bool -> Rational -> Integer -> FractionalExponentBase -> FractionalLit #
integralFractionalLit :: Bool -> Integer -> FractionalLit #
The integer should already be negated if it's negative.
mkSourceFractionalLit :: String -> Bool -> Integer -> Integer -> FractionalExponentBase -> FractionalLit #
The arguments should already be negated if they are negative.
optimisationFlags :: EnumSet GeneralFlag #
The set of flags which affect optimisation for the purposes of recompilation avoidance. Specifically, these include flags which affect code generation but not the semantics of the program.
See Note [Ignoring some flag changes] in GHC.Iface.Recomp.Flags)
codeGenFlags :: EnumSet GeneralFlag #
The set of flags which affect code generation and can change a program's runtime behavior (other than performance). These include flags which affect:
- user visible debugging information (e.g. info table provenance)
- the ability to catch runtime errors (e.g. -fignore-asserts)
- the runtime result of the program (e.g. -fomit-yields)
- which code or interface file declarations are emitted
We also considered placing flags which affect asympototic space behavior (e.g. -ffull-laziness) however this would mean that changing optimisation levels would trigger recompilation even with -fignore-optim-changes, regressing #13604.
Also, arguably Opt_IgnoreAsserts should be here as well; however, we place
it instead in optimisationFlags
since it is implied by -O[12]
and
therefore would also break #13604.
See #23369.
moduleUnitId :: Module -> UnitId #
mkModule :: u -> ModuleName -> GenModule u #
isHoleUnit :: GenUnit u -> Bool #
stableUnitCmp :: Unit -> Unit -> Ordering #
Compares unit ids lexically, rather than by their Unique
s
unitFreeModuleHoles :: GenUnit u -> UniqDSet ModuleName #
Retrieve the set of free module holes of a Unit
.
moduleFreeHoles :: GenModule (GenUnit u) -> UniqDSet ModuleName #
Calculate the free holes of a GenModule
. If this set is non-empty,
this module was defined in an indefinite library that had required
signatures.
If a module has free holes, that means that substitutions can operate on it; if it has no free holes, substituting over a module has no effect.
mkInstantiatedUnit :: IsUnitId u => u -> GenInstantiations u -> GenInstantiatedUnit u #
Create a new GenInstantiatedUnit
given an explicit module substitution.
mkVirtUnit :: IsUnitId u => u -> [(ModuleName, GenModule (GenUnit u))] -> GenUnit u #
Smart constructor for instantiated GenUnit
mkInstantiatedUnitHash :: IsUnitId u => u -> [(ModuleName, GenModule (GenUnit u))] -> FastString #
Generate a uniquely identifying hash (internal unit-id) for an instantiated unit.
This is a one-way function. If the indefinite unit has not been instantiated at all, we return its unit-id.
This hash is completely internal to GHC and is not used for symbol names or file paths. It is different from the hash Cabal would produce for the same instantiated unit.
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 #
stringToUnit :: String -> Unit #
mapInstantiations :: IsUnitId v => (u -> v) -> GenInstantiations u -> GenInstantiations v #
Map over the unit identifier of unit instantiations.
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.
virtualUnitId :: InstantiatedUnit -> UnitId #
Return the virtual UnitId of an on-the-fly instantiated unit.
unitIsDefinite :: Unit -> Bool #
A Unit
is definite if it has no free holes.
unitIdString :: UnitId -> String #
stringToUnitId :: String -> UnitId #
primUnitId :: UnitId #
bignumUnitId :: UnitId #
baseUnitId :: UnitId #
thisGhcUnitId :: UnitId #
bignumUnit :: Unit #
thisGhcUnit :: Unit #
interactiveUnit :: Unit #
mainUnitId :: UnitId #
This is the package Id for the current program. It is the default package Id if you don't specify a package name. We don't add this prefix to symbol names, since there can be only one main package per program.
isInteractiveModule :: Module -> Bool #
wiredInUnitIds :: [UnitId] #
addBootSuffix :: FilePath -> FilePath #
Add the -boot
suffix to .hs, .hi and .o files
removeBootSuffix :: FilePath -> FilePath #
Remove the -boot
suffix to .hs, .hi and .o files
addBootSuffix_maybe :: IsBootInterface -> FilePath -> FilePath #
Add the -boot
suffix if the Bool
argument is True
addBootSuffixLocn :: ModLocation -> ModLocation #
Add the -boot
suffix to all file paths associated with the module
addBootSuffixLocnOut :: ModLocation -> ModLocation #
Add the -boot
suffix to all output file paths associated with the
module, not including the input file itself
elemModuleEnv :: Module -> ModuleEnv a -> Bool #
extendModuleEnv :: ModuleEnv a -> Module -> a -> ModuleEnv a #
extendModuleEnvWith :: (a -> a -> a) -> ModuleEnv a -> Module -> a -> ModuleEnv a #
extendModuleEnvList :: ModuleEnv a -> [(Module, a)] -> ModuleEnv a #
extendModuleEnvList_C :: (a -> a -> a) -> ModuleEnv a -> [(Module, a)] -> ModuleEnv a #
plusModuleEnv_C :: (a -> a -> a) -> ModuleEnv a -> ModuleEnv a -> ModuleEnv a #
delModuleEnvList :: ModuleEnv a -> [Module] -> ModuleEnv a #
delModuleEnv :: ModuleEnv a -> Module -> ModuleEnv a #
plusModuleEnv :: ModuleEnv a -> ModuleEnv a -> ModuleEnv a #
lookupModuleEnv :: ModuleEnv a -> Module -> Maybe a #
lookupWithDefaultModuleEnv :: ModuleEnv a -> a -> Module -> a #
mapModuleEnv :: (a -> b) -> ModuleEnv a -> ModuleEnv b #
mkModuleEnv :: [(Module, a)] -> ModuleEnv a #
emptyModuleEnv :: ModuleEnv a #
moduleEnvKeys :: ModuleEnv a -> [Module] #
moduleEnvElts :: ModuleEnv a -> [a] #
moduleEnvToList :: ModuleEnv a -> [(Module, a)] #
unitModuleEnv :: Module -> a -> ModuleEnv a #
isEmptyModuleEnv :: ModuleEnv a -> Bool #
mkModuleSet :: [Module] -> ModuleSet #
extendModuleSet :: ModuleSet -> Module -> ModuleSet #
extendModuleSetList :: ModuleSet -> [Module] -> ModuleSet #
isEmptyModuleSet :: ModuleSet -> Bool #
moduleSetElts :: ModuleSet -> [Module] #
elemModuleSet :: Module -> ModuleSet -> Bool #
intersectModuleSet :: ModuleSet -> ModuleSet -> ModuleSet #
minusModuleSet :: ModuleSet -> ModuleSet -> ModuleSet #
delModuleSet :: ModuleSet -> Module -> ModuleSet #
unionModuleSet :: ModuleSet -> ModuleSet -> ModuleSet #
unionManyModuleSets :: [ModuleSet] -> ModuleSet #
unitModuleSet :: Module -> ModuleSet #
lookupInstalledModuleEnv :: InstalledModuleEnv a -> InstalledModule -> Maybe a #
extendInstalledModuleEnv :: InstalledModuleEnv a -> InstalledModule -> a -> InstalledModuleEnv a #
filterInstalledModuleEnv :: (InstalledModule -> a -> Bool) -> InstalledModuleEnv a -> InstalledModuleEnv a #
installedModuleEnvElts :: InstalledModuleEnv a -> [(InstalledModule, a)] #
mergeInstalledModuleEnv :: (elta -> eltb -> Maybe eltc) -> (InstalledModuleEnv elta -> InstalledModuleEnv eltc) -> (InstalledModuleEnv eltb -> InstalledModuleEnv eltc) -> InstalledModuleEnv elta -> InstalledModuleEnv eltb -> InstalledModuleEnv eltc #
plusInstalledModuleEnv :: (elt -> elt -> elt) -> InstalledModuleEnv elt -> InstalledModuleEnv elt -> InstalledModuleEnv elt #
moduleIsDefinite :: Module -> Bool #
A GenModule
is definite if it has no free holes.
moduleStableString :: Module -> String #
Get a string representation of a GenModule
that's unique and stable
across recompilations.
eg. "$aeson_70dylHtv1FFGeai1IoxcQr$Data.Aeson.Types.Internal"
stableModuleCmp :: Module -> Module -> Ordering #
This gives a stable ordering, as opposed to the Ord instance which
gives an ordering based on the Unique
s of the components, which may
not be stable from run to run of the compiler.
installedModuleEq :: InstalledModule -> Module -> Bool #
Test if a GenModule
corresponds to a given InstalledModule
,
modulo instantiation.
getModuleInstantiation :: Module -> (InstalledModule, Maybe InstantiatedModule) #
Given a possibly on-the-fly instantiated module, split it into
a GenModule
that we definitely can find on-disk, as well as an
instantiation if we need to instantiate it on the fly. If the
instantiation is Nothing
no on-the-fly renaming is needed.
getUnitInstantiations :: Unit -> (UnitId, Maybe InstantiatedUnit) #
Return the unit-id this unit is an instance of and the module instantiations (if any).
uninstantiateInstantiatedUnit :: InstantiatedUnit -> InstantiatedUnit #
Remove instantiations of the given instantiated unit
uninstantiateInstantiatedModule :: InstantiatedModule -> InstantiatedModule #
Remove instantiations of the given module instantiated unit
isHoleModule :: GenModule (GenUnit u) -> Bool #
Test if a Module is not instantiated
mkHoleModule :: ModuleName -> GenModule (GenUnit u) #
Create a hole Module
homeUnitId :: GenHomeUnit u -> UnitId #
Return home unit id
homeUnitInstantiations :: GenHomeUnit u -> GenInstantiations u #
Return home unit instantiations
homeUnitInstanceOf :: HomeUnit -> UnitId #
Return the unit id of the unit that is instantiated by the home unit.
E.g. if home unit = q[A=p:B,...] we return q.
If the home unit is not an instance of another unit, we return its own unit id (it is an instance of itself if you will).
homeUnitInstanceOfMaybe :: GenHomeUnit u -> Maybe u #
Return the unit id of the unit that is instantiated by the home unit.
E.g. if home unit = q[A=p:B,...] we return (Just q).
If the home unit is not an instance of another unit, we return Nothing.
homeUnitAsUnit :: HomeUnit -> Unit #
Return the home unit as a normal unit.
We infer from the home unit itself the kind of unit we create:
1. If the home unit is definite, we must be compiling so we return a real
unit. The definite home unit may be the result of a unit instantiation,
say `p = q[A=r:X]`. In this case we could have returned a virtual unit
`q[A=r:X]` but it's not what the clients of this function expect,
especially because p
is lost when we do this. The unit id of a virtual
unit is made up internally so `unitId(q[A=r:X])` is not equal to p
.
- If the home unit is indefinite we can only create a virtual unit from it. It's ok because we must be only typechecking the home unit so we won't produce any code object that rely on the unit id of this virtual unit.
homeUnitMap :: IsUnitId v => (u -> v) -> GenHomeUnit u -> GenHomeUnit v #
Map over the unit identifier for instantiating units
isHomeUnitIndefinite :: GenHomeUnit u -> Bool #
Test if we are type-checking an indefinite unit
(if it is not, we should never use on-the-fly renaming)
isHomeUnitDefinite :: GenHomeUnit u -> Bool #
Test if we are compiling a definite unit
(if it is, we should never use on-the-fly renaming)
isHomeUnitInstantiating :: GenHomeUnit u -> Bool #
Test if we are compiling by instantiating a definite unit
isHomeUnit :: HomeUnit -> Unit -> Bool #
Test if the unit is the home unit
isHomeUnitId :: GenHomeUnit u -> UnitId -> Bool #
Test if the unit-id is the home unit-id
notHomeUnitId :: Maybe (GenHomeUnit u) -> UnitId -> Bool #
Test if the unit-id is not the home unit-id
isHomeUnitInstanceOf :: HomeUnit -> UnitId -> Bool #
Test if the home unit is an instance of the given unit-id
isHomeModule :: HomeUnit -> Module -> Bool #
Test if the module comes from the home unit
isHomeInstalledModule :: GenHomeUnit u -> InstalledModule -> Bool #
Test if the module comes from the home unit
notHomeInstalledModule :: GenHomeUnit u -> InstalledModule -> Bool #
Test if a module doesn't come from the given home unit
notHomeInstalledModuleMaybe :: Maybe (GenHomeUnit u) -> InstalledModule -> Bool #
Test if a module doesn't come from the given home unit
notHomeModule :: HomeUnit -> Module -> Bool #
Test if a module doesn't come from the given home unit
notHomeModuleMaybe :: Maybe HomeUnit -> Module -> Bool #
Test if a module doesn't come from the given home unit
mkHomeModule :: HomeUnit -> ModuleName -> Module #
Make a module in home unit
mkHomeInstalledModule :: GenHomeUnit u -> ModuleName -> InstalledModule #
Make a module in home unit
homeModuleNameInstantiation :: HomeUnit -> ModuleName -> Module #
Return the module that is used to instantiate the given home module name. If the ModuleName doesn't refer to a signature, return the actual home module.
E.g., the instantiating module of A
in p[A=q[]:B]
is q[]:B
.
the instantiating module of A
in p
is p:A
.
homeModuleInstantiation :: Maybe HomeUnit -> Module -> Module #
Return the module that is used to instantiate the given home module.
If the given module isn't a module hole, return the actual home module.
E.g., the instantiating module of p:A
in p[A=q[]:B]
is q[]:B
.
the instantiating module of r:A
in p[A=q[]:B]
is r:A
.
the instantiating module of p:A
in p
is p:A
.
the instantiating module of r:A
in p
is r:A
.
isPromoted :: PromotionFlag -> Bool #
pickLR :: LeftOrRight -> (a, a) -> a #
mkAlignment :: Int -> Alignment #
alignmentOf :: Int -> Alignment #
noOneShotInfo :: OneShotInfo #
It is always safe to assume that an Id
has no lambda-bound variable information
isOneShotInfo :: OneShotInfo -> Bool #
hasNoOneShotInfo :: OneShotInfo -> Bool #
worstOneShot :: OneShotInfo -> OneShotInfo -> OneShotInfo #
bestOneShot :: OneShotInfo -> OneShotInfo -> OneShotInfo #
pprRuleName :: RuleName -> SDoc #
isNotTopLevel :: TopLevelFlag -> Bool #
isTopLevel :: TopLevelFlag -> Bool #
isMarkedCbv :: CbvMark -> Bool #
boolToRecFlag :: Bool -> RecFlag #
isGenerated :: Origin -> Bool #
hasIncoherentFlag :: OverlapMode -> Bool #
hasOverlappableFlag :: OverlapMode -> Bool #
hasOverlappingFlag :: OverlapMode -> Bool #
tupleSortBoxity :: TupleSort -> Boxity #
boxityTupleSort :: Boxity -> TupleSort #
tupleParens :: TupleSort -> SDoc -> SDoc #
Arguments
:: (a -> SDoc) | The pretty printing function to use |
-> a | The things to be pretty printed |
-> ConTag | Alternative (one-based) |
-> Arity | Arity |
-> SDoc |
|
Pretty print an alternative in an unboxed sum e.g. "| a | |".
isNoOccInfo :: OccInfo -> Bool #
isManyOccs :: OccInfo -> Bool #
seqOccInfo :: OccInfo -> () #
tailCallInfo :: OccInfo -> TailCallInfo #
zapOccTailCallInfo :: OccInfo -> OccInfo #
isAlwaysTailCalled :: OccInfo -> Bool #
isWeakLoopBreaker :: OccInfo -> Bool #
isStrongLoopBreaker :: OccInfo -> Bool #
zapFragileOcc :: OccInfo -> OccInfo #
successIf :: Bool -> SuccessFlag #
succeeded :: SuccessFlag -> Bool #
failed :: SuccessFlag -> Bool #
beginPhase :: Activation -> CompilerPhase #
activeAfter :: CompilerPhase -> Activation #
nextPhase :: CompilerPhase -> CompilerPhase #
laterPhase :: CompilerPhase -> CompilerPhase -> CompilerPhase #
isActive :: CompilerPhase -> Activation -> Bool #
activeInFinalPhase :: Activation -> Bool #
isNeverActive :: Activation -> Bool #
isAlwaysActive :: Activation -> Bool #
competesWith :: Activation -> Activation -> Bool #
isConLike :: RuleMatchInfo -> Bool #
isFunLike :: RuleMatchInfo -> Bool #
noUserInlineSpec :: InlineSpec -> Bool #
isInlinePragma :: InlinePragma -> Bool #
isInlinablePragma :: InlinePragma -> Bool #
isNoInlinePragma :: InlinePragma -> Bool #
isAnyInlinePragma :: InlinePragma -> Bool #
isOpaquePragma :: InlinePragma -> Bool #
inlinePragmaSat :: InlinePragma -> Maybe Arity #
inlinePragmaName :: InlineSpec -> SDoc #
Outputs string for pragma name for any of INLINEINLINABLENOINLINE. This differs from the Outputable instance for the InlineSpec type where the pragma name string as well as the accompanying SourceText (if any) is printed.
pprInline :: InlinePragma -> SDoc #
Pretty-print without displaying the user-specified InlineSpec
.
pprInlineDebug :: InlinePragma -> SDoc #
Pretty-print including the user-specified InlineSpec
.
isStableSource :: UnfoldingSource -> Bool #
intGtLimit :: Int -> IntWithInf -> Bool #
subWithInf :: IntWithInf -> Int -> IntWithInf #
Subtract an IntWithInf
from an IntWithInf
treatZeroAsInf :: Int -> IntWithInf #
Turn a positive number into an IntWithInf
, where 0 represents infinity
mkIntWithInf :: Int -> IntWithInf #
Inject any integer into an IntWithInf
isTypeLevel :: TypeOrKind -> Bool #
isKindLevel :: TypeOrKind -> Bool #
mightBeLifted :: Maybe Levity -> Bool #
mightBeUnlifted :: Maybe Levity -> Bool #
promoteDataCon :: DataCon -> TyCon #
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
)
isTypeDataCon :: DataCon -> Bool #
Is this data constructor in a "type data" declaration? See Note [Type data declarations] in GHC.Rename.Module.
isUnboxedSumDataCon :: DataCon -> Bool #
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
dataConStupidTheta :: DataCon -> ThetaType #
The "stupid theta" of the DataCon
, such as data Eq a
in:
data Eq a => T a = ...
See Note [The stupid context]
.
dataConInstOrigArgTys :: DataCon -> [Type] -> [Scaled Type] #
Returns just the instantiated value argument types of a DataCon
,
(excluding dictionary args)
dataConFieldLabels :: DataCon -> [FieldLabel] #
The labels for the fields of this particular DataCon
dataConSourceArity :: DataCon -> Arity #
Source-level arity of the data constructor
dataConUserTyVarBinders :: DataCon -> [InvisTVBinder] #
InvisTVBinder
s for the type variables of the constructor, in the order the
user wrote them
dataConUserTyVars :: DataCon -> [TyVar] #
The type variables of the constructor, in the order the user wrote them
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 #
sumDataCon :: ConTag -> Arity -> DataCon #
Data constructor for i-th alternative of a n-ary unboxed sum.
cTupleSelIdName :: ConTag -> Arity -> Name #
cTupleTyConName :: Arity -> Name #
cTupleDataConName :: Arity -> Name #
cTupleDataCon :: Arity -> DataCon #
tupleTyCon :: Boxity -> Arity -> TyCon #
tupleDataCon :: Boxity -> Arity -> DataCon #
promotedTupleDataCon :: Boxity -> Arity -> TyCon #
tupleDataConName :: Boxity -> Arity -> Name #
tupleTyConName :: TupleSort -> Arity -> Name #
multMulTyCon :: TyCon #
manyDataConTy :: Type #
oneDataConTy :: Type #
multiplicityTy :: Type #
unboxedTupleKind :: [Type] -> Kind #
Specialization of unboxedTupleSumKind
for tuples
anyTypeOfKind :: Kind -> Type #
vec2DataConTy :: Type #
vec4DataConTy :: Type #
vec8DataConTy :: Type #
vec16DataConTy :: Type #
vec32DataConTy :: Type #
vec64DataConTy :: Type #
liftedDataConTy :: Type #
runtimeRepTy :: Type #
levityTyCon :: TyCon #
vecCountTyCon :: TyCon #
vecElemTyCon :: TyCon #
constraintKind :: Kind #
liftedRepTyCon :: TyCon #
type LiftedRep = 'BoxedRep 'Lifted
type UnliftedRep = 'BoxedRep 'Unlifted
liftedTypeKind :: Type #
zeroBitTypeKind :: Type #
coercibleTyCon :: TyCon #
mkBoxedTupleTy :: [Type] -> Type #
Build the type of a small tuple that holds the specified type of thing Flattens 1-tuples. See Note [One-tuples].
typeSymbolKind :: Kind #
isDataConNameSpace :: NameSpace -> Bool #
isTcClsNameSpace :: NameSpace -> Bool #
isTvNameSpace :: NameSpace -> Bool #
isVarNameSpace :: NameSpace -> Bool #
isValNameSpace :: NameSpace -> Bool #
pprNameSpace :: NameSpace -> SDoc #
pprNonVarNameSpace :: NameSpace -> SDoc #
pprNameSpaceBrief :: IsLine doc => NameSpace -> doc #
pprOccName :: IsLine doc => OccName -> doc #
mkOccNameFS :: NameSpace -> FastString -> OccName #
mkDataOccFS :: FastString -> OccName #
mkTyVarOcc :: String -> OccName #
mkTyVarOccFS :: FastString -> OccName #
mkTcOccFS :: FastString -> OccName #
mkClsOccFS :: FastString -> OccName #
demoteOccName :: OccName -> Maybe OccName #
promoteOccName :: OccName -> Maybe OccName #
emptyOccEnv :: OccEnv a #
unitOccEnv :: OccName -> a -> OccEnv a #
extendOccEnv :: OccEnv a -> OccName -> a -> OccEnv a #
extendOccEnvList :: OccEnv a -> [(OccName, a)] -> OccEnv a #
lookupOccEnv :: OccEnv a -> OccName -> Maybe a #
elemOccEnv :: OccName -> OccEnv a -> Bool #
foldOccEnv :: (a -> b -> b) -> b -> OccEnv a -> b #
nonDetOccEnvElts :: OccEnv a -> [a] #
plusOccEnv :: OccEnv a -> OccEnv a -> OccEnv a #
plusOccEnv_C :: (a -> a -> a) -> OccEnv a -> OccEnv a -> OccEnv a #
extendOccEnv_C :: (a -> a -> a) -> OccEnv a -> OccName -> a -> OccEnv a #
extendOccEnv_Acc :: (a -> b -> b) -> (a -> b) -> OccEnv b -> OccName -> a -> OccEnv b #
mkOccEnv_C :: (a -> a -> a) -> [(OccName, a)] -> OccEnv a #
delFromOccEnv :: OccEnv a -> OccName -> OccEnv a #
delListFromOccEnv :: OccEnv a -> [OccName] -> OccEnv a #
filterOccEnv :: (elt -> Bool) -> OccEnv elt -> OccEnv elt #
minusOccEnv :: OccEnv a -> OccEnv b -> OccEnv a #
minusOccEnv_C :: (a -> b -> Maybe a) -> OccEnv a -> OccEnv b -> OccEnv a #
Alters (replaces or removes) those elements of the map that are mentioned in the second map
emptyOccSet :: OccSet #
unitOccSet :: OccName -> OccSet #
extendOccSet :: OccSet -> OccName -> OccSet #
extendOccSetList :: OccSet -> [OccName] -> OccSet #
unionOccSets :: OccSet -> OccSet -> OccSet #
unionManyOccSets :: [OccSet] -> OccSet #
minusOccSet :: OccSet -> OccSet -> OccSet #
elemOccSet :: OccName -> OccSet -> Bool #
isEmptyOccSet :: OccSet -> Bool #
intersectOccSet :: OccSet -> OccSet -> OccSet #
occSetToEnv :: OccSet -> OccEnv OccName #
Converts an OccSet to an OccEnv (operationally the identity)
occNameString :: OccName -> String #
setOccNameSpace :: NameSpace -> OccName -> OccName #
Value OccNames
s are those that are either in
the variable or data constructor namespaces
isDataSymOcc :: OccName -> Bool #
Test if the OccName
is a data constructor that starts with
a symbol (e.g. :
, or []
)
Test if the OccName
is that for any operator (whether
it is a data constructor or variable or whatever)
parenSymOcc :: OccName -> SDoc -> SDoc #
Wrap parens around an operator
startsWithUnderscore :: OccName -> Bool #
Haskell 98 encourages compilers to suppress warnings about unused
names in a pattern if they start with _
: this implements that test
isDerivedOccName :: OccName -> Bool #
Test for definitions internally generated by GHC. This predicate is used to suppress printing of internal definitions in some debug prints
isDefaultMethodOcc :: OccName -> Bool #
isTypeableBindOcc :: OccName -> Bool #
Is an OccName
one of a Typeable TyCon
or Module
binding?
This is needed as these bindings are renamed differently.
See Note [Grand plan for Typeable] in GHC.Tc.Instance.Typeable.
mkDataConWrapperOcc :: OccName -> OccName #
mkWorkerOcc :: OccName -> OccName #
mkMatcherOcc :: OccName -> OccName #
mkBuilderOcc :: OccName -> OccName #
mkDefaultMethodOcc :: OccName -> OccName #
mkClassOpAuxOcc :: OccName -> OccName #
mkForeignExportOcc :: OccName -> OccName #
mkRepEqOcc :: OccName -> OccName #
mkClassDataConOcc :: OccName -> OccName #
mkNewTyCoOcc :: OccName -> OccName #
mkInstTyCoOcc :: OccName -> OccName #
mkEqPredCoOcc :: OccName -> OccName #
mkCon2TagOcc :: OccName -> OccName #
mkTag2ConOcc :: OccName -> OccName #
mkMaxTagOcc :: OccName -> OccName #
mkDataTOcc :: OccName -> OccName #
mkDataCOcc :: OccName -> OccName #
mkTyConRepOcc :: OccName -> OccName #
mkDataConWorkerOcc :: OccName -> OccName #
mkSuperDictAuxOcc :: Int -> OccName -> OccName #
Derive a name for the representation type constructor of a
data
/newtype
instance.
mkMethodOcc :: OccName -> OccName #
initTidyOccEnv :: [OccName] -> TidyOccEnv #
delTidyOccEnvList :: TidyOccEnv -> [FastString] -> TidyOccEnv #
avoidClashesOccEnv :: TidyOccEnv -> [OccName] -> TidyOccEnv #
tidyOccName :: TidyOccEnv -> OccName -> (TidyOccEnv, OccName) #
wordAlignment :: Platform -> Alignment #
nameNameSpace :: Name -> NameSpace #
nameSrcLoc :: Name -> SrcLoc #
nameSrcSpan :: Name -> SrcSpan #
isWiredInName :: Name -> Bool #
isWiredIn :: NamedThing thing => thing -> Bool #
isBuiltInSyntax :: Name -> Bool #
isExternalName :: Name -> Bool #
isInternalName :: Name -> Bool #
isHoleName :: Name -> Bool #
isDynLinkName :: Platform -> Module -> Name -> Bool #
Will the Name
come from a dynamically linked package?
nameModule :: HasDebugCallStack => Name -> Module #
nameModule_maybe :: Name -> Maybe Module #
namePun_maybe :: Name -> Maybe FastString #
nameIsLocalOrFrom :: Module -> Name -> Bool #
Returns True if the name is
(a) Internal
(b) External but from the specified module
(c) External but from the interactive
package
The key idea is that False means: the entity is defined in some other module you can find the details (type, fixity, instances) in some interface file those details will be stored in the EPT or HPT
True means: the entity is defined in this module or earlier in the GHCi session you can find details (type, fixity, instances) in the TcGblEnv or TcLclEnv
The isInteractiveModule part is because successive interactions of a GHCi session
each give rise to a fresh module (Ghci1, Ghci2, etc), but they all come
from the magic interactive
package; and all the details are kept in the
TcLclEnv, TcGblEnv, NOT in the HPT or EPT.
See Note [The interactive package] in GHC.Runtime.Context
nameIsExternalOrFrom :: Module -> Name -> Bool #
Returns True if the name is external or from the interactive
package
See documentation of nameIsLocalOrFrom
function
nameIsHomePackage :: Module -> Name -> Bool #
nameIsHomePackageImport :: Module -> Name -> Bool #
nameIsFromExternalPackage :: HomeUnit -> Name -> Bool #
Returns True if the Name comes from some other package: neither this package nor the interactive package.
isTyVarName :: Name -> Bool #
isTyConName :: Name -> Bool #
isDataConName :: Name -> Bool #
isSystemName :: Name -> Bool #
mkClonedInternalName :: Unique -> Name -> Name #
mkExternalName :: Unique -> Module -> OccName -> SrcSpan -> Name #
Create a name which definitely originates in the given module
mkWiredInName :: Module -> OccName -> Unique -> TyThing -> BuiltInSyntax -> Name #
Create a name which is actually defined by the compiler itself
mkSystemName :: Unique -> OccName -> Name #
Create a name brought into being by the compiler
mkSystemVarName :: Unique -> FastString -> Name #
mkSysTvName :: Unique -> FastString -> Name #
mkFCallName :: Unique -> FastString -> Name #
Make a name for a foreign call
setNameLoc :: Name -> SrcSpan -> Name #
localiseName :: Name -> Name #
Make the Name
into an internal name, regardless of what it was to begin with
stableNameCmp :: Name -> Name -> Ordering #
Compare Names lexicographically This only works for Names that originate in the source code or have been tidied.
pprFullName :: Module -> Name -> SDoc #
Print fully qualified name (with unit-id, module and unique)
pprTickyName :: Module -> Name -> SDoc #
Print a ticky ticky styled name
Module argument is the module to use for internal and system names. When printing the name in a ticky profile, the module name is included even for local things. However, ticky uses the format "x (M)" rather than "M.x". Hence, this function provides a separation from normal styling.
pprNameUnqualified :: Name -> SDoc #
Print the string of Name unqualifiedly directly.
pprDefinedAt :: Name -> SDoc #
pprNameDefnLoc :: Name -> SDoc #
nameStableString :: Name -> String #
Get a string representation of a Name
that's unique and stable
across recompilations. Used for deterministic generation of binds for
derived instances.
eg. "$aeson_70dylHtv1FFGeai1IoxcQr$Data.Aeson.Types.Internal$String"
getSrcLoc :: NamedThing a => a -> SrcLoc #
getSrcSpan :: NamedThing a => a -> SrcSpan #
getOccString :: NamedThing a => a -> String #
getOccFS :: NamedThing a => a -> FastString #
pprInfixName :: (Outputable a, NamedThing a) => a -> SDoc #
pprPrefixName :: NamedThing a => a -> SDoc #
nonDetCmpVar :: Var -> Var -> Ordering #
Compare Vars by their Uniques. This is what Ord Var does, provided here to make it explicit at the call-site that it can introduce non-determinism. See Note [Unique Determinism]
varMultMaybe :: Id -> Maybe Mult #
setVarUnique :: Var -> Unique -> Var #
setVarName :: Var -> Name -> Var #
setVarType :: Var -> Type -> Var #
isVisibleForAllTyFlag :: ForAllTyFlag -> Bool #
Does this ForAllTyFlag
classify an argument that is written in Haskell?
isInvisibleForAllTyFlag :: ForAllTyFlag -> Bool #
Does this ForAllTyFlag
classify an argument that is not written in Haskell?
visArg :: TypeOrConstraint -> FunTyFlag #
invisArg :: TypeOrConstraint -> FunTyFlag #
isInvisibleFunArg :: FunTyFlag -> Bool #
isVisibleFunArg :: FunTyFlag -> Bool #
tyVarSpecToBinders :: [VarBndr a Specificity] -> [VarBndr a ForAllTyFlag] #
tyVarSpecToBinder :: VarBndr a Specificity -> VarBndr a ForAllTyFlag #
tyVarReqToBinders :: [VarBndr a ()] -> [VarBndr a ForAllTyFlag] #
tyVarReqToBinder :: VarBndr a () -> VarBndr a ForAllTyFlag #
binderVars :: [VarBndr tv argf] -> [tv] #
binderFlag :: VarBndr tv argf -> argf #
binderFlags :: [VarBndr tv argf] -> [argf] #
binderType :: VarBndr TyCoVar argf -> Type #
isTyVarBinder :: VarBndr TyCoVar vis -> Bool #
mkForAllTyBinder :: vis -> TyCoVar -> VarBndr TyCoVar vis #
Make a named binder
mkTyVarBinder :: vis -> TyVar -> VarBndr TyVar vis #
Make a named binder
var
should be a type variable
mkForAllTyBinders :: vis -> [TyCoVar] -> [VarBndr TyCoVar vis] #
Make many named binders
mkTyVarBinders :: vis -> [TyVar] -> [VarBndr TyVar vis] #
Make many named binders Input vars should be type variables
mapVarBndr :: (var -> var') -> VarBndr var flag -> VarBndr var' flag #
mapVarBndrs :: (var -> var') -> [VarBndr var flag] -> [VarBndr var' flag] #
isInvisiblePiTyBinder :: PiTyBinder -> Bool #
Does this binder bind an invisible argument?
isVisiblePiTyBinder :: PiTyBinder -> Bool #
Does this binder bind a visible argument?
isNamedPiTyBinder :: PiTyBinder -> Bool #
isAnonPiTyBinder :: PiTyBinder -> Bool #
Does this binder bind a variable that is not erased? Returns
True
for anonymous binders.
anonPiTyBinderType_maybe :: PiTyBinder -> Maybe Type #
Extract a relevant type, if there is one.
isTyBinder :: PiTyBinder -> Bool #
If its a named binder, is the binder a tyvar? Returns True for nondependent binder. This check that we're really returning a *Ty*Binder (as opposed to a coercion binder). That way, if/when we allow coercion quantification in more places, we'll know we missed updating some function.
piTyBinderType :: PiTyBinder -> Type #
setTyVarUnique :: TyVar -> Unique -> TyVar #
setTyVarName :: TyVar -> Name -> TyVar #
setTyVarKind :: TyVar -> Kind -> TyVar #
tcTyVarDetails :: TyVar -> TcTyVarDetails #
setTcTyVarDetails :: TyVar -> TcTyVarDetails -> TyVar #
idInfo :: HasDebugCallStack => Id -> IdInfo #
mkExportedLocalVar :: IdDetails -> Name -> Type -> IdInfo -> Id #
Exported Var
s will not be removed as dead code
lazySetIdInfo :: Id -> IdInfo -> Var #
setIdDetails :: Id -> IdDetails -> Id #
globaliseId :: Id -> Id #
If it's a local, make it global
setIdExported :: Id -> Id #
setIdNotExported :: Id -> Id #
We can only do this to LocalIds
Is this a type-level (i.e., computationally irrelevant, thus erasable)
variable? Satisfies isTyVar = not . isId
.
Is this a value-level (i.e., computationally relevant) Var
entifier?
Satisfies isId = not . isTyVar
.
Is this a coercion variable?
Satisfies
.isId
v ==> isCoVar
v == not (isNonCoVarId
v)
isNonCoVarId :: Var -> Bool #
Is this a term variable (Var
) that is not a coercion variable?
Satisfies
.isId
v ==> isCoVar
v == not (isNonCoVarId
v)
isLocalVar :: Var -> Bool #
isLocalVar
returns True
for type variables as well as local Var
s
These are the variables that we need to pay attention to when finding free
variables, or doing dependency analysis.
isGlobalId :: Var -> Bool #
mustHaveLocalBinding :: Var -> Bool #
mustHaveLocalBinding
returns True
of Var
s and Var
s
that must have a binding in this module. The converse
is not quite right: there are some global Var
s that must have
bindings, such as record selectors. But that doesn't matter,
because it's only used for assertions
isExportedId :: Var -> Bool #
isExportedIdVar
means "don't throw this away"
chooseFunTyFlag :: HasDebugCallStack => Type -> Type -> FunTyFlag #
See GHC.Types.Var Note [FunTyFlag]
getLevity :: HasDebugCallStack => Type -> Type #
Extract the PromDataConInfo
of a type. For example, getLevity Int = Lifted
,
or getLevity (Array# Int) = Unlifted
.
Panics if this is not possible. Does not look through type family applications.
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
isLiftedTypeKind :: Kind -> Bool #
Returns True if the argument is (lifted) Type or Constraint See Note [TYPE and CONSTRAINT] in GHC.Builtin.Types.Prim
isMultiplicityTy :: Type -> Bool #
Is this the type Multiplicity
?
isLevityTy :: Type -> Bool #
Is this the type PromDataConInfo
?
isRuntimeRepTy :: Type -> Bool #
Is this the type RuntimeRep
?
coreView :: Type -> Maybe Type #
This function strips off the top layer only of a type synonym
application (if any) its underlying representation type.
Returns Nothing
if there is nothing to look through.
This function does not look through type family applications.
By being non-recursive and inlined, this case analysis gets efficiently joined onto the case analysis that the caller is already doing
typeKind :: HasDebugCallStack => Type -> Kind #
piResultTy :: HasDebugCallStack => Type -> Type -> Type #
mkCoercionTy :: Coercion -> Type #
mkTyConApp :: TyCon -> [Type] -> Type #
mkCastTy :: Type -> Coercion -> Type #
Make a CastTy
. The Coercion must be nominal. Checks the
Coercion for reflexivity, dropping it if it's reflexive.
See Note [Respecting definitional equality]
in GHC.Core.TyCo.Rep
isCoercionTy :: Type -> Bool #
isPredTy :: HasDebugCallStack => Type -> Bool #
emptyVarSet :: VarSet #
unitVarSet :: Var -> VarSet #
extendVarSet :: VarSet -> Var -> VarSet #
extendVarSetList :: VarSet -> [Var] -> VarSet #
intersectVarSet :: VarSet -> VarSet -> VarSet #
unionVarSet :: VarSet -> VarSet -> VarSet #
unionVarSets :: [VarSet] -> VarSet #
elemVarSet :: Var -> VarSet -> Bool #
minusVarSet :: VarSet -> VarSet -> VarSet #
delVarSetList :: VarSet -> [Var] -> VarSet #
isEmptyVarSet :: VarSet -> Bool #
sizeVarSet :: VarSet -> Int #
delVarSetByKey :: VarSet -> Unique -> VarSet #
elemVarSetByKey :: Unique -> VarSet -> Bool #
mapUnionVarSet :: (a -> VarSet) -> [a] -> VarSet #
map the function over the list, and union the results
intersectsVarSet :: VarSet -> VarSet -> Bool #
disjointVarSet :: VarSet -> VarSet -> Bool #
nonDetStrictFoldVarSet :: (Var -> a -> a) -> a -> VarSet -> a #
pluralVarSet :: VarSet -> SDoc #
Determines the pluralisation suffix appropriate for the length of a set in the same way that plural from Outputable does for lists.
Arguments
:: VarSet | The things to be pretty printed |
-> ([Var] -> SDoc) | The pretty printing function to use on the elements |
-> SDoc |
|
Pretty-print a non-deterministic set. The order of variables is non-deterministic and for pretty-printing that shouldn't be a problem. Having this function helps contain the non-determinism created with nonDetEltsUFM. Passing a list to the pretty-printing function allows the caller to decide on the order of Vars (eg. toposort them) without them having to use nonDetEltsUFM at the call site. This prevents from let-binding non-deterministically ordered lists and reusing them where determinism matters.
emptyDVarSet :: DVarSet #
unitDVarSet :: Var -> DVarSet #
extendDVarSet :: DVarSet -> Var -> DVarSet #
elemDVarSet :: Var -> DVarSet -> Bool #
dVarSetElems :: DVarSet -> [Var] #
subDVarSet :: DVarSet -> DVarSet -> Bool #
unionDVarSet :: DVarSet -> DVarSet -> DVarSet #
unionDVarSets :: [DVarSet] -> DVarSet #
mapUnionDVarSet :: (a -> DVarSet) -> [a] -> DVarSet #
Map the function over the list, and union the results
intersectDVarSet :: DVarSet -> DVarSet -> DVarSet #
dVarSetIntersectVarSet :: DVarSet -> VarSet -> DVarSet #
disjointDVarSet :: DVarSet -> DVarSet -> Bool #
True if empty intersection
intersectsDVarSet :: DVarSet -> DVarSet -> Bool #
True if non-empty intersection
isEmptyDVarSet :: DVarSet -> Bool #
delDVarSet :: DVarSet -> Var -> DVarSet #
minusDVarSet :: DVarSet -> DVarSet -> DVarSet #
dVarSetMinusVarSet :: DVarSet -> VarSet -> DVarSet #
nonDetStrictFoldDVarSet :: (Var -> a -> a) -> a -> DVarSet -> a #
mapDVarSet :: Uniquable b => (a -> b) -> UniqDSet a -> UniqDSet b #
sizeDVarSet :: DVarSet -> Int #
partitionDVarSet :: (Var -> Bool) -> DVarSet -> (DVarSet, DVarSet) #
Partition DVarSet according to the predicate given
delDVarSetList :: DVarSet -> [Var] -> DVarSet #
Delete a list of variables from DVarSet
seqDVarSet :: DVarSet -> () #
extendDVarSetList :: DVarSet -> [Var] -> DVarSet #
Add a list of variables to DVarSet
dVarSetToVarSet :: DVarSet -> VarSet #
Convert a DVarSet to a VarSet by forgetting the order of insertion
getInScopeVars :: InScopeSet -> VarSet #
mkInScopeSet :: VarSet -> InScopeSet #
mkInScopeSetList :: [Var] -> InScopeSet #
extendInScopeSet :: InScopeSet -> Var -> InScopeSet #
extendInScopeSetList :: InScopeSet -> [Var] -> InScopeSet #
extendInScopeSetSet :: InScopeSet -> VarSet -> InScopeSet #
delInScopeSet :: InScopeSet -> Var -> InScopeSet #
elemInScopeSet :: Var -> InScopeSet -> Bool #
lookupInScope :: InScopeSet -> Var -> Maybe Var #
Look up a variable the InScopeSet
. This lets you map from
the variable's identity (unique) to its full value.
lookupInScope_Directly :: InScopeSet -> Unique -> Maybe Var #
unionInScope :: InScopeSet -> InScopeSet -> InScopeSet #
varSetInScope :: VarSet -> InScopeSet -> Bool #
uniqAway :: InScopeSet -> Var -> Var #
uniqAway in_scope v
finds a unique that is not used in the
in-scope set, and gives that to v. See Note [Local uniques] and
Note [The InScopeSet invariant].
unsafeGetFreshLocalUnique :: InScopeSet -> Unique #
unsafeGetFreshUnique in_scope
finds a unique that is not in-scope in the
given InScopeSet
. This must be used very carefully since one can very easily
introduce non-unique Unique
s this way. See Note [Local uniques].
mkRnEnv2 :: InScopeSet -> RnEnv2 #
extendRnInScopeSetList :: RnEnv2 -> [Var] -> RnEnv2 #
rnInScopeSet :: RnEnv2 -> InScopeSet #
rnBndrs2 :: RnEnv2 -> [Var] -> [Var] -> RnEnv2 #
Applies rnBndr2
to several variables: the two variable lists must be of equal length
rnBndr2 :: RnEnv2 -> Var -> Var -> RnEnv2 #
rnBndr2 env bL bR
goes under a binder bL
in the Left term,
and binder bR
in the Right term.
It finds a new binder, new_b
,
and returns an environment mapping bL -> new_b
and bR -> new_b
rnBndr2_var :: RnEnv2 -> Var -> Var -> (RnEnv2, Var) #
Similar to rnBndr2
but returns the new variable as well as the
new environment
rnBndrL :: RnEnv2 -> Var -> (RnEnv2, Var) #
Similar to rnBndr2
but used when there's a binder on the left
side only.
rnBndrR :: RnEnv2 -> Var -> (RnEnv2, Var) #
Similar to rnBndr2
but used when there's a binder on the right
side only.
rnEtaL :: RnEnv2 -> Var -> (RnEnv2, Var) #
Similar to rnBndrL
but used for eta expansion
See Note [Eta expansion]
rnEtaR :: RnEnv2 -> Var -> (RnEnv2, Var) #
Similar to rnBndr2
but used for eta expansion
See Note [Eta expansion]
rnOccL_maybe :: RnEnv2 -> Var -> Maybe Var #
Look up the renaming of an occurrence in the left or right term
rnOccR_maybe :: RnEnv2 -> Var -> Maybe Var #
Look up the renaming of an occurrence in the left or right term
anyInRnEnvR :: RnEnv2 -> VarSet -> Bool #
`anyInRnEnvR env set` == `any (inRnEnvR rn_env) (toList set)` but lazy in the second argument if the right side of the env is empty.
lookupRnInScope :: RnEnv2 -> Var -> Var #
nukeRnEnvL :: RnEnv2 -> RnEnv2 #
Wipe the left or right side renaming
nukeRnEnvR :: RnEnv2 -> RnEnv2 #
Wipe the left or right side renaming
emptyTidyEnv :: TidyEnv #
mkEmptyTidyEnv :: TidyOccEnv -> TidyEnv #
delTidyEnvList :: TidyEnv -> [Var] -> TidyEnv #
elemVarEnv :: Var -> VarEnv a -> Bool #
elemVarEnvByKey :: Unique -> VarEnv a -> Bool #
disjointVarEnv :: VarEnv a -> VarEnv a -> Bool #
extendVarEnv :: VarEnv a -> Var -> a -> VarEnv a #
extendVarEnv_C :: (a -> a -> a) -> VarEnv a -> Var -> a -> VarEnv a #
extendVarEnv_Acc :: (a -> b -> b) -> (a -> b) -> VarEnv b -> Var -> a -> VarEnv b #
extendVarEnvList :: VarEnv a -> [(Var, a)] -> VarEnv a #
plusVarEnv_C :: (a -> a -> a) -> VarEnv a -> VarEnv a -> VarEnv a #
plusVarEnv_CD :: (a -> a -> a) -> VarEnv a -> a -> VarEnv a -> a -> VarEnv a #
delVarEnvList :: VarEnv a -> [Var] -> VarEnv a #
minusVarEnv :: VarEnv a -> VarEnv b -> VarEnv a #
plusVarEnv :: VarEnv a -> VarEnv a -> VarEnv a #
plusVarEnvList :: [VarEnv a] -> VarEnv a #
lookupVarEnv :: VarEnv a -> Var -> Maybe a #
lookupVarEnv_Directly :: VarEnv a -> Unique -> Maybe a #
filterVarEnv :: (a -> Bool) -> VarEnv a -> VarEnv a #
lookupWithDefaultVarEnv :: VarEnv a -> a -> Var -> a #
mkVarEnv_Directly :: [(Unique, a)] -> VarEnv a #
emptyVarEnv :: VarEnv a #
unitVarEnv :: Var -> a -> VarEnv a #
isEmptyVarEnv :: VarEnv a -> Bool #
varEnvDomain :: VarEnv elt -> UnVarSet #
restrictVarEnv :: VarEnv a -> VarSet -> VarEnv a #
Only keep variables contained in the VarSet
lookupVarEnv_NF :: VarEnv a -> Var -> a #
modifyVarEnv :: (a -> a) -> VarEnv a -> Var -> VarEnv a #
modifyVarEnv_Directly :: (a -> a) -> UniqFM key a -> Unique -> UniqFM key a #
emptyDVarEnv :: DVarEnv a #
dVarEnvElts :: DVarEnv a -> [a] #
extendDVarEnv :: DVarEnv a -> Var -> a -> DVarEnv a #
minusDVarEnv :: DVarEnv a -> DVarEnv a' -> DVarEnv a #
lookupDVarEnv :: DVarEnv a -> Var -> Maybe a #
foldDVarEnv :: (a -> b -> b) -> b -> DVarEnv a -> b #
nonDetStrictFoldDVarEnv :: (a -> b -> b) -> b -> DVarEnv a -> b #
mapDVarEnv :: (a -> b) -> DVarEnv a -> DVarEnv b #
filterDVarEnv :: (a -> Bool) -> DVarEnv a -> DVarEnv a #
plusDVarEnv :: DVarEnv a -> DVarEnv a -> DVarEnv a #
plusDVarEnv_C :: (a -> a -> a) -> DVarEnv a -> DVarEnv a -> DVarEnv a #
unitDVarEnv :: Var -> a -> DVarEnv a #
delDVarEnv :: DVarEnv a -> Var -> DVarEnv a #
delDVarEnvList :: DVarEnv a -> [Var] -> DVarEnv a #
isEmptyDVarEnv :: DVarEnv a -> Bool #
elemDVarEnv :: Var -> DVarEnv a -> Bool #
extendDVarEnv_C :: (a -> a -> a) -> DVarEnv a -> Var -> a -> DVarEnv a #
modifyDVarEnv :: (a -> a) -> DVarEnv a -> Var -> DVarEnv a #
extendDVarEnvList :: DVarEnv a -> [(Var, a)] -> DVarEnv a #
anyDVarEnv :: (a -> Bool) -> DVarEnv a -> Bool #
isEmptyNameSet :: NameSet -> Bool #
emptyNameSet :: NameSet #
unitNameSet :: Name -> NameSet #
extendNameSetList :: NameSet -> [Name] -> NameSet #
extendNameSet :: NameSet -> Name -> NameSet #
unionNameSet :: NameSet -> NameSet -> NameSet #
unionNameSets :: [NameSet] -> NameSet #
minusNameSet :: NameSet -> NameSet -> NameSet #
elemNameSet :: Name -> NameSet -> Bool #
delFromNameSet :: NameSet -> Name -> NameSet #
intersectNameSet :: NameSet -> NameSet -> NameSet #
disjointNameSet :: NameSet -> NameSet -> Bool #
True if there is a non-empty intersection.
s1
doesn't compute intersectsNameSet
s2s2
if s1
is empty
delListFromNameSet :: NameSet -> [Name] -> NameSet #
intersectsNameSet :: NameSet -> NameSet -> Bool #
nameSetElemsStable :: NameSet -> [Name] #
Get the elements of a NameSet with some stable ordering. This only works for Names that originate in the source code or have been tidied. See Note [Deterministic UniqFM] to learn about nondeterminism
isEmptyFVs :: NameSet -> Bool #
intersectFVs :: FreeVars -> FreeVars -> FreeVars #
nonDetNameEnvElts :: NameEnv a -> [a] #
emptyNameEnv :: NameEnv a #
isEmptyNameEnv :: NameEnv a -> Bool #
unitNameEnv :: Name -> a -> NameEnv a #
extendNameEnv :: NameEnv a -> Name -> a -> NameEnv a #
extendNameEnvList :: NameEnv a -> [(Name, a)] -> NameEnv a #
lookupNameEnv :: NameEnv a -> Name -> Maybe a #
mkNameEnvWith :: (a -> Name) -> [a] -> NameEnv a #
elemNameEnv :: Name -> NameEnv a -> Bool #
plusNameEnv :: NameEnv a -> NameEnv a -> NameEnv a #
plusNameEnv_C :: (a -> a -> a) -> NameEnv a -> NameEnv a -> NameEnv a #
plusNameEnv_CD :: (a -> a -> a) -> NameEnv a -> a -> NameEnv a -> a -> NameEnv a #
extendNameEnv_C :: (a -> a -> a) -> NameEnv a -> Name -> a -> NameEnv a #
mapNameEnv :: (elt1 -> elt2) -> NameEnv elt1 -> NameEnv elt2 #
extendNameEnv_Acc :: (a -> b -> b) -> (a -> b) -> NameEnv b -> Name -> a -> NameEnv b #
extendNameEnvList_C :: (a -> a -> a) -> NameEnv a -> [(Name, a)] -> NameEnv a #
delFromNameEnv :: NameEnv a -> Name -> NameEnv a #
delListFromNameEnv :: NameEnv a -> [Name] -> NameEnv a #
filterNameEnv :: (elt -> Bool) -> NameEnv elt -> NameEnv elt #
mapMaybeNameEnv :: (a -> Maybe b) -> NameEnv a -> NameEnv b #
anyNameEnv :: (elt -> Bool) -> NameEnv elt -> Bool #
disjointNameEnv :: NameEnv a -> NameEnv a -> Bool #
seqEltsNameEnv :: (elt -> ()) -> NameEnv elt -> () #
lookupNameEnv_NF :: NameEnv a -> Name -> a #
emptyDNameEnv :: DNameEnv a #
isEmptyDNameEnv :: DNameEnv a -> Bool #
lookupDNameEnv :: DNameEnv a -> Name -> Maybe a #
delFromDNameEnv :: DNameEnv a -> Name -> DNameEnv a #
filterDNameEnv :: (a -> Bool) -> DNameEnv a -> DNameEnv a #
mapDNameEnv :: (a -> b) -> DNameEnv a -> DNameEnv b #
adjustDNameEnv :: (a -> a) -> DNameEnv a -> Name -> DNameEnv a #
extendDNameEnv :: DNameEnv a -> Name -> a -> DNameEnv a #
extendDNameEnv_C :: (a -> a -> a) -> DNameEnv a -> Name -> a -> DNameEnv a #
eltsDNameEnv :: DNameEnv a -> [a] #
foldDNameEnv :: (a -> b -> b) -> b -> DNameEnv a -> b #
plusDNameEnv_C :: (elt -> elt -> elt) -> DNameEnv elt -> DNameEnv elt -> DNameEnv elt #
nonDetStrictFoldDNameEnv :: (a -> b -> b) -> b -> DNameEnv a -> b #
greNameSrcSpan :: GreName -> SrcSpan #
rdrNameOcc :: RdrName -> OccName #
rdrNameSpace :: RdrName -> NameSpace #
demoteRdrName :: RdrName -> Maybe RdrName #
promoteRdrName :: RdrName -> Maybe RdrName #
mkRdrUnqual :: OccName -> RdrName #
mkRdrQual :: ModuleName -> OccName -> RdrName #
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 #
isRdrDataCon :: RdrName -> Bool #
isRdrTyVar :: RdrName -> Bool #
isSrcRdrName :: RdrName -> Bool #
isQual_maybe :: RdrName -> Maybe (ModuleName, OccName) #
isExact_maybe :: RdrName -> Maybe Name #
extendLocalRdrEnv :: LocalRdrEnv -> Name -> LocalRdrEnv #
extendLocalRdrEnvList :: LocalRdrEnv -> [Name] -> LocalRdrEnv #
lookupLocalRdrEnv :: LocalRdrEnv -> RdrName -> Maybe Name #
lookupLocalRdrOcc :: LocalRdrEnv -> OccName -> Maybe Name #
elemLocalRdrEnv :: RdrName -> LocalRdrEnv -> Bool #
localRdrEnvElts :: LocalRdrEnv -> [Name] #
inLocalRdrEnvScope :: Name -> LocalRdrEnv -> Bool #
minusLocalRdrEnv :: LocalRdrEnv -> OccEnv a -> LocalRdrEnv #
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).
localGREsFromAvail :: AvailInfo -> [GlobalRdrElt] #
gresFromAvail :: (Name -> Maybe ImportSpec) -> AvailInfo -> [GlobalRdrElt] #
greOccName :: GlobalRdrElt -> OccName #
See Note [GreNames]
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]).
grePrintableName :: GlobalRdrElt -> Name #
A Name
for the GRE suitable for output to the user. Its OccName
will
be the greOccName
(see Note [GreNames]).
greDefinitionSrcSpan :: GlobalRdrElt -> SrcSpan #
The SrcSpan of the name pointed to by the GRE.
greDefinitionModule :: GlobalRdrElt -> Maybe Module #
The module in which the name pointed to by the GRE is defined.
greRdrNames :: GlobalRdrElt -> [RdrName] #
greSrcSpan :: GlobalRdrElt -> SrcSpan #
greParent_maybe :: GlobalRdrElt -> Maybe Name #
gresToAvailInfo :: [GlobalRdrElt] -> [AvailInfo] #
Takes a list of distinct GREs and folds them
into AvailInfos. This is more efficient than mapping each individual
GRE to an AvailInfo and the folding using plusAvail
but needs the
uniqueness assumption.
availFromGRE :: GlobalRdrElt -> AvailInfo #
globalRdrEnvElts :: GlobalRdrEnv -> [GlobalRdrElt] #
pprGlobalRdrEnv :: Bool -> GlobalRdrEnv -> SDoc #
lookupGlobalRdrEnv :: GlobalRdrEnv -> OccName -> [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).
lookupGRE_RdrName' :: RdrName -> GlobalRdrEnv -> [GlobalRdrElt] #
Look for this RdrName
in the global environment. Includes record fields
without selector functions (see Note [NoFieldSelectors] in GHC.Rename.Env).
lookupGRE_Name :: GlobalRdrEnv -> Name -> Maybe GlobalRdrElt #
lookupGRE_GreName :: GlobalRdrEnv -> GreName -> Maybe GlobalRdrElt #
lookupGRE_FieldLabel :: GlobalRdrEnv -> FieldLabel -> Maybe GlobalRdrElt #
Look for a particular record field selector in the environment, where the selector name and field label may be different: the GlobalRdrEnv is keyed on the label. See Note [GreNames] for why this happens.
lookupGRE_Name_OccName :: GlobalRdrEnv -> Name -> OccName -> Maybe GlobalRdrElt #
Look for precisely this Name
in the environment, but with an OccName
that might differ from that of the Name
. See lookupGRE_FieldLabel
and
Note [GreNames].
getGRE_NameQualifier_maybes :: GlobalRdrEnv -> Name -> [Maybe [ModuleName]] #
isLocalGRE :: GlobalRdrElt -> Bool #
isRecFldGRE :: GlobalRdrElt -> Bool #
isDuplicateRecFldGRE :: GlobalRdrElt -> Bool #
Is this a record field defined with DuplicateRecordFields? (See Note [GreNames])
isNoFieldSelectorGRE :: GlobalRdrElt -> Bool #
Is this a record field defined with NoFieldSelectors? (See Note [NoFieldSelectors] in GHC.Rename.Env)
isFieldSelectorGRE :: GlobalRdrElt -> Bool #
Is this a record field defined with FieldSelectors? (See Note [NoFieldSelectors] in GHC.Rename.Env)
greFieldLabel :: GlobalRdrElt -> Maybe FieldLabel #
Returns the field label of this GRE, if it has one
unQualOK :: GlobalRdrElt -> Bool #
Test if an unqualified version of this thing would be in scope
pickGREs :: RdrName -> [GlobalRdrElt] -> [GlobalRdrElt] #
Takes a list of GREs which have the right OccName x
Pick those GREs that are in scope
* Qualified, as x
if want_qual is Qual M _
* Unqualified, as x
if want_unqual is Unqual _
Return each such GRE, with its ImportSpecs filtered, to reflect how it is in scope qualified or unqualified respectively. See Note [GRE filtering]
pickGREsModExp :: ModuleName -> [GlobalRdrElt] -> [(GlobalRdrElt, GlobalRdrElt)] #
Pick GREs that are in scope *both* qualified *and* unqualified Return each GRE that is, as a pair (qual_gre, unqual_gre) These two GREs are the original GRE with imports filtered to express how it is in scope qualified an unqualified respectively
Used only for the 'module M' item in export list;
see exports_from_avail
mkGlobalRdrEnv :: [GlobalRdrElt] -> GlobalRdrEnv #
transformGREs :: (GlobalRdrElt -> GlobalRdrElt) -> [OccName] -> GlobalRdrEnv -> GlobalRdrEnv #
Apply a transformation function to the GREs for these OccNames
shadowNames :: GlobalRdrEnv -> OccEnv a -> GlobalRdrEnv #
bestImport :: [ImportSpec] -> ImportSpec #
unQualSpecOK :: ImportSpec -> Bool #
Is in scope unqualified?
qualSpecOK :: ModuleName -> ImportSpec -> Bool #
Is in scope qualified with the given module?
importSpecLoc :: ImportSpec -> SrcSpan #
isExplicitItem :: ImpItemSpec -> Bool #
pprNameProvenance :: GlobalRdrElt -> SDoc #
Print out one place where the name was define/imported (With -dppr-debug, print them all)
realSrcSpan :: SrcSpan -> RealSrcSpan #
noSrcSpanA :: SrcAnn ann #
Short form for EpAnnNotUsed
noHsTok :: forall (tok :: Symbol). GenLocated TokenLocation (HsToken tok) #
noHsUniTok :: forall (tok :: Symbol) (utok :: Symbol). GenLocated TokenLocation (HsUniToken tok utok) #
listTyConKey :: Unique #
nilDataConKey :: Unique #
emptyAnnEnv :: AnnEnv #
An empty annotation environment.
mkAnnEnv :: [Annotation] -> AnnEnv #
Construct a new annotation environment that contains the list of annotations provided.
extendAnnEnvList :: AnnEnv -> [Annotation] -> AnnEnv #
Add the given annotation to the environment.
plusAnnEnv :: AnnEnv -> AnnEnv -> AnnEnv #
Union two annotation environments.
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.
findAnnsByTypeRep :: AnnEnv -> CoreAnnTarget -> TypeRep -> [[Word8]] #
Find the annotations attached to the given target as Typeable
values of your choice. If no deserializer is specified,
only transient annotations will be returned.
deserializeAnns :: Typeable a => ([Word8] -> a) -> AnnEnv -> (ModuleEnv [a], NameEnv [a]) #
Deserialize all annotations of a given type. This happens lazily, that is no deserialization will take place until the [a] is actually demanded and the [a] can also be empty (the UniqFM is not filtered).
sProgramName :: Settings -> String #
sProjectVersion :: Settings -> String #
sGhcUsagePath :: Settings -> FilePath #
sGhciUsagePath :: Settings -> FilePath #
sLdSupportsFilelist :: Settings -> Bool #
sLdIsGnuLd :: Settings -> Bool #
sGccSupportsNoPie :: Settings -> Bool #
sPgm_windres :: Settings -> String #
sPgm_ranlib :: Settings -> String #
sOpt_windres :: Settings -> [String] #
sExtraGccViaCFlags :: Settings -> [String] #
sTargetPlatformString :: Settings -> String #
sGhcWithInterpreter :: Settings -> Bool #
mkUnitKeyInfo :: DbUnitInfo -> UnitKeyInfo #
Convert a DbUnitInfo (read from a package database) into UnitKeyInfo
mapUnitInfo :: IsUnitId v => (u -> v) -> GenUnitInfo u -> GenUnitInfo v #
Map over the unit parameter
unitPackageIdString :: GenUnitInfo u -> String #
unitPackageNameString :: GenUnitInfo u -> String #
pprUnitInfo :: UnitInfo -> SDoc #
If the unit is definite, make a RealUnit
from unitId
field.
If the unit is indefinite, make a VirtUnit
from unitInstanceOf
and
unitInstantiations
fields. Note that in this case we don't keep track of
unitId
. It can be retrieved later with "improvement", i.e. matching on
`unitInstanceOf/unitInstantiations` fields (see Note [About units] in
GHC.Unit).
mkUnitPprInfo :: (u -> FastString) -> GenUnitInfo u -> UnitPprInfo #
Create a UnitPprInfo from a UnitInfo
collectIncludeDirs :: [UnitInfo] -> [FilePath] #
Find all the include directories in the given units
collectExtraCcOpts :: [UnitInfo] -> [String] #
Find all the C-compiler options in the given units
collectLibraryDirs :: Ways -> [UnitInfo] -> [FilePath] #
Find all the library directories in the given units for the given ways
collectFrameworks :: [UnitInfo] -> [String] #
Find all the frameworks in the given units
collectFrameworksDirs :: [UnitInfo] -> [String] #
Find all the package framework paths in these and the preload packages
unitHsLibs :: GhcNameVersion -> Ways -> UnitInfo -> [String] #
topNormaliseNewType_maybe :: Type -> Maybe (Coercion, Type) #
Sometimes we want to look through a newtype
and get its associated coercion.
This function strips off newtype
layers enough to reveal something that isn't
a newtype
. Specifically, here's the invariant:
topNormaliseNewType_maybe rec_nts ty = Just (co, ty')
then (a) co : ty ~R ty'
.
(b) ty' is not a newtype.
The function returns Nothing
for non-newtypes
,
or unsaturated applications
This function does *not* look through type families, because it has no access to the type family environment. If you do have that at hand, consider to use topNormaliseType_maybe, which should be a drop-in replacement for topNormaliseNewType_maybe If topNormliseNewType_maybe ty = Just (co, ty'), then co : ty ~R ty'
coercionType :: Coercion -> Type #
coercionRKind :: Coercion -> Type #
coercionLKind :: Coercion -> Type #
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
.
liftCoSubst :: HasDebugCallStack => Role -> LiftingContext -> Type -> Coercion #
liftCoSubst role lc ty
produces a coercion (at role role
)
that coerces between lc_left(ty)
and lc_right(ty)
, where
lc_left
is a substitution mapping type variables to the left-hand
types of the mapped coercions in lc
, and similar for lc_right
.
mkCoercionType :: Role -> Type -> Type -> Type #
Makes a coercion type from two types: the types whose equality
is proven by the relevant Coercion
coVarKindsTypesRole :: HasDebugCallStack => CoVar -> (Kind, Kind, Type, Type, Role) #
decomposePiCos :: HasDebugCallStack => CoercionN -> Pair Type -> [Type] -> ([CoercionN], CoercionN) #
isReflexiveCo :: Coercion -> Bool #
Slowly checks if the coercion is reflexive. Don't call this in a loop, as it walks over the entire coercion.
isReflCo :: Coercion -> Bool #
Tests if this coercion is obviously reflexive. Guaranteed to work
very quickly. Sometimes a coercion can be reflexive, but not obviously
so. c.f. isReflexiveCo
isGReflCo :: Coercion -> Bool #
Tests if this coercion is obviously a generalized reflexive coercion. Guaranteed to work very quickly.
mkAxiomRuleCo :: CoAxiomRule -> [Coercion] -> Coercion #
Arguments
:: Role | role of the created coercion, "r" |
-> CoercionN | :: phi1 ~N phi2 |
-> Coercion | g1 :: phi1 |
-> Coercion | g2 :: phi2 |
-> Coercion | :: g1 ~r g2 |
Make a "coercion between coercions".
mkSubCo :: HasDebugCallStack => Coercion -> Coercion #
mkNomReflCo :: Type -> Coercion #
Make a nominal reflexive coercion
mkLRCo :: LeftOrRight -> Coercion -> Coercion #
mkSymCo :: Coercion -> Coercion #
Create a symmetric version of the given Coercion
that asserts
equality between the same types but in the other "direction", so
a kind of t1 ~ t2
becomes the kind t2 ~ t1
.
Arguments
:: UnivCoProvenance | |
-> Role | role of the built coercion, "r" |
-> Type | t1 :: k1 |
-> Type | t2 :: k2 |
-> Coercion | :: t1 ~r t2 |
Make a universal coercion between two arbitrary types.
mkPhantomCo :: Coercion -> Type -> Type -> Coercion #
Make a phantom coercion between two types. The coercion passed in must be a nominal coercion between the kinds of the types.
mkAxiomInstCo :: CoAxiom Branched -> BranchIndex -> [Coercion] -> Coercion #
mkFunCo2 :: HasDebugCallStack => Role -> FunTyFlag -> FunTyFlag -> CoercionN -> Coercion -> Coercion -> Coercion #
mkFunCo1 :: HasDebugCallStack => Role -> FunTyFlag -> CoercionN -> Coercion -> Coercion -> Coercion #
mkForAllCo :: TyCoVar -> CoercionN -> Coercion -> Coercion #
Make a Coercion from a tycovar, a kind coercion, and a body coercion. The kind of the tycovar should be the left-hand kind of the kind coercion. See Note [Unused coercion variable in ForAllCo]
mkTyConAppCo :: HasDebugCallStack => Role -> TyCon -> [Coercion] -> Coercion #
Apply a type constructor to a list of coercions. It is the caller's responsibility to get the roles correct on argument coercions.
algTcFields :: TyConDetails -> FieldLabelEnv #
Maps a label to information about the field
mkAnonTyConBinder :: TyVar -> TyConBinder #
mkAnonTyConBinders :: [TyVar] -> [TyConBinder] #
mkNamedTyConBinder :: ForAllTyFlag -> TyVar -> TyConBinder #
mkNamedTyConBinders :: ForAllTyFlag -> [TyVar] -> [TyConBinder] #
mkRequiredTyConBinder :: TyCoVarSet -> TyVar -> TyConBinder #
Make a Required TyConBinder. It chooses between NamedTCB and AnonTCB based on whether the tv is mentioned in the dependent set
isNamedTyConBinder :: TyConBinder -> Bool #
isVisibleTyConBinder :: VarBndr tv TyConBndrVis -> Bool #
isVisibleTcbVis :: TyConBndrVis -> Bool #
isInvisibleTyConBinder :: VarBndr tv TyConBndrVis -> Bool #
mkTyConKind :: [TyConBinder] -> Kind -> Kind #
tyConInvisTVBinders :: [TyConBinder] -> [InvisTVBinder] #
tyConVisibleTyVars :: TyCon -> [TyVar] #
Arguments
:: Bool | whether the |
-> Bool | True if this is a "type data" declaration See Note [Type data declarations] in GHC.Rename.Module |
-> [DataCon] | |
-> AlgTyConRhs |
Create an AlgTyConRhs
from the data constructors,
for a potentially levity-polymorphic datatype (with UnliftedDatatypes
).
mkDataTyConRhs :: [DataCon] -> AlgTyConRhs #
Create an AlgTyConRhs
from the data constructors.
Use mkLevPolyDataConRhs
if the datatype can be levity-polymorphic
or if it comes from a "data type" declaration
visibleDataCons :: AlgTyConRhs -> [DataCon] #
Extract those DataCon
s that we are able to learn about. Note
that visibility in this sense does not correspond to visibility in
the context of any particular user program!
isNoParent :: AlgTyConFlav -> Bool #
tyConRepModOcc :: Module -> OccName -> (Module, OccName) #
The name (and defining module) for the Typeable representation (TyCon) of a type constructor.
See Note [Grand plan for Typeable] in GHC.Tc.Instance.Typeable.
isGcPtrRep :: PrimRep -> Bool #
primRepSizeB :: Platform -> PrimRep -> Int #
The size of a PrimRep
in bytes.
This applies also when used in a constructor, where we allow packing the
fields. For instance, in data Foo = Foo Float# Float#
the two fields will
take only 8 bytes, which for 64-bit arch will be equal to 1 word.
See also mkVirtHeapOffsetsWithPadding for details of how data fields are
laid out.
primElemRepSizeB :: Platform -> PrimElemRep -> Int #
primRepIsFloat :: PrimRep -> Maybe Bool #
Return if Rep stands for floating type, returns Nothing for vector types.
primRepIsWord :: PrimRep -> Bool #
primRepIsInt :: PrimRep -> Bool #
tyConFieldLabels :: TyCon -> [FieldLabel] #
The labels for the fields of this particular TyCon
lookupTyConFieldLabel :: FieldLabelString -> TyCon -> Maybe FieldLabel #
Look up a field label belonging to this TyCon
Arguments
:: Name | |
-> [TyConBinder] | Binders of the |
-> Kind | Result kind |
-> [Role] | The roles for each TyVar |
-> Maybe CType | The C type this type corresponds to when using the CAPI FFI |
-> [PredType] | Stupid theta: see |
-> AlgTyConRhs | Information about data constructors |
-> AlgTyConFlav | What flavour is it? (e.g. vanilla, type family) |
-> Bool | Was the |
-> TyCon |
This is the making of an algebraic TyCon
.
mkClassTyCon :: Name -> [TyConBinder] -> [Role] -> AlgTyConRhs -> Class -> Name -> TyCon #
Simpler specialization of mkAlgTyCon
for classes
Arguments
:: Name | |
-> [TyConBinder] | |
-> Kind | Result kind of the |
-> DataCon | |
-> TupleSort | Whether the tuple is boxed or unboxed |
-> AlgTyConFlav | |
-> TyCon |
Arguments
:: Name | |
-> [TyConBinder] | |
-> Kind | Kind of the resulting |
-> [DataCon] | |
-> AlgTyConFlav | |
-> TyCon |
Arguments
:: Name | |
-> [TyConBinder] | |
-> Kind | result kind only |
-> [(Name, TcTyVar)] | Scoped type variables; see Note [How TcTyCons work] in GHC.Tc.TyCl |
-> Bool | Is this TcTyCon generalised already? |
-> TyConFlavour | What sort of |
-> TyCon |
Makes a tycon suitable for use during type-checking. It stores a variety of details about the definition of the TyCon, but no right-hand side. It lives only during the type-checking of a mutually-recursive group of tycons; it is then zonked to a proper TyCon in zonkTcTyCon. See also Note [Kind checking recursive type and class declarations] in GHC.Tc.TyCl.
noTcTyConScopedTyVars :: [(Name, TcTyVar)] #
No scoped type variables (to be used with mkTcTyCon).
Arguments
:: 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.
Arguments
:: Name | |
-> [TyConBinder] | |
-> Kind | result kind |
-> [Role] | |
-> Type | |
-> Bool | |
-> Bool | |
-> Bool | |
-> TyCon |
Create a type synonym TyCon
Arguments
:: Name | |
-> [TyConBinder] | |
-> Kind | result kind |
-> Maybe Name | |
-> FamTyConFlav | |
-> Maybe Class | |
-> Injectivity | |
-> TyCon |
Create a type family TyCon
mkPromotedDataCon :: DataCon -> Name -> TyConRepName -> [TyConPiTyBinder] -> Kind -> [Role] -> PromDataConInfo -> TyCon #
Create a promoted data constructor TyCon
Somewhat dodgily, we give it the same Name
as the data constructor itself; when we pretty-print
the TyCon we add a quote; see the Outputable TyCon instance
isAbstractTyCon :: TyCon -> Bool #
Test if the TyCon
is algebraic but abstract (invisible data constructors)
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.
isDataTyCon :: TyCon -> Bool #
Returns True
for data types that are definitely represented by
heap-allocated constructors. These are scrutinised by Core-level
case
expressions, and they get info tables allocated for them.
Generally, the function will be true for all data
types and false
for newtype
s, unboxed tuples, unboxed sums and type family
TyCon
s. But it is not guaranteed to return True
in all cases
that it could.
NB: for a data type family, only the instance TyCon
s
get an info table. The family declaration TyCon
does not
isTypeDataTyCon :: TyCon -> Bool #
Was this TyCon
declared as "type data"?
See Note [Type data declarations] in GHC.Rename.Module.
isInjectiveTyCon :: TyCon -> Role -> Bool #
isInjectiveTyCon
is true of TyCon
s for which this property holds
(where r is the role passed in):
If (T a1 b1 c1) ~r (T a2 b2 c2), then (a1 ~r1 a2), (b1 ~r2 b2), and (c1 ~r3 c2)
(where r1, r2, and r3, are the roles given by tyConRolesX tc r)
See also Note [Decomposing TyConApp equalities] in GHC.Tc.Solver.Canonical
isGenerativeTyCon :: TyCon -> Role -> Bool #
isGenerativeTyCon
is true of TyCon
s for which this property holds
(where r is the role passed in):
If (T tys ~r t), then (t's head ~r T).
See also Note [Decomposing TyConApp equalities] in GHC.Tc.Solver.Canonical
isGenInjAlgRhs :: AlgTyConRhs -> Bool #
Is this an AlgTyConRhs
of a TyCon
that is generative and injective
with respect to representational equality?
isNewTyCon :: TyCon -> Bool #
Is this TyCon
that for a newtype
unwrapNewTyCon_maybe :: TyCon -> Maybe ([TyVar], Type, CoAxiom Unbranched) #
unwrapNewTyConEtad_maybe :: TyCon -> Maybe ([TyVar], Type, CoAxiom Unbranched) #
isTypeSynonymTyCon :: TyCon -> Bool #
Is this a TyCon
representing a regular H98 type synonym (type
)?
isTauTyCon :: TyCon -> Bool #
isFamFreeTyCon :: TyCon -> Bool #
Is this tycon neither a type family nor a synonym that expands to a type family?
isForgetfulSynTyCon :: TyCon -> Bool #
Is this a forgetful type synonym? If this is a type synonym whose RHS does not mention one (or more) of its bound variables, returns True. Thus, False means that all bound variables appear on the RHS; True may not mean anything, as the test to set this flag is conservative.
tyConMustBeSaturated :: TyCon -> Bool #
True iff we can decompose (T a b c) into ((T a b) c) I.e. is it injective and generative w.r.t nominal equality? That is, if (T a b) ~N d e f, is it always the case that (T ~N d), (a ~N e) and (b ~N f)? Specifically NOT true of synonyms (open and otherwise)
It'd be unusual to call tyConMustBeSaturated on a regular H98 type synonym, because you should probably have expanded it first But regardless, it's not decomposable
isGadtSyntaxTyCon :: TyCon -> Bool #
Is this an algebraic TyCon
declared with the GADT syntax?
isEnumerationTyCon :: TyCon -> Bool #
Is this an algebraic TyCon
which is just an enumeration of values?
isFamilyTyCon :: TyCon -> Bool #
Is this a TyCon
, synonym or otherwise, that defines a family?
isOpenFamilyTyCon :: TyCon -> Bool #
Is this a TyCon
, synonym or otherwise, that defines a family with
instances?
isTypeFamilyTyCon :: TyCon -> Bool #
Is this a synonym TyCon
that can have may have further instances appear?
isDataFamilyTyCon :: TyCon -> Bool #
Is this a synonym TyCon
that can have may have further instances appear?
isOpenTypeFamilyTyCon :: TyCon -> Bool #
Is this an open type family TyCon?
isClosedSynFamilyTyConWithAxiom_maybe :: TyCon -> Maybe (CoAxiom Branched) #
Is this a non-empty closed type family? Returns Nothing
for
abstract or empty closed families.
tyConFamilyResVar_maybe :: TyCon -> Maybe Name #
Extract type variable naming the result of injective type family
tyConInjectivityInfo :: TyCon -> Injectivity #
returns tyConInjectivityInfo
tc
if Injective
istc
is an
injective tycon (where is
states for which tyConBinders
tc
is
injective), or NotInjective
otherwise.
isTyConAssoc :: TyCon -> Bool #
Is this TyCon for an associated type?
tyConAssoc_maybe :: TyCon -> Maybe TyCon #
Get the enclosing class TyCon (if there is one) for the given TyCon.
tyConFlavourAssoc_maybe :: TyConFlavour -> Maybe TyCon #
Get the enclosing class TyCon (if there is one) for the given TyConFlavour
tyConTuple_maybe :: TyCon -> Maybe TupleSort #
isBoxedTupleTyCon :: TyCon -> Bool #
Is this the TyCon
for a boxed tuple?
isUnboxedSumTyCon :: TyCon -> Bool #
Is this the TyCon
for an unboxed sum?
isLiftedAlgTyCon :: TyCon -> Bool #
isPromotedDataCon_maybe :: TyCon -> Maybe DataCon #
Retrieves the promoted DataCon if this is a PromotedDataCon;
isPromotedTupleTyCon :: TyCon -> Bool #
Is this the TyCon
for a promoted tuple?
isPromotedDataCon :: TyCon -> Bool #
Is this a PromotedDataCon?
isDataKindsPromotedDataCon :: TyCon -> Bool #
This function identifies PromotedDataCon's from data constructors in `data T = K1 | K2`, promoted by -XDataKinds. These type constructors are printed with a tick mark 'K1 and 'K2, and similarly have a tick mark added to their OccName's.
In contrast, constructors in `type data T = K1 | K2` are printed and represented with their original undecorated names. See Note [Type data declarations] in GHC.Rename.Module
isKindTyCon :: TyCon -> Bool #
Is this tycon really meant for use at the kind level? That is, should it be permitted without -XDataKinds?
isLiftedTypeKindTyConName :: Name -> Bool #
isImplicitTyCon :: TyCon -> Bool #
Identifies implicit tycons that, in particular, do not go into interface files (because they are implicitly reconstructed when the interface is read).
Note that:
- Associated families are implicit, as they are re-constructed from the class declaration in which they reside, and
- Family instances are not implicit as they represent the instance body
(similar to a
dfun
does that for a class instance). - Tuples are implicit iff they have a wired-in name (namely: boxed and unboxed tuples are wired-in and implicit, but constraint tuples are not)
tyConCType_maybe :: TyCon -> Maybe CType #
tcHasFixedRuntimeRep :: TyCon -> Bool #
Does this TyCon
have a syntactically fixed RuntimeRep when fully applied,
as per Note [Fixed RuntimeRep] in GHC.Tc.Utils.Concrete?
False is safe. True means we're sure. Does only a quick check, based on the TyCon's category.
See Note [Representation-polymorphic TyCons]
isConcreteTyCon :: TyCon -> Bool #
Is this TyCon
concrete (i.e. not a synonym/type family)?
Used for representation polymorphism checks.
setTcTyConKind :: TyCon -> Kind -> TyCon #
isMonoTcTyCon :: TyCon -> Bool #
tcTyConScopedTyVars :: TyCon -> [(Name, TcTyVar)] #
Arguments
:: TyCon | |
-> [tyco] | Arguments to |
-> ExpandSynResult tyco | Returns a |
isTyConWithSrcDataCons :: TyCon -> Bool #
Check if the tycon actually refers to a proper `data` or `newtype` with user defined constructors rather than one from a class or other construction.
tyConDataCons :: TyCon -> [DataCon] #
As tyConDataCons_maybe
, but returns the empty list of constructors if no
constructors could be found
tyConDataCons_maybe :: TyCon -> Maybe [DataCon] #
tyConSingleDataCon :: TyCon -> DataCon #
Like tyConSingleDataCon_maybe
, but panics if Nothing
.
tyConSingleAlgDataCon_maybe :: TyCon -> Maybe DataCon #
Like tyConSingleDataCon_maybe
, but returns Nothing
for newtypes.
tyConAlgDataCons_maybe :: TyCon -> Maybe [DataCon] #
Returns Just dcs
if the given TyCon
is a data
type, a tuple type
or a sum type with data constructors dcs. If the TyCon
has more than one
constructor, or represents a primitive or function type constructor then
Nothing
is returned.
Like tyConDataCons_maybe
, but returns Nothing
for newtypes.
tyConFamilySize :: TyCon -> Int #
algTyConRhs :: TyCon -> AlgTyConRhs #
Extract an AlgTyConRhs
with information about data constructors from an
algebraic or tuple TyCon
. Panics for any other sort of TyCon
newTyConRhs :: TyCon -> ([TyVar], Type) #
newTyConEtadArity :: TyCon -> Int #
The number of type parameters that need to be passed to a newtype to resolve it. May be less than in the definition if it can be eta-contracted.
newTyConEtadRhs :: TyCon -> ([TyVar], Type) #
newTyConCo_maybe :: TyCon -> Maybe (CoAxiom Unbranched) #
newTyConCo :: TyCon -> CoAxiom Unbranched #
newTyConDataCon_maybe :: TyCon -> Maybe DataCon #
tyConStupidTheta :: TyCon -> [PredType] #
Find the "stupid theta" of the TyCon
. A "stupid theta" is the context
to the left of an algebraic type declaration, e.g. Eq a
in the declaration
data Eq a => T a ...
. See Note [The stupid context]
in GHC.Core.DataCon.
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.
famTyConFlav_maybe :: TyCon -> Maybe FamTyConFlav #
Extract the flavour of a type family (with all the extra information that it carries)
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?
tyConFamInstSig_maybe :: TyCon -> Maybe (TyCon, [Type], CoAxiom Unbranched) #
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
tyConPromDataConInfo :: TyCon -> PromDataConInfo #
Extract any RuntimeRepInfo
from this TyCon
mkTyConTagMap :: TyCon -> NameEnv ConTag #
tyConFlavour :: TyCon -> TyConFlavour #
tcFlavourIsOpen :: TyConFlavour -> Bool #
Is this flavour of TyCon
an open type family or a data family?
pprPromotionQuote :: TyCon -> SDoc #
tyConSkolem :: TyCon -> Bool #
Returns whether or not this TyCon
is definite, or a hole
that may be filled in at some later point. See Note [Skolem abstract data]
mkTyVarTys :: [TyVar] -> [Type] #
mkInvisFunTy :: HasDebugCallStack => Type -> Type -> Type infixr 3 #
mkInvisFunTys :: HasDebugCallStack => [Type] -> Type -> Type #
tcMkInvisFunTy :: TypeOrConstraint -> Type -> Type -> Type #
mkVisFunTy :: HasDebugCallStack => Mult -> Type -> Type -> Type #
mkVisFunTyMany :: HasDebugCallStack => Type -> Type -> Type infixr 3 #
Make nested arrow types | Special, common, case: Arrow type with mult Many
mkVisFunTysMany :: [Type] -> Type -> Type #
mkScaledFunTys :: HasDebugCallStack => [Scaled Type] -> Type -> Type #
mkForAllTys :: [ForAllTyBinder] -> Type -> Type #
Wraps foralls over the type using the provided TyCoVar
s from left to right
mkInvisForAllTys :: [InvisTVBinder] -> Type -> Type #
Wraps foralls over the type using the provided InvisTVBinder
s from left to right
mkPiTy :: PiTyBinder -> Type -> Type #
mkPiTys :: [PiTyBinder] -> Type -> Type #
coHoleCoVar :: CoercionHole -> CoVar #
setCoHoleCoVar :: CoercionHole -> CoVar -> CoercionHole #
foldTyCo :: Monoid a => TyCoFolder env a -> env -> (Type -> a, [Type] -> a, Coercion -> a, [Coercion] -> a) #
coercionSize :: Coercion -> Int #
funTyFlagTyCon :: FunTyFlag -> TyCon #
tYPETyConName :: Name #
cONSTRAINTKind :: Type #
tyCoVarsOfType :: Type -> TyCoVarSet #
tyCoVarsOfTypes :: [Type] -> TyCoVarSet #
tyCoVarsOfCo :: Coercion -> TyCoVarSet #
tyCoVarsOfCos :: [Coercion] -> TyCoVarSet #
coVarsOfType :: Type -> CoVarSet #
coVarsOfTypes :: [Type] -> CoVarSet #
coVarsOfCo :: Coercion -> CoVarSet #
closeOverKinds :: TyCoVarSet -> TyCoVarSet #
closeOverKindsList :: [TyVar] -> [TyVar] #
Add the kind variables free in the kinds of the tyvars in the given set. Returns a deterministically ordered list.
closeOverKindsDSet :: DTyVarSet -> DTyVarSet #
Add the kind variables free in the kinds of the tyvars in the given set. Returns a deterministic set.
tyCoVarsOfTypeDSet :: Type -> DTyCoVarSet #
tyCoFVsOfType
that returns free variables of a type in a deterministic
set. For explanation of why using VarSet
is not deterministic see
Note [Deterministic FV] in GHC.Utils.FV.
tyCoFVsOfType :: Type -> FV #
The worker for tyCoFVsOfType
and tyCoFVsOfTypeList
.
The previous implementation used unionVarSet
which is O(n+m) and can
make the function quadratic.
It's exported, so that it can be composed with
other functions that compute free variables.
See Note [FV naming conventions] in GHC.Utils.FV.
Eta-expanded because that makes it run faster (apparently) See Note [FV eta expansion] in GHC.Utils.FV for explanation.
tyCoFVsBndr :: ForAllTyBinder -> FV -> FV #
tyCoFVsVarBndrs :: [Var] -> FV -> FV #
tyCoFVsVarBndr :: Var -> FV -> FV #
tyCoVarsOfCoDSet :: Coercion -> DTyCoVarSet #
Get a deterministic set of the vars free in a coercion
tyCoFVsOfCo :: Coercion -> FV #
tyCoFVsOfCos :: [Coercion] -> FV #
scopedSort :: [TyCoVar] -> [TyCoVar] #
Do a topological sort on a list of tyvars, so that binders occur before occurrences E.g. given [ a::k, k::*, b::k ] it'll return a well-scoped list [ k::*, a::k, b::k ]
This is a deterministic sorting operation (that is, doesn't depend on Uniques).
It is also meant to be stable: that is, variables should not be reordered unnecessarily. This is specified in Note [ScopedSort] See also Note [Ordering of implicit variables] in GHC.Rename.HsType
tyCoVarsOfTypeWellScoped :: Type -> [TyVar] #
Get the free vars of a type in scoped order
tyCoVarsOfTypesWellScoped :: [Type] -> [TyVar] #
Get the free vars of types in scoped order
tyConsOfType :: Type -> UniqSet TyCon #
All type constructors occurring in the type; looking through type synonyms, but not newtypes. When it finds a Class, it returns the class TyCon.
composeTCvSubst :: Subst -> Subst -> Subst #
Composes two substitutions, applying the second one provided first, like in function composition. This function leaves IdSubstEnv untouched because IdSubstEnv is not used during substitution for types.
emptySubst :: Subst #
mkEmptySubst :: InScopeSet -> Subst #
isEmptySubst :: Subst -> Bool #
isEmptyTCvSubst :: Subst -> Bool #
Checks whether the tyvar and covar environments are empty.
This function should be used over isEmptySubst
when substituting
for types, because types currently do not contain expressions; we can
safely disregard the expression environment when deciding whether
to skip a substitution. Using isEmptyTCvSubst
gives us a non-trivial
performance boost (up to 70% less allocation for T18223)
mkSubst :: InScopeSet -> TvSubstEnv -> CvSubstEnv -> IdSubstEnv -> Subst #
getTvSubstEnv :: Subst -> TvSubstEnv #
getCvSubstEnv :: Subst -> CvSubstEnv #
getSubstInScope :: Subst -> InScopeSet #
Find the in-scope set: see Note [The substitution invariant]
setInScope :: Subst -> InScopeSet -> Subst #
getSubstRangeTyCoFVs :: Subst -> VarSet #
Returns the free variables of the types in the range of a substitution as a non-deterministic set.
notElemSubst :: Var -> Subst -> Bool #
Remove all substitutions that might have been built up while preserving the in-scope set originally called zapSubstEnv
extendSubstInScopeList :: Subst -> [Var] -> Subst #
Add the Var
s to the in-scope set: see also extendInScope
extendSubstInScopeSet :: Subst -> VarSet -> Subst #
Add the Var
s to the in-scope set: see also extendInScope
extendTvSubstBinderAndInScope :: Subst -> PiTyBinder -> Type -> Subst #
extendTvSubstList :: Subst -> [(TyVar, Type)] -> Subst #
Adds multiple TyVar
substitutions to the Subst
: see also extendTvSubst
unionSubst :: Subst -> Subst -> Subst #
zipTvSubst :: HasDebugCallStack => [TyVar] -> [Type] -> Subst #
Generates the in-scope set for the Subst
from the types in the incoming
environment. No CoVars or Ids, please!
zipTCvSubst :: HasDebugCallStack => [TyCoVar] -> [Type] -> 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
zipTyEnv :: HasDebugCallStack => [TyVar] -> [Type] -> TvSubstEnv #
The InScopeSet is just a thunk so with a bit of luck it'll never be evaluated
zipCoEnv :: HasDebugCallStack => [CoVar] -> [Coercion] -> CvSubstEnv #
substTyWith :: HasDebugCallStack => [TyVar] -> [Type] -> Type -> Type #
Type substitution, see zipTvSubst
substTyWithUnchecked :: [TyVar] -> [Type] -> Type -> Type #
Type substitution, see zipTvSubst
. Disables sanity checks.
The problems that the sanity checks in substTy catch are described in
Note [The substitution invariant].
The goal of #11371 is to migrate all the calls of substTyUnchecked to
substTy and remove this function. Please don't use in new code.
substCoWith :: HasDebugCallStack => [TyVar] -> [Type] -> Coercion -> Coercion #
Coercion substitution, see zipTvSubst
substCoWithUnchecked :: [TyVar] -> [Type] -> Coercion -> Coercion #
Coercion substitution, see zipTvSubst
. Disables sanity checks.
The problems that the sanity checks in substCo catch are described in
Note [The substitution invariant].
The goal of #11371 is to migrate all the calls of substCoUnchecked to
substCo and remove this function. Please don't use in new code.
substTysWith :: [TyVar] -> [Type] -> [Type] -> [Type] #
Type substitution, see zipTvSubst
substTyAddInScope :: Subst -> Type -> Type #
Substitute within a Type
after adding the free variables of the type
to the in-scope set. This is useful for the case when the free variables
aren't already in the in-scope set or easily available.
See also Note [The substitution invariant].
substTyUnchecked :: Subst -> Type -> Type #
Substitute within a Type
disabling the sanity checks.
The problems that the sanity checks in substTy catch are described in
Note [The substitution invariant].
The goal of #11371 is to migrate all the calls of substTyUnchecked to
substTy and remove this function. Please don't use in new code.
substScaledTy :: HasDebugCallStack => Subst -> Scaled Type -> Scaled Type #
substScaledTyUnchecked :: HasDebugCallStack => Subst -> Scaled Type -> Scaled Type #
substTys :: HasDebugCallStack => Subst -> [Type] -> [Type] #
Substitute within several Type
s
The substitution has to satisfy the invariants described in
Note [The substitution invariant].
substScaledTys :: HasDebugCallStack => Subst -> [Scaled Type] -> [Scaled Type] #
substTysUnchecked :: Subst -> [Type] -> [Type] #
Substitute within several Type
s disabling the sanity checks.
The problems that the sanity checks in substTys catch are described in
Note [The substitution invariant].
The goal of #11371 is to migrate all the calls of substTysUnchecked to
substTys and remove this function. Please don't use in new code.
substTheta :: HasDebugCallStack => Subst -> ThetaType -> ThetaType #
Substitute within a ThetaType
The substitution has to satisfy the invariants described in
Note [The substitution invariant].
substThetaUnchecked :: Subst -> ThetaType -> ThetaType #
Substitute within a ThetaType
disabling the sanity checks.
The problems that the sanity checks in substTys catch are described in
Note [The substitution invariant].
The goal of #11371 is to migrate all the calls of substThetaUnchecked to
substTheta and remove this function. Please don't use in new code.
substTyVar :: Subst -> TyVar -> Type #
substTyVarToTyVar :: HasDebugCallStack => Subst -> TyVar -> TyVar #
substTyVars :: Subst -> [TyVar] -> [Type] #
substCo :: HasDebugCallStack => Subst -> Coercion -> Coercion #
Substitute within a Coercion
The substitution has to satisfy the invariants described in
Note [The substitution invariant].
substCoUnchecked :: Subst -> Coercion -> Coercion #
Substitute within a Coercion
disabling sanity checks.
The problems that the sanity checks in substCo catch are described in
Note [The substitution invariant].
The goal of #11371 is to migrate all the calls of substCoUnchecked to
substCo and remove this function. Please don't use in new code.
substCos :: HasDebugCallStack => Subst -> [Coercion] -> [Coercion] #
Substitute within several Coercion
s
The substitution has to satisfy the invariants described in
Note [The substitution invariant].
substCoVar :: Subst -> CoVar -> Coercion #
substCoVars :: Subst -> [CoVar] -> [Coercion] #
substTyVarBndr :: HasDebugCallStack => Subst -> TyVar -> (Subst, TyVar) #
substTyVarBndrs :: HasDebugCallStack => Subst -> [TyVar] -> (Subst, [TyVar]) #
substVarBndr :: HasDebugCallStack => Subst -> TyCoVar -> (Subst, TyCoVar) #
substVarBndrs :: HasDebugCallStack => Subst -> [TyCoVar] -> (Subst, [TyCoVar]) #
substCoVarBndr :: HasDebugCallStack => Subst -> CoVar -> (Subst, CoVar) #
cloneTyVarBndrs :: Subst -> [TyVar] -> UniqSupply -> (Subst, [TyVar]) #
substTyCoBndr :: Subst -> PiTyBinder -> (Subst, PiTyBinder) #
tidyVarBndrs :: TidyEnv -> [TyCoVar] -> (TidyEnv, [TyCoVar]) #
This tidies up a type for printing in an error message, or in an interface file.
It doesn't change the uniques at all, just the print names.
tidyFreeTyCoVars :: TidyEnv -> [TyCoVar] -> TidyEnv #
Add the free TyVar
s to the env in tidy form,
so that we can tidy the type they are free in
tidyOpenTyCoVar :: TidyEnv -> TyCoVar -> (TidyEnv, TyCoVar) #
Treat a new TyCoVar
as a binder, and give it a fresh tidy name
using the environment if one has not already been allocated. See
also tidyVarBndr
tidyTyCoVarOcc :: TidyEnv -> TyCoVar -> TyCoVar #
tidyTypes :: TidyEnv -> [Type] -> [Type] #
Tidy a list of Types
See Note [Strictness in tidyType and friends]
tidyOpenTypes :: TidyEnv -> [Type] -> (TidyEnv, [Type]) #
Grabs the free type variables, tidies them
and then uses tidyType
to work over the type itself
tidyTopType :: Type -> Type #
Calls tidyType
on a top-level type (i.e. with an empty tidying environment)
tidyCo :: TidyEnv -> Coercion -> Coercion #
Tidy a Coercion
See Note [Strictness in tidyType and friends]
kindRep :: HasDebugCallStack => Kind -> RuntimeRepType #
Extract the RuntimeRep classifier of a type from its kind. For example,
kindRep * = LiftedRep
; Panics if this is not possible.
Treats * and Constraint as the same
kindRep_maybe :: HasDebugCallStack => Kind -> Maybe RuntimeRepType #
Given a kind (TYPE rr) or (CONSTRAINT rr), extract its RuntimeRep classifier rr.
For example, kindRep_maybe * = Just LiftedRep
Returns Nothing
if the kind is not of form (TYPE rr)
isUnliftedTypeKind :: Kind -> Bool #
Returns True if the kind classifies unlifted types (like 'Int#') and False otherwise. Note that this returns False for representation-polymorphic kinds, which may be specialized to a kind that classifies unlifted types.
pickyIsLiftedTypeKind :: Kind -> Bool #
kindBoxedRepLevity_maybe :: Type -> Maybe Levity #
isLiftedRuntimeRep :: RuntimeRepType -> Bool #
Check whether a type of kind RuntimeRep
is lifted.
- True of
LiftedRep :: RuntimeRep
- False of type variables, type family applications,
and of other reps such as
IntRep :: RuntimeRep
.
isUnliftedRuntimeRep :: RuntimeRepType -> Bool #
Check whether a type of kind RuntimeRep
is unlifted.
- True of definitely unlifted
RuntimeRep
s such asUnliftedRep
,IntRep
,FloatRep
, ... - False of
LiftedRep
, - False for type variables and type family applications.
isLiftedLevity :: Type -> Bool #
isUnliftedLevity :: Type -> Bool #
isRuntimeRepVar :: TyVar -> Bool #
Is a tyvar of type RuntimeRep
?
isLevityVar :: TyVar -> Bool #
Is a tyvar of type PromDataConInfo
?
isMultiplicityVar :: TyVar -> Bool #
Is a tyvar of type Multiplicity
?
splitRuntimeRep_maybe :: RuntimeRepType -> Maybe (TyCon, [Type]) #
(splitRuntimeRep_maybe rr) takes a Type rr :: RuntimeRep, and
returns the (TyCon,[Type]) for the RuntimeRep, if possible, where
the TyCon is one of the promoted DataCons of RuntimeRep.
Remember: the unique on TyCon that is a a promoted DataCon is the
same as the unique on the DataCon
See Note [Promoted data constructors] in GHC.Core.TyCon
May not be possible if rr
is a type variable or type
family application
isBoxedRuntimeRep :: RuntimeRepType -> Bool #
See isBoxedRuntimeRep_maybe
.
runtimeRepLevity_maybe :: RuntimeRepType -> Maybe Levity #
Check whether a type of kind RuntimeRep
is lifted, unlifted, or unknown.
`isLiftedRuntimeRep rr` returns:
levityType_maybe :: LevityType -> Maybe Levity #
levity_maybe
takes a Type of kind Levity, and returns its levity
May not be possible for a type variable or type family application
mapTyCo :: Monad m => TyCoMapper () m -> (Type -> m Type, [Type] -> m [Type], Coercion -> m Coercion, [Coercion] -> m [Coercion]) #
mapTyCoX :: Monad m => TyCoMapper env m -> (env -> Type -> m Type, env -> [Type] -> m [Type], env -> Coercion -> m Coercion, env -> [Coercion] -> m [Coercion]) #
getTyVar :: HasDebugCallStack => Type -> TyVar #
Attempts to obtain the type variable underlying a Type
, and panics with the
given message if this is not a type variable type. See also getTyVar_maybe
repGetTyVar_maybe :: Type -> Maybe TyVar #
Attempts to obtain the type variable underlying a Type
, without
any expansion
getCastedTyVar_maybe :: Type -> Maybe (TyVar, CoercionN) #
If the type is a tyvar, possibly under a cast, returns it, along with the coercion. Thus, the co is :: kind tv ~N kind ty
splitAppTy_maybe :: Type -> Maybe (Type, Type) #
Attempt to take a type application apart, whether it is a function, type constructor, or plain type application. Note that type family applications are NEVER unsaturated by this!
splitAppTy :: Type -> (Type, Type) #
Attempts to take a type application apart, as in splitAppTy_maybe
,
and panics if this is not possible
splitAppTyNoView_maybe :: HasDebugCallStack => Type -> Maybe (Type, Type) #
Does the AppTy split as in splitAppTy_maybe
, but assumes that
any coreView stuff is already done
tcSplitAppTyNoView_maybe :: Type -> Maybe (Type, Type) #
Just like splitAppTyNoView_maybe, but does not split (c => t) See Note [Decomposing fat arrow c=>t]
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.
splitAppTysNoView :: HasDebugCallStack => Type -> (Type, [Type]) #
Like splitAppTys
, but doesn't look through type synonyms
mkNumLitTy :: Integer -> Type #
isNumLitTy :: Type -> Maybe Integer #
Is this a numeric literal. We also look through type synonyms.
mkStrLitTy :: FastString -> Type #
isStrLitTy :: Type -> Maybe FastString #
Is this a symbol literal. We also look through type synonyms.
mkCharLitTy :: Char -> Type #
isCharLitTy :: Type -> Maybe Char #
Is this a char literal? We also look through type synonyms.
userTypeError_maybe :: Type -> Maybe Type #
Is this type a custom user error? If so, give us the kind and the error message.
pprUserTypeErrorTy :: Type -> SDoc #
Render a type corresponding to a user type error into a SDoc.
funTyConAppTy_maybe :: FunTyFlag -> Type -> Type -> Type -> Maybe (TyCon, [Type]) #
Given the components of a FunTy figure out the corresponding TyConApp.
tyConAppFunTy_maybe :: HasDebugCallStack => TyCon -> [Type] -> Maybe Type #
Return Just if this TyConApp should be represented as a FunTy
tyConAppFunCo_maybe :: HasDebugCallStack => Role -> TyCon -> [Coercion] -> Maybe Coercion #
Return Just if this TyConAppCo should be represented as a FunCo
mkFunctionType :: HasDebugCallStack => Mult -> Type -> Type -> Type #
This one works out the FunTyFlag from the argument type See GHC.Types.Var Note [FunTyFlag]
mkScaledFunctionTys :: [Scaled Type] -> Type -> Type #
Like mkFunctionType, compute the FunTyFlag from the arguments
splitFunTy :: Type -> (Mult, Type, Type) #
Attempts to extract the multiplicity, argument and result types from a type,
and panics if that is not possible. See also splitFunTy_maybe
splitFunTy_maybe :: Type -> Maybe (FunTyFlag, Mult, Type, Type) #
Attempts to extract the multiplicity, argument and result types from a type
Just like piResultTys
but for a single argument
Try not to iterate piResultTy
, because it's inefficient to substitute
one variable at a time; instead use 'piResultTys"
Extract the function argument type and panic if that is not possible
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.
tyConAppTyConPicky_maybe :: Type -> Maybe TyCon #
Retrieve the tycon heading this type, if there is one. Does not look through synonyms.
tyConAppTyCon :: HasDebugCallStack => Type -> TyCon #
tyConAppArgs_maybe :: Type -> Maybe [Type] #
The same as snd . splitTyConApp
tyConAppArgs :: HasCallStack => Type -> [Type] #
tcSplitTyConApp_maybe :: HasCallStack => Type -> Maybe (TyCon, [Type]) #
tcSplitTyConApp_maybe splits a type constructor application into its type constructor and applied types.
Differs from splitTyConApp_maybe in that it does *not* split types headed with (=>), as that's not a TyCon in the type-checker.
Note that this may fail (in funTyConAppTy_maybe) in the case
of a FunTy
with an argument of unknown kind FunTy
(e.g. `FunTy (a :: k) Int`, since the kind of a
isn't of
the form `TYPE rep`. This isn't usually a problem but may
be temporarily the cas during canonicalization:
see Note [Decomposing FunTy] in GHC.Tc.Solver.Canonical
and Note [The Purely Kinded Type Invariant (PKTI)] in GHC.Tc.Gen.HsType,
Wrinkle around FunTy
Consequently, you may need to zonk your type before using this function.
tcSplitTyConApp :: Type -> (TyCon, [Type]) #
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.
isCoercionTy_maybe :: Type -> Maybe Coercion #
stripCoercionTy :: Type -> Coercion #
tyConBindersPiTyBinders :: [TyConBinder] -> [PiTyBinder] #
mkInfForAllTy :: TyVar -> Type -> Type #
Like mkTyCoInvForAllTy
, but tv should be a tyvar
mkTyCoInvForAllTys :: [TyCoVar] -> Type -> Type #
Like mkForAllTys
, but assumes all variables are dependent and
Inferred
, a common case
mkInfForAllTys :: [TyVar] -> Type -> Type #
Like mkTyCoInvForAllTys
, but tvs should be a list of tyvar
mkSpecForAllTy :: TyVar -> Type -> Type #
Like mkForAllTy
, but assumes the variable is dependent and Specified
,
a common case
mkSpecForAllTys :: [TyVar] -> Type -> Type #
Like mkForAllTys
, but assumes all variables are dependent and
Specified
, a common case
mkVisForAllTys :: [TyVar] -> Type -> Type #
Like mkForAllTys, but assumes all variables are dependent and visible
Arguments
:: [TyVar] | binders |
-> TyCoVarSet | free variables of result |
-> [TyConBinder] |
Given a list of type-level vars and the free vars of a result kind, makes PiTyBinders, preferring anonymous binders if the variable is, in fact, not dependent. e.g. mkTyConBindersPreferAnon (k:*),(b:k),(c:k) We want (k:*) Named, (b:k) Anon, (c:k) Anon
All non-coercion binders are visible.
splitForAllForAllTyBinders :: Type -> ([ForAllTyBinder], Type) #
Take a ForAllTy apart, returning the binders and result type
splitForAllTyCoVars :: Type -> ([TyCoVar], Type) #
Take a ForAllTy apart, returning the list of tycovars and the result type. This always succeeds, even if it returns only an empty list. Note that the result type returned may have free variables that were bound by a forall.
splitForAllTyVars :: Type -> ([TyVar], Type) #
Like splitForAllTyCoVars
, but split only for tyvars.
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.
splitForAllReqTyBinders :: Type -> ([ReqTyBinder], Type) #
Like splitForAllTyCoVars
, but only splits ForAllTy
s with Required
type
variable binders. Furthermore, each returned tyvar is annotated with ()
.
splitForAllInvisTyBinders :: Type -> ([InvisTyBinder], Type) #
Like splitForAllTyCoVars
, but only splits ForAllTy
s with Invisible
type
variable binders. Furthermore, each returned tyvar is annotated with its
Specificity
.
isForAllTy :: Type -> Bool #
Checks whether this is a proper forall (with a named binder)
isForAllTy_ty :: Type -> Bool #
Like isForAllTy
, but returns True only if it is a tyvar binder
isForAllTy_co :: Type -> Bool #
Like isForAllTy
, but returns True only if it is a covar binder
splitForAllTyCoVar :: Type -> (TyCoVar, Type) #
Take a forall type apart, or panics if that is not possible.
dropForAlls :: Type -> Type #
Drops all ForAllTys
splitForAllTyCoVar_maybe :: Type -> Maybe (TyCoVar, Type) #
Attempts to take a forall type apart, but only if it's a proper forall, with a named binder
splitForAllTyVar_maybe :: Type -> Maybe (TyVar, Type) #
Like splitForAllTyCoVar_maybe
, but only returns Just if it is a tyvar binder.
splitForAllCoVar_maybe :: Type -> Maybe (CoVar, Type) #
Like splitForAllTyCoVar_maybe
, but only returns Just if it is a covar binder.
splitPiTy_maybe :: Type -> Maybe (PiTyBinder, Type) #
Attempts to take a forall type apart; works with proper foralls and functions
splitPiTy :: Type -> (PiTyBinder, Type) #
Takes a forall type apart, or panics
splitPiTys :: Type -> ([PiTyBinder], Type) #
Split off all PiTyBinders to a type, splitting both proper foralls and functions
getRuntimeArgTys :: Type -> [(Scaled Type, FunTyFlag)] #
Extracts a list of run-time arguments from a function type, looking through newtypes to the right of arrows.
Examples:
newtype Identity a = I a getRuntimeArgTys (Int -> Bool -> Double) == [(Int, FTF_T_T), (Bool, FTF_T_T)] getRuntimeArgTys (Identity Int -> Bool -> Double) == [(Identity Int, FTF_T_T), (Bool, FTF_T_T)] getRuntimeArgTys (Int -> Identity (Bool -> Identity Double)) == [(Int, FTF_T_T), (Bool, FTF_T_T)] getRuntimeArgTys (forall a. Show a => Identity a -> a -> Int -> Bool) == [(Show a, FTF_C_T), (Identity a, FTF_T_T),(a, FTF_T_T),(Int, FTF_T_T)]
Note that, in the last case, the returned types might mention an out-of-scope type variable. This function is used only when we really care about the kinds of the returned types, so this is OK.
- *Warning**: this function can return an infinite list. For example:
newtype N a = MkN (a -> N a) getRuntimeArgTys (N a) == repeat (a, FTF_T_T)
invisibleTyBndrCount :: Type -> Int #
splitInvisPiTys :: Type -> ([PiTyBinder], Type) #
Like splitPiTys
, but returns only *invisible* binders, including constraints.
Stops at the first visible binder.
splitInvisPiTysN :: Int -> Type -> ([PiTyBinder], Type) #
Same as splitInvisPiTys
, but stop when
- you have found n
PiTyBinder
s,
- or you run out of invisible binders
filterOutInvisibleTypes :: TyCon -> [Type] -> [Type] #
filterOutInferredTypes :: TyCon -> [Type] -> [Type] #
partitionInvisibles :: [(a, ForAllTyFlag)] -> ([a], [a]) #
Given a list of things paired with their visibilities, partition the things into (invisible things, visible things).
tyConForAllTyFlags :: TyCon -> [Type] -> [ForAllTyFlag] #
Given a TyCon
and a list of argument types to which the TyCon
is
applied, determine each argument's visibility
(Inferred
, Specified
, or Required
).
Wrinkle: consider the following scenario:
T :: forall k. k -> k tyConForAllTyFlags T [forall m. m -> m -> m, S, R, Q]
After substituting, we get
T (forall m. m -> m -> m) :: (forall m. m -> m -> m) -> forall n. n -> n -> n
Thus, the first argument is invisible, S
is visible, R
is invisible again,
and Q
is visible.
appTyForAllTyFlags :: Type -> [Type] -> [ForAllTyFlag] #
Given a Type
and a list of argument types to which the Type
is
applied, determine each argument's visibility
(Inferred
, Specified
, or Required
).
Most of the time, the arguments will be Required
, but not always. Consider
f :: forall a. a -> Type
. In f Type Bool
, the first argument (Type
) is
Specified
and the second argument (Bool
) is Required
. It is precisely
this sort of higher-rank situation in which appTyForAllTyFlags
comes in handy,
since f Type Bool
would be represented in Core using AppTy
s.
(See also #15792).
isAtomicTy :: Type -> Bool #
mkFamilyTyConApp :: TyCon -> [Type] -> Type #
Given a family instance TyCon and its arg types, return the corresponding family type. E.g:
data family T a data instance T (Maybe b) = MkT b
Where the instance tycon is :RTL, so:
mkFamilyTyConApp :RTL Int = T (Maybe Int)
coAxNthLHS :: forall (br :: BranchFlag). CoAxiom br -> Int -> Type #
Get the type on the LHS of a coercion induced by a type/data family instance.
isFamFreeTy :: Type -> Bool #
isCoVarType :: Type -> Bool #
Does this type classify a core (unlifted) Coercion? At either role nominal or representational (t1 ~# t2) or (t1 ~R# t2) See Note [Types for coercions, predicates, and evidence] in GHC.Core.TyCo.Rep
isUnliftedType :: HasDebugCallStack => Type -> Bool #
Is the given type definitely unlifted? See Type for what an unlifted type is.
Panics on representation-polymorphic types; See mightBeUnliftedType
for
a more approximate predicate that behaves better in the presence of
representation polymorphism.
mightBeLiftedType :: Type -> Bool #
mightBeUnliftedType :: Type -> Bool #
isBoxedType :: Type -> Bool #
See Type for what a boxed type is.
Panics on representation-polymorphic types; See mightBeUnliftedType
for
a more approximate predicate that behaves better in the presence of
representation polymorphism.
isRuntimeRepKindedTy :: Type -> Bool #
Is this a type of kind RuntimeRep? (e.g. LiftedRep)
dropRuntimeRepArgs :: [Type] -> [Type] #
Drops prefix of RuntimeRep constructors in TyConApp
s. Useful for e.g.
dropping 'LiftedRep arguments of unboxed tuple TyCon applications:
dropRuntimeRepArgs [ 'LiftedRep, 'IntRep , String, Int# ] == [String, Int#]
getRuntimeRep :: HasDebugCallStack => Type -> RuntimeRepType #
Extract the RuntimeRep classifier of a type. For instance,
getRuntimeRep_maybe Int = LiftedRep
. Panics if this is not possible.
isUnboxedTupleType :: Type -> Bool #
isUnboxedSumType :: Type -> Bool #
isDataFamilyAppType :: Type -> Bool #
Check whether a type is a data family type
isStrictType :: HasDebugCallStack => Type -> Bool #
Computes whether an argument (or let right hand side) should
be computed strictly or lazily, based only on its type.
Currently, it's just isUnliftedType
.
Panics on representation-polymorphic types.
isPrimitiveType :: Type -> Bool #
Returns true of types that are opaque to Haskell.
isValidJoinPointType :: JoinArity -> Type -> Bool #
Determine whether a type could be the type of a join point of given total
arity, according to the polymorphism rule. A join point cannot be polymorphic
in its return type, since given
join j a
b x y z = e1 in e2,
the types of e1 and e2 must be the same, and a and b are not in scope for e2.
(See Note [The polymorphism rule of join points] in GHC.Core.) Returns False
also if the type simply doesn't have enough arguments.
Note that we need to know how many arguments (type *and* value) the putative join point takes; for instance, if j :: forall a. a -> Int then j could be a binary join point returning an Int, but it could *not* be a unary join point returning a -> Int.
TODO: See Note [Excess polymorphism and join points]
sORTKind_maybe :: Kind -> Maybe (TypeOrConstraint, Type) #
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 _`
tyConIsTYPEorCONSTRAINT :: TyCon -> Bool #
isConstraintLikeKind :: Kind -> Bool #
isConstraintKind :: Kind -> Bool #
tcIsLiftedTypeKind :: Kind -> Bool #
Is this kind equivalent to Type
i.e. TYPE LiftedRep?
tcIsBoxedTypeKind :: Kind -> Bool #
Is this kind equivalent to TYPE (BoxedRep l)
for some l :: Levity
?
isTypeLikeKind :: Kind -> Bool #
Is this kind equivalent to TYPE r
(for some unknown r)?
This considers Constraint
to be distinct from *
.
returnsConstraintKind :: Kind -> Bool #
typeHasFixedRuntimeRep :: HasDebugCallStack => Type -> Bool #
Returns True if a type has a syntactically fixed runtime rep, as per Note [Fixed RuntimeRep] in GHC.Tc.Utils.Concrete.
This function is equivalent to `isFixedRuntimeRepKind . typeKind` but much faster.
Precondition: The type has kind (
TYPE
blah)
argsHaveFixedRuntimeRep :: Type -> Bool #
True if the argument types of this function type all have a fixed-runtime-rep
isFixedRuntimeRepKind :: HasDebugCallStack => Kind -> Bool #
Checks that a kind of the form Type
, Constraint
or 'TYPE r
is concrete. See isConcrete
.
Precondition: The type has kind `TYPE blah` or `CONSTRAINT blah`
isConcrete :: Type -> Bool #
Tests whether the given type is concrete, i.e. it whether it consists only of concrete type constructors, concrete type variables, and applications.
See Note [Concrete types] in GHC.Tc.Utils.Concrete.
Arguments
:: Bool | Should specified binders count towards injective positions in the kind of the TyCon? (If you're using visible kind applications, then you want True here. |
-> TyCon | |
-> Int | The number of args the |
-> Bool | Does |
Does a TyCon
(that is applied to some number of arguments) need to be
ascribed with an explicit kind signature to resolve ambiguity if rendered as
a source-syntax type?
(See Note [When does a tycon application need an explicit kind signature?]
for a full explanation of what this function checks for.)
unrestricted :: a -> Scaled a #
Scale a payload by Many
irrelevantMult :: Scaled a -> a #
isLinearType :: Type -> Bool #
mkTYPEapp :: RuntimeRepType -> Type #
mkTYPEapp_maybe :: RuntimeRepType -> Maybe Type #
Given a RuntimeRep
, applies TYPE
to it.
On the fly it rewrites
TYPE LiftedRep --> liftedTypeKind (a synonym)
TYPE UnliftedRep --> unliftedTypeKind (ditto)
TYPE ZeroBitRep --> zeroBitTypeKind (ditto)
NB: no need to check for TYPE (BoxedRep Lifted), TYPE (BoxedRep Unlifted)
because those inner types should already have been rewritten
to LiftedRep and UnliftedRep respectively, by mkTyConApp
see Note [TYPE and CONSTRAINT] in GHC.Builtin.Types.Prim. See Note [Using synonyms to compress types] in GHC.Core.Type
mkCONSTRAINTapp :: RuntimeRepType -> Type #
Just like mkTYPEapp
mkCONSTRAINTapp_maybe :: RuntimeRepType -> Maybe Type #
Just like mkTYPEapp_maybe
mkBoxedRepApp_maybe :: LevityType -> Maybe Type #
Given a PromDataConInfo
, apply BoxedRep
to it
On the fly, rewrite
BoxedRep Lifted --> liftedRepTy (a synonym)
BoxedRep Unlifted --> unliftedRepTy (ditto)
See Note [TYPE and CONSTRAINT] in GHC.Builtin.Types.Prim.
See Note [Using synonyms to compress types] in GHC.Core.Type
mkTupleRepApp_maybe :: Type -> Maybe Type #
Given a `[RuntimeRep]`, apply TupleRep
to it
On the fly, rewrite
TupleRep [] -> zeroBitRepTy (a synonym)
See Note [TYPE and CONSTRAINT] in GHC.Builtin.Types.Prim.
See Note [Using synonyms to compress types] in GHC.Core.Type
litNumIsSigned :: LitNumType -> Bool #
Indicate if a numeric literal type supports negative numbers
litNumBitSize :: Platform -> LitNumType -> Maybe Word #
Number of bits
mkLitNumberWrap :: Platform -> LitNumType -> Integer -> Literal #
Make a literal number using wrapping semantics if the value is out of bound.
litNumWrap :: Platform -> Literal -> Literal #
Wrap a literal number according to its type using wrapping semantics.
litNumCoerce :: LitNumType -> Platform -> Literal -> Literal #
Coerce a literal number into another using wrapping semantics.
litNumNarrow :: LitNumType -> Platform -> Literal -> Literal #
Narrow a literal number by converting it into another number type and then converting it back to its original type.
litNumCheckRange :: Platform -> LitNumType -> Integer -> Bool #
Check that a given number is in the range of a numeric literal
litNumRange :: Platform -> LitNumType -> (Maybe Integer, Maybe Integer) #
Get the literal range
mkLitNumber :: Platform -> LitNumType -> Integer -> Literal #
Create a numeric Literal
of the given type
mkLitIntWrap :: Platform -> Integer -> Literal #
Creates a Literal
of type Int#
.
If the argument is out of the (target-dependent) range, it is wrapped.
See Note [WordInt underflowoverflow]
mkLitIntUnchecked :: Integer -> Literal #
Creates a Literal
of type Int#
without checking its range.
mkLitWordWrap :: Platform -> Integer -> Literal #
Creates a Literal
of type Word#
.
If the argument is out of the (target-dependent) range, it is wrapped.
See Note [WordInt underflowoverflow]
mkLitWordUnchecked :: Integer -> Literal #
Creates a Literal
of type Word#
without checking its range.
mkLitInt8Wrap :: Integer -> Literal #
Creates a Literal
of type Int8#
.
If the argument is out of the range, it is wrapped.
mkLitInt8Unchecked :: Integer -> Literal #
Creates a Literal
of type Int8#
without checking its range.
mkLitWord8 :: Integer -> Literal #
Creates a Literal
of type Word8#
mkLitWord8Wrap :: Integer -> Literal #
Creates a Literal
of type Word8#
.
If the argument is out of the range, it is wrapped.
mkLitWord8Unchecked :: Integer -> Literal #
Creates a Literal
of type Word8#
without checking its range.
mkLitInt16 :: Integer -> Literal #
Creates a Literal
of type Int16#
mkLitInt16Wrap :: Integer -> Literal #
Creates a Literal
of type Int16#
.
If the argument is out of the range, it is wrapped.
mkLitInt16Unchecked :: Integer -> Literal #
Creates a Literal
of type Int16#
without checking its range.
mkLitWord16 :: Integer -> Literal #
Creates a Literal
of type Word16#
mkLitWord16Wrap :: Integer -> Literal #
Creates a Literal
of type Word16#
.
If the argument is out of the range, it is wrapped.
mkLitWord16Unchecked :: Integer -> Literal #
Creates a Literal
of type Word16#
without checking its range.
mkLitInt32 :: Integer -> Literal #
Creates a Literal
of type Int32#
mkLitInt32Wrap :: Integer -> Literal #
Creates a Literal
of type Int32#
.
If the argument is out of the range, it is wrapped.
mkLitInt32Unchecked :: Integer -> Literal #
Creates a Literal
of type Int32#
without checking its range.
mkLitWord32 :: Integer -> Literal #
Creates a Literal
of type Word32#
mkLitWord32Wrap :: Integer -> Literal #
Creates a Literal
of type Word32#
.
If the argument is out of the range, it is wrapped.
mkLitWord32Unchecked :: Integer -> Literal #
Creates a Literal
of type Word32#
without checking its range.
mkLitInt64 :: Integer -> Literal #
Creates a Literal
of type Int64#
mkLitInt64Wrap :: Integer -> Literal #
Creates a Literal
of type Int64#
.
If the argument is out of the range, it is wrapped.
mkLitInt64Unchecked :: Integer -> Literal #
Creates a Literal
of type Int64#
without checking its range.
mkLitWord64 :: Integer -> Literal #
Creates a Literal
of type Word64#
mkLitWord64Wrap :: Integer -> Literal #
Creates a Literal
of type Word64#
.
If the argument is out of the range, it is wrapped.
mkLitWord64Unchecked :: Integer -> Literal #
Creates a Literal
of type Word64#
without checking its range.
mkLitFloat :: Rational -> Literal #
Creates a Literal
of type Float#
mkLitDouble :: Rational -> Literal #
Creates a Literal
of type Double#
mkLitString :: String -> Literal #
Creates a Literal
of type Addr#
, which is appropriate for passing to
e.g. some of the "error" functions in GHC.Err such as GHC.Err.runtimeError
mkLitBigNat :: Integer -> Literal #
isLitRubbish :: Literal -> Bool #
isMinBound :: Platform -> Literal -> Bool #
isMaxBound :: Platform -> Literal -> Bool #
inCharRange :: Char -> Bool #
isLitValue_maybe :: Literal -> Maybe Integer #
narrowInt8Lit :: Literal -> Literal #
narrowInt16Lit :: Literal -> Literal #
narrowInt32Lit :: Literal -> Literal #
narrowInt64Lit :: Literal -> Literal #
narrowWord8Lit :: Literal -> Literal #
narrowWord16Lit :: Literal -> Literal #
narrowWord32Lit :: Literal -> Literal #
narrowWord64Lit :: Literal -> Literal #
convertToWordLit :: Platform -> Literal -> Literal #
Extend or narrow a fixed-width literal (e.g. Int16#
) to a target
word-sized literal (Int#
or Word#
). Narrowing can only happen on 32-bit
architectures when we convert a 64-bit literal into a 32-bit one.
convertToIntLit :: Platform -> Literal -> Literal #
Extend or narrow a fixed-width literal (e.g. Int16#
) to a target
word-sized literal (Int#
or Word#
). Narrowing can only happen on 32-bit
architectures when we convert a 64-bit literal into a 32-bit one.
charToIntLit :: Literal -> Literal #
intToCharLit :: Literal -> Literal #
floatToIntLit :: Literal -> Literal #
intToFloatLit :: Literal -> Literal #
doubleToIntLit :: Literal -> Literal #
intToDoubleLit :: Literal -> Literal #
floatToDoubleLit :: Literal -> Literal #
doubleToFloatLit :: Literal -> Literal #
nullAddrLit :: Literal #
litIsTrivial :: Literal -> Bool #
True if there is absolutely no penalty to duplicating the literal. False principally of strings.
"Why?", you say? I'm glad you asked. Well, for one duplicating strings would blow up code sizes. Not only this, it's also unsafe.
Consider a program that wants to traverse a string. One way it might do this is to first compute the Addr# pointing to the end of the string, and then, starting from the beginning, bump a pointer using eqAddr# to determine the end. For instance,
-- Given pointers to the start and end of a string, count how many zeros -- the string contains. countZeros :: Addr# -> Addr# -> -> Int countZeros start end = go start 0 where go off n | offaddrEq#
end = n | otherwise = go (offplusAddr#
1) n' where n' | isTrue# (indexInt8OffAddr# off 0# ==# 0#) = n + 1 | otherwise = n
Consider what happens if we considered strings to be trivial (and therefore
duplicable) and emitted a call like countZeros "hello"# ("hello"#
. The beginning and end pointers do not belong to the same
string, meaning that an iteration like the above would blow up terribly.
This is what happened in #12757.plusAddr
# 5)
Ultimately the solution here is to make primitive strings a bit more structured, ensuring that the compiler can't inline in ways that will break user code. One approach to this is described in #8472.
litIsDupable :: Platform -> Literal -> Bool #
True if code space does not go bad if we duplicate this literal
litFitsInChar :: Literal -> Bool #
litIsLifted :: Literal -> Bool #
literalType :: Literal -> Type #
Find the Haskell Type
the literal occupies
pprParendCo :: Coercion -> SDoc #
setCoVarUnique :: CoVar -> Unique -> CoVar #
setCoVarName :: CoVar -> Name -> CoVar #
etaExpandCoAxBranch :: CoAxBranch -> ([TyVar], [Type], Type) #
pprCoAxiom :: forall (br :: BranchFlag). CoAxiom br -> SDoc #
pprCoAxBranchUser :: TyCon -> CoAxBranch -> SDoc #
pprCoAxBranchLHS :: TyCon -> CoAxBranch -> SDoc #
pprCoAxBranch :: TyCon -> CoAxBranch -> SDoc #
checkReflexiveMCo :: MCoercion -> MCoercion #
isGReflMCo :: MCoercion -> Bool #
Tests if this MCoercion is obviously generalized reflexive Guaranteed to work very quickly.
mkTransMCo :: MCoercion -> MCoercion -> MCoercion #
Compose two MCoercions via transitivity
mkTransMCoL :: MCoercion -> Coercion -> MCoercion #
mkTransMCoR :: Coercion -> MCoercion -> MCoercion #
mkHomoForAllMCo :: TyCoVar -> MCoercion -> MCoercion #
mkFunResMCo :: Id -> MCoercionR -> MCoercionR #
mkGReflLeftMCo :: Role -> Type -> MCoercionN -> Coercion #
mkGReflRightMCo :: Role -> Type -> MCoercionN -> Coercion #
mkCoherenceRightMCo :: Role -> Type -> MCoercionN -> Coercion -> Coercion #
Like mkCoherenceRightCo
, but with an MCoercion
decomposeFunCo :: HasDebugCallStack => Coercion -> (CoercionN, Coercion, Coercion) #
getCoVar_maybe :: Coercion -> Maybe CoVar #
Extract a covar, if possible. This check is dirty. Be ashamed of yourself. (It's dirty because it cares about the structure of a coercion, which is morally reprehensible.)
splitAppCo_maybe :: Coercion -> Maybe (Coercion, Coercion) #
Attempt to take a coercion application apart.
splitForAllCo_ty_maybe :: Coercion -> Maybe (TyVar, Coercion, Coercion) #
Like splitForAllCo_maybe
, but only returns Just for tyvar binder
splitForAllCo_co_maybe :: Coercion -> Maybe (CoVar, Coercion, Coercion) #
Like splitForAllCo_maybe
, but only returns Just for covar binder
coVarLType :: HasDebugCallStack => CoVar -> Type #
coVarRType :: HasDebugCallStack => CoVar -> Type #
coVarTypes :: HasDebugCallStack => CoVar -> Pair Type #
mkRuntimeRepCo :: HasDebugCallStack => Coercion -> Coercion #
Given a coercion `co :: (t1 :: TYPE r1) ~ (t2 :: TYPE r2)` produce a coercion `rep_co :: r1 ~ r2` But actually it is possible that co :: (t1 :: CONSTRAINT r1) ~ (t2 :: CONSTRAINT r2) or co :: (t1 :: TYPE r1) ~ (t2 :: CONSTRAINT r2) or co :: (t1 :: CONSTRAINT r1) ~ (t2 :: TYPE r2) See Note [mkRuntimeRepCo]
isReflCoVar_maybe :: Var -> Maybe Coercion #
isGReflCo_maybe :: Coercion -> Maybe (Type, Role) #
Returns the type coerced if this coercion is a generalized reflexive coercion. Guaranteed to work very quickly.
isReflCo_maybe :: Coercion -> Maybe (Type, Role) #
Returns the type coerced if this coercion is reflexive. Guaranteed
to work very quickly. Sometimes a coercion can be reflexive, but not
obviously so. c.f. isReflexiveCo_maybe
isReflexiveCo_maybe :: Coercion -> Maybe (Type, Role) #
Extracts the coerced type from a reflexive coercion. This potentially walks over the entire coercion, so avoid doing this in a loop.
mkRepReflCo :: Type -> Coercion #
Make a representational reflexive coercion
mkFunCoNoFTF :: HasDebugCallStack => Role -> CoercionN -> Coercion -> Coercion -> Coercion #
mkHomoForAllCos :: [TyCoVar] -> Coercion -> Coercion #
Make a Coercion quantified over a type/coercion variable; the variable has the same type in both sides of the coercion
mkCoVarCos :: [CoVar] -> [Coercion] #
mkAxInstCo :: forall (br :: BranchFlag). Role -> CoAxiom br -> BranchIndex -> [Type] -> [Coercion] -> Coercion #
mkUnbranchedAxInstCo :: Role -> CoAxiom Unbranched -> [Type] -> [Coercion] -> Coercion #
mkAxInstRHS :: forall (br :: BranchFlag). CoAxiom br -> BranchIndex -> [Type] -> [Coercion] -> Type #
mkUnbranchedAxInstRHS :: CoAxiom Unbranched -> [Type] -> [Coercion] -> Type #
mkAxInstLHS :: forall (br :: BranchFlag). CoAxiom br -> BranchIndex -> [Type] -> [Coercion] -> Type #
Return the left-hand type of the axiom, when the axiom is instantiated at the types given.
mkUnbranchedAxInstLHS :: CoAxiom Unbranched -> [Type] -> [Coercion] -> Type #
Instantiate the left-hand side of an unbranched axiom
mkHoleCo :: CoercionHole -> Coercion #
Make a coercion from a coercion hole
Arguments
:: FunSel | |
-> a | multiplicity |
-> a | argument |
-> a | result |
-> a | One of the above three |
Extract the nth field of a FunCo
mkGReflRightCo :: Role -> Type -> CoercionN -> Coercion #
Given ty :: k1
, co :: k1 ~ k2
,
produces co' :: ty ~r (ty |> co)
mkGReflLeftCo :: Role -> Type -> CoercionN -> Coercion #
Given r
, ty :: k1
, and co :: k1 ~N k2
,
produces co' :: (ty |> co) ~r ty
mkCoherenceLeftCo :: Role -> Type -> CoercionN -> Coercion -> Coercion #
Given ty :: k1
, co :: k1 ~ k2
, co2:: ty ~r ty'
,
produces @co' :: (ty |> co) ~r ty'
It is not only a utility function, but it saves allocation when co
is a GRefl coercion.
mkCoherenceRightCo :: Role -> Type -> CoercionN -> Coercion -> Coercion #
Given ty :: k1
, co :: k1 ~ k2
, co2:: ty' ~r ty
,
produces @co' :: ty' ~r (ty |> co)
It is not only a utility function, but it saves allocation when co
is a GRefl coercion.
downgradeRole :: Role -> Role -> Coercion -> Coercion #
Like downgradeRole_maybe
, but panics if the change isn't a downgrade.
See Note [Role twiddling functions]
setNominalRole_maybe :: Role -> Coercion -> Maybe CoercionN #
Converts a coercion to be nominal, if possible. See Note [Role twiddling functions]
tyConRoleListX :: Role -> TyCon -> [Role] #
tyConRoleListRepresentational :: TyCon -> [Role] #
promoteCoercion :: Coercion -> CoercionN #
like mkKindCo, but aggressively & recursively optimizes to avoid using a KindCo constructor. The output role is nominal.
castCoercionKind2 :: Coercion -> Role -> Type -> Type -> CoercionN -> CoercionN -> Coercion #
Creates a new coercion with both of its types casted by different casts
castCoercionKind2 g r t1 t2 h1 h2
, where g :: t1 ~r t2
,
has type (t1 |> h1) ~r (t2 |> h2)
.
h1
and h2
must be nominal.
castCoercionKind1 :: Coercion -> Role -> Type -> Type -> CoercionN -> Coercion #
castCoercionKind1 g r t1 t2 h
= coercionKind g r t1 t2 h h
That is, it's a specialised form of castCoercionKind, where the two
kind coercions are identical
castCoercionKind1 g r t1 t2 h
, where g :: t1 ~r t2
,
has type (t1 |> h) ~r (t2 |> h)
.
h
must be nominal.
See Note [castCoercionKind1]
castCoercionKind :: Coercion -> CoercionN -> CoercionN -> Coercion #
Creates a new coercion with both of its types casted by different casts
castCoercionKind g h1 h2
, where g :: t1 ~r t2
,
has type (t1 |> h1) ~r (t2 |> h2)
.
h1
and h2
must be nominal.
It calls coercionKindRole
, so it's quite inefficient (which I
stands for)
Use castCoercionKind2
instead if t1
, t2
, and r
are known beforehand.
mkPiCo :: Role -> Var -> Coercion -> Coercion #
Make a forall Coercion
, where both types related by the coercion
are quantified over the same variable.
instNewTyCon_maybe :: TyCon -> [Type] -> Maybe (Type, Coercion) #
If `instNewTyCon_maybe T ts = Just (rep_ty, co)` then `co :: T ts ~R# rep_ty`
Checks for a newtype, and for being saturated
composeSteppers :: NormaliseStepper ev -> NormaliseStepper ev -> NormaliseStepper ev #
Try one stepper and then try the next, if the first doesn't make progress. So if it returns NS_Done, it means that both steppers are satisfied
unwrapNewTypeStepper :: NormaliseStepper Coercion #
A NormaliseStepper
that unwraps newtypes, careful not to fall into
a loop. If it would fall into a loop, it produces NS_Abort
.
topNormaliseTypeX :: NormaliseStepper ev -> (ev -> ev -> ev) -> Type -> Maybe (ev, Type) #
A general function for normalising the top-level of a type. It continues
to use the provided NormaliseStepper
until that function fails, and then
this function returns. The roles of the coercions produced by the
NormaliseStepper
must all be the same, which is the role returned from
the call to topNormaliseTypeX
.
Typically ev is Coercion.
If topNormaliseTypeX step plus ty = Just (ev, ty')
then ty ~ev1~ t1 ~ev2~ t2 ... ~evn~ ty'
and ev = ev1 plus
ev2 plus
... plus
evn
If it returns Nothing then no newtype unwrapping could happen
eqCoercion :: Coercion -> Coercion -> Bool #
Syntactic equality of coercions
eqCoercionX :: RnEnv2 -> Coercion -> Coercion -> Bool #
Compare two Coercion
s, with respect to an RnEnv2
liftCoSubstWithEx :: Role -> [TyVar] -> [Coercion] -> [TyCoVar] -> [Type] -> (Type -> Coercion, [Type]) #
Arguments
:: LiftingContext | original LC |
-> TyCoVar | new variable to map... |
-> Coercion | ...to this lifted version |
-> LiftingContext |
Extend a lifting context with a new mapping.
extendLiftingContextAndInScope #
Arguments
:: LiftingContext | Original LC |
-> TyCoVar | new variable to map... |
-> Coercion | to this coercion |
-> LiftingContext |
Extend a lifting context with a new mapping, and extend the in-scope set
zapLiftingContext :: LiftingContext -> LiftingContext #
Erase the environments in a lifting context
substForAllCoBndrUsingLC :: Bool -> (Coercion -> Coercion) -> LiftingContext -> TyCoVar -> Coercion -> (LiftingContext, TyCoVar, Coercion) #
Like substForAllCoBndr
, but works on a lifting context
liftCoSubstTyVar :: LiftingContext -> Role -> TyVar -> Maybe Coercion #
Arguments
:: (r -> CoercionN) | coercion getter |
-> (LiftingContext -> Type -> r) | callback |
-> LiftingContext | |
-> TyCoVar | |
-> (LiftingContext, TyCoVar, r) |
isMappedByLC :: TyCoVar -> LiftingContext -> Bool #
Is a var in the domain of a lifting context?
substLeftCo :: LiftingContext -> Coercion -> Coercion #
substRightCo :: LiftingContext -> Coercion -> Coercion #
swapLiftCoEnv :: LiftCoEnv -> LiftCoEnv #
Apply "sym" to all coercions in a LiftCoEnv
lcSubstLeft :: LiftingContext -> Subst #
lcSubstRight :: LiftingContext -> Subst #
liftEnvSubstLeft :: Subst -> LiftCoEnv -> Subst #
liftEnvSubstRight :: Subst -> LiftCoEnv -> Subst #
lcSubst :: LiftingContext -> Subst #
Extract the underlying substitution from the LiftingContext
lcInScopeSet :: LiftingContext -> InScopeSet #
Get the InScopeSet
from a LiftingContext
coercionKinds :: [Coercion] -> Pair [Type] #
Apply coercionKind
to multiple Coercion
s
getNthFromType :: HasDebugCallStack => CoSel -> Type -> Type #
coercionRole :: Coercion -> Role #
Retrieve the role from a coercion.
mkPrimEqPred :: Type -> Type -> Type #
Creates a primitive type equality predicate. Invariant: the types are not Coercions
mkPrimEqPredRole :: Role -> Type -> Type -> PredType #
Makes a lifted equality predicate at the given role
mkHeteroPrimEqPred :: Kind -> Kind -> Type -> Type -> Type #
Creates a primitive type equality predicate with explicit kinds
mkHeteroReprPrimEqPred :: Kind -> Kind -> Type -> Type -> Type #
Creates a primitive representational type equality predicate with explicit kinds
mkReprPrimEqPred :: Type -> Type -> Type #
buildCoercion :: Type -> Type -> CoercionN #
Assuming that two types are the same, ignoring coercions, find a nominal coercion between the types. This is useful when optimizing transitivity over coercion applications, where splitting two AppCos might yield different kinds. See Note [EtaAppCo] in GHC.Core.Coercion.Opt.
hasCoercionHoleTy :: Type -> Bool #
Is there a coercion hole in this type?
hasCoercionHoleCo :: Coercion -> Bool #
Is there a coercion hole in this coercion?
hasThisCoercionHoleTy :: Type -> CoercionHole -> Bool #
setCoHoleType :: CoercionHole -> Type -> CoercionHole #
Set the type of a CoercionHole
suggestExtension :: Extension -> GhcHint #
Suggests a single extension without extra user info.
suggestExtensionWithInfo :: SDoc -> Extension -> GhcHint #
Like suggestExtension
but allows supplying extra info for the user.
suggestExtensions :: [Extension] -> GhcHint #
Suggests to enable every extension in the list.
suggestExtensionsWithInfo :: SDoc -> [Extension] -> GhcHint #
Like suggestExtensions
but allows supplying extra info for the user.
suggestAnyExtension :: [Extension] -> GhcHint #
Suggests to enable any extension in the list.
suggestAnyExtensionWithInfo :: SDoc -> [Extension] -> GhcHint #
Like suggestAnyExtension
but allows supplying extra info for the user.
useExtensionInOrderTo :: SDoc -> Extension -> GhcHint #
emptyMessages :: Messages e #
mkMessages :: Bag (MsgEnvelope e) -> Messages e #
isEmptyMessages :: Messages e -> Bool #
singleMessage :: MsgEnvelope e -> Messages e #
addMessage :: MsgEnvelope e -> Messages e -> Messages e #
Adds a Message
to the input collection of messages.
See Note [Discarding Messages].
unionMessages :: Messages e -> Messages e -> Messages e #
Joins two collections of messages together. See Note [Discarding Messages].
mkDecorated :: [SDoc] -> DecoratedSDoc #
Creates a new DecoratedSDoc
out of a list of SDoc
.
mkSimpleDecorated :: SDoc -> DecoratedSDoc #
Creates a new DecoratedSDoc
out of a single SDoc
unionDecoratedSDoc :: DecoratedSDoc -> DecoratedSDoc -> DecoratedSDoc #
Joins two DecoratedSDoc
together. The resulting DecoratedSDoc
will have a number of entries which is the sum of the lengths of
the input.
mapDecoratedSDoc :: (SDoc -> SDoc) -> DecoratedSDoc -> DecoratedSDoc #
Apply a transformation function to all elements of a DecoratedSDoc
.
Helper function to use when no hints can be provided. Currently this function
can be used to construct plain DiagnosticMessage
and add hints to them, but
once #18516 will be fully executed, the main usage of this function would be in
the implementation of the diagnosticHints
typeclass method, to report the fact
that a particular Diagnostic
has no hints.
mkPlainDiagnostic :: DiagnosticReason -> [GhcHint] -> SDoc -> DiagnosticMessage #
mkPlainError :: [GhcHint] -> SDoc -> DiagnosticMessage #
Create an error DiagnosticMessage
holding just a single SDoc
mkDecoratedDiagnostic :: DiagnosticReason -> [GhcHint] -> [SDoc] -> DiagnosticMessage #
Create a DiagnosticMessage
from a list of bulleted SDocs and a DiagnosticReason
mkDecoratedError :: [GhcHint] -> [SDoc] -> DiagnosticMessage #
Create an error DiagnosticMessage
from a list of bulleted SDocs
pprMessageBag :: Bag SDoc -> SDoc #
Arguments
:: MessageClass | What kind of message? |
-> SrcSpan | location |
-> SDoc | message |
-> SDoc |
Arguments
:: Bool | Print warning groups (if applicable)? |
-> MessageClass | What kind of message? |
-> SrcSpan | location |
-> SDoc | message |
-> SDoc |
Make an error message with location info, specifying whether to show warning groups (if applicable).
getCaretDiagnostic :: MessageClass -> SrcSpan -> IO SDoc #
isIntrinsicErrorMessage :: Diagnostic e => MsgEnvelope e -> Bool #
Returns True
if this is, intrinsically, a failure. See
Note [Intrinsic And Extrinsic Failures].
isWarningMessage :: Diagnostic e => MsgEnvelope e -> Bool #
errorsFound :: Diagnostic e => Messages e -> Bool #
Are there any hard errors here? -Werror warnings are not detected. If
you want to check for -Werror warnings, use errorsOrFatalWarningsFound
.
isExtrinsicErrorMessage :: MsgEnvelope e -> Bool #
Returns True
if the envelope contains a message that will stop
compilation: either an intrinsic error or a fatal (-Werror) warning
errorsOrFatalWarningsFound :: Messages e -> Bool #
Are there any errors or -Werror warnings here?
getWarningMessages :: Diagnostic e => Messages e -> Bag (MsgEnvelope e) #
getErrorMessages :: Diagnostic e => Messages e -> Bag (MsgEnvelope e) #
partitionMessages :: Diagnostic e => Messages e -> (Messages e, Messages e) #
Partitions the Messages
and returns a tuple which first element are the
warnings, and the second the errors.
diag_wopt :: WarningFlag -> DiagOpts -> Bool #
diag_fatal_wopt :: WarningFlag -> DiagOpts -> Bool #
diagReasonSeverity :: DiagOpts -> DiagnosticReason -> Severity #
Computes the right Severity
for the input DiagnosticReason
out of
the 'DiagOpts. This function has to be called when a diagnostic is constructed,
i.e. with a 'DiagOpts "snapshot" taken as close as possible to where a
particular diagnostic message is built, otherwise the computed Severity
might
not be correct, due to the mutable nature of the DynFlags
in GHC.
mkMCDiagnostic :: DiagOpts -> DiagnosticReason -> Maybe DiagnosticCode -> MessageClass #
Make a MessageClass
for a given DiagnosticReason
, consulting the
'DiagOpts.
errorDiagnostic :: MessageClass #
Varation of mkMCDiagnostic
which can be used when we are sure the
input DiagnosticReason
is ErrorWithoutFlag
and there is no diagnostic code.
mkMsgEnvelope :: Diagnostic e => DiagOpts -> SrcSpan -> NamePprCtx -> e -> MsgEnvelope e #
Wrap a Diagnostic
in a MsgEnvelope
, recording its location.
If you know your Diagnostic
is an error, consider using mkErrorMsgEnvelope
,
which does not require looking at the DiagOpts
mkErrorMsgEnvelope :: Diagnostic e => SrcSpan -> NamePprCtx -> e -> MsgEnvelope e #
Wrap a Diagnostic
in a MsgEnvelope
, recording its location.
Precondition: the diagnostic is, in fact, an error. That is,
diagnosticReason msg == ErrorWithoutFlag
.
mkPlainMsgEnvelope :: Diagnostic e => DiagOpts -> SrcSpan -> e -> MsgEnvelope e #
Variant that doesn't care about qualified/unqualified names.
mkPlainErrorMsgEnvelope :: Diagnostic e => SrcSpan -> e -> MsgEnvelope e #
Variant of mkPlainMsgEnvelope
which can be used when we are sure we
are constructing a diagnostic with a ErrorWithoutFlag
reason.
getInvalids :: [Validity' a] -> [a] #
formatBulleted :: SDocContext -> DecoratedSDoc -> SDoc #
Formats the input list of structured document, where each element of the list gets a bullet.
pprMessages :: Diagnostic e => DiagnosticOpts e -> Messages e -> SDoc #
pprMsgEnvelopeBagWithLoc :: Diagnostic e => DiagnosticOpts e -> Bag (MsgEnvelope e) -> [SDoc] #
pprMsgEnvelopeBagWithLocDefault :: Diagnostic e => Bag (MsgEnvelope e) -> [SDoc] #
Print the messages with the suitable default configuration, usually not what you want but sometimes you don't really care about what the configuration is (for example, if the message is in a panic).
pprLocMsgEnvelopeDefault :: Diagnostic e => MsgEnvelope e -> SDoc #
pprLocMsgEnvelope :: Diagnostic e => DiagnosticOpts e -> MsgEnvelope e -> SDoc #
sortMsgBag :: Maybe DiagOpts -> Bag (MsgEnvelope e) -> [MsgEnvelope e] #
fatalErrorMsg :: Logger -> SDoc -> IO () #
compilationProgressMsg :: Logger -> SDoc -> IO () #
Arguments
:: 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.
Arguments
:: 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 |
Same as withTiming
, but doesn't print timings in the
console (when given -vN
, N >= 2
or -ddump-timings
).
See Note [withTiming] for more.
printInfoForUser :: Logger -> NamePprCtx -> SDoc -> IO () #
printOutputForUser :: Logger -> NamePprCtx -> SDoc -> IO () #
prettyPrintGhcErrors :: ExceptionMonad m => Logger -> m a -> m a #
traceSystoolCommand :: Logger -> String -> IO a -> IO a #
Record in the eventlog when the given tool command starts
and finishes, prepending the given String
with
"systool:", to easily be able to collect and process
all the systool events.
For those events to show up in the eventlog, you need
to run GHC with -v2
or -ddump-timings
.
simplCountN :: SimplCount -> Int #
Arguments
:: Bool |
|
-> SimplCount |
isZeroSimplCount :: SimplCount -> Bool #
hasDetailedCounts :: SimplCount -> Bool #
doFreeSimplTick :: Tick -> SimplCount -> SimplCount #
Arguments
:: Int | History size of the elaborate counter |
-> Tick | |
-> SimplCount | |
-> SimplCount |
plusSimplCount :: SimplCount -> SimplCount -> SimplCount #
pprSimplCount :: SimplCount -> SDoc #
eqSpecTyVar :: EqSpec -> TyVar #
eqSpecType :: EqSpec -> Type #
eqSpecPair :: EqSpec -> (TyVar, Type) #
eqSpecPreds :: [EqSpec] -> ThetaType #
eqHsBang :: HsImplBang -> HsImplBang -> Bool #
Compare strictness annotations
isBanged :: HsImplBang -> Bool #
isSrcStrict :: SrcStrictness -> Bool #
isSrcUnpacked :: SrcUnpackedness -> Bool #
isMarkedStrict :: StrictnessMark -> Bool #
Arguments
:: Name | |
-> Bool | Is the constructor declared infix? |
-> TyConRepName | TyConRepName for the promoted TyCon |
-> [HsSrcBang] | Strictness/unpack annotations, from user |
-> [FieldLabel] | Field labels for the constructor, if it is a record, otherwise empty |
-> [TyVar] | Universals. |
-> [TyCoVar] | Existentials. |
-> [InvisTVBinder] | User-written |
-> [EqSpec] | GADT equalities |
-> KnotTied ThetaType | Theta-type occurring before the arguments proper |
-> [KnotTied (Scaled Type)] | Original argument types |
-> KnotTied Type | Original result type |
-> PromDataConInfo | See comments on |
-> KnotTied TyCon | Representation type constructor |
-> ConTag | Constructor tag |
-> ThetaType | The "stupid theta", context of the data
declaration e.g. |
-> Id | Worker Id |
-> DataConRep | Representation |
-> DataCon |
Build a new data constructor
dataConTag :: DataCon -> ConTag #
The tag used for ordering DataCon
s
dataConTagZ :: DataCon -> ConTagZ #
dataConOrigTyCon :: DataCon -> TyCon #
The original type constructor used in the definition of this data constructor. In case of a data family instance, that will be the family type constructor.
dataConRepType :: DataCon -> Type #
The representation type of the data constructor, i.e. the sort type that will represent values of this type at runtime
dataConIsInfix :: DataCon -> Bool #
Should the DataCon
be presented infix?
dataConUnivTyVars :: DataCon -> [TyVar] #
The universally-quantified type variables of the constructor
dataConUnivAndExTyCoVars :: DataCon -> [TyCoVar] #
Both the universal and existential type/coercion 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
dataConFieldType :: DataCon -> FieldLabelString -> Type #
Extract the type for any given labelled field of the DataCon
dataConFieldType_maybe :: DataCon -> FieldLabelString -> Maybe (FieldLabel, Type) #
dataConSrcBangs :: DataCon -> [HsSrcBang] #
Strictness/unpack annotations, from user; or, for imported
DataCons, from the interface file
The list is in one-to-one correspondence with the arity of the DataCon
dataConRepArity :: DataCon -> Arity #
Gives the number of value arguments (including zero-width coercions)
stored by the given DataCon
's worker in its Core representation. This may
differ from the number of arguments that appear in the source code; see also
Note [DataCon arities]
isNullarySrcDataCon :: DataCon -> Bool #
Return whether there are any argument types for this DataCon
s original source type
See Note [DataCon arities]
isNullaryRepDataCon :: DataCon -> Bool #
Return whether this DataCon
's worker, in its Core representation, takes
any value arguments.
In particular, remember that we include coercion arguments in the arity of
the Core representation of the DataCon
-- both lifted and unlifted
coercions, despite the latter having zero-width runtime representation.
See also Note [DataCon arities].
dataConRepStrictness :: DataCon -> [StrictnessMark] #
Give the demands on the arguments of a Core constructor application (Con dc args)
dataConImplBangs :: DataCon -> [HsImplBang] #
dataConBoxer :: DataCon -> Maybe DataConBoxer #
dataConInstSig :: DataCon -> [Type] -> ([TyCoVar], ThetaType, [Type]) #
Instantiate the universal tyvars of a data con, returning ( instantiated existentials , instantiated constraints including dependent GADT equalities which are *also* listed in the instantiated existentials , instantiated args)
dataConOrigResTy :: DataCon -> Type #
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.
dataConNonlinearType :: DataCon -> Type #
dataConDisplayType :: Bool -> DataCon -> Type #
Arguments
:: DataCon | A datacon with no existentials or equality constraints However, it can have a dcTheta (notably it can be a class dictionary, with superclasses) |
-> [Type] | Instantiated at these types |
-> [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
dataConInstUnivs :: DataCon -> [Type] -> [Type] #
Given a data constructor dc
with n universally quantified type
variables a_{1}
, a_{2}
, ..., a_{n}
, and given a list of argument
types dc_args
of length m where m <= n, then:
dataConInstUnivs dc dc_args
Will return:
[dc_arg_{1}, dc_arg_{2}, ..., dc_arg_{m}, a_{m+1}, ..., a_{n}]
That is, return the list of universal type variables with
a_{1}
, a_{2}
, ..., a_{m}
instantiated with
dc_arg_{1}
, dc_arg_{2}
, ..., dc_arg_{m}
. It is possible for m
to
be less than n
, in which case the remaining n - m
elements will simply
be universal type variables (with their kinds possibly instantiated).
Examples:
- Given the data constructor
D :: forall a b. Foo a b
anddc_args
[Int, Bool]
, thendataConInstUnivs D dc_args
will return[Int, Bool]
. - Given the data constructor
D :: forall a b. Foo a b
anddc_args
[Int]
, then @dataConInstUnivs D dc_args
will return[Int, b]
. - Given the data constructor
E :: forall k (a :: k). Bar k a
anddc_args
[Type]
, then @dataConInstUnivs D dc_args
will return[Type, (a :: Type)]
.
This is primarily used in GHC.Tc.Deriv.*
in service of instantiating data
constructors' field types.
See Note [Instantiating field types in stock deriving]
for a notable
example of this.
dataConOrigArgTys :: DataCon -> [Scaled Type] #
Returns the argument types of the wrapper, excluding all dictionary arguments and without substituting for any type variables
dataConOtherTheta :: DataCon -> ThetaType #
Returns constraints in the wrapper type, other than those in the dataConEqSpec
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
dataConIdentity :: DataCon -> ByteString #
The string package:module.name
identifying a constructor, which is attached
to its info table and used by the GHCi debugger and the heap profiler
isTupleDataCon :: DataCon -> Bool #
isBoxedTupleDataCon :: DataCon -> Bool #
isUnboxedTupleDataCon :: DataCon -> Bool #
isVanillaDataCon :: DataCon -> Bool #
Vanilla DataCon
s are those that are nice boring Haskell 98 constructors
isNewDataCon :: DataCon -> Bool #
Is this the DataCon
of a newtype?
isCovertGadtDataCon :: DataCon -> Bool #
specialPromotedDc :: DataCon -> Bool #
Should this DataCon be allowed in a type even without -XDataKinds? Currently, only Lifted & Unlifted
classDataCon :: Class -> DataCon #
dataConCannotMatch :: [Type] -> DataCon -> Bool #
dataConResRepTyArgs :: DataCon -> [Type] #
Were the type variables of the data con written in a different order than the regular order (universal tyvars followed by existential tyvars)?
This is not a cheap test, so we minimize its use in GHC as much as possible.
Currently, its only call site in the GHC codebase is in mkDataConRep
in
MkId, and so dataConUserTyVarsNeedWrapper
is only called at most once
during a data constructor's lifetime.
checkDataConTyVars :: DataCon -> Bool #
Extract the type constructor, type argument, data constructor and it's representation argument types from a type if it is a product type.
Precisely, we return Just
for any data type that is all of:
- Concrete (i.e. constructors visible)
- Single-constructor
- ... which has no existentials
Whether the type is a data
type or a newtype
.
hsQTvExplicit :: LHsQTyVars pass -> [LHsTyVarBndr () pass] #
hsPatSigType :: HsPatSigType pass -> LHsType pass #
mapHsOuterImplicit :: (XHsOuterImplicit pass -> XHsOuterImplicit pass) -> HsOuterTyVarBndrs flag pass -> HsOuterTyVarBndrs flag pass #
hsIPNameFS :: HsIPName -> FastString #
isHsKindedTyVar :: HsTyVarBndr flag pass -> Bool #
Does this HsTyVarBndr
come with an explicit kind annotation?
hsScaledThing :: HsScaled pass a -> a #
noTypeArgs :: [Void] #
An empty list that can be used to indicate that there are no type arguments allowed in cases where HsConDetails is applied to Void.
hsConPatArgs :: UnXRec p => HsConPatDetails p -> [LPat p] #
hsRecFields :: UnXRec p => HsRecFields p arg -> [XCFieldOcc p] #
hsRecFieldsArgs :: UnXRec p => HsRecFields p arg -> [arg] #
hsRecFieldSel :: UnXRec p => HsRecField p arg -> XCFieldOcc p #
isFixityLSig :: UnXRec p => LSig p -> Bool #
isTypeLSig :: UnXRec p => LSig p -> Bool #
isSpecLSig :: UnXRec p => LSig p -> Bool #
isSpecInstLSig :: UnXRec p => LSig p -> Bool #
isPragLSig :: UnXRec p => LSig p -> Bool #
isInlineLSig :: UnXRec p => LSig p -> Bool #
isMinimalLSig :: UnXRec p => LSig p -> Bool #
isSCCFunSig :: UnXRec p => LSig p -> Bool #
isCompleteMatchSig :: UnXRec p => LSig p -> Bool #
hsGroupInstDecls :: HsGroup id -> [LInstDecl id] #
isDataDecl :: TyClDecl pass -> Bool #
True
= argument is a data
/newtype
declaration.
isClassDecl :: TyClDecl pass -> Bool #
type class
isFamilyDecl :: TyClDecl pass -> Bool #
type/data family declaration
isTypeFamilyDecl :: TyClDecl pass -> Bool #
type family declaration
isOpenTypeFamilyInfo :: FamilyInfo pass -> Bool #
open type family info
isClosedTypeFamilyInfo :: FamilyInfo pass -> Bool #
closed type family info
isDataFamilyDecl :: TyClDecl pass -> Bool #
data family declaration
tyClDeclTyVars :: TyClDecl pass -> LHsQTyVars pass #
tyClGroupTyClDecls :: [TyClGroup pass] -> [LTyClDecl pass] #
tyClGroupInstDecls :: [TyClGroup pass] -> [LInstDecl pass] #
tyClGroupRoleDecls :: [TyClGroup pass] -> [LRoleAnnotDecl pass] #
tyClGroupKindSigs :: [TyClGroup pass] -> [LStandaloneKindSig pass] #
dataDefnConsNewOrData :: DataDefnCons a -> NewOrData #
isTypeDataDefnCons :: DataDefnCons a -> Bool #
Are the constructors within a type data
declaration?
See Note [Type data declarations] in GHC.Rename.Module.
collectRuleBndrSigTys :: [RuleBndr pass] -> [HsPatSigType pass] #
docDeclDoc :: DocDecl pass -> LHsDoc pass #
annProvenanceName_maybe :: UnXRec p => AnnProvenance p -> Maybe (IdP p) #
isInfixMatch :: Match id body -> Bool #
isPatSynCtxt :: HsMatchContext p -> Bool #
isComprehensionContext :: HsStmtContext id -> Bool #
isMonadStmtContext :: HsStmtContext id -> Bool #
Is this a monadic context?
isMonadDoStmtContext :: HsDoFlavour -> Bool #
isMonadCompContext :: HsStmtContext id -> Bool #
isMonadDoCompContext :: HsDoFlavour -> Bool #
chooseOrphanAnchor :: NameSet -> IsOrphan #
isBuiltinRule :: CoreRule -> Bool #
isAutoRule :: CoreRule -> Bool #
ruleArity :: CoreRule -> Int #
The number of arguments the ru_fn
must be applied
to before the rule can match on it
ruleModule :: CoreRule -> Maybe Module #
ruleActivation :: CoreRule -> Activation #
isLocalRule :: CoreRule -> Bool #
setRuleIdName :: Name -> CoreRule -> CoreRule #
needSaturated :: Bool #
unSaturatedOk :: Bool #
boringCxtOk :: Bool #
boringCxtNotOk :: Bool #
There is no known Unfolding
This unfolding marks the associated thing as being evaluated
There is no known Unfolding
, because this came from an
hi-boot file.
mkOtherCon :: [AltCon] -> Unfolding #
unfoldingTemplate :: Unfolding -> CoreExpr #
Retrieves the template of an unfolding: panics if none is known
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
otherCons :: Unfolding -> [AltCon] #
The constructors that the unfolding could never be:
returns []
if no information is available
isValueUnfolding :: Unfolding -> Bool #
Determines if it is certainly the case that the unfolding will
yield a value (something in HNF): returns False
if unsure
isEvaldUnfolding :: Unfolding -> Bool #
Determines if it possibly the case that the unfolding will
yield a value. Unlike isValueUnfolding
it returns True
for OtherCon
isConLikeUnfolding :: Unfolding -> Bool #
True
if the unfolding is a constructor application, the application
of a CONLIKE function or OtherCon
isCheapUnfolding :: Unfolding -> Bool #
Is the thing we will unfold into certainly cheap?
isExpandableUnfolding :: Unfolding -> Bool #
isCompulsoryUnfolding :: Unfolding -> Bool #
isStableUnfolding :: Unfolding -> Bool #
isStableUserUnfolding :: Unfolding -> Bool #
isInlineUnfolding :: Unfolding -> Bool #
True of a stable unfolding that is
(a) always inlined; that is, with an UnfWhen
guidance, or
(b) a DFunUnfolding which never needs to be inlined
hasSomeUnfolding :: Unfolding -> Bool #
Only returns False if there is no unfolding information available at all
isBootUnfolding :: Unfolding -> Bool #
hasCoreUnfolding :: Unfolding -> Bool #
cmpAltCon :: AltCon -> AltCon -> Ordering #
Compares AltCon
s within a single list of alternatives
DEFAULT comes out smallest, so that sorting by AltCon puts
alternatives in the order required: see Note [Case expression invariants]
deTagExpr :: TaggedExpr t -> CoreExpr #
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
mkCoApps :: Expr b -> [Coercion] -> Expr b infixl 4 #
Apply a list of coercion argument expressions to a function expression in a nested fashion
mkVarApps :: Expr b -> [Var] -> Expr b infixl 4 #
Apply a list of type or value variables to a function expression in a nested fashion
mkConApp :: DataCon -> [Arg b] -> Expr b #
Apply a list of argument expressions to a data constructor in a nested fashion. Prefer to
use mkCoreConApps
if possible
mkTyApps :: Expr b -> [Type] -> Expr b infixl 4 #
Apply a list of type argument expressions to a function expression in a nested fashion
mkIntLit :: Platform -> Integer -> Expr b #
Create a machine integer literal expression of type Int#
from an Integer
.
If you want an expression of type Int
use mkIntExpr
mkIntLitWrap :: Platform -> Integer -> Expr b #
Create a machine integer literal expression of type Int#
from an
Integer
, wrapping if necessary.
If you want an expression of type Int
use mkIntExpr
mkWordLit :: Platform -> Integer -> Expr b #
Create a machine word literal expression of type Word#
from an Integer
.
If you want an expression of type Word
use mkWordExpr
mkWordLitWrap :: Platform -> Integer -> Expr b #
Create a machine word literal expression of type Word#
from an
Integer
, wrapping if necessary.
If you want an expression of type Word
use mkWordExpr
mkWord8Lit :: Integer -> Expr b #
mkWord64LitWord64 :: Word64 -> Expr b #
mkInt64LitInt64 :: Int64 -> Expr b #
Create a machine character literal expression of type Char#
.
If you want an expression of type Char
use mkCharExpr
mkStringLit :: String -> Expr b #
Create a machine string literal expression of type Addr#
.
If you want an expression of type String
use mkStringExpr
mkFloatLit :: Rational -> Expr b #
Create a machine single precision literal expression of type Float#
from a Rational
.
If you want an expression of type Float
use mkFloatExpr
mkFloatLitFloat :: Float -> Expr b #
Create a machine single precision literal expression of type Float#
from a Float
.
If you want an expression of type Float
use mkFloatExpr
mkDoubleLit :: Rational -> Expr b #
Create a machine double precision literal expression of type Double#
from a Rational
.
If you want an expression of type Double
use mkDoubleExpr
mkDoubleLitDouble :: Double -> Expr b #
Create a machine double precision literal expression of type Double#
from a Double
.
If you want an expression of type Double
use mkDoubleExpr
mkLams :: [b] -> Expr b -> Expr b #
Bind all supplied binders over an expression in a nested lambda expression. Prefer to
use mkCoreLams
if possible
mkLets :: [Bind b] -> Expr b -> Expr b #
Bind all supplied binding groups over an expression in a nested let expression. Assumes
that the rhs satisfies the let-can-float invariant. Prefer to use
mkCoreLets
if possible, which does guarantee the invariant
mkLetNonRec :: b -> Expr b -> Expr b -> Expr b #
mkLetNonRec bndr rhs body
wraps body
in a let
binding bndr
.
mkLetRec :: [(b, Expr b)] -> Expr b -> Expr b #
mkLetRec binds body
wraps body
in a let rec
with the given set of
binds
if binds is non-empty.
mkTyBind :: TyVar -> Type -> CoreBind #
Create a binding group where a type variable is bound to a type.
Per Note [Core type and coercion invariant],
this can only be used to bind something in a non-recursive let
expression
mkCoBind :: CoVar -> Coercion -> CoreBind #
Create a binding group where a type variable is bound to a type.
Per Note [Core type and coercion invariant],
this can only be used to bind something in a non-recursive let
expression
varsToCoreExprs :: [CoreBndr] -> [Expr b] #
exprToType :: CoreExpr -> Type #
bindersOfBinds :: [Bind b] -> [b] #
bindersOf
applied to a list of binding groups
foldBindersOfBindStrict :: (a -> b -> a) -> a -> Bind b -> a #
foldBindersOfBindsStrict :: (a -> b -> a) -> a -> [Bind b] -> a #
rhssOfBind :: Bind b -> [Expr b] #
rhssOfAlts :: [Alt b] -> [Expr b] #
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) #
collectNBinders :: JoinArity -> Expr b -> ([b], Expr b) #
Strip off exactly N leading lambdas (type or value). Good for use with join points. Panic if there aren't enough
collectNValBinders_maybe :: Arity -> CoreExpr -> Maybe ([Var], CoreExpr) #
Strip off exactly N leading value lambdas returning all the binders found up to that point Return Nothing if there aren't enough
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
collectFunSimple :: Expr b -> Expr b #
Takes a nested application expression and returns the function being applied. Looking through casts and ticks to find it.
wrapLamBody :: (CoreExpr -> CoreExpr) -> CoreExpr -> CoreExpr #
fmap on the body of a lambda. wrapLamBody f (x -> body) == (x -> f body)
stripNArgs :: Word -> Expr a -> Maybe (Expr a) #
Attempt to remove the last N arguments of a function call. Strip off any ticks or coercions encountered along the way and any at the end.
collectArgsTicks :: (CoreTickish -> Bool) -> Expr b -> (Expr b, [Arg b], [CoreTickish]) #
Like collectArgs
, but also collects looks through floatable
ticks if it means that we can find more arguments.
isRuntimeVar :: Var -> Bool #
Will this variable exist at runtime?
isRuntimeArg :: CoreExpr -> Bool #
Will this argument expression exist at runtime?
Returns True
for value arguments, false for type args
NB: coercions are value arguments (zero width, to be sure,
like State#, but still value args).
Returns True
iff the expression is a Coercion
expression at its top level
valBndrCount :: [CoreBndr] -> Int #
The number of binders that bind values rather than types
valArgCount :: [Arg b] -> Int #
The number of argument expressions that are values rather than types at their top level
collectAnnArgs :: AnnExpr b a -> (AnnExpr b a, [AnnExpr b a]) #
Takes a nested application expression and returns the function being applied and the arguments to which it is applied
collectAnnArgsTicks :: (CoreTickish -> Bool) -> AnnExpr b a -> (AnnExpr b a, [AnnExpr b a], [CoreTickish]) #
deAnnotate :: AnnExpr bndr annot -> Expr bndr #
deAnnotate' :: AnnExpr' bndr annot -> Expr bndr #
collectAnnBndrs :: AnnExpr bndr annot -> ([bndr], AnnExpr bndr annot) #
As collectBinders
but for AnnExpr
rather than Expr
collectNAnnBndrs :: Int -> AnnExpr bndr annot -> ([bndr], AnnExpr bndr annot) #
As collectNBinders
but for AnnExpr
rather than Expr
oneShotInfo :: IdInfo -> OneShotInfo #
Info about a lambda-bound variable, if the Id
is one
arityInfo :: IdInfo -> ArityInfo #
Id
arity, as computed by GHC.Core.Opt.Arity. Specifies how many arguments
this Id
has to be applied to before it does any meaningful work.
callArityInfo :: IdInfo -> ArityInfo #
How this is called. This is the number of arguments to which a binding can be eta-expanded without losing any sharing. n = all calls have at least n arguments
tagSigInfo :: IdInfo -> Maybe TagSig #
setRuleInfo :: IdInfo -> RuleInfo -> IdInfo infixl 1 #
setInlinePragInfo :: IdInfo -> InlinePragma -> IdInfo infixl 1 #
setOccInfo :: IdInfo -> OccInfo -> IdInfo infixl 1 #
unfoldingInfo :: IdInfo -> Unfolding #
Essentially returns the realUnfoldingInfo
field, but does not expose the
unfolding of a strong loop breaker.
This is the right thing to call if you plan to decide whether an unfolding will inline.
setUnfoldingInfo :: IdInfo -> Unfolding -> IdInfo infixl 1 #
hasInlineUnfolding :: IdInfo -> Bool #
True of a non-loop-breaker Id that has a stable unfolding that is
(a) always inlined; that is, with an UnfWhen
guidance, or
(b) a DFunUnfolding which never needs to be inlined
setArityInfo :: IdInfo -> ArityInfo -> IdInfo infixl 1 #
setCallArityInfo :: IdInfo -> ArityInfo -> IdInfo #
setCafInfo :: IdInfo -> CafInfo -> IdInfo infixl 1 #
setLFInfo :: IdInfo -> LambdaFormInfo -> IdInfo #
setOneShotInfo :: IdInfo -> OneShotInfo -> IdInfo infixl 1 #
setDemandInfo :: IdInfo -> Demand -> IdInfo infixl 1 #
setDmdSigInfo :: IdInfo -> DmdSig -> IdInfo infixl 1 #
setCprSigInfo :: IdInfo -> CprSig -> IdInfo infixl 1 #
noCafIdInfo :: IdInfo #
More informative IdInfo
we can use when we know the Id
has no CAF references
unknownArity :: Arity #
It is always safe to assume that an Id
has an arity of 0
ppArityInfo :: Int -> SDoc #
pprStrictness :: DmdSig -> SDoc #
Assume that no specializations exist: always safe
isEmptyRuleInfo :: RuleInfo -> Bool #
ruleInfoFreeVars :: RuleInfo -> DVarSet #
Retrieve the locally-defined free variables of both the left and right hand sides of the specialization rules
ruleInfoRules :: RuleInfo -> [CoreRule] #
setRuleInfoHead :: Name -> RuleInfo -> RuleInfo #
Change the name of the function the rule is keyed on all of the CoreRule
s
mayHaveCafRefs :: CafInfo -> Bool #
zapLamInfo :: IdInfo -> Maybe IdInfo #
This is used to remove information on lambda binders that we have setup as part of a lambda group, assuming they will be applied all at once, but turn out to be part of an unsaturated lambda as in e.g:
(\x1. \x2. e) arg1
zapUsageEnvInfo :: IdInfo -> Maybe IdInfo #
Remove usage environment info from the strictness signature on the IdInfo
zapUsedOnceInfo :: IdInfo -> Maybe IdInfo #
zapFragileInfo :: IdInfo -> Maybe IdInfo #
Zap info that depends on free variables
trimUnfolding :: Unfolding -> Unfolding #
zapTailCallInfo :: IdInfo -> Maybe IdInfo #
zapCallArityInfo :: IdInfo -> IdInfo #
idScaledType :: Id -> Scaled Type #
scaleVarBy :: Mult -> Var -> Var #
Like scaleIdBy
, but skips non-Ids. Useful for scaling
a mixed list of ids and tyvars.
setIdUnique :: Id -> Unique -> Id #
localiseId :: Id -> Id #
modifyIdInfo :: HasDebugCallStack => (IdInfo -> IdInfo) -> Id -> Id #
mkGlobalId :: IdDetails -> Name -> Type -> IdInfo -> Id #
For an explanation of global vs. local Id
s, see GHC.Types.Var.Var
mkLocalId :: HasDebugCallStack => Name -> Mult -> Type -> Id #
For an explanation of global vs. local Id
s, see GHC.Types.Var
mkLocalCoVar :: Name -> Type -> CoVar #
Make a local CoVar
mkLocalIdOrCoVar :: Name -> Mult -> Type -> Id #
Like mkLocalId
, but checks the type to see if it should make a covar
mkLocalIdWithInfo :: HasDebugCallStack => Name -> Mult -> Type -> IdInfo -> 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]
mkExportedVanillaId :: Name -> Type -> Id #
mkSysLocal :: FastString -> Unique -> Mult -> Type -> Id #
mkSysLocalOrCoVar :: FastString -> Unique -> Mult -> Type -> Id #
Like mkSysLocal
, but checks to see if we have a covar type
mkSysLocalM :: MonadUnique m => FastString -> Mult -> Type -> m Id #
mkSysLocalOrCoVarM :: MonadUnique m => FastString -> Mult -> Type -> m Id #
mkUserLocal :: OccName -> Unique -> Mult -> Type -> SrcSpan -> Id #
Create a user local Id
. These are local Id
s (see GHC.Types.Var) with a name and location that the user might recognize
mkUserLocalOrCoVar :: OccName -> Unique -> Mult -> Type -> SrcSpan -> Id #
Like mkUserLocal
, but checks if we have a coercion type
mkWorkerId :: Unique -> Id -> Type -> Id #
Workers get local names. CoreTidy will externalise these if necessary
mkTemplateLocal :: Int -> Type -> Id #
Create a template local: a family of system local Id
s in bijection with Int
s, typically used in unfoldings
mkTemplateLocals :: [Type] -> [Id] #
Create a template local for a series of types
mkTemplateLocalsNum :: Int -> [Type] -> [Id] #
Create a template local for a series of type, but start from a specified template local
recordSelectorTyCon :: Id -> RecSelParent #
isRecordSelector :: Id -> Bool #
isDataConRecordSelector :: Id -> Bool #
isPatSynRecordSelector :: Id -> Bool #
isNaughtyRecordSelector :: Id -> Bool #
isClassOpId :: Id -> Bool #
isClassOpId_maybe :: Id -> Maybe Class #
isPrimOpId :: Id -> Bool #
isPrimOpId_maybe :: Id -> Maybe PrimOp #
isFCallId_maybe :: Id -> Maybe ForeignCall #
isDataConWorkId :: Id -> Bool #
isDataConWorkId_maybe :: Id -> Maybe DataCon #
isDataConWrapId :: Id -> Bool #
isDataConWrapId_maybe :: Id -> Maybe DataCon #
isDataConId_maybe :: Id -> Maybe DataCon #
isWorkerLikeId :: Id -> Bool #
An Id for which we might require all callers to pass strict arguments properly tagged + evaluated.
See Note [CBV Function Ids]
isJoinId_maybe :: Var -> Maybe JoinArity #
Doesn't return strictness marks
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
hasNoBinding :: Id -> Bool #
Returns True
of an Id
which may not have a
binding, even though it is defined in this module.
isImplicitId :: Id -> Bool #
isImplicitId
tells whether an Id
s info is implied by other
declarations, so we don't need to put its signature in an interface
file, even if it's mentioned in some other interface unfolding.
isDeadBinder :: Id -> Bool #
idJoinArity :: JoinId -> JoinArity #
setIdArity :: Id -> Arity -> Id infixl 1 #
idCallArity :: Id -> Arity #
setIdCallArity :: Id -> Arity -> Id infixl 1 #
idFunRepArity :: Id -> RepArity #
This function counts all arguments post-unarisation, which includes arguments with no runtime representation -- see Note [Unarisation and arity]
isDeadEndId :: Var -> Bool #
Returns true if an application to n args diverges or throws an exception See Note [Dead ends] in GHC.Types.Demand.
Accesses the Id'
s dmdSigInfo
.
setIdDmdSig :: Id -> DmdSig -> Id infixl 1 #
setIdCprSig :: Id -> CprSig -> Id infixl 1 #
zapIdDmdSig :: Id -> Id #
isStrictId :: Id -> Bool #
isStrictId
says whether either
(a) the Id
has a strict demand placed on it or
(b) definitely has a "strict type", such that it can always be
evaluated strictly (i.e an unlifted type)
We need to check (b) as well as (a), because when the demand for the
given id
hasn't been computed yet but id
has a strict
type, we still want `isStrictId id` to be True
.
Returns False if the type is levity polymorphic; False is always safe.
idTagSig_maybe :: Id -> Maybe TagSig #
idUnfolding :: IdUnfoldingFun #
Returns the Id
s unfolding, but does not expose the unfolding of a strong
loop breaker. See unfoldingInfo
.
If you really want the unfolding of a strong loopbreaker, call realIdUnfolding
.
alwaysActiveUnfoldingFun :: IdUnfoldingFun #
Returns an unfolding only if (a) not a strong loop breaker and (b) always active
whenActiveUnfoldingFun :: (Activation -> Bool) -> IdUnfoldingFun #
Returns an unfolding only if (a) not a strong loop breaker and (b) active in according to is_active
realIdUnfolding :: Id -> Unfolding #
Expose the unfolding if there is one, including for loop breakers
setIdUnfolding :: Id -> Unfolding -> Id infixl 1 #
idDemandInfo :: Id -> Demand #
setIdDemandInfo :: Id -> Demand -> Id infixl 1 #
setIdTagSig :: Id -> TagSig -> Id #
setIdCbvMarks :: Id -> [CbvMark] -> Id infixl 1 #
If all marks are NotMarkedStrict we just set nothing.
idCbvMarks_maybe :: Id -> Maybe [CbvMark] #
idCbvMarkArity :: Id -> Arity #
asNonWorkerLikeId :: Id -> Id #
Remove any cbv marks on arguments from a given Id.
asWorkerLikeId :: Id -> Id #
Turn this id into a WorkerLikeId if possible.
setCaseBndrEvald :: StrictnessMark -> Id -> Id #
zapIdUnfolding :: Id -> Id #
Similar to trimUnfolding, but also removes evaldness info.
idSpecialisation :: Id -> RuleInfo #
idCoreRules :: Id -> [CoreRule] #
idHasRules :: Id -> Bool #
setIdSpecialisation :: Id -> RuleInfo -> Id infixl 1 #
setIdCafInfo :: Id -> CafInfo -> Id #
idLFInfo_maybe :: Id -> Maybe LambdaFormInfo #
setIdLFInfo :: Id -> LambdaFormInfo -> Id #
setIdOccInfo :: Id -> OccInfo -> Id infixl 1 #
zapIdOccInfo :: Id -> Id #
idInlinePragma :: Id -> InlinePragma #
setInlinePragma :: Id -> InlinePragma -> Id infixl 1 #
modifyInlinePragma :: Id -> (InlinePragma -> InlinePragma) -> Id #
idInlineActivation :: Id -> Activation #
setInlineActivation :: Id -> Activation -> Id infixl 1 #
idRuleMatchInfo :: Id -> RuleMatchInfo #
isConLikeId :: Id -> Bool #
idOneShotInfo :: Id -> OneShotInfo #
setOneShotLambda :: Id -> Id #
clearOneShotLambda :: Id -> Id #
setIdOneShotInfo :: Id -> OneShotInfo -> Id infixl 1 #
updOneShotInfo :: Id -> OneShotInfo -> Id #
zapLamIdInfo :: Id -> Id #
zapFragileIdInfo :: Id -> Id #
zapIdDemandInfo :: Id -> Id #
zapIdUsageInfo :: Id -> Id #
zapIdUsageEnvInfo :: Id -> Id #
zapIdUsedOnceInfo :: Id -> Id #
zapIdTailCallInfo :: Id -> Id #
zapStableUnfolding :: Id -> Id #
wiredInTyCons :: [TyCon] #
mkWiredInTyConName :: BuiltInSyntax -> Module -> FastString -> Unique -> TyCon -> Name #
mkWiredInIdName :: Module -> FastString -> Unique -> Id -> Name #
eqTyConName :: Name #
eqTyCon_RDR :: RdrName #
heqTyConName :: Name #
charTyConName :: Name #
intTyConName :: Name #
boolTyConName :: Name #
listTyConName :: Name #
nilDataConName :: Name #
consDataConName :: Name #
maybeTyConName :: Name #
justDataConName :: Name #
wordTyConName :: Name #
floatTyConName :: Name #
doubleTyConName :: Name #
makeRecoveryTyCon :: TyCon -> TyCon #
Make a fake, recovery TyCon
from an existing one.
Used when recovering from errors in type declarations
intTyCon_RDR :: RdrName #
isBuiltInOcc_maybe :: OccName -> Maybe Name #
Built-in syntax isn't "in scope" so these OccNames map to wired-in Names with BuiltInSyntax. However, this should only be necessary while resolving names produced by Template Haskell splices since we take care to encode built-in syntax names specially in interface files. See Note [Symbol table representation of names].
Moreover, there is no need to include names of things that the user can't write (e.g. type representation bindings like $tc(,,,)).
cTupleTyCon :: Arity -> TyCon #
cTupleTyConNames :: [Name] #
isCTupleTyConName :: Name -> Bool #
cTupleTyConNameArity_maybe :: Name -> Maybe Arity #
If the given name is that of a constraint tuple, return its arity.
cTupleDataConNames :: [Name] #
cTupleSelId :: ConTag -> Arity -> Id #
unitTyConKey :: Unique #
unitDataCon :: DataCon #
unitDataConId :: Id #
unboxedUnitTy :: Type #
unboxedSumKind :: [Type] -> Kind #
Specialization of unboxedTupleSumKind
for sums
heqDataCon :: DataCon #
coercibleClass :: Class #
oneDataConName :: Name #
manyDataConName :: Name #
oneDataCon :: DataCon #
manyDataCon :: DataCon #
typeToTypeKind :: Type #
charDataCon :: DataCon #
intDataCon :: DataCon #
wordDataCon :: DataCon #
word8TyCon :: TyCon #
word8DataCon :: DataCon #
floatTyCon :: TyCon #
floatDataCon :: DataCon #
doubleTyCon :: TyCon #
boxingDataCon :: Type -> BoxingInfo b #
Given a type ty
, if ty
is not of kind Type, return a data constructor that
will box it, and the type of the boxed thing, which does now have kind Type.
See Note [Boxing constructors]
falseDataCon :: DataCon #
trueDataCon :: DataCon #
falseDataConId :: Id #
trueDataConId :: Id #
orderingTyCon :: TyCon #
ordLTDataCon :: DataCon #
ordEQDataCon :: DataCon #
ordGTDataCon :: DataCon #
ordLTDataConId :: Id #
ordEQDataConId :: Id #
ordGTDataConId :: Id #
nilDataCon :: DataCon #
consDataCon :: DataCon #
maybeTyCon :: TyCon #
justDataCon :: DataCon #
mkTupleTy :: Boxity -> [Type] -> Type #
Make a tuple type. The list of types should not include any RuntimeRep specifications. Boxed 1-tuples are flattened. See Note [One-tuples]
mkTupleTy1 :: Boxity -> [Type] -> Type #
Make a tuple type. The list of types should not include any RuntimeRep specifications. Boxed 1-tuples are *not* flattened. See Note [One-tuples] and Note [Don't flatten tuples from HsSyn] in GHC.Core.Make
mkConstraintTupleTy :: [Type] -> Type #
Make a *promoted* list.
integerTyCon :: TyCon #
naturalTyCon :: TyCon #
filterCTuple :: RdrName -> RdrName #
Replaces constraint tuple names with corresponding boxed ones.
lookupOrigNameCache :: OrigNameCache -> Module -> OccName -> Maybe Name #
exprFreeVars :: CoreExpr -> VarSet #
Find all locally-defined free Ids or type variables in an expression returning a non-deterministic set.
Find all locally-defined free Ids or type variables in an expression returning a composable FV computation. See Note [FV naming conventions] in GHC.Utils.FV for why export it.
exprFreeVarsDSet :: CoreExpr -> DVarSet #
Find all locally-defined free Ids or type variables in an expression returning a deterministic set.
exprFreeVarsList :: CoreExpr -> [Var] #
Find all locally-defined free Ids or type variables in an expression returning a deterministically ordered list.
exprFreeIds :: CoreExpr -> IdSet #
Find all locally-defined free Ids in an expression
exprsFreeIds :: [CoreExpr] -> IdSet #
exprFreeIdsDSet :: CoreExpr -> DIdSet #
Find all locally-defined free Ids in an expression returning a deterministic set.
exprFreeIdsList :: CoreExpr -> [Id] #
Find all locally-defined free Ids in an expression returning a deterministically ordered list.
exprsFreeIdsDSet :: [CoreExpr] -> DIdSet #
Find all locally-defined free Ids in several expressions returning a deterministic set.
exprsFreeIdsList :: [CoreExpr] -> [Id] #
Find all locally-defined free Ids in several expressions returning a deterministically ordered list.
exprsFreeVars :: [CoreExpr] -> VarSet #
Find all locally-defined free Ids or type variables in several expressions returning a non-deterministic set.
exprsFreeVarsList :: [CoreExpr] -> [Var] #
Find all locally-defined free Ids or type variables in several expressions returning a deterministically ordered list.
bindFreeVars :: CoreBind -> VarSet #
Find all locally defined free Ids in a binding group
Arguments
:: InterestingVarFun | Says which |
-> CoreExpr | |
-> VarSet |
Finds free variables in an expression selected by a predicate
Arguments
:: InterestingVarFun | Says which |
-> CoreExpr | |
-> [Var] |
Finds free variables in an expression selected by a predicate returning a deterministically ordered list.
exprsSomeFreeVars :: InterestingVarFun -> [CoreExpr] -> VarSet #
Finds free variables in several expressions selected by a predicate
exprsSomeFreeVarsList :: InterestingVarFun -> [CoreExpr] -> [Var] #
Finds free variables in several expressions selected by a predicate returning a deterministically ordered list.
exprsOrphNames :: [CoreExpr] -> NameSet #
Finds the free external names of several expressions: see exprOrphNames
for details
orphNamesOfType :: Type -> NameSet #
orphNamesOfTypes :: [Type] -> NameSet #
orphNamesOfCo :: Coercion -> NameSet #
orphNamesOfCoCon :: forall (br :: BranchFlag). CoAxiom br -> NameSet #
orphNamesOfAxiomLHS :: forall (br :: BranchFlag). CoAxiom br -> NameSet #
orphNamesOfAxiomLHS
collects the names of the concrete types and
type constructors that make up the LHS of a type family instance,
including the family name itself.
For instance, given `type family Foo a b`: `type instance Foo (F (G (H a))) b = ...` would yield [Foo,F,G,H]
Used (via orphNamesOfFamInst) in the implementation of ":info" in GHCi. and when determining orphan-hood for a FamInst or module
ruleRhsFreeVars :: CoreRule -> VarSet #
Those variables free in the right hand side of a rule returned as a non-deterministic set
rulesRhsFreeIds :: [CoreRule] -> VarSet #
Those locally-defined free Id
s in the right hand side of several rules
returned as a non-deterministic set
ruleLhsFreeIds :: CoreRule -> VarSet #
This finds all locally-defined free Ids on the left hand side of a rule and returns them as a non-deterministic set
ruleLhsFreeIdsList :: CoreRule -> [Var] #
This finds all locally-defined free Ids on the left hand side of a rule and returns them as a deterministically ordered list
ruleFreeVars :: CoreRule -> VarSet #
Those variables free in the both the left right hand sides of a rule returned as a non-deterministic set
rulesFreeVarsDSet :: [CoreRule] -> DVarSet #
Those variables free in the both the left right hand sides of rules returned as a deterministic set
rulesFreeVars :: [CoreRule] -> VarSet #
Those variables free in both the left right hand sides of several rules
mkRuleInfo :: [CoreRule] -> RuleInfo #
freeVarsOf :: CoreExprWithFVs -> DIdSet #
Inverse function to freeVars
freeVarsOfAnn :: FVAnn -> DIdSet #
Extract the vars reported in a FVAnn
varTypeTyCoVars :: Var -> TyCoVarSet #
varTypeTyCoFVs :: Var -> FV #
idFreeVars :: Id -> VarSet #
dIdFreeVars :: Id -> DVarSet #
bndrRuleAndUnfoldingIds :: Id -> IdSet #
idRuleVars :: Id -> VarSet #
idUnfoldingVars :: Id -> VarSet #
stableUnfoldingVars :: Unfolding -> Maybe VarSet #
freeVarsBind :: CoreBind -> DVarSet -> (CoreBindWithFVs, DVarSet) #
freeVars :: CoreExpr -> CoreExprWithFVs #
Annotate a CoreExpr
with its (non-global) free type
and value variables at every tree node.
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
coreAltType :: CoreAlt -> Type #
Returns the type of the alternatives right hand side
coreAltsType :: [CoreAlt] -> Type #
Returns the type of the first alternative, which should be the same as for all alternatives
mkLamType :: HasDebugCallStack => Var -> Type -> Type #
Makes a (->)
type or an implicit forall type, depending
on whether it is given a type variable or a term variable.
This is used, for example, when producing the type of a lambda.
Always uses Inferred binders.
applyTypeToArgs :: HasDebugCallStack => SDoc -> Type -> [CoreExpr] -> Type #
Determines the type resulting from applying an expression with given type
mkCastMCo :: CoreExpr -> MCoercionR -> CoreExpr #
mkPiMCo :: Var -> MCoercionR -> MCoercionR #
mkCast :: HasDebugCallStack => CoreExpr -> CoercionR -> CoreExpr #
Wrap the given expression in the coercion safely, dropping identity coercions and coalescing nested coercions
mkTick :: CoreTickish -> CoreExpr -> CoreExpr #
Wraps the given expression in the source annotation, dropping the annotation if possible.
mkTicks :: [CoreTickish] -> CoreExpr -> CoreExpr #
isSaturatedConApp :: CoreExpr -> Bool #
mkTickNoHNF :: CoreTickish -> CoreExpr -> CoreExpr #
tickHNFArgs :: CoreTickish -> CoreExpr -> CoreExpr #
stripTicksTop :: (CoreTickish -> Bool) -> Expr b -> ([CoreTickish], Expr b) #
Strip ticks satisfying a predicate from top of an expression
stripTicksTopE :: (CoreTickish -> Bool) -> Expr b -> Expr b #
Strip ticks satisfying a predicate from top of an expression, returning the remaining expression
stripTicksTopT :: (CoreTickish -> Bool) -> Expr b -> [CoreTickish] #
Strip ticks satisfying a predicate from top of an expression, returning the ticks
stripTicksE :: (CoreTickish -> Bool) -> Expr b -> Expr b #
Completely strip ticks satisfying a predicate from an expression. Note this is O(n) in the size of the expression!
stripTicksT :: (CoreTickish -> Bool) -> Expr b -> [CoreTickish] #
bindNonRec :: HasDebugCallStack => Id -> CoreExpr -> CoreExpr -> CoreExpr #
bindNonRec x r b
produces either:
let x = r in b
or:
case r of x { _DEFAULT_ -> b }
depending on whether we have to use a case
or let
binding for the expression (see needsCaseBinding
).
It's used by the desugarer to avoid building bindings
that give Core Lint a heart attack, although actually
the simplifier deals with them perfectly well. See
also mkCoreLet
needsCaseBinding :: Type -> CoreExpr -> Bool #
Arguments
:: AltCon | Case alternative constructor |
-> [CoreBndr] | Things bound by the pattern match |
-> [Type] | The type arguments to the case alternative |
-> CoreExpr |
This guy constructs the value that the scrutinee must have given that you are in one particular branch of a case
isDefaultAlt :: Alt b -> Bool #
findAlt :: AltCon -> [Alt b] -> Maybe (Alt b) #
Find the case alternative corresponding to a particular constructor: panics if no such constructor exists
mergeAlts :: [Alt a] -> [Alt a] -> [Alt a] #
Merge alternatives preserving order; alternatives in the first argument shadow ones in the second
trimConArgs :: AltCon -> [CoreArg] -> [CoreArg] #
Given:
case (C a b x y) of C b x y -> ...
We want to drop the leading type argument of the scrutinee leaving the arguments to match against the pattern
Arguments
:: [Unique] | Uniques for constructing new binders |
-> Mult | Multiplicity annotation of the case expression |
-> TyCon | Type constructor of scrutinee's type |
-> [Type] | Type arguments of scrutinee's type |
-> [AltCon] | Constructors that cannot match the DEFAULT (if any) |
-> [CoreAlt] | |
-> (Bool, [CoreAlt]) |
Refine the default alternative to a DataAlt
, if there is a unique way to do so.
See Note [Refine DEFAULT case alternatives]
scaleAltsBy :: Mult -> [CoreAlt] -> [CoreAlt] #
exprIsTrivial :: CoreExpr -> Bool #
getIdFromTrivialExpr :: HasDebugCallStack => CoreExpr -> Id #
exprIsDupable :: Platform -> CoreExpr -> Bool #
exprIsWorkFree :: CoreExpr -> Bool #
exprIsCheap :: CoreExpr -> Bool #
exprIsCheapX :: CheapAppFun -> CoreExpr -> Bool #
exprIsExpandable :: CoreExpr -> Bool #
exprOkForSpeculation :: CoreExpr -> Bool #
exprOkForSpeculation
returns True of an expression that is:
- Safe to evaluate even if normal order eval might not evaluate the expression at all, or
- Safe not to evaluate even if normal order would do so
It is usually called on arguments of unlifted type, but not always
In particular, Simplify.rebuildCase calls it on lifted types
when a 'case' is a plain seq
. See the example in
Note [exprOkForSpeculation: case expressions] below
Precisely, it returns True
iff:
a) The expression guarantees to terminate,
b) soon,
c) without causing a write side effect (e.g. writing a mutable variable)
d) without throwing a Haskell exception
e) without risking an unchecked runtime exception (array out of bounds,
divide by zero)
For exprOkForSideEffects
the list is the same, but omitting (e).
Note that exprIsHNF implies exprOkForSpeculation exprOkForSpeculation implies exprOkForSideEffects
See Note [PrimOp can_fail and has_side_effects] in GHC.Builtin.PrimOps and Note [Transformations affected by can_fail and has_side_effects]
As an example of the considerations in this test, consider:
let x = case y# +# 1# of { r# -> I# r# } in E
being translated to:
case y# +# 1# of { r# -> let x = I# r# in E }
We can only do this if the y + 1
is ok for speculation: it has no
side effects, and can't diverge or raise an exception.
exprOkForSideEffects :: CoreExpr -> Bool #
exprOkForSpeculation
returns True of an expression that is:
- Safe to evaluate even if normal order eval might not evaluate the expression at all, or
- Safe not to evaluate even if normal order would do so
It is usually called on arguments of unlifted type, but not always
In particular, Simplify.rebuildCase calls it on lifted types
when a 'case' is a plain seq
. See the example in
Note [exprOkForSpeculation: case expressions] below
Precisely, it returns True
iff:
a) The expression guarantees to terminate,
b) soon,
c) without causing a write side effect (e.g. writing a mutable variable)
d) without throwing a Haskell exception
e) without risking an unchecked runtime exception (array out of bounds,
divide by zero)
For exprOkForSideEffects
the list is the same, but omitting (e).
Note that exprIsHNF implies exprOkForSpeculation exprOkForSpeculation implies exprOkForSideEffects
See Note [PrimOp can_fail and has_side_effects] in GHC.Builtin.PrimOps and Note [Transformations affected by can_fail and has_side_effects]
As an example of the considerations in this test, consider:
let x = case y# +# 1# of { r# -> I# r# } in E
being translated to:
case y# +# 1# of { r# -> let x = I# r# in E }
We can only do this if the y + 1
is ok for speculation: it has no
side effects, and can't diverge or raise an exception.
exprOkForSpecEval :: (Id -> Bool) -> CoreExpr -> Bool #
A special version of exprOkForSpeculation
used during
Note [Speculative evaluation]. When the predicate arg fun_ok
returns False
for b
, then b
is never considered ok-for-spec.
altsAreExhaustive :: [Alt b] -> Bool #
etaExpansionTick :: forall (pass :: TickishPass). Id -> GenTickish pass -> Bool #
Should we look past this tick when eta-expanding the given function?
See Note [Ticks and mandatory eta expansion] Takes the function we are applying as argument.
exprIsHNF :: CoreExpr -> Bool #
exprIsHNF returns true for expressions that are certainly already evaluated to head normal form. This is used to decide whether it's ok to change:
case x of _ -> e
into:
e
and to decide whether it's safe to discard a seq
.
So, it does not treat variables as evaluated, unless they say they are. However, it does treat partial applications and constructor applications as values, even if their arguments are non-trivial, provided the argument type is lifted. For example, both of these are values:
(:) (f x) (map f xs) map (...redex...)
because seq
on such things completes immediately.
For unlifted argument types, we have to be careful:
C (f x :: Int#)
Suppose f x
diverges; then C (f x)
is not a value.
We check for this using needsCaseBinding below
exprIsConLike :: CoreExpr -> Bool #
Similar to exprIsHNF
but includes CONLIKE functions as well as
data constructors. Conlike arguments are considered interesting by the
inliner.
exprIsTickedString :: CoreExpr -> Bool #
Check if the expression is zero or more Ticks wrapped around a literal string.
exprIsTickedString_maybe :: CoreExpr -> Maybe ByteString #
Extract a literal string from an expression that is zero or more Ticks wrapped around a literal string. Returns Nothing if the expression has a different shape. Used to "look through" Ticks in places that need to handle literal strings.
dataConRepFSInstPat :: [FastString] -> [Unique] -> Mult -> DataCon -> [Type] -> ([TyCoVar], [Id]) #
cheapEqExpr :: Expr b -> Expr b -> Bool #
A cheap equality test which bales out fast!
If it returns True
the arguments are definitely equal,
otherwise, they may or may not be equal.
cheapEqExpr' :: (CoreTickish -> Bool) -> Expr b -> Expr b -> Bool #
Cheap expression equality test, can ignore ticks by type.
diffBinds :: Bool -> RnEnv2 -> [(Var, CoreExpr)] -> [(Var, CoreExpr)] -> ([SDoc], RnEnv2) #
Finds differences between core bindings, see diffExpr
.
The main problem here is that while we expect the binds to have the same order in both lists, this is not guaranteed. To do this properly we'd either have to do some sort of unification or check all possible mappings, which would be seriously expensive. So instead we simply match single bindings as far as we can. This leaves us just with mutually recursive and/or mismatching bindings, which we then speculatively match by ordering them. It's by no means perfect, but gets the job done well enough.
Only used in GHC.Core.Lint.lintAnnots
True if the type has no non-bottom elements, e.g. when it is an empty datatype, or a GADT with non-satisfiable type parameters, e.g. Int :~: Bool. See Note [Bottoming expressions]
See Note [No alternatives lint check] for another use of this function.
normSplitTyConApp_maybe :: FamInstEnvs -> Type -> Maybe (TyCon, [Type], Coercion) #
If normSplitTyConApp_maybe _ ty = Just (tc, tys, co)
then ty |> co = tc tys
. It's splitTyConApp_maybe
, but looks through
coercions via topNormaliseType_maybe
. Hence the "norm" prefix.
extendInScopeSetBind :: InScopeSet -> CoreBind -> InScopeSet #
extendInScopeSetBndrs :: InScopeSet -> [CoreBind] -> InScopeSet #
mkInScopeSetBndrs :: [CoreBind] -> InScopeSet #
collectMakeStaticArgs :: CoreExpr -> Maybe (CoreExpr, Type, CoreExpr, CoreExpr) #
collectMakeStaticArgs (makeStatic t srcLoc e)
yields
Just (makeStatic, t, srcLoc, e)
.
Returns Nothing
for every other expression.
isJoinBind :: CoreBind -> Bool #
Does this binding bind a join point (or a recursive group of join points)?
dumpIdInfoOfProgram :: Bool -> (IdInfo -> SDoc) -> CoreProgram -> SDoc #
mkStrictFieldSeqs :: [(Id, StrictnessMark)] -> CoreExpr -> CoreExpr #
shouldStrictifyIdForCbv :: Var -> Bool #
Do we expect there to be any benefit if we make this var strict in order for it to get treated as as cbv argument? See Note [Which Ids should be strictified] See Note [CBV Function Ids] for more background.
shouldUseCbvForId :: Var -> Bool #
isUnsafeEqualityProof :: CoreExpr -> Bool #
extendIdSubstList :: Subst -> [(Id, CoreExpr)] -> Subst #
Adds multiple Id
substitutions to the Subst
: see also extendIdSubst
extendSubst :: Subst -> Var -> CoreArg -> Subst #
Add a substitution appropriate to the thing being substituted
(whether an expression, type, or coercion). See also
extendIdSubst
, extendTvSubst
, extendCvSubst
extendSubstList :: Subst -> [(Var, CoreArg)] -> Subst #
Add a substitution as appropriate to each of the terms being
substituted (whether expressions, types, or coercions). See also
extendSubst
.
lookupIdSubst :: HasDebugCallStack => Subst -> Id -> CoreExpr #
lookupIdSubst_maybe :: HasDebugCallStack => Subst -> Id -> Maybe CoreExpr #
mkOpenSubst :: InScopeSet -> [(Var, CoreArg)] -> Subst #
Simultaneously substitute for a bunch of variables No left-right shadowing ie the substitution for (x y. e) a1 a2 so neither x nor y scope over a1 a2
substExprSC :: HasDebugCallStack => Subst -> CoreExpr -> CoreExpr #
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]
substBindSC :: HasDebugCallStack => Subst -> CoreBind -> (Subst, CoreBind) #
deShadowBinds :: CoreProgram -> CoreProgram #
De-shadowing the program is sometimes a useful pre-pass. It can be done simply by running over the bindings with an empty substitution, because substitution returns a result that has no-shadowing guaranteed.
(Actually, within a single type there might still be shadowing, because
substTy
is a no-op for the empty substitution, but that's probably OK.)
- Aug 09
- This function is not used in GHC at the moment, but seems so short and simple that I'm going to leave it here
substBndrs :: Traversable f => Subst -> f Var -> (Subst, f Var) #
substRecBndrs :: Traversable f => Subst -> f Id -> (Subst, f Id) #
Substitute in a mutually recursive group of Id
s
cloneIdBndr :: Subst -> UniqSupply -> Id -> (Subst, Id) #
cloneIdBndrs :: Subst -> UniqSupply -> [Id] -> (Subst, [Id]) #
Applies cloneIdBndr
to a number of Id
s, accumulating a final
substitution from left to right
Discards non-Stable unfoldings
cloneBndrs :: Subst -> UniqSupply -> [Var] -> (Subst, [Var]) #
cloneRecIdBndrs :: Subst -> UniqSupply -> [Id] -> (Subst, [Id]) #
Clone a mutually recursive group of Id
s
substIdType :: Subst -> Id -> Id #
substUnfoldingSC :: Subst -> Unfolding -> Unfolding #
Substitutes for the Id
s within an unfolding
NB: substUnfolding discards any unfolding without
without a Stable source. This is usually what we want,
but it may be a bit unexpected
substUnfolding :: Subst -> Unfolding -> Unfolding #
Substitutes for the Id
s within an unfolding
NB: substUnfolding discards any unfolding without
without a Stable source. This is usually what we want,
but it may be a bit unexpected
substIdOcc :: Subst -> Id -> Id #
substRulesForImportedIds :: Subst -> [CoreRule] -> [CoreRule] #
substDVarSet :: HasDebugCallStack => Subst -> DVarSet -> DVarSet #
substTickish :: Subst -> CoreTickish -> CoreTickish #
sortQuantVars :: [Var] -> [Var] #
Sort the variables, putting type and covars first, in scoped order, and then other Ids
It is a deterministic sort, meaning it doesn't look at the values of Uniques. For explanation why it's important See Note [Unique Determinism] in GHC.Types.Unique.
Construct an expression which represents the application of one expression to the other
mkWildEvBinder :: PredType -> EvVar #
mkWildValBinder :: Mult -> Type -> Id #
Make a wildcard binder. This is typically used when you need a binder that you expect to use only at a *binding* site. Do not use it at occurrence sites because it has a single, fixed unique, and it's very easy to get into difficulties with shadowing. That's why it is used so little.
See Note [WildCard binders] in GHC.Core.Opt.Simplify.Env
Make a case expression whose case binder is unused The alts and res_ty should not have any occurrences of WildId
castBottomExpr :: CoreExpr -> Type -> CoreExpr #
mkLitRubbish :: Type -> Maybe CoreExpr #
mkUncheckedIntExpr :: Integer -> CoreExpr #
Create a CoreExpr
which will evaluate to the given Int
. Don't check
that the number is in the range of the target platform Int
mkIntegerExpr :: Platform -> Integer -> CoreExpr #
Create a CoreExpr
which will evaluate to the given Integer
mkNaturalExpr :: Platform -> Integer -> CoreExpr #
Create a CoreExpr
which will evaluate to the given Natural
mkStringExprFS :: MonadThings m => FastString -> m CoreExpr #
Create a CoreExpr
which will evaluate to a string morally equivalent to the given FastString
getMkStringIds :: Applicative m => (Name -> m Id) -> m MkStringIds #
mkStringExprFSWith :: MkStringIds -> FastString -> CoreExpr #
mkCoreUnboxedTuple :: [CoreExpr] -> CoreExpr #
Build a small unboxed tuple holding the specified expressions. Do not include the RuntimeRep specifiers; this function calculates them for you. Does not flatten one-tuples; see Note [Flattening one-tuples]
mkCoreTupBoxity :: Boxity -> [CoreExpr] -> CoreExpr #
Make a core tuple of the given boxity; don't flatten 1-tuples
mkCoreVarTupTy :: [Id] -> Type #
Build the type of a small tuple that holds the specified variables One-tuples are flattened; see Note [Flattening one-tuples]
mkCoreTup :: [CoreExpr] -> CoreExpr #
Build a small tuple holding the specified expressions One-tuples are flattened; see Note [Flattening one-tuples]
mkCoreUnboxedSum :: Int -> Int -> [Type] -> CoreExpr -> CoreExpr #
Build an unboxed sum.
Alternative number ("alt") starts from 1.
mkBigCoreVarTupSolo :: [Id] -> CoreExpr #
mkBigCoreVarTup :: [Id] -> CoreExpr #
Build a big tuple holding the specified variables One-tuples are flattened; see Note [Flattening one-tuples] Arguments don't have to have kind Type
mkBigCoreTup :: [CoreExpr] -> CoreExpr #
Build a "big" tuple holding the specified expressions One-tuples are flattened; see Note [Flattening one-tuples] Arguments don't have to have kind Type; ones that do not are boxed This function crashes (in wrapBox) if given a non-Type argument that it doesn't know how to box.
mkBigCoreVarTupTy :: [Id] -> Type #
Build the type of a big tuple that holds the specified variables One-tuples are flattened; see Note [Flattening one-tuples]
mkBigCoreTupTy :: [Type] -> Type #
Build the type of a big tuple that holds the specified type of thing One-tuples are flattened; see Note [Flattening one-tuples]
Arguments
:: ([a] -> a) | "Small" constructor function, of maximum input arity |
-> [a] | Possible "big" list of things to construct from |
-> a | Constructed thing made possible by recursive decomposition |
Lifts a "small" constructor into a "big" constructor by recursive decomposition
Split a list into lists that are small enough to have a corresponding
tuple arity. The sub-lists of the result all have length <= mAX_TUPLE_SIZE
But there may be more than mAX_TUPLE_SIZE
sub-lists
Arguments
:: [Id] | The |
-> Id | The |
-> Id | A variable of the same type as the scrutinee |
-> CoreExpr | Scrutinee |
-> CoreExpr | Selector expression |
mkBigTupleSelectorSolo
is like mkBigTupleSelector
but one-tuples are NOT flattened (see Note [Flattening one-tuples])
Builds a selector which scrutinises the given expression and extracts the one name from the list given. If you want the no-shadowing rule to apply, the caller is responsible for making sure that none of these names are in scope.
If there is just one Id
in the tuple, then the selector is
just the identity.
If necessary, we pattern match on a "big" tuple.
A tuple selector is not linear in its argument. Consequently, the case
expression built by mkBigTupleSelector
must consume its scrutinee Many
times. And all the argument variables must have multiplicity Many
.
Arguments
:: [Id] | The |
-> Id | The |
-> Id | A variable of the same type as the scrutinee |
-> CoreExpr | Scrutinee |
-> CoreExpr | Selector expression |
Builds a selector which scrutinises the given expression and extracts the one name from the list given. If you want the no-shadowing rule to apply, the caller is responsible for making sure that none of these names are in scope.
If there is just one Id
in the tuple, then the selector is
just the identity.
If necessary, we pattern match on a "big" tuple.
A tuple selector is not linear in its argument. Consequently, the case
expression built by mkBigTupleSelector
must consume its scrutinee Many
times. And all the argument variables must have multiplicity Many
.
Arguments
:: UniqSupply | For inventing names of intermediate variables |
-> [Id] | The tuple identifiers to pattern match on; Bring these into scope in the body |
-> CoreExpr | Body of the case |
-> CoreExpr | Scrutinee |
-> CoreExpr |
A generalization of mkBigTupleSelector
, allowing the body
of the case to be an arbitrary expression.
To avoid shadowing, we use uniques to invent new variables.
If necessary we pattern match on a "big" tuple.
wrapFloats :: [FloatBind] -> CoreExpr -> CoreExpr #
Applies the floats from right to left. That is wrapFloats [b1, b2, …, bn]
u = let b1 in let b2 in … in let bn in u
floatBindings :: FloatBind -> [Var] #
mkConsExpr :: Type -> CoreExpr -> CoreExpr -> CoreExpr #
Makes a list (:)
for lists of the specified type
mkListExpr :: Type -> [CoreExpr] -> CoreExpr #
Make a list containing the given expressions, where the list has the given type
Arguments
:: MonadThings m | |
=> Type | Element type of the list |
-> Type | Fold result type |
-> CoreExpr | Cons function expression for the fold |
-> CoreExpr | Nil expression for the fold |
-> CoreExpr | List expression being folded acress |
-> m CoreExpr |
Make a fully applied foldr
expression
Arguments
:: (MonadFail m, MonadThings m, MonadUnique m) | |
=> Type | Type of list elements to be built |
-> ((Id, Type) -> (Id, Type) -> m CoreExpr) | Function that, given information about the |
-> m CoreExpr |
Make a build
expression applied to a locally-bound worker function
mkNothingExpr :: Type -> CoreExpr #
Makes a Nothing for the specified type
mkJustExpr :: Type -> CoreExpr -> CoreExpr #
Makes a Just from a value of the specified type
rEC_SEL_ERROR_ID :: Id #
rEC_CON_ERROR_ID :: Id #
pAT_ERROR_ID :: Id #
tYPE_ERROR_ID :: Id #
mkImpossibleExpr :: Type -> String -> CoreExpr #
mkAbsentErrorApp :: Type -> String -> CoreExpr #
addGlobalInclude :: IncludeSpecs -> [String] -> IncludeSpecs #
Append to the list of includes a path that shall be included using `-I` when the C compiler is called. These paths override system search paths.
addQuoteInclude :: IncludeSpecs -> [String] -> IncludeSpecs #
Append to the list of includes a path that shall be included using `-iquote` when the C compiler is called. These paths only apply when quoted includes are used. e.g. #include "foo.h"
addImplicitQuoteInclude :: IncludeSpecs -> [String] -> IncludeSpecs #
These includes are not considered while fingerprinting the flags for iface | See Note [Implicit include paths]
flattenIncludes :: IncludeSpecs -> [String] #
Concatenate and flatten the list of global and quoted includes returning just a flat list of paths.
programName :: DynFlags -> String #
projectVersion :: DynFlags -> String #
ghcUsagePath :: DynFlags -> FilePath #
ghciUsagePath :: DynFlags -> FilePath #
extraGccViaCFlags :: DynFlags -> [String] #
pgm_windres :: DynFlags -> String #
pgm_ranlib :: DynFlags -> String #
opt_P_signature :: DynFlags -> ([String], Fingerprint) #
opt_windres :: DynFlags -> [String] #
versionedAppDir :: String -> ArchOS -> MaybeT IO FilePath #
The directory for this version of ghc in the user's app directory The appdir used to be in ~/.ghc but to respect the XDG specification we want to move it under $XDG_DATA_HOME/ However, old tooling (like cabal) might still write package environments to the old directory, so we prefer that if a subdirectory of ~/.ghc with the correct target and GHC version suffix exists.
i.e. if ~.ghc$UNIQUE_SUBDIR exists we use that otherwise we use $XDG_DATA_HOME/$UNIQUE_SUBDIR
UNIQUE_SUBDIR is typically a combination of the target platform and GHC version
versionedFilePath :: ArchOS -> FilePath #
packageFlagsChanged :: DynFlags -> DynFlags -> Bool #
positionIndependent :: DynFlags -> Bool #
Are we building with -fPIE
or -fPIC
enabled?
setDynamicNow :: DynFlags -> DynFlags #
initDynFlags :: DynFlags -> IO DynFlags #
defaultDynFlags :: Settings -> DynFlags #
languageExtensions :: Maybe Language -> [Extension] #
The language extensions implied by the various language variants.
When updating this be sure to update the flag documentation in
docsusers_guideexts
.
hasPprDebug :: DynFlags -> Bool #
hasNoDebugOutput :: DynFlags -> Bool #
hasNoStateHack :: DynFlags -> Bool #
hasNoOptCoercion :: DynFlags -> Bool #
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
gopt_unset :: DynFlags -> GeneralFlag -> DynFlags #
Unset a GeneralFlag
wopt :: WarningFlag -> DynFlags -> Bool #
Test whether a WarningFlag
is set
wopt_set :: DynFlags -> WarningFlag -> DynFlags #
Set a WarningFlag
wopt_unset :: DynFlags -> WarningFlag -> DynFlags #
Unset a WarningFlag
wopt_fatal :: WarningFlag -> DynFlags -> Bool #
Test whether a WarningFlag
is set as fatal
wopt_set_fatal :: DynFlags -> WarningFlag -> DynFlags #
Mark a WarningFlag
as fatal (do not set the flag)
wopt_unset_fatal :: DynFlags -> WarningFlag -> DynFlags #
Mark a WarningFlag
as not fatal
xopt_set_unlessExplSpec :: Extension -> (DynFlags -> Extension -> DynFlags) -> DynFlags -> DynFlags #
Set or unset a Extension
, unless it has been explicitly
set or unset before.
packageTrustOn :: DynFlags -> Bool #
Is the -fpackage-trust mode on
safeHaskellOn :: DynFlags -> Bool #
Is Safe Haskell on in some way (including inference mode)
safeHaskellModeEnabled :: DynFlags -> Bool #
safeLanguageOn :: DynFlags -> Bool #
Is the Safe Haskell safe language in use
safeInferOn :: DynFlags -> Bool #
Is the Safe Haskell safe inference mode active
safeImportsOn :: DynFlags -> Bool #
Test if Safe Imports are on in some form
safeDirectImpsReq :: DynFlags -> Bool #
Are all direct imports required to be safe for this Safe Haskell mode? Direct imports are when the code explicitly imports a module
safeImplicitImpsReq :: DynFlags -> Bool #
Are all implicit imports required to be safe for this Safe Haskell mode? Implicit imports are things in the prelude. e.g System.IO when print is used.
unsafeFlags :: [(String, DynFlags -> SrcSpan, DynFlags -> Bool, DynFlags -> DynFlags)] #
A list of unsafe flags under Safe Haskell. Tuple elements are: * name of the flag * function to get srcspan that enabled the flag * function to test if the flag is on * function to turn the flag off
unsafeFlagsForInfer :: [(String, DynFlags -> SrcSpan, DynFlags -> Bool, DynFlags -> DynFlags)] #
A list of unsafe flags under Safe Haskell. Tuple elements are: * name of the flag * function to get srcspan that enabled the flag * function to test if the flag is on * function to turn the flag off
Arguments
:: DynFlags |
|
-> (DynFlags -> [a]) | Relevant record accessor: one of the |
-> [a] | Correctly ordered extracted options |
Retrieve the options corresponding to a particular opt_*
field in the correct order
getVerbFlags :: DynFlags -> [String] #
Gets the verbosity flag for the current verbosity level. This is fed to
other tools, so GHC-specific verbosity flags like -ddump-most
are not included
addPluginModuleName :: String -> DynFlags -> DynFlags #
updOptLevel :: Int -> DynFlags -> DynFlags #
Sets the DynFlags
to be appropriate to the optimisation level
Arguments
:: MonadIO m | |
=> DynFlags | |
-> [Located String] | |
-> m (DynFlags, [Located String], [Warn]) | Updated |
Parse dynamic flags from a list of command line arguments. Returns
the parsed DynFlags
, the left-over arguments, and a list of warnings.
Throws a UsageError
if errors occurred during parsing (such as unknown
flags or missing arguments).
Arguments
:: MonadIO m | |
=> DynFlags | |
-> [Located String] | |
-> m (DynFlags, [Located String], [Warn]) | Updated |
Like parseDynamicFlagsCmdLine
but does not allow the package flags
(-package, -hide-package, -ignore-package, -hide-all-packages, -package-db).
Used to parse flags set in a modules pragma.
getCmdLineState :: CmdLineP s s #
putCmdLineState :: s -> CmdLineP s () #
runCmdLineP :: CmdLineP s a -> s -> (a, s) #
Arguments
:: forall s m. MonadIO m | |
=> [Flag (CmdLineP s)] | valid flags to match against |
-> s | current state |
-> [Located String] | arguments to parse |
-> m (([Located String], [Err], [Warn]), s) | (leftovers, errors, warnings) |
A helper to parse a set of flags from a list of command-line arguments, handling response files.
Arguments
:: MonadIO m | |
=> [Flag (CmdLineP DynFlags)] | valid flags to match against |
-> Bool | are the arguments from the command line? |
-> DynFlags | current dynamic flags |
-> [Located String] | arguments to parse |
-> m (DynFlags, [Located String], [Warn]) |
Parses the dynamically set flags for GHC. This is the most general form of the dynamic flag parser that the other methods simply wrap. It allows saying which flags are valid flags and indicating if we are parsing arguments from the command line or from a file pragma.
allNonDeprecatedFlags :: [String] #
All dynamic flags option strings without the deprecated ones. These are the user facing strings for enabling and disabling options.
flagsDynamic :: [Flag (CmdLineP DynFlags)] #
flagsPackage :: [Flag (CmdLineP DynFlags)] #
flagsForCompletion :: Bool -> [String] #
Make a list of flags for shell completion. Filter all available flags into two groups, for interactive GHC vs all other.
turnOn :: TurnOnFlag #
turnOff :: TurnOnFlag #
flagSpecOf :: WarningFlag -> Maybe (FlagSpec WarningFlag) #
Find the FlagSpec
for a WarningFlag
.
wWarningFlags :: [FlagSpec WarningFlag] #
These -W<blah>
flags can all be reversed with -Wno-<blah>
fFlags :: [FlagSpec GeneralFlag] #
These -f<blah>
flags can all be reversed with -fno-<blah>
fLangFlags :: [FlagSpec Extension] #
These -f<blah>
flags can all be reversed with -fno-<blah>
supportedLanguagesAndExtensions :: ArchOS -> [String] #
impliedGFlags :: [(GeneralFlag, TurnOnFlag, GeneralFlag)] #
impliedOffGFlags :: [(GeneralFlag, TurnOnFlag, GeneralFlag)] #
impliedXFlags :: [(Extension, TurnOnFlag, Extension)] #
glasgowExtsFlags :: [Extension] #
setGeneralFlag' :: GeneralFlag -> DynFlags -> DynFlags #
unSetGeneralFlag' :: GeneralFlag -> DynFlags -> DynFlags #
augmentByWorkingDirectory :: DynFlags -> FilePath -> FilePath #
setFlagsFromEnvFile :: FilePath -> String -> DynP () #
pieCCLDOpts :: DynFlags -> [String] #
compilerInfo :: DynFlags -> [(String, String)] #
targetProfile :: DynFlags -> Profile #
Get target profile
setUnsafeGlobalDynFlags :: DynFlags -> IO () #
isSse4_2Enabled :: DynFlags -> Bool #
isAvxEnabled :: DynFlags -> Bool #
isAvx2Enabled :: DynFlags -> Bool #
isAvx512cdEnabled :: DynFlags -> Bool #
isAvx512erEnabled :: DynFlags -> Bool #
isAvx512fEnabled :: DynFlags -> Bool #
isAvx512pfEnabled :: DynFlags -> Bool #
isBmiEnabled :: DynFlags -> Bool #
isBmi2Enabled :: DynFlags -> Bool #
sccProfilingEnabled :: DynFlags -> Bool #
Indicate if cost-centre profiling is enabled
needSourceNotes :: DynFlags -> Bool #
Indicate whether we need to generate source notes
useXLinkerRPath :: DynFlags -> OS -> Bool #
Should we use `-XLinker -rpath` when linking or not? See Note [-fno-use-rpaths]
initSDocContext :: DynFlags -> PprStyle -> SDocContext #
Initialize the pretty-printing options
initDefaultSDocContext :: DynFlags -> SDocContext #
Initialize the pretty-printing options using the default user style
outputFile :: DynFlags -> Maybe String #
pprDynFlagsDiff :: DynFlags -> DynFlags -> SDoc #
Pretty-print the difference between 2 DynFlags.
For now only their general flags but it could be extended. Useful mostly for debugging.
lookupUnit :: UnitState -> Unit -> Maybe UnitInfo #
Find the unit we know about with the given unit, if any
lookupUnit' :: Bool -> UnitInfoMap -> PreloadUnitClosure -> Unit -> Maybe UnitInfo #
A more specialized interface, which doesn't require a UnitState
(so it
can be used while we're initializing DynFlags
)
Parameters:
* a boolean specifying whether or not to look for on-the-fly renamed interfaces
* a UnitInfoMap
* a PreloadUnitClosure
lookupUnitId :: UnitState -> UnitId -> Maybe UnitInfo #
Find the unit we know about with the given unit id, if any
lookupUnitId' :: UnitInfoMap -> UnitId -> Maybe UnitInfo #
Find the unit we know about with the given unit id, if any
unsafeLookupUnit :: HasDebugCallStack => UnitState -> Unit -> UnitInfo #
Looks up the given unit in the unit state, panicking if it is not found
unsafeLookupUnitId :: HasDebugCallStack => UnitState -> UnitId -> UnitInfo #
Looks up the given unit id in the unit state, panicking if it is not found
lookupPackageName :: UnitState -> PackageName -> Maybe UnitId #
Find the unit we know about with the given package name (e.g. foo
), if any
(NB: there might be a locally defined unit name which overrides this)
This function is unsafe to use in general because it doesn't respect package
visibility.
searchPackageId :: UnitState -> PackageId -> [UnitInfo] #
Search for units with a given package ID (e.g. "foo-0.1")
resolvePackageImport :: UnitState -> ModuleName -> PackageName -> Maybe UnitId #
Find the UnitId which an import qualified by a package import comes from.
Compared to lookupPackageName
, this function correctly accounts for visibility,
renaming and thinning.
listUnitInfo :: UnitState -> [UnitInfo] #
Get a list of entries from the unit database. NB: be careful with this function, although all units in this map are "visible", this does not imply that the exposed-modules of the unit are available (they may have been thinned or renamed).
initUnits :: Logger -> DynFlags -> Maybe [UnitDatabase UnitId] -> Set UnitId -> IO ([UnitDatabase UnitId], UnitState, HomeUnit, Maybe PlatformConstants) #
Read the unit database files, and sets up various internal tables of
unit information, according to the unit-related flags on the
command-line (-package
, -hide-package
etc.)
initUnits
can be called again subsequently after updating the
packageFlags
field of the DynFlags
, and it will update the
unitState
in DynFlags
.
readUnitDatabases :: Logger -> UnitConfig -> IO [UnitDatabase UnitId] #
getUnitDbRefs :: UnitConfig -> IO [PkgDbRef] #
resolveUnitDatabase :: UnitConfig -> PkgDbRef -> IO (Maybe FilePath) #
Return the path of a package database from a PkgDbRef
. Return Nothing
when the user database filepath is expected but the latter doesn't exist.
NB: This logic is reimplemented in Cabal, so if you change it, make sure you update Cabal. (Or, better yet, dump it in the compiler info so Cabal can use the info.)
readUnitDatabase :: Logger -> UnitConfig -> FilePath -> IO (UnitDatabase UnitId) #
pprFlag :: PackageFlag -> SDoc #
pprReason :: SDoc -> UnusableUnitReason -> SDoc #
unwireUnit :: UnitState -> Unit -> Unit #
lookupModuleInAllUnits :: UnitState -> ModuleName -> [(Module, UnitInfo)] #
Takes a ModuleName
, and if the module is in any package returns
list of modules which take that name.
lookupModuleWithSuggestions :: UnitState -> ModuleName -> PkgQual -> LookupResult #
lookupModulePackage :: UnitState -> ModuleName -> PkgQual -> Maybe [UnitInfo] #
The package which the module **appears** to come from, this could be the one which reexports the module from it's original package. This function is currently only used for -Wunused-packages
listVisibleModuleNames :: UnitState -> [ModuleName] #
closeUnitDeps :: UnitInfoMap -> [(UnitId, Maybe UnitId)] -> MaybeErr UnitErr [UnitId] #
Takes a list of UnitIds (and their "parent" dependency, used for error messages), and returns the list with dependencies included, in reverse dependency order (a units appears before those it depends on).
closeUnitDeps' :: UnitInfoMap -> [UnitId] -> [(UnitId, Maybe UnitId)] -> MaybeErr UnitErr [UnitId] #
Similar to closeUnitDeps but takes a list of already loaded units as an additional argument.
mayThrowUnitErr :: MaybeErr UnitErr a -> IO a #
requirementMerges :: UnitState -> ModuleName -> [InstantiatedModule] #
Return this list of requirement interfaces that need to be merged
to form mod_name
, or []
if this is not a requirement.
pprUnitIdForUser :: UnitState -> UnitId -> SDoc #
Pretty-print a UnitId for the user.
Cabal packages may contain several components (programs, libraries, etc.). As far as GHC is concerned, installed package components ("units") are identified by an opaque UnitId string provided by Cabal. As the string contains a hash, we don't want to display it to users so GHC queries the database to retrieve some infos about the original source package (name, version, component name).
Instead we want to display: packagename-version[:componentname]
Component name is only displayed if it isn't the default library
To do this we need to query a unit database.
pprUnitInfoForUser :: UnitInfo -> SDoc #
pprUnitsSimple :: UnitState -> SDoc #
Show simplified unit info.
The idea is to only print package id, and any information that might be different from the package databases (exposure, trust)
pprModuleMap :: ModuleNameProvidersMap -> SDoc #
Show the mapping of modules to where they come from.
improveUnit :: UnitState -> Unit -> Unit #
Given a fully instantiated GenInstantiatedUnit
, improve it into a
RealUnit
if we can find it in the package database.
instUnitToUnit :: UnitState -> InstantiatedUnit -> Unit #
Check the database to see if we already have an installed unit that
corresponds to the given GenInstantiatedUnit
.
Return a UnitId
which either wraps the GenInstantiatedUnit
unchanged or
references a matching installed unit.
See Note [VirtUnit to RealUnit improvement]
renameHoleModule :: UnitState -> ShHoleSubst -> Module -> Module #
Substitutes holes in a GenModule
. NOT suitable for being called
directly on a nameModule
, see Note [Representation of module/name variables].
p[A=<A>]:B
maps to p[A=q():A]:B
with A=q():A
;
similarly, <A>
maps to q():A
.
renameHoleUnit :: UnitState -> ShHoleSubst -> Unit -> Unit #
Substitutes holes in a Unit
, suitable for renaming when
an include occurs; see Note [Representation of module/name variables].
p[A=<A>]
maps to p[A=<B>]
with A=<B>
.
renameHoleModule' :: UnitInfoMap -> PreloadUnitClosure -> ShHoleSubst -> Module -> Module #
Like renameHoleModule
, but requires only ClosureUnitInfoMap
so it can be used by GHC.Unit.State.
renameHoleUnit' :: UnitInfoMap -> PreloadUnitClosure -> ShHoleSubst -> Unit -> Unit #
Like 'renameHoleUnit, but requires only ClosureUnitInfoMap
so it can be used by GHC.Unit.State.
instModuleToModule :: UnitState -> InstantiatedModule -> Module #
Injects an InstantiatedModule
to GenModule
(see also
instUnitToUnit
.
implicitPackageDeps :: DynFlags -> [UnitId] #
Add package dependencies on the wired-in packages we use
showPpr :: Outputable a => DynFlags -> a -> String #
showSDocForUser :: DynFlags -> UnitState -> NamePprCtx -> SDoc -> String #
Allows caller to specify the NamePprCtx to use
printForUser :: DynFlags -> Handle -> NamePprCtx -> Depth -> SDoc -> IO () #
mg_mnwib :: ModGuts -> ModuleNameWithIsBoot #
mkRule :: Module -> Bool -> Bool -> RuleName -> Activation -> Name -> [CoreBndr] -> [CoreExpr] -> CoreExpr -> CoreRule #
mkSpecRule :: DynFlags -> Module -> Bool -> Activation -> SDoc -> Id -> [CoreBndr] -> [CoreExpr] -> CoreExpr -> CoreRule #
roughTopNames :: [CoreExpr] -> [Maybe Name] #
Find the "top" free names of several expressions. Such names are either:
- The function finally being applied to in an application chain (if that name is a GlobalId: see GHC.Types.Var), or
- The
TyCon
if the expression is aType
This is used for the fast-match-check for rules; if the top names don't match, the rest can't
pprRulesForUser :: [CoreRule] -> SDoc #
extendRuleInfo :: RuleInfo -> [CoreRule] -> RuleInfo #
addRuleInfo :: RuleInfo -> RuleInfo -> RuleInfo #
addIdSpecialisations :: Id -> [CoreRule] -> Id #
addRulesToId :: RuleBase -> Id -> Id #
rulesOfBinds :: [CoreBind] -> [CoreRule] #
Gather all the rules for locally bound identifiers from the supplied bindings
mkRuleBase :: [CoreRule] -> RuleBase #
extendRuleBaseList :: RuleBase -> [CoreRule] -> RuleBase #
pprRuleBase :: RuleBase -> SDoc #
updExternalPackageRules :: RuleEnv -> RuleBase -> RuleEnv #
updLocalRules :: RuleEnv -> [CoreRule] -> RuleEnv #
addLocalRules :: RuleEnv -> [CoreRule] -> RuleEnv #
emptyRuleEnv :: RuleEnv #
lookupRule :: RuleOpts -> InScopeEnv -> (Activation -> Bool) -> Id -> [CoreExpr] -> [CoreRule] -> Maybe (CoreRule, CoreExpr) #
The main rule matching function. Attempts to apply all (active) supplied rules to this instance of an application in a given context, returning the rule applied and the resulting expression if successful.
Arguments
:: RuleOpts | Rule options |
-> CompilerPhase | Rule activation test |
-> String | Rule pattern |
-> (Id -> [CoreRule]) | Rules for an Id |
-> CoreProgram | Bindings to check in |
-> SDoc | Resulting check message |
Report partial matches for rules beginning with the specified string for the purposes of error reporting
mi_boot :: ModIface -> IsBootInterface #
Old-style accessor for whether or not the ModIface came from an hs-boot file.
mi_fix :: ModIface -> OccName -> Fixity #
Lookups up a (possibly cached) fixity from a ModIface
. If one cannot be
found, defaultFixity
is returned instead.
mi_semantic_module :: forall (a :: ModIfacePhase). ModIface_ a -> Module #
The semantic module for this interface; e.g., if it's a interface
for a signature, if mi_module
is p[A=A]:A
, mi_semantic_module
will be A
.
mi_free_holes :: ModIface -> UniqDSet ModuleName #
The "precise" free holes, e.g., the signatures that this
ModIface
depends on.
renameFreeHoles :: UniqDSet ModuleName -> [(ModuleName, Module)] -> UniqDSet ModuleName #
Given a set of free holes, and a unit identifier, rename
the free holes according to the instantiation of the unit
identifier. For example, if we have A and B free, and
our unit identity is p[A=C,B=impl:B]
, the renamed free
holes are just C.
emptyFullModIface :: Module -> ModIface #
mkIfaceHashCache :: [(Fingerprint, IfaceDecl)] -> OccName -> Maybe (OccName, Fingerprint) #
Constructs cache for the mi_hash_fn
field of a ModIface
emptyIfaceHashCache :: OccName -> Maybe (OccName, Fingerprint) #
forceModIface :: ModIface -> IO () #
ms_unitid :: ModSummary -> UnitId #
ms_mod_name :: ModSummary -> ModuleName #
ms_imps :: ModSummary -> [(PkgQual, Located ModuleName)] #
Textual imports, plus plugin imports but not SOURCE imports.
ms_plugin_imps :: ModSummary -> [(PkgQual, Located ModuleName)] #
Plugin imports
ms_home_srcimps :: ModSummary -> [Located ModuleName] #
Like ms_home_imps
, but for SOURCE imports.
ms_home_imps :: ModSummary -> [(PkgQual, Located ModuleName)] #
All of the (possibly) home module imports from a
ModSummary
; that is to say, each of these module names
could be a home import if an appropriately named file
existed. (This is in contrast to package qualified
imports, which are guaranteed not to be home imports.)
msHsFilePath :: ModSummary -> FilePath #
msHiFilePath :: ModSummary -> FilePath #
msDynHiFilePath :: ModSummary -> FilePath #
msObjFilePath :: ModSummary -> FilePath #
msDynObjFilePath :: ModSummary -> FilePath #
isBootSummary :: ModSummary -> IsBootInterface #
Did this ModSummary
originate from a hs-boot file?
msDeps :: ModSummary -> [(PkgQual, GenWithIsBoot (Located ModuleName))] #
Returns the dependencies of the ModSummary s.
findTarget :: ModSummary -> [Target] -> Maybe Target #
Find the first target in the provided list which matches the specified
ModSummary
.
fromParseContext :: ParseContext -> PsErrInPatDetails #
Builds a PsErrInPatDetails
with the information provided by the ParseContext
.
mkSrcErr :: Messages GhcMessage -> SourceError #
throwErrors :: MonadIO io => Messages GhcMessage -> io a #
throwOneError :: MonadIO io => MsgEnvelope GhcMessage -> io a #
Arguments
:: MonadCatch m | |
=> (SourceError -> m a) | exception handler |
-> m a | action to perform |
-> m a |
Perform the given action and call the exception handler if the action
throws a SourceError
. See SourceError
for more information.
mkInteractiveHscEnv :: HscEnv -> HscEnv #
Switches in the DynFlags and Plugins from the InteractiveContext
runInteractiveHsc :: HscEnv -> Hsc a -> IO a #
A variant of runHsc that switches in the DynFlags and Plugins from the InteractiveContext before running the Hsc computation.
hsc_home_unit :: HscEnv -> HomeUnit #
hsc_home_unit_maybe :: HscEnv -> Maybe HomeUnit #
hsc_units :: HasDebugCallStack => HscEnv -> UnitState #
hsc_HPT :: HscEnv -> HomePackageTable #
hsc_HUE :: HscEnv -> HomeUnitEnv #
hsc_HUG :: HscEnv -> HomeUnitGraph #
hsc_all_home_unit_ids :: HscEnv -> Set UnitId #
hscUpdateHPT_lazy :: (HomePackageTable -> HomePackageTable) -> HscEnv -> HscEnv #
hscUpdateHPT :: (HomePackageTable -> HomePackageTable) -> HscEnv -> HscEnv #
hscUpdateHUG :: (HomeUnitGraph -> HomeUnitGraph) -> HscEnv -> HscEnv #
hscEPS :: HscEnv -> IO ExternalPackageState #
Retrieve the ExternalPackageState cache.
hptCompleteSigs :: HscEnv -> [CompleteMatch] #
hptAllInstances :: HscEnv -> (InstEnv, [FamInst]) #
Find all the instance declarations (of classes and families) from
the Home Package Table filtered by the provided predicate function.
Used in tcRnImports
, to select the instances that are in the
transitive closure of imports from the currently compiled module.
hptInstancesBelow :: HscEnv -> UnitId -> ModuleNameWithIsBoot -> (InstEnv, [FamInst]) #
Find instances visible from the given set of imports
hptRules :: HscEnv -> UnitId -> ModuleNameWithIsBoot -> [CoreRule] #
Get rules from modules "below" this one (in the dependency sense)
hptAnns :: HscEnv -> Maybe (UnitId, ModuleNameWithIsBoot) -> [Annotation] #
Get annotations from modules "below" this one (in the dependency sense)
hptAllThings :: (HomeModInfo -> [a]) -> HscEnv -> [a] #
hptSomeThingsBelowUs :: (HomeModInfo -> [a]) -> Bool -> HscEnv -> UnitId -> ModuleNameWithIsBoot -> [a] #
Get things from modules "below" this one (in the dependency sense) C.f Inst.hptInstances
prepareAnnotations :: HscEnv -> Maybe ModGuts -> IO AnnEnv #
Deal with gathering annotations in from all possible places
and combining them into a single AnnEnv
lookupType :: HscEnv -> Name -> IO (Maybe TyThing) #
Find the TyThing
for the given Name
by using all the resources
at our disposal: the compiled modules in the HomePackageTable
and the
compiled modules in other packages that live in PackageTypeEnv
. Note
that this does NOT look up the TyThing
in the module being compiled: you
have to do that yourself, if desired
lookupIfaceByModule :: HomeUnitGraph -> PackageIfaceTable -> Module -> Maybe ModIface #
mainModIs :: HomeUnitEnv -> Module #
hscInterp :: HscEnv -> Interp #
Retrieve the target code interpreter
Fails if no target code interpreter is available
hscUpdateLoggerFlags :: HscEnv -> HscEnv #
Update the LogFlags of the Log in hsc_logger from the DynFlags in hsc_dflags. You need to call this when DynFlags are modified.
hscSetFlags :: HasDebugCallStack => DynFlags -> HscEnv -> HscEnv #
Set Flags
hscSetActiveHomeUnit :: HasDebugCallStack => HomeUnit -> HscEnv -> HscEnv #
hscSetActiveUnitId :: HasDebugCallStack => UnitId -> HscEnv -> HscEnv #
hscActiveUnitId :: HscEnv -> UnitId #
discardIC :: HscEnv -> HscEnv #
Discard the contents of the InteractiveContext, but keep the DynFlags and the loaded plugins. It will also keep ic_int_print and ic_monad if their names are from external packages.
Arguments
:: HscEnv | |
-> RuleBase | |
-> Char | Mask |
-> Module | |
-> NamePprCtx | |
-> SrcSpan | |
-> CoreM a | |
-> IO (a, SimplCount) |
liftIOWithCount :: IO (SimplCount, a) -> CoreM a #
Lift an IO
operation into CoreM
while consuming its SimplCount
initRuleEnv :: ModGuts -> CoreM RuleEnv #
getSrcSpanM :: CoreM SrcSpan #
addSimplCount :: SimplCount -> CoreM () #
getUniqMask :: CoreM Char #
mapDynFlagsCoreM :: (DynFlags -> DynFlags) -> CoreM a -> CoreM a #
Adjust the dyn flags passed to the argument action
dropSimplCount :: CoreM a -> CoreM a #
Drop the single count of the argument action so it doesn't effect the total.
getAnnotations :: Typeable a => ([Word8] -> a) -> ModGuts -> CoreM (ModuleEnv [a], NameEnv [a]) #
Get all annotations of a given type. This happens lazily, that is no deserialization will take place until the [a] is actually demanded and the [a] can also be empty (the UniqFM is not filtered).
This should be done once at the start of a Core-to-Core pass that uses annotations.
See Note [Annotations]
getFirstAnnotations :: Typeable a => ([Word8] -> a) -> ModGuts -> CoreM (ModuleEnv a, NameEnv a) #
Get at most one annotation of a given type per annotatable item.
msg :: MessageClass -> SDoc -> CoreM () #
fatalErrorMsgS :: String -> CoreM () #
Output a fatal error to the screen. Does not cause the compiler to die.
debugTraceMsgS :: String -> CoreM () #
Output a string debugging message at verbosity level of -v
or higher
metaRequestAW :: Functor f => MetaHook f -> LHsExpr GhcTc -> f Serialized #
bindsOnlyPass :: (CoreProgram -> CoreM CoreProgram) -> ModGuts -> CoreM ModGuts #
pprPassDetails :: CoreToDo -> SDoc #
pprHoleFitCand :: HoleFitCandidate -> SDoc #
lpModuleName :: LoadedPlugin -> ModuleName #
purePlugin :: [CommandLineOption] -> IO PluginRecompile #
impurePlugin :: [CommandLineOption] -> IO PluginRecompile #
flagRecompile :: [CommandLineOption] -> IO PluginRecompile #
defaultPlugin :: Plugin #
Default plugin: does nothing at all, except for marking that safe
inference has failed unless -fplugin-trustworthy
is passed. For
compatibility reason you should base all your plugin definitions on this
default value.
keepRenamedSource :: [CommandLineOption] -> TcGblEnv -> HsGroup GhcRn -> TcM (TcGblEnv, HsGroup GhcRn) #
A renamer plugin which mades the renamed source available in a typechecker plugin.
pluginsWithArgs :: Plugins -> [PluginWithArgs] #
withPlugins :: Monad m => Plugins -> PluginOperation m a -> a -> m a #
Perform an operation by using all of the plugins in turn.
mapPlugins :: Plugins -> (Plugin -> [CommandLineOption] -> a) -> [a] #
withPlugins_ :: Monad m => Plugins -> ConstPluginOperation m a -> a -> m () #
Perform a constant operation by using all of the plugins in turn.
loadExternalPlugins :: [ExternalPluginSpec] -> IO [ExternalPlugin] #
Load external plugins
flushFinderCaches :: FinderCache -> UnitEnv -> IO () #
lookupFileCache :: FinderCache -> FilePath -> IO Fingerprint #
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.
findPluginModule :: FinderCache -> FinderOpts -> UnitState -> Maybe HomeUnit -> ModuleName -> IO FindResult #
Locate a plugin module requested by the user, for a compiler
plugin. This consults the same set of exposed packages as
findImportedModule
, unless -hide-all-plugin-packages
or
-plugin-package
are specified.
findExactModule :: FinderCache -> FinderOpts -> UnitEnvGraph FinderOpts -> UnitState -> Maybe HomeUnit -> InstalledModule -> IO InstalledFindResult #
Locate a specific GenModule
. The purpose of this function is to
create a ModLocation
for a given GenModule
, that is to find out
where the files associated with this module live. It is used when
reading the interface for a module mentioned by another interface,
for example (a "system import").
findExposedPackageModule :: FinderCache -> FinderOpts -> UnitState -> ModuleName -> PkgQual -> IO FindResult #
addModuleToFinder :: FinderCache -> Module -> ModLocation -> IO () #
addHomeModuleToFinder :: FinderCache -> HomeUnit -> ModuleName -> ModLocation -> IO Module #
uncacheModule :: FinderCache -> HomeUnit -> ModuleName -> IO () #
findHomeModule :: FinderCache -> FinderOpts -> HomeUnit -> ModuleName -> IO FindResult #
mkHomeModLocation :: FinderOpts -> ModuleName -> FilePath -> ModLocation #
mkHomeModLocation2 :: FinderOpts -> ModuleName -> FilePath -> String -> ModLocation #
mkHiOnlyModLocation :: FinderOpts -> Suffix -> Suffix -> FilePath -> String -> ModLocation #
mkObjPath :: FinderOpts -> FilePath -> String -> FilePath #
Constructs the filename of a .o file for a given source file. Does not check whether the .o file exists
mkHiPath :: FinderOpts -> FilePath -> String -> FilePath #
Constructs the filename of a .hi file for a given source file. Does not check whether the .hi file exists
mkStubPaths :: FinderOpts -> ModuleName -> ModLocation -> FilePath #
findObjectLinkableMaybe :: Module -> ModLocation -> IO (Maybe Linkable) #
ifaceExportNames :: [IfaceExport] -> TcRnIf gbl lcl [AvailInfo] #
tcIfaceLclId :: FastString -> IfL Id #
extendIfaceIdEnv :: [Id] -> IfL a -> IfL a #
tcIfaceTyVar :: FastString -> IfL TyVar #
lookupIfaceTyVar :: IfaceTvBndr -> IfL (Maybe TyVar) #
extendIfaceTyVarEnv :: [TyVar] -> IfL a -> IfL a #
extendIfaceEnvs :: [TyCoVar] -> IfL a -> IfL a #
lookupIfaceTop :: OccName -> IfL Name #
Look up a top-level name from the current Iface module
newIfaceName :: OccName -> IfL Name #
newIfaceNames :: [OccName] -> IfL [Name] #
trace_hi_diffs :: Logger -> SDoc -> IO () #
thNameToGhcName :: Name -> CoreM (Maybe Name) #
Attempt to convert a Template Haskell name to one that GHC can
understand. Original TH names such as those you get when you use
the 'foo
syntax will be translated to their equivalent GHC name
exactly. Qualified or unqualified TH names will be dynamically bound
to names in the module being compiled, if possible. Exact TH names
will be bound to the name they represent, exactly.
thNameToGhcNameIO :: NameCache -> Name -> IO (Maybe Name) #
Attempt to convert a Template Haskell name to one that GHC can
understand. Original TH names such as those you get when you use
the 'foo
syntax will be translated to their equivalent GHC name
exactly. Qualified or unqualified TH names will be dynamically bound
to names in the module being compiled, if possible. Exact TH names
will be bound to the name they represent, exactly.
One must be careful to consistently use the same NameCache
to
create identifier that might be compared. (C.f. how the
ST
Monad enforces that variables from separate
runST
invocations are never intermingled; it would
be valid to use the same tricks for Name
s and NameCache
s.)
For now, the easiest and recommended way to ensure a consistent
NameCache
is used it to retrieve the preexisting one from an active
HscEnv
. A single HscEnv
is created per GHC "session", and this
ensures everything in that session will get the same name cache.
newHscEnvWithHUG :: FilePath -> DynFlags -> UnitId -> HomeUnitGraph -> IO HscEnv #
ioMsgMaybe :: IO (Messages GhcMessage, Maybe a) -> Hsc a #
Deal with errors and warnings returned by a compilation step
In order to reduce dependencies to other parts of the compiler, functions
outside the "main" parts of GHC return warnings and errors as a parameter
and signal success via by wrapping the result in a Maybe
type. This
function logs the returned warnings and propagates errors as exceptions
(of type SourceError
).
This function assumes the following invariants:
- If the second result indicates success (is of the form 'Just x'), there must be no error messages in the first result.
- If there are no error messages, but the second result indicates failure
there should be warnings in the first result. That is, if the action
failed, it must have been due to the warnings (i.e.,
-Werror
).
hscTcRnLookupRdrName :: HscEnv -> LocatedN RdrName -> IO (NonEmpty Name) #
Lookup things in the compiler's environment
hscRnImportDecls :: HscEnv -> [LImportDecl GhcPs] -> IO GlobalRdrEnv #
Rename some import declarations
hscParse :: HscEnv -> ModSummary -> IO HsParsedModule #
parse a file, returning the abstract syntax
hscParse' :: ModSummary -> Hsc HsParsedModule #
hscTypecheckRename :: HscEnv -> ModSummary -> HsParsedModule -> IO (TcGblEnv, RenamedStuff) #
Rename and typecheck a module, additionally returning the renamed syntax
hscTypecheckAndGetWarnings :: HscEnv -> ModSummary -> IO (FrontendResult, WarningMessages) #
Do Typechecking without throwing SourceError exception with -Werror
tcRnModule' :: ModSummary -> Bool -> HsParsedModule -> Hsc TcGblEnv #
hscDesugar :: HscEnv -> ModSummary -> TcGblEnv -> IO ModGuts #
Convert a typechecked module to Core
hscDesugar' :: ModLocation -> TcGblEnv -> Hsc ModGuts #
makeSimpleDetails :: Logger -> TcGblEnv -> IO ModDetails #
Make a ModDetails
from the results of typechecking. Used when
typechecking only, as opposed to full compilation.
hscRecompStatus :: Maybe Messager -> HscEnv -> ModSummary -> Maybe ModIface -> HomeModLinkable -> (Int, Int) -> IO HscRecompStatus #
Do the recompilation avoidance checks for both one-shot and --make modes This function is the *only* place in the compiler where we decide whether to recompile a module or not!
initModDetails :: HscEnv -> ModIface -> IO ModDetails #
initWholeCoreBindings :: HscEnv -> ModIface -> ModDetails -> Linkable -> IO Linkable #
hscDesugarAndSimplify :: ModSummary -> FrontendResult -> Messages GhcMessage -> Maybe Fingerprint -> Hsc HscBackendAction #
Arguments
:: Logger | |
-> DynFlags | |
-> Bool | Is this a simple interface generated after the core pipeline, or one with information from the backend? See: Note [Writing interface files] |
-> ModIface | |
-> Maybe Fingerprint | The old interface hash, used to decide if we need to actually write the new interface. |
-> ModLocation | |
-> IO () |
Write interface files
oneShotMsg :: Logger -> RecompileRequired -> IO () #
hscCheckSafe :: HscEnv -> Module -> SrcSpan -> IO Bool #
Check that a module is safe to import.
We return True to indicate the import is safe and False otherwise although in the False case an exception may be thrown first.
hscGetSafe :: HscEnv -> Module -> SrcSpan -> IO (Bool, Set UnitId) #
Return if a module is trusted and the pkgs it depends on to be trusted.
hscSimplify :: HscEnv -> [String] -> ModGuts -> IO ModGuts #
Run Core2Core simplifier. The list of String is a list of (Core) plugin
module names added via TH (cf addCorePlugin
).
hscSimplify' :: [String] -> ModGuts -> Hsc ModGuts #
Run Core2Core simplifier. The list of String is a list of (Core) plugin
module names added via TH (cf addCorePlugin
).
hscSimpleIface' :: Maybe CoreProgram -> TcGblEnv -> ModSummary -> Hsc (ModIface, ModDetails) #
Arguments
:: HscEnv | |
-> CgGuts | |
-> ModLocation | |
-> FilePath | |
-> IO (FilePath, Maybe FilePath, [(ForeignSrcLang, FilePath)], Maybe StgCgInfos, Maybe CmmCgInfos) |
|
Compile to hard-code.
hscInteractive :: HscEnv -> CgInteractiveGuts -> ModLocation -> IO (Maybe FilePath, CompiledByteCode, [SptEntry]) #
generateByteCode :: HscEnv -> CgInteractiveGuts -> ModLocation -> IO [Unlinked] #
generateFreshByteCode :: HscEnv -> ModuleName -> CgInteractiveGuts -> ModLocation -> IO Linkable #
Arguments
:: HscEnv | |
-> Module | |
-> InfoTableProvMap | |
-> [TyCon] | |
-> CollectedCCs | |
-> [CgStgTopBinding] | Bindings come already annotated with fvs |
-> HpcInfo | |
-> IO (Stream IO CmmGroupSRTs CmmCgInfos) |
hscStmt :: HscEnv -> String -> IO (Maybe ([Id], ForeignHValue, FixityEnv)) #
Compile a stmt all the way to an HValue, but don't run it
We return Nothing to indicate an empty statement (or comment only), not a parse error.
Arguments
:: HscEnv | |
-> String | The statement |
-> String | The source |
-> Int | Starting line |
-> IO (Maybe ([Id], ForeignHValue, FixityEnv)) |
Compile a stmt all the way to an HValue, but don't run it
We return Nothing to indicate an empty statement (or comment only), not a parse error.
Arguments
:: HscEnv | |
-> String | The statement |
-> IO ([TyThing], InteractiveContext) |
Compile a decls
Arguments
:: HscEnv | |
-> String | The statement |
-> String | The source |
-> Int | Starting line |
-> IO ([TyThing], InteractiveContext) |
Compile a decls
hscParsedDecls :: HscEnv -> [LHsDecl GhcPs] -> IO ([TyThing], InteractiveContext) #
hscAddSptEntries :: HscEnv -> [SptEntry] -> IO () #
Load the given static-pointer table entries into the interpreter. See Note [Grand plan for static forms] in GHC.Iface.Tidy.StaticPtrTable.
Arguments
:: HscEnv | |
-> TcRnExprMode | |
-> String | The expression |
-> IO Type |
Typecheck an expression (but don't run it)
Arguments
:: HscEnv | |
-> Bool | Normalise the type |
-> String | The type as a string |
-> IO (Type, Kind) | Resulting type (possibly normalised) and kind |
Find the kind of a type, after generalisation
hscCompileCoreExpr :: HscEnv -> SrcSpan -> CoreExpr -> IO (ForeignHValue, [Linkable], PkgsLoaded) #
hscCompileCoreExpr' :: HscEnv -> SrcSpan -> CoreExpr -> IO (ForeignHValue, [Linkable], PkgsLoaded) #
dumpIfaceStats :: HscEnv -> IO () #
showModuleIndex :: (Int, Int) -> SDoc #
writeInterfaceOnlyMode :: DynFlags -> 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
.
serializeWithData :: Data a => a -> [Word8] #
Use a Data
instance to implement a serialization scheme dual to that of deserializeWithData
deserializeWithData :: Data a => [Word8] -> a #
Use a Data
instance to implement a deserialization scheme dual to that of serializeWithData