ghc-9.10.3: The GHC API

Safe Haskell | None
Language | GHC2021

GHC

Contents

- Initialisation
- GHC Monad
- Flags and settings
- Logging
- Targets
- Loading/compiling the program
  - Compiling to Core
- Inspecting the module structure of the program
- Inspecting modules
- Printing
- Interactive evaluation
  - Executing statements
  - Adding new declarations
  - Get/set the current context
  - Inspecting the current context
  - Inspecting types and kinds
  - Looking up a Name
  - Compiling expressions
  - Docs
  - Other
  - The debugger
- Abstract syntax elements
  - Units
  - Modules
  - Names
  - Identifiers
  - Type constructors
  - Type variables
  - Data constructors
  - Classes
  - Instances
  - Types and Kinds
  - Entities
  - Syntax
  - Fixities
  - Source locations
  - Located
    - Constructing Located
    - Deconstructing Located
    - Combining and comparing Located values
- Exceptions
- Token stream manipulations
- Pure interface to the parser
- API Annotations
- Miscellaneous

Synopsis

- defaultErrorHandler :: ExceptionMonad m => FatalMessager -> FlushOut -> m a -> m a
- defaultCleanupHandler :: ExceptionMonad m => DynFlags -> m a -> m a
- prettyPrintGhcErrors :: ExceptionMonad m => Logger -> m a -> m a
- withSignalHandlers :: ExceptionMonad m => m a -> m a
- withCleanupSession :: GhcMonad m => m a -> m a
- data Ghc a
- data GhcT (m :: Type -> Type) a
- class (Functor m, ExceptionMonad m, HasDynFlags m, HasLogger m) => GhcMonad (m :: Type -> Type) where
  - getSession :: m HscEnv
  - setSession :: HscEnv -> m ()
- data HscEnv
- runGhc :: Maybe FilePath -> Ghc a -> IO a
- runGhcT :: ExceptionMonad m => Maybe FilePath -> GhcT m a -> m a
- initGhcMonad :: GhcMonad m => Maybe FilePath -> m ()
- printException :: (HasLogger m, MonadIO m, HasDynFlags m) => SourceError -> m ()
- handleSourceError :: MonadCatch m => (SourceError -> m a) -> m a -> m a
- data DynFlags = DynFlags {
  - ghcMode :: GhcMode
  - ghcLink :: GhcLink
  - backend :: !Backend
  - ghcNameVersion :: !GhcNameVersion
  - fileSettings :: !FileSettings
  - targetPlatform :: Platform
  - toolSettings :: !ToolSettings
  - platformMisc :: !PlatformMisc
  - rawSettings :: [(String, String)]
  - tmpDir :: TempDir
  - llvmOptLevel :: Int
  - verbosity :: Int
  - debugLevel :: Int
  - simplPhases :: Int
  - maxSimplIterations :: Int
  - ruleCheck :: Maybe String
  - strictnessBefore :: [Int]
  - parMakeCount :: Maybe ParMakeCount
  - enableTimeStats :: Bool
  - ghcHeapSize :: Maybe Int
  - maxRelevantBinds :: Maybe Int
  - maxValidHoleFits :: Maybe Int
  - maxRefHoleFits :: Maybe Int
  - refLevelHoleFits :: Maybe Int
  - maxUncoveredPatterns :: Int
  - maxPmCheckModels :: Int
  - simplTickFactor :: Int
  - dmdUnboxWidth :: !Int
  - specConstrThreshold :: Maybe Int
  - specConstrCount :: Maybe Int
  - specConstrRecursive :: Int
  - binBlobThreshold :: Maybe Word
  - liberateCaseThreshold :: Maybe Int
  - floatLamArgs :: Maybe Int
  - liftLamsRecArgs :: Maybe Int
  - liftLamsNonRecArgs :: Maybe Int
  - liftLamsKnown :: Bool
  - cmmProcAlignment :: Maybe Int
  - historySize :: Int
  - importPaths :: [FilePath]
  - mainModuleNameIs :: ModuleName
  - mainFunIs :: Maybe String
  - reductionDepth :: IntWithInf
  - solverIterations :: IntWithInf
  - givensFuel :: Int
  - wantedsFuel :: Int
  - qcsFuel :: Int
  - homeUnitId_ :: UnitId
  - homeUnitInstanceOf_ :: Maybe UnitId
  - homeUnitInstantiations_ :: [(ModuleName, Module)]
  - workingDirectory :: Maybe FilePath
  - thisPackageName :: Maybe String
  - hiddenModules :: Set ModuleName
  - reexportedModules :: Set ModuleName
  - targetWays_ :: Ways
  - splitInfo :: Maybe (String, Int)
  - objectDir :: Maybe String
  - dylibInstallName :: Maybe String
  - hiDir :: Maybe String
  - hieDir :: Maybe String
  - stubDir :: Maybe String
  - dumpDir :: Maybe String
  - objectSuf_ :: String
  - hcSuf :: String
  - hiSuf_ :: String
  - hieSuf :: String
  - dynObjectSuf_ :: String
  - dynHiSuf_ :: String
  - outputFile_ :: Maybe String
  - dynOutputFile_ :: Maybe String
  - outputHi :: Maybe String
  - dynOutputHi :: Maybe String
  - dynLibLoader :: DynLibLoader
  - dynamicNow :: !Bool
  - dumpPrefix :: FilePath
  - dumpPrefixForce :: Maybe FilePath
  - ldInputs :: [Option]
  - includePaths :: IncludeSpecs
  - libraryPaths :: [String]
  - frameworkPaths :: [String]
  - cmdlineFrameworks :: [String]
  - rtsOpts :: Maybe String
  - rtsOptsEnabled :: RtsOptsEnabled
  - rtsOptsSuggestions :: Bool
  - hpcDir :: String
  - pluginModNames :: [ModuleName]
  - pluginModNameOpts :: [(ModuleName, String)]
  - frontendPluginOpts :: [String]
  - externalPluginSpecs :: [ExternalPluginSpec]
  - depMakefile :: FilePath
  - depIncludePkgDeps :: Bool
  - depIncludeCppDeps :: Bool
  - depExcludeMods :: [ModuleName]
  - depSuffixes :: [String]
  - packageDBFlags :: [PackageDBFlag]
  - ignorePackageFlags :: [IgnorePackageFlag]
  - packageFlags :: [PackageFlag]
  - pluginPackageFlags :: [PackageFlag]
  - trustFlags :: [TrustFlag]
  - packageEnv :: Maybe FilePath
  - dumpFlags :: EnumSet DumpFlag
  - generalFlags :: EnumSet GeneralFlag
  - warningFlags :: EnumSet WarningFlag
  - fatalWarningFlags :: EnumSet WarningFlag
  - customWarningCategories :: WarningCategorySet
  - fatalCustomWarningCategories :: WarningCategorySet
  - language :: Maybe Language
  - safeHaskell :: SafeHaskellMode
  - safeInfer :: Bool
  - safeInferred :: Bool
  - thOnLoc :: SrcSpan
  - newDerivOnLoc :: SrcSpan
  - deriveViaOnLoc :: SrcSpan
  - overlapInstLoc :: SrcSpan
  - incoherentOnLoc :: SrcSpan
  - pkgTrustOnLoc :: SrcSpan
  - warnSafeOnLoc :: SrcSpan
  - warnUnsafeOnLoc :: SrcSpan
  - trustworthyOnLoc :: SrcSpan
  - extensions :: [OnOff Extension]
  - extensionFlags :: EnumSet Extension
  - unfoldingOpts :: !UnfoldingOpts
  - maxWorkerArgs :: Int
  - maxForcedSpecArgs :: Int
  - ghciHistSize :: Int
  - flushOut :: FlushOut
  - ghcVersionFile :: Maybe FilePath
  - haddockOptions :: Maybe String
  - ghciScripts :: [String]
  - pprUserLength :: Int
  - pprCols :: Int
  - useUnicode :: Bool
  - useColor :: OverridingBool
  - canUseColor :: Bool
  - useErrorLinks :: OverridingBool
  - canUseErrorLinks :: Bool
  - colScheme :: Scheme
  - profAuto :: ProfAuto
  - callerCcFilters :: [CallerCcFilter]
  - interactivePrint :: Maybe String
  - sseVersion :: Maybe SseVersion
  - bmiVersion :: Maybe BmiVersion
  - avx :: Bool
  - avx2 :: Bool
  - avx512cd :: Bool
  - avx512er :: Bool
  - avx512f :: Bool
  - avx512pf :: Bool
  - fma :: Bool
  - maxInlineAllocSize :: Int
  - maxInlineMemcpyInsns :: Int
  - maxInlineMemsetInsns :: Int
  - reverseErrors :: Bool
  - maxErrors :: Maybe Int
  - initialUnique :: Word64
  - uniqueIncrement :: Int
  - cfgWeights :: Weights
  }
- 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_InterModuleFarJumps
  - | 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_SpecEval
  - | Opt_SpecEvalDictFun
  - | 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
- data Severity
  - = SevIgnore
  - | SevWarning
  - | SevError
- data Backend
- gopt :: GeneralFlag -> DynFlags -> Bool
- ncgBackend :: Backend
- llvmBackend :: Backend
- viaCBackend :: Backend
- interpreterBackend :: Backend
- noBackend :: Backend
- data GhcMode
  - = CompManager
  - | OneShot
  - | MkDepend
- data GhcLink
  - = NoLink
  - | LinkBinary
  - | LinkInMemory
  - | LinkDynLib
  - | LinkStaticLib
  - | LinkMergedObj
- parseDynamicFlags :: MonadIO m => Logger -> DynFlags -> [Located String] -> m (DynFlags, [Located String], Messages DriverMessage)
- parseTargetFiles :: DynFlags -> [String] -> (DynFlags, [(String, Maybe Phase)], [String])
- getSessionDynFlags :: GhcMonad m => m DynFlags
- setTopSessionDynFlags :: GhcMonad m => DynFlags -> m ()
- setSessionDynFlags :: (HasCallStack, GhcMonad m) => DynFlags -> m ()
- setUnitDynFlags :: GhcMonad m => UnitId -> DynFlags -> m ()
- getProgramDynFlags :: GhcMonad m => m DynFlags
- setProgramDynFlags :: GhcMonad m => DynFlags -> m Bool
- getInteractiveDynFlags :: GhcMonad m => m DynFlags
- setInteractiveDynFlags :: GhcMonad m => DynFlags -> m ()
- interpretPackageEnv :: Logger -> DynFlags -> IO DynFlags
- data Logger
- getLogger :: HasLogger m => m Logger
- pushLogHook :: (LogAction -> LogAction) -> Logger -> Logger
- popLogHook :: Logger -> Logger
- pushLogHookM :: GhcMonad m => (LogAction -> LogAction) -> m ()
- popLogHookM :: GhcMonad m => m ()
- modifyLogger :: GhcMonad m => (Logger -> Logger) -> m ()
- putMsgM :: GhcMonad m => SDoc -> m ()
- putLogMsgM :: GhcMonad m => MessageClass -> SrcSpan -> SDoc -> m ()
- data Target = Target {
  - targetId :: !TargetId
  - targetAllowObjCode :: !Bool
  - targetUnitId :: !UnitId
  - targetContents :: !(Maybe (InputFileBuffer, UTCTime))
  }
- data TargetId
  - = TargetModule !ModuleName
  - | TargetFile !FilePath !(Maybe Phase)
- data Phase
- setTargets :: GhcMonad m => [Target] -> m ()
- getTargets :: GhcMonad m => m [Target]
- addTarget :: GhcMonad m => Target -> m ()
- removeTarget :: GhcMonad m => TargetId -> m ()
- guessTarget :: GhcMonad m => String -> Maybe UnitId -> Maybe Phase -> m Target
- depanal :: GhcMonad m => [ModuleName] -> Bool -> m ModuleGraph
- depanalE :: GhcMonad m => [ModuleName] -> Bool -> m (DriverMessages, ModuleGraph)
- load :: GhcMonad f => LoadHowMuch -> f SuccessFlag
- loadWithCache :: GhcMonad m => Maybe ModIfaceCache -> (GhcMessage -> AnyGhcDiagnostic) -> LoadHowMuch -> m SuccessFlag
- data LoadHowMuch
  - = LoadAllTargets
  - | LoadUpTo HomeUnitModule
  - | LoadDependenciesOf HomeUnitModule
- data InteractiveImport
  - = IIDecl (ImportDecl GhcPs)
  - | IIModule ModuleName
- data SuccessFlag
  - = Succeeded
  - | Failed
- succeeded :: SuccessFlag -> Bool
- failed :: SuccessFlag -> Bool
- defaultWarnErrLogger :: WarnErrLogger
- type WarnErrLogger = forall (m :: Type -> Type). (HasDynFlags m, MonadIO m, HasLogger m) => Maybe SourceError -> m ()
- workingDirectoryChanged :: GhcMonad m => m ()
- parseModule :: GhcMonad m => ModSummary -> m ParsedModule
- typecheckModule :: GhcMonad m => ParsedModule -> m TypecheckedModule
- desugarModule :: GhcMonad m => TypecheckedModule -> m DesugaredModule
- data ParsedModule = ParsedModule {
  - pm_mod_summary :: ModSummary
  - pm_parsed_source :: ParsedSource
  - pm_extra_src_files :: [FilePath]
  }
- data TypecheckedModule = TypecheckedModule {
  - tm_parsed_module :: ParsedModule
  - tm_renamed_source :: Maybe RenamedSource
  - tm_typechecked_source :: TypecheckedSource
  - tm_checked_module_info :: ModuleInfo
  - tm_internals_ :: (TcGblEnv, ModDetails)
  }
- data DesugaredModule = DesugaredModule {
  - dm_typechecked_module :: TypecheckedModule
  - dm_core_module :: ModGuts
  }
- type TypecheckedSource = LHsBinds GhcTc
- type ParsedSource = Located (HsModule GhcPs)
- type RenamedSource = (HsGroup GhcRn, [LImportDecl GhcRn], Maybe [(LIE GhcRn, Avails)], Maybe (LHsDoc GhcRn), Maybe (XRec GhcRn ModuleName))
- class ParsedMod m => TypecheckedMod m
- class ParsedMod m
- moduleInfo :: TypecheckedMod m => m -> ModuleInfo
- renamedSource :: TypecheckedMod m => m -> Maybe RenamedSource
- typecheckedSource :: TypecheckedMod m => m -> TypecheckedSource
- parsedSource :: ParsedMod m => m -> ParsedSource
- coreModule :: DesugaredMod m => m -> ModGuts
- data PkgQual
  - = NoPkgQual
  - | ThisPkg UnitId
  - | OtherPkg UnitId
- data CoreModule = CoreModule {
  - cm_module :: !Module
  - cm_types :: !TypeEnv
  - cm_binds :: CoreProgram
  - cm_safe :: SafeHaskellMode
  }
- compileToCoreModule :: GhcMonad m => FilePath -> m CoreModule
- compileToCoreSimplified :: GhcMonad m => FilePath -> m CoreModule
- data ModuleGraph
- emptyMG :: ModuleGraph
- mapMG :: (ModSummary -> ModSummary) -> ModuleGraph -> ModuleGraph
- mkModuleGraph :: [ModuleGraphNode] -> ModuleGraph
- mgModSummaries :: ModuleGraph -> [ModSummary]
- mgLookupModule :: ModuleGraph -> Module -> Maybe ModSummary
- data ModSummary = ModSummary {
  - ms_mod :: Module
  - ms_hsc_src :: HscSource
  - ms_location :: ModLocation
  - ms_hs_hash :: Fingerprint
  - ms_obj_date :: Maybe UTCTime
  - ms_dyn_obj_date :: !(Maybe UTCTime)
  - ms_iface_date :: Maybe UTCTime
  - ms_hie_date :: Maybe UTCTime
  - ms_srcimps :: [(PkgQual, Located ModuleName)]
  - ms_textual_imps :: [(PkgQual, Located ModuleName)]
  - ms_ghc_prim_import :: !Bool
  - ms_parsed_mod :: Maybe HsParsedModule
  - ms_hspp_file :: FilePath
  - ms_hspp_opts :: DynFlags
  - ms_hspp_buf :: Maybe StringBuffer
  }
- ms_mod_name :: ModSummary -> ModuleName
- data ModLocation = ModLocation {
  - ml_hs_file :: Maybe FilePath
  - ml_hi_file :: FilePath
  - ml_dyn_hi_file :: FilePath
  - ml_obj_file :: FilePath
  - ml_dyn_obj_file :: FilePath
  - ml_hie_file :: FilePath
  }
- getModSummary :: GhcMonad m => ModuleName -> m ModSummary
- getModuleGraph :: GhcMonad m => m ModuleGraph
- isLoaded :: GhcMonad m => ModuleName -> m Bool
- isLoadedModule :: GhcMonad m => UnitId -> ModuleName -> m Bool
- topSortModuleGraph :: Bool -> ModuleGraph -> Maybe HomeUnitModule -> [SCC ModuleGraphNode]
- data ModuleInfo
- getModuleInfo :: GhcMonad m => Module -> m (Maybe ModuleInfo)
- modInfoTyThings :: ModuleInfo -> [TyThing]
- modInfoTopLevelScope :: ModuleInfo -> Maybe [Name]
- modInfoExports :: ModuleInfo -> [Name]
- modInfoExportsWithSelectors :: ModuleInfo -> [Name]
- modInfoInstances :: ModuleInfo -> [ClsInst]
- modInfoIsExportedName :: ModuleInfo -> Name -> Bool
- modInfoLookupName :: GhcMonad m => ModuleInfo -> Name -> m (Maybe TyThing)
- modInfoIface :: ModuleInfo -> Maybe ModIface
- modInfoRdrEnv :: ModuleInfo -> Maybe IfGlobalRdrEnv
- modInfoSafe :: ModuleInfo -> SafeHaskellMode
- lookupGlobalName :: GhcMonad m => Name -> m (Maybe TyThing)
- findGlobalAnns :: (GhcMonad m, Typeable a) => ([Word8] -> a) -> AnnTarget Name -> m [a]
- mkNamePprCtxForModule :: GhcMonad m => ModuleInfo -> m (Maybe NamePprCtx)
- type ModIface = ModIface_ 'ModIfaceFinal
- data ModIface_ (phase :: ModIfacePhase) = ModIface {
  - mi_module :: !Module
  - mi_sig_of :: !(Maybe Module)
  - mi_hsc_src :: !HscSource
  - mi_deps :: Dependencies
  - mi_usages :: [Usage]
  - mi_exports :: ![IfaceExport]
  - mi_used_th :: !Bool
  - mi_fixities :: [(OccName, Fixity)]
  - mi_warns :: IfaceWarnings
  - mi_anns :: [IfaceAnnotation]
  - mi_decls :: [IfaceDeclExts phase]
  - mi_extra_decls :: Maybe [IfaceBindingX IfaceMaybeRhs IfaceTopBndrInfo]
  - mi_globals :: !(Maybe IfGlobalRdrEnv)
  - mi_insts :: [IfaceClsInst]
  - mi_fam_insts :: [IfaceFamInst]
  - mi_rules :: [IfaceRule]
  - mi_hpc :: !AnyHpcUsage
  - mi_trust :: !IfaceTrustInfo
  - mi_trust_pkg :: !Bool
  - mi_complete_matches :: ![IfaceCompleteMatch]
  - mi_docs :: !(Maybe Docs)
  - mi_final_exts :: !(IfaceBackendExts phase)
  - mi_ext_fields :: !ExtensibleFields
  - mi_src_hash :: !Fingerprint
  }
- data SafeHaskellMode
  - = Sf_None
  - | Sf_Unsafe
  - | Sf_Trustworthy
  - | Sf_Safe
  - | Sf_SafeInferred
  - | Sf_Ignore
- data NamePprCtx
- alwaysQualify :: NamePprCtx
- execStmt :: GhcMonad m => String -> ExecOptions -> m ExecResult
- execStmt' :: GhcMonad m => GhciLStmt GhcPs -> String -> ExecOptions -> m ExecResult
- data ExecOptions = ExecOptions {
  - execSingleStep :: SingleStep
  - execSourceFile :: String
  - execLineNumber :: Int
  - execWrap :: ForeignHValue -> EvalExpr ForeignHValue
  }
- execOptions :: ExecOptions
- data ExecResult
  - = ExecComplete {
    - execResult :: Either SomeException [Name]
    - execAllocation :: Word64
    }
  - | ExecBreak {
    - breakNames :: [Name]
    - breakPointId :: Maybe InternalBreakpointId
    }
- resumeExec :: GhcMonad m => (SrcSpan -> Bool) -> SingleStep -> Maybe Int -> m ExecResult
- runDecls :: GhcMonad m => String -> m [Name]
- runDeclsWithLocation :: GhcMonad m => String -> Int -> String -> m [Name]
- runParsedDecls :: GhcMonad m => [LHsDecl GhcPs] -> m [Name]
- parseImportDecl :: GhcMonad m => String -> m (ImportDecl GhcPs)
- setContext :: GhcMonad m => [InteractiveImport] -> m ()
- getContext :: GhcMonad m => m [InteractiveImport]
- setGHCiMonad :: GhcMonad m => String -> m ()
- getGHCiMonad :: GhcMonad m => m Name
- getBindings :: GhcMonad m => m [TyThing]
- getInsts :: GhcMonad m => m ([ClsInst], [FamInst])
- getNamePprCtx :: GhcMonad m => m NamePprCtx
- findModule :: GhcMonad m => ModuleName -> Maybe FastString -> m Module
- lookupModule :: GhcMonad m => ModuleName -> Maybe FastString -> m Module
- findQualifiedModule :: GhcMonad m => PkgQual -> ModuleName -> m Module
- lookupQualifiedModule :: GhcMonad m => PkgQual -> ModuleName -> m Module
- renamePkgQualM :: GhcMonad m => ModuleName -> Maybe FastString -> m PkgQual
- renameRawPkgQualM :: GhcMonad m => ModuleName -> RawPkgQual -> m PkgQual
- isModuleTrusted :: GhcMonad m => Module -> m Bool
- moduleTrustReqs :: GhcMonad m => Module -> m (Bool, Set UnitId)
- getNamesInScope :: GhcMonad m => m [Name]
- getRdrNamesInScope :: GhcMonad m => m [RdrName]
- getGRE :: GhcMonad m => m GlobalRdrEnv
- moduleIsInterpreted :: GhcMonad m => Module -> m Bool
- getInfo :: GhcMonad m => Bool -> Name -> m (Maybe (TyThing, Fixity, [ClsInst], [FamInst], SDoc))
- showModule :: GhcMonad m => ModSummary -> m String
- moduleIsBootOrNotObjectLinkable :: GhcMonad m => ModSummary -> m Bool
- getNameToInstancesIndex :: GhcMonad m => [Module] -> Maybe [Module] -> m (Messages TcRnMessage, Maybe (NameEnv ([ClsInst], [FamInst])))
- exprType :: GhcMonad m => TcRnExprMode -> String -> m Type
- data TcRnExprMode
  - = TM_Inst
  - | TM_Default
- typeKind :: GhcMonad m => Bool -> String -> m (Type, Kind)
- parseName :: GhcMonad m => String -> m (NonEmpty Name)
- lookupName :: GhcMonad m => Name -> m (Maybe TyThing)
- data HValue
- parseExpr :: GhcMonad m => String -> m (LHsExpr GhcPs)
- compileParsedExpr :: GhcMonad m => LHsExpr GhcPs -> m HValue
- compileExpr :: GhcMonad m => String -> m HValue
- dynCompileExpr :: GhcMonad m => String -> m Dynamic
- type ForeignHValue = ForeignRef HValue
- compileExprRemote :: GhcMonad m => String -> m ForeignHValue
- compileParsedExprRemote :: GhcMonad m => LHsExpr GhcPs -> m ForeignHValue
- getDocs :: GhcMonad m => Name -> m (Either GetDocsFailure (Maybe [HsDoc GhcRn], IntMap (HsDoc GhcRn)))
- data GetDocsFailure
  - = NameHasNoModule Name
  - | NoDocsInIface Module Bool
  - | InteractiveName
- runTcInteractive :: HscEnv -> TcRn a -> IO (Messages TcRnMessage, Maybe a)
- isStmt :: ParserOpts -> String -> Bool
- hasImport :: ParserOpts -> String -> Bool
- isImport :: ParserOpts -> String -> Bool
- isDecl :: ParserOpts -> String -> Bool
- data SingleStep
  - = RunToCompletion
  - | SingleStep
  - | RunAndLogSteps
- data Resume = Resume {
  - resumeStmt :: String
  - resumeContext :: ForeignRef (ResumeContext [HValueRef])
  - resumeBindings :: ResumeBindings
  - resumeFinalIds :: [Id]
  - resumeApStack :: ForeignHValue
  - resumeBreakpointId :: Maybe InternalBreakpointId
  - resumeSpan :: SrcSpan
  - resumeDecl :: String
  - resumeCCS :: RemotePtr CostCentreStack
  - resumeHistory :: [History]
  - resumeHistoryIx :: Int
  }
- data History
- getHistorySpan :: GhcMonad m => History -> m SrcSpan
- getHistoryModule :: History -> Module
- abandon :: GhcMonad m => m Bool
- abandonAll :: GhcMonad m => m Bool
- getResumeContext :: GhcMonad m => m [Resume]
- obtainTermFromId :: GhcMonad m => Int -> Bool -> Id -> m Term
- obtainTermFromVal :: GhcMonad m => Int -> Bool -> Type -> a -> m Term
- reconstructType :: HscEnv -> Int -> Id -> IO (Maybe Type)
- modInfoModBreaks :: ModuleInfo -> ModBreaks
- data ModBreaks = ModBreaks {
  - modBreaks_flags :: ForeignRef BreakArray
  - modBreaks_locs :: !(Array BreakIndex SrcSpan)
  - modBreaks_vars :: !(Array BreakIndex [OccName])
  - modBreaks_decls :: !(Array BreakIndex [String])
  - modBreaks_ccs :: !(Array BreakIndex (RemotePtr CostCentre))
  - modBreaks_breakInfo :: IntMap CgBreakInfo
  - modBreaks_module :: RemotePtr ModuleName
  }
- type BreakIndex = Int
- data BreakpointId = BreakpointId {
  - bi_tick_mod :: !Module
  - bi_tick_index :: !Int
  }
- data InternalBreakpointId = InternalBreakpointId {
  - ibi_tick_mod :: !Module
  - ibi_tick_index :: !Int
  - ibi_info_mod :: !Module
  - ibi_info_index :: !Int
  }
- back :: GhcMonad m => Int -> m ([Name], Int, SrcSpan, String)
- forward :: GhcMonad m => Int -> m ([Name], Int, SrcSpan, String)
- setupBreakpoint :: GhcMonad m => HscEnv -> BreakpointId -> Int -> m ()
- type Unit = GenUnit UnitId
- type Module = GenModule Unit
- mkModule :: u -> ModuleName -> GenModule u
- pprModule :: IsLine doc => Module -> doc
- moduleName :: GenModule unit -> ModuleName
- moduleUnit :: GenModule unit -> unit
- data Name
- isExternalName :: Name -> Bool
- nameModule :: HasDebugCallStack => Name -> Module
- pprParenSymName :: NamedThing a => a -> SDoc
- nameSrcSpan :: Name -> SrcSpan
- class NamedThing a where
  - getOccName :: a -> OccName
  - getName :: a -> Name
- data RdrName
  - = Unqual OccName
  - | Qual ModuleName OccName
- type Id = Var
- idType :: Id -> Kind
- isImplicitId :: Id -> Bool
- isDeadBinder :: Id -> Bool
- isExportedId :: Var -> Bool
- isLocalId :: Var -> Bool
- isGlobalId :: Var -> Bool
- isRecordSelector :: Id -> Bool
- isPrimOpId :: Id -> Bool
- isFCallId :: Id -> Bool
- isClassOpId_maybe :: Id -> Maybe Class
- isDataConWorkId :: Id -> Bool
- idDataCon :: Id -> DataCon
- isDeadEndId :: Var -> Bool
- isDictonaryId :: Id -> Bool
- recordSelectorTyCon :: Id -> RecSelParent
- data TyCon
- tyConTyVars :: TyCon -> [TyVar]
- tyConDataCons :: TyCon -> [DataCon]
- tyConArity :: TyCon -> Arity
- isClassTyCon :: TyCon -> Bool
- isTypeSynonymTyCon :: TyCon -> Bool
- isTypeFamilyTyCon :: TyCon -> Bool
- isNewTyCon :: TyCon -> Bool
- isPrimTyCon :: TyCon -> Bool
- isFamilyTyCon :: TyCon -> Bool
- isOpenFamilyTyCon :: TyCon -> Bool
- isOpenTypeFamilyTyCon :: TyCon -> Bool
- tyConClass_maybe :: TyCon -> Maybe Class
- synTyConRhs_maybe :: TyCon -> Maybe Type
- synTyConDefn_maybe :: TyCon -> Maybe ([TyVar], Type)
- tyConKind :: TyCon -> Kind
- type TyVar = Var
- alphaTyVars :: [TyVar]
- data DataCon
- dataConType :: DataCon -> Type
- dataConTyCon :: DataCon -> TyCon
- dataConFieldLabels :: DataCon -> [FieldLabel]
- dataConIsInfix :: DataCon -> Bool
- isVanillaDataCon :: DataCon -> Bool
- dataConWrapperType :: DataCon -> Type
- dataConSrcBangs :: DataCon -> [HsSrcBang]
- data StrictnessMark
  - = MarkedStrict
  - | NotMarkedStrict
- isMarkedStrict :: StrictnessMark -> Bool
- data Class
- classMethods :: Class -> [Id]
- classSCTheta :: Class -> [PredType]
- classTvsFds :: Class -> ([TyVar], [FunDep TyVar])
- classATs :: Class -> [TyCon]
- pprFundeps :: Outputable a => [FunDep a] -> SDoc
- data ClsInst
- instanceDFunId :: ClsInst -> DFunId
- pprInstance :: ClsInst -> SDoc
- pprInstanceHdr :: ClsInst -> SDoc
- pprFamInst :: FamInst -> SDoc
- data FamInst
- data Type
- splitForAllTyCoVars :: Type -> ([TyCoVar], Type)
- funResultTy :: HasDebugCallStack => Type -> Type
- pprParendType :: Type -> SDoc
- pprTypeApp :: TyCon -> [Type] -> SDoc
- type Kind = Type
- type PredType = Type
- type ThetaType = [PredType]
- pprForAll :: [ForAllTyBinder] -> SDoc
- pprThetaArrowTy :: ThetaType -> SDoc
- parseInstanceHead :: GhcMonad m => String -> m Type
- getInstancesForType :: GhcMonad m => Type -> m [ClsInst]
- data TyThing
  - = AnId Id
  - | AConLike ConLike
  - | ATyCon TyCon
  - | ACoAxiom (CoAxiom Branched)
- module GHC.Hs
- data FixityDirection
  - = InfixL
  - | InfixR
  - | InfixN
- defaultFixity :: Fixity
- maxPrecedence :: Int
- negateFixity :: Fixity
- compareFixity :: Fixity -> Fixity -> (Bool, Bool)
- data LexicalFixity
  - = Prefix
  - | Infix
- data SrcLoc
  - = RealSrcLoc !RealSrcLoc !(Maybe BufPos)
  - | UnhelpfulLoc !FastString
- data RealSrcLoc
- mkSrcLoc :: FastString -> Int -> Int -> SrcLoc
- noSrcLoc :: SrcLoc
- srcLocFile :: RealSrcLoc -> FastString
- srcLocLine :: RealSrcLoc -> Int
- srcLocCol :: RealSrcLoc -> Int
- data SrcSpan
  - = RealSrcSpan !RealSrcSpan !(Maybe BufSpan)
  - | UnhelpfulSpan !UnhelpfulSpanReason
- data RealSrcSpan
- mkSrcSpan :: SrcLoc -> SrcLoc -> SrcSpan
- srcLocSpan :: SrcLoc -> SrcSpan
- isGoodSrcSpan :: SrcSpan -> Bool
- noSrcSpan :: SrcSpan
- srcSpanStart :: SrcSpan -> SrcLoc
- srcSpanEnd :: SrcSpan -> SrcLoc
- srcSpanFile :: RealSrcSpan -> FastString
- srcSpanStartLine :: RealSrcSpan -> Int
- srcSpanEndLine :: RealSrcSpan -> Int
- srcSpanStartCol :: RealSrcSpan -> Int
- srcSpanEndCol :: RealSrcSpan -> Int
- data GenLocated l e = L l e
- type Located = GenLocated SrcSpan
- type RealLocated = GenLocated RealSrcSpan
- noLoc :: e -> Located e
- mkGeneralLocated :: String -> e -> Located e
- getLoc :: GenLocated l e -> l
- unLoc :: GenLocated l e -> e
- getRealSrcSpan :: RealLocated a -> RealSrcSpan
- unRealSrcSpan :: RealLocated a -> a
- eqLocated :: Eq a => GenLocated l a -> GenLocated l a -> Bool
- cmpLocated :: Ord a => GenLocated l a -> GenLocated l a -> Ordering
- combineLocs :: Located a -> Located b -> SrcSpan
- addCLoc :: Located a -> Located b -> c -> Located c
- leftmost_smallest :: SrcSpan -> SrcSpan -> Ordering
- leftmost_largest :: SrcSpan -> SrcSpan -> Ordering
- rightmost_smallest :: SrcSpan -> SrcSpan -> Ordering
- spans :: SrcSpan -> (Int, Int) -> Bool
- isSubspanOf :: SrcSpan -> SrcSpan -> Bool
- data GhcException
  - = Signal Int
  - | UsageError String
  - | CmdLineError String
  - | Panic String
  - | PprPanic String SDoc
  - | Sorry String
  - | PprSorry String SDoc
  - | InstallationError String
  - | ProgramError String
  - | PprProgramError String SDoc
- showGhcException :: SDocContext -> GhcException -> ShowS
- newtype GhcApiError = GhcApiError String
- data Token
- getTokenStream :: ModSummary -> IO [Located Token]
- getRichTokenStream :: ModSummary -> IO [(Located Token, String)]
- showRichTokenStream :: [(Located Token, String)] -> String
- addSourceToTokens :: RealSrcLoc -> StringBuffer -> [Located Token] -> [(Located Token, String)]
- parser :: String -> DynFlags -> FilePath -> (WarningMessages, Either ErrorMessages (Located (HsModule GhcPs)))
- data AnnKeywordId
  - = AnnAnyclass
  - | AnnAs
  - | AnnBang
  - | AnnBackquote
  - | AnnBy
  - | AnnCase
  - | AnnCases
  - | AnnClass
  - | AnnClose
  - | AnnCloseB
  - | AnnCloseBU
  - | AnnCloseC
  - | AnnCloseQ
  - | AnnCloseQU
  - | AnnCloseP
  - | AnnClosePH
  - | AnnCloseS
  - | AnnColon
  - | AnnComma
  - | AnnCommaTuple
  - | AnnDarrow
  - | AnnDarrowU
  - | AnnData
  - | AnnDcolon
  - | AnnDcolonU
  - | AnnDefault
  - | AnnDeriving
  - | AnnDo
  - | AnnDot
  - | AnnDotdot
  - | AnnElse
  - | AnnEqual
  - | AnnExport
  - | AnnFamily
  - | AnnForall
  - | AnnForallU
  - | AnnForeign
  - | AnnFunId
  - | AnnGroup
  - | AnnHeader
  - | AnnHiding
  - | AnnIf
  - | AnnImport
  - | AnnIn
  - | AnnInfix
  - | AnnInstance
  - | AnnLam
  - | AnnLarrow
  - | AnnLarrowU
  - | AnnLet
  - | AnnLollyU
  - | AnnMdo
  - | AnnMinus
  - | AnnModule
  - | AnnNewtype
  - | AnnName
  - | AnnOf
  - | AnnOpen
  - | AnnOpenB
  - | AnnOpenBU
  - | AnnOpenC
  - | AnnOpenE
  - | AnnOpenEQ
  - | AnnOpenEQU
  - | AnnOpenP
  - | AnnOpenS
  - | AnnOpenPH
  - | AnnDollar
  - | AnnDollarDollar
  - | AnnPackageName
  - | AnnPattern
  - | AnnPercent
  - | AnnPercentOne
  - | AnnProc
  - | AnnQualified
  - | AnnRarrow
  - | AnnRarrowU
  - | AnnRec
  - | AnnRole
  - | AnnSafe
  - | AnnSemi
  - | AnnSimpleQuote
  - | AnnSignature
  - | AnnStatic
  - | AnnStock
  - | AnnThen
  - | AnnThTyQuote
  - | AnnTilde
  - | AnnType
  - | AnnUnit
  - | AnnUsing
  - | AnnVal
  - | AnnValStr
  - | AnnVbar
  - | AnnVia
  - | AnnWhere
  - | Annlarrowtail
  - | AnnlarrowtailU
  - | Annrarrowtail
  - | AnnrarrowtailU
  - | AnnLarrowtail
  - | AnnLarrowtailU
  - | AnnRarrowtail
  - | AnnRarrowtailU
- data EpaComment = EpaComment {
  - ac_tok :: EpaCommentTok
  - ac_prior_tok :: RealSrcSpan
  }
- cyclicModuleErr :: [ModuleGraphNode] -> SDoc

# Initialisation

defaultErrorHandler :: ExceptionMonad m => FatalMessager -> FlushOut -> m a -> m a Source #

Install some default exception handlers and run the inner computation. Unless you want to handle exceptions yourself, you should wrap this around the top level of your program. The default handlers output the error message(s) to stderr and exit cleanly.

defaultCleanupHandler :: ExceptionMonad m => DynFlags -> m a -> m a Source #

Deprecated: Cleanup is now done by runGhc/runGhcT

This function is no longer necessary, cleanup is now done by runGhc/runGhcT.

prettyPrintGhcErrors :: ExceptionMonad m => Logger -> m a -> m a Source #

withSignalHandlers :: ExceptionMonad m => m a -> m a Source #

Temporarily install standard signal handlers for catching ^C, which just throw an exception in the current thread.

withCleanupSession :: GhcMonad m => m a -> m a Source #

# GHC Monad

data Ghc a Source #

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

Instances details

MonadIO Ghc Source # |
Instance details Defined in GHC.Driver.Monad Methods liftIO :: IO a -> Ghc a Source #
MonadCatch Ghc Source # |
Instance details Defined in GHC.Driver.Monad Methods catch :: (HasCallStack, Exception e) => Ghc a -> (e -> Ghc a) -> Ghc a Source #
MonadMask Ghc Source # |
Instance details Defined in GHC.Driver.Monad Methods mask :: HasCallStack => ((forall a. Ghc a -> Ghc a) -> Ghc b) -> Ghc b Source # uninterruptibleMask :: HasCallStack => ((forall a. Ghc a -> Ghc a) -> Ghc b) -> Ghc b Source # generalBracket :: HasCallStack => Ghc a -> (a -> ExitCase b -> Ghc c) -> (a -> Ghc b) -> Ghc (b, c) Source #
MonadThrow Ghc Source # |
Instance details Defined in GHC.Driver.Monad Methods throwM :: (HasCallStack, Exception e) => e -> Ghc a Source #
HasDynFlags Ghc Source # |
Instance details Defined in GHC.Driver.Monad Methods getDynFlags :: Ghc DynFlags Source #
GhcMonad Ghc Source # |
Instance details Defined in GHC.Driver.Monad Methods getSession :: Ghc HscEnv Source # setSession :: HscEnv -> Ghc () Source #
HasLogger Ghc Source # |
Instance details Defined in GHC.Driver.Monad Methods getLogger :: Ghc Logger Source #
Applicative Ghc Source # |
Instance details Defined in GHC.Driver.Monad Methods pure :: a -> Ghc a # (<*>) :: Ghc (a -> b) -> Ghc a -> Ghc b # liftA2 :: (a -> b -> c) -> Ghc a -> Ghc b -> Ghc c # (*>) :: Ghc a -> Ghc b -> Ghc b # (<*) :: Ghc a -> Ghc b -> Ghc a #
Functor Ghc Source # |
Instance details Defined in GHC.Driver.Monad Methods fmap :: (a -> b) -> Ghc a -> Ghc b # (<$) :: a -> Ghc b -> Ghc a #
Monad Ghc Source # |
Instance details Defined in GHC.Driver.Monad Methods (>>=) :: Ghc a -> (a -> Ghc b) -> Ghc b # (>>) :: Ghc a -> Ghc b -> Ghc b # return :: a -> Ghc a #
MonadFail Ghc Source # |
Instance details Defined in GHC.Driver.Monad Methods fail :: String -> Ghc a #
MonadFix Ghc Source # |
Instance details Defined in GHC.Driver.Monad Methods mfix :: (a -> Ghc a) -> Ghc a #

data GhcT (m :: Type -> Type) a Source #

A monad transformer to add GHC specific features to another monad.

Note that the wrapped monad must support IO and handling of exceptions.

#### Instances

Instances details

MonadIO m => MonadIO (GhcT m) Source # |
Instance details Defined in GHC.Driver.Monad Methods liftIO :: IO a -> GhcT m a Source #
MonadCatch m => MonadCatch (GhcT m) Source # |
Instance details Defined in GHC.Driver.Monad Methods catch :: (HasCallStack, Exception e) => GhcT m a -> (e -> GhcT m a) -> GhcT m a Source #
MonadMask m => MonadMask (GhcT m) Source # |
Instance details Defined in GHC.Driver.Monad Methods mask :: HasCallStack => ((forall a. GhcT m a -> GhcT m a) -> GhcT m b) -> GhcT m b Source # uninterruptibleMask :: HasCallStack => ((forall a. GhcT m a -> GhcT m a) -> GhcT m b) -> GhcT m b Source # generalBracket :: HasCallStack => GhcT m a -> (a -> ExitCase b -> GhcT m c) -> (a -> GhcT m b) -> GhcT m (b, c) Source #
MonadThrow m => MonadThrow (GhcT m) Source # |
Instance details Defined in GHC.Driver.Monad Methods throwM :: (HasCallStack, Exception e) => e -> GhcT m a Source #
MonadIO m => HasDynFlags (GhcT m) Source # |
Instance details Defined in GHC.Driver.Monad Methods getDynFlags :: GhcT m DynFlags Source #
ExceptionMonad m => GhcMonad (GhcT m) Source # |
Instance details Defined in GHC.Driver.Monad Methods getSession :: GhcT m HscEnv Source # setSession :: HscEnv -> GhcT m () Source #
MonadIO m => HasLogger (GhcT m) Source # |
Instance details Defined in GHC.Driver.Monad Methods getLogger :: GhcT m Logger Source #
Applicative m => Applicative (GhcT m) Source # |
Instance details Defined in GHC.Driver.Monad Methods pure :: a -> GhcT m a # (<*>) :: GhcT m (a -> b) -> GhcT m a -> GhcT m b # liftA2 :: (a -> b -> c) -> GhcT m a -> GhcT m b -> GhcT m c # (*>) :: GhcT m a -> GhcT m b -> GhcT m b # (<*) :: GhcT m a -> GhcT m b -> GhcT m a #
Functor m => Functor (GhcT m) Source # |
Instance details Defined in GHC.Driver.Monad Methods fmap :: (a -> b) -> GhcT m a -> GhcT m b # (<$) :: a -> GhcT m b -> GhcT m a #
Monad m => Monad (GhcT m) Source # |
Instance details Defined in GHC.Driver.Monad Methods (>>=) :: GhcT m a -> (a -> GhcT m b) -> GhcT m b # (>>) :: GhcT m a -> GhcT m b -> GhcT m b # return :: a -> GhcT m a #
MonadFail m => MonadFail (GhcT m) Source # |
Instance details Defined in GHC.Driver.Monad Methods fail :: String -> GhcT m a #
MonadFix m => MonadFix (GhcT m) Source # |
Instance details Defined in GHC.Driver.Monad Methods mfix :: (a -> GhcT m a) -> GhcT m a #

class (Functor m, ExceptionMonad m, HasDynFlags m, HasLogger m) => GhcMonad (m :: Type -> Type) where Source #

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.

Methods

getSession :: m HscEnv Source #

setSession :: HscEnv -> m () Source #

#### Instances

Instances details

GhcMonad Ghc Source # |
Instance details Defined in GHC.Driver.Monad Methods getSession :: Ghc HscEnv Source # setSession :: HscEnv -> Ghc () Source #
ExceptionMonad m => GhcMonad (GhcT m) Source # |
Instance details Defined in GHC.Driver.Monad Methods getSession :: GhcT m HscEnv Source # setSession :: HscEnv -> GhcT m () Source #

data HscEnv Source #

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

Instances details

ContainsDynFlags HscEnv Source # |
Instance details Defined in GHC.Driver.Env.Types Methods extractDynFlags :: HscEnv -> DynFlags Source #

runGhc Source #

Arguments

:: Maybe FilePath | See argument to `initGhcMonad`.
-> Ghc a | The action to perform.
-> IO a |

Run function for the `Ghc` monad.

It initialises the GHC session and warnings via `initGhcMonad`. Each call to this function will create a new session which should not be shared among several threads.

Any errors not handled inside the `Ghc` action are propagated as IO exceptions.

runGhcT Source #

Arguments

:: ExceptionMonad m |
=> Maybe FilePath | See argument to `initGhcMonad`.
-> GhcT m a | The action to perform.
-> m a |

Run function for `GhcT` monad transformer.

It initialises the GHC session and warnings via `initGhcMonad`. Each call to this function will create a new session which should not be shared among several threads.

initGhcMonad :: GhcMonad m => Maybe FilePath -> m () Source #

Initialise a GHC session.

If you implement a custom `GhcMonad` you must call this function in the monad run function. It will initialise the session variable and clear all warnings.

The first argument should point to the directory where GHC's library files reside. More precisely, this should be the output of `ghc --print-libdir` of the version of GHC the module using this API is compiled with. For portability, you should use the `ghc-paths` package, available at http://hackage.haskell.org/package/ghc-paths.

printException :: (HasLogger m, MonadIO m, HasDynFlags m) => SourceError -> m () Source #

Print the all diagnostics in a `SourceError`. Useful inside exception handlers.

handleSourceError Source #

Arguments

:: MonadCatch m |
=> (SourceError -> m a) | exception handler
-> m a | action to perform
-> m a |

Perform the given action and call the exception handler if the action throws a `SourceError`. See `SourceError` for more information.

# Flags and settings

data DynFlags Source #

Contains not only a collection of `GeneralFlag`s but also a plethora of information relating to the compilation of a single file or GHC session

Constructors

DynFlags |

Fields

- ghcMode :: GhcMode
- ghcLink :: GhcLink
- backend :: !Backend

  The backend to use (if any).

  Whenever you change the backend, also make sure to set `ghcLink` to something sensible.

  `NoBackend` can be used to avoid generating any output, however, note that:

  - If a program uses Template Haskell the typechecker may need to run code from an imported module. To facilitate this, code generation is enabled for modules imported by modules that use template haskell, using the default backend for the platform. See Note [-fno-code mode].
- ghcNameVersion :: !GhcNameVersion
- fileSettings :: !FileSettings
- targetPlatform :: Platform
- toolSettings :: !ToolSettings
- platformMisc :: !PlatformMisc
- rawSettings :: [(String, String)]
- tmpDir :: TempDir
- llvmOptLevel :: Int

  LLVM optimisation level

- verbosity :: Int

  Verbosity level: see Note [Verbosity levels]

- debugLevel :: Int

  How much debug information to produce

- simplPhases :: Int

  Number of simplifier phases

- maxSimplIterations :: Int

  Max simplifier iterations

- ruleCheck :: Maybe String
- strictnessBefore :: [Int]

  Additional demand analysis

- parMakeCount :: Maybe ParMakeCount

  The number of modules to compile in parallel If unspecified, compile with a single job.

- enableTimeStats :: Bool

  Enable RTS timing statistics?

- ghcHeapSize :: Maybe Int

  The heap size to set.

- maxRelevantBinds :: Maybe Int

  Maximum number of bindings from the type envt to show in type error messages

- maxValidHoleFits :: Maybe Int

  Maximum number of hole fits to show in typed hole error messages

- maxRefHoleFits :: Maybe Int

  Maximum number of refinement hole fits to show in typed hole error messages

- refLevelHoleFits :: Maybe Int

  Maximum level of refinement for refinement hole fits in typed hole error messages

- maxUncoveredPatterns :: Int

  Maximum number of unmatched patterns to show in non-exhaustiveness warnings

- maxPmCheckModels :: Int

  Soft limit on the number of models the pattern match checker checks a pattern against. A safe guard against exponential blow-up.

- simplTickFactor :: Int

  Multiplier for simplifier ticks

- dmdUnboxWidth :: !Int

  Whether DmdAnal should optimistically put an Unboxed demand on returned products with at most this number of fields

- specConstrThreshold :: Maybe Int

  Threshold for SpecConstr

- specConstrCount :: Maybe Int

  Max number of specialisations for any one function

- specConstrRecursive :: Int

  Max number of specialisations for recursive types Not optional; otherwise ForceSpecConstr can diverge.

- binBlobThreshold :: Maybe Word

  Binary literals (e.g. strings) whose size is above this threshold will be dumped in a binary file by the assembler code generator. 0 and Nothing disables this feature. See `Config`.

- liberateCaseThreshold :: Maybe Int

  Threshold for LiberateCase

- floatLamArgs :: Maybe Int

  Arg count for lambda floating See `FloatOutSwitches`

- liftLamsRecArgs :: Maybe Int

  Maximum number of arguments after lambda lifting a recursive function.

- liftLamsNonRecArgs :: Maybe Int

  Maximum number of arguments after lambda lifting a non-recursive function.

- liftLamsKnown :: Bool

  Lambda lift even when this turns a known call into an unknown call.

- cmmProcAlignment :: Maybe Int

  Align Cmm functions at this boundary or use default.

- historySize :: Int

  Simplification history size

- importPaths :: [FilePath]
- mainModuleNameIs :: ModuleName
- mainFunIs :: Maybe String
- reductionDepth :: IntWithInf

  Typechecker maximum stack depth

- solverIterations :: IntWithInf

  Number of iterations in the constraints solver Typically only 1 is needed

- givensFuel :: Int

  Number of layers of superclass expansion for givens Should be < solverIterations See Note [Expanding Recursive Superclasses and ExpansionFuel]

- wantedsFuel :: Int

  Number of layers of superclass expansion for wanteds Should be < givensFuel See Note [Expanding Recursive Superclasses and ExpansionFuel]

- qcsFuel :: Int

  Number of layers of superclass expansion for quantified constraints Should be < givensFuel See Note [Expanding Recursive Superclasses and ExpansionFuel]

- homeUnitId_ :: UnitId

  Target home unit-id

- homeUnitInstanceOf_ :: Maybe UnitId

  Id of the unit to instantiate

- homeUnitInstantiations_ :: [(ModuleName, Module)]

  Module instantiations

- workingDirectory :: Maybe FilePath
- thisPackageName :: Maybe String

  What the package is called, use with multiple home units

- hiddenModules :: Set ModuleName
- reexportedModules :: Set ModuleName
- targetWays_ :: Ways

  Target way flags from the command line

- splitInfo :: Maybe (String, Int)
- objectDir :: Maybe String
- dylibInstallName :: Maybe String
- hiDir :: Maybe String
- hieDir :: Maybe String
- stubDir :: Maybe String
- dumpDir :: Maybe String
- objectSuf_ :: String
- hcSuf :: String
- hiSuf_ :: String
- hieSuf :: String
- dynObjectSuf_ :: String
- dynHiSuf_ :: String
- outputFile_ :: Maybe String
- dynOutputFile_ :: Maybe String
- outputHi :: Maybe String
- dynOutputHi :: Maybe String
- dynLibLoader :: DynLibLoader
- dynamicNow :: !Bool

  Indicate if we are now generating dynamic output because of -dynamic-too. This predicate is used to query the appropriate fields (outputFile/dynOutputFile, ways, etc.)

- dumpPrefix :: FilePath

  This defaults to 'non-module'. It can be set by `setDumpPrefix` or 'ghc.GHCi.UI.runStmt' based on where its output is going.

- dumpPrefixForce :: Maybe FilePath

  Override the `dumpPrefix` set by `setDumpPrefix` or 'ghc.GHCi.UI.runStmt'. Set by `-ddump-file-prefix`

- ldInputs :: [Option]
- includePaths :: IncludeSpecs
- libraryPaths :: [String]
- frameworkPaths :: [String]
- cmdlineFrameworks :: [String]
- rtsOpts :: Maybe String
- rtsOptsEnabled :: RtsOptsEnabled
- rtsOptsSuggestions :: Bool
- hpcDir :: String

  Path to store the .mix files

- pluginModNames :: [ModuleName]

  the `-fplugin` flags given on the command line, in *reverse* order that they're specified on the command line.

- pluginModNameOpts :: [(ModuleName, String)]
- frontendPluginOpts :: [String]

  the `-ffrontend-opt` flags given on the command line, in *reverse* order that they're specified on the command line.

- externalPluginSpecs :: [ExternalPluginSpec]

  External plugins loaded from shared libraries

- depMakefile :: FilePath
- depIncludePkgDeps :: Bool
- depIncludeCppDeps :: Bool
- depExcludeMods :: [ModuleName]
- depSuffixes :: [String]
- packageDBFlags :: [PackageDBFlag]

  The `-package-db` flags given on the command line, In *reverse* order that they're specified on the command line. This is intended to be applied with the list of "initial" package databases derived from `GHC_PACKAGE_PATH`; see `getUnitDbRefs`.

- ignorePackageFlags :: [IgnorePackageFlag]

  The `-ignore-package` flags from the command line. In *reverse* order that they're specified on the command line.

- packageFlags :: [PackageFlag]

  The `-package` and `-hide-package` flags from the command-line. In *reverse* order that they're specified on the command line.

- pluginPackageFlags :: [PackageFlag]

  The `-plugin-package-id` flags from command line. In *reverse* order that they're specified on the command line.

- trustFlags :: [TrustFlag]

  The `-trust` and `-distrust` flags. In *reverse* order that they're specified on the command line.

- packageEnv :: Maybe FilePath

  Filepath to the package environment file (if overriding default)

- dumpFlags :: EnumSet DumpFlag
- generalFlags :: EnumSet GeneralFlag
- warningFlags :: EnumSet WarningFlag
- fatalWarningFlags :: EnumSet WarningFlag
- customWarningCategories :: WarningCategorySet
- fatalCustomWarningCategories :: WarningCategorySet
- language :: Maybe Language
- safeHaskell :: SafeHaskellMode

  Safe Haskell mode

- safeInfer :: Bool
- safeInferred :: Bool
- thOnLoc :: SrcSpan
- newDerivOnLoc :: SrcSpan
- deriveViaOnLoc :: SrcSpan
- overlapInstLoc :: SrcSpan
- incoherentOnLoc :: SrcSpan
- pkgTrustOnLoc :: SrcSpan
- warnSafeOnLoc :: SrcSpan
- warnUnsafeOnLoc :: SrcSpan
- trustworthyOnLoc :: SrcSpan
- extensions :: [OnOff Extension]
- extensionFlags :: EnumSet Extension
- unfoldingOpts :: !UnfoldingOpts

  Unfolding control See Note [Discounts and thresholds] in GHC.Core.Unfold

- maxWorkerArgs :: Int
- maxForcedSpecArgs :: Int
- ghciHistSize :: Int
- flushOut :: FlushOut
- ghcVersionFile :: Maybe FilePath
- haddockOptions :: Maybe String
- ghciScripts :: [String]

  GHCi scripts specified by -ghci-script, in reverse order

- pprUserLength :: Int
- pprCols :: Int
- useUnicode :: Bool
- useColor :: OverridingBool
- canUseColor :: Bool
- useErrorLinks :: OverridingBool
- canUseErrorLinks :: Bool
- colScheme :: Scheme
- profAuto :: ProfAuto

  what kind of {-# SCC #-} to add automatically

- callerCcFilters :: [CallerCcFilter]
- interactivePrint :: Maybe String
- sseVersion :: Maybe SseVersion

  Machine dependent flags (-m<blah> stuff)

- bmiVersion :: Maybe BmiVersion
- avx :: Bool
- avx2 :: Bool
- avx512cd :: Bool
- avx512er :: Bool
- avx512f :: Bool
- avx512pf :: Bool
- fma :: Bool

  Enable FMA instructions.

- maxInlineAllocSize :: Int

  Max size, in bytes, of inline array allocations.

- maxInlineMemcpyInsns :: Int

  Only inline memcpy if it generates no more than this many pseudo (roughly: Cmm) instructions.

- maxInlineMemsetInsns :: Int

  Only inline memset if it generates no more than this many pseudo (roughly: Cmm) instructions.

- reverseErrors :: Bool

  Reverse the order of error messages in GHC/GHCi

- maxErrors :: Maybe Int

  Limit the maximum number of errors to show

- initialUnique :: Word64

  Unique supply configuration for testing build determinism

- uniqueIncrement :: Int
- cfgWeights :: Weights

  Temporary: CFG Edge weights for fast iterations

data GeneralFlag Source #

Enumerates the simple on-or-off dynamic flags

Constructors

Opt_DumpToFile | Append dump output to files instead of stdout.
Opt_DumpWithWays | Use foo.ways.dumpFlag instead of foo.dumpFlag
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_InterModuleFarJumps |
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_SpecEval |
Opt_SpecEvalDictFun |
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

Instances details

Enum GeneralFlag Source # |

Instance details

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 Source # |
Instance details Defined in GHC.Driver.Flags Methods showsPrec :: Int -> GeneralFlag -> ShowS # show :: GeneralFlag -> String # showList :: [GeneralFlag] -> ShowS #
Eq GeneralFlag Source # |
Instance details Defined in GHC.Driver.Flags Methods (==) :: GeneralFlag -> GeneralFlag -> Bool # (/=) :: GeneralFlag -> GeneralFlag -> Bool #

data Severity Source #

Used to describe warnings and errors o The message has a file/line/column heading, plus "warning:" or "error:", added by mkLocMessage o With `SevIgnore` the message is suppressed o Output is intended for end users

Constructors

SevIgnore | Ignore this message, for example in case of suppression of warnings users don't want to see. See Note [Suppressing Messages]
SevWarning |
SevError |

#### Instances

Instances details

ToJson Severity Source # |
Instance details Defined in GHC.Types.Error Methods json :: Severity -> JsonDoc Source #
Outputable Severity Source # |
Instance details Defined in GHC.Types.Error Methods ppr :: Severity -> SDoc Source #
Show Severity Source # |
Instance details Defined in GHC.Types.Error Methods showsPrec :: Int -> Severity -> ShowS # show :: Severity -> String # showList :: [Severity] -> ShowS #
Eq Severity Source # |
Instance details Defined in GHC.Types.Error Methods (==) :: Severity -> Severity -> Bool # (/=) :: Severity -> Severity -> Bool #
Ord Severity Source # |
Instance details Defined in GHC.Types.Error Methods compare :: Severity -> Severity -> Ordering # (<) :: Severity -> Severity -> Bool # (<=) :: Severity -> Severity -> Bool # (>) :: Severity -> Severity -> Bool # (>=) :: Severity -> Severity -> Bool # max :: Severity -> Severity -> Severity # min :: Severity -> Severity -> Severity #

data Backend Source #

A value of type `Backend` represents one of GHC's back ends. The set of back ends cannot be extended except by modifying the definition of `Backend` in this module.

The `Backend` type is abstract; that is, its value constructors are not exported. It's crucial that they not be exported, because a value of type `Backend` carries only the back end's name, not its behavior or properties. If `Backend` were not abstract, then code elsewhere in the compiler could depend directly on the name, not on the semantics, which would make it challenging to create a new back end. Because `Backend` is abstract, all the obligations of a new back end are enumerated in this module, in the form of functions that take `Backend` as an argument.

The issue of abstraction is discussed at great length in #20927 and !7442.

#### Instances

Instances details

Show Backend Source # | The Show instance is for messages only. If code depends on what's in the string, you deserve what happens to you.
Instance details Defined in GHC.Driver.Backend Methods showsPrec :: Int -> Backend -> ShowS # show :: Backend -> String # showList :: [Backend] -> ShowS #

gopt :: GeneralFlag -> DynFlags -> Bool Source #

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.

ncgBackend :: Backend Source #

The native code generator. Compiles Cmm code into textual assembler, then relies on an external assembler toolchain to produce machine code.

Only supports a few platforms (X86, PowerPC, SPARC).

See GHC.CmmToAsm.

llvmBackend :: Backend Source #

The LLVM backend.

Compiles Cmm code into LLVM textual IR, then relies on LLVM toolchain to produce machine code.

It relies on LLVM support for the calling convention used by the NCG backend to produce code objects ABI compatible with it (see "cc 10" or "ghccc" calling convention in https://llvm.org/docs/LangRef.html#calling-conventions).

Supports a few platforms (X86, AArch64, s390x, ARM).

See GHC.CmmToLlvm

viaCBackend :: Backend Source #

Via-C ("unregisterised") backend.

Compiles Cmm code into C code, then relies on a C compiler to produce machine code.

It produces code objects that are not ABI compatible with those produced by NCG and LLVM backends.

Produced code is expected to be less efficient than the one produced by NCG and LLVM backends because STG registers are not pinned into real registers. On the other hand, it supports more target platforms (those having a valid C toolchain).

See GHC.CmmToC

interpreterBackend :: Backend Source #

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).

See GHC.StgToByteCode

noBackend :: Backend Source #

A dummy back end that generates no code.

Use this back end to disable code generation. It is particularly useful when GHC is used as a library for other purpose than generating code (e.g. to generate documentation with Haddock) or when the user requested it (via `-fno-code`) for some reason.

data GhcMode Source #

The `GhcMode` tells us whether we're doing multi-module compilation (controlled via the GHC API) or one-shot (single-module) compilation. This makes a difference primarily to the GHC.Unit.Finder: in one-shot mode we look for interface files for imported modules, but in multi-module mode we look for source files in order to check whether they need to be recompiled.

Constructors

CompManager | `--make`, GHCi, etc.

OneShot

    ghc -c Foo.hs

MkDepend | `ghc -M`, see GHC.Unit.Finder for why we need this

#### Instances

Instances details

Outputable GhcMode Source # |
Instance details Defined in GHC.Driver.DynFlags Methods ppr :: GhcMode -> SDoc Source #
Eq GhcMode Source # |
Instance details Defined in GHC.Driver.DynFlags Methods (==) :: GhcMode -> GhcMode -> Bool # (/=) :: GhcMode -> GhcMode -> Bool #

data GhcLink Source #

What to do in the link step, if there is one.

Constructors

NoLink | Don't link at all
LinkBinary | Link object code into a binary
LinkInMemory | Use the in-memory dynamic linker (works for both bytecode and object code).
LinkDynLib | Link objects into a dynamic lib (DLL on Windows, DSO on ELF platforms)
LinkStaticLib | Link objects into a static lib
LinkMergedObj | Link objects into a merged "GHCi object"

#### Instances

Instances details

Show GhcLink Source # |
Instance details Defined in GHC.Driver.DynFlags Methods showsPrec :: Int -> GhcLink -> ShowS # show :: GhcLink -> String # showList :: [GhcLink] -> ShowS #
Eq GhcLink Source # |
Instance details Defined in GHC.Driver.DynFlags Methods (==) :: GhcLink -> GhcLink -> Bool # (/=) :: GhcLink -> GhcLink -> Bool #

parseDynamicFlags :: MonadIO m => Logger -> DynFlags -> [Located String] -> m (DynFlags, [Located String], Messages DriverMessage) Source #

parseTargetFiles :: DynFlags -> [String] -> (DynFlags, [(String, Maybe Phase)], [String]) Source #

Parse command line arguments that look like files. First normalises its arguments and then splits them into source files and object files. A source file can be turned into a `Target` via `guessTarget`

getSessionDynFlags :: GhcMonad m => m DynFlags Source #

Grabs the DynFlags from the Session

setTopSessionDynFlags :: GhcMonad m => DynFlags -> m () Source #

setSessionDynFlags :: (HasCallStack, GhcMonad m) => DynFlags -> m () Source #

setUnitDynFlags :: GhcMonad m => UnitId -> DynFlags -> m () Source #

getProgramDynFlags :: GhcMonad m => m DynFlags Source #

Returns the program `DynFlags`.

setProgramDynFlags :: GhcMonad m => DynFlags -> m Bool Source #

Sets the program `DynFlags`. Note: this invalidates the internal cached module graph, causing more work to be done the next time `load` is called.

Returns a boolean indicating if preload units have changed and need to be reloaded.

getInteractiveDynFlags :: GhcMonad m => m DynFlags Source #

Get the `DynFlags` used to evaluate interactive expressions.

setInteractiveDynFlags :: GhcMonad m => DynFlags -> m () Source #

Set the `DynFlags` used to evaluate interactive expressions. Also initialise (load) plugins.

Note: this cannot be used for changes to packages. Use `setSessionDynFlags`, or `setProgramDynFlags` and then copy the `unitState` into the interactive `DynFlags`.

interpretPackageEnv :: Logger -> DynFlags -> IO DynFlags Source #

Find the package environment (if one exists)

We interpret the package environment as a set of package flags; to be specific, if we find a package environment file like

    clear-package-db
    global-package-db
    package-db blah/package.conf.d
    package-id id1
    package-id id2

we interpret this as

    [ -hide-all-packages
    , -clear-package-db
    , -global-package-db
    , -package-db blah/package.conf.d
    , -package-id id1
    , -package-id id2
    ]

There's also an older syntax alias for package-id, which is just an unadorned package id

    id1
    id2

# Logging

data Logger Source #

getLogger :: HasLogger m => m Logger Source #

pushLogHook :: (LogAction -> LogAction) -> Logger -> Logger Source #

Push a log hook

popLogHook :: Logger -> Logger Source #

Pop a log hook

pushLogHookM :: GhcMonad m => (LogAction -> LogAction) -> m () Source #

Push a log hook on the stack

popLogHookM :: GhcMonad m => m () Source #

Pop a log hook from the stack

modifyLogger :: GhcMonad m => (Logger -> Logger) -> m () Source #

Modify the logger

putMsgM :: GhcMonad m => SDoc -> m () Source #

Put a log message

putLogMsgM :: GhcMonad m => MessageClass -> SrcSpan -> SDoc -> m () Source #

Put a log message

# Targets

data Target Source #

A compilation target.

A target may be supplied with the actual text of the module. If so, use this instead of the file contents (this is for use in an IDE where the file hasn't been saved by the user yet).

These fields are strict because Targets are long lived.

Constructors

Target |

Fields

- targetId :: !TargetId

  module or filename

- targetAllowObjCode :: !Bool

  object code allowed?

- targetUnitId :: !UnitId

  id of the unit this target is part of

- targetContents :: !(Maybe (InputFileBuffer, UTCTime))

  Optional in-memory buffer containing the source code GHC should use for this target instead of reading it from disk.

  Since GHC version 8.10 modules which require preprocessors such as Literate Haskell or CPP to run are also supported.

  If a corresponding source file does not exist on disk this will result in a `SourceError` exception if `targetId = TargetModule _` is used. However together with `targetId = TargetFile _` GHC will not complain about the file missing.

#### Instances

Instances details

Outputable Target Source # |
Instance details Defined in GHC.Types.Target Methods ppr :: Target -> SDoc Source #

data TargetId Source #

Constructors

TargetModule !ModuleName | A module name: search for the file
TargetFile !FilePath !(Maybe Phase) | A filename: preprocess & parse it to find the module name. If specified, the Phase indicates how to compile this file (which phase to start from). Nothing indicates the starting phase should be determined from the suffix of the filename.

#### Instances

Instances details

Outputable TargetId Source # |
Instance details Defined in GHC.Types.Target Methods ppr :: TargetId -> SDoc Source #
Eq TargetId Source # |
Instance details Defined in GHC.Types.Target Methods (==) :: TargetId -> TargetId -> Bool # (/=) :: TargetId -> TargetId -> Bool #

data Phase Source #

Untyped Phase description

#### Instances

Instances details

Outputable Phase Source # |
Instance details Defined in GHC.Driver.Phases Methods ppr :: Phase -> SDoc Source #
Show Phase Source # |
Instance details Defined in GHC.Driver.Phases Methods showsPrec :: Int -> Phase -> ShowS # show :: Phase -> String # showList :: [Phase] -> ShowS #
Eq Phase Source # |
Instance details Defined in GHC.Driver.Phases Methods (==) :: Phase -> Phase -> Bool # (/=) :: Phase -> Phase -> Bool #

setTargets :: GhcMonad m => [Target] -> m () Source #

Sets the targets for this session. Each target may be a module name or a filename. The targets correspond to the set of root modules for the program/library. Unloading the current program is achieved by setting the current set of targets to be empty, followed by `load`.

getTargets :: GhcMonad m => m [Target] Source #

Returns the current set of targets

addTarget :: GhcMonad m => Target -> m () Source #

Add another target.

removeTarget :: GhcMonad m => TargetId -> m () Source #

Remove a target

guessTarget :: GhcMonad m => String -> Maybe UnitId -> Maybe Phase -> m Target Source #

Attempts to guess what Target a string refers to. This function implements the `--make`/GHCi command-line syntax for filenames:

- if the string looks like a Haskell source filename, then interpret it as such
- if adding a .hs or .lhs suffix yields the name of an existing file, then use that
- otherwise interpret the string as a module name

# Loading/compiling the program

depanal Source #

Arguments

:: GhcMonad m |
=> [ModuleName] | excluded modules
-> Bool | allow duplicate roots
-> m ModuleGraph |

Perform a dependency analysis starting from the current targets and update the session with the new module graph.

Dependency analysis entails parsing the `import` directives and may therefore require running certain preprocessors.

Note that each `ModSummary` in the module graph caches its `DynFlags`. These `DynFlags` are determined by the current session `DynFlags` and the `OPTIONS` and `LANGUAGE` pragmas of the parsed module. Thus if you want changes to the `DynFlags` to take effect you need to call this function again. In case of errors, just throw them.

depanalE Source #

Arguments

:: GhcMonad m |
=> [ModuleName] | excluded modules
-> Bool | allow duplicate roots
-> m (DriverMessages, ModuleGraph) |

Perform dependency analysis like in `depanal`. In case of errors, the errors and an empty module graph are returned.

load :: GhcMonad f => LoadHowMuch -> f SuccessFlag Source #

Try to load the program. See `LoadHowMuch` for the different modes.

This function implements the core of GHC's `--make` mode. It preprocesses, compiles and loads the specified modules, avoiding re-compilation wherever possible. Depending on the backend (see `backend` field) compiling and loading may result in files being created on disk.

Calls the `defaultWarnErrLogger` after each compiling each module, whether successful or not.

If errors are encountered during dependency analysis, the module `depanalE` returns together with the errors an empty ModuleGraph. After processing this empty ModuleGraph, the errors of depanalE are thrown. All other errors are reported using the `defaultWarnErrLogger`.

loadWithCache Source #

Arguments

:: GhcMonad m |
=> Maybe ModIfaceCache | Instructions about how to cache interfaces as we create them.
-> (GhcMessage -> AnyGhcDiagnostic) | How to wrap error messages before they are displayed to a user. If you are using the GHC API you can use this to override how messages created during `loadWithCache` are displayed to the user.
-> LoadHowMuch | How much `loadWithCache` should load
-> m SuccessFlag |

data LoadHowMuch Source #

Describes which modules of the module graph need to be loaded.

Constructors

LoadAllTargets | Load all targets and its dependencies.
LoadUpTo HomeUnitModule | Load only the given module and its dependencies.
LoadDependenciesOf HomeUnitModule | Load only the dependencies of the given module, but not the module itself.

data InteractiveImport Source #

Constructors

IIDecl (ImportDecl GhcPs) | Bring the exports of a particular module (filtered by an import decl) into scope
IIModule ModuleName | Bring into scope the entire top-level envt of of this module, including the things imported into it.

#### Instances

Instances details

Outputable InteractiveImport Source # |
Instance details Defined in GHC.Runtime.Context Methods ppr :: InteractiveImport -> SDoc Source #

data SuccessFlag Source #

Constructors

Succeeded |
Failed |

#### Instances

Instances details

Outputable SuccessFlag Source # |
Instance details Defined in GHC.Types.Basic Methods ppr :: SuccessFlag -> SDoc Source #
Semigroup SuccessFlag Source # |
Instance details Defined in GHC.Types.Basic Methods (<>) :: SuccessFlag -> SuccessFlag -> SuccessFlag # sconcat :: NonEmpty SuccessFlag -> SuccessFlag # stimes :: Integral b => b -> SuccessFlag -> SuccessFlag #

succeeded :: SuccessFlag -> Bool Source #

failed :: SuccessFlag -> Bool Source #

defaultWarnErrLogger :: WarnErrLogger Source #

type WarnErrLogger = forall (m :: Type -> Type). (HasDynFlags m, MonadIO m, HasLogger m) => Maybe SourceError -> m () Source #

A function called to log warnings and errors.

workingDirectoryChanged :: GhcMonad m => m () Source #

Inform GHC that the working directory has changed. GHC will flush its cache of module locations, since it may no longer be valid.

Note: Before changing the working directory make sure all threads running in the same session have stopped. If you change the working directory, you should also unload the current program (set targets to empty, followed by load).

parseModule :: GhcMonad m => ModSummary -> m ParsedModule Source #

Parse a module.

Throws a `SourceError` on parse error.

typecheckModule :: GhcMonad m => ParsedModule -> m TypecheckedModule Source #

Typecheck and rename a parsed module.

Throws a `SourceError` if either fails.

desugarModule :: GhcMonad m => TypecheckedModule -> m DesugaredModule Source #

Desugar a typechecked module.

data ParsedModule Source #

The result of successful parsing.

Constructors

ParsedModule |

Fields

- pm_mod_summary :: ModSummary
- pm_parsed_source :: ParsedSource
- pm_extra_src_files :: [FilePath]

#### Instances

Instances details

ParsedMod ParsedModule Source # |
Instance details Defined in GHC Methods modSummary :: ParsedModule -> ModSummary parsedSource :: ParsedModule -> ParsedSource Source #

data TypecheckedModule Source #

The result of successful typechecking. It also contains the parser result.

Constructors

TypecheckedModule |

Fields

- tm_parsed_module :: ParsedModule
- tm_renamed_source :: Maybe RenamedSource
- tm_typechecked_source :: TypecheckedSource
- tm_checked_module_info :: ModuleInfo
- tm_internals_ :: (TcGblEnv, ModDetails)

#### Instances

Instances details

ParsedMod TypecheckedModule Source # |
Instance details Defined in GHC Methods modSummary :: TypecheckedModule -> ModSummary parsedSource :: TypecheckedModule -> ParsedSource Source #
TypecheckedMod TypecheckedModule Source # |
Instance details Defined in GHC Methods renamedSource :: TypecheckedModule -> Maybe RenamedSource Source # typecheckedSource :: TypecheckedModule -> TypecheckedSource Source # moduleInfo :: TypecheckedModule -> ModuleInfo Source # tm_internals :: TypecheckedModule -> (TcGblEnv, ModDetails)

data DesugaredModule Source #

The result of successful desugaring (i.e., translation to core). Also contains all the information of a typechecked module.

Constructors

DesugaredModule |

Fields

- dm_typechecked_module :: TypecheckedModule
- dm_core_module :: ModGuts

#### Instances

Instances details

ParsedMod DesugaredModule Source # |
Instance details Defined in GHC Methods modSummary :: DesugaredModule -> ModSummary parsedSource :: DesugaredModule -> ParsedSource Source #
TypecheckedMod DesugaredModule Source # |
Instance details Defined in GHC Methods renamedSource :: DesugaredModule -> Maybe RenamedSource Source # typecheckedSource :: DesugaredModule -> TypecheckedSource Source # moduleInfo :: DesugaredModule -> ModuleInfo Source # tm_internals :: DesugaredModule -> (TcGblEnv, ModDetails)

type TypecheckedSource = LHsBinds GhcTc Source #

type ParsedSource = Located (HsModule GhcPs) Source #

type RenamedSource = (HsGroup GhcRn, [LImportDecl GhcRn], Maybe [(LIE GhcRn, Avails)], Maybe (LHsDoc GhcRn), Maybe (XRec GhcRn ModuleName)) Source #

class ParsedMod m => TypecheckedMod m Source #

Minimal complete definition

renamedSource, typecheckedSource, moduleInfo, tm_internals

#### Instances

Instances details

TypecheckedMod DesugaredModule Source # |
Instance details Defined in GHC Methods renamedSource :: DesugaredModule -> Maybe RenamedSource Source # typecheckedSource :: DesugaredModule -> TypecheckedSource Source # moduleInfo :: DesugaredModule -> ModuleInfo Source # tm_internals :: DesugaredModule -> (TcGblEnv, ModDetails)
TypecheckedMod TypecheckedModule Source # |
Instance details Defined in GHC Methods renamedSource :: TypecheckedModule -> Maybe RenamedSource Source # typecheckedSource :: TypecheckedModule -> TypecheckedSource Source # moduleInfo :: TypecheckedModule -> ModuleInfo Source # tm_internals :: TypecheckedModule -> (TcGblEnv, ModDetails)

class ParsedMod m Source #

Minimal complete definition

modSummary, parsedSource

#### Instances

Instances details

ParsedMod DesugaredModule Source # |
Instance details Defined in GHC Methods modSummary :: DesugaredModule -> ModSummary parsedSource :: DesugaredModule -> ParsedSource Source #
ParsedMod ParsedModule Source # |
Instance details Defined in GHC Methods modSummary :: ParsedModule -> ModSummary parsedSource :: ParsedModule -> ParsedSource Source #
ParsedMod TypecheckedModule Source # |
Instance details Defined in GHC Methods modSummary :: TypecheckedModule -> ModSummary parsedSource :: TypecheckedModule -> ParsedSource Source #

moduleInfo :: TypecheckedMod m => m -> ModuleInfo Source #

renamedSource :: TypecheckedMod m => m -> Maybe RenamedSource Source #

typecheckedSource :: TypecheckedMod m => m -> TypecheckedSource Source #

parsedSource :: ParsedMod m => m -> ParsedSource Source #

coreModule :: DesugaredMod m => m -> ModGuts Source #

data PkgQual Source #

Package-qualifier after renaming

Renaming detects if "this" or the unit-id of the home-unit was used as a package qualifier.

Constructors

NoPkgQual | No package qualifier
ThisPkg UnitId | Import from home-unit
OtherPkg UnitId | Import from another unit

#### Instances

Instances details

Outputable PkgQual Source # |
Instance details Defined in GHC.Types.PkgQual Methods ppr :: PkgQual -> SDoc Source #
Data PkgQual Source # |

Instance details

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 Source # |
Instance details Defined in GHC.Types.PkgQual Methods (==) :: PkgQual -> PkgQual -> Bool # (/=) :: PkgQual -> PkgQual -> Bool #
Ord PkgQual Source # |
Instance details Defined in GHC.Types.PkgQual Methods compare :: PkgQual -> PkgQual -> Ordering # (<) :: PkgQual -> PkgQual -> Bool # (<=) :: PkgQual -> PkgQual -> Bool # (>) :: PkgQual -> PkgQual -> Bool # (>=) :: PkgQual -> PkgQual -> Bool # max :: PkgQual -> PkgQual -> PkgQual # min :: PkgQual -> PkgQual -> PkgQual #

## Compiling to Core

data CoreModule Source #

A CoreModule consists of just the fields of a `ModGuts` that are needed for the `compileToCoreModule` interface.

Constructors

CoreModule |

Fields

- cm_module :: !Module

  Module name

- cm_types :: !TypeEnv

  Type environment for types declared in this module

- cm_binds :: CoreProgram

  Declarations

- cm_safe :: SafeHaskellMode

  Safe Haskell mode

#### Instances

Instances details

Outputable CoreModule Source # |
Instance details Defined in GHC Methods ppr :: CoreModule -> SDoc Source #

compileToCoreModule :: GhcMonad m => FilePath -> m CoreModule Source #

This is the way to get access to the Core bindings corresponding to a module. `compileToCore` parses, typechecks, and desugars the module, then returns the resulting Core module (consisting of the module name, type declarations, and function declarations) if successful.

compileToCoreSimplified :: GhcMonad m => FilePath -> m CoreModule Source #

Like compileToCoreModule, but invokes the simplifier, so as to return simplified and tidied Core.

# Inspecting the module structure of the program

data ModuleGraph Source #

A '`ModuleGraph`' contains all the nodes from the home package (only). See '`ModuleGraphNode`' for information about the nodes.

Modules need to be compiled. hs-boots need to be typechecked before the associated "real" module so modules with {-# SOURCE #-} imports can be built. Instantiations also need to be typechecked to ensure that the module fits the signature. Substantiation typechecking is roughly comparable to the check that the module and its hs-boot agree.

The graph is not necessarily stored in topologically-sorted order. Use `topSortModuleGraph` and `flattenSCC` to achieve this.

emptyMG :: ModuleGraph Source #

mapMG :: (ModSummary -> ModSummary) -> ModuleGraph -> ModuleGraph Source #

Map a function `f` over all the `ModSummaries`. To preserve invariants `f` can't change the isBoot status.

mkModuleGraph :: [ModuleGraphNode] -> ModuleGraph Source #

mgModSummaries :: ModuleGraph -> [ModSummary] Source #

mgLookupModule :: ModuleGraph -> Module -> Maybe ModSummary Source #

Look up a ModSummary in the ModuleGraph Looks up the non-boot ModSummary Linear in the size of the module graph

data ModSummary Source #

Data for a module node in a `ModuleGraph`. Module nodes of the module graph are one of:

- A regular Haskell source module
- A hi-boot source module

Constructors

ModSummary |

Fields

- ms_mod :: Module

  Identity of the module

- ms_hsc_src :: HscSource

  The module source either plain Haskell, hs-boot, or hsig

- ms_location :: ModLocation

  Location of the various files belonging to the module

- ms_hs_hash :: Fingerprint

  Content hash of source file

- ms_obj_date :: Maybe UTCTime

  Timestamp of object, if we have one

- ms_dyn_obj_date :: !(Maybe UTCTime)

  Timestamp of dynamic object, if we have one

- ms_iface_date :: Maybe UTCTime

  Timestamp of hi file, if we have one See Note [When source is considered modified] and #9243

- ms_hie_date :: Maybe UTCTime

  Timestamp of hie file, if we have one

- ms_srcimps :: [(PkgQual, Located ModuleName)]

  Source imports of the module

- ms_textual_imps :: [(PkgQual, Located ModuleName)]

  Non-source imports of the module from the module *text*

- ms_ghc_prim_import :: !Bool

  Whether the special module GHC.Prim was imported explicitly

- ms_parsed_mod :: Maybe HsParsedModule

  The parsed, nonrenamed source, if we have it. This is also used to support "inline module syntax" in Backpack files.

- ms_hspp_file :: FilePath

  Filename of preprocessed source file

- ms_hspp_opts :: DynFlags

  Cached flags from `OPTIONS`, `INCLUDE` and `LANGUAGE` pragmas in the modules source code

- ms_hspp_buf :: Maybe StringBuffer

  The actual preprocessed source, if we have it

#### Instances

Instances details

Outputable ModSummary Source # |
Instance details Defined in GHC.Unit.Module.ModSummary Methods ppr :: ModSummary -> SDoc Source #

ms_mod_name :: ModSummary -> ModuleName Source #

data ModLocation Source #

Module Location

Where a module lives on the file system: the actual locations of the .hs, .hi, .dyn_hi, .o, .dyn_o and .hie files, if we have them.

For a module in another unit, the ml_hs_file and ml_obj_file components of ModLocation are undefined.

The locations specified by a ModLocation may or may not correspond to actual files yet: for example, even if the object file doesn't exist, the ModLocation still contains the path to where the object file will reside if/when it is created.

The paths of anything which can affect recompilation should be placed inside ModLocation.

When a ModLocation is created none of the filepaths will have -boot suffixes. This is because in --make mode the ModLocation is put in the finder cache which is indexed by ModuleName, when a ModLocation is retrieved from the FinderCache the boot suffixes are appended. The other case is in -c mode, there the ModLocation immediately gets given the boot suffixes in mkOneShotModLocation.

Constructors

ModLocation |

Fields

- ml_hs_file :: Maybe FilePath

  The source file, if we have one. Package modules probably don't have source files.

- ml_hi_file :: FilePath

  Where the .hi file is, whether or not it exists yet. Always of form foo.hi, even if there is an hi-boot file (we add the -boot suffix later)

- ml_dyn_hi_file :: FilePath

  Where the .dyn_hi file is, whether or not it exists yet.

- ml_obj_file :: FilePath

  Where the .o file is, whether or not it exists yet. (might not exist either because the module hasn't been compiled yet, or because it is part of a unit with a .a file)

- ml_dyn_obj_file :: FilePath

  Where the .dy file is, whether or not it exists yet.

- ml_hie_file :: FilePath

  Where the .hie file is, whether or not it exists yet.

#### Instances

Instances details

Outputable ModLocation Source # |
Instance details Defined in GHC.Unit.Module.Location Methods ppr :: ModLocation -> SDoc Source #
Show ModLocation Source # |
Instance details Defined in GHC.Unit.Module.Location Methods showsPrec :: Int -> ModLocation -> ShowS # show :: ModLocation -> String # showList :: [ModLocation] -> ShowS #

getModSummary :: GhcMonad m => ModuleName -> m ModSummary Source #

Return the `ModSummary` of a module with the given name.

The module must be part of the module graph (see `hsc_mod_graph` and `ModuleGraph`). If this is not the case, this function will throw a `GhcApiError`.

This function ignores boot modules and requires that there is only one non-boot module with the given name.

getModuleGraph :: GhcMonad m => m ModuleGraph Source #

Get the module dependency graph.

isLoaded :: GhcMonad m => ModuleName -> m Bool Source #

Return `True` <==> module is loaded.

isLoadedModule :: GhcMonad m => UnitId -> ModuleName -> m Bool Source #

topSortModuleGraph Source #

Arguments

:: Bool | Drop hi-boot nodes? (see below)
-> ModuleGraph |
-> Maybe HomeUnitModule | Root module name. If `Nothing`, use the full graph.
-> [SCC ModuleGraphNode] |

Topological sort of the module graph

Calculate SCCs of the module graph, possibly dropping the hi-boot nodes The resulting list of strongly-connected-components is in topologically sorted order, starting with the module(s) at the bottom of the dependency graph (ie compile them first) and ending with the ones at the top.

Drop hi-boot nodes (first boolean arg)?

- `False`: treat the hi-boot summaries as nodes of the graph, so the graph must be acyclic
- `True`: eliminate the hi-boot nodes, and instead pretend the a source-import of Foo is an import of Foo The resulting graph has no hi-boot nodes, but can be cyclic

# Inspecting modules

data ModuleInfo Source #

Container for information about a `Module`.

getModuleInfo :: GhcMonad m => Module -> m (Maybe ModuleInfo) Source #

Request information about a loaded `Module`

modInfoTyThings :: ModuleInfo -> [TyThing] Source #

The list of top-level entities defined in a module

modInfoTopLevelScope :: ModuleInfo -> Maybe [Name] Source #

modInfoExports :: ModuleInfo -> [Name] Source #

modInfoExportsWithSelectors :: ModuleInfo -> [Name] Source #

modInfoInstances :: ModuleInfo -> [ClsInst] Source #

Returns the instances defined by the specified module. Warning: currently unimplemented for package modules.

modInfoIsExportedName :: ModuleInfo -> Name -> Bool Source #

modInfoLookupName :: GhcMonad m => ModuleInfo -> Name -> m (Maybe TyThing) Source #

modInfoIface :: ModuleInfo -> Maybe ModIface Source #

modInfoRdrEnv :: ModuleInfo -> Maybe IfGlobalRdrEnv Source #

modInfoSafe :: ModuleInfo -> SafeHaskellMode Source #

Retrieve module safe haskell mode

lookupGlobalName :: GhcMonad m => Name -> m (Maybe TyThing) Source #

Looks up a global name: that is, any top-level name in any visible module. Unlike `lookupName`, lookupGlobalName does not use the interactive context, and therefore does not require a preceding `setContext`.

findGlobalAnns :: (GhcMonad m, Typeable a) => ([Word8] -> a) -> AnnTarget Name -> m [a] Source #

mkNamePprCtxForModule :: GhcMonad m => ModuleInfo -> m (Maybe NamePprCtx) Source #

type ModIface = ModIface_ 'ModIfaceFinal Source #

data ModIface_ (phase :: ModIfacePhase) Source #

A `ModIface` plus a `ModDetails` summarises everything we know about a compiled module. The `ModIface` is the stuff *before* linking, and can be written out to an interface file. The 'ModDetails is after linking and can be completely recovered from just the `ModIface`.

When we read an interface file, we also construct a `ModIface` from it, except that we explicitly make the `mi_decls` and a few other fields empty; as when reading we consolidate the declarations etc. into a number of indexed maps and environments in the `ExternalPackageState`.

See Note [Strictness in ModIface] to learn about why some fields are strict and others are not.

Constructors

ModIface |

Fields

- mi_module :: !Module

  Name of the module we are for

- mi_sig_of :: !(Maybe Module)

  Are we a sig of another mod?

- mi_hsc_src :: !HscSource

  Boot? Signature?

- mi_deps :: Dependencies

  The dependencies of the module. This is consulted for directly-imported modules, but not for anything else (hence lazy)

- mi_usages :: [Usage]

  Usages; kept sorted so that it's easy to decide whether to write a new iface file (changing usages doesn't affect the hash of this module) NOT STRICT! we read this field lazily from the interface file It is *only* consulted by the recompilation checker

- mi_exports :: ![IfaceExport]

  Exports Kept sorted by (mod,occ), to make version comparisons easier Records the modules that are the declaration points for things exported by this module, and the `OccName`s of those things

- mi_used_th :: !Bool

  Module required TH splices when it was compiled. This disables recompilation avoidance (see #481).

- mi_fixities :: [(OccName, Fixity)]

  Fixities NOT STRICT! we read this field lazily from the interface file

- mi_warns :: IfaceWarnings

  Warnings NOT STRICT! we read this field lazily from the interface file

- mi_anns :: [IfaceAnnotation]

  Annotations NOT STRICT! we read this field lazily from the interface file

- mi_decls :: [IfaceDeclExts phase]

  Type, class and variable declarations The hash of an Id changes if its fixity or deprecations change (as well as its type of course) Ditto data constructors, class operations, except that the hash of the parent class/tycon changes

- mi_extra_decls :: Maybe [IfaceBindingX IfaceMaybeRhs IfaceTopBndrInfo]

  Extra variable definitions which are **NOT** exposed but when combined with mi_decls allows us to restart code generation. See Note [Interface Files with Core Definitions] and Note [Interface File with Core: Sharing RHSs]

- mi_globals :: !(Maybe IfGlobalRdrEnv)

  Binds all the things defined at the top level in the original source code for this module. which is NOT the same as mi_exports, nor mi_decls (which may contains declarations for things not actually defined by the user). Used for GHCi and for inspecting the contents of modules via the GHC API only.

  (We need the source file to figure out the top-level environment, if we didn't compile this module from source then this field contains `Nothing`).

  Strictly speaking this field should live in the `HomeModInfo`, but that leads to more plumbing.

- mi_insts :: [IfaceClsInst]

  Sorted class instance

- mi_fam_insts :: [IfaceFamInst]

  Sorted family instances

- mi_rules :: [IfaceRule]

  Sorted rules

- mi_hpc :: !AnyHpcUsage

  True if this program uses Hpc at any point in the program.

- mi_trust :: !IfaceTrustInfo

  Safe Haskell Trust information for this module.

- mi_trust_pkg :: !Bool

  Do we require the package this module resides in be trusted to trust this module? This is used for the situation where a module is Safe (so doesn't require the package be trusted itself) but imports some trustworthy modules from its own package (which does require its own package be trusted). See Note [Trust Own Package] in GHC.Rename.Names

- mi_complete_matches :: ![IfaceCompleteMatch]
- mi_docs :: !(Maybe Docs)

  Docstrings and related data for use by haddock, the ghci `:doc` command, and other tools.

  `Just _` `=` the module was built with `-haddock`.

- mi_final_exts :: !(IfaceBackendExts phase)

  Either `()` or `ModIfaceBackend` for a fully instantiated interface.

- mi_ext_fields :: !ExtensibleFields

  Additional optional fields, where the Map key represents the field name, resulting in a (size, serialized data) pair. Because the data is intended to be serialized through the internal `Binary` class (increasing compatibility with types using `Name` and `FastString`, such as HIE), this format is chosen over `ByteString`s.

- mi_src_hash :: !Fingerprint

  Hash of the .hs source, used for recompilation checking.

#### Instances

Instances details

Binary ModIface Source # |
Instance details Defined in GHC.Unit.Module.ModIface Methods put_ :: BinHandle -> ModIface -> IO () Source # put :: BinHandle -> ModIface -> IO (Bin ModIface) Source # get :: BinHandle -> IO ModIface Source #
(NFData (IfaceBackendExts phase), NFData (IfaceDeclExts phase)) => NFData (ModIface_ phase) Source # |
Instance details Defined in GHC.Unit.Module.ModIface Methods rnf :: ModIface_ phase -> () Source #

data SafeHaskellMode Source #

The various Safe Haskell modes

Constructors

Sf_None | inferred unsafe
Sf_Unsafe | declared and checked
Sf_Trustworthy | declared and checked
Sf_Safe | declared and checked
Sf_SafeInferred | inferred as safe
Sf_Ignore | `-fno-safe-haskell` state

#### Instances

Instances details

Outputable SafeHaskellMode Source # |
Instance details Defined in GHC.Types.SafeHaskell Methods ppr :: SafeHaskellMode -> SDoc Source #
Show SafeHaskellMode Source # |
Instance details Defined in GHC.Types.SafeHaskell Methods showsPrec :: Int -> SafeHaskellMode -> ShowS # show :: SafeHaskellMode -> String # showList :: [SafeHaskellMode] -> ShowS #
Eq SafeHaskellMode Source # |
Instance details Defined in GHC.Types.SafeHaskell Methods (==) :: SafeHaskellMode -> SafeHaskellMode -> Bool # (/=) :: SafeHaskellMode -> SafeHaskellMode -> Bool #

# Printing

data NamePprCtx Source #

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`.

alwaysQualify :: NamePprCtx Source #

# Interactive evaluation

## Executing statements

execStmt Source #

Arguments

:: GhcMonad m |
=> String | a statement (bind or expression)
-> ExecOptions |
-> m ExecResult |

Run a statement in the current interactive context.

execStmt' :: GhcMonad m => GhciLStmt GhcPs -> String -> ExecOptions -> m ExecResult Source #

Like `execStmt`, but takes a parsed statement as argument. Useful when doing preprocessing on the AST before execution, e.g. in GHCi (see GHCi.UI.runStmt).

data ExecOptions Source #

Constructors

ExecOptions |

Fields

- execSingleStep :: SingleStep

  stepping mode

- execSourceFile :: String

  filename (for errors)

- execLineNumber :: Int

  line number (for errors)

- execWrap :: ForeignHValue -> EvalExpr ForeignHValue

execOptions :: ExecOptions Source #

default ExecOptions

data ExecResult Source #

Constructors

ExecComplete |

Fields

- execResult :: Either SomeException [Name]
- execAllocation :: Word64

ExecBreak |

Fields

- breakNames :: [Name]
- breakPointId :: Maybe InternalBreakpointId

resumeExec :: GhcMonad m => (SrcSpan -> Bool) -> SingleStep -> Maybe Int -> m ExecResult Source #

## Adding new declarations

runDecls :: GhcMonad m => String -> m [Name] Source #

runDeclsWithLocation :: GhcMonad m => String -> Int -> String -> m [Name] Source #

Run some declarations and return any user-visible names that were brought into scope.

runParsedDecls :: GhcMonad m => [LHsDecl GhcPs] -> m [Name] Source #

Like `runDeclsWithLocation`, but takes parsed declarations as argument. Useful when doing preprocessing on the AST before execution, e.g. in GHCi (see GHCi.UI.runStmt).

## Get/set the current context

parseImportDecl :: GhcMonad m => String -> m (ImportDecl GhcPs) Source #

setContext :: GhcMonad m => [InteractiveImport] -> m () Source #

Set the interactive evaluation context.

(setContext imports) sets the ic_imports field (which in turn determines what is in scope at the prompt) to `imports`, and updates the icReaderEnv environment to reflect it.

We retain in scope all the things defined at the prompt, and kept in ic_tythings. (Indeed, they shadow stuff from ic_imports.)

getContext :: GhcMonad m => m [InteractiveImport] Source #

Get the interactive evaluation context, consisting of a pair of the set of modules from which we take the full top-level scope, and the set of modules from which we take just the exports respectively.

setGHCiMonad :: GhcMonad m => String -> m () Source #

Set the monad GHCi lifts user statements into.

Checks that a type (in string form) is an instance of the `GHC.GHCi.GHCiSandboxIO` type class. Sets it to be the GHCi monad if it is, throws an error otherwise.

getGHCiMonad :: GhcMonad m => m Name Source #

Get the monad GHCi lifts user statements into.

## Inspecting the current context

getBindings :: GhcMonad m => m [TyThing] Source #

Return the bindings for the current interactive session.

getInsts :: GhcMonad m => m ([ClsInst], [FamInst]) Source #

Return the instances for the current interactive session.

getNamePprCtx :: GhcMonad m => m NamePprCtx Source #

findModule :: GhcMonad m => ModuleName -> Maybe FastString -> m Module Source #

Takes a `ModuleName` and possibly a `UnitId`, and consults the filesystem and package database to find the corresponding `Module`, using the algorithm that is used for an `import` declaration.

lookupModule :: GhcMonad m => ModuleName -> Maybe FastString -> m Module Source #

Like `findModule`, but differs slightly when the module refers to a source file, and the file has not been loaded via `load`. In this case, `findModule` will throw an error (module not loaded), but `lookupModule` will check to see whether the module can also be found in a package, and if so, that package `Module` will be returned. If not, the usual module-not-found error will be thrown.

findQualifiedModule :: GhcMonad m => PkgQual -> ModuleName -> m Module Source #

lookupQualifiedModule :: GhcMonad m => PkgQual -> ModuleName -> m Module Source #

renamePkgQualM :: GhcMonad m => ModuleName -> Maybe FastString -> m PkgQual Source #

renameRawPkgQualM :: GhcMonad m => ModuleName -> RawPkgQual -> m PkgQual Source #

isModuleTrusted :: GhcMonad m => Module -> m Bool Source #

Check that a module is safe to import (according to Safe Haskell).

We return True to indicate the import is safe and False otherwise although in the False case an error may be thrown first.

moduleTrustReqs :: GhcMonad m => Module -> m (Bool, Set UnitId) Source #

Return if a module is trusted and the pkgs it depends on to be trusted.

getNamesInScope :: GhcMonad m => m [Name] Source #

Returns all names in scope in the current interactive context

getRdrNamesInScope :: GhcMonad m => m [RdrName] Source #

Returns all `RdrName`s in scope in the current interactive context, excluding any that are internally-generated.

getGRE :: GhcMonad m => m GlobalRdrEnv Source #

get the GlobalRdrEnv for a session

moduleIsInterpreted :: GhcMonad m => Module -> m Bool Source #

Returns `True` if the specified module is interpreted, and hence has its full top-level scope available.

getInfo :: GhcMonad m => Bool -> Name -> m (Maybe (TyThing, Fixity, [ClsInst], [FamInst], SDoc)) Source #

Looks up an identifier in the current interactive context (for :info) Filter the instances by the ones whose tycons (or classes resp) are in scope (qualified or otherwise). Otherwise we list a whole lot too many! The exact choice of which ones to show, and which to hide, is a judgement call. (see #1581)

showModule :: GhcMonad m => ModSummary -> m String Source #

moduleIsBootOrNotObjectLinkable :: GhcMonad m => ModSummary -> m Bool Source #

getNameToInstancesIndex Source #

Arguments

:: GhcMonad m |
=> [Module] | visible modules. An orphan instance will be returned if it is visible from at least one module in the list.
-> Maybe [Module] | modules to load. If this is not specified, we load modules for everything that is in scope unqualified.
-> m (Messages TcRnMessage, Maybe (NameEnv ([ClsInst], [FamInst]))) |

Retrieve all type and family instances in the environment, indexed by `Name`. Each name's lists will contain every instance in which that name is mentioned in the instance head.

## Inspecting types and kinds

exprType :: GhcMonad m => TcRnExprMode -> String -> m Type Source #

Get the type of an expression Returns the type as described by `TcRnExprMode`

data TcRnExprMode Source #

How should we infer a type? See Note [TcRnExprMode]

Constructors

TM_Inst | Instantiate inferred quantifiers only (:type)
TM_Default | Instantiate all quantifiers, and do eager defaulting (:type +d)

typeKind :: GhcMonad m => Bool -> String -> m (Type, Kind) Source #

Get the kind of a type

## Looking up a Name

parseName :: GhcMonad m => String -> m (NonEmpty Name) Source #

Parses a string as an identifier, and returns the list of `Name`s that the identifier can refer to in the current interactive context.

lookupName :: GhcMonad m => Name -> m (Maybe TyThing) Source #

Returns the `TyThing` for a `Name`. The `Name` may refer to any entity known to GHC, including `Name`s defined using `runStmt`.

## Compiling expressions

data HValue Source #

#### Instances

Instances details

Show HValue |
Instance details Defined in GHCi.RemoteTypes Methods showsPrec :: Int -> HValue -> ShowS # show :: HValue -> String # showList :: [HValue] -> ShowS #

parseExpr :: GhcMonad m => String -> m (LHsExpr GhcPs) Source #

Parse an expression, the parsed expression can be further processed and passed to compileParsedExpr.

compileParsedExpr :: GhcMonad m => LHsExpr GhcPs -> m HValue Source #

compileExpr :: GhcMonad m => String -> m HValue Source #

Compile an expression, run it, and deliver the resulting HValue.

dynCompileExpr :: GhcMonad m => String -> m Dynamic Source #

Compile an expression, run it and return the result as a Dynamic.

type ForeignHValue = ForeignRef HValue Source #

compileExprRemote :: GhcMonad m => String -> m ForeignHValue Source #

Compile an expression, run it, and deliver the resulting HValue.

compileParsedExprRemote :: GhcMonad m => LHsExpr GhcPs -> m ForeignHValue Source #

Compile a parsed expression (before renaming), run it, and deliver the resulting HValue.

## Docs

getDocs :: GhcMonad m => Name -> m (Either GetDocsFailure (Maybe [HsDoc GhcRn], IntMap (HsDoc GhcRn))) Source #

data GetDocsFailure Source #

Failure modes for `getDocs`.

Constructors

NameHasNoModule Name | `nameModule_maybe` returned `Nothing`.
NoDocsInIface | The module was loaded without `-haddock`,

Fields

- Module
- Bool

  `True`: The module was compiled. `False`: The module was :loaded.

InteractiveName | The `Name` was defined interactively.

#### Instances

Instances details

Outputable GetDocsFailure Source # |
Instance details Defined in GHC.Runtime.Eval Methods ppr :: GetDocsFailure -> SDoc Source #

## Other

runTcInteractive :: HscEnv -> TcRn a -> IO (Messages TcRnMessage, Maybe a) Source #

isStmt :: ParserOpts -> String -> Bool Source #

Returns `True` if passed string is a statement.

hasImport :: ParserOpts -> String -> Bool Source #

Returns `True` if passed string has an import declaration.

isImport :: ParserOpts -> String -> Bool Source #

Returns `True` if passed string is an import declaration.

isDecl :: ParserOpts -> String -> Bool Source #

Returns `True` if passed string is a declaration but not a splice.

## The debugger

data SingleStep Source #

Constructors

RunToCompletion |
SingleStep |
RunAndLogSteps |

data Resume Source #

Constructors

Resume |

Fields

- resumeStmt :: String
- resumeContext :: ForeignRef (ResumeContext [HValueRef])
- resumeBindings :: ResumeBindings
- resumeFinalIds :: [Id]
- resumeApStack :: ForeignHValue
- resumeBreakpointId :: Maybe InternalBreakpointId

  the breakpoint we stopped at (Nothing = exception)

- resumeSpan :: SrcSpan
- resumeDecl :: String
- resumeCCS :: RemotePtr CostCentreStack
- resumeHistory :: [History]
- resumeHistoryIx :: Int

data History Source #

getHistorySpan :: GhcMonad m => History -> m SrcSpan Source #

getHistoryModule :: History -> Module Source #

abandon :: GhcMonad m => m Bool Source #

abandonAll :: GhcMonad m => m Bool Source #

getResumeContext :: GhcMonad m => m [Resume] Source #

obtainTermFromId :: GhcMonad m => Int -> Bool -> Id -> m Term Source #

obtainTermFromVal :: GhcMonad m => Int -> Bool -> Type -> a -> m Term Source #

reconstructType :: HscEnv -> Int -> Id -> IO (Maybe Type) Source #

modInfoModBreaks :: ModuleInfo -> ModBreaks Source #

data ModBreaks Source #

All the information about the breakpoints for a module

Constructors

ModBreaks |

Fields

- modBreaks_flags :: ForeignRef BreakArray

  The array of flags, one per breakpoint, indicating which breakpoints are enabled.

- modBreaks_locs :: !(Array BreakIndex SrcSpan)

  An array giving the source span of each breakpoint.

- modBreaks_vars :: !(Array BreakIndex [OccName])

  An array giving the names of the free variables at each breakpoint.

- modBreaks_decls :: !(Array BreakIndex [String])

  An array giving the names of the declarations enclosing each breakpoint. See Note [Field modBreaks_decls]

- modBreaks_ccs :: !(Array BreakIndex (RemotePtr CostCentre))

  Array pointing to cost centre for each breakpoint

- modBreaks_breakInfo :: IntMap CgBreakInfo

  info about each breakpoint from the bytecode generator

- modBreaks_module :: RemotePtr ModuleName

type BreakIndex = Int Source #

Breakpoint index

data BreakpointId Source #

Breakpoint identifier.

See Note [Breakpoint identifiers]

Constructors

BreakpointId |

Fields

- bi_tick_mod :: !Module

  Breakpoint tick module

- bi_tick_index :: !Int

  Breakpoint tick index

data InternalBreakpointId Source #

Internal breakpoint identifier

See Note [Breakpoint identifiers]

Constructors

InternalBreakpointId |

Fields

- ibi_tick_mod :: !Module

  Breakpoint tick module

- ibi_tick_index :: !Int

  Breakpoint tick index

- ibi_info_mod :: !Module

  Breakpoint info module

- ibi_info_index :: !Int

  Breakpoint info index

back :: GhcMonad m => Int -> m ([Name], Int, SrcSpan, String) Source #

forward :: GhcMonad m => Int -> m ([Name], Int, SrcSpan, String) Source #

setupBreakpoint :: GhcMonad m => HscEnv -> BreakpointId -> Int -> m () Source #

# Abstract syntax elements

## Units

type Unit = GenUnit UnitId Source #

## Modules

type Module = GenModule Unit Source #

A Module is a pair of a `Unit` and a `ModuleName`.

mkModule :: u -> ModuleName -> GenModule u Source #

pprModule :: IsLine doc => Module -> doc Source #

moduleName :: GenModule unit -> ModuleName Source #

Module name (e.g. A.B.C)

moduleUnit :: GenModule unit -> unit Source #

Unit the module belongs to

## Names

data Name Source #

A unique, unambiguous name for something, containing information about where that thing originated.

#### Instances

Instances details

NFData Name Source # |
Instance details Defined in GHC.Types.Name Methods rnf :: Name -> () Source #
NamedThing Name Source # |
Instance details Defined in GHC.Types.Name Methods getOccName :: Name -> OccName Source # getName :: Name -> Name Source #
HasOccName Name Source # |
Instance details Defined in GHC.Types.Name Methods occName :: Name -> OccName Source #
Uniquable Name Source # |
Instance details Defined in GHC.Types.Name Methods getUnique :: Name -> Unique Source #
Binary Name Source # | Assumes that the `Name` is a non-binding one. See `putIfaceTopBndr` and `getIfaceTopBndr` for serializing binding `Name`s. See `UserData` for the rationale for this distinction.
Instance details Defined in GHC.Types.Name Methods put_ :: BinHandle -> Name -> IO () Source # put :: BinHandle -> Name -> IO (Bin Name) Source # get :: BinHandle -> IO Name Source #
Outputable Name Source # |
Instance details Defined in GHC.Types.Name Methods ppr :: Name -> SDoc Source #
OutputableBndr Name Source # |
Instance details Defined in GHC.Types.Name Methods pprBndr :: BindingSite -> Name -> SDoc Source # pprPrefixOcc :: Name -> SDoc Source # pprInfixOcc :: Name -> SDoc Source # bndrIsJoin_maybe :: Name -> JoinPointHood Source #
Data Name Source # |

Instance details

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 #

toConstr :: Name -> Constr #

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 #

Eq Name Source # | The same comments as for `Name`'s `Ord` instance apply.
Instance details Defined in GHC.Types.Name Methods (==) :: Name -> Name -> Bool # (/=) :: Name -> Name -> Bool #
Ord Name Source # | Caution: This instance is implemented via `nonDetCmpUnique`, which means that the ordering is not stable across deserialization or rebuilds. See `nonDetCmpUnique` for further information, and #15240 for a bug caused by improper use of this instance.
Instance details Defined in GHC.Types.Name Methods compare :: Name -> Name -> Ordering # (<) :: Name -> Name -> Bool # (<=) :: Name -> Name -> Bool # (>) :: Name -> Name -> Bool # (>=) :: Name -> Name -> Bool # max :: Name -> Name -> Name # min :: Name -> Name -> Name #
type Anno Name Source # |
Instance details Defined in GHC.Hs.Extension type Anno Name = SrcSpanAnnN

isExternalName :: Name -> Bool Source #

nameModule :: HasDebugCallStack => Name -> Module Source #

pprParenSymName :: NamedThing a => a -> SDoc Source #

print a `NamedThing`, adding parentheses if the name is an operator.

nameSrcSpan :: Name -> SrcSpan Source #

class NamedThing a where Source #

A class allowing convenient access to the `Name` of various datatypes

Minimal complete definition

getName

Methods

getOccName :: a -> OccName Source #

getName :: a -> Name Source #

#### Instances

Instances details

NamedThing Class Source # |
Instance details Defined in GHC.Core.Class Methods getOccName :: Class -> OccName Source # getName :: Class -> Name Source #
NamedThing ConLike Source # |
Instance details Defined in GHC.Core.ConLike Methods getOccName :: ConLike -> OccName Source # getName :: ConLike -> Name Source #
NamedThing DataCon Source # |
Instance details Defined in GHC.Core.DataCon Methods getOccName :: DataCon -> OccName Source # getName :: DataCon -> Name Source #
NamedThing FamInst Source # |
Instance details Defined in GHC.Core.FamInstEnv Methods getOccName :: FamInst -> OccName Source # getName :: FamInst -> Name Source #
NamedThing ClsInst Source # |
Instance details Defined in GHC.Core.InstEnv Methods getOccName :: ClsInst -> OccName Source # getName :: ClsInst -> Name Source #
NamedThing PatSyn Source # |
Instance details Defined in GHC.Core.PatSyn Methods getOccName :: PatSyn -> OccName Source # getName :: PatSyn -> Name Source #
NamedThing TyCon Source # |
Instance details Defined in GHC.Core.TyCon Methods getOccName :: TyCon -> OccName Source # getName :: TyCon -> Name Source #
NamedThing IfaceClassOp Source # |
Instance details Defined in GHC.Iface.Syntax Methods getOccName :: IfaceClassOp -> OccName Source # getName :: IfaceClassOp -> Name Source #
NamedThing IfaceConDecl Source # |
Instance details Defined in GHC.Iface.Syntax Methods getOccName :: IfaceConDecl -> OccName Source # getName :: IfaceConDecl -> Name Source #
NamedThing IfaceDecl Source # |
Instance details Defined in GHC.Iface.Syntax Methods getOccName :: IfaceDecl -> OccName Source # getName :: IfaceDecl -> Name Source #
NamedThing HoleFitCandidate Source # |
Instance details Defined in GHC.Tc.Errors.Hole.FitTypes Methods getOccName :: HoleFitCandidate -> OccName Source # getName :: HoleFitCandidate -> Name Source #
NamedThing InvalidFamInstQTv Source # |
Instance details Defined in GHC.Tc.Errors.Types Methods getOccName :: InvalidFamInstQTv -> OccName Source # getName :: InvalidFamInstQTv -> Name Source #
NamedThing Name Source # |
Instance details Defined in GHC.Types.Name Methods getOccName :: Name -> OccName Source # getName :: Name -> Name Source #
NamedThing TyThing Source # |
Instance details Defined in GHC.Types.TyThing Methods getOccName :: TyThing -> OccName Source # getName :: TyThing -> Name Source #
NamedThing Var Source # |
Instance details Defined in GHC.Types.Var Methods getOccName :: Var -> OccName Source # getName :: Var -> Name Source #
NamedThing (CoAxiom br) Source # |
Instance details Defined in GHC.Core.Coercion.Axiom Methods getOccName :: CoAxiom br -> OccName Source # getName :: CoAxiom br -> Name Source #
NamedThing e => NamedThing (Located e) Source # |
Instance details Defined in GHC.Types.Name Methods getOccName :: Located e -> OccName Source # getName :: Located e -> Name Source #
NamedThing (Located a) => NamedThing (LocatedAn an a) Source # |
Instance details Defined in GHC.Parser.Annotation Methods getOccName :: LocatedAn an a -> OccName Source # getName :: LocatedAn an a -> Name Source #
NamedThing tv => NamedThing (VarBndr tv flag) Source # |
Instance details Defined in GHC.Types.Var Methods getOccName :: VarBndr tv flag -> OccName Source # getName :: VarBndr tv flag -> Name Source #
NamedThing (HsTyVarBndr flag GhcRn) Source # |
Instance details Defined in GHC.Hs.Type Methods getOccName :: HsTyVarBndr flag GhcRn -> OccName Source # getName :: HsTyVarBndr flag GhcRn -> Name Source #

data RdrName Source #

Reader Name

Do not use the data constructors of RdrName directly: prefer the family of functions that creates them, such as `mkRdrUnqual`

- Note: A Located RdrName will only have API Annotations if it is a compound one, e.g.

    `bar`
    ( ~ )

- `AnnKeywordId` : `AnnType`, `AnnOpen` `'('` or `'['` or `'[:'`, `AnnClose` `')'` or `']'` or `':]'`,, `AnnBackquote` `'`'`, `AnnVal` `AnnTilde`,

Constructors

Unqual OccName | Unqualified name Used for ordinary, unqualified occurrences, e.g. `x`, `y` or `Foo`. Create such a `RdrName` with `mkRdrUnqual`
Qual ModuleName OccName | Qualified name A qualified name written by the user in source code. The module isn't necessarily the module where the thing is defined; just the one from which it is imported. Examples are `Bar.x`, `Bar.y` or `Bar.Foo`. Create such a `RdrName` with `mkRdrQual`

#### Instances

Instances details

DisambInfixOp RdrName Source # |
Instance details Defined in GHC.Parser.PostProcess Methods mkHsVarOpPV :: LocatedN RdrName -> PV (LocatedN RdrName) Source # mkHsConOpPV :: LocatedN RdrName -> PV (LocatedN RdrName) Source # mkHsInfixHolePV :: LocatedN (HsExpr GhcPs) -> PV (LocatedN RdrName) Source #
HasOccName RdrName Source # |
Instance details Defined in GHC.Types.Name.Reader Methods occName :: RdrName -> OccName Source #
Outputable RdrName Source # |
Instance details Defined in GHC.Types.Name.Reader Methods ppr :: RdrName -> SDoc Source #
OutputableBndr RdrName Source # |
Instance details Defined in GHC.Types.Name.Reader Methods pprBndr :: BindingSite -> RdrName -> SDoc Source # pprPrefixOcc :: RdrName -> SDoc Source # pprInfixOcc :: RdrName -> SDoc Source # bndrIsJoin_maybe :: RdrName -> JoinPointHood Source #
Data RdrName Source # |

Instance details

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 Source # |
Instance details Defined in GHC.Types.Name.Reader Methods (==) :: RdrName -> RdrName -> Bool # (/=) :: RdrName -> RdrName -> Bool #
Ord RdrName Source # |
Instance details Defined in GHC.Types.Name.Reader Methods compare :: RdrName -> RdrName -> Ordering # (<) :: RdrName -> RdrName -> Bool # (<=) :: RdrName -> RdrName -> Bool # (>) :: RdrName -> RdrName -> Bool # (>=) :: RdrName -> RdrName -> Bool # max :: RdrName -> RdrName -> RdrName # min :: RdrName -> RdrName -> RdrName #
type Anno RdrName Source # |
Instance details Defined in GHC.Hs.Extension type Anno RdrName = SrcSpanAnnN

## Identifiers

type Id = Var Source #

Identifier

idType :: Id -> Kind Source #

isImplicitId :: Id -> Bool Source #

`isImplicitId` tells whether an `Id`s info is implied by other declarations, so we don't need to put its signature in an interface file, even if it's mentioned in some other interface unfolding.

isDeadBinder :: Id -> Bool Source #

isExportedId :: Var -> Bool Source #

`isExportedIdVar` means "don't throw this away"

isLocalId :: Var -> Bool Source #

isGlobalId :: Var -> Bool Source #

isRecordSelector :: Id -> Bool Source #

isPrimOpId :: Id -> Bool Source #

isFCallId :: Id -> Bool Source #

isClassOpId_maybe :: Id -> Maybe Class Source #

isDataConWorkId :: Id -> Bool Source #

idDataCon :: Id -> DataCon Source #

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

isDeadEndId :: Var -> Bool Source #

Returns true if an application to n args diverges or throws an exception See Note [Dead ends] in GHC.Types.Demand.

isDictonaryId :: Id -> Bool Source #

recordSelectorTyCon :: Id -> RecSelParent Source #

If the `Id` is that for a record selector, extract the `sel_tycon`. Panic otherwise.

## Type constructors

data TyCon Source #

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

Instances details

NamedThing TyCon Source # |
Instance details Defined in GHC.Core.TyCon Methods getOccName :: TyCon -> OccName Source # getName :: TyCon -> Name Source #
Uniquable TyCon Source # |
Instance details Defined in GHC.Core.TyCon Methods getUnique :: TyCon -> Unique Source #
Outputable TyCon Source # |
Instance details Defined in GHC.Core.TyCon Methods ppr :: TyCon -> SDoc Source #
Data TyCon Source # |

Instance details

Defined in GHC.Core.TyCon

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TyCon -> c TyCon #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TyCon #

toConstr :: TyCon -> Constr #

dataTypeOf :: TyCon -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TyCon) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TyCon) #

gmapT :: (forall b. Data b => b -> b) -> TyCon -> TyCon #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TyCon -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TyCon -> r #

gmapQ :: (forall d. Data d => d -> u) -> TyCon -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> TyCon -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> TyCon -> m TyCon #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TyCon -> m TyCon #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TyCon -> m TyCon #

Eq TyCon Source # |
Instance details Defined in GHC.Core.TyCon Methods (==) :: TyCon -> TyCon -> Bool # (/=) :: TyCon -> TyCon -> Bool #

tyConTyVars :: TyCon -> [TyVar] Source #

TyVar binders

tyConDataCons :: TyCon -> [DataCon] Source #

As `tyConDataCons_maybe`, but returns the empty list of constructors if no constructors could be found

tyConArity :: TyCon -> Arity Source #

Arity

isClassTyCon :: TyCon -> Bool Source #

Is this `TyCon` that for a class instance?

isTypeSynonymTyCon :: TyCon -> Bool Source #

Is this a `TyCon` representing a regular H98 type synonym (`type`)?

isTypeFamilyTyCon :: TyCon -> Bool Source #

Is this a type family `TyCon` (whether open or closed)?

isNewTyCon :: TyCon -> Bool Source #

Is this `TyCon` that for a `newtype`

isPrimTyCon :: TyCon -> Bool Source #

Does this `TyCon` represent something that cannot be defined in Haskell?

isFamilyTyCon :: TyCon -> Bool Source #

Is this a `TyCon`, synonym or otherwise, that defines a family?

isOpenFamilyTyCon :: TyCon -> Bool Source #

Is this a `TyCon`, synonym or otherwise, that defines a family with instances?

isOpenTypeFamilyTyCon :: TyCon -> Bool Source #

Is this an open type family TyCon?

tyConClass_maybe :: TyCon -> Maybe Class Source #

If this `TyCon` is that for a class instance, return the class it is for. Otherwise returns `Nothing`

synTyConRhs_maybe :: TyCon -> Maybe Type Source #

Extract the information pertaining to the right hand side of a type synonym (`type`) declaration.

synTyConDefn_maybe :: TyCon -> Maybe ([TyVar], Type) Source #

Extract the `TyVar`s bound by a vanilla type synonym and the corresponding (unsubstituted) right hand side.

tyConKind :: TyCon -> Kind Source #

Kind of this TyCon

## Type variables

type TyVar = Var Source #

Type or kind Variable

alphaTyVars :: [TyVar] Source #

## Data constructors

data DataCon Source #

A data constructor

- `AnnKeywordId` : `AnnOpen`, `AnnClose`,`AnnComma`

#### Instances

Instances details

NamedThing DataCon Source # |
Instance details Defined in GHC.Core.DataCon Methods getOccName :: DataCon -> OccName Source # getName :: DataCon -> Name Source #
Uniquable DataCon Source # |
Instance details Defined in GHC.Core.DataCon Methods getUnique :: DataCon -> Unique Source #
Outputable DataCon Source # |
Instance details Defined in GHC.Core.DataCon Methods ppr :: DataCon -> SDoc Source #
OutputableBndr DataCon Source # |
Instance details Defined in GHC.Core.DataCon Methods pprBndr :: BindingSite -> DataCon -> SDoc Source # pprPrefixOcc :: DataCon -> SDoc Source # pprInfixOcc :: DataCon -> SDoc Source # bndrIsJoin_maybe :: DataCon -> JoinPointHood Source #
Data DataCon Source # |

Instance details

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 #

Eq DataCon Source # |
Instance details Defined in GHC.Core.DataCon Methods (==) :: DataCon -> DataCon -> Bool # (/=) :: DataCon -> DataCon -> Bool #

dataConType :: DataCon -> Type Source #

dataConTyCon :: DataCon -> TyCon Source #

The type constructor that we are building via this data constructor

dataConFieldLabels :: DataCon -> [FieldLabel] Source #

The labels for the fields of this particular `DataCon`

dataConIsInfix :: DataCon -> Bool Source #

Should the `DataCon` be presented infix?

isVanillaDataCon :: DataCon -> Bool Source #

Vanilla `DataCon`s are those that are nice boring Haskell 98 constructors

dataConWrapperType :: DataCon -> Type Source #

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.

dataConSrcBangs :: DataCon -> [HsSrcBang] Source #

Strictness/unpack annotations, from user; or, for imported DataCons, from the interface file The list is in one-to-one correspondence with the arity of the `DataCon`

data StrictnessMark Source #

Constructors

MarkedStrict |
NotMarkedStrict |

#### Instances

Instances details

Binary StrictnessMark Source # |
Instance details Defined in GHC.Core.DataCon Methods put_ :: BinHandle -> StrictnessMark -> IO () Source # put :: BinHandle -> StrictnessMark -> IO (Bin StrictnessMark) Source # get :: BinHandle -> IO StrictnessMark Source #
Outputable StrictnessMark Source # |
Instance details Defined in GHC.Core.DataCon Methods ppr :: StrictnessMark -> SDoc Source #
Eq StrictnessMark Source # |
Instance details Defined in GHC.Core.DataCon Methods (==) :: StrictnessMark -> StrictnessMark -> Bool # (/=) :: StrictnessMark -> StrictnessMark -> Bool #

isMarkedStrict :: StrictnessMark -> Bool Source #

## Classes

data Class Source #

#### Instances

Instances details

NamedThing Class Source # |
Instance details Defined in GHC.Core.Class Methods getOccName :: Class -> OccName Source # getName :: Class -> Name Source #
Uniquable Class Source # |
Instance details Defined in GHC.Core.Class Methods getUnique :: Class -> Unique Source #
Outputable Class Source # |
Instance details Defined in GHC.Core.Class Methods ppr :: Class -> SDoc Source #
Data Class Source # |

Instance details

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 #

toConstr :: Class -> Constr #

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 #

Eq Class Source # |
Instance details Defined in GHC.Core.Class Methods (==) :: Class -> Class -> Bool # (/=) :: Class -> Class -> Bool #

classMethods :: Class -> [Id] Source #

classSCTheta :: Class -> [PredType] Source #

classTvsFds :: Class -> ([TyVar], [FunDep TyVar]) Source #

classATs :: Class -> [TyCon] Source #

pprFundeps :: Outputable a => [FunDep a] -> SDoc Source #

## Instances

data ClsInst Source #

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

Instances details

NamedThing ClsInst Source # |
Instance details Defined in GHC.Core.InstEnv Methods getOccName :: ClsInst -> OccName Source # getName :: ClsInst -> Name Source #
Outputable ClsInst Source # |
Instance details Defined in GHC.Core.InstEnv Methods ppr :: ClsInst -> SDoc Source #
Data ClsInst Source # |

Instance details

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 Source #

pprInstance :: ClsInst -> SDoc Source #

pprInstanceHdr :: ClsInst -> SDoc Source #

pprFamInst :: FamInst -> SDoc Source #

Pretty-prints a `FamInst` (type/data family instance) with its defining location.

data FamInst Source #

#### Instances

Instances details

NamedThing FamInst Source # |
Instance details Defined in GHC.Core.FamInstEnv Methods getOccName :: FamInst -> OccName Source # getName :: FamInst -> Name Source #
Outputable FamInst Source # |
Instance details Defined in GHC.Core.FamInstEnv Methods ppr :: FamInst -> SDoc Source #

## Types and Kinds

data Type Source #

#### Instances

Instances details

Outputable Type Source # |
Instance details Defined in GHC.Core.TyCo.Rep Methods ppr :: Type -> SDoc Source #
Data Type Source # |

Instance details

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 #

toConstr :: Type -> Constr #

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 (DeBruijn Type) Source # |
Instance details Defined in GHC.Core.Map.Type Methods (==) :: DeBruijn Type -> DeBruijn Type -> Bool # (/=) :: DeBruijn Type -> DeBruijn Type -> Bool #

splitForAllTyCoVars :: Type -> ([TyCoVar], Type) Source #

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.

funResultTy :: HasDebugCallStack => Type -> Type Source #

Extract the function result type and panic if that is not possible

pprParendType :: Type -> SDoc Source #

pprTypeApp :: TyCon -> [Type] -> SDoc Source #

type Kind = Type Source #

The key type representing kinds in the compiler.

type PredType = Type Source #

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"

type ThetaType = [PredType] Source #

A collection of `PredType`s

pprForAll :: [ForAllTyBinder] -> SDoc Source #

pprThetaArrowTy :: ThetaType -> SDoc Source #

parseInstanceHead :: GhcMonad m => String -> m Type Source #

getInstancesForType :: GhcMonad m => Type -> m [ClsInst] Source #

## Entities

data TyThing Source #

A global typecheckable-thing, essentially anything that has a name. Not to be confused with a `TcTyThing`, which is also a typecheckable thing but in the *local* context. See GHC.Tc.Utils.Env for how to retrieve a `TyThing` given a `Name`.

Constructors

AnId Id |
AConLike ConLike |
ATyCon TyCon |
ACoAxiom (CoAxiom Branched) |

#### Instances

Instances details

NamedThing TyThing Source # |
Instance details Defined in GHC.Types.TyThing Methods getOccName :: TyThing -> OccName Source # getName :: TyThing -> Name Source #
Outputable TyThing Source # |
Instance details Defined in GHC.Types.TyThing Methods ppr :: TyThing -> SDoc Source #

## Syntax

module GHC.Hs

## Fixities

data FixityDirection Source #

Constructors

InfixL |
InfixR |
InfixN |

#### Instances

Instances details

Binary FixityDirection Source # |
Instance details Defined in GHC.Types.Fixity Methods put_ :: BinHandle -> FixityDirection -> IO () Source # put :: BinHandle -> FixityDirection -> IO (Bin FixityDirection) Source # get :: BinHandle -> IO FixityDirection Source #
Outputable FixityDirection Source # |
Instance details Defined in GHC.Types.Fixity Methods ppr :: FixityDirection -> SDoc Source #
Data FixityDirection Source # |

Instance details

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 Source # |
Instance details Defined in GHC.Types.Fixity Methods (==) :: FixityDirection -> FixityDirection -> Bool # (/=) :: FixityDirection -> FixityDirection -> Bool #

defaultFixity :: Fixity Source #

maxPrecedence :: Int Source #

negateFixity :: Fixity Source #

compareFixity :: Fixity -> Fixity -> (Bool, Bool) Source #

data LexicalFixity Source #

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 |
Infix |

#### Instances

Instances details

Outputable LexicalFixity Source # |
Instance details Defined in GHC.Types.Fixity Methods ppr :: LexicalFixity -> SDoc Source #
Data LexicalFixity Source # |

Instance details

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 Source # |
Instance details Defined in GHC.Types.Fixity Methods (==) :: LexicalFixity -> LexicalFixity -> Bool # (/=) :: LexicalFixity -> LexicalFixity -> Bool #

## Source locations

data SrcLoc Source #

Source Location

Constructors

RealSrcLoc !RealSrcLoc !(Maybe BufPos) |
UnhelpfulLoc !FastString |

#### Instances

Instances details

Outputable SrcLoc Source # |
Instance details Defined in GHC.Types.SrcLoc Methods ppr :: SrcLoc -> SDoc Source #
Show SrcLoc Source # |
Instance details Defined in GHC.Types.SrcLoc Methods showsPrec :: Int -> SrcLoc -> ShowS # show :: SrcLoc -> String # showList :: [SrcLoc] -> ShowS #
Eq SrcLoc Source # |
Instance details Defined in GHC.Types.SrcLoc Methods (==) :: SrcLoc -> SrcLoc -> Bool # (/=) :: SrcLoc -> SrcLoc -> Bool #

data RealSrcLoc Source #

Real Source Location

Represents a single point within a file

#### Instances

Instances details

Outputable RealSrcLoc Source # |
Instance details Defined in GHC.Types.SrcLoc Methods ppr :: RealSrcLoc -> SDoc Source #
Show RealSrcLoc Source # |
Instance details Defined in GHC.Types.SrcLoc Methods showsPrec :: Int -> RealSrcLoc -> ShowS # show :: RealSrcLoc -> String # showList :: [RealSrcLoc] -> ShowS #
Eq RealSrcLoc Source # |
Instance details Defined in GHC.Types.SrcLoc Methods (==) :: RealSrcLoc -> RealSrcLoc -> Bool # (/=) :: RealSrcLoc -> RealSrcLoc -> Bool #
Ord RealSrcLoc Source # |
Instance details 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 #

mkSrcLoc :: FastString -> Int -> Int -> SrcLoc Source #

noSrcLoc :: SrcLoc Source #

Built-in "bad" `SrcLoc` values for particular locations

srcLocFile :: RealSrcLoc -> FastString Source #

Gives the filename of the `RealSrcLoc`

srcLocLine :: RealSrcLoc -> Int Source #

Raises an error when used on a "bad" `SrcLoc`

srcLocCol :: RealSrcLoc -> Int Source #

Raises an error when used on a "bad" `SrcLoc`

data SrcSpan Source #

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

Instances details

NFData SrcSpan Source # |
Instance details Defined in GHC.Types.SrcLoc Methods rnf :: SrcSpan -> () Source #
HasAnnotation SrcSpan Source # |
Instance details Defined in GHC.Parser.Annotation Methods noAnnSrcSpan :: SrcSpan -> SrcSpan Source #
HasLoc SrcSpan Source # |
Instance details Defined in GHC.Parser.Annotation Methods getHasLoc :: SrcSpan -> SrcSpan Source #
ToJson SrcSpan Source # |
Instance details Defined in GHC.Types.SrcLoc Methods json :: SrcSpan -> JsonDoc Source #
Outputable SrcSpan Source # |
Instance details Defined in GHC.Types.SrcLoc Methods ppr :: SrcSpan -> SDoc Source #
Data SrcSpan Source # |

Instance details

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 Source # |
Instance details Defined in GHC.Types.SrcLoc Methods showsPrec :: Int -> SrcSpan -> ShowS # show :: SrcSpan -> String # showList :: [SrcSpan] -> ShowS #
Eq SrcSpan Source # |
Instance details Defined in GHC.Types.SrcLoc Methods (==) :: SrcSpan -> SrcSpan -> Bool # (/=) :: SrcSpan -> SrcSpan -> Bool #
NamedThing e => NamedThing (Located e) Source # |
Instance details Defined in GHC.Types.Name Methods getOccName :: Located e -> OccName Source # getName :: Located e -> Name Source #
Outputable e => Outputable (Located e) Source # |
Instance details Defined in GHC.Types.SrcLoc Methods ppr :: Located e -> SDoc Source #
(UnXRec p, Outputable (XRec p FieldLabelString)) => OutputableBndr (Located (FieldLabelStrings p)) Source # |
Instance details Defined in GHC.Hs.Expr Methods pprBndr :: BindingSite -> Located (FieldLabelStrings p) -> SDoc Source # pprPrefixOcc :: Located (FieldLabelStrings p) -> SDoc Source # pprInfixOcc :: Located (FieldLabelStrings p) -> SDoc Source # bndrIsJoin_maybe :: Located (FieldLabelStrings p) -> JoinPointHood Source #
OutputableBndr (Located (AmbiguousFieldOcc (GhcPass p))) Source # |
Instance details Defined in GHC.Hs.Type Methods pprBndr :: BindingSite -> Located (AmbiguousFieldOcc (GhcPass p)) -> SDoc Source # pprPrefixOcc :: Located (AmbiguousFieldOcc (GhcPass p)) -> SDoc Source # pprInfixOcc :: Located (AmbiguousFieldOcc (GhcPass p)) -> SDoc Source # bndrIsJoin_maybe :: Located (AmbiguousFieldOcc (GhcPass p)) -> JoinPointHood Source #
(UnXRec pass, OutputableBndr (XRec pass RdrName)) => OutputableBndr (GenLocated SrcSpan (FieldOcc pass)) Source # |
Instance details Defined in GHC.Hs.Type Methods pprBndr :: BindingSite -> GenLocated SrcSpan (FieldOcc pass) -> SDoc Source # pprPrefixOcc :: GenLocated SrcSpan (FieldOcc pass) -> SDoc Source # pprInfixOcc :: GenLocated SrcSpan (FieldOcc pass) -> SDoc Source # bndrIsJoin_maybe :: GenLocated SrcSpan (FieldOcc pass) -> JoinPointHood Source #

data RealSrcSpan Source #

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

Instances details

ToJson RealSrcSpan Source # |
Instance details Defined in GHC.Types.SrcLoc Methods json :: RealSrcSpan -> JsonDoc Source #
Outputable RealSrcSpan Source # |
Instance details Defined in GHC.Types.SrcLoc Methods ppr :: RealSrcSpan -> SDoc Source #
Data RealSrcSpan Source # |

Instance details

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 Source # |
Instance details Defined in GHC.Types.SrcLoc Methods showsPrec :: Int -> RealSrcSpan -> ShowS # show :: RealSrcSpan -> String # showList :: [RealSrcSpan] -> ShowS #
Eq RealSrcSpan Source # |
Instance details Defined in GHC.Types.SrcLoc Methods (==) :: RealSrcSpan -> RealSrcSpan -> Bool # (/=) :: RealSrcSpan -> RealSrcSpan -> Bool #
Ord RealSrcSpan Source # |
Instance details 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) Source # |
Instance details Defined in GHC.Types.SrcLoc Methods ppr :: GenLocated RealSrcSpan e -> SDoc Source #

mkSrcSpan :: SrcLoc -> SrcLoc -> SrcSpan Source #

Create a `SrcSpan` between two points in a file

srcLocSpan :: SrcLoc -> SrcSpan Source #

Create a `SrcSpan` corresponding to a single point

isGoodSrcSpan :: SrcSpan -> Bool Source #

Test if a `SrcSpan` is "good", i.e. has precise location information

noSrcSpan :: SrcSpan Source #

Built-in "bad" `SrcSpan`s for common sources of location uncertainty

srcSpanStart :: SrcSpan -> SrcLoc Source #

Returns the location at the start of the `SrcSpan` or a "bad" `SrcSpan` if that is unavailable

srcSpanEnd :: SrcSpan -> SrcLoc Source #

Returns the location at the end of the `SrcSpan` or a "bad" `SrcSpan` if that is unavailable

srcSpanFile :: RealSrcSpan -> FastString Source #

srcSpanStartLine :: RealSrcSpan -> Int Source #

srcSpanEndLine :: RealSrcSpan -> Int Source #

srcSpanStartCol :: RealSrcSpan -> Int Source #

srcSpanEndCol :: RealSrcSpan -> Int Source #

## Located

data GenLocated l e Source #

We attach SrcSpans to lots of things, so let's have a datatype for it.

Constructors

L l e |

#### Instances

Instances details

HasAnnotation EpaLocation Source # |
Instance details Defined in GHC.Parser.Annotation Methods noAnnSrcSpan :: SrcSpan -> EpaLocation Source #
HasLoc EpaLocation Source # |
Instance details Defined in GHC.Parser.Annotation Methods getHasLoc :: EpaLocation -> SrcSpan Source #
NoAnn EpaLocation Source # |
Instance details Defined in GHC.Parser.Annotation Methods noAnn :: EpaLocation Source #
Semigroup EpaLocation Source # |
Instance details Defined in GHC.Parser.Annotation Methods (<>) :: EpaLocation -> EpaLocation -> EpaLocation # sconcat :: NonEmpty EpaLocation -> EpaLocation # stimes :: Integral b => b -> EpaLocation -> EpaLocation #
NamedThing e => NamedThing (Located e) Source # |
Instance details Defined in GHC.Types.Name Methods getOccName :: Located e -> OccName Source # getName :: Located e -> Name Source #
Outputable e => Outputable (Located e) Source # |
Instance details Defined in GHC.Types.SrcLoc Methods ppr :: Located e -> SDoc Source #
(UnXRec p, Outputable (XRec p FieldLabelString)) => OutputableBndr (Located (FieldLabelStrings p)) Source # |
Instance details Defined in GHC.Hs.Expr Methods pprBndr :: BindingSite -> Located (FieldLabelStrings p) -> SDoc Source # pprPrefixOcc :: Located (FieldLabelStrings p) -> SDoc Source # pprInfixOcc :: Located (FieldLabelStrings p) -> SDoc Source # bndrIsJoin_maybe :: Located (FieldLabelStrings p) -> JoinPointHood Source #
OutputableBndr (Located (AmbiguousFieldOcc (GhcPass p))) Source # |
Instance details Defined in GHC.Hs.Type Methods pprBndr :: BindingSite -> Located (AmbiguousFieldOcc (GhcPass p)) -> SDoc Source # pprPrefixOcc :: Located (AmbiguousFieldOcc (GhcPass p)) -> SDoc Source # pprInfixOcc :: Located (AmbiguousFieldOcc (GhcPass p)) -> SDoc Source # bndrIsJoin_maybe :: Located (AmbiguousFieldOcc (GhcPass p)) -> JoinPointHood Source #
Functor (GenLocated l) Source # |
Instance details Defined in GHC.Types.SrcLoc Methods fmap :: (a -> b) -> GenLocated l a -> GenLocated l b # (<$) :: a -> GenLocated l b -> GenLocated l a #
Foldable (GenLocated l) Source # |

Instance details

Defined in GHC.Types.SrcLoc

Methods

fold :: Monoid m => GenLocated l m -> m #

foldMap :: Monoid m => (a -> m) -> GenLocated l a -> m #

foldMap' :: Monoid m => (a -> m) -> GenLocated l a -> m #

foldr :: (a -> b -> b) -> b -> GenLocated l a -> b #

foldr' :: (a -> b -> b) -> b -> GenLocated l a -> b #

foldl :: (b -> a -> b) -> b -> GenLocated l a -> b #

foldl' :: (b -> a -> b) -> b -> GenLocated l a -> b #

foldr1 :: (a -> a -> a) -> GenLocated l a -> a #

foldl1 :: (a -> a -> a) -> GenLocated l a -> a #

toList :: GenLocated l a -> [a] #

null :: GenLocated l a -> Bool #

length :: GenLocated l a -> Int #

elem :: Eq a => a -> GenLocated l a -> Bool #

maximum :: Ord a => GenLocated l a -> a #

minimum :: Ord a => GenLocated l a -> a #

sum :: Num a => GenLocated l a -> a #

product :: Num a => GenLocated l a -> a #

Traversable (GenLocated l) Source # |
Instance details Defined in GHC.Types.SrcLoc Methods traverse :: Applicative f => (a -> f b) -> GenLocated l a -> f (GenLocated l b) # sequenceA :: Applicative f => GenLocated l (f a) -> f (GenLocated l a) # mapM :: Monad m => (a -> m b) -> GenLocated l a -> m (GenLocated l b) # sequence :: Monad m => GenLocated l (m a) -> m (GenLocated l a) #
(NFData l, NFData e) => NFData (GenLocated l e) Source # |
Instance details Defined in GHC.Types.SrcLoc Methods rnf :: GenLocated l e -> () Source #
HasLoc l => HasLoc (GenLocated l a) Source # |
Instance details Defined in GHC.Parser.Annotation Methods getHasLoc :: GenLocated l a -> SrcSpan Source #
NamedThing (Located a) => NamedThing (LocatedAn an a) Source # |
Instance details Defined in GHC.Parser.Annotation Methods getOccName :: LocatedAn an a -> OccName Source # getName :: LocatedAn an a -> Name Source #
(Outputable a, Outputable e) => Outputable (GenLocated (EpAnn a) e) Source # |
Instance details Defined in GHC.Parser.Annotation Methods ppr :: GenLocated (EpAnn a) e -> SDoc Source #
Outputable e => Outputable (GenLocated EpaLocation e) Source # |
Instance details Defined in GHC.Parser.Annotation Methods ppr :: GenLocated EpaLocation e -> SDoc Source #
Outputable a => Outputable (GenLocated TokenLocation a) Source # |
Instance details Defined in GHC.Parser.Annotation Methods ppr :: GenLocated TokenLocation a -> SDoc Source #
Outputable (GenLocated NoCommentsLocation EpaComment) Source # |
Instance details Defined in GHC.Parser.Annotation Methods ppr :: GenLocated NoCommentsLocation EpaComment -> SDoc Source #
Outputable e => Outputable (GenLocated RealSrcSpan e) Source # |
Instance details Defined in GHC.Types.SrcLoc Methods ppr :: GenLocated RealSrcSpan e -> SDoc Source #
(Outputable a, OutputableBndr e) => OutputableBndr (GenLocated (EpAnn a) e) Source # |
Instance details Defined in GHC.Parser.Annotation Methods pprBndr :: BindingSite -> GenLocated (EpAnn a) e -> SDoc Source # pprPrefixOcc :: GenLocated (EpAnn a) e -> SDoc Source # pprInfixOcc :: GenLocated (EpAnn a) e -> SDoc Source # bndrIsJoin_maybe :: GenLocated (EpAnn a) e -> JoinPointHood Source #
(UnXRec pass, OutputableBndr (XRec pass RdrName)) => OutputableBndr (GenLocated SrcSpan (FieldOcc pass)) Source # |
Instance details Defined in GHC.Hs.Type Methods pprBndr :: BindingSite -> GenLocated SrcSpan (FieldOcc pass) -> SDoc Source # pprPrefixOcc :: GenLocated SrcSpan (FieldOcc pass) -> SDoc Source # pprInfixOcc :: GenLocated SrcSpan (FieldOcc pass) -> SDoc Source # bndrIsJoin_maybe :: GenLocated SrcSpan (FieldOcc pass) -> JoinPointHood Source #
(Data l, Data e) => Data (GenLocated l e) Source # |

Instance details

Defined in GHC.Types.SrcLoc

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GenLocated l e -> c (GenLocated l e) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (GenLocated l e) #

toConstr :: GenLocated l e -> Constr #

dataTypeOf :: GenLocated l e -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (GenLocated l e)) #

dataCast2 :: Typeable t => (forall d e0. (Data d, Data e0) => c (t d e0)) -> Maybe (c (GenLocated l e)) #

gmapT :: (forall b. Data b => b -> b) -> GenLocated l e -> GenLocated l e #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GenLocated l e -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GenLocated l e -> r #

gmapQ :: (forall d. Data d => d -> u) -> GenLocated l e -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> GenLocated l e -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> GenLocated l e -> m (GenLocated l e) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GenLocated l e -> m (GenLocated l e) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GenLocated l e -> m (GenLocated l e) #

Data (GRHS GhcPs (LocatedA (HsCmd GhcPs))) Source # |

Instance details

Defined in GHC.Hs.Instances

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GRHS GhcPs (LocatedA (HsCmd GhcPs)) -> c (GRHS GhcPs (LocatedA (HsCmd GhcPs))) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (GRHS GhcPs (LocatedA (HsCmd GhcPs))) #

toConstr :: GRHS GhcPs (LocatedA (HsCmd GhcPs)) -> Constr #

dataTypeOf :: GRHS GhcPs (LocatedA (HsCmd GhcPs)) -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (GRHS GhcPs (LocatedA (HsCmd GhcPs)))) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (GRHS GhcPs (LocatedA (HsCmd GhcPs)))) #

gmapT :: (forall b. Data b => b -> b) -> GRHS GhcPs (LocatedA (HsCmd GhcPs)) -> GRHS GhcPs (LocatedA (HsCmd GhcPs)) #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GRHS GhcPs (LocatedA (HsCmd GhcPs)) -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GRHS GhcPs (LocatedA (HsCmd GhcPs)) -> r #

gmapQ :: (forall d. Data d => d -> u) -> GRHS GhcPs (LocatedA (HsCmd GhcPs)) -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> GRHS GhcPs (LocatedA (HsCmd GhcPs)) -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> GRHS GhcPs (LocatedA (HsCmd GhcPs)) -> m (GRHS GhcPs (LocatedA (HsCmd GhcPs))) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GRHS GhcPs (LocatedA (HsCmd GhcPs)) -> m (GRHS GhcPs (LocatedA (HsCmd GhcPs))) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GRHS GhcPs (LocatedA (HsCmd GhcPs)) -> m (GRHS GhcPs (LocatedA (HsCmd GhcPs))) #

Data (GRHS GhcPs (LocatedA (HsExpr GhcPs))) Source # |

Instance details

Defined in GHC.Hs.Instances

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GRHS GhcPs (LocatedA (HsExpr GhcPs)) -> c (GRHS GhcPs (LocatedA (HsExpr GhcPs))) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (GRHS GhcPs (LocatedA (HsExpr GhcPs))) #

toConstr :: GRHS GhcPs (LocatedA (HsExpr GhcPs)) -> Constr #

dataTypeOf :: GRHS GhcPs (LocatedA (HsExpr GhcPs)) -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (GRHS GhcPs (LocatedA (HsExpr GhcPs)))) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (GRHS GhcPs (LocatedA (HsExpr GhcPs)))) #

gmapT :: (forall b. Data b => b -> b) -> GRHS GhcPs (LocatedA (HsExpr GhcPs)) -> GRHS GhcPs (LocatedA (HsExpr GhcPs)) #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GRHS GhcPs (LocatedA (HsExpr GhcPs)) -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GRHS GhcPs (LocatedA (HsExpr GhcPs)) -> r #

gmapQ :: (forall d. Data d => d -> u) -> GRHS GhcPs (LocatedA (HsExpr GhcPs)) -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> GRHS GhcPs (LocatedA (HsExpr GhcPs)) -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> GRHS GhcPs (LocatedA (HsExpr GhcPs)) -> m (GRHS GhcPs (LocatedA (HsExpr GhcPs))) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GRHS GhcPs (LocatedA (HsExpr GhcPs)) -> m (GRHS GhcPs (LocatedA (HsExpr GhcPs))) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GRHS GhcPs (LocatedA (HsExpr GhcPs)) -> m (GRHS GhcPs (LocatedA (HsExpr GhcPs))) #

Data (GRHS GhcRn (LocatedA (HsCmd GhcRn))) Source # |

Instance details

Defined in GHC.Hs.Instances

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GRHS GhcRn (LocatedA (HsCmd GhcRn)) -> c (GRHS GhcRn (LocatedA (HsCmd GhcRn))) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (GRHS GhcRn (LocatedA (HsCmd GhcRn))) #

toConstr :: GRHS GhcRn (LocatedA (HsCmd GhcRn)) -> Constr #

dataTypeOf :: GRHS GhcRn (LocatedA (HsCmd GhcRn)) -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (GRHS GhcRn (LocatedA (HsCmd GhcRn)))) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (GRHS GhcRn (LocatedA (HsCmd GhcRn)))) #

gmapT :: (forall b. Data b => b -> b) -> GRHS GhcRn (LocatedA (HsCmd GhcRn)) -> GRHS GhcRn (LocatedA (HsCmd GhcRn)) #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GRHS GhcRn (LocatedA (HsCmd GhcRn)) -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GRHS GhcRn (LocatedA (HsCmd GhcRn)) -> r #

gmapQ :: (forall d. Data d => d -> u) -> GRHS GhcRn (LocatedA (HsCmd GhcRn)) -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> GRHS GhcRn (LocatedA (HsCmd GhcRn)) -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> GRHS GhcRn (LocatedA (HsCmd GhcRn)) -> m (GRHS GhcRn (LocatedA (HsCmd GhcRn))) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GRHS GhcRn (LocatedA (HsCmd GhcRn)) -> m (GRHS GhcRn (LocatedA (HsCmd GhcRn))) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GRHS GhcRn (LocatedA (HsCmd GhcRn)) -> m (GRHS GhcRn (LocatedA (HsCmd GhcRn))) #

Data (GRHS GhcRn (LocatedA (HsExpr GhcRn))) Source # |

Instance details

Defined in GHC.Hs.Instances

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GRHS GhcRn (LocatedA (HsExpr GhcRn)) -> c (GRHS GhcRn (LocatedA (HsExpr GhcRn))) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (GRHS GhcRn (LocatedA (HsExpr GhcRn))) #

toConstr :: GRHS GhcRn (LocatedA (HsExpr GhcRn)) -> Constr #

dataTypeOf :: GRHS GhcRn (LocatedA (HsExpr GhcRn)) -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (GRHS GhcRn (LocatedA (HsExpr GhcRn)))) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (GRHS GhcRn (LocatedA (HsExpr GhcRn)))) #

gmapT :: (forall b. Data b => b -> b) -> GRHS GhcRn (LocatedA (HsExpr GhcRn)) -> GRHS GhcRn (LocatedA (HsExpr GhcRn)) #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GRHS GhcRn (LocatedA (HsExpr GhcRn)) -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GRHS GhcRn (LocatedA (HsExpr GhcRn)) -> r #

gmapQ :: (forall d. Data d => d -> u) -> GRHS GhcRn (LocatedA (HsExpr GhcRn)) -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> GRHS GhcRn (LocatedA (HsExpr GhcRn)) -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> GRHS GhcRn (LocatedA (HsExpr GhcRn)) -> m (GRHS GhcRn (LocatedA (HsExpr GhcRn))) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GRHS GhcRn (LocatedA (HsExpr GhcRn)) -> m (GRHS GhcRn (LocatedA (HsExpr GhcRn))) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GRHS GhcRn (LocatedA (HsExpr GhcRn)) -> m (GRHS GhcRn (LocatedA (HsExpr GhcRn))) #

Data (GRHS GhcTc (LocatedA (HsCmd GhcTc))) Source # |

Instance details

Defined in GHC.Hs.Instances

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GRHS GhcTc (LocatedA (HsCmd GhcTc)) -> c (GRHS GhcTc (LocatedA (HsCmd GhcTc))) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (GRHS GhcTc (LocatedA (HsCmd GhcTc))) #

toConstr :: GRHS GhcTc (LocatedA (HsCmd GhcTc)) -> Constr #

dataTypeOf :: GRHS GhcTc (LocatedA (HsCmd GhcTc)) -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (GRHS GhcTc (LocatedA (HsCmd GhcTc)))) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (GRHS GhcTc (LocatedA (HsCmd GhcTc)))) #

gmapT :: (forall b. Data b => b -> b) -> GRHS GhcTc (LocatedA (HsCmd GhcTc)) -> GRHS GhcTc (LocatedA (HsCmd GhcTc)) #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GRHS GhcTc (LocatedA (HsCmd GhcTc)) -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GRHS GhcTc (LocatedA (HsCmd GhcTc)) -> r #

gmapQ :: (forall d. Data d => d -> u) -> GRHS GhcTc (LocatedA (HsCmd GhcTc)) -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> GRHS GhcTc (LocatedA (HsCmd GhcTc)) -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> GRHS GhcTc (LocatedA (HsCmd GhcTc)) -> m (GRHS GhcTc (LocatedA (HsCmd GhcTc))) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GRHS GhcTc (LocatedA (HsCmd GhcTc)) -> m (GRHS GhcTc (LocatedA (HsCmd GhcTc))) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GRHS GhcTc (LocatedA (HsCmd GhcTc)) -> m (GRHS GhcTc (LocatedA (HsCmd GhcTc))) #

Data (GRHS GhcTc (LocatedA (HsExpr GhcTc))) Source # |

Instance details

Defined in GHC.Hs.Instances

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GRHS GhcTc (LocatedA (HsExpr GhcTc)) -> c (GRHS GhcTc (LocatedA (HsExpr GhcTc))) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (GRHS GhcTc (LocatedA (HsExpr GhcTc))) #

toConstr :: GRHS GhcTc (LocatedA (HsExpr GhcTc)) -> Constr #

dataTypeOf :: GRHS GhcTc (LocatedA (HsExpr GhcTc)) -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (GRHS GhcTc (LocatedA (HsExpr GhcTc)))) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (GRHS GhcTc (LocatedA (HsExpr GhcTc)))) #

gmapT :: (forall b. Data b => b -> b) -> GRHS GhcTc (LocatedA (HsExpr GhcTc)) -> GRHS GhcTc (LocatedA (HsExpr GhcTc)) #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GRHS GhcTc (LocatedA (HsExpr GhcTc)) -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GRHS GhcTc (LocatedA (HsExpr GhcTc)) -> r #

gmapQ :: (forall d. Data d => d -> u) -> GRHS GhcTc (LocatedA (HsExpr GhcTc)) -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> GRHS GhcTc (LocatedA (HsExpr GhcTc)) -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> GRHS GhcTc (LocatedA (HsExpr GhcTc)) -> m (GRHS GhcTc (LocatedA (HsExpr GhcTc))) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GRHS GhcTc (LocatedA (HsExpr GhcTc)) -> m (GRHS GhcTc (LocatedA (HsExpr GhcTc))) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GRHS GhcTc (LocatedA (HsExpr GhcTc)) -> m (GRHS GhcTc (LocatedA (HsExpr GhcTc))) #

Data (GRHSs GhcPs (LocatedA (HsCmd GhcPs))) Source # |

Instance details

Defined in GHC.Hs.Instances

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GRHSs GhcPs (LocatedA (HsCmd GhcPs)) -> c (GRHSs GhcPs (LocatedA (HsCmd GhcPs))) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (GRHSs GhcPs (LocatedA (HsCmd GhcPs))) #

toConstr :: GRHSs GhcPs (LocatedA (HsCmd GhcPs)) -> Constr #

dataTypeOf :: GRHSs GhcPs (LocatedA (HsCmd GhcPs)) -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (GRHSs GhcPs (LocatedA (HsCmd GhcPs)))) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (GRHSs GhcPs (LocatedA (HsCmd GhcPs)))) #

gmapT :: (forall b. Data b => b -> b) -> GRHSs GhcPs (LocatedA (HsCmd GhcPs)) -> GRHSs GhcPs (LocatedA (HsCmd GhcPs)) #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GRHSs GhcPs (LocatedA (HsCmd GhcPs)) -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GRHSs GhcPs (LocatedA (HsCmd GhcPs)) -> r #

gmapQ :: (forall d. Data d => d -> u) -> GRHSs GhcPs (LocatedA (HsCmd GhcPs)) -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> GRHSs GhcPs (LocatedA (HsCmd GhcPs)) -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> GRHSs GhcPs (LocatedA (HsCmd GhcPs)) -> m (GRHSs GhcPs (LocatedA (HsCmd GhcPs))) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GRHSs GhcPs (LocatedA (HsCmd GhcPs)) -> m (GRHSs GhcPs (LocatedA (HsCmd GhcPs))) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GRHSs GhcPs (LocatedA (HsCmd GhcPs)) -> m (GRHSs GhcPs (LocatedA (HsCmd GhcPs))) #

Data (GRHSs GhcPs (LocatedA (HsExpr GhcPs))) Source # |

Instance details

Defined in GHC.Hs.Instances

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GRHSs GhcPs (LocatedA (HsExpr GhcPs)) -> c (GRHSs GhcPs (LocatedA (HsExpr GhcPs))) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (GRHSs GhcPs (LocatedA (HsExpr GhcPs))) #

toConstr :: GRHSs GhcPs (LocatedA (HsExpr GhcPs)) -> Constr #

dataTypeOf :: GRHSs GhcPs (LocatedA (HsExpr GhcPs)) -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (GRHSs GhcPs (LocatedA (HsExpr GhcPs)))) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (GRHSs GhcPs (LocatedA (HsExpr GhcPs)))) #

gmapT :: (forall b. Data b => b -> b) -> GRHSs GhcPs (LocatedA (HsExpr GhcPs)) -> GRHSs GhcPs (LocatedA (HsExpr GhcPs)) #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GRHSs GhcPs (LocatedA (HsExpr GhcPs)) -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GRHSs GhcPs (LocatedA (HsExpr GhcPs)) -> r #

gmapQ :: (forall d. Data d => d -> u) -> GRHSs GhcPs (LocatedA (HsExpr GhcPs)) -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> GRHSs GhcPs (LocatedA (HsExpr GhcPs)) -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> GRHSs GhcPs (LocatedA (HsExpr GhcPs)) -> m (GRHSs GhcPs (LocatedA (HsExpr GhcPs))) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GRHSs GhcPs (LocatedA (HsExpr GhcPs)) -> m (GRHSs GhcPs (LocatedA (HsExpr GhcPs))) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GRHSs GhcPs (LocatedA (HsExpr GhcPs)) -> m (GRHSs GhcPs (LocatedA (HsExpr GhcPs))) #

Data (GRHSs GhcRn (LocatedA (HsCmd GhcRn))) Source # |

Instance details

Defined in GHC.Hs.Instances

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GRHSs GhcRn (LocatedA (HsCmd GhcRn)) -> c (GRHSs GhcRn (LocatedA (HsCmd GhcRn))) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (GRHSs GhcRn (LocatedA (HsCmd GhcRn))) #

toConstr :: GRHSs GhcRn (LocatedA (HsCmd GhcRn)) -> Constr #

dataTypeOf :: GRHSs GhcRn (LocatedA (HsCmd GhcRn)) -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (GRHSs GhcRn (LocatedA (HsCmd GhcRn)))) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (GRHSs GhcRn (LocatedA (HsCmd GhcRn)))) #

gmapT :: (forall b. Data b => b -> b) -> GRHSs GhcRn (LocatedA (HsCmd GhcRn)) -> GRHSs GhcRn (LocatedA (HsCmd GhcRn)) #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GRHSs GhcRn (LocatedA (HsCmd GhcRn)) -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GRHSs GhcRn (LocatedA (HsCmd GhcRn)) -> r #

gmapQ :: (forall d. Data d => d -> u) -> GRHSs GhcRn (LocatedA (HsCmd GhcRn)) -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> GRHSs GhcRn (LocatedA (HsCmd GhcRn)) -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> GRHSs GhcRn (LocatedA (HsCmd GhcRn)) -> m (GRHSs GhcRn (LocatedA (HsCmd GhcRn))) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GRHSs GhcRn (LocatedA (HsCmd GhcRn)) -> m (GRHSs GhcRn (LocatedA (HsCmd GhcRn))) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GRHSs GhcRn (LocatedA (HsCmd GhcRn)) -> m (GRHSs GhcRn (LocatedA (HsCmd GhcRn))) #

Data (GRHSs GhcRn (LocatedA (HsExpr GhcRn))) Source # |

Instance details

Defined in GHC.Hs.Instances

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GRHSs GhcRn (LocatedA (HsExpr GhcRn)) -> c (GRHSs GhcRn (LocatedA (HsExpr GhcRn))) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (GRHSs GhcRn (LocatedA (HsExpr GhcRn))) #

toConstr :: GRHSs GhcRn (LocatedA (HsExpr GhcRn)) -> Constr #

dataTypeOf :: GRHSs GhcRn (LocatedA (HsExpr GhcRn)) -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (GRHSs GhcRn (LocatedA (HsExpr GhcRn)))) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (GRHSs GhcRn (LocatedA (HsExpr GhcRn)))) #

gmapT :: (forall b. Data b => b -> b) -> GRHSs GhcRn (LocatedA (HsExpr GhcRn)) -> GRHSs GhcRn (LocatedA (HsExpr GhcRn)) #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GRHSs GhcRn (LocatedA (HsExpr GhcRn)) -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GRHSs GhcRn (LocatedA (HsExpr GhcRn)) -> r #

gmapQ :: (forall d. Data d => d -> u) -> GRHSs GhcRn (LocatedA (HsExpr GhcRn)) -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> GRHSs GhcRn (LocatedA (HsExpr GhcRn)) -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> GRHSs GhcRn (LocatedA (HsExpr GhcRn)) -> m (GRHSs GhcRn (LocatedA (HsExpr GhcRn))) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GRHSs GhcRn (LocatedA (HsExpr GhcRn)) -> m (GRHSs GhcRn (LocatedA (HsExpr GhcRn))) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GRHSs GhcRn (LocatedA (HsExpr GhcRn)) -> m (GRHSs GhcRn (LocatedA (HsExpr GhcRn))) #

Data (GRHSs GhcTc (LocatedA (HsCmd GhcTc))) Source # |

Instance details

Defined in GHC.Hs.Instances

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GRHSs GhcTc (LocatedA (HsCmd GhcTc)) -> c (GRHSs GhcTc (LocatedA (HsCmd GhcTc))) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (GRHSs GhcTc (LocatedA (HsCmd GhcTc))) #

toConstr :: GRHSs GhcTc (LocatedA (HsCmd GhcTc)) -> Constr #

dataTypeOf :: GRHSs GhcTc (LocatedA (HsCmd GhcTc)) -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (GRHSs GhcTc (LocatedA (HsCmd GhcTc)))) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (GRHSs GhcTc (LocatedA (HsCmd GhcTc)))) #

gmapT :: (forall b. Data b => b -> b) -> GRHSs GhcTc (LocatedA (HsCmd GhcTc)) -> GRHSs GhcTc (LocatedA (HsCmd GhcTc)) #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GRHSs GhcTc (LocatedA (HsCmd GhcTc)) -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GRHSs GhcTc (LocatedA (HsCmd GhcTc)) -> r #

gmapQ :: (forall d. Data d => d -> u) -> GRHSs GhcTc (LocatedA (HsCmd GhcTc)) -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> GRHSs GhcTc (LocatedA (HsCmd GhcTc)) -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> GRHSs GhcTc (LocatedA (HsCmd GhcTc)) -> m (GRHSs GhcTc (LocatedA (HsCmd GhcTc))) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GRHSs GhcTc (LocatedA (HsCmd GhcTc)) -> m (GRHSs GhcTc (LocatedA (HsCmd GhcTc))) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GRHSs GhcTc (LocatedA (HsCmd GhcTc)) -> m (GRHSs GhcTc (LocatedA (HsCmd GhcTc))) #

Data (GRHSs GhcTc (LocatedA (HsExpr GhcTc))) Source # |

Instance details

Defined in GHC.Hs.Instances

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GRHSs GhcTc (LocatedA (HsExpr GhcTc)) -> c (GRHSs GhcTc (LocatedA (HsExpr GhcTc))) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (GRHSs GhcTc (LocatedA (HsExpr GhcTc))) #

toConstr :: GRHSs GhcTc (LocatedA (HsExpr GhcTc)) -> Constr #

dataTypeOf :: GRHSs GhcTc (LocatedA (HsExpr GhcTc)) -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (GRHSs GhcTc (LocatedA (HsExpr GhcTc)))) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (GRHSs GhcTc (LocatedA (HsExpr GhcTc)))) #

gmapT :: (forall b. Data b => b -> b) -> GRHSs GhcTc (LocatedA (HsExpr GhcTc)) -> GRHSs GhcTc (LocatedA (HsExpr GhcTc)) #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GRHSs GhcTc (LocatedA (HsExpr GhcTc)) -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GRHSs GhcTc (LocatedA (HsExpr GhcTc)) -> r #

gmapQ :: (forall d. Data d => d -> u) -> GRHSs GhcTc (LocatedA (HsExpr GhcTc)) -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> GRHSs GhcTc (LocatedA (HsExpr GhcTc)) -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> GRHSs GhcTc (LocatedA (HsExpr GhcTc)) -> m (GRHSs GhcTc (LocatedA (HsExpr GhcTc))) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GRHSs GhcTc (LocatedA (HsExpr GhcTc)) -> m (GRHSs GhcTc (LocatedA (HsExpr GhcTc))) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GRHSs GhcTc (LocatedA (HsExpr GhcTc)) -> m (GRHSs GhcTc (LocatedA (HsExpr GhcTc))) #

Data (Match GhcPs (LocatedA (HsCmd GhcPs))) Source # |

Instance details

Defined in GHC.Hs.Instances

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Match GhcPs (LocatedA (HsCmd GhcPs)) -> c (Match GhcPs (LocatedA (HsCmd GhcPs))) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Match GhcPs (LocatedA (HsCmd GhcPs))) #

toConstr :: Match GhcPs (LocatedA (HsCmd GhcPs)) -> Constr #

dataTypeOf :: Match GhcPs (LocatedA (HsCmd GhcPs)) -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Match GhcPs (LocatedA (HsCmd GhcPs)))) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Match GhcPs (LocatedA (HsCmd GhcPs)))) #

gmapT :: (forall b. Data b => b -> b) -> Match GhcPs (LocatedA (HsCmd GhcPs)) -> Match GhcPs (LocatedA (HsCmd GhcPs)) #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Match GhcPs (LocatedA (HsCmd GhcPs)) -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Match GhcPs (LocatedA (HsCmd GhcPs)) -> r #

gmapQ :: (forall d. Data d => d -> u) -> Match GhcPs (LocatedA (HsCmd GhcPs)) -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Match GhcPs (LocatedA (HsCmd GhcPs)) -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Match GhcPs (LocatedA (HsCmd GhcPs)) -> m (Match GhcPs (LocatedA (HsCmd GhcPs))) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Match GhcPs (LocatedA (HsCmd GhcPs)) -> m (Match GhcPs (LocatedA (HsCmd GhcPs))) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Match GhcPs (LocatedA (HsCmd GhcPs)) -> m (Match GhcPs (LocatedA (HsCmd GhcPs))) #

Data (Match GhcPs (LocatedA (HsExpr GhcPs))) Source # |

Instance details

Defined in GHC.Hs.Instances

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Match GhcPs (LocatedA (HsExpr GhcPs)) -> c (Match GhcPs (LocatedA (HsExpr GhcPs))) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Match GhcPs (LocatedA (HsExpr GhcPs))) #

toConstr :: Match GhcPs (LocatedA (HsExpr GhcPs)) -> Constr #

dataTypeOf :: Match GhcPs (LocatedA (HsExpr GhcPs)) -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Match GhcPs (LocatedA (HsExpr GhcPs)))) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Match GhcPs (LocatedA (HsExpr GhcPs)))) #

gmapT :: (forall b. Data b => b -> b) -> Match GhcPs (LocatedA (HsExpr GhcPs)) -> Match GhcPs (LocatedA (HsExpr GhcPs)) #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Match GhcPs (LocatedA (HsExpr GhcPs)) -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Match GhcPs (LocatedA (HsExpr GhcPs)) -> r #

gmapQ :: (forall d. Data d => d -> u) -> Match GhcPs (LocatedA (HsExpr GhcPs)) -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Match GhcPs (LocatedA (HsExpr GhcPs)) -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Match GhcPs (LocatedA (HsExpr GhcPs)) -> m (Match GhcPs (LocatedA (HsExpr GhcPs))) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Match GhcPs (LocatedA (HsExpr GhcPs)) -> m (Match GhcPs (LocatedA (HsExpr GhcPs))) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Match GhcPs (LocatedA (HsExpr GhcPs)) -> m (Match GhcPs (LocatedA (HsExpr GhcPs))) #

Data (Match GhcRn (LocatedA (HsCmd GhcRn))) Source # |

Instance details

Defined in GHC.Hs.Instances

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Match GhcRn (LocatedA (HsCmd GhcRn)) -> c (Match GhcRn (LocatedA (HsCmd GhcRn))) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Match GhcRn (LocatedA (HsCmd GhcRn))) #

toConstr :: Match GhcRn (LocatedA (HsCmd GhcRn)) -> Constr #

dataTypeOf :: Match GhcRn (LocatedA (HsCmd GhcRn)) -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Match GhcRn (LocatedA (HsCmd GhcRn)))) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Match GhcRn (LocatedA (HsCmd GhcRn)))) #

gmapT :: (forall b. Data b => b -> b) -> Match GhcRn (LocatedA (HsCmd GhcRn)) -> Match GhcRn (LocatedA (HsCmd GhcRn)) #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Match GhcRn (LocatedA (HsCmd GhcRn)) -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Match GhcRn (LocatedA (HsCmd GhcRn)) -> r #

gmapQ :: (forall d. Data d => d -> u) -> Match GhcRn (LocatedA (HsCmd GhcRn)) -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Match GhcRn (LocatedA (HsCmd GhcRn)) -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Match GhcRn (LocatedA (HsCmd GhcRn)) -> m (Match GhcRn (LocatedA (HsCmd GhcRn))) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Match GhcRn (LocatedA (HsCmd GhcRn)) -> m (Match GhcRn (LocatedA (HsCmd GhcRn))) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Match GhcRn (LocatedA (HsCmd GhcRn)) -> m (Match GhcRn (LocatedA (HsCmd GhcRn))) #

Data (Match GhcRn (LocatedA (HsExpr GhcRn))) Source # |

Instance details

Defined in GHC.Hs.Instances

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Match GhcRn (LocatedA (HsExpr GhcRn)) -> c (Match GhcRn (LocatedA (HsExpr GhcRn))) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Match GhcRn (LocatedA (HsExpr GhcRn))) #

toConstr :: Match GhcRn (LocatedA (HsExpr GhcRn)) -> Constr #

dataTypeOf :: Match GhcRn (LocatedA (HsExpr GhcRn)) -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Match GhcRn (LocatedA (HsExpr GhcRn)))) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Match GhcRn (LocatedA (HsExpr GhcRn)))) #

gmapT :: (forall b. Data b => b -> b) -> Match GhcRn (LocatedA (HsExpr GhcRn)) -> Match GhcRn (LocatedA (HsExpr GhcRn)) #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Match GhcRn (LocatedA (HsExpr GhcRn)) -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Match GhcRn (LocatedA (HsExpr GhcRn)) -> r #

gmapQ :: (forall d. Data d => d -> u) -> Match GhcRn (LocatedA (HsExpr GhcRn)) -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Match GhcRn (LocatedA (HsExpr GhcRn)) -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Match GhcRn (LocatedA (HsExpr GhcRn)) -> m (Match GhcRn (LocatedA (HsExpr GhcRn))) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Match GhcRn (LocatedA (HsExpr GhcRn)) -> m (Match GhcRn (LocatedA (HsExpr GhcRn))) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Match GhcRn (LocatedA (HsExpr GhcRn)) -> m (Match GhcRn (LocatedA (HsExpr GhcRn))) #

Data (Match GhcTc (LocatedA (HsCmd GhcTc))) Source # |

Instance details

Defined in GHC.Hs.Instances

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Match GhcTc (LocatedA (HsCmd GhcTc)) -> c (Match GhcTc (LocatedA (HsCmd GhcTc))) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Match GhcTc (LocatedA (HsCmd GhcTc))) #

toConstr :: Match GhcTc (LocatedA (HsCmd GhcTc)) -> Constr #

dataTypeOf :: Match GhcTc (LocatedA (HsCmd GhcTc)) -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Match GhcTc (LocatedA (HsCmd GhcTc)))) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Match GhcTc (LocatedA (HsCmd GhcTc)))) #

gmapT :: (forall b. Data b => b -> b) -> Match GhcTc (LocatedA (HsCmd GhcTc)) -> Match GhcTc (LocatedA (HsCmd GhcTc)) #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Match GhcTc (LocatedA (HsCmd GhcTc)) -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Match GhcTc (LocatedA (HsCmd GhcTc)) -> r #

gmapQ :: (forall d. Data d => d -> u) -> Match GhcTc (LocatedA (HsCmd GhcTc)) -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Match GhcTc (LocatedA (HsCmd GhcTc)) -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Match GhcTc (LocatedA (HsCmd GhcTc)) -> m (Match GhcTc (LocatedA (HsCmd GhcTc))) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Match GhcTc (LocatedA (HsCmd GhcTc)) -> m (Match GhcTc (LocatedA (HsCmd GhcTc))) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Match GhcTc (LocatedA (HsCmd GhcTc)) -> m (Match GhcTc (LocatedA (HsCmd GhcTc))) #

Data (Match GhcTc (LocatedA (HsExpr GhcTc))) Source # |

Instance details

Defined in GHC.Hs.Instances

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Match GhcTc (LocatedA (HsExpr GhcTc)) -> c (Match GhcTc (LocatedA (HsExpr GhcTc))) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Match GhcTc (LocatedA (HsExpr GhcTc))) #

toConstr :: Match GhcTc (LocatedA (HsExpr GhcTc)) -> Constr #

dataTypeOf :: Match GhcTc (LocatedA (HsExpr GhcTc)) -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Match GhcTc (LocatedA (HsExpr GhcTc)))) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Match GhcTc (LocatedA (HsExpr GhcTc)))) #

gmapT :: (forall b. Data b => b -> b) -> Match GhcTc (LocatedA (HsExpr GhcTc)) -> Match GhcTc (LocatedA (HsExpr GhcTc)) #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Match GhcTc (LocatedA (HsExpr GhcTc)) -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Match GhcTc (LocatedA (HsExpr GhcTc)) -> r #

gmapQ :: (forall d. Data d => d -> u) -> Match GhcTc (LocatedA (HsExpr GhcTc)) -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Match GhcTc (LocatedA (HsExpr GhcTc)) -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Match GhcTc (LocatedA (HsExpr GhcTc)) -> m (Match GhcTc (LocatedA (HsExpr GhcTc))) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Match GhcTc (LocatedA (HsExpr GhcTc)) -> m (Match GhcTc (LocatedA (HsExpr GhcTc))) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Match GhcTc (LocatedA (HsExpr GhcTc)) -> m (Match GhcTc (LocatedA (HsExpr GhcTc))) #

Data (MatchGroup GhcPs (LocatedA (HsCmd GhcPs))) Source # |

Instance details

Defined in GHC.Hs.Instances

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> MatchGroup GhcPs (LocatedA (HsCmd GhcPs)) -> c (MatchGroup GhcPs (LocatedA (HsCmd GhcPs))) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (MatchGroup GhcPs (LocatedA (HsCmd GhcPs))) #

toConstr :: MatchGroup GhcPs (LocatedA (HsCmd GhcPs)) -> Constr #

dataTypeOf :: MatchGroup GhcPs (LocatedA (HsCmd GhcPs)) -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (MatchGroup GhcPs (LocatedA (HsCmd GhcPs)))) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (MatchGroup GhcPs (LocatedA (HsCmd GhcPs)))) #

gmapT :: (forall b. Data b => b -> b) -> MatchGroup GhcPs (LocatedA (HsCmd GhcPs)) -> MatchGroup GhcPs (LocatedA (HsCmd GhcPs)) #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> MatchGroup GhcPs (LocatedA (HsCmd GhcPs)) -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> MatchGroup GhcPs (LocatedA (HsCmd GhcPs)) -> r #

gmapQ :: (forall d. Data d => d -> u) -> MatchGroup GhcPs (LocatedA (HsCmd GhcPs)) -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> MatchGroup GhcPs (LocatedA (HsCmd GhcPs)) -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> MatchGroup GhcPs (LocatedA (HsCmd GhcPs)) -> m (MatchGroup GhcPs (LocatedA (HsCmd GhcPs))) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> MatchGroup GhcPs (LocatedA (HsCmd GhcPs)) -> m (MatchGroup GhcPs (LocatedA (HsCmd GhcPs))) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> MatchGroup GhcPs (LocatedA (HsCmd GhcPs)) -> m (MatchGroup GhcPs (LocatedA (HsCmd GhcPs))) #

Data (MatchGroup GhcPs (LocatedA (HsExpr GhcPs))) Source # |

Instance details

Defined in GHC.Hs.Instances

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> MatchGroup GhcPs (LocatedA (HsExpr GhcPs)) -> c (MatchGroup GhcPs (LocatedA (HsExpr GhcPs))) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (MatchGroup GhcPs (LocatedA (HsExpr GhcPs))) #

toConstr :: MatchGroup GhcPs (LocatedA (HsExpr GhcPs)) -> Constr #

dataTypeOf :: MatchGroup GhcPs (LocatedA (HsExpr GhcPs)) -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (MatchGroup GhcPs (LocatedA (HsExpr GhcPs)))) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (MatchGroup GhcPs (LocatedA (HsExpr GhcPs)))) #

gmapT :: (forall b. Data b => b -> b) -> MatchGroup GhcPs (LocatedA (HsExpr GhcPs)) -> MatchGroup GhcPs (LocatedA (HsExpr GhcPs)) #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> MatchGroup GhcPs (LocatedA (HsExpr GhcPs)) -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> MatchGroup GhcPs (LocatedA (HsExpr GhcPs)) -> r #

gmapQ :: (forall d. Data d => d -> u) -> MatchGroup GhcPs (LocatedA (HsExpr GhcPs)) -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> MatchGroup GhcPs (LocatedA (HsExpr GhcPs)) -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> MatchGroup GhcPs (LocatedA (HsExpr GhcPs)) -> m (MatchGroup GhcPs (LocatedA (HsExpr GhcPs))) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> MatchGroup GhcPs (LocatedA (HsExpr GhcPs)) -> m (MatchGroup GhcPs (LocatedA (HsExpr GhcPs))) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> MatchGroup GhcPs (LocatedA (HsExpr GhcPs)) -> m (MatchGroup GhcPs (LocatedA (HsExpr GhcPs))) #

Data (MatchGroup GhcRn (LocatedA (HsCmd GhcRn))) Source # |

Instance details

Defined in GHC.Hs.Instances

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> MatchGroup GhcRn (LocatedA (HsCmd GhcRn)) -> c (MatchGroup GhcRn (LocatedA (HsCmd GhcRn))) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (MatchGroup GhcRn (LocatedA (HsCmd GhcRn))) #

toConstr :: MatchGroup GhcRn (LocatedA (HsCmd GhcRn)) -> Constr #

dataTypeOf :: MatchGroup GhcRn (LocatedA (HsCmd GhcRn)) -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (MatchGroup GhcRn (LocatedA (HsCmd GhcRn)))) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (MatchGroup GhcRn (LocatedA (HsCmd GhcRn)))) #

gmapT :: (forall b. Data b => b -> b) -> MatchGroup GhcRn (LocatedA (HsCmd GhcRn)) -> MatchGroup GhcRn (LocatedA (HsCmd GhcRn)) #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> MatchGroup GhcRn (LocatedA (HsCmd GhcRn)) -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> MatchGroup GhcRn (LocatedA (HsCmd GhcRn)) -> r #

gmapQ :: (forall d. Data d => d -> u) -> MatchGroup GhcRn (LocatedA (HsCmd GhcRn)) -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> MatchGroup GhcRn (LocatedA (HsCmd GhcRn)) -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> MatchGroup GhcRn (LocatedA (HsCmd GhcRn)) -> m (MatchGroup GhcRn (LocatedA (HsCmd GhcRn))) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> MatchGroup GhcRn (LocatedA (HsCmd GhcRn)) -> m (MatchGroup GhcRn (LocatedA (HsCmd GhcRn))) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> MatchGroup GhcRn (LocatedA (HsCmd GhcRn)) -> m (MatchGroup GhcRn (LocatedA (HsCmd GhcRn))) #

Data (MatchGroup GhcRn (LocatedA (HsExpr GhcRn))) Source # |

Instance details

Defined in GHC.Hs.Instances

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> MatchGroup GhcRn (LocatedA (HsExpr GhcRn)) -> c (MatchGroup GhcRn (LocatedA (HsExpr GhcRn))) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (MatchGroup GhcRn (LocatedA (HsExpr GhcRn))) #

toConstr :: MatchGroup GhcRn (LocatedA (HsExpr GhcRn)) -> Constr #

dataTypeOf :: MatchGroup GhcRn (LocatedA (HsExpr GhcRn)) -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (MatchGroup GhcRn (LocatedA (HsExpr GhcRn)))) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (MatchGroup GhcRn (LocatedA (HsExpr GhcRn)))) #

gmapT :: (forall b. Data b => b -> b) -> MatchGroup GhcRn (LocatedA (HsExpr GhcRn)) -> MatchGroup GhcRn (LocatedA (HsExpr GhcRn)) #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> MatchGroup GhcRn (LocatedA (HsExpr GhcRn)) -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> MatchGroup GhcRn (LocatedA (HsExpr GhcRn)) -> r #

gmapQ :: (forall d. Data d => d -> u) -> MatchGroup GhcRn (LocatedA (HsExpr GhcRn)) -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> MatchGroup GhcRn (LocatedA (HsExpr GhcRn)) -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> MatchGroup GhcRn (LocatedA (HsExpr GhcRn)) -> m (MatchGroup GhcRn (LocatedA (HsExpr GhcRn))) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> MatchGroup GhcRn (LocatedA (HsExpr GhcRn)) -> m (MatchGroup GhcRn (LocatedA (HsExpr GhcRn))) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> MatchGroup GhcRn (LocatedA (HsExpr GhcRn)) -> m (MatchGroup GhcRn (LocatedA (HsExpr GhcRn))) #

Data (MatchGroup GhcTc (LocatedA (HsCmd GhcTc))) Source # |

Instance details

Defined in GHC.Hs.Instances

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> MatchGroup GhcTc (LocatedA (HsCmd GhcTc)) -> c (MatchGroup GhcTc (LocatedA (HsCmd GhcTc))) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (MatchGroup GhcTc (LocatedA (HsCmd GhcTc))) #

toConstr :: MatchGroup GhcTc (LocatedA (HsCmd GhcTc)) -> Constr #

dataTypeOf :: MatchGroup GhcTc (LocatedA (HsCmd GhcTc)) -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (MatchGroup GhcTc (LocatedA (HsCmd GhcTc)))) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (MatchGroup GhcTc (LocatedA (HsCmd GhcTc)))) #

gmapT :: (forall b. Data b => b -> b) -> MatchGroup GhcTc (LocatedA (HsCmd GhcTc)) -> MatchGroup GhcTc (LocatedA (HsCmd GhcTc)) #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> MatchGroup GhcTc (LocatedA (HsCmd GhcTc)) -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> MatchGroup GhcTc (LocatedA (HsCmd GhcTc)) -> r #

gmapQ :: (forall d. Data d => d -> u) -> MatchGroup GhcTc (LocatedA (HsCmd GhcTc)) -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> MatchGroup GhcTc (LocatedA (HsCmd GhcTc)) -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> MatchGroup GhcTc (LocatedA (HsCmd GhcTc)) -> m (MatchGroup GhcTc (LocatedA (HsCmd GhcTc))) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> MatchGroup GhcTc (LocatedA (HsCmd GhcTc)) -> m (MatchGroup GhcTc (LocatedA (HsCmd GhcTc))) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> MatchGroup GhcTc (LocatedA (HsCmd GhcTc)) -> m (MatchGroup GhcTc (LocatedA (HsCmd GhcTc))) #

Data (MatchGroup GhcTc (LocatedA (HsExpr GhcTc))) Source # |

Instance details

Defined in GHC.Hs.Instances

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> MatchGroup GhcTc (LocatedA (HsExpr GhcTc)) -> c (MatchGroup GhcTc (LocatedA (HsExpr GhcTc))) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (MatchGroup GhcTc (LocatedA (HsExpr GhcTc))) #

toConstr :: MatchGroup GhcTc (LocatedA (HsExpr GhcTc)) -> Constr #

dataTypeOf :: MatchGroup GhcTc (LocatedA (HsExpr GhcTc)) -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (MatchGroup GhcTc (LocatedA (HsExpr GhcTc)))) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (MatchGroup GhcTc (LocatedA (HsExpr GhcTc)))) #

gmapT :: (forall b. Data b => b -> b) -> MatchGroup GhcTc (LocatedA (HsExpr GhcTc)) -> MatchGroup GhcTc (LocatedA (HsExpr GhcTc)) #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> MatchGroup GhcTc (LocatedA (HsExpr GhcTc)) -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> MatchGroup GhcTc (LocatedA (HsExpr GhcTc)) -> r #

gmapQ :: (forall d. Data d => d -> u) -> MatchGroup GhcTc (LocatedA (HsExpr GhcTc)) -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> MatchGroup GhcTc (LocatedA (HsExpr GhcTc)) -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> MatchGroup GhcTc (LocatedA (HsExpr GhcTc)) -> m (MatchGroup GhcTc (LocatedA (HsExpr GhcTc))) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> MatchGroup GhcTc (LocatedA (HsExpr GhcTc)) -> m (MatchGroup GhcTc (LocatedA (HsExpr GhcTc))) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> MatchGroup GhcTc (LocatedA (HsExpr GhcTc)) -> m (MatchGroup GhcTc (LocatedA (HsExpr GhcTc))) #

(Show l, Show e) => Show (GenLocated l e) Source # |
Instance details Defined in GHC.Types.SrcLoc Methods showsPrec :: Int -> GenLocated l e -> ShowS # show :: GenLocated l e -> String # showList :: [GenLocated l e] -> ShowS #
(Eq l, Eq e) => Eq (GenLocated l e) Source # |
Instance details Defined in GHC.Types.SrcLoc Methods (==) :: GenLocated l e -> GenLocated l e -> Bool # (/=) :: GenLocated l e -> GenLocated l e -> Bool #
(Ord l, Ord e) => Ord (GenLocated l e) Source # |

Instance details

Defined in GHC.Types.SrcLoc

Methods

compare :: GenLocated l e -> GenLocated l e -> Ordering #

(<) :: GenLocated l e -> GenLocated l e -> Bool #

(<=) :: GenLocated l e -> GenLocated l e -> Bool #

(>) :: GenLocated l e -> GenLocated l e -> Bool #

(>=) :: GenLocated l e -> GenLocated l e -> Bool #

max :: GenLocated l e -> GenLocated l e -> GenLocated l e #

min :: GenLocated l e -> GenLocated l e -> GenLocated l e #

Data (StmtLR GhcPs GhcPs (LocatedA (HsCmd GhcPs))) Source # |

Instance details

Defined in GHC.Hs.Instances

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> StmtLR GhcPs GhcPs (LocatedA (HsCmd GhcPs)) -> c (StmtLR GhcPs GhcPs (LocatedA (HsCmd GhcPs))) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (StmtLR GhcPs GhcPs (LocatedA (HsCmd GhcPs))) #

toConstr :: StmtLR GhcPs GhcPs (LocatedA (HsCmd GhcPs)) -> Constr #

dataTypeOf :: StmtLR GhcPs GhcPs (LocatedA (HsCmd GhcPs)) -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (StmtLR GhcPs GhcPs (LocatedA (HsCmd GhcPs)))) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (StmtLR GhcPs GhcPs (LocatedA (HsCmd GhcPs)))) #

gmapT :: (forall b. Data b => b -> b) -> StmtLR GhcPs GhcPs (LocatedA (HsCmd GhcPs)) -> StmtLR GhcPs GhcPs (LocatedA (HsCmd GhcPs)) #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> StmtLR GhcPs GhcPs (LocatedA (HsCmd GhcPs)) -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> StmtLR GhcPs GhcPs (LocatedA (HsCmd GhcPs)) -> r #

gmapQ :: (forall d. Data d => d -> u) -> StmtLR GhcPs GhcPs (LocatedA (HsCmd GhcPs)) -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> StmtLR GhcPs GhcPs (LocatedA (HsCmd GhcPs)) -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> StmtLR GhcPs GhcPs (LocatedA (HsCmd GhcPs)) -> m (StmtLR GhcPs GhcPs (LocatedA (HsCmd GhcPs))) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> StmtLR GhcPs GhcPs (LocatedA (HsCmd GhcPs)) -> m (StmtLR GhcPs GhcPs (LocatedA (HsCmd GhcPs))) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> StmtLR GhcPs GhcPs (LocatedA (HsCmd GhcPs)) -> m (StmtLR GhcPs GhcPs (LocatedA (HsCmd GhcPs))) #

Data (StmtLR GhcPs GhcPs (LocatedA (HsExpr GhcPs))) Source # |

Instance details

Defined in GHC.Hs.Instances

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> StmtLR GhcPs GhcPs (LocatedA (HsExpr GhcPs)) -> c (StmtLR GhcPs GhcPs (LocatedA (HsExpr GhcPs))) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (StmtLR GhcPs GhcPs (LocatedA (HsExpr GhcPs))) #

toConstr :: StmtLR GhcPs GhcPs (LocatedA (HsExpr GhcPs)) -> Constr #

dataTypeOf :: StmtLR GhcPs GhcPs (LocatedA (HsExpr GhcPs)) -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (StmtLR GhcPs GhcPs (LocatedA (HsExpr GhcPs)))) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (StmtLR GhcPs GhcPs (LocatedA (HsExpr GhcPs)))) #

gmapT :: (forall b. Data b => b -> b) -> StmtLR GhcPs GhcPs (LocatedA (HsExpr GhcPs)) -> StmtLR GhcPs GhcPs (LocatedA (HsExpr GhcPs)) #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> StmtLR GhcPs GhcPs (LocatedA (HsExpr GhcPs)) -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> StmtLR GhcPs GhcPs (LocatedA (HsExpr GhcPs)) -> r #

gmapQ :: (forall d. Data d => d -> u) -> StmtLR GhcPs GhcPs (LocatedA (HsExpr GhcPs)) -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> StmtLR GhcPs GhcPs (LocatedA (HsExpr GhcPs)) -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> StmtLR GhcPs GhcPs (LocatedA (HsExpr GhcPs)) -> m (StmtLR GhcPs GhcPs (LocatedA (HsExpr GhcPs))) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> StmtLR GhcPs GhcPs (LocatedA (HsExpr GhcPs)) -> m (StmtLR GhcPs GhcPs (LocatedA (HsExpr GhcPs))) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> StmtLR GhcPs GhcPs (LocatedA (HsExpr GhcPs)) -> m (StmtLR GhcPs GhcPs (LocatedA (HsExpr GhcPs))) #

Data (StmtLR GhcPs GhcRn (LocatedA (HsCmd GhcRn))) Source # |

Instance details

Defined in GHC.Hs.Instances

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> StmtLR GhcPs GhcRn (LocatedA (HsCmd GhcRn)) -> c (StmtLR GhcPs GhcRn (LocatedA (HsCmd GhcRn))) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (StmtLR GhcPs GhcRn (LocatedA (HsCmd GhcRn))) #

toConstr :: StmtLR GhcPs GhcRn (LocatedA (HsCmd GhcRn)) -> Constr #

dataTypeOf :: StmtLR GhcPs GhcRn (LocatedA (HsCmd GhcRn)) -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (StmtLR GhcPs GhcRn (LocatedA (HsCmd GhcRn)))) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (StmtLR GhcPs GhcRn (LocatedA (HsCmd GhcRn)))) #

gmapT :: (forall b. Data b => b -> b) -> StmtLR GhcPs GhcRn (LocatedA (HsCmd GhcRn)) -> StmtLR GhcPs GhcRn (LocatedA (HsCmd GhcRn)) #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> StmtLR GhcPs GhcRn (LocatedA (HsCmd GhcRn)) -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> StmtLR GhcPs GhcRn (LocatedA (HsCmd GhcRn)) -> r #

gmapQ :: (forall d. Data d => d -> u) -> StmtLR GhcPs GhcRn (LocatedA (HsCmd GhcRn)) -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> StmtLR GhcPs GhcRn (LocatedA (HsCmd GhcRn)) -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> StmtLR GhcPs GhcRn (LocatedA (HsCmd GhcRn)) -> m (StmtLR GhcPs GhcRn (LocatedA (HsCmd GhcRn))) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> StmtLR GhcPs GhcRn (LocatedA (HsCmd GhcRn)) -> m (StmtLR GhcPs GhcRn (LocatedA (HsCmd GhcRn))) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> StmtLR GhcPs GhcRn (LocatedA (HsCmd GhcRn)) -> m (StmtLR GhcPs GhcRn (LocatedA (HsCmd GhcRn))) #

Data (StmtLR GhcPs GhcRn (LocatedA (HsExpr GhcRn))) Source # |

Instance details

Defined in GHC.Hs.Instances

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> StmtLR GhcPs GhcRn (LocatedA (HsExpr GhcRn)) -> c (StmtLR GhcPs GhcRn (LocatedA (HsExpr GhcRn))) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (StmtLR GhcPs GhcRn (LocatedA (HsExpr GhcRn))) #

toConstr :: StmtLR GhcPs GhcRn (LocatedA (HsExpr GhcRn)) -> Constr #

dataTypeOf :: StmtLR GhcPs GhcRn (LocatedA (HsExpr GhcRn)) -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (StmtLR GhcPs GhcRn (LocatedA (HsExpr GhcRn)))) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (StmtLR GhcPs GhcRn (LocatedA (HsExpr GhcRn)))) #

gmapT :: (forall b. Data b => b -> b) -> StmtLR GhcPs GhcRn (LocatedA (HsExpr GhcRn)) -> StmtLR GhcPs GhcRn (LocatedA (HsExpr GhcRn)) #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> StmtLR GhcPs GhcRn (LocatedA (HsExpr GhcRn)) -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> StmtLR GhcPs GhcRn (LocatedA (HsExpr GhcRn)) -> r #

gmapQ :: (forall d. Data d => d -> u) -> StmtLR GhcPs GhcRn (LocatedA (HsExpr GhcRn)) -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> StmtLR GhcPs GhcRn (LocatedA (HsExpr GhcRn)) -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> StmtLR GhcPs GhcRn (LocatedA (HsExpr GhcRn)) -> m (StmtLR GhcPs GhcRn (LocatedA (HsExpr GhcRn))) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> StmtLR GhcPs GhcRn (LocatedA (HsExpr GhcRn)) -> m (StmtLR GhcPs GhcRn (LocatedA (HsExpr GhcRn))) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> StmtLR GhcPs GhcRn (LocatedA (HsExpr GhcRn)) -> m (StmtLR GhcPs GhcRn (LocatedA (HsExpr GhcRn))) #

Data (StmtLR GhcRn GhcRn (LocatedA (HsCmd GhcRn))) Source # |

Instance details

Defined in GHC.Hs.Instances

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> StmtLR GhcRn GhcRn (LocatedA (HsCmd GhcRn)) -> c (StmtLR GhcRn GhcRn (LocatedA (HsCmd GhcRn))) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (StmtLR GhcRn GhcRn (LocatedA (HsCmd GhcRn))) #

toConstr :: StmtLR GhcRn GhcRn (LocatedA (HsCmd GhcRn)) -> Constr #

dataTypeOf :: StmtLR GhcRn GhcRn (LocatedA (HsCmd GhcRn)) -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (StmtLR GhcRn GhcRn (LocatedA (HsCmd GhcRn)))) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (StmtLR GhcRn GhcRn (LocatedA (HsCmd GhcRn)))) #

gmapT :: (forall b. Data b => b -> b) -> StmtLR GhcRn GhcRn (LocatedA (HsCmd GhcRn)) -> StmtLR GhcRn GhcRn (LocatedA (HsCmd GhcRn)) #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> StmtLR GhcRn GhcRn (LocatedA (HsCmd GhcRn)) -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> StmtLR GhcRn GhcRn (LocatedA (HsCmd GhcRn)) -> r #

gmapQ :: (forall d. Data d => d -> u) -> StmtLR GhcRn GhcRn (LocatedA (HsCmd GhcRn)) -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> StmtLR GhcRn GhcRn (LocatedA (HsCmd GhcRn)) -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> StmtLR GhcRn GhcRn (LocatedA (HsCmd GhcRn)) -> m (StmtLR GhcRn GhcRn (LocatedA (HsCmd GhcRn))) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> StmtLR GhcRn GhcRn (LocatedA (HsCmd GhcRn)) -> m (StmtLR GhcRn GhcRn (LocatedA (HsCmd GhcRn))) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> StmtLR GhcRn GhcRn (LocatedA (HsCmd GhcRn)) -> m (StmtLR GhcRn GhcRn (LocatedA (HsCmd GhcRn))) #

Data (StmtLR GhcRn GhcRn (LocatedA (HsExpr GhcRn))) Source # |

Instance details

Defined in GHC.Hs.Instances

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> StmtLR GhcRn GhcRn (LocatedA (HsExpr GhcRn)) -> c (StmtLR GhcRn GhcRn (LocatedA (HsExpr GhcRn))) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (StmtLR GhcRn GhcRn (LocatedA (HsExpr GhcRn))) #

toConstr :: StmtLR GhcRn GhcRn (LocatedA (HsExpr GhcRn)) -> Constr #

dataTypeOf :: StmtLR GhcRn GhcRn (LocatedA (HsExpr GhcRn)) -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (StmtLR GhcRn GhcRn (LocatedA (HsExpr GhcRn)))) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (StmtLR GhcRn GhcRn (LocatedA (HsExpr GhcRn)))) #

gmapT :: (forall b. Data b => b -> b) -> StmtLR GhcRn GhcRn (LocatedA (HsExpr GhcRn)) -> StmtLR GhcRn GhcRn (LocatedA (HsExpr GhcRn)) #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> StmtLR GhcRn GhcRn (LocatedA (HsExpr GhcRn)) -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> StmtLR GhcRn GhcRn (LocatedA (HsExpr GhcRn)) -> r #

gmapQ :: (forall d. Data d => d -> u) -> StmtLR GhcRn GhcRn (LocatedA (HsExpr GhcRn)) -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> StmtLR GhcRn GhcRn (LocatedA (HsExpr GhcRn)) -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> StmtLR GhcRn GhcRn (LocatedA (HsExpr GhcRn)) -> m (StmtLR GhcRn GhcRn (LocatedA (HsExpr GhcRn))) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> StmtLR GhcRn GhcRn (LocatedA (HsExpr GhcRn)) -> m (StmtLR GhcRn GhcRn (LocatedA (HsExpr GhcRn))) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> StmtLR GhcRn GhcRn (LocatedA (HsExpr GhcRn)) -> m (StmtLR GhcRn GhcRn (LocatedA (HsExpr GhcRn))) #

Data (StmtLR GhcTc GhcTc (LocatedA (HsCmd GhcTc))) Source # |

Instance details

Defined in GHC.Hs.Instances

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> StmtLR GhcTc GhcTc (LocatedA (HsCmd GhcTc)) -> c (StmtLR GhcTc GhcTc (LocatedA (HsCmd GhcTc))) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (StmtLR GhcTc GhcTc (LocatedA (HsCmd GhcTc))) #

toConstr :: StmtLR GhcTc GhcTc (LocatedA (HsCmd GhcTc)) -> Constr #

dataTypeOf :: StmtLR GhcTc GhcTc (LocatedA (HsCmd GhcTc)) -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (StmtLR GhcTc GhcTc (LocatedA (HsCmd GhcTc)))) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (StmtLR GhcTc GhcTc (LocatedA (HsCmd GhcTc)))) #

gmapT :: (forall b. Data b => b -> b) -> StmtLR GhcTc GhcTc (LocatedA (HsCmd GhcTc)) -> StmtLR GhcTc GhcTc (LocatedA (HsCmd GhcTc)) #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> StmtLR GhcTc GhcTc (LocatedA (HsCmd GhcTc)) -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> StmtLR GhcTc GhcTc (LocatedA (HsCmd GhcTc)) -> r #

gmapQ :: (forall d. Data d => d -> u) -> StmtLR GhcTc GhcTc (LocatedA (HsCmd GhcTc)) -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> StmtLR GhcTc GhcTc (LocatedA (HsCmd GhcTc)) -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> StmtLR GhcTc GhcTc (LocatedA (HsCmd GhcTc)) -> m (StmtLR GhcTc GhcTc (LocatedA (HsCmd GhcTc))) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> StmtLR GhcTc GhcTc (LocatedA (HsCmd GhcTc)) -> m (StmtLR GhcTc GhcTc (LocatedA (HsCmd GhcTc))) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> StmtLR GhcTc GhcTc (LocatedA (HsCmd GhcTc)) -> m (StmtLR GhcTc GhcTc (LocatedA (HsCmd GhcTc))) #

Data (StmtLR GhcTc GhcTc (LocatedA (HsExpr GhcTc))) Source # |

Instance details

Defined in GHC.Hs.Instances

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> StmtLR GhcTc GhcTc (LocatedA (HsExpr GhcTc)) -> c (StmtLR GhcTc GhcTc (LocatedA (HsExpr GhcTc))) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (StmtLR GhcTc GhcTc (LocatedA (HsExpr GhcTc))) #

toConstr :: StmtLR GhcTc GhcTc (LocatedA (HsExpr GhcTc)) -> Constr #

dataTypeOf :: StmtLR GhcTc GhcTc (LocatedA (HsExpr GhcTc)) -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (StmtLR GhcTc GhcTc (LocatedA (HsExpr GhcTc)))) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (StmtLR GhcTc GhcTc (LocatedA (HsExpr GhcTc)))) #

gmapT :: (forall b. Data b => b -> b) -> StmtLR GhcTc GhcTc (LocatedA (HsExpr GhcTc)) -> StmtLR GhcTc GhcTc (LocatedA (HsExpr GhcTc)) #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> StmtLR GhcTc GhcTc (LocatedA (HsExpr GhcTc)) -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> StmtLR GhcTc GhcTc (LocatedA (HsExpr GhcTc)) -> r #

gmapQ :: (forall d. Data d => d -> u) -> StmtLR GhcTc GhcTc (LocatedA (HsExpr GhcTc)) -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> StmtLR GhcTc GhcTc (LocatedA (HsExpr GhcTc)) -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> StmtLR GhcTc GhcTc (LocatedA (HsExpr GhcTc)) -> m (StmtLR GhcTc GhcTc (LocatedA (HsExpr GhcTc))) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> StmtLR GhcTc GhcTc (LocatedA (HsExpr GhcTc)) -> m (StmtLR GhcTc GhcTc (LocatedA (HsExpr GhcTc))) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> StmtLR GhcTc GhcTc (LocatedA (HsExpr GhcTc)) -> m (StmtLR GhcTc GhcTc (LocatedA (HsExpr GhcTc))) #

type Anno (LocatedA (IE (GhcPass p))) Source # |
Instance details Defined in GHC.Hs.ImpExp type Anno (LocatedA (IE (GhcPass p))) = SrcSpanAnnA
type Anno [LocatedA (Match (GhcPass p) (LocatedA (HsCmd (GhcPass p))))] Source # |
Instance details Defined in GHC.Hs.Expr type Anno [LocatedA (Match (GhcPass p) (LocatedA (HsCmd (GhcPass p))))] = SrcSpanAnnL
type Anno [LocatedA (Match (GhcPass p) (LocatedA (HsExpr (GhcPass p))))] Source # |
Instance details Defined in GHC.Hs.Expr type Anno [LocatedA (Match (GhcPass p) (LocatedA (HsExpr (GhcPass p))))] = SrcSpanAnnL
type Anno [LocatedA (Match GhcPs (LocatedA (PatBuilder GhcPs)))] Source # |
Instance details Defined in GHC.Parser.Types type Anno [LocatedA (Match GhcPs (LocatedA (PatBuilder GhcPs)))] = SrcSpanAnnL
type Anno [LocatedA (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (HsCmd (GhcPass pr))))] Source # |
Instance details Defined in GHC.Hs.Expr type Anno [LocatedA (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (HsCmd (GhcPass pr))))] = SrcSpanAnnL
type Anno [LocatedA (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (HsCmd (GhcPass pr))))] Source # |
Instance details Defined in GHC.Hs.Expr type Anno [LocatedA (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (HsCmd (GhcPass pr))))] = SrcSpanAnnL
type Anno [LocatedA (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (HsCmd (GhcPass pr))))] Source # |
Instance details Defined in GHC.Hs.Expr type Anno [LocatedA (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (HsCmd (GhcPass pr))))] = SrcSpanAnnL
type Anno [LocatedA (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (HsExpr (GhcPass pr))))] Source # |
Instance details Defined in GHC.Hs.Expr type Anno [LocatedA (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (HsExpr (GhcPass pr))))] = SrcSpanAnnL
type Anno [LocatedA (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (body (GhcPass pr))))] Source # |
Instance details Defined in GHC.Hs.Expr type Anno [LocatedA (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (body (GhcPass pr))))] = SrcSpanAnnL
type Anno [LocatedA (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (body (GhcPass pr))))] Source # |
Instance details Defined in GHC.Hs.Expr type Anno [LocatedA (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (body (GhcPass pr))))] = SrcSpanAnnL
type Anno [LocatedA (StmtLR GhcPs GhcPs (LocatedA (PatBuilder GhcPs)))] Source # |
Instance details Defined in GHC.Parser.Types type Anno [LocatedA (StmtLR GhcPs GhcPs (LocatedA (PatBuilder GhcPs)))] = SrcSpanAnnL
type Anno [LocatedA (IE (GhcPass p))] Source # |
Instance details Defined in GHC.Hs.ImpExp type Anno [LocatedA (IE (GhcPass p))] = SrcSpanAnnL
type Anno [LocatedA (ConDeclField (GhcPass _1))] Source # |
Instance details Defined in GHC.Hs.Decls type Anno [LocatedA (ConDeclField (GhcPass _1))] = SrcSpanAnnL
type Anno [LocatedA (HsType (GhcPass p))] Source # |
Instance details Defined in GHC.Hs.Type type Anno [LocatedA (HsType (GhcPass p))] = SrcSpanAnnC
type Anno (FamEqn p (LocatedA (HsType p))) Source # |
Instance details Defined in GHC.Hs.Decls type Anno (FamEqn p (LocatedA (HsType p))) = SrcSpanAnnA
type Anno (GRHS (GhcPass p) (LocatedA (HsCmd (GhcPass p)))) Source # |
Instance details Defined in GHC.Hs.Expr type Anno (GRHS (GhcPass p) (LocatedA (HsCmd (GhcPass p)))) = EpAnnCO
type Anno (GRHS (GhcPass p) (LocatedA (HsExpr (GhcPass p)))) Source # |
Instance details Defined in GHC.Hs.Expr type Anno (GRHS (GhcPass p) (LocatedA (HsExpr (GhcPass p)))) = EpAnnCO
type Anno (GRHS GhcPs (LocatedA (PatBuilder GhcPs))) Source # |
Instance details Defined in GHC.Parser.Types type Anno (GRHS GhcPs (LocatedA (PatBuilder GhcPs))) = EpAnnCO
type Anno (Match (GhcPass p) (LocatedA (HsCmd (GhcPass p)))) Source # |
Instance details Defined in GHC.Hs.Expr type Anno (Match (GhcPass p) (LocatedA (HsCmd (GhcPass p)))) = SrcSpanAnnA
type Anno (Match (GhcPass p) (LocatedA (HsExpr (GhcPass p)))) Source # |
Instance details Defined in GHC.Hs.Expr type Anno (Match (GhcPass p) (LocatedA (HsExpr (GhcPass p)))) = SrcSpanAnnA
type Anno (Match GhcPs (LocatedA (PatBuilder GhcPs))) Source # |
Instance details Defined in GHC.Parser.Types type Anno (Match GhcPs (LocatedA (PatBuilder GhcPs))) = SrcSpanAnnA
type Anno (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (body (GhcPass pr)))) Source # |
Instance details Defined in GHC.Hs.Expr type Anno (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (body (GhcPass pr)))) = SrcSpanAnnA
type Anno (StmtLR GhcPs GhcPs (LocatedA (PatBuilder GhcPs))) Source # |
Instance details Defined in GHC.Parser.Types type Anno (StmtLR GhcPs GhcPs (LocatedA (PatBuilder GhcPs))) = SrcSpanAnnA
type Anno (StmtLR GhcRn GhcRn (LocatedA (body GhcRn))) Source # |
Instance details Defined in GHC.Hs.Expr type Anno (StmtLR GhcRn GhcRn (LocatedA (body GhcRn))) = SrcSpanAnnA

type Located = GenLocated SrcSpan Source #

type RealLocated = GenLocated RealSrcSpan Source #

### Constructing Located

noLoc :: e -> Located e Source #

mkGeneralLocated :: String -> e -> Located e Source #

### Deconstructing Located

getLoc :: GenLocated l e -> l Source #

unLoc :: GenLocated l e -> e Source #

getRealSrcSpan :: RealLocated a -> RealSrcSpan Source #

unRealSrcSpan :: RealLocated a -> a Source #

### Combining and comparing Located values

eqLocated :: Eq a => GenLocated l a -> GenLocated l a -> Bool Source #

Tests whether the two located things are equal

cmpLocated :: Ord a => GenLocated l a -> GenLocated l a -> Ordering Source #

Tests the ordering of the two located things

combineLocs :: Located a -> Located b -> SrcSpan Source #

addCLoc :: Located a -> Located b -> c -> Located c Source #

Combine locations from two `Located` things and add them to a third thing

leftmost_smallest :: SrcSpan -> SrcSpan -> Ordering Source #

Strategies for ordering `SrcSpan`s

leftmost_largest :: SrcSpan -> SrcSpan -> Ordering Source #

Strategies for ordering `SrcSpan`s

rightmost_smallest :: SrcSpan -> SrcSpan -> Ordering Source #

Strategies for ordering `SrcSpan`s

spans :: SrcSpan -> (Int, Int) -> Bool Source #

Determines whether a span encloses a given line and column index

isSubspanOf Source #

Arguments

:: SrcSpan | The span that may be enclosed by the other
-> SrcSpan | The span it may be enclosed by
-> Bool |

Determines whether a span is enclosed by another one

# Exceptions

data GhcException Source #

GHC's own exception type error messages all take the form:

         <location>: <error>

If the location is on the command line, or in GHC itself, then <location>="ghc". All of the error types below correspond to a <location> of "ghc", except for ProgramError (where the string is assumed to contain a location already, so we don't print one).

Constructors

Signal Int | Some other fatal signal (SIGHUP,SIGTERM)
UsageError String | Prints the short usage msg after the error
CmdLineError String | A problem with the command line arguments, but don't print usage.
Panic String | The `impossible` happened.
PprPanic String SDoc |
Sorry String | The user tickled something that's known not to work yet, but we're not counting it as a bug.
PprSorry String SDoc |
InstallationError String | An installation problem.
ProgramError String | An error in the user's code, probably.
PprProgramError String SDoc |

#### Instances

Instances details

Exception GhcException Source # |
Instance details Defined in GHC.Utils.Panic Methods toException :: GhcException -> SomeException # fromException :: SomeException -> Maybe GhcException # displayException :: GhcException -> String # backtraceDesired :: GhcException -> Bool #
Show GhcException Source # |
Instance details Defined in GHC.Utils.Panic Methods showsPrec :: Int -> GhcException -> ShowS # show :: GhcException -> String # showList :: [GhcException] -> ShowS #

showGhcException :: SDocContext -> GhcException -> ShowS Source #

Append a description of the given exception to this string.

newtype GhcApiError Source #

An error thrown if the GHC API is used in an incorrect fashion.

Constructors

GhcApiError String |

#### Instances

Instances details

Exception GhcApiError Source # |
Instance details Defined in GHC Methods toException :: GhcApiError -> SomeException # fromException :: SomeException -> Maybe GhcApiError # displayException :: GhcApiError -> String # backtraceDesired :: GhcApiError -> Bool #
Show GhcApiError Source # |
Instance details Defined in GHC Methods showsPrec :: Int -> GhcApiError -> ShowS # show :: GhcApiError -> String # showList :: [GhcApiError] -> ShowS #

# Token stream manipulations

data Token Source #

#### Instances

Instances details

Outputable Token Source # |
Instance details Defined in GHC.Parser.Lexer Methods ppr :: Token -> SDoc Source #
Show Token Source # |
Instance details Defined in GHC.Parser.Lexer Methods showsPrec :: Int -> Token -> ShowS # show :: Token -> String # showList :: [Token] -> ShowS #

getTokenStream :: ModSummary -> IO [Located Token] Source #

Return module source as token stream, including comments.

A `Module` can be turned into a `ModSummary` using `getModSummary` if your session is fully initialised. Throws a `SourceError` on parse error.

getRichTokenStream :: ModSummary -> IO [(Located Token, String)] Source #

Give even more information on the source than `getTokenStream` This function allows reconstructing the source completely with `showRichTokenStream`.

showRichTokenStream :: [(Located Token, String)] -> String Source #

Take a rich token stream such as produced from `getRichTokenStream` and return source code almost identical to the original code (except for insignificant whitespace.)

addSourceToTokens :: RealSrcLoc -> StringBuffer -> [Located Token] -> [(Located Token, String)] Source #

Given a source location and a StringBuffer corresponding to this location, return a rich token stream with the source associated to the tokens.

# Pure interface to the parser

parser Source #

Arguments

:: String | Haskell module source text (full Unicode is supported)
-> DynFlags | the flags
-> FilePath | the filename (for source locations)
-> (WarningMessages, Either ErrorMessages (Located (HsModule GhcPs))) |

A pure interface to the module parser.

# API Annotations

data AnnKeywordId Source #

Exact print annotations exist so that tools can perform source to source conversions of Haskell code. They are used to keep track of the various syntactic keywords that are not otherwise captured in the AST.

The wiki page describing this feature is https://gitlab.haskell.org/ghc/ghc/wikis/api-annotations https://gitlab.haskell.org/ghc/ghc/-/wikis/implementing-trees-that-grow/in-tree-api-annotations

Note: in general the names of these are taken from the corresponding token, unless otherwise noted See Note [exact print annotations] above for details of the usage

Constructors

AnnAnyclass |
AnnAs |
AnnBang | `!`
AnnBackquote | '`'
AnnBy |
AnnCase | case or lambda case
AnnCases | lambda cases
AnnClass |
AnnClose | '#)' or '#-}' etc
AnnCloseB | '|)'
AnnCloseBU | '|)', unicode variant
AnnCloseC | '}'
AnnCloseQ | '|]'
AnnCloseQU | '|]', unicode variant
AnnCloseP | ')'
AnnClosePH | '#)'
AnnCloseS | ']'
AnnColon |
AnnComma | as a list separator
AnnCommaTuple | in a RdrName for a tuple
AnnDarrow | '=>'
AnnDarrowU | '=>', unicode variant
AnnData |
AnnDcolon | '::'
AnnDcolonU | '::', unicode variant
AnnDefault |
AnnDeriving |
AnnDo |
AnnDot | `.`
AnnDotdot | '..'
AnnElse |
AnnEqual |
AnnExport |
AnnFamily |
AnnForall |
AnnForallU | Unicode variant
AnnForeign |
AnnFunId | for function name in matches where there are multiple equations for the function.
AnnGroup |
AnnHeader | for CType
AnnHiding |
AnnIf |
AnnImport |
AnnIn |
AnnInfix | 'infix' or 'infixl' or 'infixr'
AnnInstance |
AnnLam |
AnnLarrow | '<-'
AnnLarrowU | '<-', unicode variant
AnnLet |
AnnLollyU | The `⊸` unicode arrow
AnnMdo |
AnnMinus | `-`
AnnModule |
AnnNewtype |
AnnName | where a name loses its location in the AST, this carries it
AnnOf |
AnnOpen | '{-# DEPRECATED' etc. Opening of pragmas where the capitalisation of the string can be changed by the user. The actual text used is stored in a `SourceText` on the relevant pragma item.
AnnOpenB | '(|'
AnnOpenBU | '(|', unicode variant
AnnOpenC | '{'
AnnOpenE | '[e|' or '[e||'
AnnOpenEQ | '[|'
AnnOpenEQU | '[|', unicode variant
AnnOpenP | '('
AnnOpenS | '['
AnnOpenPH | '(#'
AnnDollar | prefix `$` -- TemplateHaskell
AnnDollarDollar | prefix `$$` -- TemplateHaskell
AnnPackageName |
AnnPattern |
AnnPercent | `%` -- for HsExplicitMult
AnnPercentOne | '%1' -- for HsLinearArrow
AnnProc |
AnnQualified |
AnnRarrow | `->`
AnnRarrowU | `->`, unicode variant
AnnRec |
AnnRole |
AnnSafe |
AnnSemi | ';'
AnnSimpleQuote | '''
AnnSignature |
AnnStatic | `static`
AnnStock |
AnnThen |
AnnThTyQuote | double '''
AnnTilde | `~`
AnnType |
AnnUnit | `()` for types
AnnUsing |
AnnVal | e.g. INTEGER
AnnValStr | String value, will need quotes when output
AnnVbar | '|'
AnnVia | `via`
AnnWhere |
Annlarrowtail | `-<`
AnnlarrowtailU | `-<`, unicode variant
Annrarrowtail | `->`
AnnrarrowtailU | `->`, unicode variant
AnnLarrowtail | `-<<`
AnnLarrowtailU | `-<<`, unicode variant
AnnRarrowtail | `>>-`
AnnRarrowtailU | `>>-`, unicode variant

#### Instances

Instances details

NoAnn AnnKeywordId Source # |
Instance details Defined in GHC.Parser.Annotation Methods noAnn :: AnnKeywordId Source #
Outputable AnnKeywordId Source # |
Instance details Defined in GHC.Parser.Annotation Methods ppr :: AnnKeywordId -> SDoc Source #
Data AnnKeywordId Source # |

Instance details

Defined in GHC.Parser.Annotation

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AnnKeywordId -> c AnnKeywordId #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AnnKeywordId #

toConstr :: AnnKeywordId -> Constr #

dataTypeOf :: AnnKeywordId -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c AnnKeywordId) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AnnKeywordId) #

gmapT :: (forall b. Data b => b -> b) -> AnnKeywordId -> AnnKeywordId #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AnnKeywordId -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AnnKeywordId -> r #

gmapQ :: (forall d. Data d => d -> u) -> AnnKeywordId -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> AnnKeywordId -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> AnnKeywordId -> m AnnKeywordId #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnKeywordId -> m AnnKeywordId #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnKeywordId -> m AnnKeywordId #

Show AnnKeywordId Source # |
Instance details Defined in GHC.Parser.Annotation Methods showsPrec :: Int -> AnnKeywordId -> ShowS # show :: AnnKeywordId -> String # showList :: [AnnKeywordId] -> ShowS #
Eq AnnKeywordId Source # |
Instance details Defined in GHC.Parser.Annotation Methods (==) :: AnnKeywordId -> AnnKeywordId -> Bool # (/=) :: AnnKeywordId -> AnnKeywordId -> Bool #
Ord AnnKeywordId Source # |

Instance details

Defined in GHC.Parser.Annotation

Methods

compare :: AnnKeywordId -> AnnKeywordId -> Ordering #

(<) :: AnnKeywordId -> AnnKeywordId -> Bool #

(<=) :: AnnKeywordId -> AnnKeywordId -> Bool #

(>) :: AnnKeywordId -> AnnKeywordId -> Bool #

(>=) :: AnnKeywordId -> AnnKeywordId -> Bool #

max :: AnnKeywordId -> AnnKeywordId -> AnnKeywordId #

min :: AnnKeywordId -> AnnKeywordId -> AnnKeywordId #

data EpaComment Source #

Constructors

EpaComment |

Fields

- ac_tok :: EpaCommentTok
- ac_prior_tok :: RealSrcSpan

  The location of the prior token, used in exact printing. The `EpaComment` appears as an `LEpaComment` containing its location. The difference between the end of the prior token and the start of this location is used for the spacing when exact printing the comment.

#### Instances

Instances details

HasAnnotation EpaLocation Source # |
Instance details Defined in GHC.Parser.Annotation Methods noAnnSrcSpan :: SrcSpan -> EpaLocation Source #
HasLoc EpaLocation Source # |
Instance details Defined in GHC.Parser.Annotation Methods getHasLoc :: EpaLocation -> SrcSpan Source #
NoAnn EpaLocation Source # |
Instance details Defined in GHC.Parser.Annotation Methods noAnn :: EpaLocation Source #
Outputable EpaComment Source # |
Instance details Defined in GHC.Parser.Annotation Methods ppr :: EpaComment -> SDoc Source #
Semigroup EpaLocation Source # |
Instance details Defined in GHC.Parser.Annotation Methods (<>) :: EpaLocation -> EpaLocation -> EpaLocation # sconcat :: NonEmpty EpaLocation -> EpaLocation # stimes :: Integral b => b -> EpaLocation -> EpaLocation #
Data EpaComment Source # |

Instance details

Defined in GHC.Parser.Annotation

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> EpaComment -> c EpaComment #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c EpaComment #

toConstr :: EpaComment -> Constr #

dataTypeOf :: EpaComment -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c EpaComment) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c EpaComment) #

gmapT :: (forall b. Data b => b -> b) -> EpaComment -> EpaComment #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> EpaComment -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> EpaComment -> r #

gmapQ :: (forall d. Data d => d -> u) -> EpaComment -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> EpaComment -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> EpaComment -> m EpaComment #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> EpaComment -> m EpaComment #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> EpaComment -> m EpaComment #

Show EpaComment Source # |
Instance details Defined in GHC.Parser.Annotation Methods showsPrec :: Int -> EpaComment -> ShowS # show :: EpaComment -> String # showList :: [EpaComment] -> ShowS #
Eq EpaComment Source # |
Instance details Defined in GHC.Parser.Annotation Methods (==) :: EpaComment -> EpaComment -> Bool # (/=) :: EpaComment -> EpaComment -> Bool #
Outputable e => Outputable (GenLocated EpaLocation e) Source # |
Instance details Defined in GHC.Parser.Annotation Methods ppr :: GenLocated EpaLocation e -> SDoc Source #
Outputable (GenLocated NoCommentsLocation EpaComment) Source # |
Instance details Defined in GHC.Parser.Annotation Methods ppr :: GenLocated NoCommentsLocation EpaComment -> SDoc Source #

# Miscellaneous

cyclicModuleErr :: [ModuleGraphNode] -> SDoc Source #