Safe Haskell | None |
---|---|
Language | Haskell98 |
Liquid.GHC.API
Description
This module re-exports all identifiers that LH needs from the GHC API.
The intended use of this module is to provide a quick look of what GHC API features LH depends upon.
The transitive dependencies of this module shouldn't contain modules from Language.Haskell.Liquid.* or other non-boot libraries. This makes it easy to discover breaking changes in the GHC API.
Synopsis
- module Liquid.GHC.API.Compat
- module Liquid.GHC.API.Extra
- class IsOutput doc => IsLine doc where
- data Type
- data Expr b
- data Literal
- data GhcMode = CompManager
- data Name
- data ModuleName
- class Binary a where
- class IsOutput doc where
- empty :: doc
- docWithContext :: (SDocContext -> doc) -> doc
- docWithStyle :: doc -> (PprStyle -> SDoc) -> doc
- data UnitId
- type Module = GenModule Unit
- data SrcLoc
- data TyCon
- data Var
- data GenLocated l e = L l e
- space :: IsLine doc => doc
- class NamedThing a where
- getOccName :: a -> OccName
- getName :: a -> Name
- class (IsOutput doc, IsLine (Line doc)) => IsDoc doc where
- data Pair a = Pair a a
- comma :: IsLine doc => doc
- colon :: IsLine doc => doc
- int :: IsLine doc => Int -> doc
- word64 :: IsLine doc => Word64 -> doc
- word :: Integer -> SDoc
- integer :: IsLine doc => Integer -> doc
- float :: IsLine doc => Float -> doc
- double :: IsLine doc => Double -> doc
- quote :: SDoc -> SDoc
- type Arity = Int
- isTyVar :: Var -> Bool
- type Kind = Type
- data NamespaceSpecifier = NoNamespaceSpecifier
- data ConLike = RealDataCon DataCon
- rational :: Rational -> SDoc
- lengthAtLeast :: [a] -> Int -> Bool
- srcLocFile :: RealSrcLoc -> FastString
- parens :: IsLine doc => doc -> doc
- data Coercion
- data Fixity = Fixity SourceText Int FixityDirection
- data LexicalFixity = Prefix
- moduleName :: GenModule unit -> ModuleName
- moduleUnit :: GenModule unit -> unit
- data Alt b = Alt AltCon [b] (Expr b)
- mkFunTy :: HasDebugCallStack => FunTyFlag -> Mult -> Type -> Type -> Type
- splitTyConApp :: Type -> (TyCon, [Type])
- liftIO :: MonadIO m => IO a -> m a
- data CostCentre
- getEnv :: IOEnv env env
- data Unique
- newUnique :: TcRnIf gbl lcl Unique
- type Arg b = Expr b
- isEmpty :: SDocContext -> SDoc -> Bool
- type family Line doc = (r :: Type) | r -> doc
- data Env gbl lcl
- class Outputable a where
- data GhcException
- data SDoc
- data Annotation = Annotation {}
- data HsExpr p
- = HsVar (XVar p) (LIdP p)
- | HsOverLit (XOverLitE p) (HsOverLit p)
- | ExprWithTySig (XExprWithTySig p) (LHsExpr p) (LHsSigWcType (NoGhcTc p))
- data RdrName
- type Id = Var
- mkCoreApps :: CoreExpr -> [CoreExpr] -> CoreExpr
- mkCoreConApps :: DataCon -> [CoreExpr] -> CoreExpr
- mkCoreLams :: [CoreBndr] -> CoreExpr -> CoreExpr
- mkCoreLets :: [CoreBind] -> CoreExpr -> CoreExpr
- data AltCon
- mkApps :: Expr b -> [Arg b] -> Expr b
- data GenTickish (pass :: TickishPass)
- = ProfNote {
- profNoteCC :: CostCentre
- profNoteCount :: !Bool
- profNoteScope :: !Bool
- | HpcTick {
- tickModule :: Module
- tickId :: !Int
- | Breakpoint {
- breakpointExt :: XBreakpoint pass
- breakpointId :: !Int
- breakpointFVs :: [XTickishId pass]
- breakpointModule :: Module
- | SourceNote { }
- = ProfNote {
- expandTypeSynonyms :: Type -> Type
- data Session = Session !(IORef HscEnv)
- data TcGblEnv
- simplifyInfer :: TcLevel -> InferMode -> [TcIdSigInst] -> [(Name, TcTauType)] -> WantedConstraints -> TcM ([TcTyVar], [EvVar], TcEvBinds, Bool)
- data DynFlags
- data SourceError
- data Plugin = Plugin {
- installCoreToDos :: CorePlugin
- tcPlugin :: TcPlugin
- defaultingPlugin :: DefaultingPlugin
- holeFitPlugin :: HoleFitPlugin
- driverPlugin :: [CommandLineOption] -> HscEnv -> IO HscEnv
- latePlugin :: LatePlugin
- 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
- panic :: HasCallStack => String -> a
- data FastString
- bytesFS :: FastString -> ByteString
- lexicalCompareFS :: FastString -> FastString -> Ordering
- mkFastStringByteString :: ByteString -> FastString
- mkFastString :: String -> FastString
- unpackFS :: FastString -> String
- concatFS :: [FastString] -> FastString
- mkPtrString# :: Addr# -> PtrString
- fsLit :: String -> FastString
- ptext :: PtrString -> SDoc
- semi :: IsLine doc => doc
- equals :: IsLine doc => doc
- lparen :: IsLine doc => doc
- rparen :: IsLine doc => doc
- lbrack :: IsLine doc => doc
- rbrack :: IsLine doc => doc
- lbrace :: IsLine doc => doc
- rbrace :: IsLine doc => doc
- quotes :: SDoc -> SDoc
- doubleQuotes :: IsLine doc => doc -> doc
- brackets :: IsLine doc => doc -> doc
- braces :: IsLine doc => doc -> doc
- nest :: Int -> SDoc -> SDoc
- hang :: SDoc -> Int -> SDoc -> SDoc
- hangNotEmpty :: SDoc -> Int -> SDoc -> SDoc
- punctuate :: IsLine doc => doc -> [doc] -> [doc]
- ($+$) :: SDoc -> SDoc -> SDoc
- cat :: [SDoc] -> SDoc
- fcat :: [SDoc] -> SDoc
- data Role
- data Boxity = Boxed
- type family IdP p
- noExtField :: NoExtField
- moduleNameFS :: ModuleName -> FastString
- moduleNameString :: ModuleName -> String
- mkModuleName :: String -> ModuleName
- mkModuleNameFS :: FastString -> ModuleName
- data OccName
- mkVarOccFS :: FastString -> OccName
- data IsBootInterface
- data HDoc
- data HLine
- data JoinPointHood
- = JoinPoint !Int
- | NotJoinPoint
- data BindingSite
- class Outputable a => OutputableBndr a where
- pprBndr :: BindingSite -> a -> SDoc
- pprPrefixOcc :: a -> SDoc
- pprInfixOcc :: a -> SDoc
- bndrIsJoin_maybe :: a -> JoinPointHood
- newtype PDoc a = PDoc a
- class OutputableP env a where
- data SDocContext = SDC {
- sdocStyle :: !PprStyle
- sdocColScheme :: !Scheme
- sdocLastColour :: !PprColour
- sdocShouldUseColor :: !Bool
- sdocDefaultDepth :: !Int
- sdocLineLength :: !Int
- sdocCanUseUnicode :: !Bool
- sdocPrintErrIndexLinks :: !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
- 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
- quoteIfPunsEnabled :: 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
- punctuateFinal :: IsLine doc => doc -> doc -> [doc] -> [doc]
- ppWhen :: IsOutput doc => Bool -> doc -> doc
- ppUnless :: IsOutput doc => Bool -> doc -> doc
- ppWhenOption :: (SDocContext -> Bool) -> SDoc -> SDoc
- ppUnlessOption :: (SDocContext -> Bool) -> SDoc -> SDoc
- coloured :: PprColour -> SDoc -> SDoc
- keyword :: SDoc -> SDoc
- pprModuleName :: IsLine doc => ModuleName -> doc
- isJoinPoint :: JoinPointHood -> Bool
- 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
- quotedListWithAnd :: [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
- itOrThey :: [a] -> SDoc
- thisOrThese :: [a] -> SDoc
- hasOrHave :: [a] -> SDoc
- bPutHDoc :: BufHandle -> SDocContext -> HDoc -> IO ()
- throwGhcException :: GhcException -> a
- throwGhcExceptionIO :: GhcException -> IO a
- data IdDetails
- data IdInfo
- vanillaIdInfo :: IdInfo
- class Uniquable a where
- getKey :: Unique -> Word64
- mkUnique :: Char -> Word64 -> Unique
- hasKey :: Uniquable a => a -> Unique -> Bool
- nameOccName :: Name -> OccName
- nameUnique :: Name -> Unique
- type TyVar = Var
- data Specificity = SpecifiedSpec
- data VarBndr var argf = Bndr var argf
- data FunTyFlag
- data ForAllTyFlag = Required
- type CoreExpr = Expr CoreBndr
- type CoreBndr = Var
- isTupleTyCon :: TyCon -> Bool
- data TyThing
- type PredType = Type
- data TyLit
- data UnivCoProvenance
- class Monad m => MonadUnique (m :: Type -> Type) where
- getUniqueM :: m Unique
- type Located = GenLocated SrcSpan
- data UnhelpfulSpanReason
- data SrcSpan
- data RealSrcSpan
- data RealSrcLoc
- mkSrcLoc :: FastString -> Int -> Int -> SrcLoc
- mkRealSrcLoc :: FastString -> Int -> Int -> RealSrcLoc
- srcLocLine :: RealSrcLoc -> Int
- srcLocCol :: RealSrcLoc -> Int
- noSrcSpan :: SrcSpan
- mkGeneralSrcSpan :: FastString -> SrcSpan
- mkRealSrcSpan :: RealSrcLoc -> RealSrcLoc -> RealSrcSpan
- mkSrcSpan :: SrcLoc -> SrcLoc -> SrcSpan
- combineSrcSpans :: SrcSpan -> SrcSpan -> SrcSpan
- isGoodSrcSpan :: SrcSpan -> Bool
- srcSpanStartLine :: RealSrcSpan -> Int
- srcSpanEndLine :: RealSrcSpan -> Int
- srcSpanStartCol :: RealSrcSpan -> Int
- srcSpanEndCol :: RealSrcSpan -> Int
- realSrcSpanStart :: RealSrcSpan -> RealSrcLoc
- srcSpanFileName_maybe :: SrcSpan -> Maybe FastString
- srcSpanToRealSrcSpan :: SrcSpan -> Maybe RealSrcSpan
- unLoc :: GenLocated l e -> e
- withBinBuffer :: BinHandle -> (ByteString -> IO a) -> IO a
- unsafeUnpackBinBuffer :: ByteString -> IO BinHandle
- openBinMem :: Int -> IO BinHandle
- putByte :: BinHandle -> Word8 -> IO ()
- getByte :: BinHandle -> IO Word8
- mkUniqSet :: Uniquable a => [a] -> UniqSet a
- data SourceText
- mkIntegralLit :: Integral a => a -> IntegralLit
- mkTHFractionalLit :: Rational -> FractionalLit
- data FieldLabel
- data Bag a
- bagToList :: Bag a -> [a]
- data FixityDirection
- 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_SpecialiseIncoherents
- | Opt_DoLambdaEtaExpansion
- | Opt_DoCleverArgEtaExpansion
- | 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_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_KeepAutoRules
- | Opt_WriteInterface
- | Opt_WriteHie
- | Opt_DisableJsMinifier
- | Opt_DisableJsCsources
- | Opt_AutoSccsOnIndividualCafs
- | Opt_ProfCountEntries
- | Opt_ProfLateInlineCcs
- | Opt_ProfLateCcs
- | Opt_ProfLateOverloadedCcs
- | Opt_ProfLateoverloadedCallsCCs
- | Opt_ProfManualCcs
- | Opt_Pp
- | Opt_ForceRecomp
- | Opt_IgnoreOptimChanges
- | Opt_IgnoreHpcChanges
- | Opt_ExcessPrecision
- | Opt_EagerBlackHoling
- | Opt_OrigThunkInfo
- | 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_InsertBreakpoints
- | 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_UnoptimizedCoreForInterpreter
- | Opt_LinkRts
- | Opt_ErrorSpans
- | Opt_DeferDiagnostics
- | Opt_DiagnosticsAsJSON
- | 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
- type ModuleNameWithIsBoot = GenWithIsBoot ModuleName
- data GenWithIsBoot mod
- moduleUnitId :: Module -> UnitId
- fsToUnit :: FastString -> Unit
- unitString :: IsUnitId u => u -> String
- toUnitId :: Unit -> UnitId
- unitIdString :: UnitId -> String
- data ModLocation
- lookupModuleEnv :: ModuleEnv a -> Module -> Maybe a
- moduleEnvKeys :: ModuleEnv a -> [Module]
- moduleStableString :: Module -> String
- stableModuleCmp :: Module -> Module -> Ordering
- data PkgQual = NoPkgQual
- type LHsExpr p = XRec p (HsExpr p)
- data PromotionFlag = NotPromoted
- data InlinePragma
- data Phase = StopLn
- data DefMethSpec ty = VanillaDM
- data TupleSort = BoxedTuple
- data PprPrec
- data TopLevelFlag = NotTopLevel
- topPrec :: PprPrec
- funPrec :: PprPrec
- noOccInfo :: OccInfo
- isStrongLoopBreaker :: OccInfo -> Bool
- isDeadOcc :: OccInfo -> Bool
- isNoInlinePragma :: InlinePragma -> Bool
- data DataCon
- promoteDataCon :: DataCon -> TyCon
- dataConWrapId :: DataCon -> Id
- dataConFullSig :: DataCon -> ([TyVar], [TyCoVar], [EqSpec], ThetaType, [Scaled Type], Type)
- dataConFieldLabels :: DataCon -> [FieldLabel]
- dataConExTyCoVars :: DataCon -> [TyCoVar]
- dataConTyCon :: DataCon -> TyCon
- dataConWorkId :: DataCon -> Id
- dataConName :: DataCon -> Name
- tupleTyCon :: Boxity -> Arity -> TyCon
- tupleDataCon :: Boxity -> Arity -> DataCon
- naturalTy :: Type
- tupleTyConName :: TupleSort -> Arity -> Name
- liftedTypeKind :: Type
- liftedTypeKindTyConName :: Name
- typeSymbolKind :: Kind
- listTyCon :: TyCon
- data NameSpace
- tcName :: NameSpace
- dataName :: NameSpace
- isFieldNameSpace :: NameSpace -> Bool
- mkOccName :: NameSpace -> String -> OccName
- mkVarOcc :: String -> OccName
- mkTyVarOcc :: String -> OccName
- mkTcOcc :: String -> OccName
- occNameString :: OccName -> String
- nameNameSpace :: Name -> NameSpace
- nameSrcLoc :: Name -> SrcLoc
- nameSrcSpan :: Name -> SrcSpan
- isTupleTyConName :: Name -> Bool
- isExternalName :: Name -> Bool
- isInternalName :: Name -> Bool
- nameModule :: HasDebugCallStack => Name -> Module
- nameModule_maybe :: Name -> Maybe Module
- isSystemName :: Name -> Bool
- mkInternalName :: Unique -> OccName -> SrcSpan -> Name
- mkSystemName :: Unique -> OccName -> Name
- stableNameCmp :: Name -> Name -> Ordering
- nameStableString :: Name -> String
- getSrcSpan :: NamedThing a => a -> SrcSpan
- getOccString :: NamedThing a => a -> String
- type NameSet = UniqSet Name
- elemNameSet :: Name -> NameSet -> Bool
- nameSetElemsStable :: NameSet -> [Name]
- type NameEnv a = UniqFM Name a
- lookupNameEnv :: NameEnv a -> Name -> Maybe a
- mkNameEnv :: [(Name, a)] -> NameEnv a
- mkNameEnvWith :: (a -> Name) -> [a] -> NameEnv a
- type TyVarBinder = VarBndr TyVar ForAllTyFlag
- type DFunId = Id
- varUnique :: Var -> Unique
- setVarUnique :: Var -> Unique -> Var
- setVarName :: Var -> Name -> Var
- setVarType :: Var -> Type -> Var
- binderVar :: VarBndr tv argf -> tv
- tyVarKind :: TyVar -> Kind
- mkTyVar :: Name -> Kind -> TyVar
- idInfo :: HasDebugCallStack => Id -> IdInfo
- idDetails :: Id -> IdDetails
- mkLocalVar :: IdDetails -> Name -> Mult -> Type -> IdInfo -> Id
- isId :: Var -> Bool
- isCoVar :: Var -> Bool
- isLocalId :: Var -> Bool
- tyConAppTyCon_maybe :: Type -> Maybe TyCon
- splitTyConApp_maybe :: HasDebugCallStack => Type -> Maybe (TyCon, [Type])
- mkTyConApp :: TyCon -> [Type] -> Type
- type VarSet = UniqSet Var
- emptyVarSet :: VarSet
- unitVarSet :: Var -> VarSet
- extendVarSet :: VarSet -> Var -> VarSet
- extendVarSetList :: VarSet -> [Var] -> VarSet
- elemVarSet :: Var -> VarSet -> Bool
- tyCoVarsOfType :: Type -> TyCoVarSet
- emptyInScopeSet :: InScopeSet
- mkRnEnv2 :: InScopeSet -> RnEnv2
- noAnn :: NoAnn a => a
- noAnnSrcSpan :: HasAnnotation e => SrcSpan -> e
- type LocatedN = GenLocated SrcSpanAnnN
- noLocA :: HasAnnotation e => a -> GenLocated e a
- getLocA :: HasLoc a => GenLocated a e -> SrcSpan
- data GREInfo
- data AvailInfo
- availsToNameSet :: [AvailInfo] -> NameSet
- availNames :: AvailInfo -> [Name]
- data ImpItemSpec = ImpAll
- data WhichGREs info where
- SameNameSpace :: forall info. WhichGREs info
- RelevantGREs :: {..} -> WhichGREs GREInfo
- data LookupGRE info where
- LookupRdrName :: forall info. RdrName -> WhichGREs info -> LookupGRE info
- data FieldsOrSelectors = WantNormal
- type GlobalRdrEnv = GlobalRdrEnvX GREInfo
- mkRdrUnqual :: OccName -> RdrName
- mkRdrQual :: ModuleName -> OccName -> RdrName
- mkUnqual :: NameSpace -> FastString -> RdrName
- mkVarUnqual :: FastString -> RdrName
- mkQual :: NameSpace -> (FastString, FastString) -> RdrName
- getRdrName :: NamedThing thing => thing -> RdrName
- nameRdrName :: Name -> RdrName
- greName :: GlobalRdrEltX info -> Name
- globalRdrEnvElts :: GlobalRdrEnvX info -> [GlobalRdrEltX info]
- lookupGRE :: GlobalRdrEnvX info -> LookupGRE info -> [GlobalRdrEltX info]
- lookupGRE_Name :: Outputable info => GlobalRdrEnvX info -> Name -> Maybe (GlobalRdrEltX info)
- isLocalGRE :: GlobalRdrEltX info -> Bool
- type GhcRn = GhcPass 'Renamed
- type GhcPs = GhcPass 'Parsed
- ideclAs :: ImportDecl pass -> Maybe (XRec pass ModuleName)
- ideclName :: ImportDecl pass -> XRec pass ModuleName
- type LImportDecl pass = XRec pass (ImportDecl pass)
- data ImportedModsVal
- type ImportedMods = ModuleEnv [ImportedBy]
- importedByUser :: [ImportedBy] -> [ImportedModsVal]
- itName :: Unique -> SrcSpan -> Name
- ge_RDR :: RdrName
- le_RDR :: RdrName
- lt_RDR :: RdrName
- gt_RDR :: RdrName
- times_RDR :: RdrName
- plus_RDR :: RdrName
- and_RDR :: RdrName
- not_RDR :: RdrName
- varQual_RDR :: Module -> FastString -> RdrName
- eqClassName :: Name
- ordClassName :: Name
- bindMName :: Name
- negateName :: Name
- isStringClassName :: Name
- eqClassKey :: Unique
- fractionalClassKey :: Unique
- ordClassKey :: Unique
- numericClassKeys :: [Unique]
- fractionalClassKeys :: [Unique]
- data AnnTarget name = ModuleTarget Module
- type AnnPayload = Serialized
- findAnns :: Typeable a => ([Word8] -> a) -> AnnEnv -> CoreAnnTarget -> [a]
- data Hsc a
- coAxiomTyCon :: forall (br :: BranchFlag). CoAxiom br -> TyCon
- coercionKind :: Coercion -> Pair Type
- data Class
- classAllSelIds :: Class -> [Id]
- classSCSelIds :: Class -> [Id]
- classMethods :: Class -> [Id]
- classOpItems :: Class -> [ClassOpItem]
- classSCTheta :: Class -> [PredType]
- classBigSig :: Class -> ([TyVar], [PredType], [Id], [ClassOpItem])
- data TyConBndrVis = AnonTCB
- type TyConBinder = VarBndr TyVar TyConBndrVis
- mkPrimTyCon :: Name -> [TyConBinder] -> Kind -> [Role] -> TyCon
- isPrimTyCon :: TyCon -> Bool
- isAlgTyCon :: TyCon -> Bool
- isVanillaAlgTyCon :: TyCon -> Bool
- isNewTyCon :: TyCon -> Bool
- isTypeSynonymTyCon :: TyCon -> Bool
- isGadtSyntaxTyCon :: TyCon -> Bool
- isFamilyTyCon :: TyCon -> Bool
- isBoxedTupleTyCon :: TyCon -> Bool
- isPromotedDataCon :: TyCon -> Bool
- tyConDataCons :: TyCon -> [DataCon]
- tyConDataCons_maybe :: TyCon -> Maybe [DataCon]
- tyConSingleDataCon_maybe :: TyCon -> Maybe DataCon
- newTyConRhs :: TyCon -> ([TyVar], Type)
- newTyConEtadArity :: TyCon -> Int
- synTyConDefn_maybe :: TyCon -> Maybe ([TyVar], Type)
- synTyConRhs_maybe :: TyCon -> Maybe Type
- isClassTyCon :: TyCon -> Bool
- tyConClass_maybe :: TyCon -> Maybe Class
- isFamInstTyCon :: TyCon -> Bool
- tyConFamInst_maybe :: TyCon -> Maybe (TyCon, [Type])
- mkTyVarTy :: TyVar -> Type
- mkTyVarTys :: [TyVar] -> [Type]
- mkForAllTys :: [ForAllTyBinder] -> Type -> Type
- primTyCons :: [TyCon]
- isArrowTyCon :: TyCon -> Bool
- eqPrimTyCon :: TyCon
- eqReprPrimTyCon :: TyCon
- tyCoVarsOfCo :: Coercion -> TyCoVarSet
- emptyTvSubstEnv :: TvSubstEnv
- emptySubst :: Subst
- extendSubstInScopeSet :: Subst -> VarSet -> Subst
- extendCvSubst :: Subst -> CoVar -> Coercion -> Subst
- zipTvSubst :: HasDebugCallStack => [TyVar] -> [Type] -> Subst
- mkTvSubstPrs :: [(TyVar, Type)] -> Subst
- substTyWith :: HasDebugCallStack => [TyVar] -> [Type] -> Type -> Type
- substTy :: HasDebugCallStack => Subst -> Type -> Type
- substCo :: HasDebugCallStack => Subst -> Coercion -> Coercion
- pattern ManyTy :: Mult
- isTyVarTy :: Type -> Bool
- splitAppTys :: HasDebugCallStack => Type -> (Type, [Type])
- splitFunTy_maybe :: Type -> Maybe (FunTyFlag, Mult, Type, Type)
- splitFunTys :: Type -> ([Scaled Type], Type)
- piResultTys :: HasDebugCallStack => Type -> [Type] -> Type
- tyConAppArgs_maybe :: Type -> Maybe [Type]
- newTyConInstRhs :: TyCon -> [Type] -> Type
- splitForAllTyCoVars :: Type -> ([TyCoVar], Type)
- isFunTy :: Type -> Bool
- dropForAlls :: Type -> Type
- isTYPEorCONSTRAINT :: Kind -> Bool
- irrelevantMult :: Scaled a -> a
- eqType :: Type -> Type -> Bool
- nonDetCmpType :: Type -> Type -> Ordering
- type CoreTickish = GenTickish 'TickishPassCore
- data LitNumType = LitNumInt
- literalType :: Literal -> Type
- mkRepReflCo :: Type -> Coercion
- ruleMatchTyKiX :: TyCoVarSet -> RnEnv2 -> TvSubstEnv -> Type -> Type -> Maybe TvSubstEnv
- tcUnifyTy :: Type -> Type -> Maybe Subst
- mkClassPred :: Class -> [Type] -> PredType
- getClassPredTys :: HasDebugCallStack => PredType -> (Class, [Type])
- getClassPredTys_maybe :: PredType -> Maybe (Class, [Type])
- isEvVarType :: Type -> Bool
- isClassPred :: PredType -> Bool
- isEqPred :: PredType -> Bool
- isEqPrimPred :: PredType -> Bool
- isDictId :: Id -> Bool
- data StrictnessMark
- dataConRepType :: DataCon -> Type
- dataConUnivTyVars :: DataCon -> [TyVar]
- dataConTheta :: DataCon -> ThetaType
- dataConWrapId_maybe :: DataCon -> Maybe Id
- dataConImplicitTyThings :: DataCon -> [TyThing]
- dataConRepStrictness :: DataCon -> [StrictnessMark]
- dataConWrapperType :: DataCon -> Type
- dataConInstArgTys :: DataCon -> [Type] -> [Scaled Type]
- dataConOrigArgTys :: DataCon -> [Scaled Type]
- dataConRepArgTys :: DataCon -> [Scaled Type]
- isTupleDataCon :: DataCon -> Bool
- isVanillaDataCon :: DataCon -> Bool
- classDataCon :: Class -> DataCon
- data HsArg p tm ty = HsValArg !(XValArg p) tm
- data HsType pass
- = HsForAllTy (XForAllTy pass) (HsForAllTelescope pass) (LHsType pass)
- | HsQualTy (XQualTy pass) (LHsContext pass) (LHsType pass)
- | HsTyVar (XTyVar pass) PromotionFlag (LIdP pass)
- | HsAppTy (XAppTy pass) (LHsType pass) (LHsType pass)
- | HsWildCardTy (XWildCardTy pass)
- data HsTyVarBndr flag pass = UserTyVar (XUserTyVar pass) flag (LIdP pass)
- data HsSigType pass = HsSig (XHsSig pass) (HsOuterSigTyVarBndrs pass) (LHsType pass)
- data HsWildCardBndrs pass thing = HsWC (XHsWC pass thing) thing
- data HsOuterTyVarBndrs flag pass = HsOuterImplicit (XHsOuterImplicit pass)
- type LHsType pass = XRec pass (HsType pass)
- data FixitySig pass = FixitySig (XFixitySig pass) [LIdP pass] Fixity
- data Sig pass
- = TypeSig (XTypeSig pass) [LIdP pass] (LHsSigWcType pass)
- | FixSig (XFixSig pass) (FixitySig pass)
- | InlineSig (XInlineSig pass) (LIdP pass) InlinePragma
- data HsDecl p = SigD (XSigD p) (Sig p)
- type LHsDecl p = XRec p (HsDecl p)
- data HsModule p
- type CoreAlt = Alt CoreBndr
- type CoreBind = Bind CoreBndr
- type CoreArg = Arg CoreBndr
- type CoreProgram = [CoreBind]
- data Unfolding
- data Bind b
- maybeUnfoldingTemplate :: Unfolding -> Maybe CoreExpr
- cmpAlt :: Alt a -> Alt a -> Ordering
- mkTyApps :: Expr b -> [Type] -> Expr b
- mkTyArg :: Type -> Expr b
- mkLams :: [b] -> Expr b -> Expr b
- mkLets :: [Bind b] -> Expr b -> Expr b
- bindersOf :: Bind b -> [b]
- bindersOfBinds :: [Bind b] -> [b]
- 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)
- collectArgs :: Expr b -> (Expr b, [Arg b])
- isTypeArg :: Expr b -> Bool
- data Reduction = Reduction Coercion !Type
- data CafInfo = NoCafRefs
- cafInfo :: IdInfo -> CafInfo
- setOccInfo :: IdInfo -> OccInfo -> IdInfo
- setCafInfo :: IdInfo -> CafInfo -> IdInfo
- mayHaveCafRefs :: CafInfo -> Bool
- idType :: Id -> Kind
- setIdInfo :: Id -> IdInfo -> Id
- modifyIdInfo :: HasDebugCallStack => (IdInfo -> IdInfo) -> Id -> Id
- mkExportedLocalId :: IdDetails -> Name -> Type -> Id
- mkUserLocalOrCoVar :: OccName -> Unique -> Mult -> Type -> SrcSpan -> Id
- isRecordSelector :: Id -> Bool
- isClassOpId_maybe :: Id -> Maybe Class
- isDFunId :: Id -> Bool
- idDataCon :: Id -> DataCon
- realIdUnfolding :: Id -> Unfolding
- idOccInfo :: Id -> OccInfo
- idInlinePragma :: Id -> InlinePragma
- isConLikeId :: Id -> Bool
- intTyConName :: Name
- boolTyConName :: Name
- listTyConName :: Name
- anyTy :: Type
- true_RDR :: RdrName
- unrestrictedFunTyConName :: Name
- charTyCon :: TyCon
- charDataCon :: DataCon
- stringTy :: Type
- intTy :: Type
- intTyCon :: TyCon
- intDataCon :: DataCon
- boolTy :: Type
- boolTyCon :: TyCon
- falseDataCon :: DataCon
- trueDataCon :: DataCon
- falseDataConId :: Id
- trueDataConId :: Id
- nilDataCon :: DataCon
- consDataCon :: DataCon
- tcSplitDFunTy :: Type -> ([TyVar], [Type], Class, [Type])
- tcSplitMethodTy :: Type -> ([TyVar], PredType, Type)
- exprFreeVars :: CoreExpr -> VarSet
- exprFreeVarsList :: CoreExpr -> [Var]
- exprSomeFreeVarsList :: InterestingVarFun -> CoreExpr -> [Var]
- exprsOrphNames :: [CoreExpr] -> NameSet
- data FamInstEnv
- type FamInstEnvs = (FamInstEnv, FamInstEnv)
- data FamFlavor = DataFamilyInst TyCon
- data FamInst = FamInst (CoAxiom Unbranched) FamFlavor Name [RoughMatchTc] [TyVar] [CoVar] [Type] Type IsOrphan
- emptyFamInstEnv :: FamInstEnv
- famInstEnvElts :: FamInstEnv -> [FamInst]
- topNormaliseType_maybe :: FamInstEnvs -> Type -> Maybe Reduction
- exprType :: HasDebugCallStack => CoreExpr -> Type
- extendIdSubst :: Subst -> Id -> CoreExpr -> Subst
- substExpr :: HasDebugCallStack => Subst -> CoreExpr -> CoreExpr
- occurAnalysePgm :: Module -> (Id -> Bool) -> (Activation -> Bool) -> [CoreRule] -> CoreProgram -> CoreProgram
- pAT_ERROR_ID :: Id
- data IfaceAnnotation
- data InstEnvs
- data ClsInst
- instanceDFunId :: ClsInst -> DFunId
- instanceSig :: ClsInst -> ([TyVar], [Type], Class, [Type])
- instEnvElts :: InstEnv -> [ClsInst]
- lookupInstEnv :: Bool -> InstEnvs -> Class -> [Type] -> ClsInstLookupResult
- data TcEvBinds = EvBinds (Bag EvBind)
- mkHsForAllInvisTele :: forall (p :: Pass). EpAnnForallTy -> [LHsTyVarBndr Specificity (GhcPass p)] -> HsForAllTelescope (GhcPass p)
- mkHsApp :: forall (id :: Pass). LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
- mkHsLam :: forall (p :: Pass). (IsPass p, XMG (GhcPass p) (LHsExpr (GhcPass p)) ~ Origin) => [LPat (GhcPass p)] -> LHsExpr (GhcPass p) -> LHsExpr (GhcPass p)
- mkHsIntegral :: IntegralLit -> HsOverLit GhcPs
- mkHsFractional :: FractionalLit -> HsOverLit GhcPs
- nlHsVar :: forall (p :: Pass) a. IsSrcSpanAnn p a => IdP (GhcPass p) -> LHsExpr (GhcPass p)
- nlVarPat :: forall (p :: Pass) a. IsSrcSpanAnn p a => IdP (GhcPass p) -> LPat (GhcPass p)
- nlHsIf :: LHsExpr GhcPs -> LHsExpr GhcPs -> LHsExpr GhcPs -> LHsExpr GhcPs
- nlList :: [LHsExpr GhcPs] -> LHsExpr GhcPs
- nlHsAppTy :: forall (p :: Pass). LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)
- nlHsTyVar :: forall (p :: Pass) a. IsSrcSpanAnn p a => PromotionFlag -> IdP (GhcPass p) -> LHsType (GhcPass p)
- nlHsFunTy :: forall (p :: Pass). IsPass p => LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)
- nlHsTyConApp :: forall (p :: Pass) a. IsSrcSpanAnn p a => PromotionFlag -> LexicalFixity -> IdP (GhcPass p) -> [LHsTypeArg (GhcPass p)] -> LHsType (GhcPass p)
- hsTypeToHsSigType :: LHsType GhcPs -> LHsSigType GhcPs
- hsTypeToHsSigWcType :: LHsType GhcPs -> LHsSigWcType GhcPs
- mkHsDictLet :: TcEvBinds -> LHsExpr GhcTc -> LHsExpr GhcTc
- data Severity = SevWarning
- data MessageClass = MCDiagnostic Severity ResolvedDiagnosticReason (Maybe DiagnosticCode)
- data MsgEnvelope e
- newtype ResolvedDiagnosticReason = ResolvedDiagnosticReason DiagnosticReason
- data DiagnosticReason = WarningWithoutFlag
- class HasDefaultDiagnosticOpts (DiagnosticOpts a) => Diagnostic a
- data Messages e
- defaultDiagnosticOpts :: HasDefaultDiagnosticOpts (DiagnosticOpts opts) => DiagnosticOpts opts
- mkPlainError :: [GhcHint] -> SDoc -> DiagnosticMessage
- errorsOrFatalWarningsFound :: Messages e -> Bool
- getLogger :: HasLogger m => m Logger
- data Logger
- putLogMsg :: Logger -> LogAction
- pprLocMsgEnvelope :: Diagnostic e => DiagnosticOpts e -> MsgEnvelope e -> SDoc
- withTiming :: MonadIO m => Logger -> SDoc -> (a -> ()) -> m a -> m a
- interpreterBackend :: Backend
- data GhcLink = LinkInMemory
- getDynFlags :: HasDynFlags m => m DynFlags
- gopt :: GeneralFlag -> DynFlags -> Bool
- gopt_set :: DynFlags -> GeneralFlag -> DynFlags
- gopt_unset :: DynFlags -> GeneralFlag -> DynFlags
- xopt_set :: DynFlags -> Extension -> DynFlags
- data ImportAvails
- data HsParsedModule = HsParsedModule {
- hpm_module :: Located (HsModule GhcPs)
- hpm_src_files :: [FilePath]
- lexprCtOrigin :: LHsExpr GhcRn -> CtOrigin
- data ModIface_ (phase :: ModIfacePhase)
- mkTcRnUnknownMessage :: (Diagnostic a, Typeable a, DiagnosticOpts a ~ NoDiagnosticOpts) => a -> TcRnMessage
- data NameCache
- type TypeEnv = NameEnv TyThing
- mkTypeEnv :: [TyThing] -> TypeEnv
- lookupTypeEnv :: TypeEnv -> Name -> Maybe TyThing
- plusTypeEnv :: TypeEnv -> TypeEnv -> TypeEnv
- isNumericClass :: Class -> Bool
- data FindResult
- = Found ModLocation Module
- | NoPackage Unit
- | FoundMultiple [(Module, ModuleOrigin)]
- | NotFound [FilePath] (Maybe Unit) [Unit] [Unit] [UnusableUnit] [ModuleSuggestion]
- lookupName :: GhcMonad m => Name -> m (Maybe TyThing)
- data ModGuts
- type HomePackageTable = DModuleNameEnv HomeModInfo
- data HomeModInfo
- lookupHpt :: HomePackageTable -> ModuleName -> Maybe HomeModInfo
- data ModSummary
- ms_mod_name :: ModSummary -> ModuleName
- showSDoc :: DynFlags -> SDoc -> String
- showPpr :: Outputable a => DynFlags -> a -> String
- data ExternalPackageState
- data ExternalUnitCache
- data UnitEnv
- ue_hpt :: HasDebugCallStack => UnitEnv -> HomePackageTable
- missingInterfaceErrorDiagnostic :: IfaceMessageOpts -> MissingInterfaceError -> SDoc
- srcErrorMessages :: SourceError -> Messages GhcMessage
- printMessages :: Diagnostic a => Logger -> DiagnosticOpts a -> DiagOpts -> Messages a -> IO ()
- initDiagOpts :: DynFlags -> DiagOpts
- initDsMessageOpts :: DynFlags -> DiagnosticOpts DsMessage
- initIfaceMessageOpts :: DynFlags -> DiagnosticOpts IfaceMessage
- failM :: IOEnv env a
- updEnv :: (env -> env') -> IOEnv env' a -> IOEnv env a
- emptyPlugins :: Plugins
- data HscEnv
- hscUpdateFlags :: (DynFlags -> DynFlags) -> HscEnv -> HscEnv
- hscSetFlags :: HasDebugCallStack => DynFlags -> HscEnv -> HscEnv
- data Ghc a
- class (Functor m, ExceptionMonad m, HasDynFlags m, HasLogger m) => GhcMonad (m :: Type -> Type) where
- getSession :: m HscEnv
- withSession :: GhcMonad m => (HscEnv -> m a) -> m a
- reflectGhc :: Ghc a -> Session -> IO a
- type TcM = TcRn
- type TcRn = TcRnIf TcGblEnv TcLclEnv
- data ParsedResult = ParsedResult {}
- type CommandLineOption = String
- purePlugin :: [CommandLineOption] -> IO PluginRecompile
- defaultPlugin :: Plugin
- findImportedModule :: HscEnv -> ModuleName -> PkgQual -> IO FindResult
- findExposedPackageModule :: FinderCache -> FinderOpts -> UnitState -> ModuleName -> PkgQual -> IO FindResult
- cannotFindModule :: HscEnv -> ModuleName -> FindResult -> MissingInterfaceError
- updOptLevel :: Int -> DynFlags -> DynFlags
- type DsM = TcRnIf DsGblEnv DsLclEnv
- getTopEnv :: TcRnIf gbl lcl HscEnv
- updTopEnv :: (HscEnv -> HscEnv) -> TcRnIf gbl lcl a -> TcRnIf gbl lcl a
- getGblEnv :: TcRnIf gbl lcl gbl
- setGblEnv :: gbl' -> TcRnIf gbl' lcl a -> TcRnIf gbl lcl a
- addErrAt :: SrcSpan -> TcRnMessage -> TcRn ()
- addErrs :: [(SrcSpan, TcRnMessage)] -> TcRn ()
- reportDiagnostics :: [MsgEnvelope TcRnMessage] -> TcM ()
- reportDiagnostic :: MsgEnvelope TcRnMessage -> TcRn ()
- failIfErrsM :: TcRn ()
- captureConstraints :: TcM a -> TcM (a, WantedConstraints)
- failWithTc :: TcRnMessage -> TcM a
- discardConstraints :: TcM a -> TcM a
- pushTcLevelM :: TcM a -> TcM (TcLevel, a)
- initIfaceTcRn :: IfG a -> TcRn a
- data TraceBinIFace = QuietBinIFace
- getWithUserData :: Binary a => NameCache -> BinHandle -> IO a
- putWithUserData :: Binary a => TraceBinIFace -> BinHandle -> a -> IO ()
- data WhereFrom = ImportBySystem
- loadInterface :: SDoc -> Module -> WhereFrom -> IfM lcl (MaybeErr MissingInterfaceError ModIface)
- initDsTc :: DsM a -> TcM (Messages DsMessage, Maybe a)
- initDsWithModGuts :: HscEnv -> ModGuts -> DsM a -> IO (Messages DsMessage, Maybe a)
- dsLExpr :: LHsExpr GhcTc -> DsM CoreExpr
- rnLExpr :: LHsExpr GhcPs -> RnM (LHsExpr GhcRn, FreeVars)
- tcInferRho :: LHsExpr GhcRn -> TcM (LHsExpr GhcTc, TcRhoType)
- tcGetInstEnvs :: TcM InstEnvs
- zonkTopLExpr :: LHsExpr GhcTc -> TcM (LHsExpr GhcTc)
- renamePkgQual :: UnitEnv -> ModuleName -> Maybe FastString -> PkgQual
- data InferMode = NoRestrictions
- captureTopConstraints :: TcM a -> TcM (a, WantedConstraints)
- simplifyInteractive :: WantedConstraints -> TcM (Bag EvBind)
- tcValBinds :: TopLevelFlag -> [(RecFlag, LHsBinds GhcRn)] -> [LSig GhcRn] -> TcM thing -> TcM ([(RecFlag, LHsBinds GhcTc)], HsWrapper, thing)
- tcInferSigma :: Bool -> LHsExpr GhcRn -> TcM TcSigmaType
- hscDesugar :: HscEnv -> ModSummary -> TcGblEnv -> IO ModGuts
- compileFile :: HscEnv -> StopPhase -> (FilePath, Maybe Phase) -> IO (Maybe FilePath)
- data DesugaredModule = DesugaredModule {}
- data TypecheckedModule
- data ParsedModule = ParsedModule {}
- coreModule :: DesugaredMod m => m -> ModGuts
- typecheckModule :: GhcMonad m => ParsedModule -> m TypecheckedModule
- desugarModule :: GhcMonad m => TypecheckedModule -> m DesugaredModule
- modInfoTopLevelScope :: ModuleInfo -> Maybe [Name]
- isDictonaryId :: Id -> Bool
- deserializeWithData :: Data a => [Word8] -> a
- fromSerialized :: Typeable a => ([Word8] -> a) -> Serialized -> Maybe a
- toSerialized :: Typeable a => (a -> [Word8]) -> a -> Serialized
- data Serialized = Serialized TypeRep [Word8]
Documentation
module Liquid.GHC.API.Compat
module Liquid.GHC.API.Extra
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 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 | |
Constructors
TyVarTy Var | Vanilla type or kind variable (*never* a coercion variable) |
AppTy Type Type | Type application to something other than a 1) Function: must not be a 2) Argument type |
TyConApp TyCon [KindOrType] | Application of a 1) Type constructor being applied to. 2) Type arguments. Might not have enough type arguments here to saturate the constructor. Even type synonyms are not necessarily saturated; for example unsaturated type synonyms can appear as the right hand side of a type synonym. |
ForAllTy !ForAllTyBinder Type | A Π type. See Note [Why ForAllTy can quantify over a coercion variable] INVARIANT: If the binder is a coercion variable, it must be mentioned in the Type. See Note [Unused coercion variable in ForAllTy] |
FunTy FunTyFlag Mult Type Type | FUN m t1 t2 Very common, so an important special case See Note [Function types] |
LitTy TyLit | Type literals are similar to type constructors. |
CastTy Type KindCoercion | A kind cast. The coercion is always nominal. INVARIANT: The cast is never reflexive (EQ2) INVARIANT: The Type is not a CastTy (use TransCo instead) (EQ3) INVARIANT: The Type is not a ForAllTy over a tyvar (EQ4) See Note [Respecting definitional equality] |
CoercionTy Coercion | Injection of a Coercion into a type This should only ever be used in the RHS of an AppTy, in the list of a TyConApp, when applying a promoted GADT data constructor |
Instances
NFData Type Source # | |
Defined in Language.Haskell.Liquid.GHC.Misc | |
Outputable Type | |
Defined in GHC.Core.TyCo.Rep | |
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 # | |
Eq Type Source # | |
Fixpoint Type Source # | |
PPrint Type Source # | |
Defined in Language.Haskell.Liquid.Types.PrettyPrint | |
Subable Type Source # | |
SubsTy TyVar Type SpecType Source # | |
Eq (DeBruijn Type) | |
Show (Axiom Var Type CoreExpr) Source # | |
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 in Core] 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
Show CoreExpr Source # | |
Subable CoreExpr Source # | |
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) # | |
PPrint (Expr Var) Source # | |
Defined in Language.Haskell.Liquid.Types.PrettyPrint | |
CBVisitable (Expr Var) Source # | |
Show (Axiom Var Type CoreExpr) Source # | |
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 |
LitFloat Rational |
|
LitDouble Rational |
|
Instances
Binary Literal | |
Outputable Literal | |
Defined in GHC.Types.Literal | |
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 # | |
Eq Literal | |
Ord Literal | Needed for the |
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 |
|
A unique, unambiguous name for something, containing information about where that thing originated.
Instances
NFData Name | |
Defined in GHC.Types.Name | |
ModifyState Name | |
Defined in GHC.Iface.Ext.Ast Methods addSubstitution :: Name -> Name -> HieState -> HieState | |
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 -> JoinPointHood # | |
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 # | |
Show Name Source # | |
Eq Name | |
Ord Name | Caution: This instance is implemented via See |
Symbolic Name Source # | |
Defined in Language.Haskell.Liquid.GHC.Misc | |
Fixpoint Name Source # | |
PPrint Name Source # | |
Defined in Language.Haskell.Liquid.Types.PrettyPrint | |
Loc Name Source # | |
Defined in Language.Haskell.Liquid.GHC.Misc | |
ToHie (LBooleanFormula (LocatedN Name)) | |
Defined in GHC.Iface.Ext.Ast | |
ToHie (Context (Located Name)) | |
type Anno Name | |
Defined in GHC.Hs.Extension |
data ModuleName #
A ModuleName is essentially a simple string, e.g. Data.List
.
Instances
Do not rely on instance sizes for general types, we use variable length encoding for many of them.
Minimal complete definition
Instances
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.
Methods
docWithContext :: (SDocContext -> doc) -> doc #
docWithStyle :: doc -> (PprStyle -> SDoc) -> doc #
Instances
IsOutput HDoc | |
Defined in GHC.Utils.Outputable Methods docWithContext :: (SDocContext -> HDoc) -> HDoc # | |
IsOutput HLine | |
Defined in GHC.Utils.Outputable Methods docWithContext :: (SDocContext -> HLine) -> HLine # | |
IsOutput SDoc | |
Defined in GHC.Utils.Outputable Methods docWithContext :: (SDocContext -> SDoc) -> SDoc # |
A UnitId identifies a built library in a database and is used to generate unique symbols, etc. It's usually of the form:
pkgname-1.2:libname+hash
These UnitId are provided to us via the -this-unit-id
flag.
The library in question may be definite or indefinite; if it is indefinite, none of the holes have been filled (we never install partially instantiated libraries as we can cheaply instantiate them on-the-fly, cf VirtUnit). Put another way, an installed unit id is either fully instantiated, or not instantiated at all.
Instances
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 | |
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 | |
Eq UnitId | |
Ord Unit | |
Ord UnitId | |
Source Location
Instances
Outputable SrcLoc | |
Defined in GHC.Types.SrcLoc | |
Show SrcLoc | |
Eq SrcLoc | |
TyCons represent type constructors. Type constructors are introduced by things such as:
1) Data declarations: data Foo = ...
creates the Foo
type constructor of
kind Type
2) Type synonyms: type Foo = ...
creates the Foo
type constructor
3) Newtypes: newtype Foo a = MkFoo ...
creates the Foo
type constructor
of kind Type -> Type
4) Class declarations: class Foo where
creates the Foo
type constructor
of kind Constraint
This data type also encodes a number of primitive, built in type constructors such as those for function and tuple types.
If you edit this type, you may need to update the GHC formalism See Note [GHC Formalism] in GHC.Core.Lint
Instances
Variable
Essentially a typed Name
, that may also contain some additional information
about the Var
and its use sites.
Instances
NFData Var Source # | |
Defined in Language.Haskell.Liquid.GHC.Misc | |
ModifyState Id | |
Defined in GHC.Iface.Ext.Ast Methods addSubstitution :: Id -> Id -> HieState -> HieState | |
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 | |
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 # | |
Show CoreExpr Source # | |
Show Var Source # | |
Eq Var | |
Ord Var | |
Hashable Var Source # | |
Defined in Language.Haskell.Liquid.GHC.Misc | |
Symbolic Var Source # |
|
Defined in Language.Haskell.Liquid.GHC.Misc | |
Fixpoint Var Source # | |
PPrint Var Source # | |
Defined in Language.Haskell.Liquid.Types.PrettyPrint | |
Expression Var Source # | Converting to Fixpoint ---------------------------------------------------- |
Defined in Language.Haskell.Liquid.Types.RefType | |
Loc Var Source # | |
Defined in Language.Haskell.Liquid.GHC.Misc | |
Subable CoreExpr Source # | |
Subable Var Source # | |
CBVisitable CoreBind Source # | |
SubsTy TyVar Type SpecType Source # | |
ToHie (Context (Located Var)) | |
Eq (DeBruijn Var) | |
PPrint (Bind Var) Source # | |
Defined in Language.Haskell.Liquid.Types.PrettyPrint | |
PPrint (Expr Var) Source # | |
Defined in Language.Haskell.Liquid.Types.PrettyPrint | |
Subable (Alt Var) Source # | |
Subable (Bind Var) Source # | |
CBVisitable (Alt Var) Source # | |
CBVisitable (Expr Var) Source # | |
CBVisitable [CoreBind] Source # | |
OutputableBndr (Id, TagSig) | |
Defined in GHC.Stg.InferTags.TagSig Methods pprBndr :: BindingSite -> (Id, TagSig) -> SDoc # pprPrefixOcc :: (Id, TagSig) -> SDoc # pprInfixOcc :: (Id, TagSig) -> SDoc # bndrIsJoin_maybe :: (Id, TagSig) -> JoinPointHood # | |
Show (Axiom Var Type CoreExpr) Source # | |
type Anno Id | |
Defined in GHC.Hs.Extension |
data GenLocated l e #
We attach SrcSpans to lots of things, so let's have a datatype for it.
Constructors
L l e |
Instances
class NamedThing a where #
A class allowing convenient access to the Name
of various datatypes
Minimal complete definition
Instances
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.
Constructors
Pair a a |
Instances
Applicative Pair | |
Functor Pair | |
Foldable Pair | |
Defined in GHC.Data.Pair Methods fold :: Monoid m => Pair m -> m # foldMap :: Monoid m => (a -> m) -> Pair a -> m # foldMap' :: Monoid m => (a -> m) -> Pair a -> m # foldr :: (a -> b -> b) -> b -> Pair a -> b # foldr' :: (a -> b -> b) -> b -> Pair a -> b # foldl :: (b -> a -> b) -> b -> Pair a -> b # foldl' :: (b -> a -> b) -> b -> Pair a -> b # foldr1 :: (a -> a -> a) -> Pair a -> a # foldl1 :: (a -> a -> a) -> Pair a -> a # elem :: Eq a => a -> Pair a -> Bool # maximum :: Ord a => Pair a -> a # | |
Traversable Pair | |
Outputable a => Outputable (Pair a) | |
Defined in GHC.Data.Pair | |
(Semigroup a, Monoid a) => Monoid (Pair a) | |
Semigroup a => Semigroup (Pair a) | |
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
Is this a type-level (i.e., computationally irrelevant, thus erasable)
variable? Satisfies isTyVar = not . isId
.
data NamespaceSpecifier #
Optional namespace specifier for fixity signatures, WARNINIG and DEPRECATED pragmas.
Examples:
{-# WARNING in "x-partial" data Head "don't use this pattern synonym" #-} -- ↑ DataNamespaceSpecifier
{-# DEPRECATED type D "This type was deprecated" #-} -- ↑ TypeNamespaceSpecifier
infixr 6 data $ -- ↑ DataNamespaceSpecifier
Constructors
NoNamespaceSpecifier |
Instances
A constructor-like thing
Constructors
RealDataCon DataCon |
Instances
NamedThing ConLike | |
Defined in GHC.Core.ConLike | |
Uniquable ConLike | |
Defined in GHC.Core.ConLike | |
Outputable ConLike | |
Defined in GHC.Core.ConLike | |
OutputableBndr ConLike | |
Defined in GHC.Core.ConLike Methods pprBndr :: BindingSite -> ConLike -> SDoc # pprPrefixOcc :: ConLike -> SDoc # pprInfixOcc :: ConLike -> SDoc # | |
Data ConLike | |
Defined in GHC.Core.ConLike Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ConLike -> c ConLike # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ConLike # toConstr :: ConLike -> Constr # dataTypeOf :: ConLike -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ConLike) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ConLike) # gmapT :: (forall b. Data b => b -> b) -> ConLike -> ConLike # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ConLike -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ConLike -> r # gmapQ :: (forall d. Data d => d -> u) -> ConLike -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ConLike -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ConLike -> m ConLike # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ConLike -> m ConLike # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ConLike -> m ConLike # | |
Eq ConLike | |
type Anno ConLike | |
Defined in GHC.Hs.Pat |
lengthAtLeast :: [a] -> Int -> Bool #
(lengthAtLeast xs n) = (length xs >= n)
srcLocFile :: RealSrcLoc -> FastString #
Gives the filename of the RealSrcLoc
A Coercion
is concrete evidence of the equality/convertibility
of two types.
Constructors
AxiomInstCo (CoAxiom Branched) BranchIndex [Coercion] | |
SymCo Coercion |
Instances
Outputable Coercion | |
Defined in GHC.Core.TyCo.Rep | |
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 # | |
Eq (DeBruijn Coercion) | |
Constructors
Fixity SourceText Int FixityDirection |
Instances
Binary Fixity | |
Outputable Fixity | |
Defined in GHC.Types.Fixity | |
Data Fixity | |
Defined in GHC.Types.Fixity Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Fixity -> c Fixity # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Fixity # toConstr :: Fixity -> Constr # dataTypeOf :: Fixity -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Fixity) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Fixity) # gmapT :: (forall b. Data b => b -> b) -> Fixity -> Fixity # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Fixity -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Fixity -> r # gmapQ :: (forall d. Data d => d -> u) -> Fixity -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Fixity -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Fixity -> m Fixity # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Fixity -> m Fixity # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Fixity -> m Fixity # | |
Eq Fixity | |
data LexicalFixity #
Captures the fixity of declarations as they are parsed. This is not necessarily the same as the fixity declaration, as the normal fixity may be overridden using parens or backticks.
Constructors
Prefix |
Instances
Outputable LexicalFixity | |
Defined in GHC.Types.Fixity Methods ppr :: LexicalFixity -> SDoc # | |
Data LexicalFixity | |
Defined in GHC.Types.Fixity Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> LexicalFixity -> c LexicalFixity # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c LexicalFixity # toConstr :: LexicalFixity -> Constr # dataTypeOf :: LexicalFixity -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c LexicalFixity) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c LexicalFixity) # gmapT :: (forall b. Data b => b -> b) -> LexicalFixity -> LexicalFixity # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LexicalFixity -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LexicalFixity -> r # gmapQ :: (forall d. Data d => d -> u) -> LexicalFixity -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> LexicalFixity -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> LexicalFixity -> m LexicalFixity # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LexicalFixity -> m LexicalFixity # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LexicalFixity -> m LexicalFixity # | |
Eq LexicalFixity | |
Defined in GHC.Types.Fixity Methods (==) :: LexicalFixity -> LexicalFixity -> Bool # (/=) :: LexicalFixity -> LexicalFixity -> Bool # |
moduleName :: GenModule unit -> ModuleName #
Module name (e.g. A.B.C)
moduleUnit :: GenModule unit -> unit #
Unit the module belongs to
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) # | |
Subable (Alt Var) Source # | |
CBVisitable (Alt Var) Source # | |
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
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
data CostCentre #
A Cost Centre is a single {-# SCC #-}
annotation.
Instances
Unique identifier.
The type of unique identifiers that are used in many places in GHC
for fast ordering and equality tests. You should generate these with
the functions from the UniqSupply
module
These are sometimes also referred to as "keys" in comments in GHC.
Instances
Uniquable Unique | |
Defined in GHC.Types.Unique | |
Outputable Unique | |
Defined in GHC.Types.Unique | |
Show Unique | |
Eq Unique | |
isEmpty :: SDocContext -> SDoc -> Bool #
Instances
ContainsDynFlags (Env gbl lcl) | |
Defined in GHC.Tc.Types Methods extractDynFlags :: Env gbl lcl -> DynFlags # | |
ContainsHooks (Env gbl lcl) | |
Defined in GHC.Tc.Types Methods extractHooks :: Env gbl lcl -> Hooks # | |
ContainsModule gbl => ContainsModule (Env gbl lcl) | |
Defined in GHC.Tc.Types Methods extractModule :: Env gbl lcl -> Module # | |
ContainsLogger (Env gbl lcl) | |
Defined in GHC.Tc.Types Methods extractLogger :: Env gbl lcl -> Logger # |
class Outputable a where #
Class designating that some type has an SDoc
representation
Instances
data GhcException #
GHC's own exception type error messages all take the form:
<location>: <error>
If the location is on the command line, or in GHC itself, then <location>="ghc". All of the error types below correspond to a <location> of "ghc", except for ProgramError (where the string is assumed to contain a location already, so we don't print one).
Constructors
CmdLineError String | A problem with the command line arguments, but don't print usage. |
ProgramError String | An error in the user's code, probably. |
Instances
Exception GhcException | |
Defined in GHC.Utils.Panic Methods toException :: GhcException -> SomeException # fromException :: SomeException -> Maybe GhcException # displayException :: GhcException -> String # backtraceDesired :: GhcException -> Bool # | |
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
JsRender SDoc | |
IsDoc SDoc | |
IsLine SDoc | |
IsOutput SDoc | |
Defined in GHC.Utils.Outputable Methods docWithContext :: (SDocContext -> SDoc) -> SDoc # | |
Outputable SDoc | |
Defined in GHC.Utils.Outputable | |
IsString SDoc | |
Defined in GHC.Utils.Outputable Methods fromString :: String -> SDoc # | |
OutputableP env SDoc | |
Defined in GHC.Utils.Outputable | |
type Line SDoc | |
Defined in GHC.Utils.Outputable |
data Annotation #
Represents an annotation after it has been sufficiently desugared from
it's initial form of AnnDecl
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] |
HsOverLit (XOverLitE p) (HsOverLit p) | Overloaded literals |
ExprWithTySig (XExprWithTySig p) (LHsExpr p) (LHsSigWcType (NoGhcTc p)) | Expression with an explicit type signature. |
Instances
Reader Name
Do not use the data constructors of RdrName directly: prefer the family
of functions that creates them, such as mkRdrUnqual
- Note: A Located RdrName will only have API Annotations if it is a compound one, e.g.
`bar` ( ~ )
AnnKeywordId
:AnnType
,AnnOpen
'('
or'['
or'[:'
,AnnClose
')'
or']'
or':]'
,,AnnBackquote
'`'
,AnnVal
AnnTilde
,
Instances
DisambInfixOp RdrName | |
HasOccName RdrName | |
Defined in GHC.Types.Name.Reader | |
Outputable RdrName | |
Defined in GHC.Types.Name.Reader | |
OutputableBndr RdrName | |
Defined in GHC.Types.Name.Reader Methods pprBndr :: BindingSite -> RdrName -> SDoc # pprPrefixOcc :: RdrName -> SDoc # pprInfixOcc :: RdrName -> SDoc # | |
Data RdrName | |
Defined in GHC.Types.Name.Reader Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> RdrName -> c RdrName # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c RdrName # toConstr :: RdrName -> Constr # dataTypeOf :: RdrName -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c RdrName) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c RdrName) # gmapT :: (forall b. Data b => b -> b) -> RdrName -> RdrName # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> RdrName -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> RdrName -> r # gmapQ :: (forall d. Data d => d -> u) -> RdrName -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> RdrName -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> RdrName -> m RdrName # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> RdrName -> m RdrName # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> RdrName -> m RdrName # | |
Eq RdrName | |
Ord RdrName | |
Defined in GHC.Types.Name.Reader | |
type Anno RdrName | |
Defined in GHC.Hs.Extension |
mkCoreApps infixl 4 #
Construct an expression which represents the application of a number of expressions to another. The leftmost expression in the list is applied first
mkCoreConApps :: DataCon -> [CoreExpr] -> CoreExpr #
Construct an expression which represents the application of a number of expressions to that of a data constructor expression. The leftmost expression in the list is applied first
mkCoreLams :: [CoreBndr] -> CoreExpr -> CoreExpr #
Create a lambda where the given expression has a number of variables bound over it. The leftmost binder is that bound by the outermost lambda in the result
mkCoreLets :: [CoreBind] -> CoreExpr -> CoreExpr #
Bind a list of binding groups over an expression. The leftmost binding group becomes the outermost group in the resulting expression
A case alternative constructor (i.e. pattern match)
Constructors
DataAlt DataCon | |
LitAlt Literal | A literal: |
DEFAULT | Trivial alternative: |
Instances
Outputable AltCon | |
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 # | |
Eq AltCon | |
Ord AltCon | |
CBVisitable AltCon Source # | |
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
data GenTickish (pass :: TickishPass) #
Constructors
ProfNote | An |
Fields
| |
HpcTick | A "tick" used by HPC to track the execution of each subexpression in the original source code. |
Fields
| |
Breakpoint | A breakpoint for the GHCi debugger. This behaves like an HPC tick, but has a list of free variables which will be available for inspection in GHCi when the program stops at the breakpoint. NB. we must take account of these Ids when (a) counting free variables, and (b) substituting (don't substitute for them) |
Fields
| |
SourceNote | A source note. Source notes are pure annotations: Their presence should neither influence compilation nor execution. The semantics are given by causality: The presence of a source note means that a local change in the referenced source code span will possibly provoke the generated code to change. On the flip-side, the functionality of annotated code *must* be invariant against changes to all source code *except* the spans referenced in the source notes (see "Causality of optimized Haskell" paper for details). Therefore extending the scope of any given source note is always valid. Note that it is still undesirable though, as this reduces their usefulness for debugging and profiling. Therefore we will generally try only to make use of this property where it is necessary to enable optimizations. |
Fields
|
Instances
Data (GenTickish 'TickishPassCmm) | |
Defined in GHC.Types.Tickish Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GenTickish 'TickishPassCmm -> c (GenTickish 'TickishPassCmm) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (GenTickish 'TickishPassCmm) # toConstr :: GenTickish 'TickishPassCmm -> Constr # dataTypeOf :: GenTickish 'TickishPassCmm -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (GenTickish 'TickishPassCmm)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (GenTickish 'TickishPassCmm)) # gmapT :: (forall b. Data b => b -> b) -> GenTickish 'TickishPassCmm -> GenTickish 'TickishPassCmm # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GenTickish 'TickishPassCmm -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GenTickish 'TickishPassCmm -> r # gmapQ :: (forall d. Data d => d -> u) -> GenTickish 'TickishPassCmm -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> GenTickish 'TickishPassCmm -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> GenTickish 'TickishPassCmm -> m (GenTickish 'TickishPassCmm) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GenTickish 'TickishPassCmm -> m (GenTickish 'TickishPassCmm) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GenTickish 'TickishPassCmm -> m (GenTickish 'TickishPassCmm) # | |
Data (GenTickish 'TickishPassCore) | |
Defined in GHC.Types.Tickish Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GenTickish 'TickishPassCore -> c (GenTickish 'TickishPassCore) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (GenTickish 'TickishPassCore) # toConstr :: GenTickish 'TickishPassCore -> Constr # dataTypeOf :: GenTickish 'TickishPassCore -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (GenTickish 'TickishPassCore)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (GenTickish 'TickishPassCore)) # gmapT :: (forall b. Data b => b -> b) -> GenTickish 'TickishPassCore -> GenTickish 'TickishPassCore # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GenTickish 'TickishPassCore -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GenTickish 'TickishPassCore -> r # gmapQ :: (forall d. Data d => d -> u) -> GenTickish 'TickishPassCore -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> GenTickish 'TickishPassCore -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> GenTickish 'TickishPassCore -> m (GenTickish 'TickishPassCore) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GenTickish 'TickishPassCore -> m (GenTickish 'TickishPassCore) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GenTickish 'TickishPassCore -> m (GenTickish 'TickishPassCore) # | |
Data (GenTickish 'TickishPassStg) | |
Defined in GHC.Types.Tickish Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GenTickish 'TickishPassStg -> c (GenTickish 'TickishPassStg) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (GenTickish 'TickishPassStg) # toConstr :: GenTickish 'TickishPassStg -> Constr # dataTypeOf :: GenTickish 'TickishPassStg -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (GenTickish 'TickishPassStg)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (GenTickish 'TickishPassStg)) # gmapT :: (forall b. Data b => b -> b) -> GenTickish 'TickishPassStg -> GenTickish 'TickishPassStg # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GenTickish 'TickishPassStg -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GenTickish 'TickishPassStg -> r # gmapQ :: (forall d. Data d => d -> u) -> GenTickish 'TickishPassStg -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> GenTickish 'TickishPassStg -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> GenTickish 'TickishPassStg -> m (GenTickish 'TickishPassStg) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GenTickish 'TickishPassStg -> m (GenTickish 'TickishPassStg) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GenTickish 'TickishPassStg -> m (GenTickish 'TickishPassStg) # | |
Eq (GenTickish 'TickishPassCmm) | |
Defined in GHC.Types.Tickish Methods (==) :: GenTickish 'TickishPassCmm -> GenTickish 'TickishPassCmm -> Bool # (/=) :: GenTickish 'TickishPassCmm -> GenTickish 'TickishPassCmm -> Bool # | |
Eq (GenTickish 'TickishPassCore) | |
Defined in GHC.Types.Tickish Methods (==) :: GenTickish 'TickishPassCore -> GenTickish 'TickishPassCore -> Bool # (/=) :: GenTickish 'TickishPassCore -> GenTickish 'TickishPassCore -> Bool # | |
Ord (GenTickish 'TickishPassCmm) | |
Defined in GHC.Types.Tickish Methods compare :: GenTickish 'TickishPassCmm -> GenTickish 'TickishPassCmm -> Ordering # (<) :: GenTickish 'TickishPassCmm -> GenTickish 'TickishPassCmm -> Bool # (<=) :: GenTickish 'TickishPassCmm -> GenTickish 'TickishPassCmm -> Bool # (>) :: GenTickish 'TickishPassCmm -> GenTickish 'TickishPassCmm -> Bool # (>=) :: GenTickish 'TickishPassCmm -> GenTickish 'TickishPassCmm -> Bool # max :: GenTickish 'TickishPassCmm -> GenTickish 'TickishPassCmm -> GenTickish 'TickishPassCmm # min :: GenTickish 'TickishPassCmm -> GenTickish 'TickishPassCmm -> GenTickish 'TickishPassCmm # | |
Ord (GenTickish 'TickishPassCore) | |
Defined in GHC.Types.Tickish Methods compare :: GenTickish 'TickishPassCore -> GenTickish 'TickishPassCore -> Ordering # (<) :: GenTickish 'TickishPassCore -> GenTickish 'TickishPassCore -> Bool # (<=) :: GenTickish 'TickishPassCore -> GenTickish 'TickishPassCore -> Bool # (>) :: GenTickish 'TickishPassCore -> GenTickish 'TickishPassCore -> Bool # (>=) :: GenTickish 'TickishPassCore -> GenTickish 'TickishPassCore -> Bool # max :: GenTickish 'TickishPassCore -> GenTickish 'TickishPassCore -> GenTickish 'TickishPassCore # min :: GenTickish 'TickishPassCore -> GenTickish 'TickishPassCore -> GenTickish 'TickishPassCore # |
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
The Session is a handle to the complete state of a compilation session. A compilation session consists of a set of modules constituting the current program or library, the context for interactive evaluation, and various caches.
TcGblEnv
describes the top-level of the module at the
point at which the typechecker is finished work.
It is this structure that is handed on to the desugarer
For state that needs to be updated during the typechecking
phase and returned at end, use a TcRef
(= IORef
).
Instances
ContainsModule TcGblEnv | |
Defined in GHC.Tc.Types Methods extractModule :: TcGblEnv -> Module # |
simplifyInfer :: TcLevel -> InferMode -> [TcIdSigInst] -> [(Name, TcTauType)] -> WantedConstraints -> TcM ([TcTyVar], [EvVar], TcEvBinds, Bool) #
Contains not only a collection of GeneralFlag
s but also a plethora of
information relating to the compilation of a single file or GHC session
data SourceError #
A source error is an error that is caused by one or more errors in the
source code. A SourceError
is thrown by many functions in the
compilation pipeline. Inside GHC these errors are merely printed via
log_action
, but API clients may treat them differently, for example,
insert them into a list box. If you want the default behaviour, use the
idiom:
handleSourceError printExceptionAndWarnings $ do ... api calls that may fail ...
The SourceError
s error messages can be accessed via srcErrorMessages
.
This list may be empty if the compiler failed due to -Werror
(Opt_WarnIsError
).
See printExceptionAndWarnings
for more information on what to take care
of when writing a custom error handler.
Instances
Exception SourceError | |
Defined in GHC.Types.SourceError Methods toException :: SourceError -> SomeException # fromException :: SomeException -> Maybe SourceError # displayException :: SourceError -> String # backtraceDesired :: SourceError -> Bool # | |
Show SourceError | |
Defined in GHC.Types.SourceError Methods showsPrec :: Int -> SourceError -> ShowS # show :: SourceError -> String # showList :: [SourceError] -> ShowS # | |
PPrint SourceError Source # | A whole bunch of PPrint instances follow ---------------------------------- |
Defined in Language.Haskell.Liquid.Types.PrettyPrint | |
Result SourceError Source # | |
Defined in Language.Haskell.Liquid.GHC.Interface |
Plugin
is the compiler plugin data type. Try to avoid
constructing one of these directly, and just modify some fields of
defaultPlugin
instead: this is to try and preserve source-code
compatibility when we add fields to this.
Nonetheless, this API is preliminary and highly likely to change in the future.
Constructors
Plugin | |
Fields
|
panic :: HasCallStack => String -> a #
Panics and asserts.
data FastString #
A FastString
is a UTF-8 encoded string together with a unique ID. All
FastString
s are stored in a global hashtable to support fast O(1)
comparison.
It is also associated with a lazy reference to the Z-encoding of this string which is used by the compiler internally.
Instances
NFData FastString | |
Defined in GHC.Data.FastString Methods rnf :: FastString -> () # | |
ToJExpr FastString | |
Defined in GHC.JS.Make | |
Uniquable FastString | |
Defined in GHC.Types.Unique Methods getUnique :: FastString -> Unique # | |
Binary FastString | |
Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> FastString -> IO () # put :: BinHandle -> FastString -> IO (Bin FastString) # get :: BinHandle -> IO FastString # | |
Outputable FastString | |
Defined in GHC.Utils.Outputable Methods ppr :: FastString -> SDoc # | |
Monoid FastString | |
Defined in GHC.Data.FastString Methods mempty :: FastString # mappend :: FastString -> FastString -> FastString # mconcat :: [FastString] -> FastString # | |
Semigroup FastString | |
Defined in GHC.Data.FastString Methods (<>) :: FastString -> FastString -> FastString # sconcat :: NonEmpty FastString -> FastString # stimes :: Integral b => b -> FastString -> FastString # | |
Data FastString | |
Defined in GHC.Data.FastString Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FastString -> c FastString # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c FastString # toConstr :: FastString -> Constr # dataTypeOf :: FastString -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c FastString) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c FastString) # gmapT :: (forall b. Data b => b -> b) -> FastString -> FastString # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FastString -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FastString -> r # gmapQ :: (forall d. Data d => d -> u) -> FastString -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> FastString -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> FastString -> m FastString # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> FastString -> m FastString # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> FastString -> m FastString # | |
IsString FastString | |
Defined in GHC.Data.FastString Methods fromString :: String -> FastString # | |
Show FastString | |
Defined in GHC.Data.FastString Methods showsPrec :: Int -> FastString -> ShowS # show :: FastString -> String # showList :: [FastString] -> ShowS # | |
Eq FastString | |
Defined in GHC.Data.FastString | |
Symbolic FastString Source # | |
Defined in Language.Haskell.Liquid.GHC.Misc Methods symbol :: FastString -> Symbol # | |
ToJExpr a => ToJExpr (UniqMap FastString a) | |
Defined in GHC.JS.Make Methods toJExpr :: UniqMap FastString a -> JStgExpr # toJExprFromList :: [UniqMap FastString a] -> JStgExpr # | |
type Anno FastString | |
Defined in GHC.Hs.Expr | |
type Anno (SourceText, RuleName) | |
Defined in GHC.Hs.Decls |
bytesFS :: FastString -> ByteString #
Gives the Modified UTF-8 encoded bytes corresponding to a FastString
lexicalCompareFS :: FastString -> FastString -> Ordering #
Compare FastString lexically
If you don't care about the lexical ordering, use uniqCompareFS
instead.
mkFastStringByteString :: ByteString -> FastString #
Create a FastString
by copying an existing ByteString
mkFastString :: String -> FastString #
Creates a UTF-8 encoded FastString
from a String
unpackFS :: FastString -> String #
Lazily unpacks and decodes the FastString
concatFS :: [FastString] -> FastString #
mkPtrString# :: Addr# -> PtrString #
Wrap an unboxed address into a PtrString
.
fsLit :: String -> FastString #
doubleQuotes :: IsLine doc => doc -> doc #
hangNotEmpty :: SDoc -> Int -> SDoc -> SDoc #
This behaves like hang
, but does not indent the second document
when the header is empty.
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.
See Note [Roles] in GHC.Core.Coercion
Order of constructors matters: the Ord instance coincides with the *super*typing relation on roles.
Instances
Data Role | |
Defined in Language.Haskell.Syntax.Basic 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) | |
Defined in GHC.Hs.Decls | |
type Anno (Maybe Role) | |
Defined in GHC.Hs.Decls |
Constructors
Boxed |
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 | |
Maps the "normal" id type for a given pass
Used when constructing a term with an unused extension point.
moduleNameFS :: ModuleName -> FastString #
moduleNameString :: ModuleName -> String #
mkModuleName :: String -> ModuleName #
mkModuleNameFS :: FastString -> ModuleName #
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
NFData OccName | |
Defined in GHC.Types.Name.Occurrence | |
HasOccName 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 # | |
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 # | |
Eq OccName | |
Ord OccName | |
Defined in GHC.Types.Name.Occurrence |
mkVarOccFS :: FastString -> OccName #
data IsBootInterface #
Indicates whether a module name is referring to a boot interface (hs-boot file) or regular module (hs file). We need to treat boot modules specially when building compilation graphs, since they break cycles. Regular source files and signature files are treated equivalently.
Instances
Data IsBootInterface | |
Defined in Language.Haskell.Syntax.ImpExp Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> IsBootInterface -> c IsBootInterface # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c IsBootInterface # toConstr :: IsBootInterface -> Constr # dataTypeOf :: IsBootInterface -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c IsBootInterface) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c IsBootInterface) # gmapT :: (forall b. Data b => b -> b) -> IsBootInterface -> IsBootInterface # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> IsBootInterface -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> IsBootInterface -> r # gmapQ :: (forall d. Data d => d -> u) -> IsBootInterface -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> IsBootInterface -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> IsBootInterface -> m IsBootInterface # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> IsBootInterface -> m IsBootInterface # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> IsBootInterface -> m IsBootInterface # | |
Show IsBootInterface | |
Defined in Language.Haskell.Syntax.ImpExp Methods showsPrec :: Int -> IsBootInterface -> ShowS # show :: IsBootInterface -> String # showList :: [IsBootInterface] -> ShowS # | |
Eq IsBootInterface | |
Defined in Language.Haskell.Syntax.ImpExp Methods (==) :: IsBootInterface -> IsBootInterface -> Bool # (/=) :: IsBootInterface -> IsBootInterface -> Bool # | |
Ord IsBootInterface | |
Defined in Language.Haskell.Syntax.ImpExp Methods compare :: IsBootInterface -> IsBootInterface -> Ordering # (<) :: IsBootInterface -> IsBootInterface -> Bool # (<=) :: IsBootInterface -> IsBootInterface -> Bool # (>) :: IsBootInterface -> IsBootInterface -> Bool # (>=) :: IsBootInterface -> IsBootInterface -> Bool # max :: IsBootInterface -> IsBootInterface -> IsBootInterface # min :: IsBootInterface -> IsBootInterface -> IsBootInterface # |
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 Methods docWithContext :: (SDocContext -> HDoc) -> HDoc # | |
type Line HDoc | |
Defined in GHC.Utils.Outputable |
Represents a single line of output that can be efficiently printed directly
to a Handle
(actually a BufHandle
).
See Note [SDoc versus HDoc] and Note [HLine versus HDoc] for more details.
Instances
JsRender HLine | |
IsLine HLine | |
IsOutput HLine | |
Defined in GHC.Utils.Outputable Methods docWithContext :: (SDocContext -> HLine) -> HLine # |
data JoinPointHood #
Constructors
JoinPoint !Int | |
NotJoinPoint |
Instances
NFData JoinPointHood | |
Defined in GHC.Utils.Outputable Methods rnf :: JoinPointHood -> () # | |
Binary JoinPointHood | |
Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> JoinPointHood -> IO () # put :: BinHandle -> JoinPointHood -> IO (Bin JoinPointHood) # get :: BinHandle -> IO JoinPointHood # | |
Outputable JoinPointHood | |
Defined in GHC.Utils.Outputable Methods ppr :: JoinPointHood -> SDoc # | |
Eq JoinPointHood | |
Defined in GHC.Utils.Outputable Methods (==) :: JoinPointHood -> JoinPointHood -> Bool # (/=) :: JoinPointHood -> JoinPointHood -> Bool # |
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 |
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 -> JoinPointHood #
Instances
OutputableBndr ConLike | |
Defined in GHC.Core.ConLike Methods pprBndr :: BindingSite -> ConLike -> SDoc # pprPrefixOcc :: ConLike -> SDoc # pprInfixOcc :: ConLike -> SDoc # | |
OutputableBndr DataCon | |
Defined in GHC.Core.DataCon Methods pprBndr :: BindingSite -> DataCon -> SDoc # pprPrefixOcc :: DataCon -> SDoc # pprInfixOcc :: DataCon -> SDoc # | |
OutputableBndr PatSyn | |
Defined in GHC.Core.PatSyn Methods pprBndr :: BindingSite -> PatSyn -> SDoc # pprPrefixOcc :: PatSyn -> SDoc # pprInfixOcc :: PatSyn -> SDoc # bndrIsJoin_maybe :: PatSyn -> JoinPointHood # | |
OutputableBndr BinderInfo | |
Defined in GHC.Stg.Lift.Types Methods pprBndr :: BindingSite -> BinderInfo -> SDoc # pprPrefixOcc :: BinderInfo -> SDoc # pprInfixOcc :: BinderInfo -> SDoc # | |
OutputableBndr Name | |
Defined in GHC.Types.Name Methods pprBndr :: BindingSite -> Name -> SDoc # pprPrefixOcc :: Name -> SDoc # pprInfixOcc :: Name -> SDoc # bndrIsJoin_maybe :: Name -> JoinPointHood # | |
OutputableBndr OccName | |
Defined in GHC.Types.Name.Occurrence Methods pprBndr :: BindingSite -> OccName -> SDoc # pprPrefixOcc :: OccName -> SDoc # pprInfixOcc :: OccName -> SDoc # | |
OutputableBndr RdrName | |
Defined in GHC.Types.Name.Reader Methods pprBndr :: BindingSite -> RdrName -> SDoc # pprPrefixOcc :: RdrName -> SDoc # pprInfixOcc :: RdrName -> SDoc # | |
(Outputable a, OutputableBndr e) => OutputableBndr (GenLocated (EpAnn a) e) | |
Defined in GHC.Parser.Annotation Methods pprBndr :: BindingSite -> GenLocated (EpAnn a) e -> SDoc # pprPrefixOcc :: GenLocated (EpAnn a) e -> SDoc # pprInfixOcc :: GenLocated (EpAnn a) e -> SDoc # bndrIsJoin_maybe :: GenLocated (EpAnn a) e -> JoinPointHood # | |
OutputableBndr (Id, TagSig) | |
Defined in GHC.Stg.InferTags.TagSig Methods pprBndr :: BindingSite -> (Id, TagSig) -> SDoc # pprPrefixOcc :: (Id, TagSig) -> SDoc # pprInfixOcc :: (Id, TagSig) -> SDoc # bndrIsJoin_maybe :: (Id, TagSig) -> JoinPointHood # |
Wrapper for types having a Outputable instance when an OutputableP instance is required.
Constructors
PDoc a |
Instances
Outputable a => OutputableP env (PDoc a) | |
Defined in GHC.Utils.Outputable |
class OutputableP env a where #
Outputable class with an additional environment value
See Note [The OutputableP class]
Instances
OutputableP Platform CmmGraph | |
OutputableP Platform CmmInfoTable | |
OutputableP Platform CmmStatic | |
OutputableP Platform CmmTopInfo | |
OutputableP Platform CLabel | |
OutputableP Platform InfoProvEnt | |
Defined in GHC.Cmm.CLabel Methods pdoc :: Platform -> InfoProvEnt -> SDoc # | |
OutputableP Platform DebugBlock | |
Defined in GHC.Cmm.DebugBlock Methods pdoc :: Platform -> DebugBlock -> SDoc # | |
OutputableP Platform UnwindExpr | |
Defined in GHC.Cmm.DebugBlock Methods pdoc :: Platform -> UnwindExpr -> SDoc # | |
OutputableP Platform UnwindPoint | |
Defined in GHC.Cmm.DebugBlock Methods pdoc :: Platform -> UnwindPoint -> SDoc # | |
OutputableP Platform CmmExpr | |
OutputableP Platform CmmLit | |
OutputableP Platform ForeignTarget | |
Defined in GHC.Cmm.Node Methods pdoc :: Platform -> ForeignTarget -> SDoc # | |
OutputableP Platform DwarfFrameBlock | |
Defined in GHC.CmmToAsm.Dwarf.Types Methods pdoc :: Platform -> DwarfFrameBlock -> SDoc # | |
OutputableP Platform LiveInfo | |
OutputableP Platform CgLoc | |
OutputableP Platform CgIdInfo | |
OutputableP env Label | |
Defined in GHC.Cmm.Dataflow.Label | |
OutputableP env CLabel => OutputableP env CAFfyLabel | |
Defined in GHC.Cmm.Info.Build | |
OutputableP env CLabel => OutputableP env ModuleSRTInfo | |
Defined in GHC.Cmm.Info.Build Methods pdoc :: env -> ModuleSRTInfo -> SDoc # | |
OutputableP env CLabel => OutputableP env SRTEntry | |
Defined in GHC.Cmm.Info.Build | |
OutputableP env CLabel => OutputableP env SomeLabel | |
Defined in GHC.Cmm.Info.Build | |
OutputableP env GlobalReg | |
Defined in GHC.Cmm.Reg | |
OutputableP env Alignment | |
Defined in GHC.Types.Basic | |
OutputableP env SDoc | |
Defined in GHC.Utils.Outputable | |
OutputableP env Void | |
Defined in GHC.Utils.Outputable | |
OutputableP Platform (GenCmmStatics a) | |
OutputableP env a => OutputableP env (SCC a) | |
Defined in GHC.Utils.Outputable | |
OutputableP env a => OutputableP env (Set a) | |
Defined in GHC.Utils.Outputable | |
OutputableP env instr => OutputableP env (GenBasicBlock instr) | |
Defined in GHC.Cmm Methods pdoc :: env -> GenBasicBlock instr -> SDoc # | |
OutputableP env instr => OutputableP env (ListGraph instr) | |
OutputableP env a => OutputableP env (LabelMap a) | |
Defined in GHC.Cmm.Dataflow.Label | |
OutputableP env instr => OutputableP env (LiveInstr instr) | |
Defined in GHC.CmmToAsm.Reg.Liveness | |
Outputable a => OutputableP env (PDoc a) | |
Defined in GHC.Utils.Outputable | |
OutputableP env a => OutputableP env (Maybe a) | |
Defined in GHC.Utils.Outputable | |
OutputableP env a => OutputableP env [a] | |
Defined in GHC.Utils.Outputable | |
OutputableP Platform (CmmNode e x) | |
(OutputableP env key, OutputableP env elt) => OutputableP env (Map key elt) | |
Defined in GHC.Utils.Outputable | |
(OutputableP env a, OutputableP env b) => OutputableP env (a, b) | |
Defined in GHC.Utils.Outputable | |
(OutputableP Platform d, OutputableP Platform info, OutputableP Platform i) => OutputableP Platform (GenCmmDecl d info i) | |
OutputableP Platform (Block CmmNode C C) | |
OutputableP Platform (Block CmmNode C O) | |
OutputableP Platform (Block CmmNode O C) | |
OutputableP Platform (Block CmmNode O O) | |
OutputableP Platform (Graph CmmNode e x) | |
(OutputableP env a, OutputableP env b, OutputableP env c) => OutputableP env (a, b, c) | |
Defined in GHC.Utils.Outputable |
data SDocContext #
Constructors
SDC | |
Fields
|
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 |
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 #
quoteIfPunsEnabled :: SDoc -> SDoc #
underscore :: IsLine doc => doc #
unicodeSyntax :: SDoc -> SDoc -> SDoc #
Arguments
:: IsLine doc | |
=> doc | The interstitial punctuation |
-> doc | The final punctuation |
-> [doc] | The list that will have punctuation added between every adjacent pair of elements |
-> [doc] | Punctuated list |
Punctuate a list, e.g. with commas and dots.
sep $ punctuateFinal comma dot [text "ab", text "cd", text "ef"] ab, cd, ef.
ppWhenOption :: (SDocContext -> Bool) -> SDoc -> SDoc #
ppUnlessOption :: (SDocContext -> Bool) -> SDoc -> SDoc #
coloured :: PprColour -> SDoc -> SDoc #
Apply the given colour/style for the argument.
Only takes effect if colours are enabled.
pprModuleName :: IsLine doc => ModuleName -> doc #
isJoinPoint :: JoinPointHood -> Bool #
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 #
quotedListWithAnd :: [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
it
or they
, depeneding on the length of the list.
itOrThey [x] = text "it" itOrThey [x,y] = text "they" itOrThey [] = text "they" -- probably avoid this
thisOrThese :: [a] -> SDoc #
Determines the form of subject appropriate for the length of a list:
thisOrThese [x] = text "This" thisOrThese [x,y] = text "These" thisOrThese [] = text "These" -- probably avoid this
throwGhcException :: GhcException -> a #
throwGhcExceptionIO :: GhcException -> IO a #
Identifier Details
The IdDetails
of an Id
give stable, and necessary,
information about the Id.
Constructors
VanillaId | |
RecSelId RecSelParent FieldLabel Bool ([ConLike], [ConLike]) | The |
DataConWorkId DataCon | The |
DataConWrapId DataCon | The |
ClassOpId Class Bool | The |
Instances
Outputable IdDetails | |
Defined in GHC.Types.Id.Info |
Identifier Information
An IdInfo
gives optional information about an Id
. If
present it never lies, but it may not be present, in which case there
is always a conservative assumption which can be made.
Two Id
s may have different info even though they have the same
Unique
(and are hence the same Id
); for example, one might lack
the properties attached to the other.
Most of the IdInfo
gives information about the value, or definition, of
the Id
, independent of its usage. Exceptions to this
are demandInfo
, occInfo
, oneShotInfo
and callArityInfo
.
Performance note: when we update IdInfo
, we have to reallocate this
entire record, so it is a good idea not to let this data structure get
too big.
vanillaIdInfo :: IdInfo #
Basic IdInfo
that carries no useful information whatsoever
Class of things that we can obtain a Unique
from
Instances
Uniquable Label | |
Defined in GHC.Cmm.Dataflow.Label | |
Uniquable LocalReg | |
Defined in GHC.Cmm.Reg | |
Uniquable Reg | so we can put regs in UniqSets |
Defined in GHC.CmmToAsm.Reg.Graph.Base | |
Uniquable Store | |
Defined in GHC.CmmToAsm.Reg.Graph.SpillClean | |
Uniquable SymName | |
Defined in GHC.CmmToAsm.Wasm.Types | |
Uniquable Class | |
Defined in GHC.Core.Class | |
Uniquable CoAxiomRule | |
Defined in GHC.Core.Coercion.Axiom Methods getUnique :: CoAxiomRule -> Unique # | |
Uniquable ConLike | |
Defined in GHC.Core.ConLike | |
Uniquable DataCon | |
Defined in GHC.Core.DataCon | |
Uniquable PatSyn | |
Defined in GHC.Core.PatSyn | |
Uniquable CoercionHole | |
Defined in GHC.Core.TyCo.Rep Methods getUnique :: CoercionHole -> Unique # | |
Uniquable TyCon | |
Defined in GHC.Core.TyCon | |
Uniquable FastString | |
Defined in GHC.Types.Unique Methods getUnique :: FastString -> Unique # | |
Uniquable Ident | |
Defined in GHC.JS.Ident | |
Uniquable RealReg | |
Defined in GHC.Platform.Reg | |
Uniquable Reg | |
Defined in GHC.Platform.Reg | |
Uniquable VirtualReg | |
Defined in GHC.Platform.Reg Methods getUnique :: VirtualReg -> Unique # | |
Uniquable RegClass | |
Defined in GHC.Platform.Reg.Class | |
Uniquable EvBindsVar | |
Defined in GHC.Tc.Types.Evidence Methods getUnique :: EvBindsVar -> Unique # | |
Uniquable SkolemInfo | |
Defined in GHC.Tc.Types.Origin Methods getUnique :: SkolemInfo -> Unique # | |
Uniquable ConLikeName | |
Defined in GHC.Types.GREInfo Methods getUnique :: ConLikeName -> Unique # | |
Uniquable Name | |
Defined in GHC.Types.Name | |
Uniquable NameSpace | |
Defined in GHC.Types.Name.Occurrence | |
Uniquable Unique | |
Defined in GHC.Types.Unique | |
Uniquable Var | |
Defined in GHC.Types.Var | |
Uniquable PackageId | |
Defined in GHC.Unit.Info | |
Uniquable PackageName | |
Defined in GHC.Unit.Info Methods getUnique :: PackageName -> Unique # | |
Uniquable WarningCategory | |
Defined in GHC.Unit.Module.Warnings Methods getUnique :: WarningCategory -> Unique # | |
Uniquable Module | |
Defined in GHC.Unit.Types | |
Uniquable UnitId | |
Defined in GHC.Unit.Types | |
Uniquable ModuleName | |
Defined in GHC.Types.Unique Methods getUnique :: ModuleName -> Unique # | |
Uniquable Int | |
Defined in GHC.Types.Unique | |
Uniquable (CoAxiom br) | |
Defined in GHC.Core.Coercion.Axiom | |
Uniquable unit => Uniquable (Definite unit) | |
Defined in GHC.Unit.Types | |
IsUnitId u => Uniquable (GenUnit u) | |
Defined in GHC.Unit.Types |
nameOccName :: Name -> OccName #
nameUnique :: Name -> Unique #
data Specificity #
Whether an Invisible
argument may appear in source Haskell.
Constructors
SpecifiedSpec | the argument may appear in source Haskell, but isn't required. |
Instances
NFData Specificity | |
Defined in GHC.Types.Var Methods rnf :: Specificity -> () # | |
Binary Specificity | |
Defined in GHC.Types.Var Methods put_ :: BinHandle -> Specificity -> IO () # put :: BinHandle -> Specificity -> IO (Bin Specificity) # get :: BinHandle -> IO Specificity # | |
Data Specificity | |
Defined in GHC.Types.Var Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Specificity -> c Specificity # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Specificity # toConstr :: Specificity -> Constr # dataTypeOf :: Specificity -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Specificity) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Specificity) # gmapT :: (forall b. Data b => b -> b) -> Specificity -> Specificity # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Specificity -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Specificity -> r # gmapQ :: (forall d. Data d => d -> u) -> Specificity -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Specificity -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Specificity -> m Specificity # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Specificity -> m Specificity # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Specificity -> m Specificity # | |
Eq Specificity | |
Defined in GHC.Types.Var | |
Ord Specificity | |
Defined in GHC.Types.Var Methods compare :: Specificity -> Specificity -> Ordering # (<) :: Specificity -> Specificity -> Bool # (<=) :: Specificity -> Specificity -> Bool # (>) :: Specificity -> Specificity -> Bool # (>=) :: Specificity -> Specificity -> Bool # max :: Specificity -> Specificity -> Specificity # min :: Specificity -> Specificity -> Specificity # | |
OutputableBndrFlag Specificity p | |
Defined in GHC.Hs.Type Methods pprTyVarBndr :: HsTyVarBndr Specificity (GhcPass p) -> SDoc | |
RepTV Specificity Specificity | |
Defined in GHC.HsToCore.Quote Methods repPlainTV :: Core Name -> Specificity -> MetaM (Core (M (TyVarBndr Specificity))) repKindedTV :: Core Name -> Specificity -> Core (M Kind) -> MetaM (Core (M (TyVarBndr Specificity))) | |
ReifyFlag Specificity Specificity | |
Defined in GHC.Tc.Gen.Splice Methods reifyFlag :: Specificity -> Specificity | |
CvtFlag Specificity Specificity | |
Defined in GHC.ThToHs Methods cvtFlag :: Specificity -> Specificity | |
Outputable tv => Outputable (VarBndr tv Specificity) | |
Defined in GHC.Types.Var Methods ppr :: VarBndr tv Specificity -> SDoc # |
Constructors
Bndr var argf |
Instances
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 # | |
(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) # | |
(Eq tyvar, Eq argf) => Eq (VarBndr tyvar argf) Source # | |
The non-dependent version of ForAllTyFlag
.
See Note [FunTyFlag]
Appears here partly so that it's together with its friends ForAllTyFlag
and ForallVisFlag, but also because it is used in IfaceType, rather
early in the compilation chain
Instances
Binary FunTyFlag | |
Outputable FunTyFlag | |
Defined in GHC.Types.Var | |
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 # | |
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
Required |
Instances
NFData ForAllTyFlag | |
Defined in GHC.Types.Var Methods rnf :: ForAllTyFlag -> () # | |
Binary ForAllTyFlag | |
Defined in GHC.Types.Var Methods put_ :: BinHandle -> ForAllTyFlag -> IO () # put :: BinHandle -> ForAllTyFlag -> IO (Bin ForAllTyFlag) # get :: BinHandle -> IO ForAllTyFlag # | |
Outputable ForAllTyFlag | |
Defined in GHC.Types.Var Methods ppr :: ForAllTyFlag -> SDoc # | |
Data ForAllTyFlag | |
Defined in GHC.Types.Var Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ForAllTyFlag -> c ForAllTyFlag # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ForAllTyFlag # toConstr :: ForAllTyFlag -> Constr # dataTypeOf :: ForAllTyFlag -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ForAllTyFlag) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ForAllTyFlag) # gmapT :: (forall b. Data b => b -> b) -> ForAllTyFlag -> ForAllTyFlag # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ForAllTyFlag -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ForAllTyFlag -> r # gmapQ :: (forall d. Data d => d -> u) -> ForAllTyFlag -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ForAllTyFlag -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ForAllTyFlag -> m ForAllTyFlag # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ForAllTyFlag -> m ForAllTyFlag # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ForAllTyFlag -> m ForAllTyFlag # | |
Eq ForAllTyFlag | |
Defined in GHC.Types.Var | |
Ord ForAllTyFlag | |
Defined in GHC.Types.Var Methods compare :: ForAllTyFlag -> ForAllTyFlag -> Ordering # (<) :: ForAllTyFlag -> ForAllTyFlag -> Bool # (<=) :: ForAllTyFlag -> ForAllTyFlag -> Bool # (>) :: ForAllTyFlag -> ForAllTyFlag -> Bool # (>=) :: ForAllTyFlag -> ForAllTyFlag -> Bool # max :: ForAllTyFlag -> ForAllTyFlag -> ForAllTyFlag # min :: ForAllTyFlag -> ForAllTyFlag -> ForAllTyFlag # | |
Outputable tv => Outputable (VarBndr tv ForAllTyFlag) | |
Defined in GHC.Types.Var Methods ppr :: VarBndr tv ForAllTyFlag -> SDoc # |
The common case for the type of binders and variables when we are manipulating the Core language within GHC
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.
A global typecheckable-thing, essentially anything that has a name.
Not to be confused with a TcTyThing
, which is also a typecheckable
thing but in the *local* context. See GHC.Tc.Utils.Env for how to retrieve
a TyThing
given a Name
.
Instances
NamedThing TyThing | |
Defined in GHC.Types.TyThing | |
Outputable TyThing | |
Defined in GHC.Types.TyThing | |
PPrint TyThing Source # | |
Defined in Language.Haskell.Liquid.Types.Types |
A type of the form p
of constraint kind represents a value whose type is
the Haskell predicate p
, where a predicate is what occurs before
the =>
in a Haskell type.
We use PredType
as documentation to mark those types that we guarantee to
have this kind.
It can be expanded into its representation, but:
- The type checker must treat it as opaque
- The rest of the compiler treats it as transparent
Consider these examples:
f :: (Eq a) => a -> Int g :: (?x :: Int -> Int) => a -> Int h :: (r\l) => {r} => {l::Int | r}
Here the Eq a
and ?x :: Int -> Int
and rl
are all called "predicates"
Instances
Outputable TyLit | |
Defined in GHC.Core.TyCo.Rep | |
Data TyLit | |
Defined in GHC.Core.TyCo.Rep Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TyLit -> c TyLit # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TyLit # dataTypeOf :: TyLit -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TyLit) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TyLit) # gmapT :: (forall b. Data b => b -> b) -> TyLit -> TyLit # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TyLit -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TyLit -> r # gmapQ :: (forall d. Data d => d -> u) -> TyLit -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> TyLit -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> TyLit -> m TyLit # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TyLit -> m TyLit # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TyLit -> m TyLit # | |
Eq TyLit | |
data UnivCoProvenance #
For simplicity, we have just one UnivCo that represents a coercion from
some type to some other type, with (in general) no restrictions on the
type. The UnivCoProvenance specifies more exactly what the coercion really
is and why a program should (or shouldn't!) trust the coercion.
It is reasonable to consider each constructor of UnivCoProvenance
as a totally independent coercion form; their only commonality is
that they don't tell you what types they coercion between. (That info
is in the UnivCo
constructor of Coercion
.
Constructors
PhantomProv KindCoercion | See Note [Phantom coercions]. Only in Phantom roled coercions |
ProofIrrelProv KindCoercion | From the fact that any two coercions are considered equivalent. See Note [ProofIrrelProv]. Can be used in Nominal or Representational coercions |
Instances
Outputable UnivCoProvenance | |
Defined in GHC.Core.TyCo.Rep Methods ppr :: UnivCoProvenance -> SDoc # | |
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 # |
class Monad m => MonadUnique (m :: Type -> Type) where #
A monad for generating unique identifiers
Minimal complete definition
Instances
MonadUnique NatM | |
Defined in GHC.CmmToAsm.Monad Methods getUniqueSupplyM :: NatM UniqSupply # getUniqueM :: NatM Unique # getUniquesM :: NatM [Unique] # | |
MonadUnique LlvmM | |
Defined in GHC.CmmToLlvm.Base Methods getUniqueSupplyM :: LlvmM UniqSupply # getUniqueM :: LlvmM Unique # getUniquesM :: LlvmM [Unique] # | |
MonadUnique CoreM | |
Defined in GHC.Core.Opt.Monad Methods getUniqueSupplyM :: CoreM UniqSupply # getUniqueM :: CoreM Unique # getUniquesM :: CoreM [Unique] # | |
MonadUnique SimplM | |
Defined in GHC.Core.Opt.Simplify.Monad Methods getUniqueSupplyM :: SimplM UniqSupply # getUniqueM :: SimplM Unique # getUniquesM :: SimplM [Unique] # | |
MonadUnique NullCollapseViz | |
Defined in GHC.Data.Graph.Collapse | |
MonadUnique RM | |
Defined in GHC.Stg.InferTags.Rewrite | |
MonadUnique LiftM | |
Defined in GHC.Stg.Lift.Monad Methods getUniqueSupplyM :: LiftM UniqSupply # getUniqueM :: LiftM Unique # getUniquesM :: LiftM [Unique] # | |
MonadUnique StgM | |
Defined in GHC.Stg.Pipeline Methods getUniqueSupplyM :: StgM UniqSupply # getUniqueM :: StgM Unique # getUniquesM :: StgM [Unique] # | |
MonadUnique CmmParse | |
Defined in GHC.StgToCmm.ExtCode Methods getUniqueSupplyM :: CmmParse UniqSupply # getUniqueM :: CmmParse Unique # getUniquesM :: CmmParse [Unique] # | |
MonadUnique FCode | |
Defined in GHC.StgToCmm.Monad Methods getUniqueSupplyM :: FCode UniqSupply # getUniqueM :: FCode Unique # getUniquesM :: FCode [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] # | |
MonadUnique (WasmCodeGenM w) | |
Defined in GHC.CmmToAsm.Wasm.Types Methods getUniqueSupplyM :: WasmCodeGenM w UniqSupply # getUniqueM :: WasmCodeGenM w Unique # getUniquesM :: WasmCodeGenM w [Unique] # |
type Located = GenLocated SrcSpan #
data UnhelpfulSpanReason #
Constructors
UnhelpfulNoLocationInfo | |
UnhelpfulWiredIn | |
UnhelpfulInteractive | |
UnhelpfulGenerated | |
UnhelpfulOther !FastString |
Instances
Binary UnhelpfulSpanReason | |
Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> UnhelpfulSpanReason -> IO () # put :: BinHandle -> UnhelpfulSpanReason -> IO (Bin UnhelpfulSpanReason) # get :: BinHandle -> IO UnhelpfulSpanReason # | |
Outputable UnhelpfulSpanReason | |
Defined in GHC.Types.SrcLoc Methods ppr :: UnhelpfulSpanReason -> SDoc # | |
Show UnhelpfulSpanReason | |
Defined in GHC.Types.SrcLoc Methods showsPrec :: Int -> UnhelpfulSpanReason -> ShowS # show :: UnhelpfulSpanReason -> String # showList :: [UnhelpfulSpanReason] -> ShowS # | |
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
FromJSON SrcSpan Source # | |
Defined in Language.Haskell.Liquid.Types.Errors | |
FromJSONKey SrcSpan Source # | |
Defined in Language.Haskell.Liquid.Types.Errors Methods | |
ToJSON SrcSpan Source # | |
ToJSONKey SrcSpan Source # | |
Defined in Language.Haskell.Liquid.Types.Errors | |
NFData SrcSpan | |
Defined in GHC.Types.SrcLoc | |
HasAnnotation SrcSpan | |
Defined in GHC.Parser.Annotation Methods noAnnSrcSpan :: SrcSpan -> SrcSpan # | |
HasLoc SrcSpan | |
Defined in GHC.Parser.Annotation | |
ToJson SrcSpan | |
Defined in GHC.Types.SrcLoc | |
Outputable SrcSpan | |
Defined in GHC.Types.SrcLoc | |
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 | |
Eq SrcSpan | |
Hashable SrcSpan Source # | |
Defined in Language.Haskell.Liquid.GHC.Misc | |
PPrint SrcSpan Source # | |
Defined in Language.Haskell.Liquid.Types.Errors | |
ToHie (LHsDoc GhcRn) | |
ToHie (Context (Located Name)) | |
ToHie (Context (Located Var)) | |
ToHie (Context (Located NoExtField)) | |
Defined in GHC.Iface.Ext.Ast Methods toHie :: Context (Located NoExtField) -> HieM [HieAST Type] | |
ToHie (IEContext (Located RecFieldInfo)) | |
Defined in GHC.Iface.Ext.Ast Methods toHie :: IEContext (Located RecFieldInfo) -> HieM [HieAST Type] | |
HiePass p => ToHie (Located (PatSynBind (GhcPass p) (GhcPass p))) | |
Defined in GHC.Iface.Ext.Ast | |
ToHie (Located [LocatedAn NoEpAnns (HsDerivingClause GhcRn)]) | |
Defined in GHC.Iface.Ext.Ast | |
HasHaddock (Located (HsModule GhcPs)) | |
Defined in GHC.Parser.PostProcess.Haddock | |
HasHaddock (Located [LocatedAn NoEpAnns (HsDerivingClause GhcPs)]) | |
Defined in GHC.Parser.PostProcess.Haddock Methods addHaddock :: Located [LocatedAn NoEpAnns (HsDerivingClause GhcPs)] -> HdkA (Located [LocatedAn NoEpAnns (HsDerivingClause GhcPs)]) | |
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
FromJSON RealSrcSpan Source # | |
Defined in Language.Haskell.Liquid.Types.Errors | |
ToJSON RealSrcSpan Source # | |
Defined in Language.Haskell.Liquid.Types.Errors Methods toJSON :: RealSrcSpan -> Value # toEncoding :: RealSrcSpan -> Encoding # toJSONList :: [RealSrcSpan] -> Value # toEncodingList :: [RealSrcSpan] -> Encoding # omitField :: RealSrcSpan -> Bool # | |
ToJson RealSrcSpan | |
Defined in GHC.Types.SrcLoc Methods json :: RealSrcSpan -> JsonDoc # | |
Outputable RealSrcSpan | |
Defined in GHC.Types.SrcLoc Methods ppr :: RealSrcSpan -> SDoc # | |
Data RealSrcSpan | |
Defined in GHC.Types.SrcLoc Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> RealSrcSpan -> c RealSrcSpan # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c RealSrcSpan # toConstr :: RealSrcSpan -> Constr # dataTypeOf :: RealSrcSpan -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c RealSrcSpan) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c RealSrcSpan) # gmapT :: (forall b. Data b => b -> b) -> RealSrcSpan -> RealSrcSpan # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> RealSrcSpan -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> RealSrcSpan -> r # gmapQ :: (forall d. Data d => d -> u) -> RealSrcSpan -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> RealSrcSpan -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> RealSrcSpan -> m RealSrcSpan # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> RealSrcSpan -> m RealSrcSpan # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> RealSrcSpan -> m RealSrcSpan # | |
Show RealSrcSpan | |
Defined in GHC.Types.SrcLoc Methods showsPrec :: Int -> RealSrcSpan -> ShowS # show :: RealSrcSpan -> String # showList :: [RealSrcSpan] -> ShowS # | |
Eq RealSrcSpan | |
Defined in GHC.Types.SrcLoc | |
Ord RealSrcSpan | |
Defined in GHC.Types.SrcLoc Methods compare :: RealSrcSpan -> RealSrcSpan -> Ordering # (<) :: RealSrcSpan -> RealSrcSpan -> Bool # (<=) :: RealSrcSpan -> RealSrcSpan -> Bool # (>) :: RealSrcSpan -> RealSrcSpan -> Bool # (>=) :: RealSrcSpan -> RealSrcSpan -> Bool # max :: RealSrcSpan -> RealSrcSpan -> RealSrcSpan # min :: RealSrcSpan -> RealSrcSpan -> RealSrcSpan # | |
Outputable e => Outputable (GenLocated RealSrcSpan e) | |
Defined in GHC.Types.SrcLoc Methods ppr :: GenLocated RealSrcSpan e -> SDoc # |
data RealSrcLoc #
Real Source Location
Represents a single point within a file
Instances
Outputable RealSrcLoc | |
Defined in GHC.Types.SrcLoc Methods ppr :: RealSrcLoc -> SDoc # | |
Show RealSrcLoc | |
Defined in GHC.Types.SrcLoc Methods showsPrec :: Int -> RealSrcLoc -> ShowS # show :: RealSrcLoc -> String # showList :: [RealSrcLoc] -> ShowS # | |
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 # |
mkRealSrcLoc :: FastString -> Int -> Int -> RealSrcLoc #
srcLocLine :: RealSrcLoc -> Int #
Raises an error when used on a "bad" SrcLoc
srcLocCol :: RealSrcLoc -> Int #
Raises an error when used on a "bad" SrcLoc
mkGeneralSrcSpan :: FastString -> SrcSpan #
Create a "bad" SrcSpan
that has not location information
mkRealSrcSpan :: RealSrcLoc -> RealSrcLoc -> RealSrcSpan #
Create a SrcSpan
between two points in a file
combineSrcSpans :: SrcSpan -> SrcSpan -> SrcSpan #
Combines two SrcSpan
into one that spans at least all the characters
within both spans. Returns UnhelpfulSpan if the files differ.
isGoodSrcSpan :: SrcSpan -> Bool #
Test if a SrcSpan
is "good", i.e. has precise location information
srcSpanStartLine :: RealSrcSpan -> Int #
srcSpanEndLine :: RealSrcSpan -> Int #
srcSpanStartCol :: RealSrcSpan -> Int #
srcSpanEndCol :: RealSrcSpan -> Int #
srcSpanFileName_maybe :: SrcSpan -> Maybe FastString #
Obtains the filename for a SrcSpan
if it is "good"
unLoc :: GenLocated l e -> e #
withBinBuffer :: BinHandle -> (ByteString -> IO a) -> IO a #
Get access to the underlying buffer.
openBinMem :: Int -> IO BinHandle #
data SourceText #
Constructors
SourceText FastString | |
NoSourceText | For when code is generated, e.g. TH, deriving. The pretty printer will then make its own representation of the item. |
Instances
NFData SourceText | |
Defined in GHC.Types.SourceText Methods rnf :: SourceText -> () # | |
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 # | |
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 # | |
Eq SourceText | |
Defined in GHC.Types.SourceText | |
type Anno (SourceText, RuleName) | |
Defined in GHC.Hs.Decls |
mkIntegralLit :: Integral a => a -> IntegralLit #
data FieldLabel #
Fields in an algebraic record type; see Note [FieldLabel].
Instances
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 # | |
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 # | |
Eq FieldLabel | |
Defined in GHC.Types.FieldLabel |
Instances
Functor Bag | |
Foldable Bag | |
Defined in GHC.Data.Bag Methods fold :: Monoid m => Bag m -> m # foldMap :: Monoid m => (a -> m) -> Bag a -> m # foldMap' :: Monoid m => (a -> m) -> Bag a -> m # foldr :: (a -> b -> b) -> b -> Bag a -> b # foldr' :: (a -> b -> b) -> b -> Bag a -> b # foldl :: (b -> a -> b) -> b -> Bag a -> b # foldl' :: (b -> a -> b) -> b -> Bag a -> b # foldr1 :: (a -> a -> a) -> Bag a -> a # foldl1 :: (a -> a -> a) -> Bag a -> a # elem :: Eq a => a -> Bag a -> Bool # maximum :: Ord a => Bag a -> a # | |
Traversable Bag | |
NFData a => NFData (Bag a) | |
Defined in GHC.Data.Bag | |
ToHie a => ToHie (Bag a) | |
Defined in GHC.Iface.Ext.Ast | |
Outputable a => Outputable (Bag a) | |
Defined in GHC.Data.Bag | |
Monoid (Bag a) | |
Semigroup (Bag a) | |
Data a => Data (Bag a) | |
Defined in GHC.Data.Bag Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Bag a -> c (Bag a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Bag a) # dataTypeOf :: Bag a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Bag a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Bag a)) # gmapT :: (forall b. Data b => b -> b) -> Bag a -> Bag a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Bag a -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Bag a -> r # gmapQ :: (forall d. Data d => d -> u) -> Bag a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Bag a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Bag a -> m (Bag a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Bag a -> m (Bag a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Bag a -> m (Bag a) # | |
IsList (Bag a) | |
type Item (Bag a) | |
Defined in GHC.Data.Bag |
data FixityDirection #
Instances
Binary FixityDirection | |
Defined in GHC.Types.Fixity Methods put_ :: BinHandle -> FixityDirection -> IO () # put :: BinHandle -> FixityDirection -> IO (Bin FixityDirection) # get :: BinHandle -> IO FixityDirection # | |
Outputable FixityDirection | |
Defined in GHC.Types.Fixity Methods ppr :: FixityDirection -> SDoc # | |
Data FixityDirection | |
Defined in GHC.Types.Fixity Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FixityDirection -> c FixityDirection # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c FixityDirection # toConstr :: FixityDirection -> Constr # dataTypeOf :: FixityDirection -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c FixityDirection) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c FixityDirection) # gmapT :: (forall b. Data b => b -> b) -> FixityDirection -> FixityDirection # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FixityDirection -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FixityDirection -> r # gmapQ :: (forall d. Data d => d -> u) -> FixityDirection -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> FixityDirection -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> FixityDirection -> m FixityDirection # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> FixityDirection -> m FixityDirection # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> FixityDirection -> m FixityDirection # | |
Eq FixityDirection | |
Defined in GHC.Types.Fixity Methods (==) :: FixityDirection -> FixityDirection -> Bool # (/=) :: FixityDirection -> FixityDirection -> Bool # |
data GeneralFlag #
Enumerates the simple on-or-off dynamic flags
Constructors
Opt_DumpToFile | Append dump output to files instead of stdout. |
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 | Enable floating out of let-bindings in the simplifier |
Opt_LocalFloatOutTopLevel | Enable floating out of let-bindings at the top level in the simplifier N.B. See Note [RHS Floating] |
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_SpecialiseIncoherents | |
Opt_DoLambdaEtaExpansion | |
Opt_DoCleverArgEtaExpansion | |
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_LlvmFillUndefWithGarbage | |
Opt_IrrefutableTuples | |
Opt_CmmSink | |
Opt_CmmStaticPred | |
Opt_CmmElimCommonBlocks | |
Opt_CmmControlFlow | |
Opt_AsmShortcutting | |
Opt_OmitYields | |
Opt_FunToThunk | |
Opt_DictsStrict | |
Opt_DmdTxDictSel | deprecated, no effect and behaviour is now default. Allowed switching of a special demand transformer for dictionary selectors |
Opt_Loopification | |
Opt_CfgBlocklayout | Use the cfg based block layout algorithm. |
Opt_WeightlessBlocklayout | Layout based on last instruction per block. |
Opt_CprAnal | |
Opt_WorkerWrapper | |
Opt_WorkerWrapperUnlift | Do W/W split for unlifting even if we won't unbox anything. |
Opt_SolveConstantDicts | |
Opt_AlignmentSanitisation | |
Opt_CatchNonexhaustiveCases | |
Opt_NumConstantFolding | |
Opt_CoreConstantFolding | |
Opt_FastPAPCalls | |
Opt_DoTagInferenceChecks | |
Opt_SimplPreInlining | |
Opt_IgnoreInterfacePragmas | |
Opt_OmitInterfacePragmas | |
Opt_ExposeAllUnfoldings | |
Opt_KeepAutoRules | Keep auto-generated rules even if they seem to have become useless |
Opt_WriteInterface | |
Opt_WriteHie | |
Opt_DisableJsMinifier | render JavaScript pretty-printed instead of minified (compacted) |
Opt_DisableJsCsources | don't link C sources (compiled to JS) with Haskell code (compiled to JS) |
Opt_AutoSccsOnIndividualCafs | |
Opt_ProfCountEntries | |
Opt_ProfLateInlineCcs | |
Opt_ProfLateCcs | |
Opt_ProfLateOverloadedCcs | |
Opt_ProfLateoverloadedCallsCCs | |
Opt_ProfManualCcs | Ignore manual SCC annotations |
Opt_Pp | |
Opt_ForceRecomp | |
Opt_IgnoreOptimChanges | |
Opt_IgnoreHpcChanges | |
Opt_ExcessPrecision | |
Opt_EagerBlackHoling | |
Opt_OrigThunkInfo | |
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_InsertBreakpoints | |
Opt_GhciHistory | |
Opt_GhciLeakCheck | |
Opt_ValidateHie | |
Opt_LocalGhciHistory | |
Opt_NoIt | |
Opt_HelpfulErrors | |
Opt_DeferTypeErrors | |
Opt_DeferTypedHoles | |
Opt_DeferOutOfScopeVariables | |
Opt_PIC | -fPIC |
Opt_PIE | -fPIE |
Opt_PICExecutable | -pie |
Opt_ExternalDynamicRefs | |
Opt_Ticky | |
Opt_Ticky_Allocd | |
Opt_Ticky_LNE | |
Opt_Ticky_Dyn_Thunk | |
Opt_Ticky_Tag | |
Opt_Ticky_AP | Use regular thunks even when we could use std ap thunks in order to get entry counts |
Opt_CmmThreadSanitizer | |
Opt_RPath | |
Opt_RelativeDynlibPaths | |
Opt_CompactUnwind | -fcompact-unwind |
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_UnoptimizedCoreForInterpreter | |
Opt_LinkRts | |
Opt_ErrorSpans | |
Opt_DeferDiagnostics | |
Opt_DiagnosticsAsJSON | Dump diagnostics as JSON |
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 | Suppress timestamps in dumps |
Opt_SuppressCoreSizes | Suppress per binding Core size stats in dumps |
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 |
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 |
data GenWithIsBoot mod #
This data type just pairs a value mod
with an IsBootInterface flag. In
practice, mod
is usually a Module
or ModuleName
'.
Instances
Functor GenWithIsBoot | |
Defined in GHC.Unit.Types Methods fmap :: (a -> b) -> GenWithIsBoot a -> GenWithIsBoot b # (<$) :: a -> GenWithIsBoot b -> GenWithIsBoot a # | |
Foldable GenWithIsBoot | |
Defined in GHC.Unit.Types Methods fold :: Monoid m => GenWithIsBoot m -> m # foldMap :: Monoid m => (a -> m) -> GenWithIsBoot a -> m # foldMap' :: Monoid m => (a -> m) -> GenWithIsBoot a -> m # foldr :: (a -> b -> b) -> b -> GenWithIsBoot a -> b # foldr' :: (a -> b -> b) -> b -> GenWithIsBoot a -> b # foldl :: (b -> a -> b) -> b -> GenWithIsBoot a -> b # foldl' :: (b -> a -> b) -> b -> GenWithIsBoot a -> b # foldr1 :: (a -> a -> a) -> GenWithIsBoot a -> a # foldl1 :: (a -> a -> a) -> GenWithIsBoot a -> a # toList :: GenWithIsBoot a -> [a] # null :: GenWithIsBoot a -> Bool # length :: GenWithIsBoot a -> Int # elem :: Eq a => a -> GenWithIsBoot a -> Bool # maximum :: Ord a => GenWithIsBoot a -> a # minimum :: Ord a => GenWithIsBoot a -> a # sum :: Num a => GenWithIsBoot a -> a # product :: Num a => GenWithIsBoot a -> a # | |
Traversable GenWithIsBoot | |
Defined in GHC.Unit.Types Methods traverse :: Applicative f => (a -> f b) -> GenWithIsBoot a -> f (GenWithIsBoot b) # sequenceA :: Applicative f => GenWithIsBoot (f a) -> f (GenWithIsBoot a) # mapM :: Monad m => (a -> m b) -> GenWithIsBoot a -> m (GenWithIsBoot b) # sequence :: Monad m => GenWithIsBoot (m a) -> m (GenWithIsBoot a) # | |
Binary a => Binary (GenWithIsBoot a) | |
Defined in GHC.Unit.Types Methods put_ :: BinHandle -> GenWithIsBoot a -> IO () # put :: BinHandle -> GenWithIsBoot a -> IO (Bin (GenWithIsBoot a)) # get :: BinHandle -> IO (GenWithIsBoot a) # | |
Outputable a => Outputable (GenWithIsBoot a) | |
Defined in GHC.Unit.Types Methods ppr :: GenWithIsBoot a -> SDoc # | |
Show mod => Show (GenWithIsBoot mod) | |
Defined in GHC.Unit.Types Methods showsPrec :: Int -> GenWithIsBoot mod -> ShowS # show :: GenWithIsBoot mod -> String # showList :: [GenWithIsBoot mod] -> ShowS # | |
Eq mod => Eq (GenWithIsBoot mod) | |
Defined in GHC.Unit.Types Methods (==) :: GenWithIsBoot mod -> GenWithIsBoot mod -> Bool # (/=) :: GenWithIsBoot mod -> GenWithIsBoot mod -> Bool # | |
Ord mod => Ord (GenWithIsBoot mod) | |
Defined in GHC.Unit.Types Methods compare :: GenWithIsBoot mod -> GenWithIsBoot mod -> Ordering # (<) :: GenWithIsBoot mod -> GenWithIsBoot mod -> Bool # (<=) :: GenWithIsBoot mod -> GenWithIsBoot mod -> Bool # (>) :: GenWithIsBoot mod -> GenWithIsBoot mod -> Bool # (>=) :: GenWithIsBoot mod -> GenWithIsBoot mod -> Bool # max :: GenWithIsBoot mod -> GenWithIsBoot mod -> GenWithIsBoot mod # min :: GenWithIsBoot mod -> GenWithIsBoot mod -> GenWithIsBoot mod # |
moduleUnitId :: Module -> UnitId #
fsToUnit :: FastString -> Unit #
Create a new simple unit identifier from a FastString
. Internally,
this is primarily used to specify wired-in unit identifiers.
unitString :: IsUnitId u => u -> String #
Return the UnitId of the Unit. For on-the-fly instantiated units, return the UnitId of the indefinite unit this unit is an instance of.
unitIdString :: UnitId -> String #
data ModLocation #
Module Location
Where a module lives on the file system: the actual locations of the .hs, .hi, .dyn_hi, .o, .dyn_o and .hie files, if we have them.
For a module in another unit, the ml_hs_file and ml_obj_file components of ModLocation are undefined.
The locations specified by a ModLocation may or may not correspond to actual files yet: for example, even if the object file doesn't exist, the ModLocation still contains the path to where the object file will reside if/when it is created.
The paths of anything which can affect recompilation should be placed inside ModLocation.
When a ModLocation is created none of the filepaths will have -boot suffixes. This is because in --make mode the ModLocation is put in the finder cache which is indexed by ModuleName, when a ModLocation is retrieved from the FinderCache the boot suffixes are appended. The other case is in -c mode, there the ModLocation immediately gets given the boot suffixes in mkOneShotModLocation.
Instances
Outputable ModLocation | |
Defined in GHC.Unit.Module.Location Methods ppr :: ModLocation -> SDoc # | |
Show ModLocation | |
Defined in GHC.Unit.Module.Location Methods showsPrec :: Int -> ModLocation -> ShowS # show :: ModLocation -> String # showList :: [ModLocation] -> ShowS # |
lookupModuleEnv :: ModuleEnv a -> Module -> Maybe a #
moduleEnvKeys :: ModuleEnv a -> [Module] #
moduleStableString :: Module -> String #
Get a string representation of a Module
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.
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 |
Instances
Outputable PkgQual | |
Defined in GHC.Types.PkgQual | |
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 # | |
Eq PkgQual | |
Ord PkgQual | |
Arguments
= XRec p (HsExpr p) | May have |
Located Haskell Expression
data PromotionFlag #
Is a TyCon a promoted data constructor or just a normal type constructor?
Constructors
NotPromoted |
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 InlinePragma #
Instances
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 # | |
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 # | |
Eq InlinePragma | |
Defined in GHC.Types.Basic |
Untyped Phase description
Constructors
StopLn |
Instances
Outputable Phase | |
Defined in GHC.Driver.Phases | |
Show Phase | |
Eq Phase | |
data DefMethSpec ty #
Default Method Specification
Constructors
VanillaDM |
Instances
Binary (DefMethSpec IfaceType) | |
Defined in GHC.Iface.Type | |
Outputable (DefMethSpec ty) | |
Defined in GHC.Types.Basic Methods ppr :: DefMethSpec ty -> SDoc # |
Constructors
BoxedTuple |
Instances
Binary TupleSort | |
Outputable TupleSort | |
Defined in GHC.Types.Basic | |
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 # | |
Eq TupleSort | |
data TopLevelFlag #
Constructors
NotTopLevel |
Instances
Outputable TopLevelFlag | |
Defined in GHC.Types.Basic Methods ppr :: TopLevelFlag -> SDoc # | |
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 # |
isStrongLoopBreaker :: OccInfo -> Bool #
isNoInlinePragma :: InlinePragma -> Bool #
A data constructor
Instances
NamedThing DataCon | |
Defined in GHC.Core.DataCon | |
Uniquable DataCon | |
Defined in GHC.Core.DataCon | |
Outputable DataCon | |
Defined in GHC.Core.DataCon | |
Outputable OccurrenceMap Source # | |
Defined in Language.Haskell.Liquid.GHC.Play Methods ppr :: OccurrenceMap -> SDoc # | |
OutputableBndr DataCon | |
Defined in GHC.Core.DataCon Methods pprBndr :: BindingSite -> DataCon -> SDoc # pprPrefixOcc :: DataCon -> SDoc # pprInfixOcc :: DataCon -> SDoc # | |
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 # | |
Show DataCon Source # | |
Eq DataCon | |
Ord DataCon Source # | |
Defined in Language.Haskell.Liquid.Types.Types | |
Hashable DataCon Source # | |
Defined in Language.Haskell.Liquid.GHC.Misc | |
Symbolic DataCon Source # | |
Defined in Language.Haskell.Liquid.Types.Types | |
PPrint DataCon Source # | |
Defined in Language.Haskell.Liquid.Types.DataDecl |
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
)
dataConFullSig :: DataCon -> ([TyVar], [TyCoVar], [EqSpec], ThetaType, [Scaled Type], Type) #
The "full signature" of the DataCon
returns, in order:
1) The result of dataConUnivTyVars
2) The result of dataConExTyCoVars
3) The non-dependent GADT equalities. Dependent GADT equalities are implied by coercion variables in return value (2).
4) The other constraints of the data constructor type, excluding GADT equalities
5) The original argument types to the DataCon
(i.e. before
any change of the representation of the type) with linearity
annotations
6) The original result type of the DataCon
dataConFieldLabels :: DataCon -> [FieldLabel] #
The labels for the fields of this particular DataCon
dataConExTyCoVars :: DataCon -> [TyCoVar] #
The existentially-quantified type/coercion variables of the constructor including dependent (kind-) GADT equalities
dataConTyCon :: DataCon -> TyCon #
The type constructor that we are building via this data constructor
dataConWorkId :: DataCon -> Id #
tupleTyCon :: Boxity -> Arity -> TyCon #
tupleDataCon :: Boxity -> Arity -> DataCon #
tupleTyConName :: TupleSort -> Arity -> Name #
liftedTypeKind :: Type #
typeSymbolKind :: Kind #
Instances
NFData NameSpace | |
Defined in GHC.Types.Name.Occurrence | |
Uniquable NameSpace | |
Defined in GHC.Types.Name.Occurrence | |
Binary NameSpace | |
Eq NameSpace | |
Ord NameSpace | |
isFieldNameSpace :: NameSpace -> Bool #
mkTyVarOcc :: String -> OccName #
occNameString :: OccName -> String #
nameNameSpace :: Name -> NameSpace #
nameSrcLoc :: Name -> SrcLoc #
nameSrcSpan :: Name -> SrcSpan #
isTupleTyConName :: Name -> Bool #
isExternalName :: Name -> Bool #
isInternalName :: Name -> Bool #
nameModule :: HasDebugCallStack => Name -> Module #
nameModule_maybe :: Name -> Maybe Module #
isSystemName :: Name -> Bool #
mkSystemName :: Unique -> OccName -> Name #
Create a name brought into being by the compiler
stableNameCmp :: Name -> Name -> Ordering #
Compare Names lexicographically This only works for Names that originate in the source code or have been tidied.
nameStableString :: Name -> String #
Get a string representation of a Name
that's unique and stable
across recompilations. Used for deterministic generation of binds for
derived instances.
eg. "$aeson_70dylHtv1FFGeai1IoxcQr$Data.Aeson.Types.Internal$String"
getSrcSpan :: NamedThing a => a -> SrcSpan #
getOccString :: NamedThing a => a -> String #
elemNameSet :: Name -> 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
lookupNameEnv :: NameEnv a -> Name -> Maybe a #
mkNameEnvWith :: (a -> Name) -> [a] -> NameEnv a #
type TyVarBinder = VarBndr TyVar ForAllTyFlag #
setVarUnique :: Var -> Unique -> Var #
setVarName :: Var -> Name -> Var #
setVarType :: Var -> Type -> Var #
idInfo :: HasDebugCallStack => Id -> IdInfo #
Is this a value-level (i.e., computationally relevant) Id
entifier?
Satisfies isId = not . isTyVar
.
Is this a coercion variable?
Satisfies
.isId
v ==> isCoVar
v == not (isNonCoVarId
v)
tyConAppTyCon_maybe :: Type -> Maybe TyCon #
The same as fst . splitTyConApp
We can short-cut the FunTy case
splitTyConApp_maybe :: HasDebugCallStack => Type -> Maybe (TyCon, [Type]) #
Attempts to tease a type apart into a type constructor and the application of a number of arguments to that constructor
mkTyConApp :: TyCon -> [Type] -> Type #
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.
emptyVarSet :: VarSet #
unitVarSet :: Var -> VarSet #
extendVarSet :: VarSet -> Var -> VarSet #
extendVarSetList :: VarSet -> [Var] -> VarSet #
elemVarSet :: Var -> VarSet -> Bool #
tyCoVarsOfType :: Type -> TyCoVarSet #
mkRnEnv2 :: InScopeSet -> RnEnv2 #
noAnnSrcSpan :: HasAnnotation e => SrcSpan -> e #
type LocatedN = GenLocated SrcSpanAnnN #
noLocA :: HasAnnotation e => a -> GenLocated e a #
getLocA :: HasLoc a => GenLocated a e -> SrcSpan #
Information about a Name
that is pertinent to the renamer.
See Note [GREInfo]
Instances
NFData GREInfo | |
Defined in GHC.Types.GREInfo | |
Outputable GREInfo | |
Defined in GHC.Types.GREInfo | |
Data GREInfo | |
Defined in GHC.Types.GREInfo Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GREInfo -> c GREInfo # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c GREInfo # toConstr :: GREInfo -> Constr # dataTypeOf :: GREInfo -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c GREInfo) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c GREInfo) # gmapT :: (forall b. Data b => b -> b) -> GREInfo -> GREInfo # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GREInfo -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GREInfo -> r # gmapQ :: (forall d. Data d => d -> u) -> GREInfo -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> GREInfo -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> GREInfo -> m GREInfo # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GREInfo -> m GREInfo # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GREInfo -> m GREInfo # |
Records what things are "available", i.e. in scope
Constructors
Avail Name | An ordinary identifier in scope, or a field label without a parent type (see Note [Representing pattern synonym fields in AvailInfo]). |
AvailTC | A type or class in scope The AvailTC Invariant: If the type or class is itself to be in scope, it must be first in this list. Thus, typically: AvailTC Eq [Eq, ==, \/=] |
Instances
NFData AvailInfo | |
Defined in GHC.Types.Avail | |
Binary AvailInfo | |
Outputable AvailInfo | |
Defined in GHC.Types.Avail | |
Data AvailInfo | |
Defined in GHC.Types.Avail Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AvailInfo -> c AvailInfo # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AvailInfo # toConstr :: AvailInfo -> Constr # dataTypeOf :: AvailInfo -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c AvailInfo) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AvailInfo) # gmapT :: (forall b. Data b => b -> b) -> AvailInfo -> AvailInfo # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AvailInfo -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AvailInfo -> r # gmapQ :: (forall d. Data d => d -> u) -> AvailInfo -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> AvailInfo -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> AvailInfo -> m AvailInfo # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AvailInfo -> m AvailInfo # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AvailInfo -> m AvailInfo # |
availsToNameSet :: [AvailInfo] -> NameSet #
availNames :: AvailInfo -> [Name] #
Names and fields made available by the availability information.
data ImpItemSpec #
Import Item Specification
Describes import info a particular Name
Constructors
ImpAll | The import had no import list, or had a hiding list |
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 |
How should we look up in a GlobalRdrEnv
?
Which NameSpace
s are considered relevant for a given lookup?
Constructors
SameNameSpace :: forall info. WhichGREs info | Only consider |
RelevantGREs | Allow |
Fields
|
Instances
Outputable (WhichGREs info) | |
Defined in GHC.Types.Name.Reader |
What should we look up in a GlobalRdrEnv
? Should we only look up
names with the exact same OccName
, or do we allow different NameSpace
s?
Depending on the answer, we might need more or less information from the
GlobalRdrEnv
, e.g. if we want to include matching record fields we need
to know if the corresponding record fields define field selectors, for which
we need to consult the GREInfo
. This is why this datatype is a GADT.
See Note [IfGlobalRdrEnv].
Constructors
LookupRdrName | Look up the |
data FieldsOrSelectors #
When looking up GREs, we may or may not want to include fields that were
defined in modules with NoFieldSelectors
enabled. See Note
[NoFieldSelectors].
Constructors
WantNormal | Include normal names, and fields with selectors, but ignore fields without selectors. |
Instances
Show FieldsOrSelectors | |
Defined in GHC.Types.Name.Reader Methods showsPrec :: Int -> FieldsOrSelectors -> ShowS # show :: FieldsOrSelectors -> String # showList :: [FieldsOrSelectors] -> ShowS # | |
Eq FieldsOrSelectors | |
Defined in GHC.Types.Name.Reader Methods (==) :: FieldsOrSelectors -> FieldsOrSelectors -> Bool # (/=) :: FieldsOrSelectors -> FieldsOrSelectors -> Bool # |
type GlobalRdrEnv = GlobalRdrEnvX GREInfo #
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
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 #
greName :: GlobalRdrEltX info -> Name #
globalRdrEnvElts :: GlobalRdrEnvX info -> [GlobalRdrEltX info] #
lookupGRE :: GlobalRdrEnvX info -> LookupGRE info -> [GlobalRdrEltX info] #
lookupGRE_Name :: Outputable info => GlobalRdrEnvX info -> Name -> Maybe (GlobalRdrEltX info) #
isLocalGRE :: GlobalRdrEltX info -> Bool #
Is this GlobalRdrElt
defined locally?
ideclAs :: ImportDecl pass -> Maybe (XRec pass ModuleName) #
as Module
ideclName :: ImportDecl pass -> XRec pass ModuleName #
Module name.
type LImportDecl pass #
Arguments
= XRec pass (ImportDecl pass) | When in a list this may have |
Located Import Declaration
data ImportedModsVal #
type ImportedMods = ModuleEnv [ImportedBy] #
Records the modules directly imported by a module for extracting e.g. usage information, and also to give better error message
importedByUser :: [ImportedBy] -> [ImportedModsVal] #
varQual_RDR :: Module -> FastString -> RdrName #
eqClassName :: Name #
ordClassName :: Name #
negateName :: Name #
eqClassKey :: Unique #
ordClassKey :: Unique #
numericClassKeys :: [Unique] #
fractionalClassKeys :: [Unique] #
An annotation target
Constructors
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 |
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.
The Hsc monad: Passing an environment and diagnostic state
Instances
MonadIO Hsc | |
Defined in GHC.Driver.Env.Types | |
HasDynFlags Hsc | |
Defined in GHC.Driver.Env.Types Methods getDynFlags :: Hsc DynFlags # | |
HasLogger Hsc | |
Defined in GHC.Driver.Env.Types | |
Applicative Hsc | |
Functor Hsc | |
Monad Hsc | |
coAxiomTyCon :: forall (br :: BranchFlag). CoAxiom br -> TyCon #
coercionKind :: Coercion -> Pair Type #
If it is the case that
c :: (t1 ~ t2)
i.e. the kind of c
relates t1
and t2
, then coercionKind c = Pair t1 t2
.
Instances
NFData Class Source # | |
Defined in Language.Haskell.Liquid.GHC.Misc | |
NamedThing Class | |
Defined in GHC.Core.Class | |
Uniquable Class | |
Defined in GHC.Core.Class | |
Outputable Class | |
Defined in GHC.Core.Class | |
Data Class | |
Defined in GHC.Core.Class Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Class -> c Class # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Class # dataTypeOf :: Class -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Class) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Class) # gmapT :: (forall b. Data b => b -> b) -> Class -> Class # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Class -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Class -> r # gmapQ :: (forall d. Data d => d -> u) -> Class -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Class -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Class -> m Class # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Class -> m Class # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Class -> m Class # | |
Show Class Source # | |
Eq Class | |
Hashable Class Source # | |
Defined in Language.Haskell.Liquid.GHC.Misc | |
Symbolic Class Source # | |
Defined in Language.Haskell.Liquid.GHC.Misc | |
Fixpoint Class Source # | |
PPrint Class Source # | |
Defined in Language.Haskell.Liquid.Types.PrettyPrint |
classAllSelIds :: Class -> [Id] #
classSCSelIds :: Class -> [Id] #
classMethods :: Class -> [Id] #
classOpItems :: Class -> [ClassOpItem] #
classSCTheta :: Class -> [PredType] #
classBigSig :: Class -> ([TyVar], [PredType], [Id], [ClassOpItem]) #
data TyConBndrVis #
Constructors
AnonTCB | an ordinary, visible type argument |
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 # | |
ReifyFlag TyConBndrVis (Maybe BndrVis) | |
Defined in GHC.Tc.Gen.Splice Methods reifyFlag :: TyConBndrVis -> Maybe BndrVis | |
OutputableBndr tv => Outputable (VarBndr tv TyConBndrVis) | |
Defined in GHC.Core.TyCon Methods ppr :: VarBndr tv TyConBndrVis -> SDoc # |
type TyConBinder = VarBndr TyVar TyConBndrVis #
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.
isPrimTyCon :: TyCon -> Bool #
Does this TyCon
represent something that cannot be defined in Haskell?
isAlgTyCon :: TyCon -> Bool #
Returns True
if the supplied TyCon
resulted from either a
data
or newtype
declaration
isVanillaAlgTyCon :: TyCon -> Bool #
Returns True
for vanilla AlgTyCons -- that is, those created
with a data
or newtype
declaration.
isNewTyCon :: TyCon -> Bool #
Is this TyCon
that for a newtype
isTypeSynonymTyCon :: TyCon -> Bool #
Is this a TyCon
representing a regular H98 type synonym (type
)?
isGadtSyntaxTyCon :: TyCon -> Bool #
Is this an algebraic TyCon
declared with the GADT syntax?
isFamilyTyCon :: TyCon -> Bool #
Is this a TyCon
, synonym or otherwise, that defines a family?
isBoxedTupleTyCon :: TyCon -> Bool #
Is this the TyCon
for a boxed tuple?
isPromotedDataCon :: TyCon -> Bool #
Is this a PromotedDataCon?
tyConDataCons :: TyCon -> [DataCon] #
As tyConDataCons_maybe
, but returns the empty list of constructors if no
constructors could be found
tyConDataCons_maybe :: TyCon -> Maybe [DataCon] #
newTyConRhs :: TyCon -> ([TyVar], Type) #
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.
synTyConDefn_maybe :: TyCon -> Maybe ([TyVar], Type) #
Extract the TyVar
s bound by a vanilla type synonym
and the corresponding (unsubstituted) right hand side.
synTyConRhs_maybe :: TyCon -> Maybe Type #
Extract the information pertaining to the right hand side of a type synonym
(type
) declaration.
isClassTyCon :: TyCon -> Bool #
Is this TyCon
that for a class instance?
tyConClass_maybe :: TyCon -> Maybe Class #
If this TyCon
is that for a class instance, return the class it is for.
Otherwise returns Nothing
isFamInstTyCon :: TyCon -> Bool #
Is this TyCon
that for a data family instance?
tyConFamInst_maybe :: TyCon -> Maybe (TyCon, [Type]) #
If this TyCon
is that of a data family instance, return the family in question
and the instance types. Otherwise, return Nothing
mkTyVarTys :: [TyVar] -> [Type] #
mkForAllTys :: [ForAllTyBinder] -> Type -> Type #
Wraps foralls over the type using the provided TyCoVar
s from left to right
primTyCons :: [TyCon] #
isArrowTyCon :: TyCon -> Bool #
eqPrimTyCon :: TyCon #
tyCoVarsOfCo :: Coercion -> TyCoVarSet #
emptySubst :: Subst #
extendSubstInScopeSet :: Subst -> VarSet -> Subst #
Add the Var
s to the in-scope set: see also extendInScope
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!
mkTvSubstPrs :: [(TyVar, Type)] -> Subst #
Generates the in-scope set for the TCvSubst
from the types in the
incoming environment. No CoVars, please! The InScopeSet is just a thunk
so with a bit of luck it'll never be evaluated
substTyWith :: HasDebugCallStack => [TyVar] -> [Type] -> Type -> Type #
Type substitution, see zipTvSubst
substTy :: HasDebugCallStack => Subst -> Type -> Type #
Substitute within a Type
The substitution has to satisfy the invariants described in
Note [The substitution invariant].
substCo :: HasDebugCallStack => Subst -> Coercion -> Coercion #
Substitute within a Coercion
The substitution has to satisfy the invariants described in
Note [The substitution invariant].
splitAppTys :: HasDebugCallStack => Type -> (Type, [Type]) #
Recursively splits a type as far as is possible, leaving a residual type being applied to and the type arguments applied to it. Never fails, even if that means returning an empty list of type applications.
splitFunTy_maybe :: Type -> Maybe (FunTyFlag, Mult, Type, Type) #
Attempts to extract the multiplicity, argument and result types from a type
piResultTys :: HasDebugCallStack => Type -> [Type] -> Type #
(piResultTys f_ty [ty1, .., tyn]) gives the type of (f ty1 .. tyn)
where f :: f_ty
piResultTys
is interesting because:
1. f_ty
may have more for-alls than there are args
2. Less obviously, it may have fewer for-alls
For case 2. think of:
piResultTys (forall a.a) [forall b.b, Int]
This really can happen, but only (I think) in situations involving
undefined. For example:
undefined :: forall a. a
Term: undefined (forall b. b->b)
Int
This term should have type (Int -> Int), but notice that
there are more type args than foralls in undefined
s type.
tyConAppArgs_maybe :: Type -> Maybe [Type] #
The same as snd . splitTyConApp
newTyConInstRhs :: TyCon -> [Type] -> Type #
Unwrap one layer
of newtype on a type constructor and its
arguments, using an eta-reduced version of the newtype
if possible.
This requires tys to have at least newTyConInstArity tycon
elements.
splitForAllTyCoVars :: Type -> ([TyCoVar], Type) #
Take a ForAllTy apart, returning the list of tycovars and the result type. This always succeeds, even if it returns only an empty list. Note that the result type returned may have free variables that were bound by a forall.
dropForAlls :: Type -> Type #
Drops all ForAllTys
isTYPEorCONSTRAINT :: Kind -> Bool #
Does this classify a type allowed to have values? Responds True to things like *, TYPE Lifted, TYPE IntRep, TYPE v, Constraint.
True of a kind `TYPE _` or `CONSTRAINT _`
irrelevantMult :: Scaled a -> a #
eqType :: Type -> Type -> Bool #
Type equality on source types. Does not look through newtypes
,
PredType
s or type families, but it does look through type synonyms.
This first checks that the kinds of the types are equal and then
checks whether the types are equal, ignoring casts and coercions.
(The kind check is a recursive call, but since all kinds have type
Type
, there is no need to check the types of kinds.)
See also Note [Non-trivial definitional equality] in GHC.Core.TyCo.Rep.
nonDetCmpType :: Type -> Type -> Ordering #
type CoreTickish = GenTickish 'TickishPassCore #
data LitNumType #
Numeric literal type
Constructors
LitNumInt |
|
Instances
Binary LitNumType | |
Defined in GHC.Types.Literal Methods put_ :: BinHandle -> LitNumType -> IO () # put :: BinHandle -> LitNumType -> IO (Bin LitNumType) # get :: BinHandle -> IO LitNumType # | |
Data LitNumType | |
Defined in GHC.Types.Literal Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> LitNumType -> c LitNumType # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c LitNumType # toConstr :: LitNumType -> Constr # dataTypeOf :: LitNumType -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c LitNumType) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c LitNumType) # gmapT :: (forall b. Data b => b -> b) -> LitNumType -> LitNumType # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LitNumType -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LitNumType -> r # gmapQ :: (forall d. Data d => d -> u) -> LitNumType -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> LitNumType -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> LitNumType -> m LitNumType # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LitNumType -> m LitNumType # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LitNumType -> m LitNumType # | |
Enum LitNumType | |
Defined in GHC.Types.Literal Methods succ :: LitNumType -> LitNumType # pred :: LitNumType -> LitNumType # toEnum :: Int -> LitNumType # fromEnum :: LitNumType -> Int # enumFrom :: LitNumType -> [LitNumType] # enumFromThen :: LitNumType -> LitNumType -> [LitNumType] # enumFromTo :: LitNumType -> LitNumType -> [LitNumType] # enumFromThenTo :: LitNumType -> LitNumType -> LitNumType -> [LitNumType] # | |
Eq LitNumType | |
Defined in GHC.Types.Literal | |
Ord LitNumType | |
Defined in GHC.Types.Literal Methods compare :: LitNumType -> LitNumType -> Ordering # (<) :: LitNumType -> LitNumType -> Bool # (<=) :: LitNumType -> LitNumType -> Bool # (>) :: LitNumType -> LitNumType -> Bool # (>=) :: LitNumType -> LitNumType -> Bool # max :: LitNumType -> LitNumType -> LitNumType # min :: LitNumType -> LitNumType -> LitNumType # |
literalType :: Literal -> Type #
Find the Haskell Type
the literal occupies
mkRepReflCo :: Type -> Coercion #
Make a representational reflexive coercion
Arguments
:: TyCoVarSet | template variables |
-> RnEnv2 | |
-> TvSubstEnv | type substitution to extend |
-> Type | Template |
-> Type | Target |
-> Maybe TvSubstEnv |
This one is called from the expression matcher, which already has a MatchEnv in hand
tcUnifyTy :: Type -> Type -> Maybe Subst #
Simple unification of two types; all type variables are bindable Precondition: the kinds are already equal
mkClassPred :: Class -> [Type] -> PredType #
getClassPredTys :: HasDebugCallStack => PredType -> (Class, [Type]) #
isEvVarType :: Type -> Bool #
isClassPred :: PredType -> Bool #
isEqPrimPred :: PredType -> Bool #
data StrictnessMark #
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 # |
dataConRepType :: DataCon -> Type #
The representation type of the data constructor, i.e. the sort type that will represent values of this type at runtime
dataConUnivTyVars :: DataCon -> [TyVar] #
The universally-quantified type variables of the constructor
dataConTheta :: DataCon -> ThetaType #
The *full* constraints on the constructor type, including dependent GADT equalities.
dataConWrapId_maybe :: DataCon -> Maybe Id #
Get the Id of the DataCon
wrapper: a function that wraps the "actual"
constructor so it has the type visible in the source program: c.f.
dataConWorkId
.
Returns Nothing if there is no wrapper, which occurs for an algebraic data
constructor and also for a newtype (whose constructor is inlined
compulsorily)
dataConImplicitTyThings :: DataCon -> [TyThing] #
Find all the Id
s implicitly brought into scope by the data constructor. Currently,
the union of the dataConWorkId
and the dataConWrapId
dataConRepStrictness :: DataCon -> [StrictnessMark] #
Give the demands on the arguments of a Core constructor application (Con dc args)
dataConWrapperType :: DataCon -> Type #
The user-declared type of the data constructor in the nice-to-read form:
T :: forall a b. a -> b -> T [a]
rather than:
T :: forall a c. forall b. (c~[a]) => a -> b -> T c
The type variables are quantified in the order that the user wrote them.
See Note [DataCon user type variable binders]
.
NB: If the constructor is part of a data instance, the result type mentions the family tycon, not the internal one.
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
dataConOrigArgTys :: DataCon -> [Scaled Type] #
Returns the argument types of the wrapper, excluding all dictionary arguments and without substituting for any type variables
dataConRepArgTys :: DataCon -> [Scaled Type] #
Returns the arg types of the worker, including *all* non-dependent evidence, after any flattening has been done and without substituting for any type variables
isTupleDataCon :: DataCon -> Bool #
isVanillaDataCon :: DataCon -> Bool #
Vanilla DataCon
s are those that are nice boring Haskell 98 constructors
classDataCon :: Class -> DataCon #
Arguments in an expression/type after splitting
Haskell Type
Constructors
HsForAllTy (XForAllTy pass) (HsForAllTelescope pass) (LHsType pass) |
|
HsQualTy (XQualTy pass) (LHsContext pass) (LHsType pass) | |
HsTyVar (XTyVar pass) PromotionFlag (LIdP pass) |
|
HsAppTy (XAppTy pass) (LHsType pass) (LHsType pass) |
|
HsWildCardTy (XWildCardTy pass) |
|
Instances
ToHie (TScoped (FamEqn GhcRn (LocatedA (HsType GhcRn)))) | |
ToHie (TScoped (HsWildCardBndrs GhcRn (LocatedA (HsType GhcRn)))) | |
Defined in GHC.Iface.Ext.Ast | |
ToHie (LocatedA (HsType GhcRn)) | |
ToHie (LocatedC [LocatedA (HsType GhcRn)]) | |
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) -> EpToken "@" -> 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)) # | |
HasHaddock (LocatedA (HsType GhcPs)) | |
Defined in GHC.Parser.PostProcess.Haddock | |
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) |
Instances
Data flag => ToHie (TVScoped (LocatedA (HsTyVarBndr flag GhcRn))) | |
Defined in GHC.Iface.Ext.Ast | |
type Anno (HsTyVarBndr _flag (GhcPass _1)) | |
Defined in GHC.Hs.Type | |
type Anno (HsTyVarBndr _flag GhcPs) | |
Defined in GHC.Hs.Type | |
type Anno (HsTyVarBndr _flag GhcRn) | |
Defined in GHC.Hs.Type | |
type Anno (HsTyVarBndr _flag GhcTc) | |
Defined in GHC.Hs.Type |
A type signature that obeys the forall
-or-nothing rule. In other
words, an LHsType
that uses an HsOuterSigTyVarBndrs
to represent its
outermost type variable quantification.
See Note [Representing type signatures]
.
Constructors
HsSig (XHsSig pass) (HsOuterSigTyVarBndrs pass) (LHsType pass) |
Instances
ToHie (TScoped (LocatedA (HsSigType GhcRn))) | |
ToHie (TScoped (HsWildCardBndrs GhcRn (LocatedA (HsSigType GhcRn)))) | |
Defined in GHC.Iface.Ext.Ast | |
HasHaddock (LocatedA (HsSigType GhcPs)) | |
Defined in GHC.Parser.PostProcess.Haddock | |
type Anno (HsSigType (GhcPass p)) | |
Defined in GHC.Hs.Type |
data HsWildCardBndrs pass thing #
Haskell Wildcard Binders
Instances
ToHie (TScoped (HsWildCardBndrs GhcRn (LocatedA (HsSigType GhcRn)))) | |
Defined in GHC.Iface.Ext.Ast | |
ToHie (TScoped (HsWildCardBndrs GhcRn (LocatedA (HsType GhcRn)))) | |
Defined in GHC.Iface.Ext.Ast | |
HasHaddock a => HasHaddock (HsWildCardBndrs GhcPs a) | |
Defined in GHC.Parser.PostProcess.Haddock Methods addHaddock :: HsWildCardBndrs GhcPs a -> HdkA (HsWildCardBndrs GhcPs a) |
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 (XHsOuterImplicit pass) | Implicit forall, e.g.,
|
Instances
Data flag => ToHie (TVScoped (HsOuterTyVarBndrs flag GhcRn)) | |
Defined in GHC.Iface.Ext.Ast Methods toHie :: TVScoped (HsOuterTyVarBndrs flag GhcRn) -> HieM [HieAST Type] | |
type Anno (HsOuterTyVarBndrs _1 (GhcPass _2)) | |
Defined in GHC.Hs.Type |
Arguments
= XRec pass (HsType pass) | May have |
Located Haskell Type
Fixity Signature
Constructors
FixitySig (XFixitySig pass) [LIdP pass] Fixity |
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
|
FixSig (XFixSig pass) (FixitySig pass) | An ordinary fixity declaration infixl 8 *** |
InlineSig (XInlineSig pass) (LIdP pass) InlinePragma | An inline pragma {#- INLINE f #-} |
A Haskell Declaration
Instances
HasHaddock (LocatedA (HsDecl GhcPs)) | |
Defined in GHC.Parser.PostProcess.Haddock | |
HasHaddock (HsDecl GhcPs) | |
Defined in GHC.Parser.PostProcess.Haddock Methods addHaddock :: HsDecl GhcPs -> HdkA (HsDecl GhcPs) | |
type Anno (HsDecl (GhcPass _1)) | |
Defined in GHC.Hs.Decls |
Haskell Module
All we actually declare here is the top-level structure for a module.
type CoreProgram = [CoreBind] #
Records the unfolding of an identifier, which is approximately the form the identifier would have if we substituted its definition in for the identifier. This type should be treated as abstract everywhere except in GHC.Core.Unfold
Constructors
DFunUnfolding [Var] DataCon [CoreExpr] | |
CoreUnfolding CoreExpr UnfoldingSource Bool UnfoldingCache UnfoldingGuidance | An unfolding with redundant cached information. Parameters: uf_tmpl: Template used to perform unfolding; NB: Occurrence info is guaranteed correct: see Note [OccInfo in unfoldings and rules] uf_is_top: Is this a top level binding? uf_is_value: uf_is_work_free: Does this waste only a little work if we expand it inside an inlining?
Basically this is a cached version of uf_guidance: Tells us about the size of the unfolding template |
Binding, used for top level bindings in a module and local bindings in a let
.
Instances
CBVisitable CoreBind Source # | |
Data b => Data (Bind b) | |
Defined in GHC.Core 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) # | |
PPrint (Bind Var) Source # | |
Defined in Language.Haskell.Liquid.Types.PrettyPrint | |
Subable (Bind Var) Source # | |
CBVisitable [CoreBind] Source # | |
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
mkTyApps :: Expr b -> [Type] -> Expr b infixl 4 #
Apply a list of type argument expressions to a function expression in a nested fashion
mkLams :: [b] -> Expr b -> Expr b #
Bind all supplied binders over an expression in a nested lambda expression. Prefer to
use mkCoreLams
if possible
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
bindersOfBinds :: [Bind b] -> [b] #
bindersOf
applied to a list of binding groups
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) #
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
A Reduction
is the result of an operation that rewrites a type ty_in
.
The Reduction
includes the rewritten type ty_out
and a Coercion
co
such that co :: ty_in ~ ty_out
, where the role of the coercion is determined
by the context. That is, the LHS type of the coercion is the original type
ty_in
, while its RHS type is the rewritten type ty_out
.
A Reduction is always homogeneous, unless it is wrapped inside a HetReduction
,
which separately stores the kind coercion.
See Note [The Reduction type].
Instances
Outputable Reduction | |
Defined in GHC.Core.Reduction |
Constant applicative form Information
Records whether an Id
makes Constant Applicative Form references
Constructors
NoCafRefs | A function or static constructor that refers to no CAFs. |
Instances
Outputable CafInfo | |
Defined in GHC.Types.Id.Info | |
Eq CafInfo | |
Ord CafInfo | |
setOccInfo :: IdInfo -> OccInfo -> IdInfo infixl 1 #
setCafInfo :: IdInfo -> CafInfo -> IdInfo infixl 1 #
mayHaveCafRefs :: CafInfo -> Bool #
modifyIdInfo :: HasDebugCallStack => (IdInfo -> IdInfo) -> Id -> Id #
mkExportedLocalId :: IdDetails -> Name -> Type -> Id #
Create a local Id
that is marked as exported.
This prevents things attached to it from being removed as dead code.
See Note [Exported LocalIds]
mkUserLocalOrCoVar :: OccName -> Unique -> Mult -> Type -> SrcSpan -> Id #
Like mkUserLocal
, but checks if we have a coercion type
isRecordSelector :: Id -> Bool #
isClassOpId_maybe :: Id -> Maybe Class #
Get from either the worker or the wrapper Id
to the DataCon
. Currently used only in the desugarer.
INVARIANT: idDataCon (dataConWrapId d) = d
: remember, dataConWrapId
can return either the wrapper or the worker
realIdUnfolding :: Id -> Unfolding #
Expose the unfolding if there is one, including for loop breakers
idInlinePragma :: Id -> InlinePragma #
isConLikeId :: Id -> Bool #
intTyConName :: Name #
boolTyConName :: Name #
listTyConName :: Name #
charDataCon :: DataCon #
intDataCon :: DataCon #
falseDataCon :: DataCon #
trueDataCon :: DataCon #
falseDataConId :: Id #
trueDataConId :: Id #
nilDataCon :: DataCon #
consDataCon :: DataCon #
exprFreeVars :: CoreExpr -> VarSet #
Find all locally-defined free Ids or type variables in an expression returning a non-deterministic set.
exprFreeVarsList :: CoreExpr -> [Var] #
Find all locally-defined free Ids or type variables in an expression returning a deterministically ordered list.
Arguments
:: InterestingVarFun | Says which |
-> CoreExpr | |
-> [Var] |
Finds free variables in an expression selected by a predicate returning a deterministically ordered list.
exprsOrphNames :: [CoreExpr] -> NameSet #
Finds the free external names of several expressions: see exprOrphNames
for details
data FamInstEnv #
Instances
Outputable FamInstEnv | |
Defined in GHC.Core.FamInstEnv Methods ppr :: FamInstEnv -> SDoc # |
type FamInstEnvs = (FamInstEnv, FamInstEnv) #
Constructors
DataFamilyInst TyCon |
Constructors
FamInst (CoAxiom Unbranched) FamFlavor Name [RoughMatchTc] [TyVar] [CoVar] [Type] Type IsOrphan |
Instances
NamedThing FamInst | |
Defined in GHC.Core.FamInstEnv | |
Outputable FamInst | |
Defined in GHC.Core.FamInstEnv |
famInstEnvElts :: FamInstEnv -> [FamInst] #
topNormaliseType_maybe :: FamInstEnvs -> Type -> Maybe Reduction #
Get rid of *outermost* (or toplevel) * type function redex * data family redex * newtypes returning an appropriate Representational coercion. Specifically, if topNormaliseType_maybe env ty = Just (co, ty') then (a) co :: ty ~R ty' (b) ty' is not a newtype, and is not a type-family or data-family redex
However, ty' can be something like (Maybe (F ty)), where (F ty) is a redex.
Always operates homogeneously: the returned type has the same kind as the original type, and the returned coercion is always homogeneous.
exprType :: HasDebugCallStack => CoreExpr -> Type #
Recover the type of a well-typed Core expression. Fails when
applied to the actual Type
expression as it cannot
really be said to have a type
substExpr :: HasDebugCallStack => Subst -> CoreExpr -> CoreExpr #
substExpr applies a substitution to an entire CoreExpr
. Remember,
you may only apply the substitution once:
See Note [Substitutions apply only once] in GHC.Core.TyCo.Subst
Do *not* attempt to short-cut in the case of an empty substitution! See Note [Extending the IdSubstEnv]
occurAnalysePgm :: Module -> (Id -> Bool) -> (Activation -> Bool) -> [CoreRule] -> CoreProgram -> CoreProgram #
pAT_ERROR_ID :: Id #
data IfaceAnnotation #
Instances
NFData IfaceAnnotation | |
Defined in GHC.Iface.Syntax Methods rnf :: IfaceAnnotation -> () # | |
Binary IfaceAnnotation | |
Defined in GHC.Iface.Syntax Methods put_ :: BinHandle -> IfaceAnnotation -> IO () # put :: BinHandle -> IfaceAnnotation -> IO (Bin IfaceAnnotation) # get :: BinHandle -> IO IfaceAnnotation # | |
Outputable IfaceAnnotation | |
Defined in GHC.Iface.Syntax Methods ppr :: IfaceAnnotation -> SDoc # |
InstEnvs
represents the combination of the global type class instance
environment, the local type class instance environment, and the set of
transitively reachable orphan modules (according to what modules have been
directly imported) used to test orphan instance visibility.
A type-class instance. Note that there is some tricky laziness at work here. See Note [ClsInst laziness and the rough-match fields] for more details.
Instances
NamedThing ClsInst | |
Defined in GHC.Core.InstEnv | |
Outputable ClsInst | |
Defined in GHC.Core.InstEnv | |
Data ClsInst | |
Defined in GHC.Core.InstEnv Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ClsInst -> c ClsInst # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ClsInst # toConstr :: ClsInst -> Constr # dataTypeOf :: ClsInst -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ClsInst) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ClsInst) # gmapT :: (forall b. Data b => b -> b) -> ClsInst -> ClsInst # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ClsInst -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ClsInst -> r # gmapQ :: (forall d. Data d => d -> u) -> ClsInst -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ClsInst -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ClsInst -> m ClsInst # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ClsInst -> m ClsInst # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ClsInst -> m ClsInst # |
instanceDFunId :: ClsInst -> DFunId #
instEnvElts :: InstEnv -> [ClsInst] #
lookupInstEnv :: Bool -> InstEnvs -> Class -> [Type] -> ClsInstLookupResult #
See Note [Rules for instance lookup] ^ See Note [Safe Haskell Overlapping Instances] in GHC.Tc.Solver ^ See Note [Safe Haskell Overlapping Instances Implementation] in GHC.Tc.Solver
Instances
Outputable TcEvBinds | |
Defined in GHC.Tc.Types.Evidence | |
Data TcEvBinds | |
Defined in GHC.Tc.Types.Evidence Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TcEvBinds -> c TcEvBinds # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TcEvBinds # toConstr :: TcEvBinds -> Constr # dataTypeOf :: TcEvBinds -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TcEvBinds) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TcEvBinds) # gmapT :: (forall b. Data b => b -> b) -> TcEvBinds -> TcEvBinds # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TcEvBinds -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TcEvBinds -> r # gmapQ :: (forall d. Data d => d -> u) -> TcEvBinds -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> TcEvBinds -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> TcEvBinds -> m TcEvBinds # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TcEvBinds -> m TcEvBinds # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TcEvBinds -> m TcEvBinds # | |
ToHie (EvBindContext (LocatedA TcEvBinds)) | |
mkHsForAllInvisTele :: forall (p :: Pass). EpAnnForallTy -> [LHsTyVarBndr Specificity (GhcPass p)] -> HsForAllTelescope (GhcPass p) #
mkHsApp :: forall (id :: Pass). LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) #
mkHsLam :: forall (p :: Pass). (IsPass p, XMG (GhcPass p) (LHsExpr (GhcPass p)) ~ Origin) => [LPat (GhcPass p)] -> LHsExpr (GhcPass p) -> LHsExpr (GhcPass p) #
mkHsIntegral :: IntegralLit -> HsOverLit GhcPs #
nlHsAppTy :: forall (p :: Pass). LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p) #
nlHsTyVar :: forall (p :: Pass) a. IsSrcSpanAnn p a => PromotionFlag -> IdP (GhcPass p) -> LHsType (GhcPass p) #
nlHsFunTy :: forall (p :: Pass). IsPass p => LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p) #
nlHsTyConApp :: forall (p :: Pass) a. IsSrcSpanAnn p a => PromotionFlag -> LexicalFixity -> IdP (GhcPass p) -> [LHsTypeArg (GhcPass p)] -> LHsType (GhcPass p) #
hsTypeToHsSigType :: LHsType GhcPs -> LHsSigType GhcPs #
Convert an LHsType
to an LHsSigType
.
hsTypeToHsSigWcType :: LHsType GhcPs -> LHsSigWcType GhcPs #
Convert an LHsType
to an LHsSigWcType
.
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
SevWarning |
Instances
ToJson Severity | |
Defined in GHC.Types.Error | |
Outputable Severity | |
Defined in GHC.Types.Error | |
Show Severity | |
Eq Severity | |
Ord Severity | |
Defined in GHC.Types.Error |
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
MCDiagnostic Severity ResolvedDiagnosticReason (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.
Instances
Functor MsgEnvelope | |
Defined in GHC.Types.Error Methods fmap :: (a -> b) -> MsgEnvelope a -> MsgEnvelope b # (<$) :: a -> MsgEnvelope b -> MsgEnvelope a # | |
Foldable MsgEnvelope | |
Defined in GHC.Types.Error Methods fold :: Monoid m => MsgEnvelope m -> m # foldMap :: Monoid m => (a -> m) -> MsgEnvelope a -> m # foldMap' :: Monoid m => (a -> m) -> MsgEnvelope a -> m # foldr :: (a -> b -> b) -> b -> MsgEnvelope a -> b # foldr' :: (a -> b -> b) -> b -> MsgEnvelope a -> b # foldl :: (b -> a -> b) -> b -> MsgEnvelope a -> b # foldl' :: (b -> a -> b) -> b -> MsgEnvelope a -> b # foldr1 :: (a -> a -> a) -> MsgEnvelope a -> a # foldl1 :: (a -> a -> a) -> MsgEnvelope a -> a # toList :: MsgEnvelope a -> [a] # null :: MsgEnvelope a -> Bool # length :: MsgEnvelope a -> Int # elem :: Eq a => a -> MsgEnvelope a -> Bool # maximum :: Ord a => MsgEnvelope a -> a # minimum :: Ord a => MsgEnvelope a -> a # sum :: Num a => MsgEnvelope a -> a # product :: Num a => MsgEnvelope a -> a # | |
Traversable MsgEnvelope | |
Defined in GHC.Types.Error Methods traverse :: Applicative f => (a -> f b) -> MsgEnvelope a -> f (MsgEnvelope b) # sequenceA :: Applicative f => MsgEnvelope (f a) -> f (MsgEnvelope a) # mapM :: Monad m => (a -> m b) -> MsgEnvelope a -> m (MsgEnvelope b) # sequence :: Monad m => MsgEnvelope (m a) -> m (MsgEnvelope a) # | |
Diagnostic e => ToJson (MsgEnvelope e) | |
Defined in GHC.Types.Error Methods json :: MsgEnvelope e -> JsonDoc # | |
Show (MsgEnvelope DiagnosticMessage) | |
Defined in GHC.Types.Error Methods showsPrec :: Int -> MsgEnvelope DiagnosticMessage -> ShowS # show :: MsgEnvelope DiagnosticMessage -> String # showList :: [MsgEnvelope DiagnosticMessage] -> ShowS # |
newtype ResolvedDiagnosticReason #
Like a DiagnosticReason
, but resolved against a specific set of DynFlags
to
work out which warning flag actually enabled this warning.
Constructors
ResolvedDiagnosticReason DiagnosticReason |
Instances
Outputable ResolvedDiagnosticReason | |
Defined in GHC.Types.Error Methods ppr :: ResolvedDiagnosticReason -> SDoc # |
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. |
Instances
Outputable DiagnosticReason | |
Defined in GHC.Types.Error Methods ppr :: DiagnosticReason -> SDoc # | |
Show DiagnosticReason | |
Defined in GHC.Types.Error Methods showsPrec :: Int -> DiagnosticReason -> ShowS # show :: DiagnosticReason -> String # showList :: [DiagnosticReason] -> ShowS # | |
Eq DiagnosticReason | |
Defined in GHC.Types.Error Methods (==) :: DiagnosticReason -> DiagnosticReason -> Bool # (/=) :: DiagnosticReason -> DiagnosticReason -> Bool # |
class HasDefaultDiagnosticOpts (DiagnosticOpts a) => Diagnostic a #
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.
Minimal complete definition
diagnosticMessage, diagnosticReason, diagnosticHints, diagnosticCode
Instances
Diagnostic DiagnosticMessage | |||||
Defined in GHC.Types.Error Associated Types
| |||||
HasDefaultDiagnosticOpts opts => Diagnostic (UnknownDiagnostic opts) | |||||
Defined in GHC.Types.Error Associated Types
Methods diagnosticMessage :: DiagnosticOpts (UnknownDiagnostic opts) -> UnknownDiagnostic opts -> DecoratedSDoc # diagnosticReason :: UnknownDiagnostic opts -> DiagnosticReason # diagnosticHints :: UnknownDiagnostic opts -> [GhcHint] # diagnosticCode :: UnknownDiagnostic opts -> Maybe DiagnosticCode # |
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
Functor Messages | |
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 | |
Diagnostic e => ToJson (Messages e) | |
Defined in GHC.Types.Error | |
Diagnostic e => Outputable (Messages e) | |
Defined in GHC.Types.Error | |
Monoid (Messages e) | |
Semigroup (Messages e) | |
defaultDiagnosticOpts :: HasDefaultDiagnosticOpts (DiagnosticOpts opts) => DiagnosticOpts opts #
mkPlainError :: [GhcHint] -> SDoc -> DiagnosticMessage #
Create an error DiagnosticMessage
holding just a single SDoc
errorsOrFatalWarningsFound :: Messages e -> Bool #
Are there any errors or -Werror warnings here?
pprLocMsgEnvelope :: Diagnostic e => DiagnosticOpts e -> MsgEnvelope e -> SDoc #
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.
interpreterBackend :: Backend #
The ByteCode interpreter.
Produce ByteCode objects (BCO, see GHC.ByteCode) that can be interpreted. It is used by GHCi.
Currently some extensions are not supported (foreign primops).
What to do in the link step, if there is one.
Constructors
LinkInMemory | Use the in-memory dynamic linker (works for both bytecode and object code). |
getDynFlags :: HasDynFlags m => m DynFlags #
gopt :: GeneralFlag -> DynFlags -> Bool #
Test whether a GeneralFlag
is set
Note that dynamicNow
(i.e., dynamic objects built with `-dynamic-too`)
always implicitly enables Opt_PIC, Opt_ExternalDynamicRefs, and disables
Opt_SplitSections.
gopt_set :: DynFlags -> GeneralFlag -> DynFlags #
Set a GeneralFlag
gopt_unset :: DynFlags -> GeneralFlag -> DynFlags #
Unset a GeneralFlag
data ImportAvails #
ImportAvails
summarises what was imported from where, irrespective of
whether the imported things are actually used or not. It is used:
- when processing the export list,
- when constructing usage info for the interface file,
- to identify the list of directly imported modules for initialisation purposes and for optimised overlap checking of family instances,
- when figuring out what things are really unused
data HsParsedModule #
Constructors
HsParsedModule | |
Fields
|
lexprCtOrigin :: LHsExpr GhcRn -> CtOrigin #
Extract a suitable CtOrigin from a HsExpr
data ModIface_ (phase :: ModIfacePhase) #
A ModIface
plus a ModDetails
summarises everything we know
about a compiled module. The ModIface
is the stuff *before* linking,
and can be written out to an interface file. The 'ModDetails is after
linking and can be completely recovered from just the ModIface
.
When we read an interface file, we also construct a ModIface
from it,
except that we explicitly make the mi_decls
and a few other fields empty;
as when reading we consolidate the declarations etc. into a number of indexed
maps and environments in the ExternalPackageState
.
See Note [Strictness in ModIface] to learn about why some fields are strict and others are not.
Instances
Binary ModIface | |
(NFData (IfaceBackendExts phase), NFData (IfaceDeclExts phase)) => NFData (ModIface_ phase) | |
Defined in GHC.Unit.Module.ModIface |
mkTcRnUnknownMessage :: (Diagnostic a, Typeable a, DiagnosticOpts a ~ NoDiagnosticOpts) => a -> TcRnMessage #
The NameCache makes sure that there is just one Unique assigned for each original name; i.e. (module-name, occ-name) pair and provides something of a lookup mechanism for those names.
plusTypeEnv :: TypeEnv -> TypeEnv -> TypeEnv #
isNumericClass :: Class -> Bool #
data FindResult #
The result of searching for an imported module.
NB: FindResult manages both user source-import lookups
(which can result in Module
) as well as direct imports
for interfaces (which always result in InstalledModule
).
Constructors
Found ModLocation Module | The module was found |
NoPackage Unit | The requested unit was not found |
FoundMultiple [(Module, ModuleOrigin)] | _Error_: both in multiple packages |
NotFound [FilePath] (Maybe Unit) [Unit] [Unit] [UnusableUnit] [ModuleSuggestion] | Not found |
A ModGuts is carried through the compiler, accumulating stuff as it goes
There is only one ModGuts at any time, the one for the module
being compiled right now. Once it is compiled, a ModIface
and
ModDetails
are extracted and the ModGuts is discarded.
type HomePackageTable = DModuleNameEnv HomeModInfo #
Helps us find information about modules in the home package
data HomeModInfo #
Information about modules in the package being compiled
lookupHpt :: HomePackageTable -> ModuleName -> Maybe HomeModInfo #
data ModSummary #
Data for a module node in a ModuleGraph
. Module nodes of the module graph
are one of:
- A regular Haskell source module
- A hi-boot source module
Instances
Outputable ModSummary | |
Defined in GHC.Unit.Module.ModSummary Methods ppr :: ModSummary -> SDoc # |
ms_mod_name :: ModSummary -> ModuleName #
showPpr :: Outputable a => DynFlags -> a -> String #
data ExternalPackageState #
Information about other packages that we have slurped in by reading their interface files
data ExternalUnitCache #
Information about the currently loaded external packages. This is mutable because packages will be demand-loaded during a compilation run as required.
ue_hpt :: HasDebugCallStack => UnitEnv -> HomePackageTable #
printMessages :: Diagnostic a => Logger -> DiagnosticOpts a -> DiagOpts -> Messages a -> IO () #
initDiagOpts :: DynFlags -> DiagOpts #
Initialise the general configuration for printing diagnostic messages For example, this configuration controls things like whether warnings are treated like errors.
updEnv :: (env -> env') -> IOEnv env' a -> IOEnv env a #
Perform a computation with an altered environment
emptyPlugins :: Plugins #
HscEnv is like Session
, except that some of the fields are immutable.
An HscEnv is used to compile a single module from plain Haskell source
code (after preprocessing) to either C, assembly or C--. It's also used
to store the dynamic linker state to allow for multiple linkers in the
same address space.
Things like the module graph don't change during a single compilation.
Historical note: "hsc" used to be the name of the compiler binary, when there was a separate driver and compiler. To compile a single module, the driver would invoke hsc on the source code... so nowadays we think of hsc as the layer of the compiler that deals with compiling a single module.
Instances
ContainsDynFlags HscEnv | |
Defined in GHC.Driver.Env.Types Methods extractDynFlags :: HscEnv -> DynFlags # |
hscSetFlags :: HasDebugCallStack => DynFlags -> HscEnv -> HscEnv #
Set Flags
A minimal implementation of a GhcMonad
. If you need a custom monad,
e.g., to maintain additional state consider wrapping this monad or using
GhcT
.
Instances
MonadIO Ghc | |
Defined in GHC.Driver.Monad | |
MonadCatch Ghc | |
Defined in GHC.Driver.Monad | |
MonadMask Ghc | |
Defined in GHC.Driver.Monad Methods mask :: HasCallStack => ((forall a. Ghc a -> Ghc a) -> Ghc b) -> Ghc b # uninterruptibleMask :: HasCallStack => ((forall a. Ghc a -> Ghc a) -> Ghc b) -> Ghc b # generalBracket :: HasCallStack => Ghc a -> (a -> ExitCase b -> Ghc c) -> (a -> Ghc b) -> Ghc (b, c) # | |
MonadThrow Ghc | |
Defined in GHC.Driver.Monad Methods throwM :: (HasCallStack, Exception e) => e -> Ghc a # | |
HasDynFlags Ghc | |
Defined in GHC.Driver.Monad Methods getDynFlags :: Ghc DynFlags # | |
GhcMonad Ghc | |
Defined in GHC.Driver.Monad | |
HasLogger Ghc | |
Defined in GHC.Driver.Monad | |
Applicative Ghc | |
Functor Ghc | |
Monad Ghc | |
MonadFail Ghc | |
Defined in GHC.Driver.Monad | |
MonadFix Ghc | |
Defined in GHC.Driver.Monad |
class (Functor m, ExceptionMonad m, HasDynFlags m, HasLogger m) => GhcMonad (m :: Type -> Type) where #
A monad that has all the features needed by GHC API calls.
In short, a GHC monad
- allows embedding of IO actions,
- can log warnings,
- allows handling of (extensible) exceptions, and
- maintains a current session.
If you do not use Ghc
or GhcT
, make sure to call initGhcMonad
before any call to the GHC API functions can occur.
Minimal complete definition
Methods
getSession :: m HscEnv #
Instances
GhcMonad BkpM | |
Defined in GHC.Driver.Backpack | |
GhcMonad Ghc | |
Defined in GHC.Driver.Monad | |
ExceptionMonad m => GhcMonad (GhcT m) | |
Defined in GHC.Driver.Monad |
withSession :: GhcMonad m => (HscEnv -> m a) -> m a #
Call the argument with the current session.
reflectGhc :: Ghc a -> Session -> IO a #
Reflect a computation in the Ghc
monad into the IO
monad.
You can use this to call functions returning an action in the Ghc
monad
inside an IO
action. This is needed for some (too restrictive) callback
arguments of some library functions:
libFunc :: String -> (Int -> IO a) -> IO a ghcFunc :: Int -> Ghc a ghcFuncUsingLibFunc :: String -> Ghc a -> Ghc a ghcFuncUsingLibFunc str = reifyGhc $ \s -> libFunc $ \i -> do reflectGhc (ghcFunc i) s
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
purePlugin :: [CommandLineOption] -> IO PluginRecompile #
defaultPlugin :: Plugin #
Default plugin: does nothing at all, except for marking that safe
inference has failed unless -fplugin-trustworthy
is passed. For
compatibility reason you should base all your plugin definitions on this
default value.
findImportedModule :: HscEnv -> ModuleName -> PkgQual -> IO FindResult #
Locate a module that was imported by the user. We have the module's name, and possibly a package name. Without a package name, this function will use the search path and the known exposed packages to find the module, if a package is specified then only that package is searched for the module.
findExposedPackageModule :: FinderCache -> FinderOpts -> UnitState -> ModuleName -> PkgQual -> IO FindResult #
cannotFindModule :: HscEnv -> ModuleName -> FindResult -> MissingInterfaceError #
updOptLevel :: Int -> DynFlags -> DynFlags #
Sets the DynFlags
to be appropriate to the optimisation level
addErrAt :: SrcSpan -> TcRnMessage -> TcRn () #
addErrs :: [(SrcSpan, TcRnMessage)] -> TcRn () #
reportDiagnostics :: [MsgEnvelope TcRnMessage] -> TcM () #
reportDiagnostic :: MsgEnvelope TcRnMessage -> TcRn () #
failIfErrsM :: TcRn () #
captureConstraints :: TcM a -> TcM (a, WantedConstraints) #
failWithTc :: TcRnMessage -> TcM a #
discardConstraints :: TcM a -> TcM a #
Throw out any constraints emitted by the thing_inside
pushTcLevelM :: TcM a -> TcM (TcLevel, a) #
initIfaceTcRn :: IfG a -> TcRn a #
data TraceBinIFace #
Constructors
QuietBinIFace |
getWithUserData :: Binary a => NameCache -> BinHandle -> IO a #
This performs a get action after reading the dictionary and symbol table. It is necessary to run this before trying to deserialise any Names or FastStrings.
putWithUserData :: Binary a => TraceBinIFace -> BinHandle -> a -> IO () #
Put a piece of data with an initialised UserData
field. This
is necessary if you want to serialise Names or FastStrings.
It also writes a symbol table and the dictionary.
This segment should be read using getWithUserData
.
Reason for loading an interface file
Used to figure out whether we want to consider loading hi-boot files or not.
Constructors
ImportBySystem |
Instances
Outputable WhereFrom | |
Defined in GHC.Iface.Load |
loadInterface :: SDoc -> Module -> WhereFrom -> IfM lcl (MaybeErr MissingInterfaceError ModIface) #
renamePkgQual :: UnitEnv -> ModuleName -> Maybe FastString -> PkgQual #
Rename raw package imports
How should we choose which constraints to quantify over?
Constructors
NoRestrictions | Quantify over any constraint that satisfies pickQuantifiablePreds |
Instances
Outputable InferMode | |
Defined in GHC.Tc.Solver |
captureTopConstraints :: TcM a -> TcM (a, WantedConstraints) #
simplifyInteractive :: WantedConstraints -> TcM (Bag EvBind) #
tcValBinds :: TopLevelFlag -> [(RecFlag, LHsBinds GhcRn)] -> [LSig GhcRn] -> TcM thing -> TcM ([(RecFlag, LHsBinds GhcTc)], HsWrapper, thing) #
tcInferSigma :: Bool -> LHsExpr GhcRn -> TcM TcSigmaType #
hscDesugar :: HscEnv -> ModSummary -> TcGblEnv -> IO ModGuts #
Convert a typechecked module to Core
data DesugaredModule #
The result of successful desugaring (i.e., translation to core). Also contains all the information of a typechecked module.
Constructors
DesugaredModule | |
Fields |
Instances
DesugaredMod DesugaredModule | |
Defined in GHC Methods coreModule :: DesugaredModule -> ModGuts # | |
ParsedMod DesugaredModule | |
Defined in GHC | |
TypecheckedMod DesugaredModule | |
Defined in GHC Methods renamedSource :: DesugaredModule -> Maybe RenamedSource # typecheckedSource :: DesugaredModule -> TypecheckedSource # moduleInfo :: DesugaredModule -> ModuleInfo # tm_internals :: DesugaredModule -> (TcGblEnv, ModDetails) |
data TypecheckedModule #
The result of successful typechecking. It also contains the parser result.
Instances
ParsedMod TypecheckedModule | |
Defined in GHC Methods | |
TypecheckedMod TypecheckedModule | |
Defined in GHC Methods renamedSource :: TypecheckedModule -> Maybe RenamedSource # typecheckedSource :: TypecheckedModule -> TypecheckedSource # moduleInfo :: TypecheckedModule -> ModuleInfo # tm_internals :: TypecheckedModule -> (TcGblEnv, ModDetails) |
data ParsedModule #
The result of successful parsing.
Constructors
ParsedModule | |
Fields |
Instances
ParsedMod ParsedModule | |
Defined in GHC |
coreModule :: DesugaredMod m => m -> ModGuts #
typecheckModule :: GhcMonad m => ParsedModule -> m TypecheckedModule #
Typecheck and rename a parsed module.
Throws a SourceError
if either fails.
desugarModule :: GhcMonad m => TypecheckedModule -> m DesugaredModule #
Desugar a typechecked module.
modInfoTopLevelScope :: ModuleInfo -> Maybe [Name] #
isDictonaryId :: Id -> Bool #
deserializeWithData :: Data a => [Word8] -> a #
Use a Data
instance to implement a deserialization scheme dual to that of serializeWithData
fromSerialized :: Typeable a => ([Word8] -> a) -> Serialized -> Maybe a #
If the Serialized
value contains something of the given type, then use the specified deserializer to return Just
that.
Otherwise return Nothing
.
toSerialized :: Typeable a => (a -> [Word8]) -> a -> Serialized #
Put a Typeable value that we are able to actually turn into bytes into a Serialized
value ready for deserialization later
data 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 # |