Safe Haskell | None |
---|---|
Language | Haskell2010 |
- Session
- Linear Haskell
- Interface Files
- Fixity
- ModSummary
- HomeModInfo
- ModGuts
- ModDetails
- Var
- Specs
- SourceText
- Name
- Ways
- AvailInfo
- TcGblEnv
- Parsing and LExer types
- Compilation Main
- Typecheck utils
- Source Locations
- Finder
- Module and Package
- Linker
- Hooks
- HPT
- Driver-Make
- GHCi
- ModLocation
- DataCon
- Role
- Panic
- Util Module re-exports
- Syntax re-exports
Compat Core module that handles the GHC module hierarchy re-organisation by re-exporting everything we care about.
This module provides no other compat mechanisms, except for simple backward-compatible pattern synonyms.
Synopsis
- data DynFlags
- extensions :: DynFlags -> [OnOff Extension]
- extensionFlags :: DynFlags -> EnumSet Extension
- targetPlatform :: DynFlags -> Platform
- packageFlags :: DynFlags -> [PackageFlag]
- generalFlags :: DynFlags -> EnumSet GeneralFlag
- warningFlags :: DynFlags -> EnumSet WarningFlag
- topDir :: DynFlags -> FilePath
- hiDir :: DynFlags -> Maybe String
- tmpDir :: DynFlags -> String
- importPaths :: DynFlags -> [FilePath]
- useColor :: DynFlags -> OverridingBool
- canUseColor :: DynFlags -> Bool
- useUnicode :: DynFlags -> Bool
- objectDir :: DynFlags -> Maybe String
- flagsForCompletion :: Bool -> [String]
- setImportPaths :: [FilePath] -> DynFlags -> DynFlags
- outputFile :: DynFlags -> Maybe String
- pluginModNames :: DynFlags -> [ModuleName]
- refLevelHoleFits :: DynFlags -> Maybe Int
- maxRefHoleFits :: DynFlags -> Maybe Int
- maxValidHoleFits :: DynFlags -> Maybe Int
- type CommandLineOption = String
- staticPlugins :: DynFlags -> [StaticPlugin]
- sPgm_F :: Settings -> String
- settings :: DynFlags -> Settings
- gopt :: GeneralFlag -> DynFlags -> Bool
- gopt_set :: DynFlags -> GeneralFlag -> DynFlags
- gopt_unset :: DynFlags -> GeneralFlag -> DynFlags
- wopt :: WarningFlag -> DynFlags -> Bool
- wopt_set :: DynFlags -> WarningFlag -> DynFlags
- xFlags :: [FlagSpec Extension]
- xopt :: Extension -> DynFlags -> Bool
- xopt_unset :: DynFlags -> Extension -> DynFlags
- xopt_set :: DynFlags -> Extension -> DynFlags
- data FlagSpec flag = FlagSpec {
- flagSpecName :: String
- flagSpecFlag :: flag
- flagSpecAction :: TurnOnFlag -> DynP ()
- flagSpecGhcMode :: GhcFlagMode
- data WarningFlag
- = Opt_WarnDuplicateExports
- | Opt_WarnDuplicateConstraints
- | Opt_WarnRedundantConstraints
- | Opt_WarnHiShadows
- | Opt_WarnImplicitPrelude
- | Opt_WarnIncompletePatterns
- | Opt_WarnIncompleteUniPatterns
- | Opt_WarnIncompletePatternsRecUpd
- | Opt_WarnOverflowedLiterals
- | Opt_WarnEmptyEnumerations
- | Opt_WarnMissingFields
- | Opt_WarnMissingImportList
- | Opt_WarnMissingMethods
- | Opt_WarnMissingSignatures
- | Opt_WarnMissingLocalSignatures
- | Opt_WarnNameShadowing
- | Opt_WarnOverlappingPatterns
- | Opt_WarnTypeDefaults
- | Opt_WarnMonomorphism
- | Opt_WarnUnusedTopBinds
- | Opt_WarnUnusedLocalBinds
- | Opt_WarnUnusedPatternBinds
- | Opt_WarnUnusedImports
- | Opt_WarnUnusedMatches
- | Opt_WarnUnusedTypePatterns
- | Opt_WarnUnusedForalls
- | Opt_WarnUnusedRecordWildcards
- | Opt_WarnRedundantRecordWildcards
- | Opt_WarnWarningsDeprecations
- | Opt_WarnDeprecatedFlags
- | Opt_WarnMissingMonadFailInstances
- | Opt_WarnSemigroup
- | Opt_WarnDodgyExports
- | Opt_WarnDodgyImports
- | Opt_WarnOrphans
- | Opt_WarnAutoOrphans
- | Opt_WarnIdentities
- | Opt_WarnTabs
- | Opt_WarnUnrecognisedPragmas
- | Opt_WarnDodgyForeignImports
- | Opt_WarnUnusedDoBind
- | Opt_WarnWrongDoBind
- | Opt_WarnAlternativeLayoutRuleTransitional
- | Opt_WarnUnsafe
- | Opt_WarnSafe
- | Opt_WarnTrustworthySafe
- | Opt_WarnMissedSpecs
- | Opt_WarnAllMissedSpecs
- | Opt_WarnUnsupportedCallingConventions
- | Opt_WarnUnsupportedLlvmVersion
- | Opt_WarnMissedExtraSharedLib
- | Opt_WarnInlineRuleShadowing
- | Opt_WarnTypedHoles
- | Opt_WarnPartialTypeSignatures
- | Opt_WarnMissingExportedSignatures
- | Opt_WarnUntickedPromotedConstructors
- | Opt_WarnDerivingTypeable
- | Opt_WarnDeferredTypeErrors
- | Opt_WarnDeferredOutOfScopeVariables
- | Opt_WarnNonCanonicalMonadInstances
- | Opt_WarnNonCanonicalMonadFailInstances
- | Opt_WarnNonCanonicalMonoidInstances
- | Opt_WarnMissingPatternSynonymSignatures
- | Opt_WarnUnrecognisedWarningFlags
- | Opt_WarnSimplifiableClassConstraints
- | Opt_WarnCPPUndef
- | Opt_WarnUnbangedStrictPatterns
- | Opt_WarnMissingHomeModules
- | Opt_WarnPartialFields
- | Opt_WarnMissingExportList
- | Opt_WarnInaccessibleCode
- | Opt_WarnStarIsType
- | Opt_WarnStarBinder
- | Opt_WarnImplicitKindVars
- | Opt_WarnSpaceAfterBang
- | Opt_WarnMissingDerivingStrategies
- | Opt_WarnPrepositiveQualifiedModule
- | Opt_WarnUnusedPackages
- | Opt_WarnInferredSafeImports
- | Opt_WarnMissingSafeHaskellMode
- | Opt_WarnCompatUnqualifiedImports
- | Opt_WarnDerivingDefaults
- data GeneralFlag
- = Opt_DumpToFile
- | Opt_D_faststring_stats
- | Opt_D_dump_minimal_imports
- | Opt_DoCoreLinting
- | Opt_DoStgLinting
- | Opt_DoCmmLinting
- | Opt_DoAsmLinting
- | Opt_DoAnnotationLinting
- | Opt_NoLlvmMangler
- | Opt_FastLlvm
- | Opt_NoTypeableBinds
- | 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_PrintTypecheckerElaboration
- | Opt_CallArity
- | Opt_Exitification
- | Opt_Strictness
- | Opt_LateDmdAnal
- | Opt_KillAbsence
- | Opt_KillOneShot
- | Opt_FullLaziness
- | Opt_FloatIn
- | Opt_LateSpecialise
- | Opt_Specialise
- | Opt_SpecialiseAggressively
- | Opt_CrossModuleSpecialise
- | Opt_StaticArgumentTransformation
- | Opt_CSE
- | Opt_StgCSE
- | Opt_StgLiftLams
- | Opt_LiberateCase
- | Opt_SpecConstr
- | Opt_SpecConstrKeen
- | Opt_DoLambdaEtaExpansion
- | Opt_IgnoreAsserts
- | Opt_DoEtaReduction
- | Opt_CaseMerge
- | Opt_CaseFolding
- | Opt_UnboxStrictFields
- | Opt_UnboxSmallStrictFields
- | Opt_DictsCheap
- | Opt_EnableRewriteRules
- | Opt_EnableThSpliceWarnings
- | Opt_RegsGraph
- | Opt_RegsIterative
- | Opt_PedanticBottoms
- | Opt_LlvmTBAA
- | Opt_LlvmFillUndefWithGarbage
- | Opt_IrrefutableTuples
- | Opt_CmmSink
- | Opt_CmmElimCommonBlocks
- | Opt_AsmShortcutting
- | Opt_OmitYields
- | Opt_FunToThunk
- | Opt_DictsStrict
- | Opt_DmdTxDictSel
- | Opt_Loopification
- | Opt_CfgBlocklayout
- | Opt_WeightlessBlocklayout
- | Opt_CprAnal
- | Opt_WorkerWrapper
- | Opt_SolveConstantDicts
- | Opt_AlignmentSanitisation
- | Opt_CatchBottoms
- | Opt_NumConstantFolding
- | Opt_SimplPreInlining
- | Opt_IgnoreInterfacePragmas
- | Opt_OmitInterfacePragmas
- | Opt_ExposeAllUnfoldings
- | Opt_WriteInterface
- | Opt_WriteHie
- | Opt_AutoSccsOnIndividualCafs
- | Opt_ProfCountEntries
- | Opt_Pp
- | Opt_ForceRecomp
- | Opt_IgnoreOptimChanges
- | Opt_IgnoreHpcChanges
- | Opt_ExcessPrecision
- | Opt_EagerBlackHoling
- | Opt_NoHsMain
- | Opt_SplitSections
- | Opt_StgStats
- | Opt_HideAllPackages
- | Opt_HideAllPluginPackages
- | Opt_PrintBindResult
- | Opt_Haddock
- | Opt_HaddockOptions
- | Opt_BreakOnException
- | Opt_BreakOnError
- | Opt_PrintEvldWithShow
- | Opt_PrintBindContents
- | Opt_GenManifest
- | Opt_EmbedManifest
- | Opt_SharedImplib
- | Opt_BuildingCabalPackage
- | Opt_IgnoreDotGhci
- | Opt_GhciSandbox
- | Opt_GhciHistory
- | Opt_GhciLeakCheck
- | Opt_ValidateHie
- | Opt_LocalGhciHistory
- | Opt_NoIt
- | Opt_HelpfulErrors
- | Opt_DeferTypeErrors
- | Opt_DeferTypedHoles
- | Opt_DeferOutOfScopeVariables
- | Opt_PIC
- | Opt_PIE
- | Opt_PICExecutable
- | Opt_ExternalDynamicRefs
- | Opt_SccProfilingOn
- | Opt_Ticky
- | Opt_Ticky_Allocd
- | Opt_Ticky_LNE
- | Opt_Ticky_Dyn_Thunk
- | Opt_RPath
- | Opt_RelativeDynlibPaths
- | Opt_Hpc
- | Opt_FlatCache
- | Opt_ExternalInterpreter
- | Opt_OptimalApplicativeDo
- | Opt_VersionMacros
- | Opt_WholeArchiveHsLibs
- | Opt_SingleLibFolder
- | Opt_KeepCAFs
- | Opt_KeepGoing
- | Opt_ByteCode
- | Opt_ErrorSpans
- | Opt_DeferDiagnostics
- | Opt_DiagnosticsShowCaret
- | Opt_PprCaseAsLet
- | Opt_PprShowTicks
- | Opt_ShowHoleConstraints
- | Opt_ShowValidHoleFits
- | Opt_SortValidHoleFits
- | Opt_SortBySizeHoleFits
- | Opt_SortBySubsumHoleFits
- | Opt_AbstractRefHoleFits
- | Opt_UnclutterValidHoleFits
- | Opt_ShowTypeAppOfHoleFits
- | Opt_ShowTypeAppVarsOfHoleFits
- | Opt_ShowDocsOfHoleFits
- | Opt_ShowTypeOfHoleFits
- | Opt_ShowProvOfHoleFits
- | Opt_ShowMatchesOfHoleFits
- | Opt_ShowLoadedModules
- | Opt_HexWordLiterals
- | Opt_SuppressCoercions
- | Opt_SuppressVarKinds
- | Opt_SuppressModulePrefixes
- | Opt_SuppressTypeApplications
- | Opt_SuppressIdInfo
- | Opt_SuppressUnfoldings
- | Opt_SuppressTypeSignatures
- | Opt_SuppressUniques
- | Opt_SuppressStgExts
- | Opt_SuppressTicks
- | Opt_SuppressTimestamps
- | 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_DistrustAllPackages
- | Opt_PackageTrust
- | Opt_PluginTrustworthy
- | Opt_G_NoStateHack
- | Opt_G_NoOptCoercion
- data PackageFlag
- data PackageArg
- data ModRenaming = ModRenaming {}
- pattern ExposePackage :: String -> PackageArg -> ModRenaming -> PackageFlag
- parseDynamicFlagsCmdLine :: MonadIO m => DynFlags -> [Located String] -> m (DynFlags, [Located String], [Warn])
- parseDynamicFilePragma :: MonadIO m => DynFlags -> [Located String] -> m (DynFlags, [Located String], [Warn])
- data WarnReason
- = NoReason
- | Reason !WarningFlag
- | ErrReason !(Maybe WarningFlag)
- wWarningFlags :: [FlagSpec WarningFlag]
- updOptLevel :: Int -> DynFlags -> DynFlags
- setUnsafeGlobalDynFlags :: DynFlags -> IO ()
- type Scaled a = a
- scaledThing :: Scaled a -> a
- type IfaceExport = AvailInfo
- data IfaceTyCon = IfaceTyCon {}
- 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 :: Warnings
- mi_anns :: [IfaceAnnotation]
- mi_decls :: [IfaceDeclExts phase]
- mi_globals :: !(Maybe GlobalRdrEnv)
- mi_insts :: [IfaceClsInst]
- mi_fam_insts :: [IfaceFamInst]
- mi_rules :: [IfaceRule]
- mi_hpc :: !AnyHpcUsage
- mi_trust :: !IfaceTrustInfo
- mi_trust_pkg :: !Bool
- mi_complete_sigs :: [IfaceCompleteMatch]
- mi_doc_hdr :: Maybe HsDocString
- mi_decl_docs :: DeclDocMap
- mi_arg_docs :: ArgDocMap
- mi_final_exts :: !(IfaceBackendExts phase)
- data HscSource
- data WhereFrom
- loadInterface :: SDoc -> Module -> WhereFrom -> IfM lcl (MaybeErr MsgDoc ModIface)
- data SourceModified
- loadModuleInterface :: SDoc -> Module -> TcM ModIface
- data RecompileRequired
- mkPartialIface :: HscEnv -> ModDetails -> ModGuts -> PartialModIface
- mkFullIface :: HscEnv -> PartialModIface -> IO ModIface
- checkOldIface :: HscEnv -> ModSummary -> SourceModified -> Maybe ModIface -> IO (RecompileRequired, Maybe ModIface)
- pattern IsBoot :: IsBootInterface
- pattern NotBoot :: IsBootInterface
- data LexicalFixity
- data ModSummary = ModSummary {
- ms_mod :: Module
- ms_hsc_src :: HscSource
- ms_location :: ModLocation
- ms_hs_date :: UTCTime
- ms_obj_date :: Maybe UTCTime
- ms_iface_date :: Maybe UTCTime
- ms_hie_date :: Maybe UTCTime
- ms_srcimps :: [(Maybe FastString, Located ModuleName)]
- ms_textual_imps :: [(Maybe FastString, Located ModuleName)]
- ms_parsed_mod :: Maybe HsParsedModule
- ms_hspp_file :: FilePath
- ms_hspp_opts :: DynFlags
- ms_hspp_buf :: Maybe StringBuffer
- data HomeModInfo = HomeModInfo {
- hm_iface :: !ModIface
- hm_details :: !ModDetails
- hm_linkable :: !(Maybe Linkable)
- data ModGuts = ModGuts {
- mg_module :: !Module
- mg_hsc_src :: HscSource
- mg_loc :: SrcSpan
- mg_exports :: ![AvailInfo]
- mg_deps :: !Dependencies
- mg_usages :: ![Usage]
- mg_used_th :: !Bool
- mg_rdr_env :: !GlobalRdrEnv
- mg_fix_env :: !FixityEnv
- mg_tcs :: ![TyCon]
- mg_insts :: ![ClsInst]
- mg_fam_insts :: ![FamInst]
- mg_patsyns :: ![PatSyn]
- mg_rules :: ![CoreRule]
- mg_binds :: !CoreProgram
- mg_foreign :: !ForeignStubs
- mg_foreign_files :: ![(ForeignSrcLang, FilePath)]
- mg_warns :: !Warnings
- mg_anns :: [Annotation]
- mg_complete_sigs :: [CompleteMatch]
- mg_hpc_info :: !HpcInfo
- mg_modBreaks :: !(Maybe ModBreaks)
- mg_inst_env :: InstEnv
- mg_fam_inst_env :: FamInstEnv
- mg_safe_haskell :: SafeHaskellMode
- mg_trust_pkg :: Bool
- mg_doc_hdr :: !(Maybe HsDocString)
- mg_decl_docs :: !DeclDocMap
- mg_arg_docs :: !ArgDocMap
- data CgGuts = CgGuts {
- cg_module :: !Module
- cg_tycons :: [TyCon]
- cg_binds :: CoreProgram
- cg_foreign :: !ForeignStubs
- cg_foreign_files :: ![(ForeignSrcLang, FilePath)]
- cg_dep_pkgs :: ![InstalledUnitId]
- cg_hpc_info :: !HpcInfo
- cg_modBreaks :: !(Maybe ModBreaks)
- cg_spt_entries :: [SptEntry]
- data ModDetails = ModDetails {
- md_exports :: [AvailInfo]
- md_types :: !TypeEnv
- md_insts :: ![ClsInst]
- md_fam_insts :: ![FamInst]
- md_rules :: ![CoreRule]
- md_anns :: ![Annotation]
- md_complete_sigs :: [CompleteMatch]
- data Type
- pattern FunTy :: Type -> Type -> Type
- splitForAllTyCoVars :: Type -> ([TyCoVar], Type)
- mkVisFunTys :: [Scaled Type] -> Type -> Type
- mkInfForAllTys :: [TyVar] -> Type -> Type
- data ImpDeclSpec = ImpDeclSpec {
- is_mod :: ModuleName
- is_as :: ModuleName
- is_qual :: Bool
- is_dloc :: SrcSpan
- data ImportSpec = ImpSpec {}
- data SourceText
- tyThingParent_maybe :: TyThing -> Maybe TyThing
- data Way
- wayGeneralFlags :: Platform -> Way -> [GeneralFlag]
- wayUnsetGeneralFlags :: Platform -> Way -> [GeneralFlag]
- data AvailInfo
- pattern AvailName :: Name -> AvailInfo
- pattern AvailFL :: FieldLabel -> AvailInfo
- pattern AvailTC :: Name -> [Name] -> [FieldLabel] -> AvailInfo
- availName :: AvailInfo -> Name
- availNames :: AvailInfo -> [Name]
- availNamesWithSelectors :: AvailInfo -> [Name]
- availsToNameSet :: [AvailInfo] -> NameSet
- data TcGblEnv = TcGblEnv {
- tcg_mod :: Module
- tcg_semantic_mod :: Module
- tcg_src :: HscSource
- tcg_rdr_env :: GlobalRdrEnv
- tcg_default :: Maybe [Type]
- tcg_fix_env :: FixityEnv
- tcg_field_env :: RecFieldEnv
- tcg_type_env :: TypeEnv
- tcg_type_env_var :: TcRef TypeEnv
- tcg_inst_env :: !InstEnv
- tcg_fam_inst_env :: !FamInstEnv
- tcg_ann_env :: AnnEnv
- tcg_exports :: [AvailInfo]
- tcg_imports :: ImportAvails
- tcg_dus :: DefUses
- tcg_used_gres :: TcRef [GlobalRdrElt]
- tcg_keep :: TcRef NameSet
- tcg_th_used :: TcRef Bool
- tcg_th_splice_used :: TcRef Bool
- tcg_th_top_level_locs :: TcRef (Set RealSrcSpan)
- tcg_dfun_n :: TcRef OccSet
- tcg_merged :: [(Module, Fingerprint)]
- tcg_rn_exports :: Maybe [(Located (IE GhcRn), Avails)]
- tcg_rn_imports :: [LImportDecl GhcRn]
- tcg_rn_decls :: Maybe (HsGroup GhcRn)
- tcg_dependent_files :: TcRef [FilePath]
- tcg_th_topdecls :: TcRef [LHsDecl GhcPs]
- tcg_th_foreign_files :: TcRef [(ForeignSrcLang, FilePath)]
- tcg_th_topnames :: TcRef NameSet
- tcg_th_modfinalizers :: TcRef [(TcLclEnv, ThModFinalizers)]
- tcg_th_coreplugins :: TcRef [String]
- tcg_th_state :: TcRef (Map TypeRep Dynamic)
- tcg_th_remote_state :: TcRef (Maybe (ForeignRef (IORef QState)))
- tcg_ev_binds :: Bag EvBind
- tcg_tr_module :: Maybe Id
- tcg_binds :: LHsBinds GhcTc
- tcg_sigs :: NameSet
- tcg_imp_specs :: [LTcSpecPrag]
- tcg_warns :: Warnings
- tcg_anns :: [Annotation]
- tcg_tcs :: [TyCon]
- tcg_insts :: [ClsInst]
- tcg_fam_insts :: [FamInst]
- tcg_rules :: [LRuleDecl GhcTc]
- tcg_fords :: [LForeignDecl GhcTc]
- tcg_patsyns :: [PatSyn]
- tcg_doc_hdr :: Maybe LHsDocString
- tcg_hpc :: !AnyHpcUsage
- tcg_self_boot :: SelfBootInfo
- tcg_main :: Maybe Name
- tcg_safeInfer :: TcRef (Bool, WarningMessages)
- tcg_tc_plugins :: [TcPluginSolver]
- tcg_hf_plugins :: [HoleFitPlugin]
- tcg_top_loc :: RealSrcSpan
- tcg_static_wc :: TcRef WantedConstraints
- tcg_complete_matches :: [CompleteMatch]
- tcg_cc_st :: TcRef CostCentreState
- data HsParsedModule = HsParsedModule {}
- data ParsedModule = ParsedModule {}
- type ParsedSource = Located (HsModule GhcPs)
- type RenamedSource = (HsGroup GhcRn, [LImportDecl GhcRn], Maybe [(LIE GhcRn, Avails)], Maybe LHsDocString)
- data HscEnv
- runGhc :: Maybe FilePath -> Ghc a -> IO a
- unGhc :: Ghc a -> Session -> IO a
- data Session = Session !(IORef HscEnv)
- modifySession :: GhcMonad m => (HscEnv -> HscEnv) -> m ()
- getSession :: GhcMonad m => m HscEnv
- setSessionDynFlags :: GhcMonad m => DynFlags -> m [InstalledUnitId]
- getSessionDynFlags :: GhcMonad m => m DynFlags
- class (Functor m, MonadIO m, ExceptionMonad m, HasDynFlags m) => GhcMonad (m :: Type -> Type)
- data Ghc a
- runHsc :: HscEnv -> Hsc a -> IO a
- compileFile :: HscEnv -> Phase -> (FilePath, Maybe Phase) -> IO FilePath
- data Phase
- hscDesugar :: HscEnv -> ModSummary -> TcGblEnv -> IO ModGuts
- hscGenHardCode :: HscEnv -> CgGuts -> ModLocation -> FilePath -> IO (FilePath, Maybe FilePath, [(ForeignSrcLang, FilePath)])
- hscInteractive :: HscEnv -> CgGuts -> ModLocation -> IO (Maybe FilePath, CompiledByteCode, [SptEntry])
- hscSimplify :: HscEnv -> [String] -> ModGuts -> IO ModGuts
- hscTypecheckRename :: HscEnv -> ModSummary -> HsParsedModule -> IO (TcGblEnv, RenamedStuff)
- makeSimpleDetails :: HscEnv -> TcGblEnv -> IO ModDetails
- tcSplitForAllTyVars :: Type -> ([TyVar], Type)
- tcSplitForAllTyVarBinder_maybe :: Type -> Maybe (TyVarBinder, Type)
- typecheckIface :: ModIface -> IfG ModDetails
- mkIfaceTc :: HscEnv -> SafeHaskellMode -> ModDetails -> TcGblEnv -> IO ModIface
- data ImportedModsVal = ImportedModsVal {}
- importedByUser :: [ImportedBy] -> [ImportedModsVal]
- type TypecheckedSource = LHsBinds GhcTc
- type HasSrcSpan = HasSrcSpan
- type Located = GenLocated SrcSpan
- unLoc :: HasSrcSpan a => a -> SrcSpanLess a
- getLoc :: HasSrcSpan a => a -> SrcSpan
- type RealLocated = GenLocated RealSrcSpan
- data GenLocated l e = L l e
- data SrcSpan = UnhelpfulSpan !FastString
- data RealSrcSpan
- pattern RealSrcSpan :: RealSrcSpan -> Maybe BufSpan -> SrcSpan
- data RealSrcLoc
- data SrcLoc
- type BufSpan = ()
- leftmost_smallest :: SrcSpan -> SrcSpan -> Ordering
- containsSpan :: RealSrcSpan -> RealSrcSpan -> Bool
- mkGeneralSrcSpan :: FastString -> SrcSpan
- mkRealSrcSpan :: RealSrcLoc -> RealSrcLoc -> RealSrcSpan
- mkRealSrcLoc :: FastString -> Int -> Int -> RealSrcLoc
- getRealSrcSpan :: RealLocated a -> RealSrcSpan
- realSrcLocSpan :: RealSrcLoc -> RealSrcSpan
- realSrcSpanStart :: RealSrcSpan -> RealSrcLoc
- realSrcSpanEnd :: RealSrcSpan -> RealSrcLoc
- isSubspanOf :: SrcSpan -> SrcSpan -> Bool
- wiredInSrcSpan :: SrcSpan
- mkSrcSpan :: SrcLoc -> SrcLoc -> SrcSpan
- srcSpanStart :: SrcSpan -> SrcLoc
- srcSpanStartLine :: RealSrcSpan -> Int
- srcSpanStartCol :: RealSrcSpan -> Int
- srcSpanEnd :: SrcSpan -> SrcLoc
- srcSpanEndLine :: RealSrcSpan -> Int
- srcSpanEndCol :: RealSrcSpan -> Int
- srcSpanFile :: RealSrcSpan -> FastString
- srcLocCol :: RealSrcLoc -> Int
- srcLocFile :: RealSrcLoc -> FastString
- srcLocLine :: RealSrcLoc -> Int
- noSrcSpan :: SrcSpan
- noSrcLoc :: SrcLoc
- noLoc :: HasSrcSpan a => SrcSpanLess a -> a
- data FindResult
- = Found ModLocation Module
- | NoPackage UnitId
- | FoundMultiple [(Module, ModuleOrigin)]
- | NotFound {
- fr_paths :: [FilePath]
- fr_pkg :: Maybe UnitId
- fr_mods_hidden :: [UnitId]
- fr_pkgs_hidden :: [UnitId]
- fr_unusables :: [(UnitId, UnusablePackageReason)]
- fr_suggestions :: [ModuleSuggestion]
- mkHomeModLocation :: DynFlags -> ModuleName -> FilePath -> IO ModLocation
- addBootSuffixLocnOut :: ModLocation -> ModLocation
- findObjectLinkableMaybe :: Module -> ModLocation -> IO (Maybe Linkable)
- data InstalledFindResult
- data ModuleOrigin
- newtype PackageName = PackageName FastString
- data Unlinked
- data Linkable = LM {}
- unload :: HscEnv -> [Linkable] -> IO ()
- initDynLinker :: HscEnv -> IO ()
- data Hooks
- runMetaHook :: Hooks -> Maybe (MetaHook TcM)
- type MetaHook (f :: Type -> Type) = MetaRequest -> LHsExpr GhcTc -> f MetaResult
- data MetaRequest
- = MetaE (LHsExpr GhcPs -> MetaResult)
- | MetaP (LPat GhcPs -> MetaResult)
- | MetaT (LHsType GhcPs -> MetaResult)
- | MetaD ([LHsDecl GhcPs] -> MetaResult)
- | MetaAW (Serialized -> MetaResult)
- metaRequestE :: Functor f => MetaHook f -> LHsExpr GhcTc -> f (LHsExpr GhcPs)
- metaRequestP :: Functor f => MetaHook f -> LHsExpr GhcTc -> f (LPat GhcPs)
- metaRequestT :: Functor f => MetaHook f -> LHsExpr GhcTc -> f (LHsType GhcPs)
- metaRequestD :: Functor f => MetaHook f -> LHsExpr GhcTc -> f [LHsDecl GhcPs]
- metaRequestAW :: Functor f => MetaHook f -> LHsExpr GhcTc -> f Serialized
- addToHpt :: HomePackageTable -> ModuleName -> HomeModInfo -> HomePackageTable
- addListToHpt :: HomePackageTable -> [(ModuleName, HomeModInfo)] -> HomePackageTable
- data Target = Target {}
- data TargetId
- mkModuleGraph :: [ModSummary] -> ModuleGraph
- initObjLinker :: HscEnv -> IO ()
- loadDLL :: HscEnv -> String -> IO (Maybe String)
- data InteractiveImport
- getContext :: GhcMonad m => m [InteractiveImport]
- setContext :: GhcMonad m => [InteractiveImport] -> m ()
- parseImportDecl :: GhcMonad m => String -> m (ImportDecl GhcPs)
- runDecls :: GhcMonad m => String -> m [Name]
- data Warn = Warn {}
- data ModLocation
- pattern ModLocation :: Maybe FilePath -> FilePath -> FilePath -> ModLocation
- ml_hs_file :: ModLocation -> Maybe FilePath
- ml_obj_file :: ModLocation -> FilePath
- ml_hi_file :: ModLocation -> FilePath
- ml_hie_file :: ModLocation -> FilePath
- dataConExTyCoVars :: DataCon -> [TyCoVar]
- data Role
- type PlainGhcException = PlainGhcException
- panic :: String -> a
- isKindLevel :: TypeOrKind -> Bool
- isTypeLevel :: TypeOrKind -> Bool
- mkIntWithInf :: Int -> IntWithInf
- treatZeroAsInf :: Int -> IntWithInf
- intGtLimit :: Int -> IntWithInf -> Bool
- infinity :: IntWithInf
- integralFractionalLit :: Bool -> Integer -> FractionalLit
- negateFractionalLit :: FractionalLit -> FractionalLit
- mkFractionalLit :: Real a => a -> FractionalLit
- negateIntegralLit :: IntegralLit -> IntegralLit
- mkIntegralLit :: Integral a => a -> IntegralLit
- isEarlyActive :: Activation -> Bool
- isAlwaysActive :: Activation -> Bool
- isNeverActive :: Activation -> Bool
- competesWith :: Activation -> Activation -> Bool
- isActiveIn :: PhaseNum -> Activation -> Bool
- isActive :: CompilerPhase -> Activation -> Bool
- pprInlineDebug :: InlinePragma -> SDoc
- pprInline :: InlinePragma -> SDoc
- setInlinePragmaRuleMatchInfo :: InlinePragma -> RuleMatchInfo -> InlinePragma
- setInlinePragmaActivation :: InlinePragma -> Activation -> InlinePragma
- inlinePragmaRuleMatchInfo :: InlinePragma -> RuleMatchInfo
- inlinePragmaActivation :: InlinePragma -> Activation
- inlinePragmaSat :: InlinePragma -> Maybe Arity
- isAnyInlinePragma :: InlinePragma -> Bool
- isInlinablePragma :: InlinePragma -> Bool
- isInlinePragma :: InlinePragma -> Bool
- isDefaultInlinePragma :: InlinePragma -> Bool
- dfunInlinePragma :: InlinePragma
- inlinePragmaSpec :: InlinePragma -> InlineSpec
- neverInlinePragma :: InlinePragma
- alwaysInlinePragma :: InlinePragma
- defaultInlinePragma :: InlinePragma
- noUserInlineSpec :: InlineSpec -> Bool
- isFunLike :: RuleMatchInfo -> Bool
- isConLike :: RuleMatchInfo -> Bool
- activeDuringFinal :: Activation
- activeAfterInitial :: Activation
- pprWithSourceText :: SourceText -> SDoc -> SDoc
- failed :: SuccessFlag -> Bool
- succeeded :: SuccessFlag -> Bool
- successIf :: Bool -> SuccessFlag
- zapFragileOcc :: OccInfo -> OccInfo
- isOneOcc :: OccInfo -> Bool
- isDeadOcc :: OccInfo -> Bool
- isStrongLoopBreaker :: OccInfo -> Bool
- isWeakLoopBreaker :: OccInfo -> Bool
- weakLoopBreaker :: OccInfo
- strongLoopBreaker :: OccInfo
- isAlwaysTailCalled :: OccInfo -> Bool
- zapOccTailCallInfo :: OccInfo -> OccInfo
- tailCallInfo :: OccInfo -> TailCallInfo
- notOneBranch :: OneBranch
- oneBranch :: OneBranch
- notInsideLam :: InsideLam
- insideLam :: InsideLam
- seqOccInfo :: OccInfo -> ()
- isManyOccs :: OccInfo -> Bool
- noOccInfo :: OccInfo
- pprAlternative :: (a -> SDoc) -> a -> ConTag -> Arity -> SDoc
- sumParens :: SDoc -> SDoc
- tupleParens :: TupleSort -> SDoc -> SDoc
- boxityTupleSort :: Boxity -> TupleSort
- tupleSortBoxity :: TupleSort -> Boxity
- maybeParen :: PprPrec -> PprPrec -> SDoc -> SDoc
- appPrec :: PprPrec
- opPrec :: PprPrec
- funPrec :: PprPrec
- sigPrec :: PprPrec
- topPrec :: PprPrec
- hasOverlappingFlag :: OverlapMode -> Bool
- hasOverlappableFlag :: OverlapMode -> Bool
- hasIncoherentFlag :: OverlapMode -> Bool
- setOverlapModeMaybe :: OverlapFlag -> Maybe OverlapMode -> OverlapFlag
- isGenerated :: Origin -> Bool
- boolToRecFlag :: Bool -> RecFlag
- isNonRec :: RecFlag -> Bool
- isRec :: RecFlag -> Bool
- isBoxed :: Boxity -> Bool
- isTopLevel :: TopLevelFlag -> Bool
- isNotTopLevel :: TopLevelFlag -> Bool
- compareFixity :: Fixity -> Fixity -> (Bool, Bool)
- funTyFixity :: Fixity
- negateFixity :: Fixity
- defaultFixity :: Fixity
- minPrecedence :: Int
- maxPrecedence :: Int
- pprRuleName :: RuleName -> SDoc
- pprWarningTxtForMsg :: WarningTxt -> SDoc
- initialVersion :: Version
- bumpVersion :: Version -> Version
- isPromoted :: PromotionFlag -> Bool
- unSwap :: SwapFlag -> (a -> a -> b) -> a -> a -> b
- isSwapped :: SwapFlag -> Bool
- flipSwap :: SwapFlag -> SwapFlag
- bestOneShot :: OneShotInfo -> OneShotInfo -> OneShotInfo
- worstOneShot :: OneShotInfo -> OneShotInfo -> OneShotInfo
- hasNoOneShotInfo :: OneShotInfo -> Bool
- isOneShotInfo :: OneShotInfo -> Bool
- noOneShotInfo :: OneShotInfo
- alignmentOf :: Int -> Alignment
- mkAlignment :: Int -> Alignment
- fIRST_TAG :: ConTag
- pickLR :: LeftOrRight -> (a, a) -> a
- data LeftOrRight
- type Arity = Int
- type RepArity = Int
- type JoinArity = Int
- type ConTag = Int
- type ConTagZ = Int
- data Alignment
- data OneShotInfo
- data SwapFlag
- data PromotionFlag
- data FunctionOrData
- = IsFunction
- | IsData
- data StringLiteral = StringLiteral {
- sl_st :: SourceText
- sl_fs :: FastString
- data WarningTxt
- type RuleName = FastString
- data Fixity = Fixity SourceText Int FixityDirection
- data FixityDirection
- data LexicalFixity
- data TopLevelFlag
- data Boxity
- data RecFlag
- data Origin
- data OverlapFlag = OverlapFlag {}
- data OverlapMode
- newtype PprPrec = PprPrec Int
- data TupleSort
- data EP a = EP {}
- data OccInfo
- = ManyOccs {
- occ_tail :: !TailCallInfo
- | IAmDead
- | OneOcc { }
- | IAmALoopBreaker {
- occ_rules_only :: !RulesOnly
- occ_tail :: !TailCallInfo
- = ManyOccs {
- type InterestingCxt = Bool
- type InsideLam = Bool
- type OneBranch = Bool
- data TailCallInfo
- data DefMethSpec ty
- data SuccessFlag
- data SourceText
- type PhaseNum = Int
- data CompilerPhase
- data Activation
- data RuleMatchInfo
- data InlinePragma = InlinePragma {}
- data InlineSpec
- data IntegralLit = IL {}
- data FractionalLit = FL {}
- data IntWithInf
- data SpliceExplicitFlag
- data TypeOrKind
- module Class
- coercionKind :: Coercion -> Pair Type
- module Predicate
- module ConLike
- module CoreUtils
- buildSynTyCon :: Name -> [KnotTied TyConBinder] -> Kind -> [Role] -> KnotTied Type -> TyCon
- buildAlgTyCon :: Name -> [TyVar] -> [Role] -> Maybe CType -> ThetaType -> AlgTyConRhs -> Bool -> AlgTyConFlav -> TyCon
- splitDataProductType_maybe :: Type -> Maybe (TyCon, [Type], DataCon, [Type])
- promoteDataCon :: DataCon -> TyCon
- dataConUserTyVarsArePermuted :: DataCon -> Bool
- dataConCannotMatch :: [Type] -> DataCon -> Bool
- classDataCon :: Class -> DataCon
- specialPromotedDc :: DataCon -> Bool
- isVanillaDataCon :: DataCon -> Bool
- isUnboxedTupleCon :: DataCon -> Bool
- isTupleDataCon :: DataCon -> Bool
- dataConIdentity :: DataCon -> ByteString
- dataConRepArgTys :: DataCon -> [Type]
- dataConOrigArgTys :: DataCon -> [Type]
- dataConInstArgTys :: DataCon -> [Type] -> [Type]
- dataConUserType :: DataCon -> Type
- dataConOrigResTy :: DataCon -> Type
- dataConInstSig :: DataCon -> [Type] -> ([TyCoVar], ThetaType, [Type])
- dataConSig :: DataCon -> ([TyCoVar], ThetaType, [Type], Type)
- dataConBoxer :: DataCon -> Maybe DataConBoxer
- dataConImplBangs :: DataCon -> [HsImplBang]
- dataConRepStrictness :: DataCon -> [StrictnessMark]
- isNullaryRepDataCon :: DataCon -> Bool
- isNullarySrcDataCon :: DataCon -> Bool
- dataConRepArity :: DataCon -> Arity
- dataConSrcBangs :: DataCon -> [HsSrcBang]
- dataConFieldType_maybe :: DataCon -> FieldLabelString -> Maybe (FieldLabel, Type)
- dataConFieldType :: DataCon -> FieldLabelString -> Type
- dataConImplicitTyThings :: DataCon -> [TyThing]
- dataConWrapId :: DataCon -> Id
- dataConWrapId_maybe :: DataCon -> Maybe Id
- dataConWorkId :: DataCon -> Id
- dataConTheta :: DataCon -> ThetaType
- dataConEqSpec :: DataCon -> [EqSpec]
- dataConUnivAndExTyCoVars :: DataCon -> [TyCoVar]
- dataConUnivTyVars :: DataCon -> [TyVar]
- dataConIsInfix :: DataCon -> Bool
- dataConRepType :: DataCon -> Type
- dataConOrigTyCon :: DataCon -> TyCon
- dataConTagZ :: DataCon -> ConTagZ
- dataConTag :: DataCon -> ConTag
- mkDataCon :: Name -> Bool -> TyConRepName -> [HsSrcBang] -> [FieldLabel] -> [TyVar] -> [TyCoVar] -> [TyVarBinder] -> [EqSpec] -> KnotTied ThetaType -> [KnotTied Type] -> KnotTied Type -> RuntimeRepInfo -> KnotTied TyCon -> ConTag -> ThetaType -> Id -> DataConRep -> DataCon
- isMarkedStrict :: StrictnessMark -> Bool
- isSrcUnpacked :: SrcUnpackedness -> Bool
- isSrcStrict :: SrcStrictness -> Bool
- isBanged :: HsImplBang -> Bool
- eqHsBang :: HsImplBang -> HsImplBang -> Bool
- filterEqSpec :: [EqSpec] -> [TyVar] -> [TyVar]
- substEqSpec :: TCvSubst -> EqSpec -> EqSpec
- eqSpecPreds :: [EqSpec] -> ThetaType
- eqSpecPair :: EqSpec -> (TyVar, Type)
- eqSpecType :: EqSpec -> Type
- eqSpecTyVar :: EqSpec -> TyVar
- mkEqSpec :: TyVar -> Type -> EqSpec
- data HsSrcBang = HsSrcBang SourceText SrcUnpackedness SrcStrictness
- data HsImplBang
- data SrcStrictness
- data SrcUnpackedness
- data StrictnessMark
- dataConName :: DataCon -> Name
- dataConTyCon :: DataCon -> TyCon
- dataConUserTyVars :: DataCon -> [TyVar]
- dataConUserTyVarBinders :: DataCon -> [TyVarBinder]
- dataConSourceArity :: DataCon -> Arity
- dataConFieldLabels :: DataCon -> [FieldLabel]
- dataConInstOrigArgTys :: DataCon -> [Type] -> [Type]
- dataConStupidTheta :: DataCon -> ThetaType
- dataConFullSig :: DataCon -> ([TyVar], [TyCoVar], [EqSpec], ThetaType, [Type], Type)
- isUnboxedSumCon :: DataCon -> Bool
- data DataCon
- data DataConRep
- = NoDataConRep
- | DCR {
- dcr_wrap_id :: Id
- dcr_boxer :: DataConBoxer
- dcr_arg_tys :: [Type]
- dcr_stricts :: [StrictnessMark]
- dcr_bangs :: [HsImplBang]
- data EqSpec
- type FieldLabelString = FastString
- type FieldLabel = FieldLbl Name
- data FieldLbl a = FieldLabel {
- flLabel :: FieldLabelString
- flIsOverloaded :: Bool
- flSelector :: a
- fIRST_TAG :: ConTag
- type ConTag = Int
- module DsExpr
- class Functor f => Applicative (f :: Type -> Type) where
- mapM :: (Traversable t, Monad m) => (a -> m b) -> t a -> m (t b)
- mapAndUnzipM :: Applicative m => (a -> m (b, c)) -> [a] -> m ([b], [c])
- (<$>) :: Functor f => (a -> b) -> f a -> f b
- foldlM :: (Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m b
- pprRuntimeTrace :: String -> SDoc -> CoreExpr -> DsM CoreExpr
- dsWhenNoErrs :: DsM a -> (a -> CoreExpr) -> DsM CoreExpr
- dsNoLevPolyExpr :: CoreExpr -> SDoc -> DsM ()
- dsNoLevPoly :: Type -> SDoc -> DsM ()
- discardWarningsDs :: DsM a -> DsM a
- dsExtendMetaEnv :: DsMetaEnv -> DsM a -> DsM a
- dsLookupMetaEnv :: Name -> DsM (Maybe DsMetaVal)
- dsGetCompleteMatches :: TyCon -> DsM [CompleteMatch]
- dsGetMetaEnv :: DsM (NameEnv DsMetaVal)
- dsGetFamInstEnvs :: DsM FamInstEnvs
- dsLookupConLike :: Name -> DsM ConLike
- dsLookupDataCon :: Name -> DsM DataCon
- dsLookupTyCon :: Name -> DsM TyCon
- dsLookupGlobalId :: Name -> DsM Id
- dsLookupGlobal :: Name -> DsM TyThing
- mkPrintUnqualifiedDs :: DsM PrintUnqualified
- askNoErrsDs :: DsM a -> DsM (a, Bool)
- failDs :: DsM a
- failWithDs :: SDoc -> DsM a
- errDsCoreExpr :: SDoc -> DsM CoreExpr
- errDs :: SDoc -> DsM ()
- warnIfSetDs :: WarningFlag -> SDoc -> DsM ()
- warnDs :: WarnReason -> SDoc -> DsM ()
- putSrcSpanDs :: SrcSpan -> DsM a -> DsM a
- getSrcSpanDs :: DsM SrcSpan
- updPmDelta :: Delta -> DsM a -> DsM a
- getPmDelta :: DsM Delta
- getGhcModeDs :: DsM GhcMode
- newSysLocalsDs :: [Type] -> DsM [Id]
- newSysLocalsDsNoLP :: [Type] -> DsM [Id]
- newFailLocalDs :: Type -> DsM Id
- newSysLocalDs :: Type -> DsM Id
- newSysLocalDsNoLP :: Type -> DsM Id
- newPredVarDs :: PredType -> DsM Var
- duplicateLocalDs :: Id -> DsM Id
- newUniqueId :: Id -> Type -> DsM Id
- initTcDsForSolver :: TcM a -> DsM (Messages, Maybe a)
- initDsWithModGuts :: HscEnv -> ModGuts -> DsM a -> IO (Messages, Maybe a)
- initDs :: HscEnv -> TcGblEnv -> DsM a -> IO (Messages, Maybe a)
- initDsTc :: DsM a -> TcM a
- fixDs :: (a -> DsM a) -> DsM a
- orFail :: CanItFail -> CanItFail -> CanItFail
- idDsWrapper :: DsWrapper
- data DsMatchContext = DsMatchContext (HsMatchContext Name) SrcSpan
- data EquationInfo = EqnInfo {}
- type DsWrapper = CoreExpr -> CoreExpr
- data MatchResult = MatchResult CanItFail (CoreExpr -> DsM CoreExpr)
- data CanItFail
- type DsWarning = (SrcSpan, SDoc)
- newUniqueSupply :: TcRnIf gbl lcl UniqSupply
- newUnique :: TcRnIf gbl lcl Unique
- whenGOptM :: GeneralFlag -> TcRnIf gbl lcl () -> TcRnIf gbl lcl ()
- unsetWOptM :: WarningFlag -> TcRnIf gbl lcl a -> TcRnIf gbl lcl a
- unsetGOptM :: GeneralFlag -> TcRnIf gbl lcl a -> TcRnIf gbl lcl a
- xoptM :: Extension -> TcRnIf gbl lcl Bool
- type DsM = TcRnIf DsGblEnv DsLclEnv
- type DsMetaEnv = NameEnv DsMetaVal
- data DsMetaVal
- data UniqSupply
- traceCmd :: DynFlags -> String -> String -> IO a -> IO a
- isWarnMsgFatal :: DynFlags -> WarnMsg -> Maybe (Maybe WarningFlag)
- prettyPrintGhcErrors :: ExceptionMonad m => DynFlags -> m a -> m a
- logOutput :: DynFlags -> PprStyle -> MsgDoc -> IO ()
- printOutputForUser :: DynFlags -> PrintUnqualified -> MsgDoc -> IO ()
- printInfoForUser :: DynFlags -> PrintUnqualified -> MsgDoc -> IO ()
- putMsg :: DynFlags -> MsgDoc -> IO ()
- debugTraceMsg :: DynFlags -> Int -> MsgDoc -> IO ()
- withTimingSilentD :: (MonadIO m, HasDynFlags m) => SDoc -> (a -> ()) -> m a -> m a
- withTimingSilent :: MonadIO m => DynFlags -> SDoc -> (a -> ()) -> m a -> m a
- withTimingD :: (MonadIO m, HasDynFlags m) => SDoc -> (a -> ()) -> m a -> m a
- withTiming :: MonadIO m => DynFlags -> SDoc -> (a -> ()) -> m a -> m a
- showPass :: DynFlags -> String -> IO ()
- compilationProgressMsg :: DynFlags -> String -> IO ()
- fatalErrorMsg'' :: FatalMessager -> String -> IO ()
- fatalErrorMsg :: DynFlags -> MsgDoc -> IO ()
- warningMsg :: DynFlags -> MsgDoc -> IO ()
- errorMsg :: DynFlags -> MsgDoc -> IO ()
- dumpSDocWithStyle :: PprStyle -> DynFlags -> DumpFlag -> String -> SDoc -> IO ()
- dumpSDocForUser :: DynFlags -> PrintUnqualified -> DumpFlag -> String -> SDoc -> IO ()
- mkDumpDoc :: String -> SDoc -> SDoc
- dumpIfSet_dyn_printer :: PrintUnqualified -> DynFlags -> DumpFlag -> SDoc -> IO ()
- dumpIfSet_dyn :: DynFlags -> DumpFlag -> String -> SDoc -> IO ()
- dumpIfSet :: DynFlags -> Bool -> String -> SDoc -> IO ()
- doIfSet_dyn :: DynFlags -> GeneralFlag -> IO () -> IO ()
- doIfSet :: Bool -> IO () -> IO ()
- ghcExit :: DynFlags -> Int -> IO ()
- pprLocErrMsg :: ErrMsg -> SDoc
- pprErrMsgBagWithLoc :: Bag ErrMsg -> [SDoc]
- formatErrDoc :: DynFlags -> ErrDoc -> SDoc
- printBagOfErrors :: DynFlags -> Bag ErrMsg -> IO ()
- warningsToMessages :: DynFlags -> WarningMessages -> Messages
- errorsFound :: DynFlags -> Messages -> Bool
- isEmptyMessages :: Messages -> Bool
- emptyMessages :: Messages
- mkPlainWarnMsg :: DynFlags -> SrcSpan -> MsgDoc -> ErrMsg
- mkLongWarnMsg :: DynFlags -> SrcSpan -> PrintUnqualified -> MsgDoc -> MsgDoc -> ErrMsg
- mkPlainErrMsg :: DynFlags -> SrcSpan -> MsgDoc -> ErrMsg
- mkErrMsg :: DynFlags -> SrcSpan -> PrintUnqualified -> MsgDoc -> ErrMsg
- mkLongErrMsg :: DynFlags -> SrcSpan -> PrintUnqualified -> MsgDoc -> MsgDoc -> ErrMsg
- mkErrDoc :: DynFlags -> SrcSpan -> PrintUnqualified -> ErrDoc -> ErrMsg
- makeIntoWarning :: WarnReason -> ErrMsg -> ErrMsg
- pprMessageBag :: Bag MsgDoc -> SDoc
- errDoc :: [MsgDoc] -> [MsgDoc] -> [MsgDoc] -> ErrDoc
- unionMessages :: Messages -> Messages -> Messages
- orValid :: Validity -> Validity -> Validity
- getInvalids :: [Validity] -> [MsgDoc]
- allValid :: [Validity] -> Validity
- andValid :: Validity -> Validity -> Validity
- isValid :: Validity -> Bool
- data Validity
- type Messages = (WarningMessages, ErrorMessages)
- type WarningMessages = Bag WarnMsg
- type ErrorMessages = Bag ErrMsg
- data ErrMsg
- data ErrDoc
- type WarnMsg = ErrMsg
- mkLocMessage :: Severity -> SrcSpan -> MsgDoc -> MsgDoc
- mkLocMessageAnn :: Maybe String -> Severity -> SrcSpan -> MsgDoc -> MsgDoc
- getCaretDiagnostic :: Severity -> SrcSpan -> IO MsgDoc
- dumpSDoc :: DynFlags -> PrintUnqualified -> DumpFlag -> String -> SDoc -> IO ()
- data Severity
- type MsgDoc = SDoc
- module FamInst
- module FamInstEnv
- optionsErrorMsgs :: DynFlags -> [String] -> [Located String] -> FilePath -> Messages
- checkProcessArgsResult :: MonadIO m => DynFlags -> [Located String] -> m ()
- getOptions :: DynFlags -> StringBuffer -> FilePath -> [Located String]
- getOptionsFromFile :: DynFlags -> FilePath -> IO [Located String]
- mkPrelImports :: ModuleName -> SrcSpan -> Bool -> [LImportDecl GhcPs] -> [LImportDecl GhcPs]
- module Id
- module InstEnv
- module IfaceSyn
- unitModuleSet :: Module -> ModuleSet
- unionModuleSet :: ModuleSet -> ModuleSet -> ModuleSet
- delModuleSet :: ModuleSet -> Module -> ModuleSet
- minusModuleSet :: ModuleSet -> ModuleSet -> ModuleSet
- intersectModuleSet :: ModuleSet -> ModuleSet -> ModuleSet
- elemModuleSet :: Module -> ModuleSet -> Bool
- moduleSetElts :: ModuleSet -> [Module]
- emptyModuleSet :: ModuleSet
- extendModuleSetList :: ModuleSet -> [Module] -> ModuleSet
- extendModuleSet :: ModuleSet -> Module -> ModuleSet
- mkModuleSet :: [Module] -> ModuleSet
- isEmptyModuleEnv :: ModuleEnv a -> Bool
- unitModuleEnv :: Module -> a -> ModuleEnv a
- moduleEnvToList :: ModuleEnv a -> [(Module, a)]
- moduleEnvElts :: ModuleEnv a -> [a]
- moduleEnvKeys :: ModuleEnv a -> [Module]
- emptyModuleEnv :: ModuleEnv a
- mkModuleEnv :: [(Module, a)] -> ModuleEnv a
- mapModuleEnv :: (a -> b) -> ModuleEnv a -> ModuleEnv b
- lookupWithDefaultModuleEnv :: ModuleEnv a -> a -> Module -> a
- lookupModuleEnv :: ModuleEnv a -> Module -> Maybe a
- plusModuleEnv :: ModuleEnv a -> ModuleEnv a -> ModuleEnv a
- delModuleEnv :: ModuleEnv a -> Module -> ModuleEnv a
- delModuleEnvList :: ModuleEnv a -> [Module] -> ModuleEnv a
- plusModuleEnv_C :: (a -> a -> a) -> ModuleEnv a -> ModuleEnv a -> ModuleEnv a
- extendModuleEnvList_C :: (a -> a -> a) -> ModuleEnv a -> [(Module, a)] -> ModuleEnv a
- extendModuleEnvList :: ModuleEnv a -> [(Module, a)] -> ModuleEnv a
- extendModuleEnvWith :: (a -> a -> a) -> ModuleEnv a -> Module -> a -> ModuleEnv a
- extendModuleEnv :: ModuleEnv a -> Module -> a -> ModuleEnv a
- elemModuleEnv :: Module -> ModuleEnv a -> Bool
- filterModuleEnv :: (Module -> a -> Bool) -> ModuleEnv a -> ModuleEnv a
- wiredInUnitIds :: [UnitId]
- isHoleModule :: Module -> Bool
- isInteractiveModule :: Module -> Bool
- mainUnitId :: UnitId
- interactiveUnitId :: UnitId
- thisGhcUnitId :: UnitId
- thUnitId :: UnitId
- rtsUnitId :: UnitId
- baseUnitId :: UnitId
- integerUnitId :: UnitId
- primUnitId :: UnitId
- parseModSubst :: ReadP [(ModuleName, Module)]
- parseModuleId :: ReadP Module
- parseComponentId :: ReadP ComponentId
- parseUnitId :: ReadP UnitId
- parseModuleName :: ReadP ModuleName
- generalizeIndefModule :: IndefModule -> IndefModule
- generalizeIndefUnitId :: IndefUnitId -> IndefUnitId
- splitUnitIdInsts :: UnitId -> (InstalledUnitId, Maybe IndefUnitId)
- splitModuleInsts :: Module -> (InstalledModule, Maybe IndefModule)
- renameHoleUnitId' :: PackageConfigMap -> ShHoleSubst -> UnitId -> UnitId
- renameHoleModule' :: PackageConfigMap -> ShHoleSubst -> Module -> Module
- renameHoleUnitId :: DynFlags -> ShHoleSubst -> UnitId -> UnitId
- renameHoleModule :: DynFlags -> ShHoleSubst -> Module -> Module
- stringToUnitId :: String -> UnitId
- fsToUnitId :: FastString -> UnitId
- newSimpleUnitId :: ComponentId -> UnitId
- stableUnitIdCmp :: UnitId -> UnitId -> Ordering
- newUnitId :: ComponentId -> [(ModuleName, Module)] -> UnitId
- hashUnitId :: ComponentId -> [(ModuleName, Module)] -> FastString
- unitIdIsDefinite :: UnitId -> Bool
- unitIdFreeHoles :: UnitId -> UniqDSet ModuleName
- delInstalledModuleEnv :: InstalledModuleEnv a -> InstalledModule -> InstalledModuleEnv a
- filterInstalledModuleEnv :: (InstalledModule -> a -> Bool) -> InstalledModuleEnv a -> InstalledModuleEnv a
- extendInstalledModuleEnv :: InstalledModuleEnv a -> InstalledModule -> a -> InstalledModuleEnv a
- lookupInstalledModuleEnv :: InstalledModuleEnv a -> InstalledModule -> Maybe a
- emptyInstalledModuleEnv :: InstalledModuleEnv a
- installedUnitIdEq :: InstalledUnitId -> UnitId -> Bool
- installedModuleEq :: InstalledModule -> Module -> Bool
- stringToInstalledUnitId :: String -> InstalledUnitId
- componentIdToInstalledUnitId :: ComponentId -> InstalledUnitId
- fsToInstalledUnitId :: FastString -> InstalledUnitId
- installedUnitIdString :: InstalledUnitId -> String
- toInstalledUnitId :: UnitId -> InstalledUnitId
- indefModuleToModule :: DynFlags -> IndefModule -> Module
- indefUnitIdToUnitId :: DynFlags -> IndefUnitId -> UnitId
- newIndefUnitId :: ComponentId -> [(ModuleName, Module)] -> IndefUnitId
- unitIdKey :: UnitId -> Unique
- unitIdFS :: UnitId -> FastString
- pprModule :: Module -> SDoc
- mkModule :: UnitId -> ModuleName -> Module
- stableModuleCmp :: Module -> Module -> Ordering
- mkHoleModule :: ModuleName -> Module
- moduleIsDefinite :: Module -> Bool
- moduleFreeHoles :: Module -> UniqDSet ModuleName
- moduleNameColons :: ModuleName -> String
- moduleNameSlashes :: ModuleName -> String
- mkModuleNameFS :: FastString -> ModuleName
- mkModuleName :: String -> ModuleName
- moduleStableString :: Module -> String
- moduleNameString :: ModuleName -> String
- moduleNameFS :: ModuleName -> FastString
- pprModuleName :: ModuleName -> SDoc
- stableModuleNameCmp :: ModuleName -> ModuleName -> Ordering
- addBootSuffixLocn :: ModLocation -> ModLocation
- addBootSuffix_maybe :: Bool -> FilePath -> FilePath
- addBootSuffix :: FilePath -> FilePath
- class ContainsModule t where
- extractModule :: t -> Module
- class HasModule (m :: Type -> Type) where
- data IndefUnitId = IndefUnitId {}
- data IndefModule = IndefModule {}
- data InstalledModule = InstalledModule {}
- newtype DefUnitId = DefUnitId {}
- data InstalledModuleEnv elt
- type ShHoleSubst = ModuleNameEnv Module
- data ModuleEnv elt
- type ModuleSet = Set NDModule
- type ModuleNameEnv elt = UniqFM elt
- type DModuleNameEnv elt = UniqDFM elt
- unitIdString :: UnitId -> String
- data Module = Module !UnitId !ModuleName
- data ModuleName
- pattern IndefiniteUnitId :: !IndefUnitId -> UnitId
- pattern DefiniteUnitId :: !DefUnitId -> UnitId
- newtype InstalledUnitId = InstalledUnitId {}
- newtype ComponentId = ComponentId FastString
- pprPrefixName :: NamedThing a => a -> SDoc
- pprInfixName :: (Outputable a, NamedThing a) => a -> SDoc
- getOccFS :: NamedThing a => a -> FastString
- getOccString :: NamedThing a => a -> String
- getSrcSpan :: NamedThing a => a -> SrcSpan
- getSrcLoc :: NamedThing a => a -> SrcLoc
- nameStableString :: Name -> String
- pprNameDefnLoc :: Name -> SDoc
- pprDefinedAt :: Name -> SDoc
- pprModulePrefix :: PprStyle -> Module -> OccName -> SDoc
- pprNameUnqualified :: Name -> SDoc
- stableNameCmp :: Name -> Name -> Ordering
- localiseName :: Name -> Name
- tidyNameOcc :: Name -> OccName -> Name
- setNameLoc :: Name -> SrcSpan -> Name
- setNameUnique :: Name -> Unique -> Name
- mkFCallName :: Unique -> String -> Name
- mkSysTvName :: Unique -> FastString -> Name
- mkSystemVarName :: Unique -> FastString -> Name
- mkSystemNameAt :: Unique -> OccName -> SrcSpan -> Name
- mkSystemName :: Unique -> OccName -> Name
- mkWiredInName :: Module -> OccName -> Unique -> TyThing -> BuiltInSyntax -> Name
- mkExternalName :: Unique -> Module -> OccName -> SrcSpan -> Name
- mkDerivedInternalName :: (OccName -> OccName) -> Unique -> Name -> Name
- mkClonedInternalName :: Unique -> Name -> Name
- mkInternalName :: Unique -> OccName -> SrcSpan -> Name
- isSystemName :: Name -> Bool
- isVarName :: Name -> Bool
- isValName :: Name -> Bool
- isDataConName :: Name -> Bool
- isTyConName :: Name -> Bool
- isTyVarName :: Name -> Bool
- nameIsFromExternalPackage :: UnitId -> Name -> Bool
- nameIsHomePackageImport :: Module -> Name -> Bool
- nameIsHomePackage :: Module -> Name -> Bool
- nameIsLocalOrFrom :: Module -> Name -> Bool
- nameModule_maybe :: Name -> Maybe Module
- nameModule :: HasDebugCallStack => Name -> Module
- isHoleName :: Name -> Bool
- isInternalName :: Name -> Bool
- isExternalName :: Name -> Bool
- isBuiltInSyntax :: Name -> Bool
- wiredInNameTyThing_maybe :: Name -> Maybe TyThing
- isWiredInName :: Name -> Bool
- nameSrcSpan :: Name -> SrcSpan
- nameSrcLoc :: Name -> SrcLoc
- nameNameSpace :: Name -> NameSpace
- nameOccName :: Name -> OccName
- nameUnique :: Name -> Unique
- data BuiltInSyntax
- class NamedThing a where
- getOccName :: a -> OccName
- getName :: a -> Name
- tidyOccName :: TidyOccEnv -> OccName -> (TidyOccEnv, OccName)
- avoidClashesOccEnv :: TidyOccEnv -> [OccName] -> TidyOccEnv
- initTidyOccEnv :: [OccName] -> TidyOccEnv
- emptyTidyOccEnv :: TidyOccEnv
- mkMethodOcc :: OccName -> OccName
- mkDataCOcc :: OccName -> OccSet -> OccName
- mkDataTOcc :: OccName -> OccSet -> OccName
- mkDFunOcc :: String -> Bool -> OccSet -> OccName
- mkInstTyTcOcc :: String -> OccSet -> OccName
- mkLocalOcc :: Unique -> OccName -> OccName
- mkSuperDictSelOcc :: Int -> OccName -> OccName
- mkSuperDictAuxOcc :: Int -> OccName -> OccName
- mkDataConWorkerOcc :: OccName -> OccName
- mkRecFldSelOcc :: String -> OccName
- mkGen1R :: OccName -> OccName
- mkGenR :: OccName -> OccName
- mkTyConRepOcc :: OccName -> OccName
- mkMaxTagOcc :: OccName -> OccName
- mkTag2ConOcc :: OccName -> OccName
- mkCon2TagOcc :: OccName -> OccName
- mkEqPredCoOcc :: OccName -> OccName
- mkInstTyCoOcc :: OccName -> OccName
- mkNewTyCoOcc :: OccName -> OccName
- mkClassDataConOcc :: OccName -> OccName
- mkRepEqOcc :: OccName -> OccName
- mkForeignExportOcc :: OccName -> OccName
- mkSpecOcc :: OccName -> OccName
- mkIPOcc :: OccName -> OccName
- mkDictOcc :: OccName -> OccName
- mkClassOpAuxOcc :: OccName -> OccName
- mkDefaultMethodOcc :: OccName -> OccName
- mkBuilderOcc :: OccName -> OccName
- mkMatcherOcc :: OccName -> OccName
- mkWorkerOcc :: OccName -> OccName
- mkDataConWrapperOcc :: OccName -> OccName
- isTypeableBindOcc :: OccName -> Bool
- isDefaultMethodOcc :: OccName -> Bool
- isDerivedOccName :: OccName -> Bool
- startsWithUnderscore :: OccName -> Bool
- parenSymOcc :: OccName -> SDoc -> SDoc
- isSymOcc :: OccName -> Bool
- isDataSymOcc :: OccName -> Bool
- isDataOcc :: OccName -> Bool
- isValOcc :: OccName -> Bool
- isTcOcc :: OccName -> Bool
- isTvOcc :: OccName -> Bool
- isVarOcc :: OccName -> Bool
- setOccNameSpace :: NameSpace -> OccName -> OccName
- occNameString :: OccName -> String
- filterOccSet :: (OccName -> Bool) -> OccSet -> OccSet
- intersectsOccSet :: OccSet -> OccSet -> Bool
- intersectOccSet :: OccSet -> OccSet -> OccSet
- isEmptyOccSet :: OccSet -> Bool
- elemOccSet :: OccName -> OccSet -> Bool
- minusOccSet :: OccSet -> OccSet -> OccSet
- unionManyOccSets :: [OccSet] -> OccSet
- unionOccSets :: OccSet -> OccSet -> OccSet
- extendOccSetList :: OccSet -> [OccName] -> OccSet
- extendOccSet :: OccSet -> OccName -> OccSet
- mkOccSet :: [OccName] -> OccSet
- unitOccSet :: OccName -> OccSet
- emptyOccSet :: OccSet
- pprOccEnv :: (a -> SDoc) -> OccEnv a -> SDoc
- alterOccEnv :: (Maybe elt -> Maybe elt) -> OccEnv elt -> OccName -> OccEnv elt
- filterOccEnv :: (elt -> Bool) -> OccEnv elt -> OccEnv elt
- delListFromOccEnv :: OccEnv a -> [OccName] -> OccEnv a
- delFromOccEnv :: OccEnv a -> OccName -> OccEnv a
- mkOccEnv_C :: (a -> a -> a) -> [(OccName, a)] -> OccEnv a
- mapOccEnv :: (a -> b) -> OccEnv a -> OccEnv b
- extendOccEnv_Acc :: (a -> b -> b) -> (a -> b) -> OccEnv b -> OccName -> a -> OccEnv b
- extendOccEnv_C :: (a -> a -> a) -> OccEnv a -> OccName -> a -> OccEnv a
- plusOccEnv_C :: (a -> a -> a) -> OccEnv a -> OccEnv a -> OccEnv a
- plusOccEnv :: OccEnv a -> OccEnv a -> OccEnv a
- occEnvElts :: OccEnv a -> [a]
- foldOccEnv :: (a -> b -> b) -> b -> OccEnv a -> b
- elemOccEnv :: OccName -> OccEnv a -> Bool
- mkOccEnv :: [(OccName, a)] -> OccEnv a
- lookupOccEnv :: OccEnv a -> OccName -> Maybe a
- extendOccEnvList :: OccEnv a -> [(OccName, a)] -> OccEnv a
- extendOccEnv :: OccEnv a -> OccName -> a -> OccEnv a
- unitOccEnv :: OccName -> a -> OccEnv a
- emptyOccEnv :: OccEnv a
- nameSpacesRelated :: NameSpace -> NameSpace -> Bool
- demoteOccName :: OccName -> Maybe OccName
- mkClsOccFS :: FastString -> OccName
- mkClsOcc :: String -> OccName
- mkTcOccFS :: FastString -> OccName
- mkTcOcc :: String -> OccName
- mkTyVarOccFS :: FastString -> OccName
- mkTyVarOcc :: String -> OccName
- mkDataOccFS :: FastString -> OccName
- mkDataOcc :: String -> OccName
- mkVarOccFS :: FastString -> OccName
- mkVarOcc :: String -> OccName
- mkOccNameFS :: NameSpace -> FastString -> OccName
- mkOccName :: NameSpace -> String -> OccName
- pprOccName :: OccName -> SDoc
- pprNameSpaceBrief :: NameSpace -> SDoc
- pprNonVarNameSpace :: NameSpace -> SDoc
- pprNameSpace :: NameSpace -> SDoc
- isValNameSpace :: NameSpace -> Bool
- isVarNameSpace :: NameSpace -> Bool
- isTvNameSpace :: NameSpace -> Bool
- isTcClsNameSpace :: NameSpace -> Bool
- isDataConNameSpace :: NameSpace -> Bool
- tvName :: NameSpace
- srcDataName :: NameSpace
- dataName :: NameSpace
- tcClsName :: NameSpace
- clsName :: NameSpace
- tcName :: NameSpace
- data NameSpace
- class HasOccName name where
- data OccEnv a
- type OccSet = UniqSet OccName
- type TidyOccEnv = UniqFM Int
- mkFsEnv :: [(FastString, a)] -> FastStringEnv a
- lookupFsEnv :: FastStringEnv a -> FastString -> Maybe a
- extendFsEnv :: FastStringEnv a -> FastString -> a -> FastStringEnv a
- emptyFsEnv :: FastStringEnv a
- type FastStringEnv a = UniqFM a
- data OccName
- data Name
- module NameCache
- module NameEnv
- module NameSet
- module PatSyn
- pprTypeForUser :: Type -> SDoc
- pprTyThing :: ShowSub -> TyThing -> SDoc
- pprTyThingInContextLoc :: TyThing -> SDoc
- pprTyThingInContext :: ShowSub -> TyThing -> SDoc
- pprTyThingHdr :: TyThing -> SDoc
- pprTyThingLoc :: TyThing -> SDoc
- module PrelInfo
- pretendNameIsInScope :: Name -> Bool
- interactiveClassKeys :: [Unique]
- interactiveClassNames :: [Name]
- derivableClassKeys :: [Unique]
- standardClassKeys :: [Unique]
- fractionalClassKeys :: [Unique]
- numericClassKeys :: [Unique]
- wordToNaturalIdKey :: Unique
- naturalSDataConKey :: Unique
- mkNaturalIdKey :: Unique
- timesNaturalIdKey :: Unique
- minusNaturalIdKey :: Unique
- plusNaturalIdKey :: Unique
- naturalToIntegerIdKey :: Unique
- naturalFromIntegerIdKey :: Unique
- makeStaticKey :: Unique
- fromStaticPtrClassOpKey :: Unique
- pushCallStackKey :: Unique
- emptyCallStackKey :: Unique
- mconcatClassOpKey :: Unique
- mappendClassOpKey :: Unique
- memptyClassOpKey :: Unique
- sappendClassOpKey :: Unique
- coercibleSCSelIdKey :: Unique
- heqSCSelIdKey :: Unique
- eqSCSelIdKey :: Unique
- bitIntegerIdKey :: Unique
- toDynIdKey :: Unique
- starArrStarArrStarKindRepKey :: Unique
- starArrStarKindRepKey :: Unique
- starKindRepKey :: Unique
- tr'PtrRepLiftedKey :: Unique
- trRuntimeRepKey :: Unique
- trTYPE'PtrRepLiftedKey :: Unique
- trTYPEKey :: Unique
- mkTrFunKey :: Unique
- typeRepIdKey :: Unique
- typeSymbolTypeRepKey :: Unique
- typeNatTypeRepKey :: Unique
- mkTrAppKey :: Unique
- mkTrConKey :: Unique
- mkTrTypeKey :: Unique
- mkTyConKey :: Unique
- proxyHashKey :: Unique
- toListClassOpKey :: Unique
- fromListNClassOpKey :: Unique
- fromListClassOpKey :: Unique
- isListClassKey :: Unique
- ghciStepIoMClassOpKey :: Unique
- mzipIdKey :: Unique
- liftMIdKey :: Unique
- guardMIdKey :: Unique
- toRationalClassOpKey :: Unique
- toIntegerClassOpKey :: Unique
- realToFracIdKey :: Unique
- fromIntegralIdKey :: Unique
- toAnnotationWrapperIdKey :: Unique
- fromStringClassOpKey :: Unique
- loopAIdKey :: Unique
- choiceAIdKey :: Unique
- appAIdKey :: Unique
- firstAIdKey :: Unique
- composeAIdKey :: Unique
- arrAIdKey :: Unique
- failMClassOpKey :: Unique
- mfixIdKey :: Unique
- returnMClassOpKey :: Unique
- fmapClassOpKey :: Unique
- thenMClassOpKey :: Unique
- bindMClassOpKey :: Unique
- negateClassOpKey :: Unique
- geClassOpKey :: Unique
- eqClassOpKey :: Unique
- enumFromThenToClassOpKey :: Unique
- enumFromToClassOpKey :: Unique
- enumFromThenClassOpKey :: Unique
- enumFromClassOpKey :: Unique
- fromRationalClassOpKey :: Unique
- minusClassOpKey :: Unique
- fromIntegerClassOpKey :: Unique
- unboundKey :: Unique
- coerceKey :: Unique
- magicDictKey :: Unique
- undefinedKey :: Unique
- checkDotnetResNameIdKey :: Unique
- unmarshalStringIdKey :: Unique
- marshalStringIdKey :: Unique
- marshalObjectIdKey :: Unique
- unmarshalObjectIdKey :: Unique
- rationalToDoubleIdKey :: Unique
- rationalToFloatIdKey :: Unique
- noinlineIdKey :: Unique
- coercionTokenIdKey :: Unique
- dollarIdKey :: Unique
- groupWithIdKey :: Unique
- mapIdKey :: Unique
- inlineIdKey :: Unique
- breakpointCondIdKey :: Unique
- breakpointIdKey :: Unique
- traceKey :: Unique
- runRWKey :: Unique
- oneShotKey :: Unique
- assertErrorIdKey :: Unique
- lazyIdKey :: Unique
- thenIOIdKey :: Unique
- runMainKey :: Unique
- rootMainKey :: Unique
- decodeDoubleIntegerIdKey :: Unique
- int64ToIntegerIdKey :: Unique
- word64ToIntegerIdKey :: Unique
- wordToIntegerIdKey :: Unique
- shiftRIntegerIdKey :: Unique
- shiftLIntegerIdKey :: Unique
- complementIntegerIdKey :: Unique
- xorIntegerIdKey :: Unique
- orIntegerIdKey :: Unique
- andIntegerIdKey :: Unique
- lcmIntegerIdKey :: Unique
- gcdIntegerIdKey :: Unique
- encodeDoubleIntegerIdKey :: Unique
- encodeFloatIntegerIdKey :: Unique
- doubleFromIntegerIdKey :: Unique
- floatFromIntegerIdKey :: Unique
- quotRemIntegerIdKey :: Unique
- divModIntegerIdKey :: Unique
- modIntegerIdKey :: Unique
- divIntegerIdKey :: Unique
- remIntegerIdKey :: Unique
- quotIntegerIdKey :: Unique
- compareIntegerIdKey :: Unique
- geIntegerPrimIdKey :: Unique
- ltIntegerPrimIdKey :: Unique
- gtIntegerPrimIdKey :: Unique
- leIntegerPrimIdKey :: Unique
- signumIntegerIdKey :: Unique
- absIntegerIdKey :: Unique
- neqIntegerPrimIdKey :: Unique
- eqIntegerPrimIdKey :: Unique
- negateIntegerIdKey :: Unique
- minusIntegerIdKey :: Unique
- timesIntegerIdKey :: Unique
- plusIntegerIdKey :: Unique
- integerToInt64IdKey :: Unique
- integerToWord64IdKey :: Unique
- integerToIntIdKey :: Unique
- integerToWordIdKey :: Unique
- smallIntegerIdKey :: Unique
- mkIntegerIdKey :: Unique
- assertIdKey :: Unique
- otherwiseIdKey :: Unique
- sndIdKey :: Unique
- fstIdKey :: Unique
- voidArgIdKey :: Unique
- nullAddrIdKey :: Unique
- failIOIdKey :: Unique
- printIdKey :: Unique
- newStablePtrIdKey :: Unique
- returnIOIdKey :: Unique
- bindIOIdKey :: Unique
- zipIdKey :: Unique
- filterIdKey :: Unique
- concatIdKey :: Unique
- unsafeCoerceIdKey :: Unique
- absentSumFieldErrorIdKey :: Unique
- modIntIdKey :: Unique
- divIntIdKey :: Unique
- typeErrorIdKey :: Unique
- voidPrimIdKey :: Unique
- unpackCStringIdKey :: Unique
- unpackCStringFoldrIdKey :: Unique
- unpackCStringAppendIdKey :: Unique
- unpackCStringUtf8IdKey :: Unique
- recConErrorIdKey :: Unique
- realWorldPrimIdKey :: Unique
- patErrorIdKey :: Unique
- runtimeErrorIdKey :: Unique
- nonExhaustiveGuardsErrorIdKey :: Unique
- noMethodBindingErrorIdKey :: Unique
- eqStringIdKey :: Unique
- seqIdKey :: Unique
- recSelErrorIdKey :: Unique
- foldrIdKey :: Unique
- errorIdKey :: Unique
- buildIdKey :: Unique
- appendIdKey :: Unique
- augmentIdKey :: Unique
- absentErrorIdKey :: Unique
- wildCardKey :: Unique
- typeLitNatDataConKey :: Unique
- typeLitSymbolDataConKey :: Unique
- kindRepTypeLitDDataConKey :: Unique
- kindRepTypeLitSDataConKey :: Unique
- kindRepTYPEDataConKey :: Unique
- kindRepFunDataConKey :: Unique
- kindRepAppDataConKey :: Unique
- kindRepVarDataConKey :: Unique
- kindRepTyConAppDataConKey :: Unique
- vecElemDataConKeys :: [Unique]
- vecCountDataConKeys :: [Unique]
- unliftedRepDataConKeys :: [Unique]
- unliftedSimpleRepDataConKeys :: [Unique]
- liftedRepDataConKey :: Unique
- runtimeRepSimpleDataConKeys :: [Unique]
- sumRepDataConKey :: Unique
- tupleRepDataConKey :: Unique
- vecRepDataConKey :: Unique
- metaSelDataConKey :: Unique
- metaConsDataConKey :: Unique
- metaDataDataConKey :: Unique
- decidedUnpackDataConKey :: Unique
- decidedStrictDataConKey :: Unique
- decidedLazyDataConKey :: Unique
- noSourceStrictnessDataConKey :: Unique
- sourceStrictDataConKey :: Unique
- sourceLazyDataConKey :: Unique
- noSourceUnpackednessDataConKey :: Unique
- sourceNoUnpackDataConKey :: Unique
- sourceUnpackDataConKey :: Unique
- notAssociativeDataConKey :: Unique
- rightAssociativeDataConKey :: Unique
- leftAssociativeDataConKey :: Unique
- infixIDataConKey :: Unique
- prefixIDataConKey :: Unique
- typeErrorShowTypeDataConKey :: Unique
- typeErrorVAppendDataConKey :: Unique
- typeErrorAppendDataConKey :: Unique
- typeErrorTextDataConKey :: Unique
- typeLitSortTyConKey :: Unique
- kindRepTyConKey :: Unique
- trGhcPrimModuleKey :: Unique
- trNameDDataConKey :: Unique
- trNameSDataConKey :: Unique
- trNameTyConKey :: Unique
- trModuleDataConKey :: Unique
- trModuleTyConKey :: Unique
- trTyConDataConKey :: Unique
- trTyConTyConKey :: Unique
- srcLocDataConKey :: Unique
- fingerprintDataConKey :: Unique
- staticPtrInfoDataConKey :: Unique
- staticPtrDataConKey :: Unique
- coercibleDataConKey :: Unique
- ordGTDataConKey :: Unique
- ordEQDataConKey :: Unique
- ordLTDataConKey :: Unique
- rightDataConKey :: Unique
- leftDataConKey :: Unique
- genUnitDataConKey :: Unique
- inrDataConKey :: Unique
- inlDataConKey :: Unique
- crossDataConKey :: Unique
- heqDataConKey :: Unique
- integerDataConKey :: Unique
- ioDataConKey :: Unique
- wordDataConKey :: Unique
- trueDataConKey :: Unique
- stableNameDataConKey :: Unique
- word8DataConKey :: Unique
- ratioDataConKey :: Unique
- nilDataConKey :: Unique
- eqDataConKey :: Unique
- justDataConKey :: Unique
- nothingDataConKey :: Unique
- integerSDataConKey :: Unique
- intDataConKey :: Unique
- floatDataConKey :: Unique
- falseDataConKey :: Unique
- doubleDataConKey :: Unique
- consDataConKey :: Unique
- charDataConKey :: Unique
- doubleX8PrimTyConKey :: Unique
- floatX16PrimTyConKey :: Unique
- doubleX4PrimTyConKey :: Unique
- floatX8PrimTyConKey :: Unique
- doubleX2PrimTyConKey :: Unique
- floatX4PrimTyConKey :: Unique
- word64X8PrimTyConKey :: Unique
- word32X16PrimTyConKey :: Unique
- word16X32PrimTyConKey :: Unique
- word8X64PrimTyConKey :: Unique
- word64X4PrimTyConKey :: Unique
- word32X8PrimTyConKey :: Unique
- word16X16PrimTyConKey :: Unique
- word8X32PrimTyConKey :: Unique
- word64X2PrimTyConKey :: Unique
- word32X4PrimTyConKey :: Unique
- word16X8PrimTyConKey :: Unique
- word8X16PrimTyConKey :: Unique
- int64X8PrimTyConKey :: Unique
- int32X16PrimTyConKey :: Unique
- int16X32PrimTyConKey :: Unique
- int8X64PrimTyConKey :: Unique
- int64X4PrimTyConKey :: Unique
- int32X8PrimTyConKey :: Unique
- int16X16PrimTyConKey :: Unique
- int8X32PrimTyConKey :: Unique
- int64X2PrimTyConKey :: Unique
- int32X4PrimTyConKey :: Unique
- int16X8PrimTyConKey :: Unique
- int8X16PrimTyConKey :: Unique
- typeSymbolAppendFamNameKey :: Unique
- someTypeRepDataConKey :: Unique
- someTypeRepTyConKey :: Unique
- typeRepTyConKey :: Unique
- callStackTyConKey :: Unique
- staticPtrInfoTyConKey :: Unique
- staticPtrTyConKey :: Unique
- smallMutableArrayPrimTyConKey :: Unique
- smallArrayPrimTyConKey :: Unique
- anyTyConKey :: Unique
- specTyConKey :: Unique
- proxyPrimTyConKey :: Unique
- coercibleTyConKey :: Unique
- ntTyConKey :: Unique
- errorMessageTypeErrorFamKey :: Unique
- typeNatLogTyFamNameKey :: Unique
- typeNatModTyFamNameKey :: Unique
- typeNatDivTyFamNameKey :: Unique
- typeNatCmpTyFamNameKey :: Unique
- typeSymbolCmpTyFamNameKey :: Unique
- typeNatSubTyFamNameKey :: Unique
- typeNatLeqTyFamNameKey :: Unique
- typeNatExpTyFamNameKey :: Unique
- typeNatMulTyFamNameKey :: Unique
- typeNatAddTyFamNameKey :: Unique
- typeSymbolKindConNameKey :: Unique
- typeNatKindConNameKey :: Unique
- uWordTyConKey :: Unique
- uIntTyConKey :: Unique
- uFloatTyConKey :: Unique
- uDoubleTyConKey :: Unique
- uCharTyConKey :: Unique
- uAddrTyConKey :: Unique
- uRecTyConKey :: Unique
- rep1TyConKey :: Unique
- repTyConKey :: Unique
- noSelTyConKey :: Unique
- s1TyConKey :: Unique
- c1TyConKey :: Unique
- d1TyConKey :: Unique
- rec0TyConKey :: Unique
- sTyConKey :: Unique
- cTyConKey :: Unique
- dTyConKey :: Unique
- rTyConKey :: Unique
- compTyConKey :: Unique
- prodTyConKey :: Unique
- sumTyConKey :: Unique
- m1TyConKey :: Unique
- k1TyConKey :: Unique
- rec1TyConKey :: Unique
- par1TyConKey :: Unique
- u1TyConKey :: Unique
- v1TyConKey :: Unique
- opaqueTyConKey :: Unique
- unknown3TyConKey :: Unique
- unknown2TyConKey :: Unique
- unknown1TyConKey :: Unique
- unknownTyConKey :: Unique
- frontendPluginTyConKey :: Unique
- pluginTyConKey :: Unique
- vecElemTyConKey :: Unique
- vecCountTyConKey :: Unique
- runtimeRepTyConKey :: Unique
- constraintKindTyConKey :: Unique
- tYPETyConKey :: Unique
- eitherTyConKey :: Unique
- objectTyConKey :: Unique
- compactPrimTyConKey :: Unique
- tVarPrimTyConKey :: Unique
- funPtrTyConKey :: Unique
- ptrTyConKey :: Unique
- bcoPrimTyConKey :: Unique
- threadIdPrimTyConKey :: Unique
- typeConKey :: Unique
- boxityConKey :: Unique
- kindConKey :: Unique
- anyBoxConKey :: Unique
- unliftedConKey :: Unique
- liftedConKey :: Unique
- word64TyConKey :: Unique
- word64PrimTyConKey :: Unique
- word32TyConKey :: Unique
- word32PrimTyConKey :: Unique
- word16TyConKey :: Unique
- word16PrimTyConKey :: Unique
- word8TyConKey :: Unique
- word8PrimTyConKey :: Unique
- wordTyConKey :: Unique
- wordPrimTyConKey :: Unique
- voidPrimTyConKey :: Unique
- ioTyConKey :: Unique
- mutVarPrimTyConKey :: Unique
- eqPhantPrimTyConKey :: Unique
- eqReprPrimTyConKey :: Unique
- eqPrimTyConKey :: Unique
- stableNameTyConKey :: Unique
- stableNamePrimTyConKey :: Unique
- statePrimTyConKey :: Unique
- mutableArrayArrayPrimTyConKey :: Unique
- arrayArrayPrimTyConKey :: Unique
- heqTyConKey :: Unique
- eqTyConKey :: Unique
- stablePtrTyConKey :: Unique
- stablePtrPrimTyConKey :: Unique
- realWorldTyConKey :: Unique
- rationalTyConKey :: Unique
- ratioTyConKey :: Unique
- mVarPrimTyConKey :: Unique
- orderingTyConKey :: Unique
- mutableByteArrayPrimTyConKey :: Unique
- mutableArrayPrimTyConKey :: Unique
- weakPrimTyConKey :: Unique
- maybeTyConKey :: Unique
- foreignObjPrimTyConKey :: Unique
- listTyConKey :: Unique
- naturalTyConKey :: Unique
- integerTyConKey :: Unique
- int64TyConKey :: Unique
- int64PrimTyConKey :: Unique
- int32TyConKey :: Unique
- int32PrimTyConKey :: Unique
- int16TyConKey :: Unique
- int16PrimTyConKey :: Unique
- int8TyConKey :: Unique
- int8PrimTyConKey :: Unique
- intTyConKey :: Unique
- intPrimTyConKey :: Unique
- funTyConKey :: Unique
- floatTyConKey :: Unique
- floatPrimTyConKey :: Unique
- doubleTyConKey :: Unique
- doublePrimTyConKey :: Unique
- charTyConKey :: Unique
- charPrimTyConKey :: Unique
- byteArrayPrimTyConKey :: Unique
- boolTyConKey :: Unique
- arrayPrimTyConKey :: Unique
- addrPrimTyConKey :: Unique
- hasFieldClassNameKey :: Unique
- ipClassKey :: Unique
- monoidClassKey :: Unique
- semigroupClassKey :: Unique
- isLabelClassNameKey :: Unique
- ghciIoClassKey :: Unique
- knownSymbolClassNameKey :: Unique
- knownNatClassNameKey :: Unique
- selectorClassKey :: Unique
- constructorClassKey :: Unique
- datatypeClassKey :: Unique
- gen1ClassKey :: Unique
- genClassKey :: Unique
- traversableClassKey :: Unique
- foldableClassKey :: Unique
- applicativeClassKey :: Unique
- isStringClassKey :: Unique
- randomGenClassKey :: Unique
- randomClassKey :: Unique
- monadPlusClassKey :: Unique
- monadFailClassKey :: Unique
- monadFixClassKey :: Unique
- typeable7ClassKey :: Unique
- typeable6ClassKey :: Unique
- typeable5ClassKey :: Unique
- typeable4ClassKey :: Unique
- typeable3ClassKey :: Unique
- typeable2ClassKey :: Unique
- typeable1ClassKey :: Unique
- typeableClassKey :: Unique
- ixClassKey :: Unique
- showClassKey :: Unique
- realFracClassKey :: Unique
- realFloatClassKey :: Unique
- realClassKey :: Unique
- readClassKey :: Unique
- ordClassKey :: Unique
- numClassKey :: Unique
- functorClassKey :: Unique
- dataClassKey :: Unique
- monadClassKey :: Unique
- integralClassKey :: Unique
- fractionalClassKey :: Unique
- floatingClassKey :: Unique
- eqClassKey :: Unique
- enumClassKey :: Unique
- boundedClassKey :: Unique
- mk_known_key_name :: NameSpace -> Module -> FastString -> Unique -> Name
- dcQual :: Module -> FastString -> Unique -> Name
- clsQual :: Module -> FastString -> Unique -> Name
- tcQual :: Module -> FastString -> Unique -> Name
- varQual :: Module -> FastString -> Unique -> Name
- fingerprintDataConName :: Name
- fromStaticPtrName :: Name
- staticPtrDataConName :: Name
- staticPtrTyConName :: Name
- staticPtrInfoDataConName :: Name
- staticPtrInfoTyConName :: Name
- makeStaticName :: Name
- frontendPluginTyConName :: Name
- pluginTyConName :: Name
- pLUGINS :: Module
- srcLocDataConName :: Name
- pushCallStackName :: Name
- emptyCallStackName :: Name
- callStackTyConName :: Name
- hasFieldClassName :: Name
- ipClassName :: Name
- isLabelClassName :: Name
- knownSymbolClassName :: Name
- knownNatClassName :: Name
- isStringClassName :: Name
- randomGenClassName :: Name
- randomClassName :: Name
- monadPlusClassName :: Name
- toAnnotationWrapperName :: Name
- mzipName :: Name
- liftMName :: Name
- guardMName :: Name
- loopAName :: Name
- choiceAName :: Name
- appAName :: Name
- firstAName :: Name
- composeAName :: Name
- arrAName :: Name
- mfixName :: Name
- monadFixClassName :: Name
- newStablePtrName :: Name
- stablePtrTyConName :: Name
- funPtrTyConName :: Name
- ptrTyConName :: Name
- word64TyConName :: Name
- word32TyConName :: Name
- word16TyConName :: Name
- int64TyConName :: Name
- int32TyConName :: Name
- int16TyConName :: Name
- int8TyConName :: Name
- failIOName :: Name
- returnIOName :: Name
- bindIOName :: Name
- thenIOName :: Name
- ioDataConName :: Name
- ioTyConName :: Name
- ghciStepIoMName :: Name
- ghciIoClassName :: Name
- genericClassNames :: [Name]
- selectorClassName :: Name
- constructorClassName :: Name
- datatypeClassName :: Name
- gen1ClassName :: Name
- genClassName :: Name
- readClassName :: Name
- showClassName :: Name
- toListName :: Name
- fromListNName :: Name
- fromListName :: Name
- isListClassName :: Name
- zipName :: Name
- filterName :: Name
- concatName :: Name
- boundedClassName :: Name
- enumFromThenToName :: Name
- enumFromThenName :: Name
- enumFromToName :: Name
- enumFromName :: Name
- enumClassName :: Name
- traceName :: Name
- assertErrorName :: Name
- dataClassName :: Name
- toDynName :: Name
- typeErrorShowTypeDataConName :: Name
- typeErrorVAppendDataConName :: Name
- typeErrorAppendDataConName :: Name
- typeErrorTextDataConName :: Name
- errorMessageTypeErrorFamName :: Name
- starArrStarArrStarKindRepName :: Name
- starArrStarKindRepName :: Name
- starKindRepName :: Name
- trGhcPrimModuleName :: Name
- typeSymbolTypeRepName :: Name
- typeNatTypeRepName :: Name
- mkTrFunName :: Name
- mkTrAppName :: Name
- mkTrConName :: Name
- mkTrTypeName :: Name
- typeRepIdName :: Name
- someTypeRepDataConName :: Name
- someTypeRepTyConName :: Name
- typeRepTyConName :: Name
- typeableClassName :: Name
- typeLitNatDataConName :: Name
- typeLitSymbolDataConName :: Name
- typeLitSortTyConName :: Name
- kindRepTypeLitDDataConName :: Name
- kindRepTypeLitSDataConName :: Name
- kindRepTYPEDataConName :: Name
- kindRepFunDataConName :: Name
- kindRepAppDataConName :: Name
- kindRepVarDataConName :: Name
- kindRepTyConAppDataConName :: Name
- kindRepTyConName :: Name
- trTyConDataConName :: Name
- trTyConTyConName :: Name
- trNameDDataConName :: Name
- trNameSDataConName :: Name
- trNameTyConName :: Name
- trModuleDataConName :: Name
- trModuleTyConName :: Name
- ixClassName :: Name
- rationalToDoubleName :: Name
- rationalToFloatName :: Name
- realFloatClassName :: Name
- floatingClassName :: Name
- realToFracName :: Name
- fromIntegralName :: Name
- toRationalName :: Name
- toIntegerName :: Name
- fromRationalName :: Name
- fractionalClassName :: Name
- realFracClassName :: Name
- integralClassName :: Name
- realClassName :: Name
- ratioDataConName :: Name
- ratioTyConName :: Name
- rationalTyConName :: Name
- wordToNaturalName :: Name
- mkNaturalName :: Name
- timesNaturalName :: Name
- minusNaturalName :: Name
- plusNaturalName :: Name
- naturalToIntegerName :: Name
- naturalFromIntegerName :: Name
- naturalSDataConName :: Name
- naturalTyConName :: Name
- bitIntegerName :: Name
- shiftRIntegerName :: Name
- shiftLIntegerName :: Name
- complementIntegerName :: Name
- xorIntegerName :: Name
- orIntegerName :: Name
- andIntegerName :: Name
- lcmIntegerName :: Name
- gcdIntegerName :: Name
- decodeDoubleIntegerName :: Name
- encodeDoubleIntegerName :: Name
- encodeFloatIntegerName :: Name
- doubleFromIntegerName :: Name
- floatFromIntegerName :: Name
- modIntegerName :: Name
- divIntegerName :: Name
- remIntegerName :: Name
- quotIntegerName :: Name
- divModIntegerName :: Name
- quotRemIntegerName :: Name
- compareIntegerName :: Name
- geIntegerPrimName :: Name
- ltIntegerPrimName :: Name
- gtIntegerPrimName :: Name
- leIntegerPrimName :: Name
- signumIntegerName :: Name
- absIntegerName :: Name
- neqIntegerPrimName :: Name
- eqIntegerPrimName :: Name
- negateIntegerName :: Name
- minusIntegerName :: Name
- integerToIntName :: Name
- integerToWordName :: Name
- wordToIntegerName :: Name
- smallIntegerName :: Name
- timesIntegerName :: Name
- plusIntegerName :: Name
- int64ToIntegerName :: Name
- word64ToIntegerName :: Name
- integerToInt64Name :: Name
- integerToWord64Name :: Name
- mkIntegerName :: Name
- integerSDataConName :: Name
- integerTyConName :: Name
- negateName :: Name
- minusName :: Name
- fromIntegerName :: Name
- numClassName :: Name
- sndName :: Name
- fstName :: Name
- fromStringName :: Name
- opaqueTyConName :: Name
- breakpointCondName :: Name
- breakpointName :: Name
- assertName :: Name
- appendName :: Name
- mapName :: Name
- augmentName :: Name
- buildName :: Name
- foldrName :: Name
- otherwiseIdName :: Name
- dollarName :: Name
- groupWithName :: Name
- alternativeClassKey :: Unique
- thenAClassOpKey :: Unique
- pureAClassOpKey :: Unique
- apAClassOpKey :: Unique
- joinMIdKey :: Unique
- alternativeClassName :: Name
- joinMName :: Name
- mconcatName :: Name
- mappendName :: Name
- memptyName :: Name
- monoidClassName :: Name
- sappendName :: Name
- semigroupClassName :: Name
- traversableClassName :: Name
- foldableClassName :: Name
- thenAName :: Name
- pureAName :: Name
- apAName :: Name
- applicativeClassName :: Name
- failMName :: Name
- monadFailClassName :: Name
- returnMName :: Name
- bindMName :: Name
- thenMName :: Name
- monadClassName :: Name
- fmapName :: Name
- functorClassName :: Name
- geName :: Name
- ordClassName :: Name
- eqName :: Name
- eqClassName :: Name
- inlineIdName :: Name
- eqStringName :: Name
- unpackCStringUtf8Name :: Name
- unpackCStringFoldrName :: Name
- unpackCStringName :: Name
- modIntName :: Name
- divIntName :: Name
- metaSelDataConName :: Name
- metaConsDataConName :: Name
- metaDataDataConName :: Name
- decidedUnpackDataConName :: Name
- decidedStrictDataConName :: Name
- decidedLazyDataConName :: Name
- noSourceStrictnessDataConName :: Name
- sourceStrictDataConName :: Name
- sourceLazyDataConName :: Name
- noSourceUnpackednessDataConName :: Name
- sourceNoUnpackDataConName :: Name
- sourceUnpackDataConName :: Name
- notAssociativeDataConName :: Name
- rightAssociativeDataConName :: Name
- leftAssociativeDataConName :: Name
- infixIDataConName :: Name
- prefixIDataConName :: Name
- uWordTyConName :: Name
- uIntTyConName :: Name
- uFloatTyConName :: Name
- uDoubleTyConName :: Name
- uCharTyConName :: Name
- uAddrTyConName :: Name
- uRecTyConName :: Name
- rep1TyConName :: Name
- repTyConName :: Name
- noSelTyConName :: Name
- s1TyConName :: Name
- c1TyConName :: Name
- d1TyConName :: Name
- rec0TyConName :: Name
- sTyConName :: Name
- cTyConName :: Name
- dTyConName :: Name
- rTyConName :: Name
- compTyConName :: Name
- prodTyConName :: Name
- sumTyConName :: Name
- m1TyConName :: Name
- k1TyConName :: Name
- rec1TyConName :: Name
- par1TyConName :: Name
- u1TyConName :: Name
- v1TyConName :: Name
- rightDataConName :: Name
- leftDataConName :: Name
- eitherTyConName :: Name
- specTyConName :: Name
- ordGTDataConName :: Name
- ordEQDataConName :: Name
- ordLTDataConName :: Name
- orderingTyConName :: Name
- runRWName :: Name
- runMainIOName :: Name
- wildCardName :: Name
- dataQual_RDR :: Module -> FastString -> RdrName
- clsQual_RDR :: Module -> FastString -> RdrName
- tcQual_RDR :: Module -> FastString -> RdrName
- varQual_RDR :: Module -> FastString -> RdrName
- mappend_RDR :: RdrName
- mempty_RDR :: RdrName
- traverse_RDR :: RdrName
- all_RDR :: RdrName
- null_RDR :: RdrName
- foldMap_RDR :: RdrName
- foldable_foldr_RDR :: RdrName
- liftA2_RDR :: RdrName
- ap_RDR :: RdrName
- pure_RDR :: RdrName
- replace_RDR :: RdrName
- fmap_RDR :: RdrName
- uWordHash_RDR :: RdrName
- uIntHash_RDR :: RdrName
- uFloatHash_RDR :: RdrName
- uDoubleHash_RDR :: RdrName
- uCharHash_RDR :: RdrName
- uAddrHash_RDR :: RdrName
- uWordDataCon_RDR :: RdrName
- uIntDataCon_RDR :: RdrName
- uFloatDataCon_RDR :: RdrName
- uDoubleDataCon_RDR :: RdrName
- uCharDataCon_RDR :: RdrName
- uAddrDataCon_RDR :: RdrName
- notAssocDataCon_RDR :: RdrName
- rightAssocDataCon_RDR :: RdrName
- leftAssocDataCon_RDR :: RdrName
- infixDataCon_RDR :: RdrName
- prefixDataCon_RDR :: RdrName
- conIsRecord_RDR :: RdrName
- conFixity_RDR :: RdrName
- conName_RDR :: RdrName
- selName_RDR :: RdrName
- isNewtypeName_RDR :: RdrName
- packageName_RDR :: RdrName
- moduleName_RDR :: RdrName
- datatypeName_RDR :: RdrName
- to1_RDR :: RdrName
- to_RDR :: RdrName
- from1_RDR :: RdrName
- from_RDR :: RdrName
- unComp1_RDR :: RdrName
- unK1_RDR :: RdrName
- unRec1_RDR :: RdrName
- unPar1_RDR :: RdrName
- comp1DataCon_RDR :: RdrName
- prodDataCon_RDR :: RdrName
- r1DataCon_RDR :: RdrName
- l1DataCon_RDR :: RdrName
- m1DataCon_RDR :: RdrName
- k1DataCon_RDR :: RdrName
- rec1DataCon_RDR :: RdrName
- par1DataCon_RDR :: RdrName
- u1DataCon_RDR :: RdrName
- error_RDR :: RdrName
- undefined_RDR :: RdrName
- showParen_RDR :: RdrName
- showCommaSpace_RDR :: RdrName
- showSpace_RDR :: RdrName
- showString_RDR :: RdrName
- shows_RDR :: RdrName
- showsPrec_RDR :: RdrName
- pfail_RDR :: RdrName
- prec_RDR :: RdrName
- reset_RDR :: RdrName
- alt_RDR :: RdrName
- step_RDR :: RdrName
- symbol_RDR :: RdrName
- ident_RDR :: RdrName
- punc_RDR :: RdrName
- readSymField_RDR :: RdrName
- readFieldHash_RDR :: RdrName
- readField_RDR :: RdrName
- expectP_RDR :: RdrName
- lexP_RDR :: RdrName
- choose_RDR :: RdrName
- parens_RDR :: RdrName
- readPrec_RDR :: RdrName
- readListPrecDefault_RDR :: RdrName
- readListPrec_RDR :: RdrName
- readListDefault_RDR :: RdrName
- readList_RDR :: RdrName
- unsafeRangeSize_RDR :: RdrName
- unsafeIndex_RDR :: RdrName
- index_RDR :: RdrName
- inRange_RDR :: RdrName
- range_RDR :: RdrName
- maxBound_RDR :: RdrName
- minBound_RDR :: RdrName
- pred_RDR :: RdrName
- succ_RDR :: RdrName
- getTag_RDR :: RdrName
- not_RDR :: RdrName
- and_RDR :: RdrName
- compose_RDR :: RdrName
- toList_RDR :: RdrName
- fromListN_RDR :: RdrName
- fromList_RDR :: RdrName
- fromString_RDR :: RdrName
- stringTy_RDR :: RdrName
- fromIntegral_RDR :: RdrName
- toRational_RDR :: RdrName
- toInteger_RDR :: RdrName
- plus_RDR :: RdrName
- times_RDR :: RdrName
- minus_RDR :: RdrName
- fromRational_RDR :: RdrName
- fromInteger_RDR :: RdrName
- returnIO_RDR :: RdrName
- bindIO_RDR :: RdrName
- newStablePtr_RDR :: RdrName
- unpackCStringUtf8_RDR :: RdrName
- unpackCStringFoldr_RDR :: RdrName
- unpackCString_RDR :: RdrName
- eqString_RDR :: RdrName
- ioDataCon_RDR :: RdrName
- timesInteger_RDR :: RdrName
- plusInteger_RDR :: RdrName
- ratioDataCon_RDR :: RdrName
- enumFromThenTo_RDR :: RdrName
- enumFromThen_RDR :: RdrName
- enumFromTo_RDR :: RdrName
- enumFrom_RDR :: RdrName
- toEnum_RDR :: RdrName
- fromEnum_RDR :: RdrName
- right_RDR :: RdrName
- left_RDR :: RdrName
- failM_RDR :: RdrName
- bindM_RDR :: RdrName
- returnM_RDR :: RdrName
- build_RDR :: RdrName
- foldr_RDR :: RdrName
- append_RDR :: RdrName
- map_RDR :: RdrName
- monadClass_RDR :: RdrName
- enumClass_RDR :: RdrName
- ordClass_RDR :: RdrName
- numClass_RDR :: RdrName
- eqClass_RDR :: RdrName
- gtTag_RDR :: RdrName
- eqTag_RDR :: RdrName
- ltTag_RDR :: RdrName
- compare_RDR :: RdrName
- gt_RDR :: RdrName
- lt_RDR :: RdrName
- le_RDR :: RdrName
- ge_RDR :: RdrName
- eq_RDR :: RdrName
- main_RDR_Unqual :: RdrName
- mkMainModule_ :: ModuleName -> Module
- mkMainModule :: FastString -> Module
- mkThisGhcModule_ :: ModuleName -> Module
- mkThisGhcModule :: FastString -> Module
- mkBaseModule_ :: ModuleName -> Module
- mkBaseModule :: FastString -> Module
- mkIntegerModule :: FastString -> Module
- mkPrimModule :: FastString -> Module
- dATA_ARRAY_PARALLEL_PRIM_NAME :: ModuleName
- dATA_ARRAY_PARALLEL_NAME :: ModuleName
- mAIN_NAME :: ModuleName
- pRELUDE_NAME :: ModuleName
- mkInteractiveModule :: Int -> Module
- rOOT_MAIN :: Module
- gHC_RECORDS :: Module
- gHC_OVER_LABELS :: Module
- gHC_FINGERPRINT_TYPE :: Module
- gHC_STATICPTR_INTERNAL :: Module
- gHC_STATICPTR :: Module
- gHC_STACK_TYPES :: Module
- gHC_STACK :: Module
- gHC_SRCLOC :: Module
- dEBUG_TRACE :: Module
- dATA_COERCE :: Module
- dATA_TYPE_EQUALITY :: Module
- gHC_TYPENATS :: Module
- gHC_TYPELITS :: Module
- gHC_GENERICS :: Module
- cONTROL_EXCEPTION_BASE :: Module
- gHC_EXTS :: Module
- rANDOM :: Module
- gHC_DESUGAR :: Module
- cONTROL_APPLICATIVE :: Module
- aRROW :: Module
- mONAD_FAIL :: Module
- mONAD_ZIP :: Module
- mONAD_FIX :: Module
- mONAD :: Module
- gHC_WORD :: Module
- gHC_INT :: Module
- lEX :: Module
- rEAD_PREC :: Module
- gENERICS :: Module
- tYPEABLE_INTERNAL :: Module
- tYPEABLE :: Module
- dYNAMIC :: Module
- sYSTEM_IO :: Module
- gHC_TOP_HANDLER :: Module
- gHC_FLOAT :: Module
- gHC_REAL :: Module
- gHC_ERR :: Module
- gHC_PTR :: Module
- gHC_STABLE :: Module
- gHC_IX :: Module
- gHC_ST :: Module
- gHC_IO_Exception :: Module
- gHC_IO :: Module
- gHC_CONC :: Module
- dATA_TRAVERSABLE :: Module
- dATA_FOLDABLE :: Module
- dATA_STRING :: Module
- dATA_LIST :: Module
- dATA_EITHER :: Module
- dATA_TUPLE :: Module
- gHC_TUPLE :: Module
- gHC_LIST :: Module
- gHC_NATURAL :: Module
- gHC_INTEGER_TYPE :: Module
- gHC_MAYBE :: Module
- gHC_NUM :: Module
- gHC_READ :: Module
- gHC_SHOW :: Module
- gHC_GHCI_HELPERS :: Module
- gHC_GHCI :: Module
- gHC_ENUM :: Module
- gHC_BASE :: Module
- gHC_PRIMOPWRAPPERS :: Module
- gHC_CLASSES :: Module
- gHC_CSTRING :: Module
- gHC_MAGIC :: Module
- gHC_TYPES :: Module
- gHC_PRIM :: Module
- pRELUDE :: Module
- genericTyConNames :: [Name]
- basicKnownKeyNames :: [Name]
- isUnboundName :: Name -> Bool
- mkUnboundName :: OccName -> Name
- itName :: Unique -> SrcSpan -> Name
- allNameStrings :: [String]
- mAIN :: Module
- liftedTypeKindTyConKey :: Unique
- hasKey :: Uniquable a => a -> Unique -> Bool
- class Uniquable a where
- module RdrName
- module RnSplice
- module RnNames
- module TcEnv
- wrapIP :: Type -> CoercionR
- unwrapIP :: Type -> CoercionR
- pprHsWrapper :: HsWrapper -> (Bool -> SDoc) -> SDoc
- evVarsOfTerm :: EvTerm -> VarSet
- findNeededEvVars :: EvBindMap -> VarSet -> VarSet
- evTermCoercion :: EvTerm -> TcCoercion
- evTermCoercion_maybe :: EvTerm -> Maybe TcCoercion
- isEmptyTcEvBinds :: TcEvBinds -> Bool
- emptyTcEvBinds :: TcEvBinds
- mkEvScSelectors :: Class -> [TcType] -> [(TcPredType, EvExpr)]
- mkEvCast :: EvExpr -> TcCoercion -> EvTerm
- evTypeable :: Type -> EvTypeable -> EvTerm
- evSelector :: Id -> [Type] -> [EvExpr] -> EvExpr
- evDataConApp :: DataCon -> [Type] -> [EvExpr] -> EvTerm
- evDFunApp :: DFunId -> [Type] -> [EvExpr] -> EvTerm
- evCast :: EvExpr -> TcCoercion -> EvTerm
- evCoercion :: TcCoercion -> EvTerm
- evId :: EvId -> EvExpr
- mkGivenEvBind :: EvVar -> EvTerm -> EvBind
- mkWantedEvBind :: EvVar -> EvTerm -> EvBind
- evBindVar :: EvBind -> EvVar
- filterEvBindMap :: (EvBind -> Bool) -> EvBindMap -> EvBindMap
- foldEvBindMap :: (EvBind -> a -> a) -> a -> EvBindMap -> a
- evBindMapBinds :: EvBindMap -> Bag EvBind
- lookupEvBind :: EvBindMap -> EvVar -> Maybe EvBind
- isEmptyEvBindMap :: EvBindMap -> Bool
- extendEvBinds :: EvBindMap -> EvBind -> EvBindMap
- emptyEvBindMap :: EvBindMap
- isCoEvBindsVar :: EvBindsVar -> Bool
- collectHsWrapBinders :: HsWrapper -> ([Var], HsWrapper)
- isErasableHsWrapper :: HsWrapper -> Bool
- isIdHsWrapper :: HsWrapper -> Bool
- idHsWrapper :: HsWrapper
- mkWpLet :: TcEvBinds -> HsWrapper
- mkWpLams :: [Var] -> HsWrapper
- mkWpTyLams :: [TyVar] -> HsWrapper
- mkWpEvVarApps :: [EvVar] -> HsWrapper
- mkWpEvApps :: [EvTerm] -> HsWrapper
- mkWpTyApps :: [Type] -> HsWrapper
- mkWpCastN :: TcCoercionN -> HsWrapper
- mkWpCastR :: TcCoercionR -> HsWrapper
- mkWpFun :: HsWrapper -> HsWrapper -> TcType -> TcType -> SDoc -> HsWrapper
- maybeTcSubCo :: EqRel -> TcCoercion -> TcCoercion
- tcCoToMCo :: TcCoercion -> TcMCoercion
- isTcReflexiveCo :: TcCoercion -> Bool
- isTcGReflMCo :: TcMCoercion -> Bool
- isTcReflCo :: TcCoercion -> Bool
- coVarsOfTcCo :: TcCoercion -> TcTyCoVarSet
- tcCoercionRole :: TcCoercion -> Role
- tcCoercionKind :: TcCoercion -> Pair TcType
- mkTcCoVarCo :: CoVar -> TcCoercion
- mkTcKindCo :: TcCoercion -> TcCoercionN
- mkTcPhantomCo :: TcCoercionN -> TcType -> TcType -> TcCoercionP
- mkTcCoherenceRightCo :: Role -> TcType -> TcCoercionN -> TcCoercion -> TcCoercion
- mkTcCoherenceLeftCo :: Role -> TcType -> TcCoercionN -> TcCoercion -> TcCoercion
- mkTcGReflLeftCo :: Role -> TcType -> TcCoercionN -> TcCoercion
- mkTcGReflRightCo :: Role -> TcType -> TcCoercionN -> TcCoercion
- mkTcAxiomRuleCo :: CoAxiomRule -> [TcCoercion] -> TcCoercionR
- tcDowngradeRole :: Role -> Role -> TcCoercion -> TcCoercion
- mkTcSubCo :: TcCoercionN -> TcCoercionR
- mkTcLRCo :: LeftOrRight -> TcCoercion -> TcCoercion
- mkTcNthCo :: Role -> Int -> TcCoercion -> TcCoercion
- mkTcForAllCos :: [(TyVar, TcCoercionN)] -> TcCoercion -> TcCoercion
- mkTcForAllCo :: TyVar -> TcCoercionN -> TcCoercion -> TcCoercion
- mkTcUnbranchedAxInstCo :: CoAxiom Unbranched -> [TcType] -> [TcCoercion] -> TcCoercionR
- mkTcAxInstCo :: forall (br :: BranchFlag). Role -> CoAxiom br -> BranchIndex -> [TcType] -> [TcCoercion] -> TcCoercion
- mkTcFunCo :: Role -> TcCoercion -> TcCoercion -> TcCoercion
- mkTcAppCo :: TcCoercion -> TcCoercionN -> TcCoercion
- mkTcTyConAppCo :: Role -> TyCon -> [TcCoercion] -> TcCoercion
- mkTcRepReflCo :: TcType -> TcCoercionR
- mkTcNomReflCo :: TcType -> TcCoercionN
- mkTcTransCo :: TcCoercion -> TcCoercion -> TcCoercion
- mkTcSymCo :: TcCoercion -> TcCoercion
- mkTcReflCo :: Role -> TcType -> TcCoercion
- type TcCoercion = Coercion
- type TcCoercionN = CoercionN
- type TcCoercionR = CoercionR
- type TcCoercionP = CoercionP
- type TcMCoercion = MCoercion
- data HsWrapper
- data TcEvBinds
- = TcEvBinds EvBindsVar
- | EvBinds (Bag EvBind)
- data EvBindsVar
- newtype EvBindMap = EvBindMap {}
- data EvBind = EvBind {}
- data EvTerm
- type EvExpr = CoreExpr
- data EvTypeable
- data EvCallStack
- data CoercionHole
- data Role
- pickLR :: LeftOrRight -> (a, a) -> a
- data LeftOrRight
- isNextArgVisible :: TcType -> Bool
- isNextTyConArgVisible :: TyCon -> [Type] -> Bool
- tcTyConVisibilities :: TyCon -> [Bool]
- sizeTypes :: [Type] -> TypeSize
- sizeType :: Type -> TypeSize
- isFunPtrTy :: Type -> Bool
- isFFIPrimResultTy :: DynFlags -> Type -> Validity
- isFFIPrimArgumentTy :: DynFlags -> Type -> Validity
- isFFILabelTy :: Type -> Validity
- isFFIDynTy :: Type -> Type -> Validity
- isFFIExportResultTy :: Type -> Validity
- isFFIImportResultTy :: DynFlags -> Type -> Validity
- isFFIExternalTy :: Type -> Validity
- isFFIArgumentTy :: DynFlags -> Safety -> Type -> Validity
- isFFITy :: Type -> Bool
- tcSplitIOType_maybe :: Type -> Maybe (TyCon, Type)
- deNoteType :: Type -> Type
- isAlmostFunctionFree :: TcType -> Bool
- isRigidTy :: TcType -> Bool
- isTyVarHead :: TcTyVar -> TcType -> Bool
- isCallStackPred :: Class -> [Type] -> Maybe FastString
- isCallStackTy :: Type -> Bool
- isStringTy :: Type -> Bool
- isFloatingTy :: Type -> Bool
- isCharTy :: Type -> Bool
- isUnitTy :: Type -> Bool
- isBoolTy :: Type -> Bool
- isWordTy :: Type -> Bool
- isIntTy :: Type -> Bool
- isIntegerTy :: Type -> Bool
- isDoubleTy :: Type -> Bool
- isFloatTy :: Type -> Bool
- isOverloadedTy :: Type -> Bool
- isRhoExpTy :: ExpType -> Bool
- isRhoTy :: TcType -> Bool
- isSigmaTy :: TcType -> Bool
- isInsolubleOccursCheck :: EqRel -> TcTyVar -> TcType -> Bool
- isImprovementPred :: PredType -> Bool
- immSuperClasses :: Class -> [Type] -> [PredType]
- transSuperClasses :: PredType -> [PredType]
- mkMinimalBySCs :: (a -> PredType) -> [a] -> [a]
- pickCapturedPreds :: TyVarSet -> TcThetaType -> TcThetaType
- boxEqPred :: EqRel -> Type -> Type -> Maybe (Class, [Type])
- pickQuantifiablePreds :: TyVarSet -> TcThetaType -> TcThetaType
- evVarPred :: EvVar -> PredType
- hasTyVarHead :: Type -> Bool
- checkValidClsArgs :: Bool -> Class -> [KindOrType] -> Bool
- isTyVarClassPred :: PredType -> Bool
- pickyEqType :: TcType -> TcType -> Bool
- tcEqTypeVis :: TcType -> TcType -> Bool
- tcEqTypeNoKindCheck :: TcType -> TcType -> Bool
- tcEqType :: HasDebugCallStack => TcType -> TcType -> Bool
- tcEqKind :: HasDebugCallStack => TcKind -> TcKind -> Bool
- tcSplitMethodTy :: Type -> ([TyVar], PredType, Type)
- tcSplitDFunHead :: Type -> (Class, [Type])
- tcSplitDFunTy :: Type -> ([TyVar], [Type], Class, [Type])
- tcIsTyVarTy :: Type -> Bool
- tcGetTyVar :: String -> Type -> TyVar
- tcGetTyVar_maybe :: Type -> Maybe TyVar
- tcGetCastedTyVar_maybe :: Type -> Maybe (TyVar, CoercionN)
- tcRepGetNumAppTys :: Type -> Arity
- tcSplitAppTys :: Type -> (Type, [Type])
- tcSplitAppTy :: Type -> (Type, Type)
- tcSplitAppTy_maybe :: Type -> Maybe (Type, Type)
- tcFunResultTyN :: HasDebugCallStack => Arity -> Type -> Type
- tcFunResultTy :: Type -> Type
- tcFunArgTy :: Type -> Type
- tcSplitFunTysN :: Arity -> TcRhoType -> Either Arity ([TcSigmaType], TcSigmaType)
- tcSplitFunTy_maybe :: Type -> Maybe (Type, Type)
- tcSplitFunTys :: Type -> ([Type], Type)
- tcSplitTyConApp :: Type -> (TyCon, [Type])
- tcTyConAppArgs :: Type -> [Type]
- tcTyConAppTyCon_maybe :: Type -> Maybe TyCon
- tcTyConAppTyCon :: Type -> TyCon
- tcDeepSplitSigmaTy_maybe :: TcSigmaType -> Maybe ([TcType], [TyVar], ThetaType, TcSigmaType)
- tcSplitNestedSigmaTys :: Type -> ([TyVar], ThetaType, Type)
- tcSplitSigmaTy :: Type -> ([TyVar], ThetaType, Type)
- tcSplitPhiTy :: Type -> (ThetaType, Type)
- tcSplitPredFunTy_maybe :: Type -> Maybe (PredType, Type)
- tcIsForAllTy :: Type -> Bool
- tcSplitForAllVarBndrs :: Type -> ([TyVarBinder], Type)
- tcSplitForAllTysSameVis :: ArgFlag -> Type -> ([TyVar], Type)
- tcSplitForAllTys :: Type -> ([TyVar], Type)
- tcSplitForAllTy_maybe :: Type -> Maybe (TyVarBinder, Type)
- tcSplitPiTy_maybe :: Type -> Maybe (TyBinder, Type)
- tcSplitPiTys :: Type -> ([TyBinder], Type)
- mkTcCastTy :: Type -> Coercion -> Type
- mkTcAppTy :: Type -> Type -> Type
- mkTcAppTys :: Type -> [Type] -> Type
- getDFunTyKey :: Type -> OccName
- mkPhiTy :: [PredType] -> Type -> Type
- mkSpecSigmaTy :: [TyVar] -> [PredType] -> Type -> Type
- mkInfSigmaTy :: [TyCoVar] -> [PredType] -> Type -> Type
- mkSigmaTy :: [TyCoVarBinder] -> [PredType] -> Type -> Type
- findDupTyVarTvs :: [(Name, TcTyVar)] -> [(Name, Name)]
- mkTyVarNamePairs :: [TyVar] -> [(Name, TyVar)]
- isRuntimeUnkSkol :: TyVar -> Bool
- isIndirect :: MetaDetails -> Bool
- isFlexi :: MetaDetails -> Bool
- isTyVarTyVar :: Var -> Bool
- setMetaTyVarTcLevel :: TcTyVar -> TcLevel -> TcTyVar
- metaTyVarRef :: TyVar -> IORef MetaDetails
- metaTyVarTcLevel_maybe :: TcTyVar -> Maybe TcLevel
- metaTyVarTcLevel :: TcTyVar -> TcLevel
- metaTyVarInfo :: TcTyVar -> MetaInfo
- isMetaTyVarTy :: TcType -> Bool
- isAmbiguousTyVar :: TcTyVar -> Bool
- isMetaTyVar :: TcTyVar -> Bool
- isOverlappableTyVar :: TcTyVar -> Bool
- isSkolemTyVar :: TcTyVar -> Bool
- isFlattenTyVar :: TcTyVar -> Bool
- isFskTyVar :: TcTyVar -> Bool
- isFmvTyVar :: TcTyVar -> Bool
- isTyConableTyVar :: TcTyVar -> Bool
- isImmutableTyVar :: TyVar -> Bool
- isFloatedTouchableMetaTyVar :: TcLevel -> TcTyVar -> Bool
- isTouchableMetaTyVar :: TcLevel -> TcTyVar -> Bool
- tcIsTcTyVar :: TcTyVar -> Bool
- anyRewritableTyVar :: Bool -> EqRel -> (EqRel -> TcTyVar -> Bool) -> TcType -> Bool
- isTyFamFree :: Type -> Bool
- tcTyConAppTyFamInstsAndVis :: TyCon -> [Type] -> [(Bool, TyCon, [Type])]
- tcTyFamInstsAndVis :: Type -> [(Bool, TyCon, [Type])]
- tcTyFamInsts :: Type -> [(TyCon, [Type])]
- promoteSkolemsX :: TcLevel -> TCvSubst -> [TcTyVar] -> (TCvSubst, [TcTyVar])
- promoteSkolemX :: TcLevel -> TCvSubst -> TcTyVar -> (TCvSubst, TcTyVar)
- promoteSkolem :: TcLevel -> TcTyVar -> TcTyVar
- tcTypeLevel :: TcType -> TcLevel
- tcTyVarLevel :: TcTyVar -> TcLevel
- sameDepthAs :: TcLevel -> TcLevel -> Bool
- strictlyDeeperThan :: TcLevel -> TcLevel -> Bool
- pushTcLevel :: TcLevel -> TcLevel
- isTopTcLevel :: TcLevel -> Bool
- topTcLevel :: TcLevel
- maxTcLevel :: TcLevel -> TcLevel -> TcLevel
- superSkolemTv :: TcTyVarDetails
- mkSynFunTys :: [SyntaxOpType] -> ExpType -> SyntaxOpType
- synKnownType :: TcType -> SyntaxOpType
- mkCheckExpType :: TcType -> ExpType
- type TcCoVar = CoVar
- type TcType = Type
- type TcTyCoVar = Var
- type TcTyVarBinder = TyVarBinder
- type TcTyCon = TyCon
- type TcPredType = PredType
- type TcThetaType = ThetaType
- type TcSigmaType = TcType
- type TcRhoType = TcType
- type TcTauType = TcType
- type TcKind = Kind
- type TcTyVarSet = TyVarSet
- type TcTyCoVarSet = TyCoVarSet
- type TcDTyVarSet = DTyVarSet
- type TcDTyCoVarSet = DTyCoVarSet
- data ExpType
- = Check TcType
- | Infer !InferResult
- data InferResult = IR {}
- type ExpSigmaType = ExpType
- type ExpRhoType = ExpType
- data SyntaxOpType
- data MetaInfo
- = TauTv
- | TyVarTv
- | FlatMetaTv
- | FlatSkolTv
- newtype TcLevel = TcLevel Int
- type TypeSize = IntWithInf
- orphNamesOfCoCon :: forall (br :: BranchFlag). CoAxiom br -> NameSet
- orphNamesOfCo :: Coercion -> NameSet
- orphNamesOfTypes :: [Type] -> NameSet
- orphNamesOfType :: Type -> NameSet
- hasIPPred :: PredType -> Bool
- isIPPred :: PredType -> Bool
- isEqPrimPred :: PredType -> Bool
- isEqPred :: PredType -> Bool
- isClassPred :: PredType -> Bool
- isEqPredClass :: Class -> Bool
- mkClassPred :: Class -> [Type] -> PredType
- classifiesTypeWithValues :: Kind -> Bool
- isKindLevPoly :: Kind -> Bool
- tcTypeKind :: HasDebugCallStack => Type -> Kind
- nonDetCmpTypes :: [Type] -> [Type] -> Ordering
- nonDetCmpType :: Type -> Type -> Ordering
- eqTypes :: [Type] -> [Type] -> Bool
- eqTypeX :: RnEnv2 -> Type -> Type -> Bool
- isPrimitiveType :: Type -> Bool
- isUnboxedTupleType :: Type -> Bool
- isUnliftedType :: HasDebugCallStack => Type -> Bool
- closeOverKindsDSet :: DTyVarSet -> DTyVarSet
- closeOverKinds :: TyVarSet -> TyVarSet
- isTauTy :: Type -> Bool
- mkSpecForAllTys :: [TyVar] -> Type -> Type
- mkInvForAllTys :: [TyVar] -> Type -> Type
- mkTyCoInvForAllTys :: [TyCoVar] -> Type -> Type
- mkInvForAllTy :: TyVar -> Type -> Type
- mkTyCoInvForAllTy :: TyCoVar -> Type -> Type
- nextRole :: Type -> Role
- tcSplitTyConApp_maybe :: HasCallStack => Type -> Maybe (TyCon, [Type])
- mkTyConApp :: TyCon -> [Type] -> Type
- tcRepSplitAppTy_maybe :: Type -> Maybe (Type, Type)
- mkAppTys :: Type -> [Type] -> Type
- isTyVarTy :: Type -> Bool
- getTyVar :: String -> Type -> TyVar
- isRuntimeRepVar :: TyVar -> Bool
- isUnliftedTypeKind :: Kind -> Bool
- substTyVarBndr :: HasCallStack => TCvSubst -> TyVar -> (TCvSubst, TyVar)
- substCoUnchecked :: TCvSubst -> Coercion -> Coercion
- lookupTyVar :: TCvSubst -> TyVar -> Maybe Type
- substThetaUnchecked :: TCvSubst -> ThetaType -> ThetaType
- substTheta :: HasCallStack => TCvSubst -> ThetaType -> ThetaType
- substTysUnchecked :: TCvSubst -> [Type] -> [Type]
- substTys :: HasCallStack => TCvSubst -> [Type] -> [Type]
- substTyUnchecked :: TCvSubst -> Type -> Type
- substTy :: HasCallStack => TCvSubst -> Type -> Type
- substTyAddInScope :: TCvSubst -> Type -> Type
- substTyWithCoVars :: [CoVar] -> [Coercion] -> Type -> Type
- substCoWithUnchecked :: [TyVar] -> [Type] -> Coercion -> Coercion
- substTyWithUnchecked :: [TyVar] -> [Type] -> Type -> Type
- substTyWith :: HasCallStack => [TyVar] -> [Type] -> Type -> Type
- zipCoEnv :: HasDebugCallStack => [CoVar] -> [Coercion] -> CvSubstEnv
- zipTyEnv :: HasDebugCallStack => [TyVar] -> [Type] -> TvSubstEnv
- mkTvSubstPrs :: [(TyVar, Type)] -> TCvSubst
- zipTvSubst :: HasDebugCallStack => [TyVar] -> [Type] -> TCvSubst
- unionTCvSubst :: TCvSubst -> TCvSubst -> TCvSubst
- extendTvSubstAndInScope :: TCvSubst -> TyVar -> Type -> TCvSubst
- extendTvSubst :: TCvSubst -> TyVar -> Type -> TCvSubst
- extendTCvSubst :: TCvSubst -> TyCoVar -> Type -> TCvSubst
- extendTCvInScopeSet :: TCvSubst -> VarSet -> TCvSubst
- extendTCvInScopeList :: TCvSubst -> [Var] -> TCvSubst
- extendTCvInScope :: TCvSubst -> Var -> TCvSubst
- setTvSubstEnv :: TCvSubst -> TvSubstEnv -> TCvSubst
- notElemTCvSubst :: Var -> TCvSubst -> Bool
- isInScope :: Var -> TCvSubst -> Bool
- getTCvInScope :: TCvSubst -> InScopeSet
- getTvSubstEnv :: TCvSubst -> TvSubstEnv
- mkTvSubst :: InScopeSet -> TvSubstEnv -> TCvSubst
- mkTCvSubst :: InScopeSet -> (TvSubstEnv, CvSubstEnv) -> TCvSubst
- mkEmptyTCvSubst :: InScopeSet -> TCvSubst
- emptyTCvSubst :: TCvSubst
- data TCvSubst = TCvSubst InScopeSet TvSubstEnv CvSubstEnv
- type TvSubstEnv = TyVarEnv Type
- pprTypeApp :: TyCon -> [Type] -> SDoc
- pprTCvBndr :: TyCoVarBinder -> SDoc
- pprTCvBndrs :: [TyCoVarBinder] -> SDoc
- pprSigmaType :: Type -> SDoc
- pprThetaArrowTy :: ThetaType -> SDoc
- pprParendTheta :: ThetaType -> SDoc
- pprTheta :: ThetaType -> SDoc
- pprClassPred :: Class -> [Type] -> SDoc
- pprParendKind :: Kind -> SDoc
- pprParendType :: Type -> SDoc
- scopedSort :: [TyCoVar] -> [TyCoVar]
- noFreeVarsOfType :: Type -> Bool
- tyCoFVsOfTypes :: [Type] -> FV
- tyCoFVsOfType :: Type -> FV
- exactTyCoVarsOfTypes :: [Type] -> TyVarSet
- exactTyCoVarsOfType :: Type -> TyCoVarSet
- tyCoVarsOfTypesList :: [Type] -> [TyCoVar]
- tyCoVarsOfTypesDSet :: [Type] -> DTyCoVarSet
- tyCoVarsOfTypeList :: Type -> [TyCoVar]
- tyCoVarsOfTypeDSet :: Type -> DTyCoVarSet
- tyCoVarsOfTypes :: [Type] -> TyCoVarSet
- tyCoVarsOfType :: Type -> TyCoVarSet
- mkTyConTy :: TyCon -> Type
- mkForAllTys :: [TyCoVarBinder] -> Type -> Type
- mkInvisFunTys :: [Type] -> Type -> Type
- mkInvisFunTy :: Type -> Type -> Type
- mkVisFunTy :: Type -> Type -> Type
- mkTyCoVarTys :: [TyCoVar] -> [Type]
- mkTyCoVarTy :: TyCoVar -> Type
- mkTyVarTys :: [TyVar] -> [Type]
- mkTyVarTy :: TyVar -> Type
- isVisibleBinder :: TyCoBinder -> Bool
- isInvisibleBinder :: TyCoBinder -> Bool
- tyThingCategory :: TyThing -> String
- pprTyThingCategory :: TyThing -> SDoc
- type KnotTied ty = ty
- isPredTy :: HasDebugCallStack => Type -> Bool
- mkAppTy :: Type -> Type -> Type
- eqType :: Type -> Type -> Bool
- coreView :: Type -> Maybe Type
- tcView :: Type -> Maybe Type
- isLiftedTypeKind :: Kind -> Bool
- isTauTyCon :: TyCon -> Bool
- type TcTyVar = Var
- data ForallVisFlag
- liftedTypeKind :: Kind
- constraintKind :: Kind
- pprType :: Type -> SDoc
- pprKind :: Kind -> SDoc
- mkForAllTy :: TyCoVar -> ArgFlag -> Type -> Type
- data Type
- data TyCoBinder
- type PredType = Type
- type Kind = Type
- type ThetaType = [PredType]
- data ArgFlag
- data AnonArgFlag
- pprTcTyVarDetails :: TcTyVarDetails -> SDoc
- vanillaSkolemTv :: TcTyVarDetails
- data MetaDetails
- data TcTyVarDetails
- module TcRnTypes
- module TcRnDriver
- mapAndUnzipM :: Applicative m => (a -> m (b, c)) -> [a] -> m ([b], [c])
- foldlM :: (Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m b
- getCCIndexM :: ContainsCostCentreState gbl => FastString -> TcRnIf gbl lcl CostCentreIndex
- setImplicitEnvM :: TypeEnv -> IfL a -> IfL a
- forkM :: SDoc -> IfL a -> IfL a
- forkM_maybe :: SDoc -> IfL a -> IfL (Maybe a)
- failIfM :: MsgDoc -> IfL a
- getIfModule :: IfL Module
- initIfaceLclWithSubst :: Module -> SDoc -> Bool -> NameShape -> IfL a -> IfM lcl a
- initIfaceLcl :: Module -> SDoc -> Bool -> IfL a -> IfM lcl a
- initIfaceCheck :: SDoc -> HscEnv -> IfG a -> IO a
- initIfaceLoad :: HscEnv -> IfG a -> IO a
- initIfaceTcRn :: IfG a -> TcRn a
- mkIfLclEnv :: Module -> SDoc -> Bool -> IfLclEnv
- setLocalRdrEnv :: LocalRdrEnv -> RnM a -> RnM a
- getLocalRdrEnv :: RnM LocalRdrEnv
- fixSafeInstances :: SafeHaskellMode -> [ClsInst] -> [ClsInst]
- finalSafeMode :: DynFlags -> TcGblEnv -> IO SafeHaskellMode
- recordUnsafeInfer :: WarningMessages -> TcM ()
- addModFinalizersWithLclEnv :: ThModFinalizers -> TcM ()
- setStage :: ThStage -> TcM a -> TcRn a
- getStageAndBindLevel :: Name -> TcRn (Maybe (TopLevelFlag, ThLevel, ThStage))
- getStage :: TcM ThStage
- keepAlive :: Name -> TcRn ()
- getTopLevelSpliceLocs :: TcM (Set RealSrcSpan)
- recordTopLevelSpliceLoc :: SrcSpan -> TcM ()
- recordThSpliceUse :: TcM ()
- recordThUse :: TcM ()
- emitNamedWildCardHoleConstraints :: [(Name, TcTyVar)] -> TcM ()
- emitAnonWildCardHoleConstraint :: TcTyVar -> TcM ()
- traceTcConstraints :: String -> TcM ()
- setLclTypeEnv :: TcLclEnv -> TcM a -> TcM a
- getLclTypeEnv :: TcM TcTypeEnv
- isTouchableTcM :: TcTyVar -> TcM Bool
- setTcLevel :: TcLevel -> TcM a -> TcM a
- getTcLevel :: TcM TcLevel
- pushTcLevelsM :: Int -> TcM a -> TcM (a, TcLevel)
- pushTcLevelM :: TcM a -> TcM (TcLevel, a)
- pushTcLevelM_ :: TcM a -> TcM a
- pushLevelAndCaptureConstraints :: TcM a -> TcM (TcLevel, WantedConstraints, a)
- discardConstraints :: TcM a -> TcM a
- emitInsoluble :: Ct -> TcM ()
- emitImplications :: Bag Implication -> TcM ()
- emitImplication :: Implication -> TcM ()
- emitSimples :: Cts -> TcM ()
- emitSimple :: Ct -> TcM ()
- emitConstraints :: WantedConstraints -> TcM ()
- emitStaticConstraints :: WantedConstraints -> TcM ()
- setConstraintVar :: TcRef WantedConstraints -> TcM a -> TcM a
- getConstraintVar :: TcM (TcRef WantedConstraints)
- chooseUniqueOccTc :: (OccSet -> OccName) -> TcM OccName
- addTcEvBind :: EvBindsVar -> EvBind -> TcM ()
- setTcEvBindsMap :: EvBindsVar -> EvBindMap -> TcM ()
- getTcEvBindsMap :: EvBindsVar -> TcM EvBindMap
- getTcEvTyCoVars :: EvBindsVar -> TcM TyCoVarSet
- cloneEvBindsVar :: EvBindsVar -> TcM EvBindsVar
- newNoTcEvBinds :: TcM EvBindsVar
- newTcEvBinds :: TcM EvBindsVar
- addTopEvBinds :: Bag EvBind -> TcM a -> TcM a
- debugTc :: TcM () -> TcM ()
- mkErrInfo :: TidyEnv -> [ErrCtxt] -> TcM SDoc
- add_warn :: WarnReason -> MsgDoc -> MsgDoc -> TcRn ()
- addWarnAt :: WarnReason -> SrcSpan -> MsgDoc -> TcRn ()
- addWarn :: WarnReason -> MsgDoc -> TcRn ()
- addWarnTcM :: WarnReason -> (TidyEnv, MsgDoc) -> TcM ()
- addWarnTc :: WarnReason -> MsgDoc -> TcM ()
- warnTcM :: WarnReason -> Bool -> (TidyEnv, MsgDoc) -> TcM ()
- warnTc :: WarnReason -> Bool -> MsgDoc -> TcM ()
- warnIf :: Bool -> MsgDoc -> TcRn ()
- warnIfFlag :: WarningFlag -> Bool -> MsgDoc -> TcRn ()
- failIfTcM :: Bool -> (TidyEnv, MsgDoc) -> TcM ()
- failIfTc :: Bool -> MsgDoc -> TcM ()
- checkTcM :: Bool -> (TidyEnv, MsgDoc) -> TcM ()
- checkTc :: Bool -> MsgDoc -> TcM ()
- failWithTcM :: (TidyEnv, MsgDoc) -> TcM a
- failWithTc :: MsgDoc -> TcM a
- mkErrTc :: MsgDoc -> TcM ErrMsg
- mkErrTcM :: (TidyEnv, MsgDoc) -> TcM ErrMsg
- addErrTcM :: (TidyEnv, MsgDoc) -> TcM ()
- addErrsTc :: [MsgDoc] -> TcM ()
- addErrTc :: MsgDoc -> TcM ()
- tryTcDiscardingErrs :: TcM r -> TcM r -> TcM r
- discardErrs :: TcRn a -> TcRn a
- tryTc :: TcRn a -> TcRn (Maybe a, Messages)
- foldAndRecoverM :: (b -> a -> TcRn b) -> b -> [a] -> TcRn b
- mapAndReportM :: (a -> TcRn b) -> [a] -> TcRn [b]
- mapAndRecoverM :: (a -> TcRn b) -> [a] -> TcRn [b]
- recoverM :: TcRn r -> TcRn r -> TcRn r
- attemptM :: TcRn r -> TcRn (Maybe r)
- captureConstraints :: TcM a -> TcM (a, WantedConstraints)
- tryCaptureConstraints :: TcM a -> TcM (Maybe a, WantedConstraints)
- askNoErrs :: TcRn a -> TcRn (a, Bool)
- setCtLocM :: CtLoc -> TcM a -> TcM a
- getCtLocM :: CtOrigin -> Maybe TypeOrKind -> TcM CtLoc
- popErrCtxt :: TcM a -> TcM a
- updCtxt :: ([ErrCtxt] -> [ErrCtxt]) -> TcM a -> TcM a
- addLandmarkErrCtxtM :: (TidyEnv -> TcM (TidyEnv, MsgDoc)) -> TcM a -> TcM a
- addLandmarkErrCtxt :: MsgDoc -> TcM a -> TcM a
- addErrCtxtM :: (TidyEnv -> TcM (TidyEnv, MsgDoc)) -> TcM a -> TcM a
- addErrCtxt :: MsgDoc -> TcM a -> TcM a
- setErrCtxt :: [ErrCtxt] -> TcM a -> TcM a
- getErrCtxt :: TcM [ErrCtxt]
- failIfErrsM :: TcRn ()
- ifErrsM :: TcRn r -> TcRn r -> TcRn r
- whenNoErrs :: TcM () -> TcM ()
- checkNoErrs :: TcM r -> TcM r
- reportWarning :: WarnReason -> ErrMsg -> TcRn ()
- reportError :: ErrMsg -> TcRn ()
- reportErrors :: [ErrMsg] -> TcM ()
- addLongErrAt :: SrcSpan -> MsgDoc -> MsgDoc -> TcRn ()
- mkErrDocAt :: SrcSpan -> ErrDoc -> TcRn ErrMsg
- mkLongErrAt :: SrcSpan -> MsgDoc -> MsgDoc -> TcRn ErrMsg
- discardWarnings :: TcRn a -> TcRn a
- addMessages :: Messages -> TcRn ()
- checkErr :: Bool -> MsgDoc -> TcRn ()
- addErrs :: [(SrcSpan, MsgDoc)] -> TcRn ()
- addErrAt :: SrcSpan -> MsgDoc -> TcRn ()
- failAt :: SrcSpan -> MsgDoc -> TcRn a
- failWith :: MsgDoc -> TcRn a
- addErr :: MsgDoc -> TcRn ()
- setErrsVar :: TcRef Messages -> TcRn a -> TcRn a
- getErrsVar :: TcRn (TcRef Messages)
- wrapLocM_ :: HasSrcSpan a => (SrcSpanLess a -> TcM ()) -> a -> TcM ()
- wrapLocSndM :: (HasSrcSpan a, HasSrcSpan c) => (SrcSpanLess a -> TcM (b, SrcSpanLess c)) -> a -> TcM (b, c)
- wrapLocFstM :: (HasSrcSpan a, HasSrcSpan b) => (SrcSpanLess a -> TcM (SrcSpanLess b, c)) -> a -> TcM (b, c)
- wrapLocM :: (HasSrcSpan a, HasSrcSpan b) => (SrcSpanLess a -> TcM (SrcSpanLess b)) -> a -> TcM b
- addLocM :: HasSrcSpan a => (SrcSpanLess a -> TcM b) -> a -> TcM b
- setSrcSpan :: SrcSpan -> TcRn a -> TcRn a
- getSrcSpanM :: TcRn SrcSpan
- addDependentFiles :: [FilePath] -> TcRn ()
- getDeclaredDefaultTys :: TcRn (Maybe [Type])
- getRecFieldEnv :: TcRn RecFieldEnv
- extendFixityEnv :: [(Name, FixItem)] -> RnM a -> RnM a
- getFixityEnv :: TcRn FixityEnv
- getImports :: TcRn ImportAvails
- getRdrEnvs :: TcRn (GlobalRdrEnv, LocalRdrEnv)
- getGlobalRdrEnv :: TcRn GlobalRdrEnv
- tcSelfBootInfo :: TcRn SelfBootInfo
- tcIsHsig :: TcRn Bool
- tcIsHsBootOrSig :: TcRn Bool
- getInteractivePrintName :: TcRn Name
- getGHCiMonad :: TcRn Name
- getIsGHCi :: TcRn Bool
- traceOptIf :: DumpFlag -> SDoc -> TcRnIf m n ()
- traceHiDiffs :: SDoc -> TcRnIf m n ()
- traceIf :: SDoc -> TcRnIf m n ()
- printForUserTcRn :: SDoc -> TcRn ()
- getPrintUnqualified :: DynFlags -> TcRn PrintUnqualified
- traceTcRnWithStyle :: PprStyle -> DynFlags -> DumpFlag -> SDoc -> TcRn ()
- traceTcRnForUser :: DumpFlag -> SDoc -> TcRn ()
- traceTcRn :: DumpFlag -> SDoc -> TcRn ()
- traceOptTcRn :: DumpFlag -> SDoc -> TcRn ()
- traceRn :: String -> SDoc -> TcRn ()
- traceTc :: String -> SDoc -> TcRn ()
- updTcRef :: TcRef a -> (a -> a) -> TcRnIf gbl lcl ()
- writeTcRef :: TcRef a -> a -> TcRnIf gbl lcl ()
- readTcRef :: TcRef a -> TcRnIf gbl lcl a
- newTcRef :: a -> TcRnIf gbl lcl (TcRef a)
- newSysLocalIds :: FastString -> [TcType] -> TcRnIf gbl lcl [TcId]
- newSysLocalId :: FastString -> TcType -> TcRnIf gbl lcl TcId
- newSysName :: OccName -> TcRnIf gbl lcl Name
- newNameAt :: OccName -> SrcSpan -> TcM Name
- newName :: OccName -> TcM Name
- cloneLocalName :: Name -> TcM Name
- newUniqueSupply :: TcRnIf gbl lcl UniqSupply
- newUnique :: TcRnIf gbl lcl Unique
- escapeArrowScope :: TcM a -> TcM a
- newArrowScope :: TcM a -> TcM a
- withException :: TcRnIf gbl lcl (MaybeErr MsgDoc a) -> TcRnIf gbl lcl a
- getEpsAndHpt :: TcRnIf gbl lcl (ExternalPackageState, HomePackageTable)
- getHpt :: TcRnIf gbl lcl HomePackageTable
- updateEps_ :: (ExternalPackageState -> ExternalPackageState) -> TcRnIf gbl lcl ()
- updateEps :: (ExternalPackageState -> (ExternalPackageState, a)) -> TcRnIf gbl lcl a
- getEps :: TcRnIf gbl lcl ExternalPackageState
- getEpsVar :: TcRnIf gbl lcl (TcRef ExternalPackageState)
- withDoDynamicToo :: TcRnIf gbl lcl a -> TcRnIf gbl lcl a
- getGhcMode :: TcRnIf gbl lcl GhcMode
- unlessXOptM :: Extension -> TcRnIf gbl lcl () -> TcRnIf gbl lcl ()
- whenXOptM :: Extension -> TcRnIf gbl lcl () -> TcRnIf gbl lcl ()
- whenWOptM :: WarningFlag -> TcRnIf gbl lcl () -> TcRnIf gbl lcl ()
- whenGOptM :: GeneralFlag -> TcRnIf gbl lcl () -> TcRnIf gbl lcl ()
- whenDOptM :: DumpFlag -> TcRnIf gbl lcl () -> TcRnIf gbl lcl ()
- unsetWOptM :: WarningFlag -> TcRnIf gbl lcl a -> TcRnIf gbl lcl a
- unsetGOptM :: GeneralFlag -> TcRnIf gbl lcl a -> TcRnIf gbl lcl a
- unsetXOptM :: Extension -> TcRnIf gbl lcl a -> TcRnIf gbl lcl a
- setXOptM :: Extension -> TcRnIf gbl lcl a -> TcRnIf gbl lcl a
- woptM :: WarningFlag -> TcRnIf gbl lcl Bool
- goptM :: GeneralFlag -> TcRnIf gbl lcl Bool
- doptM :: DumpFlag -> TcRnIf gbl lcl Bool
- xoptM :: Extension -> TcRnIf gbl lcl Bool
- setEnvs :: (gbl', lcl') -> TcRnIf gbl' lcl' a -> TcRnIf gbl lcl a
- getEnvs :: TcRnIf gbl lcl (gbl, lcl)
- setLclEnv :: lcl' -> TcRnIf gbl lcl' a -> TcRnIf gbl lcl a
- updLclEnv :: (lcl -> lcl) -> TcRnIf gbl lcl a -> TcRnIf gbl lcl a
- getLclEnv :: TcRnIf gbl lcl lcl
- setGblEnv :: gbl -> TcRnIf gbl lcl a -> TcRnIf gbl lcl a
- updGblEnv :: (gbl -> gbl) -> TcRnIf gbl lcl a -> TcRnIf gbl lcl a
- getGblEnv :: TcRnIf gbl lcl gbl
- updTopEnv :: (HscEnv -> HscEnv) -> TcRnIf gbl lcl a -> TcRnIf gbl lcl a
- getTopEnv :: TcRnIf gbl lcl HscEnv
- discardResult :: TcM a -> TcM ()
- initTcRnIf :: Char -> HscEnv -> gbl -> lcl -> TcRnIf gbl lcl a -> IO a
- initTcInteractive :: HscEnv -> TcM a -> IO (Messages, Maybe a)
- initTcWithGbl :: HscEnv -> TcGblEnv -> RealSrcSpan -> TcM r -> IO (Messages, Maybe r)
- initTc :: HscEnv -> HscSource -> Bool -> Module -> RealSrcSpan -> TcM r -> IO (Messages, Maybe r)
- class ContainsCostCentreState e where
- getRoleAnnots :: [Name] -> RoleAnnotEnv -> [LRoleAnnotDecl GhcRn]
- lookupRoleAnnot :: RoleAnnotEnv -> Name -> Maybe (LRoleAnnotDecl GhcRn)
- emptyRoleAnnotEnv :: RoleAnnotEnv
- mkRoleAnnotEnv :: [LRoleAnnotDecl GhcRn] -> RoleAnnotEnv
- getEvBindsTcPluginM :: TcPluginM EvBindsVar
- unsafeTcPluginTcM :: TcM a -> TcPluginM a
- runTcPluginM :: TcPluginM a -> EvBindsVar -> TcM a
- hasCompleteSig :: TcSigFun -> Name -> Bool
- isPartialSig :: TcIdSigInst -> Bool
- plusImportAvails :: ImportAvails -> ImportAvails -> ImportAvails
- emptyImportAvails :: ImportAvails
- modDepsElts :: ModuleNameEnv (ModuleName, IsBootInterface) -> [(ModuleName, IsBootInterface)]
- mkModDeps :: [(ModuleName, IsBootInterface)] -> ModuleNameEnv (ModuleName, IsBootInterface)
- pprPECategory :: PromotionErr -> SDoc
- pprTcTyThingCategory :: TcTyThing -> SDoc
- thLevel :: ThStage -> ThLevel
- outerLevel :: ThLevel
- impLevel :: ThLevel
- topSpliceStage :: ThStage
- topAnnStage :: ThStage
- topStage :: ThStage
- removeBindingShadowing :: HasOccName a => [a] -> [a]
- pushErrCtxtSameOrigin :: ErrCtxt -> CtLoc -> CtLoc
- pushErrCtxt :: CtOrigin -> ErrCtxt -> CtLoc -> CtLoc
- tcVisibleOrphanMods :: TcGblEnv -> ModuleSet
- data NameShape = NameShape {
- ns_mod_name :: ModuleName
- ns_exports :: [AvailInfo]
- ns_map :: OccEnv Name
- type TcRnIf a b = IOEnv (Env a b)
- type TcRn = TcRnIf TcGblEnv TcLclEnv
- type IfM lcl = TcRnIf IfGblEnv lcl
- type IfG = IfM ()
- type IfL = IfM IfLclEnv
- type DsM = TcRnIf DsGblEnv DsLclEnv
- type RnM = TcRn
- type TcM = TcRn
- data Env gbl lcl = Env {}
- data IfGblEnv = IfGblEnv {}
- data IfLclEnv = IfLclEnv {}
- data DsGblEnv = DsGblEnv {}
- data DsLclEnv = DsLclEnv {}
- type DsMetaEnv = NameEnv DsMetaVal
- data DsMetaVal
- data FrontendResult = FrontendTypecheck TcGblEnv
- data TcGblEnv = TcGblEnv {
- tcg_mod :: Module
- tcg_semantic_mod :: Module
- tcg_src :: HscSource
- tcg_rdr_env :: GlobalRdrEnv
- tcg_default :: Maybe [Type]
- tcg_fix_env :: FixityEnv
- tcg_field_env :: RecFieldEnv
- tcg_type_env :: TypeEnv
- tcg_type_env_var :: TcRef TypeEnv
- tcg_inst_env :: !InstEnv
- tcg_fam_inst_env :: !FamInstEnv
- tcg_ann_env :: AnnEnv
- tcg_exports :: [AvailInfo]
- tcg_imports :: ImportAvails
- tcg_dus :: DefUses
- tcg_used_gres :: TcRef [GlobalRdrElt]
- tcg_keep :: TcRef NameSet
- tcg_th_used :: TcRef Bool
- tcg_th_splice_used :: TcRef Bool
- tcg_th_top_level_locs :: TcRef (Set RealSrcSpan)
- tcg_dfun_n :: TcRef OccSet
- tcg_merged :: [(Module, Fingerprint)]
- tcg_rn_exports :: Maybe [(Located (IE GhcRn), Avails)]
- tcg_rn_imports :: [LImportDecl GhcRn]
- tcg_rn_decls :: Maybe (HsGroup GhcRn)
- tcg_dependent_files :: TcRef [FilePath]
- tcg_th_topdecls :: TcRef [LHsDecl GhcPs]
- tcg_th_foreign_files :: TcRef [(ForeignSrcLang, FilePath)]
- tcg_th_topnames :: TcRef NameSet
- tcg_th_modfinalizers :: TcRef [(TcLclEnv, ThModFinalizers)]
- tcg_th_coreplugins :: TcRef [String]
- tcg_th_state :: TcRef (Map TypeRep Dynamic)
- tcg_th_remote_state :: TcRef (Maybe (ForeignRef (IORef QState)))
- tcg_ev_binds :: Bag EvBind
- tcg_tr_module :: Maybe Id
- tcg_binds :: LHsBinds GhcTc
- tcg_sigs :: NameSet
- tcg_imp_specs :: [LTcSpecPrag]
- tcg_warns :: Warnings
- tcg_anns :: [Annotation]
- tcg_tcs :: [TyCon]
- tcg_insts :: [ClsInst]
- tcg_fam_insts :: [FamInst]
- tcg_rules :: [LRuleDecl GhcTc]
- tcg_fords :: [LForeignDecl GhcTc]
- tcg_patsyns :: [PatSyn]
- tcg_doc_hdr :: Maybe LHsDocString
- tcg_hpc :: !AnyHpcUsage
- tcg_self_boot :: SelfBootInfo
- tcg_main :: Maybe Name
- tcg_safeInfer :: TcRef (Bool, WarningMessages)
- tcg_tc_plugins :: [TcPluginSolver]
- tcg_hf_plugins :: [HoleFitPlugin]
- tcg_top_loc :: RealSrcSpan
- tcg_static_wc :: TcRef WantedConstraints
- tcg_complete_matches :: [CompleteMatch]
- tcg_cc_st :: TcRef CostCentreState
- type RecFieldEnv = NameEnv [FieldLabel]
- data SelfBootInfo
- = NoSelfBoot
- | SelfBoot {
- sb_mds :: ModDetails
- sb_tcs :: NameSet
- type ErrCtxt = (Bool, TidyEnv -> TcM (TidyEnv, MsgDoc))
- type TcTypeEnv = NameEnv TcTyThing
- type TcRef a = IORef a
- type TcId = Id
- type TcIdSet = IdSet
- type TcBinderStack = [TcBinder]
- data TcBinder
- data SpliceType
- data ThStage
- = Splice SpliceType
- | RunSplice (TcRef [ForeignRef (Q ())])
- | Comp
- | Brack ThStage PendingStuff
- data PendingStuff
- type ThLevel = Int
- data ArrowCtxt
- data TcTyThing
- = AGlobal TyThing
- | ATcId {
- tct_id :: TcId
- tct_info :: IdBindingInfo
- | ATyVar Name TcTyVar
- | ATcTyCon TyCon
- | APromotionErr PromotionErr
- data PromotionErr
- data IdBindingInfo
- data IsGroupClosed = IsGroupClosed (NameEnv RhsNames) ClosedTypeId
- type RhsNames = NameSet
- type ClosedTypeId = Bool
- data ImportAvails = ImportAvails {}
- data WhereFrom
- type TcSigFun = Name -> Maybe TcSigInfo
- data TcSigInfo
- data TcIdSigInfo
- = CompleteSig { }
- | PartialSig { }
- data TcIdSigInst = TISI {
- sig_inst_sig :: TcIdSigInfo
- sig_inst_skols :: [(Name, TcTyVar)]
- sig_inst_theta :: TcThetaType
- sig_inst_tau :: TcSigmaType
- sig_inst_wcs :: [(Name, TcTyVar)]
- sig_inst_wcx :: Maybe TcType
- data TcPatSynInfo = TPSI {}
- type TcPluginSolver = [Ct] -> [Ct] -> [Ct] -> TcPluginM TcPluginResult
- data TcPluginM a
- data TcPlugin = TcPlugin {
- tcPluginInit :: TcPluginM s
- tcPluginSolve :: s -> TcPluginSolver
- tcPluginStop :: s -> TcPluginM ()
- data TcPluginResult
- = TcPluginContradiction [Ct]
- | TcPluginOk [(EvTerm, Ct)] [Ct]
- type RoleAnnotEnv = NameEnv (LRoleAnnotDecl GhcRn)
- holeOcc :: Hole -> OccName
- data Hole
- extendCompleteMatchMap :: CompleteMatchMap -> [CompleteMatch] -> CompleteMatchMap
- mkCompleteMatchMap :: [CompleteMatch] -> CompleteMatchMap
- data CompleteMatch = CompleteMatch {}
- type CompleteMatchMap = UniqFM [CompleteMatch]
- setLclEnvTcLevel :: TcLclEnv -> TcLevel -> TcLclEnv
- getLclEnvTcLevel :: TcLclEnv -> TcLevel
- setLclEnvLoc :: TcLclEnv -> RealSrcSpan -> TcLclEnv
- getLclEnvLoc :: TcLclEnv -> RealSrcSpan
- data TcLclEnv = TcLclEnv {
- tcl_loc :: RealSrcSpan
- tcl_ctxt :: [ErrCtxt]
- tcl_tclvl :: TcLevel
- tcl_th_ctxt :: ThStage
- tcl_th_bndrs :: ThBindEnv
- tcl_arrow_ctxt :: ArrowCtxt
- tcl_rdr :: LocalRdrEnv
- tcl_env :: TcTypeEnv
- tcl_bndrs :: TcBinderStack
- tcl_lie :: TcRef WantedConstraints
- tcl_errs :: TcRef Messages
- updEnv :: (env -> env') -> IOEnv env' a -> IOEnv env a
- setEnv :: env' -> IOEnv env' a -> IOEnv env a
- getEnv :: IOEnv env env
- atomicUpdMutVar' :: IORef a -> (a -> (a, b)) -> IOEnv env b
- atomicUpdMutVar :: IORef a -> (a -> (a, b)) -> IOEnv env b
- updMutVar :: IORef a -> (a -> a) -> IOEnv env ()
- readMutVar :: IORef a -> IOEnv env a
- writeMutVar :: IORef a -> a -> IOEnv env ()
- newMutVar :: a -> IOEnv env (IORef a)
- uninterruptibleMaskM_ :: IOEnv env a -> IOEnv env a
- unsafeInterleaveM :: IOEnv env a -> IOEnv env a
- tryMostM :: IOEnv env r -> IOEnv env (Either SomeException r)
- tryAllM :: IOEnv env r -> IOEnv env (Either SomeException r)
- tryM :: IOEnv env r -> IOEnv env (Either IOEnvFailure r)
- fixM :: (a -> IOEnv env a) -> IOEnv env a
- runIOEnv :: env -> IOEnv env a -> IO a
- failWithM :: String -> IOEnv env a
- failM :: IOEnv env a
- data IOEnv env a
- data IOEnvFailure = IOEnvFailure
- filterOutM :: Applicative m => (a -> m Bool) -> [a] -> m [a]
- unlessM :: Monad m => m Bool -> m () -> m ()
- whenM :: Monad m => m Bool -> m () -> m ()
- maybeMapM :: Monad m => (a -> m b) -> Maybe a -> m (Maybe b)
- foldlM_ :: (Monad m, Foldable t) => (a -> b -> m a) -> a -> t b -> m ()
- orM :: Monad m => m Bool -> m Bool -> m Bool
- fmapEitherM :: Monad m => (a -> m b) -> (c -> m d) -> Either a c -> m (Either b d)
- fmapMaybeM :: Monad m => (a -> m b) -> Maybe a -> m (Maybe b)
- mapSndM :: Monad m => (b -> m c) -> [(a, b)] -> m [(a, c)]
- mapAccumLM :: Monad m => (acc -> x -> m (acc, y)) -> acc -> [x] -> m (acc, [y])
- mapAndUnzip5M :: Monad m => (a -> m (b, c, d, e, f)) -> [a] -> m ([b], [c], [d], [e], [f])
- mapAndUnzip4M :: Monad m => (a -> m (b, c, d, e)) -> [a] -> m ([b], [c], [d], [e])
- mapAndUnzip3M :: Monad m => (a -> m (b, c, d)) -> [a] -> m ([b], [c], [d])
- zipWithAndUnzipM :: Monad m => (a -> b -> m (c, d)) -> [a] -> [b] -> m ([c], [d])
- zipWith4M :: Monad m => (a -> b -> c -> d -> m e) -> [a] -> [b] -> [c] -> [d] -> m [e]
- zipWith3M_ :: Monad m => (a -> b -> c -> m d) -> [a] -> [b] -> [c] -> m ()
- zipWith3M :: Monad m => (a -> b -> c -> m d) -> [a] -> [b] -> [c] -> m [d]
- data ForeignSrcLang
- module TidyPgm
- module TyCon
- module TysPrim
- module TysWiredIn
- tyConAppNeedsKindSig :: Bool -> TyCon -> Int -> Bool
- classifiesTypeWithValues :: Kind -> Bool
- isKindLevPoly :: Kind -> Bool
- isConstraintKindCon :: TyCon -> Bool
- setJoinResTy :: Int -> Type -> Type -> Type
- modifyJoinResTy :: Int -> (Type -> Type) -> Type -> Type
- splitVisVarsOfTypes :: [Type] -> Pair TyCoVarSet
- splitVisVarsOfType :: Type -> Pair TyCoVarSet
- synTyConResKind :: TyCon -> Kind
- tyConsOfType :: Type -> UniqSet TyCon
- occCheckExpand :: [Var] -> Type -> Maybe Type
- resultIsLevPoly :: Type -> Bool
- isTypeLevPoly :: Type -> Bool
- tcReturnsConstraintKind :: Kind -> Bool
- tcIsRuntimeTypeKind :: Kind -> Bool
- tcIsLiftedTypeKind :: Kind -> Bool
- tcIsConstraintKind :: Kind -> Bool
- tcTypeKind :: HasDebugCallStack => Type -> Kind
- typeKind :: HasDebugCallStack => Type -> Kind
- nonDetCmpTc :: TyCon -> TyCon -> Ordering
- nonDetCmpTypesX :: RnEnv2 -> [Type] -> [Type] -> Ordering
- nonDetCmpTypeX :: RnEnv2 -> Type -> Type -> Ordering
- nonDetCmpTypes :: [Type] -> [Type] -> Ordering
- nonDetCmpType :: Type -> Type -> Ordering
- eqVarBndrs :: RnEnv2 -> [Var] -> [Var] -> Maybe RnEnv2
- eqTypes :: [Type] -> [Type] -> Bool
- eqTypeX :: RnEnv2 -> Type -> Type -> Bool
- seqTypes :: [Type] -> ()
- seqType :: Type -> ()
- isValidJoinPointType :: JoinArity -> Type -> Bool
- isPrimitiveType :: Type -> Bool
- isStrictType :: HasDebugCallStack => Type -> Bool
- isDataFamilyAppType :: Type -> Bool
- isAlgType :: Type -> Bool
- isUnboxedSumType :: Type -> Bool
- isUnboxedTupleType :: Type -> Bool
- getRuntimeRep :: HasDebugCallStack => Type -> Type
- getRuntimeRep_maybe :: HasDebugCallStack => Type -> Maybe Type
- dropRuntimeRepArgs :: [Type] -> [Type]
- isRuntimeRepKindedTy :: Type -> Bool
- mightBeUnliftedType :: Type -> Bool
- isUnliftedType :: HasDebugCallStack => Type -> Bool
- isLiftedType_maybe :: HasDebugCallStack => Type -> Maybe Bool
- isCoVarType :: Type -> Bool
- isFamFreeTy :: Type -> Bool
- coAxNthLHS :: forall (br :: BranchFlag). CoAxiom br -> Int -> Type
- mkFamilyTyConApp :: TyCon -> [Type] -> Type
- closeOverKindsDSet :: DTyVarSet -> DTyVarSet
- closeOverKindsList :: [TyVar] -> [TyVar]
- closeOverKindsFV :: [TyVar] -> FV
- closeOverKinds :: TyVarSet -> TyVarSet
- binderRelevantType_maybe :: TyCoBinder -> Maybe Type
- tyBinderType :: TyBinder -> Type
- tyCoBinderType :: TyCoBinder -> Type
- tyCoBinderVar_maybe :: TyCoBinder -> Maybe TyCoVar
- isAnonTyCoBinder :: TyCoBinder -> Bool
- mkAnonBinder :: AnonArgFlag -> Type -> TyCoBinder
- isTauTy :: Type -> Bool
- appTyArgFlags :: Type -> [Type] -> [ArgFlag]
- tyConArgFlags :: TyCon -> [Type] -> [ArgFlag]
- partitionInvisibles :: [(a, ArgFlag)] -> ([a], [a])
- filterOutInferredTypes :: TyCon -> [Type] -> [Type]
- filterOutInvisibleTypes :: TyCon -> [Type] -> [Type]
- splitPiTysInvisibleN :: Int -> Type -> ([TyCoBinder], Type)
- splitPiTysInvisible :: Type -> ([TyCoBinder], Type)
- invisibleTyBndrCount :: Type -> Int
- splitForAllVarBndrs :: Type -> ([TyCoVarBinder], Type)
- splitPiTys :: Type -> ([TyCoBinder], Type)
- splitPiTy :: Type -> (TyCoBinder, Type)
- splitPiTy_maybe :: Type -> Maybe (TyCoBinder, Type)
- splitForAllTy_co_maybe :: Type -> Maybe (TyCoVar, Type)
- splitForAllTy_ty_maybe :: Type -> Maybe (TyCoVar, Type)
- splitForAllTy_maybe :: Type -> Maybe (TyCoVar, Type)
- dropForAlls :: Type -> Type
- splitForAllTy :: Type -> (TyCoVar, Type)
- isFunTy :: Type -> Bool
- isPiTy :: Type -> Bool
- isForAllTy_co :: Type -> Bool
- isForAllTy_ty :: Type -> Bool
- isForAllTy :: Type -> Bool
- splitForAllTysSameVis :: ArgFlag -> Type -> ([TyCoVar], Type)
- splitForAllTys :: Type -> ([TyCoVar], Type)
- mkTyConBindersPreferAnon :: [TyVar] -> TyCoVarSet -> [TyConBinder]
- mkLamTypes :: [Var] -> Type -> Type
- mkLamType :: Var -> Type -> Type
- mkVisForAllTys :: [TyVar] -> Type -> Type
- mkSpecForAllTys :: [TyVar] -> Type -> Type
- mkSpecForAllTy :: TyVar -> Type -> Type
- mkInvForAllTys :: [TyVar] -> Type -> Type
- mkTyCoInvForAllTys :: [TyCoVar] -> Type -> Type
- mkInvForAllTy :: TyVar -> Type -> Type
- mkTyCoInvForAllTy :: TyCoVar -> Type -> Type
- stripCoercionTy :: Type -> Coercion
- isCoercionTy_maybe :: Type -> Maybe Coercion
- mkCoercionTy :: Coercion -> Type
- discardCast :: Type -> Type
- tyConBindersTyCoBinders :: [TyConBinder] -> [TyCoBinder]
- splitCastTy_maybe :: Type -> Maybe (Type, Coercion)
- newTyConInstRhs :: TyCon -> [Type] -> Type
- nextRole :: Type -> Role
- splitListTyConApp_maybe :: Type -> Maybe Type
- repSplitTyConApp_maybe :: HasDebugCallStack => Type -> Maybe (TyCon, [Type])
- tcSplitTyConApp_maybe :: HasCallStack => Type -> Maybe (TyCon, [Type])
- splitTyConApp :: Type -> (TyCon, [Type])
- tyConAppArgN :: Int -> Type -> Type
- tyConAppArgs :: Type -> [Type]
- tyConAppArgs_maybe :: Type -> Maybe [Type]
- tyConAppTyCon :: Type -> TyCon
- tyConAppTyCon_maybe :: Type -> Maybe TyCon
- tyConAppTyConPicky_maybe :: Type -> Maybe TyCon
- mkTyConApp :: TyCon -> [Type] -> Type
- applyTysX :: [TyVar] -> Type -> [Type] -> Type
- piResultTys :: HasDebugCallStack => Type -> [Type] -> Type
- funArgTy :: Type -> Type
- funResultTy :: Type -> Type
- splitFunTys :: Type -> ([Type], Type)
- splitFunTy_maybe :: Type -> Maybe (Type, Type)
- splitFunTy :: Type -> (Type, Type)
- pprUserTypeErrorTy :: Type -> SDoc
- userTypeError_maybe :: Type -> Maybe Type
- isLitTy :: Type -> Maybe TyLit
- isStrLitTy :: Type -> Maybe FastString
- mkStrLitTy :: FastString -> Type
- isNumLitTy :: Type -> Maybe Integer
- mkNumLitTy :: Integer -> Type
- repSplitAppTys :: HasDebugCallStack => Type -> (Type, [Type])
- splitAppTys :: Type -> (Type, [Type])
- splitAppTy :: Type -> (Type, Type)
- tcRepSplitAppTy_maybe :: Type -> Maybe (Type, Type)
- repSplitAppTy_maybe :: HasDebugCallStack => Type -> Maybe (Type, Type)
- splitAppTy_maybe :: Type -> Maybe (Type, Type)
- mkAppTys :: Type -> [Type] -> Type
- repGetTyVar_maybe :: Type -> Maybe TyVar
- getCastedTyVar_maybe :: Type -> Maybe (TyVar, CoercionN)
- getTyVar_maybe :: Type -> Maybe TyVar
- isTyVarTy :: Type -> Bool
- getTyVar :: String -> Type -> TyVar
- mapCoercion :: Monad m => TyCoMapper env m -> env -> Coercion -> m Coercion
- mapType :: Monad m => TyCoMapper env m -> env -> Type -> m Type
- isRuntimeRepVar :: TyVar -> Bool
- isUnliftedRuntimeRep :: Type -> Bool
- isUnliftedTypeKind :: Kind -> Bool
- isLiftedRuntimeRep :: Type -> Bool
- kindRep_maybe :: HasDebugCallStack => Kind -> Maybe Type
- kindRep :: HasDebugCallStack => Kind -> Type
- expandTypeSynonyms :: Type -> Type
- data TyCoMapper env (m :: Type -> Type) = TyCoMapper {}
- cloneTyVarBndrs :: TCvSubst -> [TyVar] -> UniqSupply -> (TCvSubst, [TyVar])
- cloneTyVarBndr :: TCvSubst -> TyVar -> Unique -> (TCvSubst, TyVar)
- substVarBndrs :: HasCallStack => TCvSubst -> [TyCoVar] -> (TCvSubst, [TyCoVar])
- substVarBndr :: HasCallStack => TCvSubst -> TyCoVar -> (TCvSubst, TyCoVar)
- substTyVarBndrs :: HasCallStack => TCvSubst -> [TyVar] -> (TCvSubst, [TyVar])
- substTyVarBndr :: HasCallStack => TCvSubst -> TyVar -> (TCvSubst, TyVar)
- substCoUnchecked :: TCvSubst -> Coercion -> Coercion
- lookupTyVar :: TCvSubst -> TyVar -> Maybe Type
- substTyVars :: TCvSubst -> [TyVar] -> [Type]
- substTyVar :: TCvSubst -> TyVar -> Type
- substThetaUnchecked :: TCvSubst -> ThetaType -> ThetaType
- substTheta :: HasCallStack => TCvSubst -> ThetaType -> ThetaType
- substTysUnchecked :: TCvSubst -> [Type] -> [Type]
- substTys :: HasCallStack => TCvSubst -> [Type] -> [Type]
- substTyUnchecked :: TCvSubst -> Type -> Type
- substTy :: HasCallStack => TCvSubst -> Type -> Type
- substTyAddInScope :: TCvSubst -> Type -> Type
- substTysWith :: [TyVar] -> [Type] -> [Type] -> [Type]
- substCoWithUnchecked :: [TyVar] -> [Type] -> Coercion -> Coercion
- substTyWithUnchecked :: [TyVar] -> [Type] -> Type -> Type
- substTyWith :: HasCallStack => [TyVar] -> [Type] -> Type -> Type
- zipCoEnv :: HasDebugCallStack => [CoVar] -> [Coercion] -> CvSubstEnv
- zipTyEnv :: HasDebugCallStack => [TyVar] -> [Type] -> TvSubstEnv
- mkTvSubstPrs :: [(TyVar, Type)] -> TCvSubst
- zipTCvSubst :: HasDebugCallStack => [TyCoVar] -> [Type] -> TCvSubst
- zipTvSubst :: HasDebugCallStack => [TyVar] -> [Type] -> TCvSubst
- unionTCvSubst :: TCvSubst -> TCvSubst -> TCvSubst
- extendTCvSubstList :: TCvSubst -> [Var] -> [Type] -> TCvSubst
- extendTvSubstList :: TCvSubst -> [Var] -> [Type] -> TCvSubst
- extendTvSubstAndInScope :: TCvSubst -> TyVar -> Type -> TCvSubst
- extendCvSubst :: TCvSubst -> CoVar -> Coercion -> TCvSubst
- extendTvSubstWithClone :: TCvSubst -> TyVar -> TyVar -> TCvSubst
- extendTvSubstBinderAndInScope :: TCvSubst -> TyCoBinder -> Type -> TCvSubst
- extendTvSubst :: TCvSubst -> TyVar -> Type -> TCvSubst
- extendTCvSubstWithClone :: TCvSubst -> TyCoVar -> TyCoVar -> TCvSubst
- extendTCvSubst :: TCvSubst -> TyCoVar -> Type -> TCvSubst
- extendTCvInScopeSet :: TCvSubst -> VarSet -> TCvSubst
- extendTCvInScopeList :: TCvSubst -> [Var] -> TCvSubst
- extendTCvInScope :: TCvSubst -> Var -> TCvSubst
- zapTCvSubst :: TCvSubst -> TCvSubst
- setTvSubstEnv :: TCvSubst -> TvSubstEnv -> TCvSubst
- notElemTCvSubst :: Var -> TCvSubst -> Bool
- isInScope :: Var -> TCvSubst -> Bool
- getTCvSubstRangeFVs :: TCvSubst -> VarSet
- getTCvInScope :: TCvSubst -> InScopeSet
- getTvSubstEnv :: TCvSubst -> TvSubstEnv
- mkTCvSubst :: InScopeSet -> (TvSubstEnv, CvSubstEnv) -> TCvSubst
- isEmptyTCvSubst :: TCvSubst -> Bool
- mkEmptyTCvSubst :: InScopeSet -> TCvSubst
- emptyTCvSubst :: TCvSubst
- composeTCvSubst :: TCvSubst -> TCvSubst -> TCvSubst
- composeTCvSubstEnv :: InScopeSet -> (TvSubstEnv, CvSubstEnv) -> (TvSubstEnv, CvSubstEnv) -> (TvSubstEnv, CvSubstEnv)
- emptyTvSubstEnv :: TvSubstEnv
- data TCvSubst = TCvSubst InScopeSet TvSubstEnv CvSubstEnv
- type TvSubstEnv = TyVarEnv Type
- tidyKind :: TidyEnv -> Kind -> Kind
- tidyOpenKind :: TidyEnv -> Kind -> (TidyEnv, Kind)
- tidyTopType :: Type -> Type
- tidyOpenType :: TidyEnv -> Type -> (TidyEnv, Type)
- tidyOpenTypes :: TidyEnv -> [Type] -> (TidyEnv, [Type])
- tidyType :: TidyEnv -> Type -> Type
- tidyTypes :: TidyEnv -> [Type] -> [Type]
- tidyTyCoVarOcc :: TidyEnv -> TyCoVar -> TyCoVar
- tidyOpenTyCoVar :: TidyEnv -> TyCoVar -> (TidyEnv, TyCoVar)
- tidyOpenTyCoVars :: TidyEnv -> [TyCoVar] -> (TidyEnv, [TyCoVar])
- tidyFreeTyCoVars :: TidyEnv -> [TyCoVar] -> TidyEnv
- tidyTyCoVarBinders :: TidyEnv -> [VarBndr TyCoVar vis] -> (TidyEnv, [VarBndr TyCoVar vis])
- tidyTyCoVarBinder :: TidyEnv -> VarBndr TyCoVar vis -> (TidyEnv, VarBndr TyCoVar vis)
- tidyVarBndr :: TidyEnv -> TyCoVar -> (TidyEnv, TyCoVar)
- tidyVarBndrs :: TidyEnv -> [TyCoVar] -> (TidyEnv, [TyCoVar])
- tyCoVarsOfTypesWellScoped :: [Type] -> [TyVar]
- tyCoVarsOfTypeWellScoped :: Type -> [TyVar]
- scopedSort :: [TyCoVar] -> [TyCoVar]
- noFreeVarsOfType :: Type -> Bool
- coVarsOfTypes :: [Type] -> TyCoVarSet
- coVarsOfType :: Type -> CoVarSet
- tyCoFVsVarBndr :: Var -> FV -> FV
- tyCoFVsVarBndrs :: [Var] -> FV -> FV
- tyCoFVsBndr :: TyCoVarBinder -> FV -> FV
- tyCoFVsOfType :: Type -> FV
- tyCoVarsOfTypeDSet :: Type -> DTyCoVarSet
- tyCoVarsOfTypes :: [Type] -> TyCoVarSet
- tyCoVarsOfType :: Type -> TyCoVarSet
- funTyCon :: TyCon
- typeSize :: Type -> Int
- mkTyConTy :: TyCon -> Type
- mkPiTys :: [TyCoBinder] -> Type -> Type
- mkPiTy :: TyCoBinder -> Type -> Type
- mkForAllTys :: [TyCoVarBinder] -> Type -> Type
- mkInvisFunTys :: [Type] -> Type -> Type
- mkInvisFunTy :: Type -> Type -> Type
- mkVisFunTy :: Type -> Type -> Type
- mkTyVarTys :: [TyVar] -> [Type]
- mkTyVarTy :: TyVar -> Type
- isNamedBinder :: TyCoBinder -> Bool
- isVisibleBinder :: TyCoBinder -> Bool
- isInvisibleBinder :: TyCoBinder -> Bool
- type KindOrType = Type
- type KnotTied ty = ty
- isPredTy :: HasDebugCallStack => Type -> Bool
- isCoercionTy :: Type -> Bool
- mkAppTy :: Type -> Type -> Type
- mkCastTy :: Type -> Coercion -> Type
- piResultTy :: HasDebugCallStack => Type -> Type -> Type
- eqType :: Type -> Type -> Bool
- coreView :: Type -> Maybe Type
- tcView :: Type -> Maybe Type
- isRuntimeRepTy :: Type -> Bool
- isLiftedTypeKind :: Kind -> Bool
- splitTyConApp_maybe :: HasDebugCallStack => Type -> Maybe (TyCon, [Type])
- partitionInvisibleTypes :: TyCon -> [Type] -> ([Type], [Type])
- isTyVar :: Var -> Bool
- tyVarKind :: TyVar -> Kind
- mkTyVarBinders :: ArgFlag -> [TyVar] -> [TyVarBinder]
- mkTyCoVarBinders :: ArgFlag -> [TyCoVar] -> [TyCoVarBinder]
- mkTyCoVarBinder :: ArgFlag -> TyCoVar -> TyCoVarBinder
- binderType :: VarBndr TyCoVar argf -> Type
- binderArgFlag :: VarBndr tv argf -> argf
- binderVars :: [VarBndr tv argf] -> [tv]
- binderVar :: VarBndr tv argf -> tv
- sameVis :: ArgFlag -> ArgFlag -> Bool
- isInvisibleArgFlag :: ArgFlag -> Bool
- isVisibleArgFlag :: ArgFlag -> Bool
- type TyVar = Var
- type TyCoVar = Id
- data ForallVisFlag
- type TyCoVarBinder = VarBndr TyCoVar ArgFlag
- type TyVarBinder = VarBndr TyVar ArgFlag
- liftedTypeKind :: Kind
- mkForAllTy :: TyCoVar -> ArgFlag -> Type -> Type
- data Type
- data TyThing
- data TyCoBinder
- type PredType = Type
- type Kind = Type
- type ThetaType = [PredType]
- data ArgFlag
- data AnonArgFlag
- data Var
- module Unify
- module UniqSupply
- setTyVarUnique :: TyVar -> Unique -> TyVar
- setVarUnique :: Var -> Unique -> Var
- data Var
- module GHC.Hs
- module ExtractDocs
- module Parser
- module Lexer
Session
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
extensions :: DynFlags -> [OnOff Extension] #
extensionFlags :: DynFlags -> EnumSet Extension #
targetPlatform :: DynFlags -> Platform #
packageFlags :: DynFlags -> [PackageFlag] #
The -package
and -hide-package
flags from the command-line.
In *reverse* order that they're specified on the command line.
generalFlags :: DynFlags -> EnumSet GeneralFlag #
warningFlags :: DynFlags -> EnumSet WarningFlag #
importPaths :: DynFlags -> [FilePath] #
useColor :: DynFlags -> OverridingBool #
canUseColor :: DynFlags -> Bool #
useUnicode :: DynFlags -> Bool #
flagsForCompletion :: Bool -> [String] #
Make a list of flags for shell completion. Filter all available flags into two groups, for interactive GHC vs all other.
outputFile :: DynFlags -> Maybe String #
pluginModNames :: DynFlags -> [ModuleName] #
refLevelHoleFits :: DynFlags -> Maybe Int #
Maximum level of refinement for refinement hole fits in typed hole error messages
maxRefHoleFits :: DynFlags -> Maybe Int #
Maximum number of refinement hole fits to show in typed hole error messages
maxValidHoleFits :: DynFlags -> Maybe Int #
Maximum number of hole fits to show in typed hole error messages
type CommandLineOption = String #
Command line options gathered from the -PModule.Name:stuff syntax are given to you as this type
staticPlugins :: DynFlags -> [StaticPlugin] #
staic plugins which do not need dynamic loading. These plugins are intended to be added by GHC API users directly to this list.
To add dynamically loaded plugins through the GHC API see
addPluginModuleName
instead.
gopt :: GeneralFlag -> DynFlags -> Bool #
Test whether a GeneralFlag
is set
gopt_set :: DynFlags -> GeneralFlag -> DynFlags #
Set a GeneralFlag
gopt_unset :: DynFlags -> GeneralFlag -> DynFlags #
Unset a GeneralFlag
wopt :: WarningFlag -> DynFlags -> Bool #
Test whether a WarningFlag
is set
wopt_set :: DynFlags -> WarningFlag -> DynFlags #
Set a WarningFlag
FlagSpec | |
|
data WarningFlag #
Instances
Enum WarningFlag | |
Defined in DynFlags succ :: WarningFlag -> WarningFlag # pred :: WarningFlag -> WarningFlag # toEnum :: Int -> WarningFlag # fromEnum :: WarningFlag -> Int # enumFrom :: WarningFlag -> [WarningFlag] # enumFromThen :: WarningFlag -> WarningFlag -> [WarningFlag] # enumFromTo :: WarningFlag -> WarningFlag -> [WarningFlag] # enumFromThenTo :: WarningFlag -> WarningFlag -> WarningFlag -> [WarningFlag] # | |
Eq WarningFlag | |
Defined in DynFlags (==) :: WarningFlag -> WarningFlag -> Bool # (/=) :: WarningFlag -> WarningFlag -> Bool # | |
Show WarningFlag | |
Defined in DynFlags showsPrec :: Int -> WarningFlag -> ShowS # show :: WarningFlag -> String # showList :: [WarningFlag] -> ShowS # |
data GeneralFlag #
Enumerates the simple on-or-off dynamic flags
Instances
Enum GeneralFlag | |
Defined in DynFlags 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] # | |
Eq GeneralFlag | |
Defined in DynFlags (==) :: GeneralFlag -> GeneralFlag -> Bool # (/=) :: GeneralFlag -> GeneralFlag -> Bool # | |
Show GeneralFlag | |
Defined in DynFlags showsPrec :: Int -> GeneralFlag -> ShowS # show :: GeneralFlag -> String # showList :: [GeneralFlag] -> ShowS # |
data PackageFlag #
Flags for manipulating packages visibility.
Instances
Eq PackageFlag | |
Defined in DynFlags (==) :: PackageFlag -> PackageFlag -> Bool # (/=) :: PackageFlag -> PackageFlag -> Bool # | |
Show PackageFlag Source # | |
Defined in Development.IDE.GHC.Orphans showsPrec :: Int -> PackageFlag -> ShowS # show :: PackageFlag -> String # showList :: [PackageFlag] -> ShowS # | |
Outputable PackageFlag | |
Defined in DynFlags ppr :: PackageFlag -> SDoc # pprPrec :: Rational -> PackageFlag -> SDoc # |
data PackageArg #
We accept flags which make packages visible, but how they select the package varies; this data type reflects what selection criterion is used.
PackageArg String |
|
UnitIdArg UnitId |
|
Instances
Eq PackageArg | |
Defined in DynFlags (==) :: PackageArg -> PackageArg -> Bool # (/=) :: PackageArg -> PackageArg -> Bool # | |
Show PackageArg | |
Defined in DynFlags showsPrec :: Int -> PackageArg -> ShowS # show :: PackageArg -> String # showList :: [PackageArg] -> ShowS # | |
Outputable PackageArg | |
Defined in DynFlags ppr :: PackageArg -> SDoc # pprPrec :: Rational -> PackageArg -> SDoc # |
data ModRenaming #
Represents the renaming that may be associated with an exposed
package, e.g. the rns
part of -package "foo (rns)"
.
Here are some example parsings of the package flags (where
a string literal is punned to be a ModuleName
:
ModRenaming | |
|
Instances
Eq ModRenaming | |
Defined in DynFlags (==) :: ModRenaming -> ModRenaming -> Bool # (/=) :: ModRenaming -> ModRenaming -> Bool # | |
Outputable ModRenaming | |
Defined in DynFlags ppr :: ModRenaming -> SDoc # pprPrec :: Rational -> ModRenaming -> SDoc # |
pattern ExposePackage :: String -> PackageArg -> ModRenaming -> PackageFlag Source #
:: MonadIO m | |
=> DynFlags | |
-> [Located String] | |
-> m (DynFlags, [Located String], [Warn]) | Updated |
Parse dynamic flags from a list of command line arguments. Returns
the parsed DynFlags
, the left-over arguments, and a list of warnings.
Throws a UsageError
if errors occurred during parsing (such as unknown
flags or missing arguments).
:: MonadIO m | |
=> DynFlags | |
-> [Located String] | |
-> m (DynFlags, [Located String], [Warn]) | Updated |
Like parseDynamicFlagsCmdLine
but does not allow the package flags
(-package, -hide-package, -ignore-package, -hide-all-packages, -package-db).
Used to parse flags set in a modules pragma.
data WarnReason #
Used when outputting warnings: if a reason is given, it is displayed. If a warning isn't controlled by a flag, this is made explicit at the point of use.
NoReason | |
Reason !WarningFlag | Warning was enabled with the flag |
ErrReason !(Maybe WarningFlag) | Warning was made an error because of -Werror or -Werror=WarningFlag |
Instances
Show WarnReason | |
Defined in DynFlags showsPrec :: Int -> WarnReason -> ShowS # show :: WarnReason -> String # showList :: [WarnReason] -> ShowS # | |
ToJson WarnReason | |
Defined in DynFlags json :: WarnReason -> JsonDoc # | |
Outputable WarnReason | |
Defined in DynFlags ppr :: WarnReason -> SDoc # pprPrec :: Rational -> WarnReason -> SDoc # |
wWarningFlags :: [FlagSpec WarningFlag] #
These -W<blah>
flags can all be reversed with -Wno-<blah>
updOptLevel :: Int -> DynFlags -> DynFlags #
Sets the DynFlags
to be appropriate to the optimisation level
setUnsafeGlobalDynFlags :: DynFlags -> IO () #
Linear Haskell
scaledThing :: Scaled a -> a Source #
Interface Files
type IfaceExport = AvailInfo #
The original names declared of a certain module that are exported
data IfaceTyCon #
Instances
Eq IfaceTyCon | |
Defined in IfaceType (==) :: IfaceTyCon -> IfaceTyCon -> Bool # (/=) :: IfaceTyCon -> IfaceTyCon -> Bool # | |
NFData IfaceTyCon | |
Defined in IfaceType rnf :: IfaceTyCon -> () # | |
Binary IfaceTyCon | |
Defined in IfaceType put_ :: BinHandle -> IfaceTyCon -> IO () # put :: BinHandle -> IfaceTyCon -> IO (Bin IfaceTyCon) # get :: BinHandle -> IO IfaceTyCon # | |
Outputable IfaceTyCon | |
Defined in IfaceType ppr :: IfaceTyCon -> SDoc # pprPrec :: Rational -> IfaceTyCon -> SDoc # |
data ModIface_ (phase :: ModIfacePhase) #
A ModIface
plus a ModDetails
summarises everything we know
about a compiled module. The ModIface
is the stuff *before* linking,
and can be written out to an interface file. The 'ModDetails is after
linking and can be completely recovered from just the ModIface
.
When we read an interface file, we also construct a ModIface
from it,
except that we explicitly make the mi_decls
and a few other fields empty;
as when reading we consolidate the declarations etc. into a number of indexed
maps and environments in the ExternalPackageState
.
ModIface | |
|
data SourceModified #
Indicates whether a given module's source has been modified since it was last compiled.
SourceModified | the source has been modified |
SourceUnmodified | the source has not been modified. Compilation may or may not be necessary, depending on whether any dependencies have changed since we last compiled. |
SourceUnmodifiedAndStable | the source has not been modified, and furthermore all of its (transitive) dependencies are up to date; it definitely does not need to be recompiled. This is important for two reasons: (a) we can omit the version check in checkOldIface, and (b) if the module used TH splices we don't need to force recompilation. |
Instances
Eq SourceModified Source # | |
Defined in Development.IDE.GHC.Orphans (==) :: SourceModified -> SourceModified -> Bool # (/=) :: SourceModified -> SourceModified -> Bool # | |
Show SourceModified Source # | |
Defined in Development.IDE.GHC.Orphans showsPrec :: Int -> SourceModified -> ShowS # show :: SourceModified -> String # showList :: [SourceModified] -> ShowS # | |
NFData SourceModified Source # | |
Defined in Development.IDE.GHC.Orphans rnf :: SourceModified -> () # |
loadModuleInterface :: SDoc -> Module -> TcM ModIface #
Load interface directly for a fully qualified Module
. (This is a fairly
rare operation, but in particular it is used to load orphan modules
in order to pull their instances into the global package table and to
handle some operations in GHCi).
data RecompileRequired #
UpToDate | everything is up to date, recompilation is not required |
MustCompile | The .hs file has been touched, or the .o/.hi file does not exist |
RecompBecause String | The .o/.hi files are up to date, but something else has changed to force recompilation; the String says what (one-line summary) |
Instances
Eq RecompileRequired | |
Defined in MkIface (==) :: RecompileRequired -> RecompileRequired -> Bool # (/=) :: RecompileRequired -> RecompileRequired -> Bool # | |
Semigroup RecompileRequired | |
Defined in MkIface (<>) :: RecompileRequired -> RecompileRequired -> RecompileRequired # sconcat :: NonEmpty RecompileRequired -> RecompileRequired # stimes :: Integral b => b -> RecompileRequired -> RecompileRequired # | |
Monoid RecompileRequired | |
Defined in MkIface |
mkPartialIface :: HscEnv -> ModDetails -> ModGuts -> PartialModIface #
mkFullIface :: HscEnv -> PartialModIface -> IO ModIface #
Fully instantiate a interface Adds fingerprints and potentially code generator produced information.
checkOldIface :: HscEnv -> ModSummary -> SourceModified -> Maybe ModIface -> IO (RecompileRequired, Maybe ModIface) #
Top level function to check if the version of an old interface file is equivalent to the current source file the user asked us to compile. If the same, we can avoid recompilation. We return a tuple where the first element is a bool saying if we should recompile the object file and the second is maybe the interface file, where Nothing means to rebuild the interface file and not use the existing one.
pattern IsBoot :: IsBootInterface Source #
pattern NotBoot :: IsBootInterface Source #
Fixity
data LexicalFixity #
Captures the fixity of declarations as they are parsed. This is not necessarily the same as the fixity declaration, as the normal fixity may be overridden using parens or backticks.
Instances
Eq LexicalFixity | |
Defined in BasicTypes (==) :: LexicalFixity -> LexicalFixity -> Bool # (/=) :: LexicalFixity -> LexicalFixity -> Bool # | |
Data LexicalFixity | |
Defined in BasicTypes gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> LexicalFixity -> c LexicalFixity # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c LexicalFixity # toConstr :: LexicalFixity -> Constr # dataTypeOf :: LexicalFixity -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c LexicalFixity) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c LexicalFixity) # gmapT :: (forall b. Data b => b -> b) -> LexicalFixity -> LexicalFixity # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LexicalFixity -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LexicalFixity -> r # gmapQ :: (forall d. Data d => d -> u) -> LexicalFixity -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> LexicalFixity -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> LexicalFixity -> m LexicalFixity # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LexicalFixity -> m LexicalFixity # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LexicalFixity -> m LexicalFixity # | |
Outputable LexicalFixity | |
Defined in BasicTypes ppr :: LexicalFixity -> SDoc # pprPrec :: Rational -> LexicalFixity -> SDoc # |
ModSummary
data ModSummary #
A single node in a ModuleGraph
. The nodes of the module graph
are one of:
- A regular Haskell source module
- A hi-boot source module
ModSummary | |
|
Instances
Show ModSummary Source # | |
Defined in Development.IDE.GHC.Orphans showsPrec :: Int -> ModSummary -> ShowS # show :: ModSummary -> String # showList :: [ModSummary] -> ShowS # | |
NFData ModSummary Source # | |
Defined in Development.IDE.GHC.Orphans rnf :: ModSummary -> () # | |
Outputable ModSummary | |
Defined in HscTypes ppr :: ModSummary -> SDoc # pprPrec :: Rational -> ModSummary -> SDoc # |
HomeModInfo
data HomeModInfo #
Information about modules in the package being compiled
HomeModInfo | |
|
ModGuts
A ModGuts is carried through the compiler, accumulating stuff as it goes
There is only one ModGuts at any time, the one for the module
being compiled right now. Once it is compiled, a ModIface
and
ModDetails
are extracted and the ModGuts is discarded.
ModGuts | |
|
A restricted form of ModGuts
for code generation purposes
CgGuts | |
|
ModDetails
data ModDetails #
The ModDetails
is essentially a cache for information in the ModIface
for home modules only. Information relating to packages will be loaded into
global environments in ExternalPackageState
.
ModDetails | |
|
Instances
Show ModDetails Source # | |
Defined in Development.IDE.GHC.Orphans showsPrec :: Int -> ModDetails -> ShowS # show :: ModDetails -> String # showList :: [ModDetails] -> ShowS # | |
NFData ModDetails Source # | |
Defined in Development.IDE.GHC.Orphans rnf :: ModDetails -> () # |
Var
TyVarTy Var | Vanilla type or kind variable (*never* a coercion variable) |
AppTy Type Type | Type application to something other than a 1) Function: must not be a 2) Argument type |
TyConApp TyCon [KindOrType] | Application of a 1) Type constructor being applied to. 2) Type arguments. Might not have enough type arguments here to saturate the constructor. Even type synonyms are not necessarily saturated; for example unsaturated type synonyms can appear as the right hand side of a type synonym. |
ForAllTy !TyCoVarBinder Type | A Π type. |
LitTy TyLit | Type literals are similar to type constructors. |
CastTy Type KindCoercion | A kind cast. The coercion is always nominal. INVARIANT: The cast is never refl. INVARIANT: The Type is not a CastTy (use TransCo instead) See Note Respecting definitional equality and (EQ3) |
CoercionTy Coercion | Injection of a Coercion into a type This should only ever be used in the RHS of an AppTy, in the list of a TyConApp, when applying a promoted GADT data constructor |
Instances
Data Type | |
Defined in TyCoRep gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Type -> c Type # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Type # dataTypeOf :: Type -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Type) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Type) # gmapT :: (forall b. Data b => b -> b) -> Type -> Type # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Type -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Type -> r # gmapQ :: (forall d. Data d => d -> u) -> Type -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Type -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Type -> m Type # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Type -> m Type # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Type -> m Type # | |
NFData Type Source # | |
Defined in Development.IDE.GHC.Orphans | |
Outputable Type | |
Eq (DeBruijn Type) | |
ToHie (TScoped Type) | |
Defined in Compat.HieAst |
Specs
data ImpDeclSpec #
Import Declaration Specification
Describes a particular import declaration and is
shared among all the Provenance
s for that decl
ImpDeclSpec | |
|
Instances
Eq ImpDeclSpec | |
Defined in RdrName (==) :: ImpDeclSpec -> ImpDeclSpec -> Bool # (/=) :: ImpDeclSpec -> ImpDeclSpec -> Bool # | |
Data ImpDeclSpec | |
Defined in RdrName gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ImpDeclSpec -> c ImpDeclSpec # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ImpDeclSpec # toConstr :: ImpDeclSpec -> Constr # dataTypeOf :: ImpDeclSpec -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ImpDeclSpec) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ImpDeclSpec) # gmapT :: (forall b. Data b => b -> b) -> ImpDeclSpec -> ImpDeclSpec # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ImpDeclSpec -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ImpDeclSpec -> r # gmapQ :: (forall d. Data d => d -> u) -> ImpDeclSpec -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ImpDeclSpec -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ImpDeclSpec -> m ImpDeclSpec # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ImpDeclSpec -> m ImpDeclSpec # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ImpDeclSpec -> m ImpDeclSpec # | |
Ord ImpDeclSpec | |
Defined in RdrName compare :: ImpDeclSpec -> ImpDeclSpec -> Ordering # (<) :: ImpDeclSpec -> ImpDeclSpec -> Bool # (<=) :: ImpDeclSpec -> ImpDeclSpec -> Bool # (>) :: ImpDeclSpec -> ImpDeclSpec -> Bool # (>=) :: ImpDeclSpec -> ImpDeclSpec -> Bool # max :: ImpDeclSpec -> ImpDeclSpec -> ImpDeclSpec # min :: ImpDeclSpec -> ImpDeclSpec -> ImpDeclSpec # |
data ImportSpec #
Import Specification
The ImportSpec
of something says how it came to be imported
It's quite elaborate so that we can give accurate unused-name warnings.
Instances
Eq ImportSpec | |
Defined in RdrName (==) :: ImportSpec -> ImportSpec -> Bool # (/=) :: ImportSpec -> ImportSpec -> Bool # | |
Data ImportSpec | |
Defined in RdrName gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ImportSpec -> c ImportSpec # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ImportSpec # toConstr :: ImportSpec -> Constr # dataTypeOf :: ImportSpec -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ImportSpec) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ImportSpec) # gmapT :: (forall b. Data b => b -> b) -> ImportSpec -> ImportSpec # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ImportSpec -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ImportSpec -> r # gmapQ :: (forall d. Data d => d -> u) -> ImportSpec -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ImportSpec -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ImportSpec -> m ImportSpec # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ImportSpec -> m ImportSpec # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ImportSpec -> m ImportSpec # | |
Ord ImportSpec | |
Defined in RdrName compare :: ImportSpec -> ImportSpec -> Ordering # (<) :: ImportSpec -> ImportSpec -> Bool # (<=) :: ImportSpec -> ImportSpec -> Bool # (>) :: ImportSpec -> ImportSpec -> Bool # (>=) :: ImportSpec -> ImportSpec -> Bool # max :: ImportSpec -> ImportSpec -> ImportSpec # min :: ImportSpec -> ImportSpec -> ImportSpec # | |
Outputable ImportSpec | |
Defined in RdrName ppr :: ImportSpec -> SDoc # pprPrec :: Rational -> ImportSpec -> SDoc # |
SourceText
data SourceText #
SourceText String | |
NoSourceText | For when code is generated, e.g. TH, deriving. The pretty printer will then make its own representation of the item. |
Instances
Eq SourceText | |
Defined in BasicTypes (==) :: SourceText -> SourceText -> Bool # (/=) :: SourceText -> SourceText -> Bool # | |
Data SourceText | |
Defined in BasicTypes gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SourceText -> c SourceText # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SourceText # toConstr :: SourceText -> Constr # dataTypeOf :: SourceText -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SourceText) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SourceText) # gmapT :: (forall b. Data b => b -> b) -> SourceText -> SourceText # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SourceText -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SourceText -> r # gmapQ :: (forall d. Data d => d -> u) -> SourceText -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> SourceText -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> SourceText -> m SourceText # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SourceText -> m SourceText # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SourceText -> m SourceText # | |
Show SourceText | |
Defined in BasicTypes showsPrec :: Int -> SourceText -> ShowS # show :: SourceText -> String # showList :: [SourceText] -> ShowS # | |
Outputable SourceText | |
Defined in BasicTypes ppr :: SourceText -> SDoc # pprPrec :: Rational -> SourceText -> SDoc # | |
Annotate (SourceText, FastString) | |
Defined in Language.Haskell.GHC.ExactPrint.Annotater markAST :: SrcSpan -> (SourceText, FastString) -> Annotated () # |
Name
tyThingParent_maybe :: TyThing -> Maybe TyThing #
tyThingParent_maybe x returns (Just p) when pprTyThingInContext should print a declaration for p (albeit with some "..." in it) when asked to show x It returns the *immediate* parent. So a datacon returns its tycon but the tycon could be the associated type of a class, so it in turn might have a parent.
Ways
wayGeneralFlags :: Platform -> Way -> [GeneralFlag] #
wayUnsetGeneralFlags :: Platform -> Way -> [GeneralFlag] #
AvailInfo
Records what things are "available", i.e. in scope
Instances
Eq AvailInfo | Used when deciding if the interface has changed |
Data AvailInfo | |
Defined in Avail gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AvailInfo -> c AvailInfo # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AvailInfo # toConstr :: AvailInfo -> Constr # dataTypeOf :: AvailInfo -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c AvailInfo) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AvailInfo) # gmapT :: (forall b. Data b => b -> b) -> AvailInfo -> AvailInfo # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AvailInfo -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AvailInfo -> r # gmapQ :: (forall d. Data d => d -> u) -> AvailInfo -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> AvailInfo -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> AvailInfo -> m AvailInfo # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AvailInfo -> m AvailInfo # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AvailInfo -> m AvailInfo # | |
Binary AvailInfo | |
Outputable AvailInfo | |
pattern AvailFL :: FieldLabel -> AvailInfo Source #
availName :: AvailInfo -> Name #
Just the main name made available, i.e. not the available pieces
of type or class brought into scope by the GenAvailInfo
availNames :: AvailInfo -> [Name] #
All names made available by the availability information (excluding overloaded selectors)
availNamesWithSelectors :: AvailInfo -> [Name] #
All names made available by the availability information (including overloaded selectors)
availsToNameSet :: [AvailInfo] -> NameSet #
TcGblEnv
TcGblEnv
describes the top-level of the module at the
point at which the typechecker is finished work.
It is this structure that is handed on to the desugarer
For state that needs to be updated during the typechecking
phase and returned at end, use a TcRef
(= IORef
).
TcGblEnv | |
|
Instances
ContainsCostCentreState TcGblEnv | |
Defined in TcRnMonad | |
ContainsModule TcGblEnv | |
Defined in TcRnTypes extractModule :: TcGblEnv -> Module # |
Parsing and LExer types
data HsParsedModule #
data ParsedModule #
The result of successful parsing.
Instances
Show ParsedModule Source # | |
Defined in Development.IDE.GHC.Orphans showsPrec :: Int -> ParsedModule -> ShowS # show :: ParsedModule -> String # showList :: [ParsedModule] -> ShowS # | |
NFData ParsedModule Source # | |
Defined in Development.IDE.GHC.Orphans rnf :: ParsedModule -> () # | |
ParsedMod ParsedModule | |
Defined in GHC |
type ParsedSource = Located (HsModule GhcPs) #
type RenamedSource = (HsGroup GhcRn, [LImportDecl GhcRn], Maybe [(LIE GhcRn, Avails)], Maybe LHsDocString) #
Compilation Main
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.
:: Maybe FilePath | See argument to |
-> 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.
The Session is a handle to the complete state of a compilation session. A compilation session consists of a set of modules constituting the current program or library, the context for interactive evaluation, and various caches.
modifySession :: GhcMonad m => (HscEnv -> HscEnv) -> m () #
Set the current session to the result of applying the current session to the argument.
getSession :: GhcMonad m => m HscEnv #
setSessionDynFlags :: GhcMonad m => DynFlags -> m [InstalledUnitId] #
Updates both the interactive and program DynFlags in a Session. This also reads the package database (unless it has already been read), and prepares the compilers knowledge about packages. It can be called again to load new packages: just add new package flags to (packageFlags dflags).
Returns a list of new packages that may need to be linked in using
the dynamic linker (see linkPackages
) as a result of new package
flags. If you are not doing linking or doing static linking, you
can ignore the list of packages returned.
getSessionDynFlags :: GhcMonad m => m DynFlags #
Grabs the DynFlags from the Session
class (Functor m, MonadIO m, ExceptionMonad m, HasDynFlags m) => GhcMonad (m :: Type -> Type) #
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.
Instances
GhcMonad Ghc | |
Defined in GhcMonad getSession :: Ghc HscEnv # setSession :: HscEnv -> Ghc () # | |
ExceptionMonad m => GhcMonad (GhcT m) | |
Defined in GhcMonad getSession :: GhcT m HscEnv # setSession :: HscEnv -> GhcT m () # |
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
Monad Ghc | |
Functor Ghc | |
MonadFix Ghc | |
Applicative Ghc | |
MonadIO Ghc | |
GhcMonad Ghc | |
Defined in GhcMonad getSession :: Ghc HscEnv # setSession :: HscEnv -> Ghc () # | |
HasDynFlags Ghc | |
Defined in GhcMonad getDynFlags :: Ghc DynFlags # | |
ExceptionMonad Ghc | |
Unlit HscSource | |
Cpp HscSource | |
HsPp HscSource | |
Hsc HscSource | |
Ccxx | |
Cc | |
Cobjc | |
Cobjcxx | |
HCc | |
As Bool | |
LlvmOpt | |
LlvmLlc | |
LlvmMangle | |
CmmCpp | |
Cmm | |
MergeForeign | |
StopLn |
hscDesugar :: HscEnv -> ModSummary -> TcGblEnv -> IO ModGuts #
Convert a typechecked module to Core
:: HscEnv | |
-> CgGuts | |
-> ModLocation | |
-> FilePath | |
-> IO (FilePath, Maybe FilePath, [(ForeignSrcLang, FilePath)]) |
|
Compile to hard-code.
hscInteractive :: HscEnv -> CgGuts -> ModLocation -> IO (Maybe FilePath, CompiledByteCode, [SptEntry]) #
hscTypecheckRename :: HscEnv -> ModSummary -> HsParsedModule -> IO (TcGblEnv, RenamedStuff) #
Rename and typecheck a module, additionally returning the renamed syntax
makeSimpleDetails :: HscEnv -> TcGblEnv -> IO ModDetails #
Make a ModDetails
from the results of typechecking. Used when
typechecking only, as opposed to full compilation.
Typecheck utils
typecheckIface :: ModIface -> IfG ModDetails #
mkIfaceTc :: HscEnv -> SafeHaskellMode -> ModDetails -> TcGblEnv -> IO ModIface #
Make an interface from the results of typechecking only. Useful
for non-optimising compilation, or where we aren't generating any
object code at all (HscNothing
).
data ImportedModsVal #
ImportedModsVal | |
|
importedByUser :: [ImportedBy] -> [ImportedModsVal] #
type TypecheckedSource = LHsBinds GhcTc #
Source Locations
type HasSrcSpan = HasSrcSpan Source #
type Located = GenLocated SrcSpan #
unLoc :: HasSrcSpan a => a -> SrcSpanLess a #
getLoc :: HasSrcSpan a => a -> SrcSpan Source #
type RealLocated = GenLocated RealSrcSpan #
data GenLocated l e #
We attach SrcSpans to lots of things, so let's have a datatype for it.
L l e |
Instances
HasDecls ParsedSource | |
Defined in Language.Haskell.GHC.ExactPrint.Transform hsDecls :: forall (m :: Type -> Type). Monad m => ParsedSource -> TransformT m [LHsDecl GhcPs] # replaceDecls :: forall (m :: Type -> Type). Monad m => ParsedSource -> [LHsDecl GhcPs] -> TransformT m ParsedSource # | |
Functor (GenLocated l) | |
Defined in SrcLoc fmap :: (a -> b) -> GenLocated l a -> GenLocated l b # (<$) :: a -> GenLocated l b -> GenLocated l a # | |
Show (Annotated ParsedSource) Source # | |
Defined in Development.IDE.GHC.Orphans | |
Foldable (GenLocated l) | |
Defined in SrcLoc 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) | |
Defined in SrcLoc 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 (Annotated ParsedSource) Source # | |
Defined in Development.IDE.GHC.Orphans rnf :: Annotated ParsedSource -> () # | |
NamedThing e => NamedThing (Located e) | |
HasSrcSpan (Located a) | |
Defined in SrcLoc composeSrcSpan :: Located (SrcSpanLess (Located a)) -> Located a # decomposeSrcSpan :: Located a -> Located (SrcSpanLess (Located a)) # | |
Annotate [ExprLStmt GhcPs] | Used for declarations that need to be aligned together, e.g. in a do or let .. in statement/expr |
Annotate [LHsDerivingClause GhcPs] | |
Defined in Language.Haskell.GHC.ExactPrint.Annotater | |
Annotate [LHsType GhcPs] | |
Annotate [LHsSigType GhcPs] | |
Defined in Language.Haskell.GHC.ExactPrint.Annotater | |
Annotate [LConDeclField GhcPs] | |
Defined in Language.Haskell.GHC.ExactPrint.Annotater | |
Annotate [LIE GhcPs] | |
Annotate body => Annotate [Located (Match GhcPs (Located body))] | |
Annotate [Located (StmtLR GhcPs GhcPs (LHsCmd GhcPs))] | |
Annotate (TyFamInstEqn GhcPs) | |
Defined in Language.Haskell.GHC.ExactPrint.Annotater | |
Annotate (HsRecUpdField GhcPs) | |
Defined in Language.Haskell.GHC.ExactPrint.Annotater | |
Annotate (FunDep (Located RdrName)) | |
Annotate name => Annotate (BooleanFormula (Located name)) | |
Defined in Language.Haskell.GHC.ExactPrint.Annotater | |
(Data ast, Annotate ast) => Annotate (Located ast) | |
HasDecls (LHsExpr GhcPs) | |
HasLoc (Located a) | |
Defined in Compat.HieAst | |
HasType (LHsBind GhcRn) | |
Defined in Compat.HieAst getTypeNode :: LHsBind GhcRn -> HieM [HieAST Type] | |
HasType (LHsBind GhcTc) | |
Defined in Compat.HieAst getTypeNode :: LHsBind GhcTc -> HieM [HieAST Type] | |
HasType (LHsExpr GhcRn) | |
Defined in Compat.HieAst getTypeNode :: LHsExpr GhcRn -> HieM [HieAST Type] | |
HasType (LHsExpr GhcTc) | This instance tries to construct
Since the above is quite costly, we just skip cases where computing the expression's type is going to be expensive. See #16233 |
Defined in Compat.HieAst getTypeNode :: LHsExpr GhcTc -> HieM [HieAST Type] | |
HasType (Located (Pat GhcRn)) | |
Defined in Compat.HieAst | |
HasType (Located (Pat GhcTc)) | |
Defined in Compat.HieAst | |
(a ~ GhcPass p, ToHie (LHsExpr a), Data (HsTupArg a)) => ToHie (LHsTupArg (GhcPass p)) | |
(a ~ GhcPass p, ToHie (PScoped (LPat a)), ToHie (BindContext (LHsBind a)), ToHie (LHsExpr a), ToHie (MatchGroup a (LHsCmd a)), ToHie (SigContext (LSig a)), ToHie (RScoped (HsValBindsLR a a)), Data (HsCmd a), Data (HsCmdTop a), Data (StmtLR a a (Located (HsCmd a))), Data (HsLocalBinds a), Data (StmtLR a a (Located (HsExpr a)))) => ToHie (LHsCmd (GhcPass p)) | |
(ToHie (LHsCmd a), Data (HsCmdTop a)) => ToHie (LHsCmdTop a) | |
Defined in Compat.HieAst | |
ToHie (LSpliceDecl GhcRn) | |
Defined in Compat.HieAst toHie :: LSpliceDecl GhcRn -> HieM [HieAST Type] | |
ToHie (LTyClDecl GhcRn) | |
ToHie (LFamilyDecl GhcRn) | |
Defined in Compat.HieAst toHie :: LFamilyDecl GhcRn -> HieM [HieAST Type] | |
ToHie (LInjectivityAnn GhcRn) | |
Defined in Compat.HieAst toHie :: LInjectivityAnn GhcRn -> HieM [HieAST Type] | |
ToHie (HsDeriving GhcRn) | |
Defined in Compat.HieAst toHie :: HsDeriving GhcRn -> HieM [HieAST Type] | |
ToHie (LHsDerivingClause GhcRn) | |
Defined in Compat.HieAst toHie :: LHsDerivingClause GhcRn -> HieM [HieAST Type] | |
ToHie (LStandaloneKindSig GhcRn) | |
Defined in Compat.HieAst toHie :: LStandaloneKindSig GhcRn -> HieM [HieAST Type] | |
ToHie (LConDecl GhcRn) | |
ToHie (LTyFamInstDecl GhcRn) | |
Defined in Compat.HieAst toHie :: LTyFamInstDecl GhcRn -> HieM [HieAST Type] | |
ToHie (LDataFamInstDecl GhcRn) | |
Defined in Compat.HieAst toHie :: LDataFamInstDecl GhcRn -> HieM [HieAST Type] | |
ToHie (LClsInstDecl GhcRn) | |
Defined in Compat.HieAst toHie :: LClsInstDecl GhcRn -> HieM [HieAST Type] | |
ToHie (LInstDecl GhcRn) | |
ToHie (LDerivDecl GhcRn) | |
Defined in Compat.HieAst toHie :: LDerivDecl GhcRn -> HieM [HieAST Type] | |
ToHie (LDefaultDecl GhcRn) | |
Defined in Compat.HieAst toHie :: LDefaultDecl GhcRn -> HieM [HieAST Type] | |
ToHie (LForeignDecl GhcRn) | |
Defined in Compat.HieAst toHie :: LForeignDecl GhcRn -> HieM [HieAST Type] | |
ToHie (LRuleDecls GhcRn) | |
Defined in Compat.HieAst toHie :: LRuleDecls GhcRn -> HieM [HieAST Type] | |
ToHie (LRuleDecl GhcRn) | |
ToHie (LWarnDecls GhcRn) | |
Defined in Compat.HieAst toHie :: LWarnDecls GhcRn -> HieM [HieAST Type] | |
ToHie (LWarnDecl GhcRn) | |
ToHie (LAnnDecl GhcRn) | |
ToHie (LRoleAnnotDecl GhcRn) | |
Defined in Compat.HieAst toHie :: LRoleAnnotDecl GhcRn -> HieM [HieAST Type] | |
ToHie (LFixitySig GhcRn) | |
Defined in Compat.HieAst toHie :: LFixitySig GhcRn -> HieM [HieAST Type] | |
ToHie (LHsContext GhcRn) | |
Defined in Compat.HieAst toHie :: LHsContext GhcRn -> HieM [HieAST Type] | |
ToHie (LHsType GhcRn) | |
ToHie (LConDeclField GhcRn) | |
Defined in Compat.HieAst toHie :: LConDeclField GhcRn -> HieM [HieAST Type] | |
(a ~ GhcPass p, ToHie (Context (Located (IdP a))), HasType (LHsExpr a), ToHie (PScoped (LPat a)), ToHie (MatchGroup a (LHsExpr a)), ToHie (LGRHS a (LHsExpr a)), ToHie (RContext (HsRecordBinds a)), ToHie (RFContext (Located (AmbiguousFieldOcc a))), ToHie (ArithSeqInfo a), ToHie (LHsCmdTop a), ToHie (RScoped (GuardLStmt a)), ToHie (RScoped (LHsLocalBinds a)), ToHie (TScoped (LHsWcType (NoGhcTc a))), ToHie (TScoped (LHsSigWcType (NoGhcTc a))), Data (HsExpr a), Data (HsSplice a), Data (HsTupArg a), Data (AmbiguousFieldOcc a), HasRealDataConName a) => ToHie (LHsExpr (GhcPass p)) | |
ToHie (LImportDecl GhcRn) | |
Defined in Compat.HieAst toHie :: LImportDecl GhcRn -> HieM [HieAST Type] | |
ToHie (LBooleanFormula (Located Name)) | |
Defined in Compat.HieAst | |
ToHie (Located [LConDeclField GhcRn]) | |
Defined in Compat.HieAst | |
ToHie (Located (DerivStrategy GhcRn)) | |
Defined in Compat.HieAst | |
(ToHie (Context (Located (IdP a))), ToHie (PScoped (LPat a)), ToHie (HsPatSynDir a)) => ToHie (Located (PatSynBind a a)) | |
Defined in Compat.HieAst toHie :: Located (PatSynBind a a) -> HieM [HieAST Type] | |
ToHie (Located HsIPName) | |
ToHie (Located (FunDep (Located Name))) | |
(ToHie (LHsExpr a), Data (HsSplice a)) => ToHie (Located (HsSplice a)) | |
ToHie (Located OverlapMode) | |
Defined in Compat.HieAst toHie :: Located OverlapMode -> HieM [HieAST Type] | |
(a ~ GhcPass p, ToHie (Context (Located (IdP a))), ToHie (RContext (HsRecFields a (PScoped (LPat a)))), ToHie (LHsExpr a), ToHie (TScoped (LHsSigWcType a)), ProtectSig a, ToHie (TScoped (ProtectedSig a)), HasType (LPat a), Data (HsSplice a)) => ToHie (PScoped (Located (Pat (GhcPass p)))) | |
ToHie (TScoped (LHsType GhcRn)) | |
ToHie (TScoped (LHsWcType GhcTc)) | |
ToHie (TScoped (LHsSigWcType GhcTc)) | Dummy instances - never called |
Defined in Compat.HieAst toHie :: TScoped (LHsSigWcType GhcTc) -> HieM [HieAST Type] | |
ToHie (Context (Located NoExtField)) | |
Defined in Compat.HieAst toHie :: Context (Located NoExtField) -> HieM [HieAST Type] | |
ToHie (Context (Located Var)) | |
ToHie (Context (Located Name)) | |
(ToHie (Context (Located (IdP a))), ToHie (MatchGroup a (LHsExpr a)), ToHie (PScoped (LPat a)), ToHie (GRHSs a (LHsExpr a)), ToHie (LHsExpr a), ToHie (Located (PatSynBind a a)), HasType (LHsBind a), ModifyState (IdP a), Data (HsBind a)) => ToHie (BindContext (LHsBind a)) | |
Defined in Compat.HieAst | |
(a ~ GhcPass p, ToHie (PScoped (LPat a)), ToHie (LHsExpr a), ToHie (SigContext (LSig a)), ToHie (RScoped (LHsLocalBinds a)), ToHie (RScoped (ApplicativeArg a)), ToHie (Located body), Data (StmtLR a a (Located body)), Data (StmtLR a a (Located (HsExpr a)))) => ToHie (RScoped (LStmt (GhcPass p) (Located body))) | |
ToHie (RScoped (LFamilyResultSig GhcRn)) | |
Defined in Compat.HieAst toHie :: RScoped (LFamilyResultSig GhcRn) -> HieM [HieAST Type] | |
ToHie (RScoped (LRuleBndr GhcRn)) | |
(ToHie (LHsExpr a), ToHie (PScoped (LPat a)), ToHie (BindContext (LHsBind a)), ToHie (SigContext (LSig a)), ToHie (RScoped (HsValBindsLR a a)), Data (HsLocalBinds a)) => ToHie (RScoped (LHsLocalBinds a)) | |
Defined in Compat.HieAst toHie :: RScoped (LHsLocalBinds a) -> HieM [HieAST Type] | |
ToHie (SigContext (LSig GhcRn)) | |
ToHie (SigContext (LSig GhcTc)) | |
(ToHie (RFContext (Located label)), ToHie arg, HasLoc arg, Data label, Data arg) => ToHie (RContext (LHsRecField' label arg)) | |
Defined in Compat.HieAst toHie :: RContext (LHsRecField' label arg) -> HieM [HieAST Type] | |
ToHie (RFContext (LFieldOcc GhcRn)) | |
ToHie (RFContext (LFieldOcc GhcTc)) | |
ToHie (RFContext (Located (AmbiguousFieldOcc GhcRn))) | |
Defined in Compat.HieAst | |
ToHie (RFContext (Located (AmbiguousFieldOcc GhcTc))) | |
Defined in Compat.HieAst | |
ToHie (IEContext (LIEWrappedName Name)) | |
Defined in Compat.HieAst toHie :: IEContext (LIEWrappedName Name) -> HieM [HieAST Type] | |
ToHie (IEContext (LIE GhcRn)) | |
ToHie (IEContext (Located (FieldLbl Name))) | |
ToHie (IEContext (Located ModuleName)) | |
Defined in Compat.HieAst toHie :: IEContext (Located ModuleName) -> HieM [HieAST Type] | |
ToHie (TVScoped (LHsTyVarBndr GhcRn)) | |
Defined in Compat.HieAst toHie :: TVScoped (LHsTyVarBndr GhcRn) -> HieM [HieAST Type] | |
(Eq l, Eq e) => Eq (GenLocated l e) | |
Defined in SrcLoc (==) :: GenLocated l e -> GenLocated l e -> Bool # (/=) :: GenLocated l e -> GenLocated l e -> Bool # | |
(Data l, Data e) => Data (GenLocated l e) | |
Defined in SrcLoc 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) # | |
(Ord l, Ord e) => Ord (GenLocated l e) | |
Defined in SrcLoc 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 # | |
Outputable a => Show (GenLocated SrcSpan a) Source # | |
Defined in Development.IDE.GHC.Orphans | |
(NFData l, NFData e) => NFData (GenLocated l e) Source # | |
Defined in Development.IDE.GHC.Orphans rnf :: GenLocated l e -> () # | |
(Outputable l, Outputable e) => Outputable (GenLocated l e) | |
Defined in SrcLoc ppr :: GenLocated l e -> SDoc # pprPrec :: Rational -> GenLocated l e -> SDoc # | |
Annotate body => Annotate (Match GhcPs (Located body)) | |
Annotate body => Annotate (GRHS GhcPs (Located body)) | |
Annotate body => Annotate (Stmt GhcPs (Located body)) | |
Annotate (HsRecField GhcPs (LHsExpr GhcPs)) | |
Defined in Language.Haskell.GHC.ExactPrint.Annotater | |
Annotate (HsRecField GhcPs (Located (Pat GhcPs))) | |
Defined in Language.Haskell.GHC.ExactPrint.Annotater | |
Annotate arg => Annotate (HsImplicitBndrs GhcPs (Located arg)) | |
Defined in Language.Haskell.GHC.ExactPrint.Annotater | |
HasDecls (LMatch GhcPs (LHsExpr GhcPs)) | |
Defined in Language.Haskell.GHC.ExactPrint.Transform | |
HasDecls (LStmt GhcPs (LHsExpr GhcPs)) | |
Defined in Language.Haskell.GHC.ExactPrint.Transform | |
(a ~ GhcPass p, ToHie body, ToHie (HsMatchContext (NameOrRdrName (IdP a))), ToHie (PScoped (LPat a)), ToHie (GRHSs a body), Data (Match a body)) => ToHie (LMatch (GhcPass p) body) | |
(ToHie (Located body), ToHie (RScoped (GuardLStmt a)), Data (GRHS a (Located body))) => ToHie (LGRHS a (Located body)) | |
type SrcSpanLess (GenLocated l e) | |
Defined in SrcLoc |
Source Span
A SrcSpan
identifies either a specific portion of a text file
or a human-readable description of a location.
Instances
Eq SrcSpan | |
Data SrcSpan | |
Defined in SrcLoc gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SrcSpan -> c SrcSpan # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SrcSpan # toConstr :: SrcSpan -> Constr # dataTypeOf :: SrcSpan -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SrcSpan) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SrcSpan) # gmapT :: (forall b. Data b => b -> b) -> SrcSpan -> SrcSpan # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SrcSpan -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SrcSpan -> r # gmapQ :: (forall d. Data d => d -> u) -> SrcSpan -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> SrcSpan -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> SrcSpan -> m SrcSpan # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SrcSpan -> m SrcSpan # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SrcSpan -> m SrcSpan # | |
Ord SrcSpan | |
Show SrcSpan | |
NFData SrcSpan | |
ToJson SrcSpan | |
Outputable SrcSpan | |
HasDecls ParsedSource | |
Defined in Language.Haskell.GHC.ExactPrint.Transform hsDecls :: forall (m :: Type -> Type). Monad m => ParsedSource -> TransformT m [LHsDecl GhcPs] # replaceDecls :: forall (m :: Type -> Type). Monad m => ParsedSource -> [LHsDecl GhcPs] -> TransformT m ParsedSource # | |
Show (Annotated ParsedSource) Source # | |
Defined in Development.IDE.GHC.Orphans | |
NFData (Annotated ParsedSource) Source # | |
Defined in Development.IDE.GHC.Orphans rnf :: Annotated ParsedSource -> () # | |
NamedThing e => NamedThing (Located e) | |
HasSrcSpan (Located a) | |
Defined in SrcLoc composeSrcSpan :: Located (SrcSpanLess (Located a)) -> Located a # decomposeSrcSpan :: Located a -> Located (SrcSpanLess (Located a)) # | |
Annotate [ExprLStmt GhcPs] | Used for declarations that need to be aligned together, e.g. in a do or let .. in statement/expr |
Annotate [LHsDerivingClause GhcPs] | |
Defined in Language.Haskell.GHC.ExactPrint.Annotater | |
Annotate [LHsType GhcPs] | |
Annotate [LHsSigType GhcPs] | |
Defined in Language.Haskell.GHC.ExactPrint.Annotater | |
Annotate [LConDeclField GhcPs] | |
Defined in Language.Haskell.GHC.ExactPrint.Annotater | |
Annotate [LIE GhcPs] | |
Annotate body => Annotate [Located (Match GhcPs (Located body))] | |
Annotate [Located (StmtLR GhcPs GhcPs (LHsCmd GhcPs))] | |
Annotate (TyFamInstEqn GhcPs) | |
Defined in Language.Haskell.GHC.ExactPrint.Annotater | |
Annotate (HsRecUpdField GhcPs) | |
Defined in Language.Haskell.GHC.ExactPrint.Annotater | |
Annotate (FunDep (Located RdrName)) | |
Annotate name => Annotate (BooleanFormula (Located name)) | |
Defined in Language.Haskell.GHC.ExactPrint.Annotater | |
(Data ast, Annotate ast) => Annotate (Located ast) | |
HasDecls (LHsExpr GhcPs) | |
HasLoc (Located a) | |
Defined in Compat.HieAst | |
HasType (LHsBind GhcRn) | |
Defined in Compat.HieAst getTypeNode :: LHsBind GhcRn -> HieM [HieAST Type] | |
HasType (LHsBind GhcTc) | |
Defined in Compat.HieAst getTypeNode :: LHsBind GhcTc -> HieM [HieAST Type] | |
HasType (LHsExpr GhcRn) | |
Defined in Compat.HieAst getTypeNode :: LHsExpr GhcRn -> HieM [HieAST Type] | |
HasType (LHsExpr GhcTc) | This instance tries to construct
Since the above is quite costly, we just skip cases where computing the expression's type is going to be expensive. See #16233 |
Defined in Compat.HieAst getTypeNode :: LHsExpr GhcTc -> HieM [HieAST Type] | |
HasType (Located (Pat GhcRn)) | |
Defined in Compat.HieAst | |
HasType (Located (Pat GhcTc)) | |
Defined in Compat.HieAst | |
(a ~ GhcPass p, ToHie (LHsExpr a), Data (HsTupArg a)) => ToHie (LHsTupArg (GhcPass p)) | |
(a ~ GhcPass p, ToHie (PScoped (LPat a)), ToHie (BindContext (LHsBind a)), ToHie (LHsExpr a), ToHie (MatchGroup a (LHsCmd a)), ToHie (SigContext (LSig a)), ToHie (RScoped (HsValBindsLR a a)), Data (HsCmd a), Data (HsCmdTop a), Data (StmtLR a a (Located (HsCmd a))), Data (HsLocalBinds a), Data (StmtLR a a (Located (HsExpr a)))) => ToHie (LHsCmd (GhcPass p)) | |
(ToHie (LHsCmd a), Data (HsCmdTop a)) => ToHie (LHsCmdTop a) | |
Defined in Compat.HieAst | |
ToHie (LSpliceDecl GhcRn) | |
Defined in Compat.HieAst toHie :: LSpliceDecl GhcRn -> HieM [HieAST Type] | |
ToHie (LTyClDecl GhcRn) | |
ToHie (LFamilyDecl GhcRn) | |
Defined in Compat.HieAst toHie :: LFamilyDecl GhcRn -> HieM [HieAST Type] | |
ToHie (LInjectivityAnn GhcRn) | |
Defined in Compat.HieAst toHie :: LInjectivityAnn GhcRn -> HieM [HieAST Type] | |
ToHie (HsDeriving GhcRn) | |
Defined in Compat.HieAst toHie :: HsDeriving GhcRn -> HieM [HieAST Type] | |
ToHie (LHsDerivingClause GhcRn) | |
Defined in Compat.HieAst toHie :: LHsDerivingClause GhcRn -> HieM [HieAST Type] | |
ToHie (LStandaloneKindSig GhcRn) | |
Defined in Compat.HieAst toHie :: LStandaloneKindSig GhcRn -> HieM [HieAST Type] | |
ToHie (LConDecl GhcRn) | |
ToHie (LTyFamInstDecl GhcRn) | |
Defined in Compat.HieAst toHie :: LTyFamInstDecl GhcRn -> HieM [HieAST Type] | |
ToHie (LDataFamInstDecl GhcRn) | |
Defined in Compat.HieAst toHie :: LDataFamInstDecl GhcRn -> HieM [HieAST Type] | |
ToHie (LClsInstDecl GhcRn) | |
Defined in Compat.HieAst toHie :: LClsInstDecl GhcRn -> HieM [HieAST Type] | |
ToHie (LInstDecl GhcRn) | |
ToHie (LDerivDecl GhcRn) | |
Defined in Compat.HieAst toHie :: LDerivDecl GhcRn -> HieM [HieAST Type] | |
ToHie (LDefaultDecl GhcRn) | |
Defined in Compat.HieAst toHie :: LDefaultDecl GhcRn -> HieM [HieAST Type] | |
ToHie (LForeignDecl GhcRn) | |
Defined in Compat.HieAst toHie :: LForeignDecl GhcRn -> HieM [HieAST Type] | |
ToHie (LRuleDecls GhcRn) | |
Defined in Compat.HieAst toHie :: LRuleDecls GhcRn -> HieM [HieAST Type] | |
ToHie (LRuleDecl GhcRn) | |
ToHie (LWarnDecls GhcRn) | |
Defined in Compat.HieAst toHie :: LWarnDecls GhcRn -> HieM [HieAST Type] | |
ToHie (LWarnDecl GhcRn) | |
ToHie (LAnnDecl GhcRn) | |
ToHie (LRoleAnnotDecl GhcRn) | |
Defined in Compat.HieAst toHie :: LRoleAnnotDecl GhcRn -> HieM [HieAST Type] | |
ToHie (LFixitySig GhcRn) | |
Defined in Compat.HieAst toHie :: LFixitySig GhcRn -> HieM [HieAST Type] | |
ToHie (LHsContext GhcRn) | |
Defined in Compat.HieAst toHie :: LHsContext GhcRn -> HieM [HieAST Type] | |
ToHie (LHsType GhcRn) | |
ToHie (LConDeclField GhcRn) | |
Defined in Compat.HieAst toHie :: LConDeclField GhcRn -> HieM [HieAST Type] | |
(a ~ GhcPass p, ToHie (Context (Located (IdP a))), HasType (LHsExpr a), ToHie (PScoped (LPat a)), ToHie (MatchGroup a (LHsExpr a)), ToHie (LGRHS a (LHsExpr a)), ToHie (RContext (HsRecordBinds a)), ToHie (RFContext (Located (AmbiguousFieldOcc a))), ToHie (ArithSeqInfo a), ToHie (LHsCmdTop a), ToHie (RScoped (GuardLStmt a)), ToHie (RScoped (LHsLocalBinds a)), ToHie (TScoped (LHsWcType (NoGhcTc a))), ToHie (TScoped (LHsSigWcType (NoGhcTc a))), Data (HsExpr a), Data (HsSplice a), Data (HsTupArg a), Data (AmbiguousFieldOcc a), HasRealDataConName a) => ToHie (LHsExpr (GhcPass p)) | |
ToHie (LImportDecl GhcRn) | |
Defined in Compat.HieAst toHie :: LImportDecl GhcRn -> HieM [HieAST Type] | |
ToHie (LBooleanFormula (Located Name)) | |
Defined in Compat.HieAst | |
ToHie (Located [LConDeclField GhcRn]) | |
Defined in Compat.HieAst | |
ToHie (Located (DerivStrategy GhcRn)) | |
Defined in Compat.HieAst | |
(ToHie (Context (Located (IdP a))), ToHie (PScoped (LPat a)), ToHie (HsPatSynDir a)) => ToHie (Located (PatSynBind a a)) | |
Defined in Compat.HieAst toHie :: Located (PatSynBind a a) -> HieM [HieAST Type] | |
ToHie (Located HsIPName) | |
ToHie (Located (FunDep (Located Name))) | |
(ToHie (LHsExpr a), Data (HsSplice a)) => ToHie (Located (HsSplice a)) | |
ToHie (Located OverlapMode) | |
Defined in Compat.HieAst toHie :: Located OverlapMode -> HieM [HieAST Type] | |
(a ~ GhcPass p, ToHie (Context (Located (IdP a))), ToHie (RContext (HsRecFields a (PScoped (LPat a)))), ToHie (LHsExpr a), ToHie (TScoped (LHsSigWcType a)), ProtectSig a, ToHie (TScoped (ProtectedSig a)), HasType (LPat a), Data (HsSplice a)) => ToHie (PScoped (Located (Pat (GhcPass p)))) | |
ToHie (TScoped (LHsType GhcRn)) | |
ToHie (TScoped (LHsWcType GhcTc)) | |
ToHie (TScoped (LHsSigWcType GhcTc)) | Dummy instances - never called |
Defined in Compat.HieAst toHie :: TScoped (LHsSigWcType GhcTc) -> HieM [HieAST Type] | |
ToHie (Context (Located NoExtField)) | |
Defined in Compat.HieAst toHie :: Context (Located NoExtField) -> HieM [HieAST Type] | |
ToHie (Context (Located Var)) | |
ToHie (Context (Located Name)) | |
(ToHie (Context (Located (IdP a))), ToHie (MatchGroup a (LHsExpr a)), ToHie (PScoped (LPat a)), ToHie (GRHSs a (LHsExpr a)), ToHie (LHsExpr a), ToHie (Located (PatSynBind a a)), HasType (LHsBind a), ModifyState (IdP a), Data (HsBind a)) => ToHie (BindContext (LHsBind a)) | |
Defined in Compat.HieAst | |
(a ~ GhcPass p, ToHie (PScoped (LPat a)), ToHie (LHsExpr a), ToHie (SigContext (LSig a)), ToHie (RScoped (LHsLocalBinds a)), ToHie (RScoped (ApplicativeArg a)), ToHie (Located body), Data (StmtLR a a (Located body)), Data (StmtLR a a (Located (HsExpr a)))) => ToHie (RScoped (LStmt (GhcPass p) (Located body))) | |
ToHie (RScoped (LFamilyResultSig GhcRn)) | |
Defined in Compat.HieAst toHie :: RScoped (LFamilyResultSig GhcRn) -> HieM [HieAST Type] | |
ToHie (RScoped (LRuleBndr GhcRn)) | |
(ToHie (LHsExpr a), ToHie (PScoped (LPat a)), ToHie (BindContext (LHsBind a)), ToHie (SigContext (LSig a)), ToHie (RScoped (HsValBindsLR a a)), Data (HsLocalBinds a)) => ToHie (RScoped (LHsLocalBinds a)) | |
Defined in Compat.HieAst toHie :: RScoped (LHsLocalBinds a) -> HieM [HieAST Type] | |
ToHie (SigContext (LSig GhcRn)) | |
ToHie (SigContext (LSig GhcTc)) | |
(ToHie (RFContext (Located label)), ToHie arg, HasLoc arg, Data label, Data arg) => ToHie (RContext (LHsRecField' label arg)) | |
Defined in Compat.HieAst toHie :: RContext (LHsRecField' label arg) -> HieM [HieAST Type] | |
ToHie (RFContext (LFieldOcc GhcRn)) | |
ToHie (RFContext (LFieldOcc GhcTc)) | |
ToHie (RFContext (Located (AmbiguousFieldOcc GhcRn))) | |
Defined in Compat.HieAst | |
ToHie (RFContext (Located (AmbiguousFieldOcc GhcTc))) | |
Defined in Compat.HieAst | |
ToHie (IEContext (LIEWrappedName Name)) | |
Defined in Compat.HieAst toHie :: IEContext (LIEWrappedName Name) -> HieM [HieAST Type] | |
ToHie (IEContext (LIE GhcRn)) | |
ToHie (IEContext (Located (FieldLbl Name))) | |
ToHie (IEContext (Located ModuleName)) | |
Defined in Compat.HieAst toHie :: IEContext (Located ModuleName) -> HieM [HieAST Type] | |
ToHie (TVScoped (LHsTyVarBndr GhcRn)) | |
Defined in Compat.HieAst toHie :: TVScoped (LHsTyVarBndr GhcRn) -> HieM [HieAST Type] | |
Outputable a => Show (GenLocated SrcSpan a) Source # | |
Defined in Development.IDE.GHC.Orphans | |
Annotate body => Annotate (Match GhcPs (Located body)) | |
Annotate body => Annotate (GRHS GhcPs (Located body)) | |
Annotate body => Annotate (Stmt GhcPs (Located body)) | |
Annotate (HsRecField GhcPs (LHsExpr GhcPs)) | |
Defined in Language.Haskell.GHC.ExactPrint.Annotater | |
Annotate (HsRecField GhcPs (Located (Pat GhcPs))) | |
Defined in Language.Haskell.GHC.ExactPrint.Annotater | |
Annotate arg => Annotate (HsImplicitBndrs GhcPs (Located arg)) | |
Defined in Language.Haskell.GHC.ExactPrint.Annotater | |
HasDecls (LMatch GhcPs (LHsExpr GhcPs)) | |
Defined in Language.Haskell.GHC.ExactPrint.Transform | |
HasDecls (LStmt GhcPs (LHsExpr GhcPs)) | |
Defined in Language.Haskell.GHC.ExactPrint.Transform | |
(a ~ GhcPass p, ToHie body, ToHie (HsMatchContext (NameOrRdrName (IdP a))), ToHie (PScoped (LPat a)), ToHie (GRHSs a body), Data (Match a body)) => ToHie (LMatch (GhcPass p) body) | |
(ToHie (Located body), ToHie (RScoped (GuardLStmt a)), Data (GRHS a (Located body))) => ToHie (LGRHS a (Located body)) | |
data RealSrcSpan #
A RealSrcSpan
delimits a portion of a text file. It could be represented
by a pair of (line,column) coordinates, but in fact we optimise
slightly by using more compact representations for single-line and
zero-length spans, both of which are quite common.
The end position is defined to be the column after the end of the span. That is, a span of (1,1)-(1,2) is one character long, and a span of (1,1)-(1,1) is zero characters long.
Real Source Span
Instances
pattern RealSrcSpan :: RealSrcSpan -> Maybe BufSpan -> SrcSpan Source #
data RealSrcLoc #
Real Source Location
Represents a single point within a file
Instances
Eq RealSrcLoc | |
Defined in SrcLoc (==) :: RealSrcLoc -> RealSrcLoc -> Bool # (/=) :: RealSrcLoc -> RealSrcLoc -> Bool # | |
Ord RealSrcLoc | |
Defined in SrcLoc compare :: RealSrcLoc -> RealSrcLoc -> Ordering # (<) :: RealSrcLoc -> RealSrcLoc -> Bool # (<=) :: RealSrcLoc -> RealSrcLoc -> Bool # (>) :: RealSrcLoc -> RealSrcLoc -> Bool # (>=) :: RealSrcLoc -> RealSrcLoc -> Bool # max :: RealSrcLoc -> RealSrcLoc -> RealSrcLoc # min :: RealSrcLoc -> RealSrcLoc -> RealSrcLoc # | |
Show RealSrcLoc | |
Defined in SrcLoc showsPrec :: Int -> RealSrcLoc -> ShowS # show :: RealSrcLoc -> String # showList :: [RealSrcLoc] -> ShowS # | |
Outputable RealSrcLoc | |
Defined in SrcLoc ppr :: RealSrcLoc -> SDoc # pprPrec :: Rational -> RealSrcLoc -> SDoc # |
containsSpan :: RealSrcSpan -> RealSrcSpan -> Bool #
Tests whether the first span "contains" the other span, meaning that it covers at least as much source code. True where spans are equal.
mkGeneralSrcSpan :: FastString -> SrcSpan #
Create a "bad" SrcSpan
that has not location information
mkRealSrcSpan :: RealSrcLoc -> RealSrcLoc -> RealSrcSpan #
Create a SrcSpan
between two points in a file
mkRealSrcLoc :: FastString -> Int -> Int -> RealSrcLoc #
getRealSrcSpan :: RealLocated a -> RealSrcSpan Source #
realSrcLocSpan :: RealSrcLoc -> RealSrcSpan #
realSrcSpanEnd :: RealSrcSpan -> RealSrcLoc #
Determines whether a span is enclosed by another one
Built-in "bad" SrcSpan
s for common sources of location uncertainty
srcSpanStart :: SrcSpan -> SrcLoc #
srcSpanStartLine :: RealSrcSpan -> Int #
srcSpanStartCol :: RealSrcSpan -> Int #
srcSpanEnd :: SrcSpan -> SrcLoc #
srcSpanEndLine :: RealSrcSpan -> Int #
srcSpanEndCol :: RealSrcSpan -> Int #
srcSpanFile :: RealSrcSpan -> FastString #
srcLocCol :: RealSrcLoc -> Int #
Raises an error when used on a "bad" SrcLoc
srcLocFile :: RealSrcLoc -> FastString #
Gives the filename of the RealSrcLoc
srcLocLine :: RealSrcLoc -> Int #
Raises an error when used on a "bad" SrcLoc
noLoc :: HasSrcSpan a => SrcSpanLess a -> a #
Finder
data FindResult #
The result of searching for an imported module.
NB: FindResult manages both user source-import lookups
(which can result in Module
) as well as direct imports
for interfaces (which always result in InstalledModule
).
Found ModLocation Module | The module was found |
NoPackage UnitId | The requested package was not found |
FoundMultiple [(Module, ModuleOrigin)] | _Error_: both in multiple packages |
NotFound | Not found |
|
mkHomeModLocation :: DynFlags -> ModuleName -> FilePath -> IO ModLocation #
addBootSuffixLocnOut :: ModLocation -> ModLocation Source #
Add the -boot
suffix to all output file paths associated with the
module, not including the input file itself
findObjectLinkableMaybe :: Module -> ModLocation -> IO (Maybe Linkable) #
data InstalledFindResult #
Module and Package
data ModuleOrigin #
Package state is all stored in DynFlags
, including the details of
all packages, which packages are exposed, and which modules they
provide.
The package state is computed by initPackages
, and kept in DynFlags.
It is influenced by various package flags:
-package pkg
and-package-id pkg
causepkg
to become exposed. If-hide-all-packages
was not specified, these commands also cause all other packages with the same name to become hidden.-hide-package pkg
causespkg
to become hidden.- (there are a few more flags, check below for their semantics)
The package state has the following properties.
- Let
exposedPackages
be the set of packages thus exposed. LetdepExposedPackages
be the transitive closure fromexposedPackages
of their dependencies. - When searching for a module from a preload import declaration,
only the exposed modules in
exposedPackages
are valid. - When searching for a module from an implicit import, all modules
from
depExposedPackages
are valid. - When linking in a compilation manager mode, we link in packages the
program depends on (the compiler knows this list by the
time it gets to the link step). Also, we link in all packages
which were mentioned with preload
-package
flags on the command-line, or are a transitive dependency of same, or are "base"/"rts". The reason for this is that we might need packages which don't contain any Haskell modules, and therefore won't be discovered by the normal mechanism of dependency tracking.
Given a module name, there may be multiple ways it came into scope, possibly simultaneously. This data type tracks all the possible ways it could have come into scope. Warning: don't use the record functions, they're partial!
ModHidden | Module is hidden, and thus never will be available for import. (But maybe the user didn't realize), so we'll still keep track of these modules.) |
ModUnusable UnusablePackageReason | Module is unavailable because the package is unusable. |
ModOrigin | Module is public, and could have come from some places. |
|
Instances
Semigroup ModuleOrigin | |
Defined in Packages (<>) :: ModuleOrigin -> ModuleOrigin -> ModuleOrigin # sconcat :: NonEmpty ModuleOrigin -> ModuleOrigin # stimes :: Integral b => b -> ModuleOrigin -> ModuleOrigin # | |
Monoid ModuleOrigin | |
Defined in Packages mempty :: ModuleOrigin # mappend :: ModuleOrigin -> ModuleOrigin -> ModuleOrigin # mconcat :: [ModuleOrigin] -> ModuleOrigin # | |
Outputable ModuleOrigin | |
Defined in Packages ppr :: ModuleOrigin -> SDoc # pprPrec :: Rational -> ModuleOrigin -> SDoc # |
newtype PackageName #
Instances
Linker
Objects which have yet to be linked by the compiler
DotO FilePath | An object file (.o) |
DotA FilePath | Static archive file (.a) |
DotDLL FilePath | Dynamically linked library file (.so, .dll, .dylib) |
BCOs CompiledByteCode [SptEntry] | A byte-code object, lives only in memory. Also carries some static pointer table entries which should be loaded along with the BCOs. See Note [Grant plan for static forms] in StaticPtrTable. |
Information we can use to dynamically link modules into the compiler
LM | |
|
Unloading old objects ready for a new compilation sweep.
The compilation manager provides us with a list of linkables that it considers "stable", i.e. won't be recompiled this time around. For each of the modules current linked in memory,
- if the linkable is stable (and it's the same one -- the user may have recompiled the module on the side), we keep it,
- otherwise, we unload it.
- we also implicitly unload all temporary bindings at this point.
initDynLinker :: HscEnv -> IO () #
Initialise the dynamic linker. This entails
a) Calling the C initialisation procedure,
b) Loading any packages specified on the command line,
c) Loading any packages specified on the command line, now held in the
-l
options in v_Opt_l
,
d) Loading any .o/.dll
files specified on the command line, now held
in ldInputs
,
e) Loading any MacOS frameworks.
NOTE: This function is idempotent; if called more than once, it does nothing. This is useful in Template Haskell, where we call it before trying to link.
Hooks
type MetaHook (f :: Type -> Type) = MetaRequest -> LHsExpr GhcTc -> f MetaResult #
data MetaRequest #
The supported metaprogramming result types
MetaE (LHsExpr GhcPs -> MetaResult) | |
MetaP (LPat GhcPs -> MetaResult) | |
MetaT (LHsType GhcPs -> MetaResult) | |
MetaD ([LHsDecl GhcPs] -> MetaResult) | |
MetaAW (Serialized -> MetaResult) |
metaRequestAW :: Functor f => MetaHook f -> LHsExpr GhcTc -> f Serialized #
HPT
addToHpt :: HomePackageTable -> ModuleName -> HomeModInfo -> HomePackageTable #
addListToHpt :: HomePackageTable -> [(ModuleName, HomeModInfo)] -> HomePackageTable #
Driver-Make
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).
Target | |
|
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. |
mkModuleGraph :: [ModSummary] -> ModuleGraph #
GHCi
initObjLinker :: HscEnv -> IO () #
loadDLL :: HscEnv -> String -> IO (Maybe String) #
loadDLL loads a dynamic library using the OS's native linker (i.e. dlopen() on Unix, LoadLibrary() on Windows). It takes either an absolute pathname to the file, or a relative filename (e.g. "libfoo.so" or "foo.dll"). In the latter case, loadDLL searches the standard locations for the appropriate library.
Returns:
Nothing => success Just err_msg => failure
data InteractiveImport #
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
Show InteractiveImport Source # | |
Defined in Development.IDE.GHC.Orphans showsPrec :: Int -> InteractiveImport -> ShowS # show :: InteractiveImport -> String # showList :: [InteractiveImport] -> ShowS # | |
Outputable InteractiveImport | |
Defined in HscTypes ppr :: InteractiveImport -> SDoc # pprPrec :: Rational -> InteractiveImport -> SDoc # |
getContext :: GhcMonad m => m [InteractiveImport] #
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.
setContext :: GhcMonad m => [InteractiveImport] -> m () #
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
constructs the ic_rn_glb_env 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.)
parseImportDecl :: GhcMonad m => String -> m (ImportDecl GhcPs) #
A command-line warning message and the reason it arose
Warn | |
|
ModLocation
data ModLocation #
Module Location
Where a module lives on the file system: the actual locations of the .hs, .hi and .o files, if we have them
Instances
Show ModLocation | |
Defined in Module showsPrec :: Int -> ModLocation -> ShowS # show :: ModLocation -> String # showList :: [ModLocation] -> ShowS # | |
Outputable ModLocation | |
Defined in Module ppr :: ModLocation -> SDoc # pprPrec :: Rational -> ModLocation -> SDoc # |
pattern ModLocation :: Maybe FilePath -> FilePath -> FilePath -> ModLocation Source #
ml_hs_file :: ModLocation -> Maybe FilePath #
ml_obj_file :: ModLocation -> FilePath #
ml_hi_file :: ModLocation -> FilePath #
ml_hie_file :: ModLocation -> FilePath Source #
DataCon
dataConExTyCoVars :: DataCon -> [TyCoVar] Source #
Role
Instances
Eq Role | |
Data Role | |
Defined in CoAxiom gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Role -> c Role # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Role # dataTypeOf :: Role -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Role) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Role) # gmapT :: (forall b. Data b => b -> b) -> Role -> Role # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Role -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Role -> r # gmapQ :: (forall d. Data d => d -> u) -> Role -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Role -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Role -> m Role # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Role -> m Role # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Role -> m Role # | |
Ord Role | |
Binary Role | |
Outputable Role | |
Annotate (Maybe Role) | |
Panic
Util Module re-exports
isKindLevel :: TypeOrKind -> Bool #
isTypeLevel :: TypeOrKind -> Bool #
mkIntWithInf :: Int -> IntWithInf #
Inject any integer into an IntWithInf
treatZeroAsInf :: Int -> IntWithInf #
Turn a positive number into an IntWithInf
, where 0 represents infinity
intGtLimit :: Int -> IntWithInf -> Bool #
infinity :: IntWithInf #
A representation of infinity
integralFractionalLit :: Bool -> Integer -> FractionalLit #
mkFractionalLit :: Real a => a -> FractionalLit #
mkIntegralLit :: Integral a => a -> IntegralLit #
isEarlyActive :: Activation -> Bool #
isAlwaysActive :: Activation -> Bool #
isNeverActive :: Activation -> Bool #
competesWith :: Activation -> Activation -> Bool #
isActiveIn :: PhaseNum -> Activation -> Bool #
isActive :: CompilerPhase -> Activation -> Bool #
pprInlineDebug :: InlinePragma -> SDoc #
pprInline :: InlinePragma -> SDoc #
inlinePragmaSat :: InlinePragma -> Maybe Arity #
isAnyInlinePragma :: InlinePragma -> Bool #
isInlinablePragma :: InlinePragma -> Bool #
isInlinePragma :: InlinePragma -> Bool #
noUserInlineSpec :: InlineSpec -> Bool #
isFunLike :: RuleMatchInfo -> Bool #
isConLike :: RuleMatchInfo -> Bool #
pprWithSourceText :: SourceText -> SDoc -> SDoc #
Special combinator for showing string literals.
failed :: SuccessFlag -> Bool #
succeeded :: SuccessFlag -> Bool #
successIf :: Bool -> SuccessFlag #
zapFragileOcc :: OccInfo -> OccInfo #
isStrongLoopBreaker :: OccInfo -> Bool #
isWeakLoopBreaker :: OccInfo -> Bool #
isAlwaysTailCalled :: OccInfo -> Bool #
zapOccTailCallInfo :: OccInfo -> OccInfo #
tailCallInfo :: OccInfo -> TailCallInfo #
seqOccInfo :: OccInfo -> () #
isManyOccs :: OccInfo -> Bool #
:: (a -> SDoc) | The pretty printing function to use |
-> a | The things to be pretty printed |
-> ConTag | Alternative (one-based) |
-> Arity | Arity |
-> SDoc |
|
Pretty print an alternative in an unboxed sum e.g. "| a | |".
tupleParens :: TupleSort -> SDoc -> SDoc #
boxityTupleSort :: Boxity -> TupleSort #
tupleSortBoxity :: TupleSort -> Boxity #
hasOverlappingFlag :: OverlapMode -> Bool #
hasOverlappableFlag :: OverlapMode -> Bool #
hasIncoherentFlag :: OverlapMode -> Bool #
isGenerated :: Origin -> Bool #
boolToRecFlag :: Bool -> RecFlag #
isTopLevel :: TopLevelFlag -> Bool #
isNotTopLevel :: TopLevelFlag -> Bool #
funTyFixity :: Fixity #
negateFixity :: Fixity #
defaultFixity :: Fixity #
minPrecedence :: Int #
maxPrecedence :: Int #
pprRuleName :: RuleName -> SDoc #
pprWarningTxtForMsg :: WarningTxt -> SDoc #
bumpVersion :: Version -> Version #
isPromoted :: PromotionFlag -> Bool #
bestOneShot :: OneShotInfo -> OneShotInfo -> OneShotInfo #
worstOneShot :: OneShotInfo -> OneShotInfo -> OneShotInfo #
hasNoOneShotInfo :: OneShotInfo -> Bool #
isOneShotInfo :: OneShotInfo -> Bool #
noOneShotInfo :: OneShotInfo #
It is always safe to assume that an Id
has no lambda-bound variable information
alignmentOf :: Int -> Alignment #
mkAlignment :: Int -> Alignment #
pickLR :: LeftOrRight -> (a, a) -> a #
data LeftOrRight #
Instances
Eq LeftOrRight | |
Defined in BasicTypes (==) :: LeftOrRight -> LeftOrRight -> Bool # (/=) :: LeftOrRight -> LeftOrRight -> Bool # | |
Data LeftOrRight | |
Defined in BasicTypes gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> LeftOrRight -> c LeftOrRight # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c LeftOrRight # toConstr :: LeftOrRight -> Constr # dataTypeOf :: LeftOrRight -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c LeftOrRight) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c LeftOrRight) # gmapT :: (forall b. Data b => b -> b) -> LeftOrRight -> LeftOrRight # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LeftOrRight -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LeftOrRight -> r # gmapQ :: (forall d. Data d => d -> u) -> LeftOrRight -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> LeftOrRight -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> LeftOrRight -> m LeftOrRight # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LeftOrRight -> m LeftOrRight # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LeftOrRight -> m LeftOrRight # | |
Outputable LeftOrRight | |
Defined in BasicTypes ppr :: LeftOrRight -> SDoc # pprPrec :: Rational -> LeftOrRight -> SDoc # |
The number of value arguments that can be applied to a value before it does "real work". So: fib 100 has arity 0 x -> fib x has arity 1 See also Note [Definition of arity] in CoreArity
The number of arguments that a join point takes. Unlike the arity of a function, this is a purely syntactic property and is fixed when the join point is created (or converted from a value). Both type and value arguments are counted.
Constructor Tag
Type of the tags associated with each constructor possibility or superclass selector
A power-of-two alignment
Instances
Eq Alignment | |
Ord Alignment | |
Defined in BasicTypes | |
Outputable Alignment | |
data OneShotInfo #
If the Id
is a lambda-bound variable then it may have lambda-bound
variable info. Sometimes we know whether the lambda binding this variable
is a "one-shot" lambda; that is, whether it is applied at most once.
This information may be useful in optimisation, as computations may safely be floated inside such a lambda without risk of duplicating work.
NoOneShotInfo | No information |
OneShotLam | The lambda is applied at most once. |
Instances
Eq OneShotInfo | |
Defined in BasicTypes (==) :: OneShotInfo -> OneShotInfo -> Bool # (/=) :: OneShotInfo -> OneShotInfo -> Bool # | |
Outputable OneShotInfo | |
Defined in BasicTypes ppr :: OneShotInfo -> SDoc # pprPrec :: Rational -> OneShotInfo -> SDoc # |
data PromotionFlag #
Is a TyCon a promoted data constructor or just a normal type constructor?
Instances
Eq PromotionFlag | |
Defined in BasicTypes (==) :: PromotionFlag -> PromotionFlag -> Bool # (/=) :: PromotionFlag -> PromotionFlag -> Bool # | |
Data PromotionFlag | |
Defined in BasicTypes gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PromotionFlag -> c PromotionFlag # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c PromotionFlag # toConstr :: PromotionFlag -> Constr # dataTypeOf :: PromotionFlag -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c PromotionFlag) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PromotionFlag) # gmapT :: (forall b. Data b => b -> b) -> PromotionFlag -> PromotionFlag # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PromotionFlag -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PromotionFlag -> r # gmapQ :: (forall d. Data d => d -> u) -> PromotionFlag -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> PromotionFlag -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> PromotionFlag -> m PromotionFlag # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PromotionFlag -> m PromotionFlag # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PromotionFlag -> m PromotionFlag # |
data FunctionOrData #
Instances
data StringLiteral #
A String Literal in the source, including its original raw format for use by source to source manipulation tools.
Instances
Eq StringLiteral | |
Defined in BasicTypes (==) :: StringLiteral -> StringLiteral -> Bool # (/=) :: StringLiteral -> StringLiteral -> Bool # | |
Data StringLiteral | |
Defined in BasicTypes gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> StringLiteral -> c StringLiteral # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c StringLiteral # toConstr :: StringLiteral -> Constr # dataTypeOf :: StringLiteral -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c StringLiteral) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c StringLiteral) # gmapT :: (forall b. Data b => b -> b) -> StringLiteral -> StringLiteral # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> StringLiteral -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> StringLiteral -> r # gmapQ :: (forall d. Data d => d -> u) -> StringLiteral -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> StringLiteral -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> StringLiteral -> m StringLiteral # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> StringLiteral -> m StringLiteral # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> StringLiteral -> m StringLiteral # | |
Outputable StringLiteral | |
Defined in BasicTypes ppr :: StringLiteral -> SDoc # pprPrec :: Rational -> StringLiteral -> SDoc # | |
Annotate StringLiteral | |
Defined in Language.Haskell.GHC.ExactPrint.Annotater markAST :: SrcSpan -> StringLiteral -> Annotated () # |
data WarningTxt #
Warning Text
reason/explanation from a WARNING or DEPRECATED pragma
WarningTxt (Located SourceText) [Located StringLiteral] | |
DeprecatedTxt (Located SourceText) [Located StringLiteral] |
Instances
Eq WarningTxt | |
Defined in BasicTypes (==) :: WarningTxt -> WarningTxt -> Bool # (/=) :: WarningTxt -> WarningTxt -> Bool # | |
Data WarningTxt | |
Defined in BasicTypes gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> WarningTxt -> c WarningTxt # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c WarningTxt # toConstr :: WarningTxt -> Constr # dataTypeOf :: WarningTxt -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c WarningTxt) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c WarningTxt) # gmapT :: (forall b. Data b => b -> b) -> WarningTxt -> WarningTxt # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> WarningTxt -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> WarningTxt -> r # gmapQ :: (forall d. Data d => d -> u) -> WarningTxt -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> WarningTxt -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> WarningTxt -> m WarningTxt # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> WarningTxt -> m WarningTxt # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> WarningTxt -> m WarningTxt # | |
Outputable WarningTxt | |
Defined in BasicTypes ppr :: WarningTxt -> SDoc # pprPrec :: Rational -> WarningTxt -> SDoc # | |
Annotate WarningTxt | |
Defined in Language.Haskell.GHC.ExactPrint.Annotater markAST :: SrcSpan -> WarningTxt -> Annotated () # |
type RuleName = FastString #
Instances
Eq Fixity | |
Data Fixity | |
Defined in BasicTypes gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Fixity -> c Fixity # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Fixity # toConstr :: Fixity -> Constr # dataTypeOf :: Fixity -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Fixity) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Fixity) # gmapT :: (forall b. Data b => b -> b) -> Fixity -> Fixity # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Fixity -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Fixity -> r # gmapQ :: (forall d. Data d => d -> u) -> Fixity -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Fixity -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Fixity -> m Fixity # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Fixity -> m Fixity # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Fixity -> m Fixity # | |
Outputable Fixity | |
data FixityDirection #
Instances
Eq FixityDirection | |
Defined in BasicTypes (==) :: FixityDirection -> FixityDirection -> Bool # (/=) :: FixityDirection -> FixityDirection -> Bool # | |
Data FixityDirection | |
Defined in BasicTypes 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 # | |
Outputable FixityDirection | |
Defined in BasicTypes ppr :: FixityDirection -> SDoc # pprPrec :: Rational -> FixityDirection -> SDoc # |
data LexicalFixity #
Captures the fixity of declarations as they are parsed. This is not necessarily the same as the fixity declaration, as the normal fixity may be overridden using parens or backticks.
Instances
Eq LexicalFixity | |
Defined in BasicTypes (==) :: LexicalFixity -> LexicalFixity -> Bool # (/=) :: LexicalFixity -> LexicalFixity -> Bool # | |
Data LexicalFixity | |
Defined in BasicTypes gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> LexicalFixity -> c LexicalFixity # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c LexicalFixity # toConstr :: LexicalFixity -> Constr # dataTypeOf :: LexicalFixity -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c LexicalFixity) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c LexicalFixity) # gmapT :: (forall b. Data b => b -> b) -> LexicalFixity -> LexicalFixity # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LexicalFixity -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LexicalFixity -> r # gmapQ :: (forall d. Data d => d -> u) -> LexicalFixity -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> LexicalFixity -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> LexicalFixity -> m LexicalFixity # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LexicalFixity -> m LexicalFixity # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LexicalFixity -> m LexicalFixity # | |
Outputable LexicalFixity | |
Defined in BasicTypes ppr :: LexicalFixity -> SDoc # pprPrec :: Rational -> LexicalFixity -> SDoc # |
data TopLevelFlag #
Instances
Outputable TopLevelFlag | |
Defined in BasicTypes ppr :: TopLevelFlag -> SDoc # pprPrec :: Rational -> TopLevelFlag -> SDoc # |
Instances
Eq Boxity | |
Data Boxity | |
Defined in BasicTypes gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Boxity -> c Boxity # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Boxity # toConstr :: Boxity -> Constr # dataTypeOf :: Boxity -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Boxity) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Boxity) # gmapT :: (forall b. Data b => b -> b) -> Boxity -> Boxity # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Boxity -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Boxity -> r # gmapQ :: (forall d. Data d => d -> u) -> Boxity -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Boxity -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Boxity -> m Boxity # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Boxity -> m Boxity # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Boxity -> m Boxity # | |
Outputable Boxity | |
Recursivity Flag
Instances
Eq RecFlag | |
Data RecFlag | |
Defined in BasicTypes gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> RecFlag -> c RecFlag # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c RecFlag # toConstr :: RecFlag -> Constr # dataTypeOf :: RecFlag -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c RecFlag) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c RecFlag) # gmapT :: (forall b. Data b => b -> b) -> RecFlag -> RecFlag # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> RecFlag -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> RecFlag -> r # gmapQ :: (forall d. Data d => d -> u) -> RecFlag -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> RecFlag -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> RecFlag -> m RecFlag # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> RecFlag -> m RecFlag # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> RecFlag -> m RecFlag # | |
Outputable RecFlag | |
Instances
Eq Origin | |
Data Origin | |
Defined in BasicTypes gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Origin -> c Origin # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Origin # toConstr :: Origin -> Constr # dataTypeOf :: Origin -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Origin) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Origin) # gmapT :: (forall b. Data b => b -> b) -> Origin -> Origin # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Origin -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Origin -> r # gmapQ :: (forall d. Data d => d -> u) -> Origin -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Origin -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Origin -> m Origin # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Origin -> m Origin # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Origin -> m Origin # | |
Outputable Origin | |
data OverlapFlag #
The semantics allowed for overlapping instances for a particular
instance. See Note [Safe Haskell isSafeOverlap] (in hs
) for a
explanation of the isSafeOverlap
field.
AnnKeywordId
:AnnOpen
'{-# OVERLAPPABLE'
or'{-# OVERLAPPING'
or'{-# OVERLAPS'
or'{-# INCOHERENT'
,AnnClose
`#-}`
,
Instances
Eq OverlapFlag | |
Defined in BasicTypes (==) :: OverlapFlag -> OverlapFlag -> Bool # (/=) :: OverlapFlag -> OverlapFlag -> Bool # | |
Data OverlapFlag | |
Defined in BasicTypes gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> OverlapFlag -> c OverlapFlag # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c OverlapFlag # toConstr :: OverlapFlag -> Constr # dataTypeOf :: OverlapFlag -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c OverlapFlag) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c OverlapFlag) # gmapT :: (forall b. Data b => b -> b) -> OverlapFlag -> OverlapFlag # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> OverlapFlag -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> OverlapFlag -> r # gmapQ :: (forall d. Data d => d -> u) -> OverlapFlag -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> OverlapFlag -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> OverlapFlag -> m OverlapFlag # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> OverlapFlag -> m OverlapFlag # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> OverlapFlag -> m OverlapFlag # | |
Outputable OverlapFlag | |
Defined in BasicTypes ppr :: OverlapFlag -> SDoc # pprPrec :: Rational -> OverlapFlag -> SDoc # |
data OverlapMode #
NoOverlap SourceText | This instance must not overlap another |
Overlappable SourceText | Silently ignore this instance if you find a more specific one that matches the constraint you are trying to resolve Example: constraint (Foo [Int]) instance Foo [Int] instance {--} Foo [a] Since the second instance has the Overlappable flag, the first instance will be chosen (otherwise its ambiguous which to choose) |
Overlapping SourceText | Silently ignore any more general instances that may be used to solve the constraint. Example: constraint (Foo [Int]) instance {--} Foo [Int] instance Foo [a] Since the first instance has the Overlapping flag, the second---more general---instance will be ignored (otherwise it is ambiguous which to choose) |
Overlaps SourceText | Equivalent to having both |
Incoherent SourceText | Behave like Overlappable and Overlapping, and in addition pick an an arbitrary one if there are multiple matching candidates, and don't worry about later instantiation Example: constraint (Foo [b])
instance {-# INCOHERENT -} Foo [Int]
instance Foo [a]
Without the Incoherent flag, we'd complain that
instantiating |
Instances
Eq OverlapMode | |
Defined in BasicTypes (==) :: OverlapMode -> OverlapMode -> Bool # (/=) :: OverlapMode -> OverlapMode -> Bool # | |
Data OverlapMode | |
Defined in BasicTypes gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> OverlapMode -> c OverlapMode # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c OverlapMode # toConstr :: OverlapMode -> Constr # dataTypeOf :: OverlapMode -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c OverlapMode) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c OverlapMode) # gmapT :: (forall b. Data b => b -> b) -> OverlapMode -> OverlapMode # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> OverlapMode -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> OverlapMode -> r # gmapQ :: (forall d. Data d => d -> u) -> OverlapMode -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> OverlapMode -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> OverlapMode -> m OverlapMode # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> OverlapMode -> m OverlapMode # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> OverlapMode -> m OverlapMode # | |
Outputable OverlapMode | |
Defined in BasicTypes ppr :: OverlapMode -> SDoc # pprPrec :: Rational -> OverlapMode -> SDoc # | |
Annotate OverlapMode | |
Defined in Language.Haskell.GHC.ExactPrint.Annotater markAST :: SrcSpan -> OverlapMode -> Annotated () # | |
ToHie (Located OverlapMode) | |
Defined in Compat.HieAst toHie :: Located OverlapMode -> HieM [HieAST Type] |
Instances
Eq TupleSort | |
Data TupleSort | |
Defined in BasicTypes gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TupleSort -> c TupleSort # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TupleSort # toConstr :: TupleSort -> Constr # dataTypeOf :: TupleSort -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TupleSort) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TupleSort) # gmapT :: (forall b. Data b => b -> b) -> TupleSort -> TupleSort # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TupleSort -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TupleSort -> r # gmapQ :: (forall d. Data d => d -> u) -> TupleSort -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> TupleSort -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> TupleSort -> m TupleSort # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TupleSort -> m TupleSort # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TupleSort -> m TupleSort # | |
Outputable TupleSort | |
identifier Occurrence Information
ManyOccs | There are many occurrences, or unknown occurrences |
| |
IAmDead | Marks unused variables. Sometimes useful for lambda and case-bound variables. |
OneOcc | Occurs exactly once (per branch), not inside a rule |
| |
IAmALoopBreaker | This identifier breaks a loop of mutually recursive functions. The field marks whether it is only a loop breaker due to a reference in a rule |
|
type InterestingCxt = Bool #
Interesting Context
data TailCallInfo #
Instances
Eq TailCallInfo | |
Defined in BasicTypes (==) :: TailCallInfo -> TailCallInfo -> Bool # (/=) :: TailCallInfo -> TailCallInfo -> Bool # | |
Outputable TailCallInfo | |
Defined in BasicTypes ppr :: TailCallInfo -> SDoc # pprPrec :: Rational -> TailCallInfo -> SDoc # |
data DefMethSpec ty #
Default Method Specification
Instances
Binary (DefMethSpec IfaceType) | |
Outputable (DefMethSpec ty) | |
Defined in BasicTypes ppr :: DefMethSpec ty -> SDoc # pprPrec :: Rational -> DefMethSpec ty -> SDoc # |
data SuccessFlag #
Instances
Outputable SuccessFlag | |
Defined in BasicTypes ppr :: SuccessFlag -> SDoc # pprPrec :: Rational -> SuccessFlag -> SDoc # |
data SourceText #
SourceText String | |
NoSourceText | For when code is generated, e.g. TH, deriving. The pretty printer will then make its own representation of the item. |
Instances
Eq SourceText | |
Defined in BasicTypes (==) :: SourceText -> SourceText -> Bool # (/=) :: SourceText -> SourceText -> Bool # | |
Data SourceText | |
Defined in BasicTypes gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SourceText -> c SourceText # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SourceText # toConstr :: SourceText -> Constr # dataTypeOf :: SourceText -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SourceText) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SourceText) # gmapT :: (forall b. Data b => b -> b) -> SourceText -> SourceText # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SourceText -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SourceText -> r # gmapQ :: (forall d. Data d => d -> u) -> SourceText -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> SourceText -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> SourceText -> m SourceText # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SourceText -> m SourceText # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SourceText -> m SourceText # | |
Show SourceText | |
Defined in BasicTypes showsPrec :: Int -> SourceText -> ShowS # show :: SourceText -> String # showList :: [SourceText] -> ShowS # | |
Outputable SourceText | |
Defined in BasicTypes ppr :: SourceText -> SDoc # pprPrec :: Rational -> SourceText -> SDoc # | |
Annotate (SourceText, FastString) | |
Defined in Language.Haskell.GHC.ExactPrint.Annotater markAST :: SrcSpan -> (SourceText, FastString) -> Annotated () # |
data CompilerPhase #
Instances
Outputable CompilerPhase | |
Defined in BasicTypes ppr :: CompilerPhase -> SDoc # pprPrec :: Rational -> CompilerPhase -> SDoc # |
data Activation #
Instances
Eq Activation | |
Defined in BasicTypes (==) :: Activation -> Activation -> Bool # (/=) :: Activation -> Activation -> Bool # | |
Data Activation | |
Defined in BasicTypes gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Activation -> c Activation # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Activation # toConstr :: Activation -> Constr # dataTypeOf :: Activation -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Activation) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Activation) # gmapT :: (forall b. Data b => b -> b) -> Activation -> Activation # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Activation -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Activation -> r # gmapQ :: (forall d. Data d => d -> u) -> Activation -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Activation -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Activation -> m Activation # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Activation -> m Activation # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Activation -> m Activation # | |
Outputable Activation | |
Defined in BasicTypes ppr :: Activation -> SDoc # pprPrec :: Rational -> Activation -> SDoc # |
data RuleMatchInfo #
Rule Match Information
Instances
Eq RuleMatchInfo | |
Defined in BasicTypes (==) :: RuleMatchInfo -> RuleMatchInfo -> Bool # (/=) :: RuleMatchInfo -> RuleMatchInfo -> Bool # | |
Data RuleMatchInfo | |
Defined in BasicTypes gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> RuleMatchInfo -> c RuleMatchInfo # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c RuleMatchInfo # toConstr :: RuleMatchInfo -> Constr # dataTypeOf :: RuleMatchInfo -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c RuleMatchInfo) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c RuleMatchInfo) # gmapT :: (forall b. Data b => b -> b) -> RuleMatchInfo -> RuleMatchInfo # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> RuleMatchInfo -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> RuleMatchInfo -> r # gmapQ :: (forall d. Data d => d -> u) -> RuleMatchInfo -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> RuleMatchInfo -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> RuleMatchInfo -> m RuleMatchInfo # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> RuleMatchInfo -> m RuleMatchInfo # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> RuleMatchInfo -> m RuleMatchInfo # | |
Show RuleMatchInfo | |
Defined in BasicTypes showsPrec :: Int -> RuleMatchInfo -> ShowS # show :: RuleMatchInfo -> String # showList :: [RuleMatchInfo] -> ShowS # | |
Outputable RuleMatchInfo | |
Defined in BasicTypes ppr :: RuleMatchInfo -> SDoc # pprPrec :: Rational -> RuleMatchInfo -> SDoc # |
data InlinePragma #
InlinePragma | |
|
Instances
Eq InlinePragma | |
Defined in BasicTypes (==) :: InlinePragma -> InlinePragma -> Bool # (/=) :: InlinePragma -> InlinePragma -> Bool # | |
Data InlinePragma | |
Defined in BasicTypes gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> InlinePragma -> c InlinePragma # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c InlinePragma # toConstr :: InlinePragma -> Constr # dataTypeOf :: InlinePragma -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c InlinePragma) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c InlinePragma) # gmapT :: (forall b. Data b => b -> b) -> InlinePragma -> InlinePragma # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> InlinePragma -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> InlinePragma -> r # gmapQ :: (forall d. Data d => d -> u) -> InlinePragma -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> InlinePragma -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> InlinePragma -> m InlinePragma # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> InlinePragma -> m InlinePragma # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> InlinePragma -> m InlinePragma # | |
Outputable InlinePragma | |
Defined in BasicTypes ppr :: InlinePragma -> SDoc # pprPrec :: Rational -> InlinePragma -> SDoc # |
data InlineSpec #
Inline Specification
Instances
Eq InlineSpec | |
Defined in BasicTypes (==) :: InlineSpec -> InlineSpec -> Bool # (/=) :: InlineSpec -> InlineSpec -> Bool # | |
Data InlineSpec | |
Defined in BasicTypes gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> InlineSpec -> c InlineSpec # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c InlineSpec # toConstr :: InlineSpec -> Constr # dataTypeOf :: InlineSpec -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c InlineSpec) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c InlineSpec) # gmapT :: (forall b. Data b => b -> b) -> InlineSpec -> InlineSpec # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> InlineSpec -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> InlineSpec -> r # gmapQ :: (forall d. Data d => d -> u) -> InlineSpec -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> InlineSpec -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> InlineSpec -> m InlineSpec # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> InlineSpec -> m InlineSpec # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> InlineSpec -> m InlineSpec # | |
Show InlineSpec | |
Defined in BasicTypes showsPrec :: Int -> InlineSpec -> ShowS # show :: InlineSpec -> String # showList :: [InlineSpec] -> ShowS # | |
Outputable InlineSpec | |
Defined in BasicTypes ppr :: InlineSpec -> SDoc # pprPrec :: Rational -> InlineSpec -> SDoc # |
data IntegralLit #
Integral Literal
Used (instead of Integer) to represent negative zegative zero which is required for NegativeLiterals extension to correctly parse `-0::Double` as negative zero. See also #13211.
Instances
data FractionalLit #
Fractional Literal
Used (instead of Rational) to represent exactly the floating point literal that we encountered in the user's source program. This allows us to pretty-print exactly what the user wrote, which is important e.g. for floating point numbers that can't represented as Doubles (we used to via Double for pretty-printing). See also #2245.
Instances
data IntWithInf #
An integer or infinity
Instances
Eq IntWithInf | |
Defined in BasicTypes (==) :: IntWithInf -> IntWithInf -> Bool # (/=) :: IntWithInf -> IntWithInf -> Bool # | |
Num IntWithInf | |
Defined in BasicTypes (+) :: IntWithInf -> IntWithInf -> IntWithInf # (-) :: IntWithInf -> IntWithInf -> IntWithInf # (*) :: IntWithInf -> IntWithInf -> IntWithInf # negate :: IntWithInf -> IntWithInf # abs :: IntWithInf -> IntWithInf # signum :: IntWithInf -> IntWithInf # fromInteger :: Integer -> IntWithInf # | |
Ord IntWithInf | |
Defined in BasicTypes compare :: IntWithInf -> IntWithInf -> Ordering # (<) :: IntWithInf -> IntWithInf -> Bool # (<=) :: IntWithInf -> IntWithInf -> Bool # (>) :: IntWithInf -> IntWithInf -> Bool # (>=) :: IntWithInf -> IntWithInf -> Bool # max :: IntWithInf -> IntWithInf -> IntWithInf # min :: IntWithInf -> IntWithInf -> IntWithInf # | |
Outputable IntWithInf | |
Defined in BasicTypes ppr :: IntWithInf -> SDoc # pprPrec :: Rational -> IntWithInf -> SDoc # |
data SpliceExplicitFlag #
ExplicitSplice | = $(f x y) |
ImplicitSplice | = f x y, i.e. a naked top level expression |
Instances
Data SpliceExplicitFlag | |
Defined in BasicTypes gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SpliceExplicitFlag -> c SpliceExplicitFlag # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SpliceExplicitFlag # toConstr :: SpliceExplicitFlag -> Constr # dataTypeOf :: SpliceExplicitFlag -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SpliceExplicitFlag) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SpliceExplicitFlag) # gmapT :: (forall b. Data b => b -> b) -> SpliceExplicitFlag -> SpliceExplicitFlag # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SpliceExplicitFlag -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SpliceExplicitFlag -> r # gmapQ :: (forall d. Data d => d -> u) -> SpliceExplicitFlag -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> SpliceExplicitFlag -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> SpliceExplicitFlag -> m SpliceExplicitFlag # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SpliceExplicitFlag -> m SpliceExplicitFlag # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SpliceExplicitFlag -> m SpliceExplicitFlag # |
data TypeOrKind #
Flag to see whether we're type-checking terms or kind-checking types
Instances
Eq TypeOrKind | |
Defined in BasicTypes (==) :: TypeOrKind -> TypeOrKind -> Bool # (/=) :: TypeOrKind -> TypeOrKind -> Bool # | |
Outputable TypeOrKind | |
Defined in BasicTypes ppr :: TypeOrKind -> SDoc # pprPrec :: Rational -> TypeOrKind -> SDoc # |
module Class
coercionKind :: Coercion -> Pair Type #
If it is the case that
c :: (t1 ~ t2)
i.e. the kind of c
relates t1
and t2
, then coercionKind c = Pair t1 t2
.
module Predicate
module ConLike
module CoreUtils
Extract the type constructor, type argument, data constructor and it's representation argument types from a type if it is a product type.
Precisely, we return Just
for any type that is all of:
- Concrete (i.e. constructors visible)
- Single-constructor
- Not existentially quantified
Whether the type is a data
type or a newtype
promoteDataCon :: DataCon -> TyCon #
dataConUserTyVarsArePermuted :: DataCon -> Bool #
Were the type variables of the data con written in a different order than the regular order (universal tyvars followed by existential tyvars)?
This is not a cheap test, so we minimize its use in GHC as much as possible.
Currently, its only call site in the GHC codebase is in mkDataConRep
in
MkId, and so dataConUserTyVarsArePermuted
is only called at most once
during a data constructor's lifetime.
dataConCannotMatch :: [Type] -> DataCon -> Bool #
classDataCon :: Class -> DataCon #
specialPromotedDc :: DataCon -> Bool #
Should this DataCon be allowed in a type even without -XDataKinds? Currently, only Lifted & Unlifted
isVanillaDataCon :: DataCon -> Bool #
Vanilla DataCon
s are those that are nice boring Haskell 98 constructors
isUnboxedTupleCon :: DataCon -> Bool #
isTupleDataCon :: DataCon -> Bool #
dataConIdentity :: DataCon -> ByteString #
The string package:module.name
identifying a constructor, which is attached
to its info table and used by the GHCi debugger and the heap profiler
dataConRepArgTys :: DataCon -> [Type] #
Returns the arg types of the worker, including *all* non-dependent evidence, after any flattening has been done and without substituting for any type variables
dataConOrigArgTys :: DataCon -> [Type] #
Returns the argument types of the wrapper, excluding all dictionary arguments and without substituting for any type variables
:: DataCon | A datacon with no existentials or equality constraints However, it can have a dcTheta (notably it can be a class dictionary, with superclasses) |
-> [Type] | Instantiated at these types |
-> [Type] |
Finds the instantiated types of the arguments required to construct a
DataCon
representation
NB: these INCLUDE any dictionary args
but EXCLUDE the data-declaration context, which is discarded
It's all post-flattening etc; this is a representation type
dataConUserType :: DataCon -> Type #
The user-declared type of the data constructor in the nice-to-read form:
T :: forall a b. a -> b -> T [a]
rather than:
T :: forall a c. forall b. (c~[a]) => a -> b -> T c
The type variables are quantified in the order that the user wrote them.
See Note [DataCon user type variable binders]
.
NB: If the constructor is part of a data instance, the result type mentions the family tycon, not the internal one.
dataConOrigResTy :: DataCon -> Type #
dataConInstSig :: DataCon -> [Type] -> ([TyCoVar], ThetaType, [Type]) #
Instantiate the universal tyvars of a data con, returning ( instantiated existentials , instantiated constraints including dependent GADT equalities which are *also* listed in the instantiated existentials , instantiated args)
dataConSig :: DataCon -> ([TyCoVar], ThetaType, [Type], Type) #
The "signature" of the DataCon
returns, in order:
1) The result of dataConUnivAndExTyCoVars
,
2) All the ThetaType
s relating to the DataCon
(coercion, dictionary,
implicit parameter - whatever), including dependent GADT equalities.
Dependent GADT equalities are *also* listed in return value (1), so be
careful!
3) The type arguments to the constructor
4) The original result type of the DataCon
dataConBoxer :: DataCon -> Maybe DataConBoxer #
dataConImplBangs :: DataCon -> [HsImplBang] #
dataConRepStrictness :: DataCon -> [StrictnessMark] #
Give the demands on the arguments of a Core constructor application (Con dc args)
isNullaryRepDataCon :: DataCon -> Bool #
Return whether there are any argument types for this DataCon
s runtime representation type
See Note [DataCon arities]
isNullarySrcDataCon :: DataCon -> Bool #
Return whether there are any argument types for this DataCon
s original source type
See Note [DataCon arities]
dataConRepArity :: DataCon -> Arity #
Gives the number of actual fields in the representation of the data constructor. This may be more than appear in the source code; the extra ones are the existentially quantified dictionaries
dataConSrcBangs :: DataCon -> [HsSrcBang] #
Strictness/unpack annotations, from user; or, for imported
DataCons, from the interface file
The list is in one-to-one correspondence with the arity of the DataCon
dataConFieldType_maybe :: DataCon -> FieldLabelString -> Maybe (FieldLabel, Type) #
dataConFieldType :: DataCon -> FieldLabelString -> Type #
Extract the type for any given labelled field of the DataCon
dataConImplicitTyThings :: DataCon -> [TyThing] #
Find all the Id
s implicitly brought into scope by the data constructor. Currently,
the union of the dataConWorkId
and the dataConWrapId
dataConWrapId :: DataCon -> Id #
Returns an Id which looks like the Haskell-source constructor by using
the wrapper if it exists (see dataConWrapId_maybe
) and failing over to
the worker (see dataConWorkId
)
dataConWrapId_maybe :: DataCon -> Maybe Id #
Get the Id of the DataCon
wrapper: a function that wraps the "actual"
constructor so it has the type visible in the source program: c.f.
dataConWorkId
.
Returns Nothing if there is no wrapper, which occurs for an algebraic data
constructor and also for a newtype (whose constructor is inlined
compulsorily)
dataConWorkId :: DataCon -> Id #
dataConTheta :: DataCon -> ThetaType #
The *full* constraints on the constructor type, including dependent GADT equalities.
dataConEqSpec :: DataCon -> [EqSpec] #
Equalities derived from the result type of the data constructor, as written by the programmer in any GADT declaration. This includes *all* GADT-like equalities, including those written in by hand by the programmer.
dataConUnivAndExTyCoVars :: DataCon -> [TyCoVar] #
Both the universal and existential type/coercion variables of the constructor
dataConUnivTyVars :: DataCon -> [TyVar] #
The universally-quantified type variables of the constructor
dataConIsInfix :: DataCon -> Bool #
Should the DataCon
be presented infix?
dataConRepType :: DataCon -> Type #
The representation type of the data constructor, i.e. the sort type that will represent values of this type at runtime
dataConOrigTyCon :: DataCon -> TyCon #
The original type constructor used in the definition of this data constructor. In case of a data family instance, that will be the family type constructor.
dataConTagZ :: DataCon -> ConTagZ #
dataConTag :: DataCon -> ConTag #
The tag used for ordering DataCon
s
:: Name | |
-> Bool | Is the constructor declared infix? |
-> TyConRepName | TyConRepName for the promoted TyCon |
-> [HsSrcBang] | Strictness/unpack annotations, from user |
-> [FieldLabel] | Field labels for the constructor, if it is a record, otherwise empty |
-> [TyVar] | Universals. |
-> [TyCoVar] | Existentials. |
-> [TyVarBinder] | User-written |
-> [EqSpec] | GADT equalities |
-> KnotTied ThetaType | Theta-type occurring before the arguments proper |
-> [KnotTied Type] | Original argument types |
-> KnotTied Type | Original result type |
-> RuntimeRepInfo | See comments on |
-> KnotTied TyCon | Representation type constructor |
-> ConTag | Constructor tag |
-> ThetaType | The "stupid theta", context of the data
declaration e.g. |
-> Id | Worker Id |
-> DataConRep | Representation |
-> DataCon |
Build a new data constructor
isMarkedStrict :: StrictnessMark -> Bool #
isSrcUnpacked :: SrcUnpackedness -> Bool #
isSrcStrict :: SrcStrictness -> Bool #
isBanged :: HsImplBang -> Bool #
eqHsBang :: HsImplBang -> HsImplBang -> Bool #
Compare strictness annotations
substEqSpec :: TCvSubst -> EqSpec -> EqSpec #
Substitute in an EqSpec
. Precondition: if the LHS of the EqSpec
is mapped in the substitution, it is mapped to a type variable, not
a full type.
eqSpecPreds :: [EqSpec] -> ThetaType #
eqSpecPair :: EqSpec -> (TyVar, Type) #
eqSpecType :: EqSpec -> Type #
eqSpecTyVar :: EqSpec -> TyVar #
Haskell Source Bang
Bangs on data constructor arguments as the user wrote them in the source code.
(HsSrcBang _ SrcUnpack SrcLazy)
and
(HsSrcBang _ SrcUnpack NoSrcStrict)
(without StrictData) makes no sense, we
emit a warning (in checkValidDataCon) and treat it like
(HsSrcBang _ NoSrcUnpack SrcLazy)
Instances
Data HsSrcBang | |
Defined in DataCon gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsSrcBang -> c HsSrcBang # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HsSrcBang # toConstr :: HsSrcBang -> Constr # dataTypeOf :: HsSrcBang -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c HsSrcBang) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HsSrcBang) # gmapT :: (forall b. Data b => b -> b) -> HsSrcBang -> HsSrcBang # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsSrcBang -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsSrcBang -> r # gmapQ :: (forall d. Data d => d -> u) -> HsSrcBang -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsSrcBang -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsSrcBang -> m HsSrcBang # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsSrcBang -> m HsSrcBang # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsSrcBang -> m HsSrcBang # | |
Outputable HsSrcBang | |
data HsImplBang #
Haskell Implementation Bang
Bangs of data constructor arguments as generated by the compiler after consulting HsSrcBang, flags, etc.
HsLazy | Lazy field, or one with an unlifted type |
HsStrict | Strict but not unpacked field |
HsUnpack (Maybe Coercion) | Strict and unpacked field co :: arg-ty ~ product-ty HsBang |
Instances
Data HsImplBang | |
Defined in DataCon gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsImplBang -> c HsImplBang # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HsImplBang # toConstr :: HsImplBang -> Constr # dataTypeOf :: HsImplBang -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c HsImplBang) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HsImplBang) # gmapT :: (forall b. Data b => b -> b) -> HsImplBang -> HsImplBang # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsImplBang -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsImplBang -> r # gmapQ :: (forall d. Data d => d -> u) -> HsImplBang -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsImplBang -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsImplBang -> m HsImplBang # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsImplBang -> m HsImplBang # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsImplBang -> m HsImplBang # | |
Outputable HsImplBang | |
Defined in DataCon ppr :: HsImplBang -> SDoc # pprPrec :: Rational -> HsImplBang -> SDoc # |
data SrcStrictness #
Source Strictness
What strictness annotation the user wrote
SrcLazy | Lazy, ie '~' |
SrcStrict | Strict, ie |
NoSrcStrict | no strictness annotation |
Instances
Eq SrcStrictness | |
Defined in DataCon (==) :: SrcStrictness -> SrcStrictness -> Bool # (/=) :: SrcStrictness -> SrcStrictness -> Bool # | |
Data SrcStrictness | |
Defined in DataCon gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SrcStrictness -> c SrcStrictness # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SrcStrictness # toConstr :: SrcStrictness -> Constr # dataTypeOf :: SrcStrictness -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SrcStrictness) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SrcStrictness) # gmapT :: (forall b. Data b => b -> b) -> SrcStrictness -> SrcStrictness # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SrcStrictness -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SrcStrictness -> r # gmapQ :: (forall d. Data d => d -> u) -> SrcStrictness -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> SrcStrictness -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> SrcStrictness -> m SrcStrictness # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SrcStrictness -> m SrcStrictness # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SrcStrictness -> m SrcStrictness # | |
Binary SrcStrictness | |
Defined in DataCon put_ :: BinHandle -> SrcStrictness -> IO () # put :: BinHandle -> SrcStrictness -> IO (Bin SrcStrictness) # get :: BinHandle -> IO SrcStrictness # | |
Outputable SrcStrictness | |
Defined in DataCon ppr :: SrcStrictness -> SDoc # pprPrec :: Rational -> SrcStrictness -> SDoc # |
data SrcUnpackedness #
Source Unpackedness
What unpackedness the user requested
SrcUnpack | |
SrcNoUnpack | |
NoSrcUnpack | no unpack pragma |
Instances
data StrictnessMark #
Instances
Outputable StrictnessMark | |
Defined in DataCon ppr :: StrictnessMark -> SDoc # pprPrec :: Rational -> StrictnessMark -> SDoc # |
dataConTyCon :: DataCon -> TyCon #
The type constructor that we are building via this data constructor
dataConUserTyVars :: DataCon -> [TyVar] #
The type variables of the constructor, in the order the user wrote them
dataConUserTyVarBinders :: DataCon -> [TyVarBinder] #
TyCoVarBinder
s for the type variables of the constructor, in the order the
user wrote them
dataConSourceArity :: DataCon -> Arity #
Source-level arity of the data constructor
dataConFieldLabels :: DataCon -> [FieldLabel] #
The labels for the fields of this particular DataCon
dataConInstOrigArgTys :: DataCon -> [Type] -> [Type] #
Returns just the instantiated value argument types of a DataCon
,
(excluding dictionary args)
dataConStupidTheta :: DataCon -> ThetaType #
The "stupid theta" of the DataCon
, such as data Eq a
in:
data Eq a => T a = ...
dataConFullSig :: DataCon -> ([TyVar], [TyCoVar], [EqSpec], ThetaType, [Type], Type) #
The "full signature" of the DataCon
returns, in order:
1) The result of dataConUnivTyVars
2) The result of dataConExTyCoVars
3) The non-dependent GADT equalities. Dependent GADT equalities are implied by coercion variables in return value (2).
4) The other constraints of the data constructor type, excluding GADT equalities
5) The original argument types to the DataCon
(i.e. before
any change of the representation of the type)
6) The original result type of the DataCon
isUnboxedSumCon :: DataCon -> Bool #
A data constructor
Instances
Eq DataCon | |
Data DataCon | |
Defined in DataCon gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DataCon -> c DataCon # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DataCon # toConstr :: DataCon -> Constr # dataTypeOf :: DataCon -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DataCon) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DataCon) # gmapT :: (forall b. Data b => b -> b) -> DataCon -> DataCon # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DataCon -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DataCon -> r # gmapQ :: (forall d. Data d => d -> u) -> DataCon -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> DataCon -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> DataCon -> m DataCon # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DataCon -> m DataCon # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DataCon -> m DataCon # | |
NamedThing DataCon | |
Uniquable DataCon | |
Outputable DataCon | |
OutputableBndr DataCon | |
Defined in DataCon pprBndr :: BindingSite -> DataCon -> SDoc # pprPrefixOcc :: DataCon -> SDoc # pprInfixOcc :: DataCon -> SDoc # bndrIsJoin_maybe :: DataCon -> Maybe Int # |
data DataConRep #
Data Constructor Representation See Note [Data constructor workers and wrappers]
NoDataConRep | |
DCR | |
|
An EqSpec
is a tyvar/type pair representing an equality made in
rejigging a GADT constructor
type FieldLabelString = FastString #
Field labels are just represented as strings; they are not necessarily unique (even within a module)
type FieldLabel = FieldLbl Name #
Fields in an algebraic record type
FieldLabel | |
|
Instances
Functor FieldLbl | |
Foldable FieldLbl | |
Defined in FieldLabel fold :: Monoid m => FieldLbl m -> m # foldMap :: Monoid m => (a -> m) -> FieldLbl a -> m # foldMap' :: Monoid m => (a -> m) -> FieldLbl a -> m # foldr :: (a -> b -> b) -> b -> FieldLbl a -> b # foldr' :: (a -> b -> b) -> b -> FieldLbl a -> b # foldl :: (b -> a -> b) -> b -> FieldLbl a -> b # foldl' :: (b -> a -> b) -> b -> FieldLbl a -> b # foldr1 :: (a -> a -> a) -> FieldLbl a -> a # foldl1 :: (a -> a -> a) -> FieldLbl a -> a # elem :: Eq a => a -> FieldLbl a -> Bool # maximum :: Ord a => FieldLbl a -> a # minimum :: Ord a => FieldLbl a -> a # | |
Traversable FieldLbl | |
Eq a => Eq (FieldLbl a) | |
Data a => Data (FieldLbl a) | |
Defined in FieldLabel gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FieldLbl a -> c (FieldLbl a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (FieldLbl a) # toConstr :: FieldLbl a -> Constr # dataTypeOf :: FieldLbl a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (FieldLbl a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (FieldLbl a)) # gmapT :: (forall b. Data b => b -> b) -> FieldLbl a -> FieldLbl a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FieldLbl a -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FieldLbl a -> r # gmapQ :: (forall d. Data d => d -> u) -> FieldLbl a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> FieldLbl a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> FieldLbl a -> m (FieldLbl a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> FieldLbl a -> m (FieldLbl a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> FieldLbl a -> m (FieldLbl a) # | |
Binary a => Binary (FieldLbl a) | |
Outputable a => Outputable (FieldLbl a) | |
ToHie (IEContext (Located (FieldLbl Name))) | |
Constructor Tag
Type of the tags associated with each constructor possibility or superclass selector
module DsExpr
class Functor f => Applicative (f :: Type -> Type) where #
A functor with application, providing operations to
A minimal complete definition must include implementations of pure
and of either <*>
or liftA2
. If it defines both, then they must behave
the same as their default definitions:
(<*>
) =liftA2
id
liftA2
f x y = f<$>
x<*>
y
Further, any definition must satisfy the following:
- Identity
pure
id
<*>
v = v- Composition
pure
(.)<*>
u<*>
v<*>
w = u<*>
(v<*>
w)- Homomorphism
pure
f<*>
pure
x =pure
(f x)- Interchange
u
<*>
pure
y =pure
($
y)<*>
u
The other methods have the following default definitions, which may be overridden with equivalent specialized implementations:
As a consequence of these laws, the Functor
instance for f
will satisfy
It may be useful to note that supposing
forall x y. p (q x y) = f x . g y
it follows from the above that
liftA2
p (liftA2
q u v) =liftA2
f u .liftA2
g v
If f
is also a Monad
, it should satisfy
(which implies that pure
and <*>
satisfy the applicative functor laws).
Lift a value.
(<*>) :: f (a -> b) -> f a -> f b infixl 4 #
Sequential application.
A few functors support an implementation of <*>
that is more
efficient than the default one.
Using ApplicativeDo
: 'fs
' can be understood as
the <*>
asdo
expression
do f <- fs a <- as pure (f a)
liftA2 :: (a -> b -> c) -> f a -> f b -> f c #
Lift a binary function to actions.
Some functors support an implementation of liftA2
that is more
efficient than the default one. In particular, if fmap
is an
expensive operation, it is likely better to use liftA2
than to
fmap
over the structure and then use <*>
.
This became a typeclass method in 4.10.0.0. Prior to that, it was
a function defined in terms of <*>
and fmap
.
Using ApplicativeDo
: '
' can be understood
as the liftA2
f as bsdo
expression
do a <- as b <- bs pure (f a b)
(*>) :: f a -> f b -> f b infixl 4 #
Sequence actions, discarding the value of the first argument.
'as
' can be understood as the *>
bsdo
expression
do as bs
This is a tad complicated for our ApplicativeDo
extension
which will give it a Monad
constraint. For an Applicative
constraint we write it of the form
do _ <- as b <- bs pure b
(<*) :: f a -> f b -> f a infixl 4 #
Sequence actions, discarding the value of the second argument.
Using ApplicativeDo
: 'as
' can be understood as
the <*
bsdo
expression
do a <- as bs pure a
Instances
mapM :: (Traversable t, Monad m) => (a -> m b) -> t a -> m (t b) #
Map each element of a structure to a monadic action, evaluate
these actions from left to right, and collect the results. For
a version that ignores the results see mapM_
.
mapAndUnzipM :: Applicative m => (a -> m (b, c)) -> [a] -> m ([b], [c]) #
The mapAndUnzipM
function maps its first argument over a list, returning
the result as a pair of lists. This function is mainly used with complicated
data structures or a state monad.
(<$>) :: Functor f => (a -> b) -> f a -> f b infixl 4 #
An infix synonym for fmap
.
The name of this operator is an allusion to $
.
Note the similarities between their types:
($) :: (a -> b) -> a -> b (<$>) :: Functor f => (a -> b) -> f a -> f b
Whereas $
is function application, <$>
is function
application lifted over a Functor
.
Examples
Convert from a
to a Maybe
Int
using Maybe
String
show
:
>>>
show <$> Nothing
Nothing>>>
show <$> Just 3
Just "3"
Convert from an
to an
Either
Int
Int
Either
Int
String
using show
:
>>>
show <$> Left 17
Left 17>>>
show <$> Right 17
Right "17"
Double each element of a list:
>>>
(*2) <$> [1,2,3]
[2,4,6]
Apply even
to the second element of a pair:
>>>
even <$> (2,2)
(2,True)
foldlM :: (Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m b #
Monadic fold over the elements of a structure, associating to the left, i.e. from left to right.
Inject a trace message into the compiled program. Whereas pprTrace prints out information *while compiling*, pprRuntimeTrace captures that information and causes it to be printed *at runtime* using Debug.Trace.trace.
pprRuntimeTrace hdr doc expr
will produce an expression that looks like
trace (hdr + doc) expr
When using this to debug a module that Debug.Trace depends on, it is necessary to import {--} Debug.Trace () in that module. We could avoid this inconvenience by wiring in Debug.Trace.trace, but that doesn't seem worth the effort and maintenance cost.
dsWhenNoErrs :: DsM a -> (a -> CoreExpr) -> DsM CoreExpr #
Runs the thing_inside. If there are no errors, then returns the expr given. Otherwise, returns unitExpr. This is useful for doing a bunch of levity polymorphism checks and then avoiding making a core App. (If we make a core App on a levity polymorphic argument, detecting how to handle the let/app invariant might call isUnliftedType, which panics on a levity polymorphic type.) See #12709 for an example of why this machinery is necessary.
dsNoLevPolyExpr :: CoreExpr -> SDoc -> DsM () #
Check an expression for levity polymorphism, failing if it is levity polymorphic.
dsNoLevPoly :: Type -> SDoc -> DsM () #
Fail with an error message if the type is levity polymorphic.
discardWarningsDs :: DsM a -> DsM a #
dsExtendMetaEnv :: DsMetaEnv -> DsM a -> DsM a #
dsGetCompleteMatches :: TyCon -> DsM [CompleteMatch] #
The COMPLETE
pragmas provided by the user for a given TyCon
.
dsGetMetaEnv :: DsM (NameEnv DsMetaVal) #
dsLookupConLike :: Name -> DsM ConLike #
dsLookupDataCon :: Name -> DsM DataCon #
dsLookupTyCon :: Name -> DsM TyCon #
dsLookupGlobalId :: Name -> DsM Id #
dsLookupGlobal :: Name -> DsM TyThing #
askNoErrsDs :: DsM a -> DsM (a, Bool) #
failWithDs :: SDoc -> DsM a #
errDsCoreExpr :: SDoc -> DsM CoreExpr #
Issue an error, but return the expression for (), so that we can continue reporting errors.
warnIfSetDs :: WarningFlag -> SDoc -> DsM () #
Emit a warning only if the correct WarnReason is set in the DynFlags
warnDs :: WarnReason -> SDoc -> DsM () #
Emit a warning for the current source location NB: Warns whether or not -Wxyz is set
putSrcSpanDs :: SrcSpan -> DsM a -> DsM a #
getSrcSpanDs :: DsM SrcSpan #
updPmDelta :: Delta -> DsM a -> DsM a #
Set the pattern match oracle state within the scope of the given action.
See dsl_delta
.
getPmDelta :: DsM Delta #
Get the current pattern match oracle state. See dsl_delta
.
getGhcModeDs :: DsM GhcMode #
newSysLocalsDs :: [Type] -> DsM [Id] #
newSysLocalsDsNoLP :: [Type] -> DsM [Id] #
newFailLocalDs :: Type -> DsM Id #
newSysLocalDs :: Type -> DsM Id #
newSysLocalDsNoLP :: Type -> DsM Id #
newPredVarDs :: PredType -> DsM Var #
duplicateLocalDs :: Id -> DsM Id #
data DsMatchContext #
Instances
Outputable DsMatchContext | |
Defined in DsMonad ppr :: DsMatchContext -> SDoc # pprPrec :: Rational -> DsMatchContext -> SDoc # |
data EquationInfo #
Instances
Outputable EquationInfo | |
Defined in DsMonad ppr :: EquationInfo -> SDoc # pprPrec :: Rational -> EquationInfo -> SDoc # |
data MatchResult #
newUniqueSupply :: TcRnIf gbl lcl UniqSupply #
whenGOptM :: GeneralFlag -> TcRnIf gbl lcl () -> TcRnIf gbl lcl () #
unsetWOptM :: WarningFlag -> TcRnIf gbl lcl a -> TcRnIf gbl lcl a #
unsetGOptM :: GeneralFlag -> TcRnIf gbl lcl a -> TcRnIf gbl lcl a #
data UniqSupply #
Unique Supply
A value of type UniqSupply
is unique, and it can
supply one distinct Unique
. Also, from the supply, one can
also manufacture an arbitrary number of further UniqueSupply
values,
which will be distinct from the first and from all others.
isWarnMsgFatal :: DynFlags -> WarnMsg -> Maybe (Maybe WarningFlag) #
Checks if given WarnMsg
is a fatal warning.
prettyPrintGhcErrors :: ExceptionMonad m => DynFlags -> m a -> m a #
printOutputForUser :: DynFlags -> PrintUnqualified -> MsgDoc -> IO () #
printInfoForUser :: DynFlags -> PrintUnqualified -> MsgDoc -> IO () #
:: (MonadIO m, HasDynFlags m) | |
=> SDoc | The name of the phase |
-> (a -> ()) | A function to force the result
(often either |
-> m a | The body of the phase to be timed |
-> m a |
Same as withTiming
, but doesn't print timings in the
console (when given -vN
, N >= 2
or -ddump-timings
)
and gets the DynFlags from the given Monad.
See Note [withTiming] for more.
:: MonadIO m | |
=> DynFlags | DynFlags |
-> SDoc | The name of the phase |
-> (a -> ()) | A function to force the result
(often either |
-> m a | The body of the phase to be timed |
-> m a |
Same as withTiming
, but doesn't print timings in the
console (when given -vN
, N >= 2
or -ddump-timings
).
See Note [withTiming] for more.
:: (MonadIO m, HasDynFlags m) | |
=> SDoc | The name of the phase |
-> (a -> ()) | A function to force the result
(often either |
-> m a | The body of the phase to be timed |
-> m a |
Like withTiming but get DynFlags from the Monad.
:: MonadIO m | |
=> DynFlags | DynFlags |
-> SDoc | The name of the phase |
-> (a -> ()) | A function to force the result
(often either |
-> m a | The body of the phase to be timed |
-> m a |
Time a compilation phase.
When timings are enabled (e.g. with the -v2
flag), the allocations
and CPU time used by the phase will be reported to stderr. Consider
a typical usage:
withTiming getDynFlags (text "simplify") force PrintTimings pass
.
When timings are enabled the following costs are included in the
produced accounting,
- The cost of executing
pass
to a resultr
in WHNF - The cost of evaluating
force r
to WHNF (e.g.()
)
The choice of the force
function depends upon the amount of forcing
desired; the goal here is to ensure that the cost of evaluating the result
is, to the greatest extent possible, included in the accounting provided by
withTiming
. Often the pass already sufficiently forces its result during
construction; in this case const ()
is a reasonable choice.
In other cases, it is necessary to evaluate the result to normal form, in
which case something like Control.DeepSeq.rnf
is appropriate.
To avoid adversely affecting compiler performance when timings are not requested, the result is only forced when timings are enabled.
See Note [withTiming] for more.
compilationProgressMsg :: DynFlags -> String -> IO () #
fatalErrorMsg'' :: FatalMessager -> String -> IO () #
fatalErrorMsg :: DynFlags -> MsgDoc -> IO () #
warningMsg :: DynFlags -> MsgDoc -> IO () #
dumpSDocWithStyle :: PprStyle -> DynFlags -> DumpFlag -> String -> SDoc -> IO () #
Write out a dump. If --dump-to-file is set then this goes to a file. otherwise emit to stdout.
When hdr
is empty, we print in a more compact format (no separators and
blank lines)
The DumpFlag
is used only to choose the filename to use if --dump-to-file
is used; it is not used to decide whether to dump the output
dumpSDocForUser :: DynFlags -> PrintUnqualified -> DumpFlag -> String -> SDoc -> IO () #
A wrapper around dumpSDocWithStyle
which uses PprUser
style.
dumpIfSet_dyn_printer :: PrintUnqualified -> DynFlags -> DumpFlag -> SDoc -> IO () #
a wrapper around dumpSDoc
.
First check whether the dump flag is set
Do nothing if it is unset
Unlike dumpIfSet_dyn
,
has a printer argument but no header argument
dumpIfSet_dyn :: DynFlags -> DumpFlag -> String -> SDoc -> IO () #
a wrapper around dumpSDoc
.
First check whether the dump flag is set
Do nothing if it is unset
doIfSet_dyn :: DynFlags -> GeneralFlag -> IO () -> IO () #
pprLocErrMsg :: ErrMsg -> SDoc #
pprErrMsgBagWithLoc :: Bag ErrMsg -> [SDoc] #
formatErrDoc :: DynFlags -> ErrDoc -> SDoc #
warningsToMessages :: DynFlags -> WarningMessages -> Messages #
errorsFound :: DynFlags -> Messages -> Bool #
isEmptyMessages :: Messages -> Bool #
mkPlainWarnMsg :: DynFlags -> SrcSpan -> MsgDoc -> ErrMsg #
Variant that doesn't care about qualified/unqualified names
mkLongWarnMsg :: DynFlags -> SrcSpan -> PrintUnqualified -> MsgDoc -> MsgDoc -> ErrMsg #
A long (multi-line) error message
mkPlainErrMsg :: DynFlags -> SrcSpan -> MsgDoc -> ErrMsg #
Variant that doesn't care about qualified/unqualified names
mkErrMsg :: DynFlags -> SrcSpan -> PrintUnqualified -> MsgDoc -> ErrMsg #
A short (one-line) error message
mkLongErrMsg :: DynFlags -> SrcSpan -> PrintUnqualified -> MsgDoc -> MsgDoc -> ErrMsg #
A long (multi-line) error message
makeIntoWarning :: WarnReason -> ErrMsg -> ErrMsg #
pprMessageBag :: Bag MsgDoc -> SDoc #
unionMessages :: Messages -> Messages -> Messages #
getInvalids :: [Validity] -> [MsgDoc] #
type Messages = (WarningMessages, ErrorMessages) #
type WarningMessages = Bag WarnMsg #
type ErrorMessages = Bag ErrMsg #
Categorise error msgs by their importance. This is so each section can be rendered visually distinct. See Note [Error report] for where these come from.
mkLocMessage :: Severity -> SrcSpan -> MsgDoc -> MsgDoc #
Make an unannotated error message with location info.
Make a possibly annotated error message with location info.
dumpSDoc :: DynFlags -> PrintUnqualified -> DumpFlag -> String -> SDoc -> IO () #
A wrapper around dumpSDocWithStyle
which uses PprDump
style.
SevOutput | |
SevFatal | |
SevInteractive | |
SevDump | Log message intended for compiler developers No filelinecolumn stuff |
SevInfo | Log messages intended for end users. No filelinecolumn stuff. |
SevWarning | |
SevError | SevWarning and SevError are used for warnings and errors o The message has a filelinecolumn heading, plus "warning:" or "error:", added by mkLocMessags o Output is intended for end users |
module FamInst
module FamInstEnv
checkProcessArgsResult :: MonadIO m => DynFlags -> [Located String] -> m () #
Complain about non-dynamic flags in OPTIONS pragmas.
Throws a SourceError
if the input list is non-empty claiming that the
input flags are unknown.
:: DynFlags | |
-> StringBuffer | Input Buffer |
-> FilePath | Source filename. Used for location info. |
-> [Located String] | Parsed options. |
Parse OPTIONS and LANGUAGE pragmas of the source file.
Throws a SourceError
if flag parsing fails (including unsupported flags.)
Parse OPTIONS and LANGUAGE pragmas of the source file.
Throws a SourceError
if flag parsing fails (including unsupported flags.)
mkPrelImports :: ModuleName -> SrcSpan -> Bool -> [LImportDecl GhcPs] -> [LImportDecl GhcPs] #
module Id
module InstEnv
module IfaceSyn
unitModuleSet :: Module -> ModuleSet #
unionModuleSet :: ModuleSet -> ModuleSet -> ModuleSet #
delModuleSet :: ModuleSet -> Module -> ModuleSet #
minusModuleSet :: ModuleSet -> ModuleSet -> ModuleSet #
intersectModuleSet :: ModuleSet -> ModuleSet -> ModuleSet #
elemModuleSet :: Module -> ModuleSet -> Bool #
moduleSetElts :: ModuleSet -> [Module] #
extendModuleSetList :: ModuleSet -> [Module] -> ModuleSet #
extendModuleSet :: ModuleSet -> Module -> ModuleSet #
mkModuleSet :: [Module] -> ModuleSet #
isEmptyModuleEnv :: ModuleEnv a -> Bool #
unitModuleEnv :: Module -> a -> ModuleEnv a #
moduleEnvToList :: ModuleEnv a -> [(Module, a)] #
moduleEnvElts :: ModuleEnv a -> [a] #
moduleEnvKeys :: ModuleEnv a -> [Module] #
emptyModuleEnv :: ModuleEnv a #
mkModuleEnv :: [(Module, a)] -> ModuleEnv a #
mapModuleEnv :: (a -> b) -> ModuleEnv a -> ModuleEnv b #
lookupWithDefaultModuleEnv :: ModuleEnv a -> a -> Module -> a #
lookupModuleEnv :: ModuleEnv a -> Module -> Maybe a #
plusModuleEnv :: ModuleEnv a -> ModuleEnv a -> ModuleEnv a #
delModuleEnv :: ModuleEnv a -> Module -> ModuleEnv a #
delModuleEnvList :: ModuleEnv a -> [Module] -> ModuleEnv a #
plusModuleEnv_C :: (a -> a -> a) -> ModuleEnv a -> ModuleEnv a -> ModuleEnv a #
extendModuleEnvList_C :: (a -> a -> a) -> ModuleEnv a -> [(Module, a)] -> ModuleEnv a #
extendModuleEnvList :: ModuleEnv a -> [(Module, a)] -> ModuleEnv a #
extendModuleEnvWith :: (a -> a -> a) -> ModuleEnv a -> Module -> a -> ModuleEnv a #
extendModuleEnv :: ModuleEnv a -> Module -> a -> ModuleEnv a #
elemModuleEnv :: Module -> ModuleEnv a -> Bool #
wiredInUnitIds :: [UnitId] #
isHoleModule :: Module -> Bool #
isInteractiveModule :: Module -> Bool #
mainUnitId :: UnitId #
This is the package Id for the current program. It is the default package Id if you don't specify a package name. We don't add this prefix to symbol names, since there can be only one main package per program.
thisGhcUnitId :: UnitId #
baseUnitId :: UnitId #
integerUnitId :: UnitId #
primUnitId :: UnitId #
parseModSubst :: ReadP [(ModuleName, Module)] #
parseUnitId :: ReadP UnitId #
splitUnitIdInsts :: UnitId -> (InstalledUnitId, Maybe IndefUnitId) #
See splitModuleInsts
.
splitModuleInsts :: Module -> (InstalledModule, Maybe IndefModule) #
Given a possibly on-the-fly instantiated module, split it into
a Module
that we definitely can find on-disk, as well as an
instantiation if we need to instantiate it on the fly. If the
instantiation is Nothing
no on-the-fly renaming is needed.
renameHoleUnitId' :: PackageConfigMap -> ShHoleSubst -> UnitId -> UnitId #
Like 'renameHoleUnitId, but requires only PackageConfigMap
so it can be used by Packages.
renameHoleModule' :: PackageConfigMap -> ShHoleSubst -> Module -> Module #
Like renameHoleModule
, but requires only PackageConfigMap
so it can be used by Packages.
renameHoleUnitId :: DynFlags -> ShHoleSubst -> UnitId -> UnitId #
renameHoleModule :: DynFlags -> ShHoleSubst -> Module -> Module #
stringToUnitId :: String -> UnitId #
fsToUnitId :: FastString -> UnitId #
Create a new simple unit identifier from a FastString
. Internally,
this is primarily used to specify wired-in unit identifiers.
newSimpleUnitId :: ComponentId -> UnitId #
Create a new simple unit identifier (no holes) from a ComponentId
.
stableUnitIdCmp :: UnitId -> UnitId -> Ordering #
Compares package ids lexically, rather than by their Unique
s
newUnitId :: ComponentId -> [(ModuleName, Module)] -> UnitId #
Create a new, un-hashed unit identifier.
hashUnitId :: ComponentId -> [(ModuleName, Module)] -> FastString #
Generate a uniquely identifying FastString
for a unit
identifier. This is a one-way function. You can rely on one special
property: if a unit identifier is in most general form, its FastString
coincides with its ComponentId
. This hash is completely internal
to GHC and is not used for symbol names or file paths.
unitIdIsDefinite :: UnitId -> Bool #
A UnitId
is definite if it has no free holes.
unitIdFreeHoles :: UnitId -> UniqDSet ModuleName #
Retrieve the set of free holes of a UnitId
.
filterInstalledModuleEnv :: (InstalledModule -> a -> Bool) -> InstalledModuleEnv a -> InstalledModuleEnv a #
extendInstalledModuleEnv :: InstalledModuleEnv a -> InstalledModule -> a -> InstalledModuleEnv a #
lookupInstalledModuleEnv :: InstalledModuleEnv a -> InstalledModule -> Maybe a #
installedUnitIdEq :: InstalledUnitId -> UnitId -> Bool #
Test if a UnitId
corresponds to a given InstalledUnitId
,
modulo instantiation.
installedModuleEq :: InstalledModule -> Module -> Bool #
Test if a Module
corresponds to a given InstalledModule
,
modulo instantiation.
toInstalledUnitId :: UnitId -> InstalledUnitId #
Lossy conversion to the on-disk InstalledUnitId
for a component.
indefModuleToModule :: DynFlags -> IndefModule -> Module #
Injects an IndefModule
to Module
(see also
indefUnitIdToUnitId
.
indefUnitIdToUnitId :: DynFlags -> IndefUnitId -> UnitId #
Injects an IndefUnitId
(indefinite library which
was on-the-fly instantiated) to a UnitId
(either
an indefinite or definite library).
newIndefUnitId :: ComponentId -> [(ModuleName, Module)] -> IndefUnitId #
Create a new IndefUnitId
given an explicit module substitution.
unitIdFS :: UnitId -> FastString #
mkModule :: UnitId -> ModuleName -> Module #
stableModuleCmp :: Module -> Module -> Ordering #
This gives a stable ordering, as opposed to the Ord instance which
gives an ordering based on the Unique
s of the components, which may
not be stable from run to run of the compiler.
mkHoleModule :: ModuleName -> Module #
Create a module variable at some ModuleName
.
See Note [Representation of module/name variables]
moduleIsDefinite :: Module -> Bool #
A Module
is definite if it has no free holes.
moduleFreeHoles :: Module -> UniqDSet ModuleName #
Calculate the free holes of a Module
. If this set is non-empty,
this module was defined in an indefinite library that had required
signatures.
If a module has free holes, that means that substitutions can operate on it; if it has no free holes, substituting over a module has no effect.
moduleNameColons :: ModuleName -> String #
Returns the string version of the module name, with dots replaced by colons.
moduleNameSlashes :: ModuleName -> String #
Returns the string version of the module name, with dots replaced by slashes.
mkModuleNameFS :: FastString -> ModuleName #
mkModuleName :: String -> ModuleName #
moduleStableString :: Module -> String #
Get a string representation of a Module
that's unique and stable
across recompilations.
eg. "$aeson_70dylHtv1FFGeai1IoxcQr$Data.Aeson.Types.Internal"
moduleNameString :: ModuleName -> String #
moduleNameFS :: ModuleName -> FastString #
pprModuleName :: ModuleName -> SDoc #
stableModuleNameCmp :: ModuleName -> ModuleName -> Ordering #
Compares module names lexically, rather than by their Unique
s
addBootSuffixLocn :: ModLocation -> ModLocation #
Add the -boot
suffix to all file paths associated with the module
addBootSuffix_maybe :: Bool -> FilePath -> FilePath #
Add the -boot
suffix if the Bool
argument is True
addBootSuffix :: FilePath -> FilePath #
Add the -boot
suffix to .hs, .hi and .o files
class ContainsModule t where #
extractModule :: t -> Module #
Instances
ContainsModule DsGblEnv | |
Defined in TcRnTypes extractModule :: DsGblEnv -> Module # | |
ContainsModule TcGblEnv | |
Defined in TcRnTypes extractModule :: TcGblEnv -> Module # | |
ContainsModule gbl => ContainsModule (Env gbl lcl) | |
Defined in TcRnTypes extractModule :: Env gbl lcl -> Module # |
data IndefUnitId #
A unit identifier which identifies an indefinite
library (with holes) that has been *on-the-fly* instantiated
with a substitution indefUnitIdInsts
. In fact, an indefinite
unit identifier could have no holes, but we haven't gotten
around to compiling the actual library yet.
An indefinite unit identifier pretty-prints to something like
p[H=H,A=aimpl:A>]
(p
is the ComponentId
, and the
brackets enclose the module substitution).
IndefUnitId | |
|
Instances
Eq IndefUnitId | |
Defined in Module (==) :: IndefUnitId -> IndefUnitId -> Bool # (/=) :: IndefUnitId -> IndefUnitId -> Bool # | |
Ord IndefUnitId | |
Defined in Module compare :: IndefUnitId -> IndefUnitId -> Ordering # (<) :: IndefUnitId -> IndefUnitId -> Bool # (<=) :: IndefUnitId -> IndefUnitId -> Bool # (>) :: IndefUnitId -> IndefUnitId -> Bool # (>=) :: IndefUnitId -> IndefUnitId -> Bool # max :: IndefUnitId -> IndefUnitId -> IndefUnitId # min :: IndefUnitId -> IndefUnitId -> IndefUnitId # | |
Binary IndefUnitId | |
Defined in Module put_ :: BinHandle -> IndefUnitId -> IO () # put :: BinHandle -> IndefUnitId -> IO (Bin IndefUnitId) # get :: BinHandle -> IO IndefUnitId # | |
Outputable IndefUnitId | |
Defined in Module ppr :: IndefUnitId -> SDoc # pprPrec :: Rational -> IndefUnitId -> SDoc # |
data IndefModule #
Instances
Eq IndefModule | |
Defined in Module (==) :: IndefModule -> IndefModule -> Bool # (/=) :: IndefModule -> IndefModule -> Bool # | |
Ord IndefModule | |
Defined in Module compare :: IndefModule -> IndefModule -> Ordering # (<) :: IndefModule -> IndefModule -> Bool # (<=) :: IndefModule -> IndefModule -> Bool # (>) :: IndefModule -> IndefModule -> Bool # (>=) :: IndefModule -> IndefModule -> Bool # max :: IndefModule -> IndefModule -> IndefModule # min :: IndefModule -> IndefModule -> IndefModule # | |
Outputable IndefModule | |
Defined in Module ppr :: IndefModule -> SDoc # pprPrec :: Rational -> IndefModule -> SDoc # |
data InstalledModule #
A InstalledModule
is a Module
which contains a InstalledUnitId
.
Instances
Eq InstalledModule | |
Defined in Module (==) :: InstalledModule -> InstalledModule -> Bool # (/=) :: InstalledModule -> InstalledModule -> Bool # | |
Ord InstalledModule | |
Defined in Module compare :: InstalledModule -> InstalledModule -> Ordering # (<) :: InstalledModule -> InstalledModule -> Bool # (<=) :: InstalledModule -> InstalledModule -> Bool # (>) :: InstalledModule -> InstalledModule -> Bool # (>=) :: InstalledModule -> InstalledModule -> Bool # max :: InstalledModule -> InstalledModule -> InstalledModule # min :: InstalledModule -> InstalledModule -> InstalledModule # | |
Outputable InstalledModule | |
Defined in Module ppr :: InstalledModule -> SDoc # pprPrec :: Rational -> InstalledModule -> SDoc # |
A DefUnitId
is an InstalledUnitId
with the invariant that
it only refers to a definite library; i.e., one we have generated
code for.
data InstalledModuleEnv elt #
A map keyed off of InstalledModule
type ShHoleSubst = ModuleNameEnv Module #
Substitution on module variables, mapping module names to module identifiers.
type ModuleNameEnv elt = UniqFM elt #
A map keyed off of ModuleName
s (actually, their Unique
s)
type DModuleNameEnv elt = UniqDFM elt #
A map keyed off of ModuleName
s (actually, their Unique
s)
Has deterministic folds and can be deterministically converted to a list
unitIdString :: UnitId -> String #
A Module is a pair of a UnitId
and a ModuleName
.
Module variables (i.e. H
) which can be instantiated to a
specific module at some later point in time are represented
with moduleUnitId
set to holeUnitId
(this allows us to
avoid having to make moduleUnitId
a partial operation.)
Instances
data ModuleName #
A ModuleName is essentially a simple string, e.g. Data.List
.
Instances
pattern IndefiniteUnitId :: !IndefUnitId -> UnitId #
pattern DefiniteUnitId :: !DefUnitId -> UnitId #
newtype InstalledUnitId #
An installed unit identifier identifies a library which has
been installed to the package database. These strings are
provided to us via the -this-unit-id
flag. The library
in question may be definite or indefinite; if it is indefinite,
none of the holes have been filled (we never install partially
instantiated libraries.) Put another way, an installed unit id
is either fully instantiated, or not instantiated at all.
Installed unit identifiers look something like p+af23SAj2dZ219
,
or maybe just p
if they don't use Backpack.
InstalledUnitId | |
|
Instances
newtype ComponentId #
A ComponentId
consists of the package name, package version, component
ID, the transitive dependencies of the component, and other information to
uniquely identify the source code and build configuration of a component.
This used to be known as an InstalledPackageId
, but a package can contain
multiple components and a ComponentId
uniquely identifies a component
within a package. When a package only has one component, the ComponentId
coincides with the InstalledPackageId
Instances
pprPrefixName :: NamedThing a => a -> SDoc #
pprInfixName :: (Outputable a, NamedThing a) => a -> SDoc #
getOccFS :: NamedThing a => a -> FastString #
getOccString :: NamedThing a => a -> String #
getSrcSpan :: NamedThing a => a -> SrcSpan #
getSrcLoc :: NamedThing a => a -> SrcLoc #
nameStableString :: Name -> String #
Get a string representation of a Name
that's unique and stable
across recompilations. Used for deterministic generation of binds for
derived instances.
eg. "$aeson_70dylHtv1FFGeai1IoxcQr$Data.Aeson.Types.Internal$String"
pprNameDefnLoc :: Name -> SDoc #
pprDefinedAt :: Name -> SDoc #
pprNameUnqualified :: Name -> SDoc #
Print the string of Name unqualifiedly directly.
stableNameCmp :: Name -> Name -> Ordering #
Compare Names lexicographically This only works for Names that originate in the source code or have been tidied.
localiseName :: Name -> Name #
Make the Name
into an internal name, regardless of what it was to begin with
tidyNameOcc :: Name -> OccName -> Name #
setNameLoc :: Name -> SrcSpan -> Name #
setNameUnique :: Name -> Unique -> Name #
mkFCallName :: Unique -> String -> Name #
Make a name for a foreign call
mkSysTvName :: Unique -> FastString -> Name #
mkSystemVarName :: Unique -> FastString -> Name #
mkSystemName :: Unique -> OccName -> Name #
Create a name brought into being by the compiler
mkWiredInName :: Module -> OccName -> Unique -> TyThing -> BuiltInSyntax -> Name #
Create a name which is actually defined by the compiler itself
mkExternalName :: Unique -> Module -> OccName -> SrcSpan -> Name #
Create a name which definitely originates in the given module
mkClonedInternalName :: Unique -> Name -> Name #
isSystemName :: Name -> Bool #
isDataConName :: Name -> Bool #
isTyConName :: Name -> Bool #
isTyVarName :: Name -> Bool #
nameIsFromExternalPackage :: UnitId -> Name -> Bool #
Returns True if the Name comes from some other package: neither this package nor the interactive package.
nameIsHomePackageImport :: Module -> Name -> Bool #
nameIsHomePackage :: Module -> Name -> Bool #
nameIsLocalOrFrom :: Module -> Name -> Bool #
Returns True if the name is
(a) Internal
(b) External but from the specified module
(c) External but from the interactive
package
The key idea is that False means: the entity is defined in some other module you can find the details (type, fixity, instances) in some interface file those details will be stored in the EPT or HPT
True means: the entity is defined in this module or earlier in the GHCi session you can find details (type, fixity, instances) in the TcGblEnv or TcLclEnv
The isInteractiveModule part is because successive interactions of a GHCi session
each give rise to a fresh module (Ghci1, Ghci2, etc), but they all come
from the magic interactive
package; and all the details are kept in the
TcLclEnv, TcGblEnv, NOT in the HPT or EPT.
See Note [The interactive package] in HscTypes
nameModule_maybe :: Name -> Maybe Module #
nameModule :: HasDebugCallStack => Name -> Module #
isHoleName :: Name -> Bool #
isInternalName :: Name -> Bool #
isExternalName :: Name -> Bool #
isBuiltInSyntax :: Name -> Bool #
isWiredInName :: Name -> Bool #
nameSrcSpan :: Name -> SrcSpan #
nameSrcLoc :: Name -> SrcLoc #
nameNameSpace :: Name -> NameSpace #
nameOccName :: Name -> OccName #
nameUnique :: Name -> Unique #
data BuiltInSyntax #
BuiltInSyntax is for things like (:)
, []
and tuples,
which have special syntactic forms. They aren't in scope
as such.
class NamedThing a where #
A class allowing convenient access to the Name
of various datatypes
Instances
NamedThing HoleFitCandidate | |
Defined in TcHoleFitTypes getOccName :: HoleFitCandidate -> OccName # getName :: HoleFitCandidate -> Name # | |
NamedThing ClsInst | |
NamedThing FamInst | |
Defined in FamInstEnv | |
NamedThing IfaceDecl | |
NamedThing IfaceClassOp | |
Defined in IfaceSyn getOccName :: IfaceClassOp -> OccName # getName :: IfaceClassOp -> Name # | |
NamedThing IfaceConDecl | |
Defined in IfaceSyn getOccName :: IfaceConDecl -> OccName # getName :: IfaceConDecl -> Name # | |
NamedThing Class | |
NamedThing ConLike | |
NamedThing DataCon | |
NamedThing PatSyn | |
NamedThing TyThing | |
NamedThing Var | |
NamedThing TyCon | |
NamedThing Name | |
NamedThing (HsTyVarBndr GhcRn) | |
Defined in GHC.Hs.Types getOccName :: HsTyVarBndr GhcRn -> OccName # getName :: HsTyVarBndr GhcRn -> Name # | |
NamedThing (CoAxiom br) | |
NamedThing e => NamedThing (Located e) | |
NamedThing tv => NamedThing (VarBndr tv flag) | |
tidyOccName :: TidyOccEnv -> OccName -> (TidyOccEnv, OccName) #
avoidClashesOccEnv :: TidyOccEnv -> [OccName] -> TidyOccEnv #
initTidyOccEnv :: [OccName] -> TidyOccEnv #
mkMethodOcc :: OccName -> OccName #
Derive a name for the representation type constructor of a
data
/newtype
instance.
mkSuperDictAuxOcc :: Int -> OccName -> OccName #
mkDataConWorkerOcc :: OccName -> OccName #
mkRecFldSelOcc :: String -> OccName #
mkTyConRepOcc :: OccName -> OccName #
mkMaxTagOcc :: OccName -> OccName #
mkTag2ConOcc :: OccName -> OccName #
mkCon2TagOcc :: OccName -> OccName #
mkEqPredCoOcc :: OccName -> OccName #
mkInstTyCoOcc :: OccName -> OccName #
mkNewTyCoOcc :: OccName -> OccName #
mkClassDataConOcc :: OccName -> OccName #
mkRepEqOcc :: OccName -> OccName #
mkForeignExportOcc :: OccName -> OccName #
mkClassOpAuxOcc :: OccName -> OccName #
mkDefaultMethodOcc :: OccName -> OccName #
mkBuilderOcc :: OccName -> OccName #
mkMatcherOcc :: OccName -> OccName #
mkWorkerOcc :: OccName -> OccName #
mkDataConWrapperOcc :: OccName -> OccName #
isTypeableBindOcc :: OccName -> Bool #
Is an OccName
one of a Typeable TyCon
or Module
binding?
This is needed as these bindings are renamed differently.
See Note [Grand plan for Typeable] in TcTypeable.
isDefaultMethodOcc :: OccName -> Bool #
isDerivedOccName :: OccName -> Bool #
Test for definitions internally generated by GHC. This predicte is used to suppress printing of internal definitions in some debug prints
startsWithUnderscore :: OccName -> Bool #
Haskell 98 encourages compilers to suppress warnings about unsed
names in a pattern if they start with _
: this implements that test
parenSymOcc :: OccName -> SDoc -> SDoc #
Wrap parens around an operator
Test if the OccName
is that for any operator (whether
it is a data constructor or variable or whatever)
isDataSymOcc :: OccName -> Bool #
Test if the OccName
is a data constructor that starts with
a symbol (e.g. :
, or []
)
Value OccNames
s are those that are either in
the variable or data constructor namespaces
setOccNameSpace :: NameSpace -> OccName -> OccName #
occNameString :: OccName -> String #
intersectsOccSet :: OccSet -> OccSet -> Bool #
intersectOccSet :: OccSet -> OccSet -> OccSet #
isEmptyOccSet :: OccSet -> Bool #
elemOccSet :: OccName -> OccSet -> Bool #
minusOccSet :: OccSet -> OccSet -> OccSet #
unionManyOccSets :: [OccSet] -> OccSet #
unionOccSets :: OccSet -> OccSet -> OccSet #
extendOccSetList :: OccSet -> [OccName] -> OccSet #
extendOccSet :: OccSet -> OccName -> OccSet #
unitOccSet :: OccName -> OccSet #
emptyOccSet :: OccSet #
filterOccEnv :: (elt -> Bool) -> OccEnv elt -> OccEnv elt #
delListFromOccEnv :: OccEnv a -> [OccName] -> OccEnv a #
delFromOccEnv :: OccEnv a -> OccName -> OccEnv a #
mkOccEnv_C :: (a -> a -> a) -> [(OccName, a)] -> OccEnv a #
extendOccEnv_Acc :: (a -> b -> b) -> (a -> b) -> OccEnv b -> OccName -> a -> OccEnv b #
extendOccEnv_C :: (a -> a -> a) -> OccEnv a -> OccName -> a -> OccEnv a #
plusOccEnv_C :: (a -> a -> a) -> OccEnv a -> OccEnv a -> OccEnv a #
plusOccEnv :: OccEnv a -> OccEnv a -> OccEnv a #
occEnvElts :: OccEnv a -> [a] #
foldOccEnv :: (a -> b -> b) -> b -> OccEnv a -> b #
elemOccEnv :: OccName -> OccEnv a -> Bool #
lookupOccEnv :: OccEnv a -> OccName -> Maybe a #
extendOccEnvList :: OccEnv a -> [(OccName, a)] -> OccEnv a #
extendOccEnv :: OccEnv a -> OccName -> a -> OccEnv a #
unitOccEnv :: OccName -> a -> OccEnv a #
emptyOccEnv :: OccEnv a #
nameSpacesRelated :: NameSpace -> NameSpace -> Bool #
demoteOccName :: OccName -> Maybe OccName #
mkClsOccFS :: FastString -> OccName #
mkTcOccFS :: FastString -> OccName #
mkTyVarOccFS :: FastString -> OccName #
mkTyVarOcc :: String -> OccName #
mkDataOccFS :: FastString -> OccName #
mkVarOccFS :: FastString -> OccName #
mkOccNameFS :: NameSpace -> FastString -> OccName #
pprOccName :: OccName -> SDoc #
pprNameSpaceBrief :: NameSpace -> SDoc #
pprNonVarNameSpace :: NameSpace -> SDoc #
pprNameSpace :: NameSpace -> SDoc #
isValNameSpace :: NameSpace -> Bool #
isVarNameSpace :: NameSpace -> Bool #
isTvNameSpace :: NameSpace -> Bool #
isTcClsNameSpace :: NameSpace -> Bool #
isDataConNameSpace :: NameSpace -> Bool #
class HasOccName name where #
Other names in the compiler add additional information to an OccName. This class provides a consistent way to access the underlying OccName.
Instances
HasOccName HoleFitCandidate | |
Defined in TcHoleFitTypes occName :: HoleFitCandidate -> OccName # | |
HasOccName TcBinder | |
HasOccName IfaceDecl | |
HasOccName IfaceClassOp | |
Defined in IfaceSyn occName :: IfaceClassOp -> OccName # | |
HasOccName IfaceConDecl | |
Defined in IfaceSyn occName :: IfaceConDecl -> OccName # | |
HasOccName RdrName | |
HasOccName Var | |
HasOccName OccName | |
HasOccName Name | |
HasOccName name => HasOccName (IEWrappedName name) | |
Defined in GHC.Hs.ImpExp occName :: IEWrappedName name -> OccName # |
Instances
Data a => Data (OccEnv a) | |
Defined in OccName gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> OccEnv a -> c (OccEnv a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (OccEnv a) # toConstr :: OccEnv a -> Constr # dataTypeOf :: OccEnv a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (OccEnv a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (OccEnv a)) # gmapT :: (forall b. Data b => b -> b) -> OccEnv a -> OccEnv a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> OccEnv a -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> OccEnv a -> r # gmapQ :: (forall d. Data d => d -> u) -> OccEnv a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> OccEnv a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> OccEnv a -> m (OccEnv a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> OccEnv a -> m (OccEnv a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> OccEnv a -> m (OccEnv a) # | |
Outputable a => Outputable (OccEnv a) | |
type TidyOccEnv = UniqFM Int #
mkFsEnv :: [(FastString, a)] -> FastStringEnv a #
lookupFsEnv :: FastStringEnv a -> FastString -> Maybe a #
extendFsEnv :: FastStringEnv a -> FastString -> a -> FastStringEnv a #
emptyFsEnv :: FastStringEnv a #
type FastStringEnv a = UniqFM a #
A non-deterministic set of FastStrings. See Note [Deterministic UniqFM] in UniqDFM for explanation why it's not deterministic and why it matters. Use DFastStringEnv if the set eventually gets converted into a list or folded over in a way where the order changes the generated code.
Occurrence Name
In this context that means: "classified (i.e. as a type name, value name, etc) but not qualified and not yet resolved"
Instances
Eq OccName | |
Data OccName | |
Defined in OccName gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> OccName -> c OccName # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c OccName # toConstr :: OccName -> Constr # dataTypeOf :: OccName -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c OccName) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c OccName) # gmapT :: (forall b. Data b => b -> b) -> OccName -> OccName # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> OccName -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> OccName -> r # gmapQ :: (forall d. Data d => d -> u) -> OccName -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> OccName -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> OccName -> m OccName # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> OccName -> m OccName # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> OccName -> m OccName # | |
Ord OccName | |
Show OccName Source # | |
Hashable OccName Source # | |
Defined in Development.IDE.GHC.Orphans | |
NFData OccName | |
HasOccName OccName | |
Binary OccName | |
Uniquable OccName | |
Outputable OccName | |
OutputableBndr OccName | |
Defined in OccName pprBndr :: BindingSite -> OccName -> SDoc # pprPrefixOcc :: OccName -> SDoc # pprInfixOcc :: OccName -> SDoc # bndrIsJoin_maybe :: OccName -> Maybe Int # |
A unique, unambiguous name for something, containing information about where that thing originated.
Instances
Eq Name | |
Data Name | |
Defined in Name gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Name -> c Name # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Name # dataTypeOf :: Name -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Name) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Name) # gmapT :: (forall b. Data b => b -> b) -> Name -> Name # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Name -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Name -> r # gmapQ :: (forall d. Data d => d -> u) -> Name -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Name -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Name -> m Name # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Name -> m Name # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Name -> m Name # | |
Ord Name | Caution: This instance is implemented via See |
NFData Name | |
NamedThing Name | |
HasOccName Name | |
Binary Name | Assumes that the |
Uniquable Name | |
HasSrcSpan Name | |
Defined in Name composeSrcSpan :: Located (SrcSpanLess Name) -> Name # decomposeSrcSpan :: Name -> Located (SrcSpanLess Name) # | |
Outputable Name | |
OutputableBndr Name | |
Defined in Name pprBndr :: BindingSite -> Name -> SDoc # pprPrefixOcc :: Name -> SDoc # pprInfixOcc :: Name -> SDoc # bndrIsJoin_maybe :: Name -> Maybe Int # | |
ModifyState Name | |
Defined in Compat.HieAst addSubstitution :: Name -> Name -> HieState -> HieState | |
ToHie (LBooleanFormula (Located Name)) | |
Defined in Compat.HieAst | |
ToHie (Located (FunDep (Located Name))) | |
ToHie (Context (Located Name)) | |
ToHie (IEContext (LIEWrappedName Name)) | |
Defined in Compat.HieAst toHie :: IEContext (LIEWrappedName Name) -> HieM [HieAST Type] | |
ToHie (IEContext (Located (FieldLbl Name))) | |
type SrcSpanLess Name | |
Defined in Name |
module NameCache
module NameEnv
module NameSet
module PatSyn
pprTypeForUser :: Type -> SDoc #
pprTyThingInContextLoc :: TyThing -> SDoc #
Like pprTyThingInContext
, but adds the defining location.
pprTyThingInContext :: ShowSub -> TyThing -> SDoc #
Pretty-prints a TyThing
in context: that is, if the entity
is a data constructor, record selector, or class method, then
the entity's parent declaration is pretty-printed with irrelevant
parts omitted.
pprTyThingHdr :: TyThing -> SDoc #
Pretty-prints the TyThing
header. For functions and data constructors
the function is equivalent to pprTyThing
but for type constructors
and classes it prints only the header part of the declaration.
pprTyThingLoc :: TyThing -> SDoc #
Pretty-prints a TyThing
with its defining location.
module PrelInfo
pretendNameIsInScope :: Name -> Bool #
interactiveClassKeys :: [Unique] #
interactiveClassNames :: [Name] #
derivableClassKeys :: [Unique] #
standardClassKeys :: [Unique] #
fractionalClassKeys :: [Unique] #
numericClassKeys :: [Unique] #
makeStaticKey :: Unique #
heqSCSelIdKey :: Unique #
eqSCSelIdKey :: Unique #
toDynIdKey :: Unique #
mkTrFunKey :: Unique #
typeRepIdKey :: Unique #
mkTrAppKey :: Unique #
mkTrConKey :: Unique #
mkTrTypeKey :: Unique #
mkTyConKey :: Unique #
proxyHashKey :: Unique #
liftMIdKey :: Unique #
guardMIdKey :: Unique #
loopAIdKey :: Unique #
choiceAIdKey :: Unique #
firstAIdKey :: Unique #
composeAIdKey :: Unique #
geClassOpKey :: Unique #
eqClassOpKey :: Unique #
unboundKey :: Unique #
magicDictKey :: Unique #
undefinedKey :: Unique #
noinlineIdKey :: Unique #
dollarIdKey :: Unique #
inlineIdKey :: Unique #
oneShotKey :: Unique #
thenIOIdKey :: Unique #
runMainKey :: Unique #
rootMainKey :: Unique #
assertIdKey :: Unique #
voidArgIdKey :: Unique #
nullAddrIdKey :: Unique #
failIOIdKey :: Unique #
printIdKey :: Unique #
returnIOIdKey :: Unique #
bindIOIdKey :: Unique #
filterIdKey :: Unique #
concatIdKey :: Unique #
modIntIdKey :: Unique #
divIntIdKey :: Unique #
voidPrimIdKey :: Unique #
patErrorIdKey :: Unique #
eqStringIdKey :: Unique #
foldrIdKey :: Unique #
errorIdKey :: Unique #
buildIdKey :: Unique #
appendIdKey :: Unique #
augmentIdKey :: Unique #
wildCardKey :: Unique #
vecElemDataConKeys :: [Unique] #
vecCountDataConKeys :: [Unique] #
inrDataConKey :: Unique #
inlDataConKey :: Unique #
heqDataConKey :: Unique #
ioDataConKey :: Unique #
nilDataConKey :: Unique #
eqDataConKey :: Unique #
intDataConKey :: Unique #
anyTyConKey :: Unique #
specTyConKey :: Unique #
ntTyConKey :: Unique #
uWordTyConKey :: Unique #
uIntTyConKey :: Unique #
uCharTyConKey :: Unique #
uAddrTyConKey :: Unique #
uRecTyConKey :: Unique #
rep1TyConKey :: Unique #
repTyConKey :: Unique #
noSelTyConKey :: Unique #
s1TyConKey :: Unique #
c1TyConKey :: Unique #
d1TyConKey :: Unique #
rec0TyConKey :: Unique #
compTyConKey :: Unique #
prodTyConKey :: Unique #
sumTyConKey :: Unique #
m1TyConKey :: Unique #
k1TyConKey :: Unique #
rec1TyConKey :: Unique #
par1TyConKey :: Unique #
u1TyConKey :: Unique #
v1TyConKey :: Unique #
tYPETyConKey :: Unique #
ptrTyConKey :: Unique #
typeConKey :: Unique #
boxityConKey :: Unique #
kindConKey :: Unique #
anyBoxConKey :: Unique #
liftedConKey :: Unique #
word8TyConKey :: Unique #
wordTyConKey :: Unique #
ioTyConKey :: Unique #
heqTyConKey :: Unique #
eqTyConKey :: Unique #
ratioTyConKey :: Unique #
maybeTyConKey :: Unique #
listTyConKey :: Unique #
int64TyConKey :: Unique #
int32TyConKey :: Unique #
int16TyConKey :: Unique #
int8TyConKey :: Unique #
intTyConKey :: Unique #
funTyConKey :: Unique #
floatTyConKey :: Unique #
charTyConKey :: Unique #
boolTyConKey :: Unique #
ipClassKey :: Unique #
gen1ClassKey :: Unique #
genClassKey :: Unique #
ixClassKey :: Unique #
showClassKey :: Unique #
realClassKey :: Unique #
readClassKey :: Unique #
ordClassKey :: Unique #
numClassKey :: Unique #
dataClassKey :: Unique #
monadClassKey :: Unique #
eqClassKey :: Unique #
enumClassKey :: Unique #
mk_known_key_name :: NameSpace -> Module -> FastString -> Unique -> Name #
makeStaticName :: Name #
pluginTyConName :: Name #
ipClassName :: Name #
randomClassName :: Name #
guardMName :: Name #
choiceAName :: Name #
firstAName :: Name #
composeAName :: Name #
funPtrTyConName :: Name #
ptrTyConName :: Name #
word64TyConName :: Name #
word32TyConName :: Name #
word16TyConName :: Name #
int64TyConName :: Name #
int32TyConName :: Name #
int16TyConName :: Name #
int8TyConName :: Name #
failIOName :: Name #
returnIOName :: Name #
bindIOName :: Name #
thenIOName :: Name #
ioDataConName :: Name #
ioTyConName :: Name #
ghciStepIoMName :: Name #
ghciIoClassName :: Name #
genericClassNames :: [Name] #
gen1ClassName :: Name #
genClassName :: Name #
readClassName :: Name #
showClassName :: Name #
toListName :: Name #
fromListNName :: Name #
fromListName :: Name #
isListClassName :: Name #
filterName :: Name #
concatName :: Name #
enumFromToName :: Name #
enumFromName :: Name #
enumClassName :: Name #
assertErrorName :: Name #
dataClassName :: Name #
starKindRepName :: Name #
mkTrFunName :: Name #
mkTrAppName :: Name #
mkTrConName :: Name #
mkTrTypeName :: Name #
typeRepIdName :: Name #
trNameTyConName :: Name #
ixClassName :: Name #
realToFracName :: Name #
toRationalName :: Name #
toIntegerName :: Name #
realClassName :: Name #
ratioTyConName :: Name #
mkNaturalName :: Name #
plusNaturalName :: Name #
bitIntegerName :: Name #
xorIntegerName :: Name #
orIntegerName :: Name #
andIntegerName :: Name #
lcmIntegerName :: Name #
gcdIntegerName :: Name #
modIntegerName :: Name #
divIntegerName :: Name #
remIntegerName :: Name #
quotIntegerName :: Name #
absIntegerName :: Name #
plusIntegerName :: Name #
mkIntegerName :: Name #
negateName :: Name #
fromIntegerName :: Name #
numClassName :: Name #
fromStringName :: Name #
opaqueTyConName :: Name #
breakpointName :: Name #
assertName :: Name #
appendName :: Name #
augmentName :: Name #
otherwiseIdName :: Name #
dollarName :: Name #
groupWithName :: Name #
apAClassOpKey :: Unique #
joinMIdKey :: Unique #
mconcatName :: Name #
mappendName :: Name #
memptyName :: Name #
monoidClassName :: Name #
sappendName :: Name #
returnMName :: Name #
monadClassName :: Name #
ordClassName :: Name #
eqClassName :: Name #
inlineIdName :: Name #
eqStringName :: Name #
modIntName :: Name #
divIntName :: Name #
uWordTyConName :: Name #
uIntTyConName :: Name #
uFloatTyConName :: Name #
uCharTyConName :: Name #
uAddrTyConName :: Name #
uRecTyConName :: Name #
rep1TyConName :: Name #
repTyConName :: Name #
noSelTyConName :: Name #
s1TyConName :: Name #
c1TyConName :: Name #
d1TyConName :: Name #
rec0TyConName :: Name #
sTyConName :: Name #
cTyConName :: Name #
dTyConName :: Name #
rTyConName :: Name #
compTyConName :: Name #
prodTyConName :: Name #
sumTyConName :: Name #
m1TyConName :: Name #
k1TyConName :: Name #
rec1TyConName :: Name #
par1TyConName :: Name #
u1TyConName :: Name #
v1TyConName :: Name #
leftDataConName :: Name #
eitherTyConName :: Name #
specTyConName :: Name #
runMainIOName :: Name #
wildCardName :: Name #
dataQual_RDR :: Module -> FastString -> RdrName #
clsQual_RDR :: Module -> FastString -> RdrName #
tcQual_RDR :: Module -> FastString -> RdrName #
varQual_RDR :: Module -> FastString -> RdrName #
mappend_RDR :: RdrName #
mempty_RDR :: RdrName #
traverse_RDR :: RdrName #
foldMap_RDR :: RdrName #
liftA2_RDR :: RdrName #
replace_RDR :: RdrName #
uIntHash_RDR :: RdrName #
conName_RDR :: RdrName #
selName_RDR :: RdrName #
unComp1_RDR :: RdrName #
unRec1_RDR :: RdrName #
unPar1_RDR :: RdrName #
symbol_RDR :: RdrName #
expectP_RDR :: RdrName #
choose_RDR :: RdrName #
parens_RDR :: RdrName #
readPrec_RDR :: RdrName #
readList_RDR :: RdrName #
inRange_RDR :: RdrName #
maxBound_RDR :: RdrName #
minBound_RDR :: RdrName #
getTag_RDR :: RdrName #
compose_RDR :: RdrName #
toList_RDR :: RdrName #
fromList_RDR :: RdrName #
stringTy_RDR :: RdrName #
returnIO_RDR :: RdrName #
bindIO_RDR :: RdrName #
eqString_RDR :: RdrName #
enumFrom_RDR :: RdrName #
toEnum_RDR :: RdrName #
fromEnum_RDR :: RdrName #
returnM_RDR :: RdrName #
append_RDR :: RdrName #
ordClass_RDR :: RdrName #
numClass_RDR :: RdrName #
eqClass_RDR :: RdrName #
compare_RDR :: RdrName #
mkMainModule_ :: ModuleName -> Module #
mkMainModule :: FastString -> Module #
mkThisGhcModule_ :: ModuleName -> Module #
mkThisGhcModule :: FastString -> Module #
mkBaseModule_ :: ModuleName -> Module #
mkBaseModule :: FastString -> Module #
mkIntegerModule :: FastString -> Module #
mkPrimModule :: FastString -> Module #
mAIN_NAME :: ModuleName #
mkInteractiveModule :: Int -> Module #
gHC_RECORDS :: Module #
gHC_STATICPTR :: Module #
gHC_SRCLOC :: Module #
dEBUG_TRACE :: Module #
dATA_COERCE :: Module #
gHC_TYPENATS :: Module #
gHC_TYPELITS :: Module #
gHC_GENERICS :: Module #
gHC_DESUGAR :: Module #
mONAD_FAIL :: Module #
gHC_STABLE :: Module #
dATA_FOLDABLE :: Module #
dATA_STRING :: Module #
dATA_EITHER :: Module #
dATA_TUPLE :: Module #
gHC_NATURAL :: Module #
gHC_CLASSES :: Module #
gHC_CSTRING :: Module #
genericTyConNames :: [Name] #
basicKnownKeyNames :: [Name] #
isUnboundName :: Name -> Bool #
mkUnboundName :: OccName -> Name #
allNameStrings :: [String] #
Class of things that we can obtain a Unique
from
Instances
Uniquable Int | |
Uniquable EvBindsVar | |
Defined in TcEvidence getUnique :: EvBindsVar -> Unique # | |
Uniquable LocalReg | |
Uniquable Label | |
Defined in Hoopl.Label | |
Uniquable Class | |
Uniquable CoAxiomRule | |
Defined in CoAxiom getUnique :: CoAxiomRule -> Unique # | |
Uniquable ConLike | |
Uniquable DataCon | |
Uniquable PatSyn | |
Uniquable Var | |
Uniquable SourcePackageId | |
Defined in PackageConfig getUnique :: SourcePackageId -> Unique # | |
Uniquable PackageName | |
Defined in PackageConfig getUnique :: PackageName -> Unique # | |
Uniquable Unique | |
Uniquable Module | |
Uniquable ModuleName | |
Defined in Module getUnique :: ModuleName -> Unique # | |
Uniquable UnitId | |
Uniquable InstalledUnitId | |
Defined in Module getUnique :: InstalledUnitId -> Unique # | |
Uniquable ComponentId | |
Defined in Module getUnique :: ComponentId -> Unique # | |
Uniquable FastString | |
Defined in Unique getUnique :: FastString -> Unique # | |
Uniquable TyCon | |
Uniquable OccName | |
Uniquable Name | |
Uniquable (CoAxiom br) | |
Uniquable name => Uniquable (AnnTarget name) | |
Defined in Annotations |
module RdrName
module RnSplice
module RnNames
module TcEnv
unwrapIP :: Type -> CoercionR #
Create a Coercion
that unwraps an implicit-parameter or
overloaded-label dictionary to expose the underlying value. We
expect the Type
to have the form `IP sym ty` or `IsLabel sym ty`,
and return a Coercion
`co :: IP sym ty ~ ty` or
`co :: IsLabel sym ty ~ Proxy# sym -> ty`. See also
Note [Type-checking overloaded labels] in TcExpr.
evVarsOfTerm :: EvTerm -> VarSet #
findNeededEvVars :: EvBindMap -> VarSet -> VarSet #
evTermCoercion :: EvTerm -> TcCoercion #
isEmptyTcEvBinds :: TcEvBinds -> Bool #
mkEvScSelectors :: Class -> [TcType] -> [(TcPredType, EvExpr)] #
mkEvCast :: EvExpr -> TcCoercion -> EvTerm #
evTypeable :: Type -> EvTypeable -> EvTerm #
evCast :: EvExpr -> TcCoercion -> EvTerm #
d |> co
evCoercion :: TcCoercion -> EvTerm #
mkGivenEvBind :: EvVar -> EvTerm -> EvBind #
mkWantedEvBind :: EvVar -> EvTerm -> EvBind #
foldEvBindMap :: (EvBind -> a -> a) -> a -> EvBindMap -> a #
evBindMapBinds :: EvBindMap -> Bag EvBind #
isEmptyEvBindMap :: EvBindMap -> Bool #
extendEvBinds :: EvBindMap -> EvBind -> EvBindMap #
isCoEvBindsVar :: EvBindsVar -> Bool #
collectHsWrapBinders :: HsWrapper -> ([Var], HsWrapper) #
isErasableHsWrapper :: HsWrapper -> Bool #
Is the wrapper erasable, i.e., will not affect runtime semantics?
isIdHsWrapper :: HsWrapper -> Bool #
mkWpTyLams :: [TyVar] -> HsWrapper #
mkWpEvVarApps :: [EvVar] -> HsWrapper #
mkWpEvApps :: [EvTerm] -> HsWrapper #
mkWpTyApps :: [Type] -> HsWrapper #
mkWpCastN :: TcCoercionN -> HsWrapper #
mkWpCastR :: TcCoercionR -> HsWrapper #
maybeTcSubCo :: EqRel -> TcCoercion -> TcCoercion #
If the EqRel is ReprEq, makes a SubCo; otherwise, does nothing. Note that the input coercion should always be nominal.
tcCoToMCo :: TcCoercion -> TcMCoercion #
isTcReflexiveCo :: TcCoercion -> Bool #
This version does a slow check, calculating the related types and seeing if they are equal.
isTcGReflMCo :: TcMCoercion -> Bool #
isTcReflCo :: TcCoercion -> Bool #
coVarsOfTcCo :: TcCoercion -> TcTyCoVarSet #
tcCoercionRole :: TcCoercion -> Role #
tcCoercionKind :: TcCoercion -> Pair TcType #
mkTcCoVarCo :: CoVar -> TcCoercion #
mkTcKindCo :: TcCoercion -> TcCoercionN #
mkTcPhantomCo :: TcCoercionN -> TcType -> TcType -> TcCoercionP #
mkTcCoherenceRightCo :: Role -> TcType -> TcCoercionN -> TcCoercion -> TcCoercion #
mkTcCoherenceLeftCo :: Role -> TcType -> TcCoercionN -> TcCoercion -> TcCoercion #
mkTcGReflLeftCo :: Role -> TcType -> TcCoercionN -> TcCoercion #
mkTcGReflRightCo :: Role -> TcType -> TcCoercionN -> TcCoercion #
mkTcAxiomRuleCo :: CoAxiomRule -> [TcCoercion] -> TcCoercionR #
tcDowngradeRole :: Role -> Role -> TcCoercion -> TcCoercion #
mkTcSubCo :: TcCoercionN -> TcCoercionR #
mkTcLRCo :: LeftOrRight -> TcCoercion -> TcCoercion #
mkTcNthCo :: Role -> Int -> TcCoercion -> TcCoercion #
mkTcForAllCos :: [(TyVar, TcCoercionN)] -> TcCoercion -> TcCoercion #
mkTcForAllCo :: TyVar -> TcCoercionN -> TcCoercion -> TcCoercion #
mkTcUnbranchedAxInstCo :: CoAxiom Unbranched -> [TcType] -> [TcCoercion] -> TcCoercionR #
mkTcAxInstCo :: forall (br :: BranchFlag). Role -> CoAxiom br -> BranchIndex -> [TcType] -> [TcCoercion] -> TcCoercion #
mkTcFunCo :: Role -> TcCoercion -> TcCoercion -> TcCoercion #
mkTcAppCo :: TcCoercion -> TcCoercionN -> TcCoercion #
mkTcTyConAppCo :: Role -> TyCon -> [TcCoercion] -> TcCoercion #
mkTcRepReflCo :: TcType -> TcCoercionR #
mkTcNomReflCo :: TcType -> TcCoercionN #
mkTcTransCo :: TcCoercion -> TcCoercion -> TcCoercion #
mkTcSymCo :: TcCoercion -> TcCoercion #
mkTcReflCo :: Role -> TcType -> TcCoercion #
type TcCoercion = Coercion #
type TcCoercionN = CoercionN #
type TcCoercionR = CoercionR #
type TcCoercionP = CoercionP #
type TcMCoercion = MCoercion #
WpHole | |
WpCompose HsWrapper HsWrapper | |
WpFun HsWrapper HsWrapper TcType SDoc | |
WpCast TcCoercionR | |
WpEvLam EvVar | |
WpEvApp EvTerm | |
WpTyLam TyVar | |
WpTyApp KindOrType | |
WpLet TcEvBinds |
Instances
Data HsWrapper | |
Defined in TcEvidence gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsWrapper -> c HsWrapper # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HsWrapper # toConstr :: HsWrapper -> Constr # dataTypeOf :: HsWrapper -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c HsWrapper) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HsWrapper) # gmapT :: (forall b. Data b => b -> b) -> HsWrapper -> HsWrapper # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsWrapper -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsWrapper -> r # gmapQ :: (forall d. Data d => d -> u) -> HsWrapper -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsWrapper -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsWrapper -> m HsWrapper # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsWrapper -> m HsWrapper # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsWrapper -> m HsWrapper # | |
Outputable HsWrapper | |
Instances
Data TcEvBinds | |
Defined in TcEvidence gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TcEvBinds -> c TcEvBinds # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TcEvBinds # toConstr :: TcEvBinds -> Constr # dataTypeOf :: TcEvBinds -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TcEvBinds) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TcEvBinds) # gmapT :: (forall b. Data b => b -> b) -> TcEvBinds -> TcEvBinds # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TcEvBinds -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TcEvBinds -> r # gmapQ :: (forall d. Data d => d -> u) -> TcEvBinds -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> TcEvBinds -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> TcEvBinds -> m TcEvBinds # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TcEvBinds -> m TcEvBinds # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TcEvBinds -> m TcEvBinds # | |
Outputable TcEvBinds | |
data EvBindsVar #
Instances
Uniquable EvBindsVar | |
Defined in TcEvidence getUnique :: EvBindsVar -> Unique # | |
Outputable EvBindsVar | |
Defined in TcEvidence ppr :: EvBindsVar -> SDoc # pprPrec :: Rational -> EvBindsVar -> SDoc # |
Instances
Data EvTerm | |
Defined in TcEvidence gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> EvTerm -> c EvTerm # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c EvTerm # toConstr :: EvTerm -> Constr # dataTypeOf :: EvTerm -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c EvTerm) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c EvTerm) # gmapT :: (forall b. Data b => b -> b) -> EvTerm -> EvTerm # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> EvTerm -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> EvTerm -> r # gmapQ :: (forall d. Data d => d -> u) -> EvTerm -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> EvTerm -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> EvTerm -> m EvTerm # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> EvTerm -> m EvTerm # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> EvTerm -> m EvTerm # | |
Outputable EvTerm | |
data EvTypeable #
Instructions on how to make a Typeable
dictionary.
See Note [Typeable evidence terms]
EvTypeableTyCon TyCon [EvTerm] | Dictionary for |
EvTypeableTyApp EvTerm EvTerm | Dictionary for |
EvTypeableTrFun EvTerm EvTerm | Dictionary for |
EvTypeableTyLit EvTerm | Dictionary for a type literal,
e.g. |
Instances
Data EvTypeable | |
Defined in TcEvidence gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> EvTypeable -> c EvTypeable # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c EvTypeable # toConstr :: EvTypeable -> Constr # dataTypeOf :: EvTypeable -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c EvTypeable) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c EvTypeable) # gmapT :: (forall b. Data b => b -> b) -> EvTypeable -> EvTypeable # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> EvTypeable -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> EvTypeable -> r # gmapQ :: (forall d. Data d => d -> u) -> EvTypeable -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> EvTypeable -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> EvTypeable -> m EvTypeable # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> EvTypeable -> m EvTypeable # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> EvTypeable -> m EvTypeable # | |
Outputable EvTypeable | |
Defined in TcEvidence ppr :: EvTypeable -> SDoc # pprPrec :: Rational -> EvTypeable -> SDoc # |
data EvCallStack #
Evidence for CallStack
implicit parameters.
EvCsEmpty | |
EvCsPushCall Name RealSrcSpan EvExpr |
|
Instances
Data EvCallStack | |
Defined in TcEvidence gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> EvCallStack -> c EvCallStack # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c EvCallStack # toConstr :: EvCallStack -> Constr # dataTypeOf :: EvCallStack -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c EvCallStack) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c EvCallStack) # gmapT :: (forall b. Data b => b -> b) -> EvCallStack -> EvCallStack # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> EvCallStack -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> EvCallStack -> r # gmapQ :: (forall d. Data d => d -> u) -> EvCallStack -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> EvCallStack -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> EvCallStack -> m EvCallStack # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> EvCallStack -> m EvCallStack # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> EvCallStack -> m EvCallStack # | |
Outputable EvCallStack | |
Defined in TcEvidence ppr :: EvCallStack -> SDoc # pprPrec :: Rational -> EvCallStack -> SDoc # |
data CoercionHole #
A coercion to be filled in by the type-checker. See Note [Coercion holes]
Instances
Data CoercionHole | |
Defined in TyCoRep gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CoercionHole -> c CoercionHole # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CoercionHole # toConstr :: CoercionHole -> Constr # dataTypeOf :: CoercionHole -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c CoercionHole) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CoercionHole) # gmapT :: (forall b. Data b => b -> b) -> CoercionHole -> CoercionHole # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CoercionHole -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CoercionHole -> r # gmapQ :: (forall d. Data d => d -> u) -> CoercionHole -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> CoercionHole -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> CoercionHole -> m CoercionHole # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CoercionHole -> m CoercionHole # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CoercionHole -> m CoercionHole # | |
Outputable CoercionHole | |
Defined in TyCoRep ppr :: CoercionHole -> SDoc # pprPrec :: Rational -> CoercionHole -> SDoc # |
Instances
Eq Role | |
Data Role | |
Defined in CoAxiom gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Role -> c Role # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Role # dataTypeOf :: Role -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Role) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Role) # gmapT :: (forall b. Data b => b -> b) -> Role -> Role # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Role -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Role -> r # gmapQ :: (forall d. Data d => d -> u) -> Role -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Role -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Role -> m Role # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Role -> m Role # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Role -> m Role # | |
Ord Role | |
Binary Role | |
Outputable Role | |
Annotate (Maybe Role) | |
pickLR :: LeftOrRight -> (a, a) -> a #
data LeftOrRight #
Instances
Eq LeftOrRight | |
Defined in BasicTypes (==) :: LeftOrRight -> LeftOrRight -> Bool # (/=) :: LeftOrRight -> LeftOrRight -> Bool # | |
Data LeftOrRight | |
Defined in BasicTypes gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> LeftOrRight -> c LeftOrRight # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c LeftOrRight # toConstr :: LeftOrRight -> Constr # dataTypeOf :: LeftOrRight -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c LeftOrRight) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c LeftOrRight) # gmapT :: (forall b. Data b => b -> b) -> LeftOrRight -> LeftOrRight # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LeftOrRight -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LeftOrRight -> r # gmapQ :: (forall d. Data d => d -> u) -> LeftOrRight -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> LeftOrRight -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> LeftOrRight -> m LeftOrRight # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LeftOrRight -> m LeftOrRight # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LeftOrRight -> m LeftOrRight # | |
Outputable LeftOrRight | |
Defined in BasicTypes ppr :: LeftOrRight -> SDoc # pprPrec :: Rational -> LeftOrRight -> SDoc # |
isNextArgVisible :: TcType -> Bool #
Should this type be applied to a visible argument?
isNextTyConArgVisible :: TyCon -> [Type] -> Bool #
If the tycon is applied to the types, is the next argument visible?
tcTyConVisibilities :: TyCon -> [Bool] #
For every arg a tycon can take, the returned list says True if the argument is taken visibly, and False otherwise. Ends with an infinite tail of Trues to allow for oversaturation.
isFunPtrTy :: Type -> Bool #
isFFIPrimResultTy :: DynFlags -> Type -> Validity #
isFFIPrimArgumentTy :: DynFlags -> Type -> Validity #
isFFILabelTy :: Type -> Validity #
isFFIDynTy :: Type -> Type -> Validity #
isFFIExportResultTy :: Type -> Validity #
isFFIImportResultTy :: DynFlags -> Type -> Validity #
isFFIExternalTy :: Type -> Validity #
deNoteType :: Type -> Type #
isAlmostFunctionFree :: TcType -> Bool #
Is this type *almost function-free*? See Note [Almost function-free] in TcRnTypes
isTyVarHead :: TcTyVar -> TcType -> Bool #
Does the given tyvar appear at the head of a chain of applications (a t1 ... tn)
isCallStackPred :: Class -> [Type] -> Maybe FastString #
Is a PredType
a CallStack
implicit parameter?
If so, return the name of the parameter.
isCallStackTy :: Type -> Bool #
Is a type a CallStack
?
isStringTy :: Type -> Bool #
Is a type String
?
isFloatingTy :: Type -> Bool #
Does a type represent a floating-point number?
isIntegerTy :: Type -> Bool #
isDoubleTy :: Type -> Bool #
isOverloadedTy :: Type -> Bool #
isInsolubleOccursCheck :: EqRel -> TcTyVar -> TcType -> Bool #
Is the equality a ~r ...a.... definitely insoluble or not? a ~r Maybe a -- Definitely insoluble a ~N ...(F a)... -- Not definitely insoluble -- Perhaps (F a) reduces to Int a ~R ...(N a)... -- Not definitely insoluble -- Perhaps newtype N a = MkN Int See Note [Occurs check error] in TcCanonical for the motivation for this function.
isImprovementPred :: PredType -> Bool #
immSuperClasses :: Class -> [Type] -> [PredType] #
transSuperClasses :: PredType -> [PredType] #
mkMinimalBySCs :: (a -> PredType) -> [a] -> [a] #
pickCapturedPreds :: TyVarSet -> TcThetaType -> TcThetaType #
pickQuantifiablePreds :: TyVarSet -> TcThetaType -> TcThetaType #
When inferring types, should we quantify over a given predicate? Generally true of classes; generally false of equality constraints. Equality constraints that mention quantified type variables and implicit variables complicate the story. See Notes [Inheriting implicit parameters] and [Quantifying over equality constraints]
hasTyVarHead :: Type -> Bool #
checkValidClsArgs :: Bool -> Class -> [KindOrType] -> Bool #
isTyVarClassPred :: PredType -> Bool #
pickyEqType :: TcType -> TcType -> Bool #
Like pickyEqTypeVis
, but returns a Bool for convenience
tcEqTypeVis :: TcType -> TcType -> Bool #
Like tcEqType
, but returns True if the visible part of the types
are equal, even if they are really unequal (in the invisible bits)
tcEqTypeNoKindCheck :: TcType -> TcType -> Bool #
Just like tcEqType
, but will return True for types of different kinds
as long as their non-coercion structure is identical.
tcSplitDFunHead :: Type -> (Class, [Type]) #
tcIsTyVarTy :: Type -> Bool #
tcGetTyVar :: String -> Type -> TyVar #
tcGetTyVar_maybe :: Type -> Maybe TyVar #
tcGetCastedTyVar_maybe :: Type -> Maybe (TyVar, CoercionN) #
If the type is a tyvar, possibly under a cast, returns it, along with the coercion. Thus, the co is :: kind tv ~N kind type
tcRepGetNumAppTys :: Type -> Arity #
Returns the number of arguments in the given type, without looking through synonyms. This is used only for error reporting. We don't look through synonyms because of #11313.
tcSplitAppTys :: Type -> (Type, [Type]) #
tcSplitAppTy :: Type -> (Type, Type) #
tcFunResultTyN :: HasDebugCallStack => Arity -> Type -> Type #
Strips off n *visible* arguments and returns the resulting type
tcFunResultTy :: Type -> Type #
tcFunArgTy :: Type -> Type #
tcSplitFunTysN :: Arity -> TcRhoType -> Either Arity ([TcSigmaType], TcSigmaType) #
Split off exactly the specified number argument types
Returns
(Left m) if there are m
missing arrows in the type
(Right (tys,res)) if the type looks like t1 -> ... -> tn -> res
tcSplitFunTys :: Type -> ([Type], Type) #
tcSplitTyConApp :: Type -> (TyCon, [Type]) #
tcTyConAppArgs :: Type -> [Type] #
tcTyConAppTyCon_maybe :: Type -> Maybe TyCon #
Like tcRepSplitTyConApp_maybe
, but only returns the TyCon
.
tcTyConAppTyCon :: Type -> TyCon #
tcDeepSplitSigmaTy_maybe :: TcSigmaType -> Maybe ([TcType], [TyVar], ThetaType, TcSigmaType) #
tcSplitNestedSigmaTys :: Type -> ([TyVar], ThetaType, Type) #
Split a sigma type into its parts, going underneath as many ForAllTy
s
as possible. For example, given this type synonym:
type Traversal s t a b = forall f. Applicative f => (a -> f b) -> s -> f t
if you called tcSplitSigmaTy
on this type:
forall s t a b. Each s t a b => Traversal s t a b
then it would return ([s,t,a,b], [Each s t a b], Traversal s t a b)
. But
if you instead called tcSplitNestedSigmaTys
on the type, it would return
([s,t,a,b,f], [Each s t a b, Applicative f], (a -> f b) -> s -> f t)
.
tcSplitPhiTy :: Type -> (ThetaType, Type) #
tcIsForAllTy :: Type -> Bool #
Is this a ForAllTy with a named binder?
tcSplitForAllVarBndrs :: Type -> ([TyVarBinder], Type) #
Like tcSplitForAllTys
, but splits off only named binders.
tcSplitForAllTysSameVis :: ArgFlag -> Type -> ([TyVar], Type) #
Like tcSplitForAllTys
, but only splits a ForAllTy
if
is sameVis
argf supplied_argfTrue
, where argf
is the visibility
of the ForAllTy
's binder and supplied_argf
is the visibility provided
as an argument to this function.
tcSplitForAllTys :: Type -> ([TyVar], Type) #
Like tcSplitPiTys
, but splits off only named binders,
returning just the tycovars.
tcSplitForAllTy_maybe :: Type -> Maybe (TyVarBinder, Type) #
tcSplitPiTy_maybe :: Type -> Maybe (TyBinder, Type) #
Splits a type into a TyBinder and a body, if possible. Panics otherwise
tcSplitPiTys :: Type -> ([TyBinder], Type) #
Splits a forall type into a list of TyBinder
s and the inner type.
Always succeeds, even if it returns an empty list.
mkTcCastTy :: Type -> Coercion -> Type #
mkTcAppTys :: Type -> [Type] -> Type #
getDFunTyKey :: Type -> OccName #
mkSpecSigmaTy :: [TyVar] -> [PredType] -> Type -> Type #
Make a sigma ty where all type variables are "specified". That is, they can be used with visible type application
mkInfSigmaTy :: [TyCoVar] -> [PredType] -> Type -> Type #
Make a sigma ty where all type variables are Inferred
. That is,
they cannot be used with visible type application.
mkTyVarNamePairs :: [TyVar] -> [(Name, TyVar)] #
isRuntimeUnkSkol :: TyVar -> Bool #
isIndirect :: MetaDetails -> Bool #
isFlexi :: MetaDetails -> Bool #
isTyVarTyVar :: Var -> Bool #
setMetaTyVarTcLevel :: TcTyVar -> TcLevel -> TcTyVar #
metaTyVarRef :: TyVar -> IORef MetaDetails #
metaTyVarTcLevel :: TcTyVar -> TcLevel #
metaTyVarInfo :: TcTyVar -> MetaInfo #
isMetaTyVarTy :: TcType -> Bool #
isAmbiguousTyVar :: TcTyVar -> Bool #
isMetaTyVar :: TcTyVar -> Bool #
isOverlappableTyVar :: TcTyVar -> Bool #
isSkolemTyVar :: TcTyVar -> Bool #
isFlattenTyVar :: TcTyVar -> Bool #
True of both given and wanted flatten-skolems (fmv and fsk)
isFskTyVar :: TcTyVar -> Bool #
isFmvTyVar :: TcTyVar -> Bool #
isTyConableTyVar :: TcTyVar -> Bool #
isImmutableTyVar :: TyVar -> Bool #
isFloatedTouchableMetaTyVar :: TcLevel -> TcTyVar -> Bool #
isTouchableMetaTyVar :: TcLevel -> TcTyVar -> Bool #
tcIsTcTyVar :: TcTyVar -> Bool #
isTyFamFree :: Type -> Bool #
Check that a type does not contain any type family applications.
tcTyConAppTyFamInstsAndVis :: TyCon -> [Type] -> [(Bool, TyCon, [Type])] #
In an application of a TyCon
to some arguments, find the outermost
occurrences of type family applications within the arguments. This function
will not consider the TyCon
itself when checking for type family
applications.
See tcTyFamInstsAndVis
for more details on how this works (as this
function is called inside of tcTyFamInstsAndVis
).
tcTyFamInstsAndVis :: Type -> [(Bool, TyCon, [Type])] #
Like tcTyFamInsts
, except that the output records whether the
type family and its arguments occur as an invisible argument in
some type application. This information is useful because it helps GHC know
when to turn on -fprint-explicit-kinds
during error reporting so that
users can actually see the type family being mentioned.
As an example, consider:
class C a data T (a :: k) type family F a :: k instance C (T @(F Int) (F Bool))
There are two occurrences of the type family F
in that C
instance, so
will return:tcTyFamInstsAndVis
(C (T @(F Int) (F Bool)))
[ (True
, F, [Int]) , (False
, F, [Bool]) ]
F Int
is paired with True
since it appears as an invisible argument
to C
, whereas F Bool
is paired with False
since it appears an a
visible argument to C
.
See also Note [Kind arguments in error messages]
in TcErrors.
tcTyFamInsts :: Type -> [(TyCon, [Type])] #
Finds outermost type-family applications occurring in a type, after expanding synonyms. In the list (F, tys) that is returned we guarantee that tys matches F's arity. For example, given type family F a :: * -> * (arity 1) calling tcTyFamInsts on (Maybe (F Int Bool) will return (F, [Int]), not (F, [Int,Bool])
This is important for its use in deciding termination of type instances (see #11581). E.g. type instance G [Int] = ...(F Int type)... we don't need to take type into account when asking if the calls on the RHS are smaller than the LHS
promoteSkolemX :: TcLevel -> TCvSubst -> TcTyVar -> (TCvSubst, TcTyVar) #
Change the TcLevel in a skolem, extending a substitution
promoteSkolem :: TcLevel -> TcTyVar -> TcTyVar #
tcTypeLevel :: TcType -> TcLevel #
tcTyVarLevel :: TcTyVar -> TcLevel #
sameDepthAs :: TcLevel -> TcLevel -> Bool #
strictlyDeeperThan :: TcLevel -> TcLevel -> Bool #
pushTcLevel :: TcLevel -> TcLevel #
isTopTcLevel :: TcLevel -> Bool #
topTcLevel :: TcLevel #
maxTcLevel :: TcLevel -> TcLevel -> TcLevel #
mkSynFunTys :: [SyntaxOpType] -> ExpType -> SyntaxOpType #
Like mkFunTys
but for SyntaxOpType
synKnownType :: TcType -> SyntaxOpType #
Like SynType
but accepts a regular TcType
mkCheckExpType :: TcType -> ExpType #
Make an ExpType
suitable for checking.
type TcTyVarBinder = TyVarBinder #
type TcPredType = PredType #
type TcThetaType = ThetaType #
type TcSigmaType = TcType #
type TcTyVarSet = TyVarSet #
type TcTyCoVarSet = TyCoVarSet #
type TcDTyVarSet = DTyVarSet #
type TcDTyCoVarSet = DTyCoVarSet #
An expected type to check against during type-checking. See Note [ExpType] in TcMType, where you'll also find manipulators.
data InferResult #
Instances
Outputable InferResult | |
Defined in TcType ppr :: InferResult -> SDoc # pprPrec :: Rational -> InferResult -> SDoc # |
type ExpSigmaType = ExpType #
type ExpRhoType = ExpType #
data SyntaxOpType #
What to expect for an argument to a rebindable-syntax operator.
Quite like Type
, but allows for holes to be filled in by tcSyntaxOp.
The callback called from tcSyntaxOp gets a list of types; the meaning
of these types is determined by a left-to-right depth-first traversal
of the SyntaxOpType
tree. So if you pass in
SynAny `SynFun` (SynList `SynFun` SynType Int) `SynFun` SynAny
you'll get three types back: one for the first SynAny
, the element
type of the list, and one for the last SynAny
. You don't get anything
for the SynType
, because you've said positively that it should be an
Int, and so it shall be.
This is defined here to avoid defining it in TcExpr.hs-boot.
SynAny | Any type |
SynRho | A rho type, deeply skolemised or instantiated as appropriate |
SynList | A list type. You get back the element type of the list |
SynFun SyntaxOpType SyntaxOpType infixr 0 | A function. |
SynType ExpType | A known type. |
type TypeSize = IntWithInf #
orphNamesOfCoCon :: forall (br :: BranchFlag). CoAxiom br -> NameSet #
orphNamesOfCo :: Coercion -> NameSet #
orphNamesOfTypes :: [Type] -> NameSet #
orphNamesOfType :: Type -> NameSet #
isEqPrimPred :: PredType -> Bool #
isClassPred :: PredType -> Bool #
isEqPredClass :: Class -> Bool #
mkClassPred :: Class -> [Type] -> PredType #
classifiesTypeWithValues :: Kind -> Bool #
Does this classify a type allowed to have values? Responds True to things like *, #, TYPE Lifted, TYPE v, Constraint.
True of any sub-kind of OpenTypeKind
isKindLevPoly :: Kind -> Bool #
Tests whether the given kind (which should look like TYPE x
)
is something other than a constructor tree (that is, constructors at every node).
E.g. True of TYPE k, TYPE (F Int)
False of TYPE 'LiftedRep
tcTypeKind :: HasDebugCallStack => Type -> Kind #
nonDetCmpTypes :: [Type] -> [Type] -> Ordering #
nonDetCmpType :: Type -> Type -> Ordering #
eqTypes :: [Type] -> [Type] -> Bool #
Type equality on lists of types, looking through type synonyms but not newtypes.
eqTypeX :: RnEnv2 -> Type -> Type -> Bool #
Compare types with respect to a (presumably) non-empty RnEnv2
.
isPrimitiveType :: Type -> Bool #
Returns true of types that are opaque to Haskell.
isUnboxedTupleType :: Type -> Bool #
isUnliftedType :: HasDebugCallStack => Type -> Bool #
See Type for what an unlifted type is.
Panics on levity polymorphic types; See mightBeUnliftedType
for
a more approximate predicate that behaves better in the presence of
levity polymorphism.
closeOverKindsDSet :: DTyVarSet -> DTyVarSet #
Add the kind variables free in the kinds of the tyvars in the given set. Returns a deterministic set.
closeOverKinds :: TyVarSet -> TyVarSet #
Add the kind variables free in the kinds of the tyvars in the given set. Returns a non-deterministic set.
mkSpecForAllTys :: [TyVar] -> Type -> Type #
Like mkForAllTys
, but assumes all variables are dependent and
Specified
, a common case
mkInvForAllTys :: [TyVar] -> Type -> Type #
Like mkTyCoInvForAllTys
, but tvs should be a list of tyvar
mkTyCoInvForAllTys :: [TyCoVar] -> Type -> Type #
Like mkForAllTys
, but assumes all variables are dependent and
Inferred
, a common case
mkInvForAllTy :: TyVar -> Type -> Type #
Like mkTyCoInvForAllTy
, but tv should be a tyvar
tcSplitTyConApp_maybe :: HasCallStack => Type -> Maybe (TyCon, [Type]) #
Split a type constructor application into its type constructor and
applied types. Note that this may fail in the case of a FunTy
with an
argument of unknown kind FunTy
(e.g. FunTy (a :: k) Int
. since the kind
of a
isn't of the form TYPE rep
). Consequently, you may need to zonk your
type before using this function.
If you only need the TyCon
, consider using tcTyConAppTyCon_maybe
.
mkTyConApp :: TyCon -> [Type] -> Type #
tcRepSplitAppTy_maybe :: Type -> Maybe (Type, Type) #
Does the AppTy split as in tcSplitAppTy_maybe
, but assumes that
any coreView stuff is already done. Refuses to look through (c => t)
getTyVar :: String -> Type -> TyVar #
Attempts to obtain the type variable underlying a Type
, and panics with the
given message if this is not a type variable type. See also getTyVar_maybe
isRuntimeRepVar :: TyVar -> Bool #
Is a tyvar of type RuntimeRep
?
isUnliftedTypeKind :: Kind -> Bool #
Returns True if the kind classifies unlifted types and False otherwise. Note that this returns False for levity-polymorphic kinds, which may be specialized to a kind that classifies unlifted types.
substTyVarBndr :: HasCallStack => TCvSubst -> TyVar -> (TCvSubst, TyVar) #
substCoUnchecked :: TCvSubst -> Coercion -> Coercion #
Substitute within a Coercion
disabling sanity checks.
The problems that the sanity checks in substCo catch are described in
Note [The substitution invariant].
The goal of #11371 is to migrate all the calls of substCoUnchecked to
substCo and remove this function. Please don't use in new code.
substThetaUnchecked :: TCvSubst -> ThetaType -> ThetaType #
Substitute within a ThetaType
disabling the sanity checks.
The problems that the sanity checks in substTys catch are described in
Note [The substitution invariant].
The goal of #11371 is to migrate all the calls of substThetaUnchecked to
substTheta and remove this function. Please don't use in new code.
substTheta :: HasCallStack => TCvSubst -> ThetaType -> ThetaType #
Substitute within a ThetaType
The substitution has to satisfy the invariants described in
Note [The substitution invariant].
substTysUnchecked :: TCvSubst -> [Type] -> [Type] #
Substitute within several Type
s disabling the sanity checks.
The problems that the sanity checks in substTys catch are described in
Note [The substitution invariant].
The goal of #11371 is to migrate all the calls of substTysUnchecked to
substTys and remove this function. Please don't use in new code.
substTys :: HasCallStack => TCvSubst -> [Type] -> [Type] #
Substitute within several Type
s
The substitution has to satisfy the invariants described in
Note [The substitution invariant].
substTyUnchecked :: TCvSubst -> Type -> Type #
Substitute within a Type
disabling the sanity checks.
The problems that the sanity checks in substTy catch are described in
Note [The substitution invariant].
The goal of #11371 is to migrate all the calls of substTyUnchecked to
substTy and remove this function. Please don't use in new code.
substTy :: HasCallStack => TCvSubst -> Type -> Type #
Substitute within a Type
The substitution has to satisfy the invariants described in
Note [The substitution invariant].
substTyAddInScope :: TCvSubst -> Type -> Type #
Substitute within a Type
after adding the free variables of the type
to the in-scope set. This is useful for the case when the free variables
aren't already in the in-scope set or easily available.
See also Note [The substitution invariant].
substCoWithUnchecked :: [TyVar] -> [Type] -> Coercion -> Coercion #
Coercion substitution, see zipTvSubst
. Disables sanity checks.
The problems that the sanity checks in substCo catch are described in
Note [The substitution invariant].
The goal of #11371 is to migrate all the calls of substCoUnchecked to
substCo and remove this function. Please don't use in new code.
substTyWithUnchecked :: [TyVar] -> [Type] -> Type -> Type #
Type substitution, see zipTvSubst
. Disables sanity checks.
The problems that the sanity checks in substTy catch are described in
Note [The substitution invariant].
The goal of #11371 is to migrate all the calls of substTyUnchecked to
substTy and remove this function. Please don't use in new code.
substTyWith :: HasCallStack => [TyVar] -> [Type] -> Type -> Type #
Type substitution, see zipTvSubst
zipCoEnv :: HasDebugCallStack => [CoVar] -> [Coercion] -> CvSubstEnv #
zipTyEnv :: HasDebugCallStack => [TyVar] -> [Type] -> TvSubstEnv #
mkTvSubstPrs :: [(TyVar, Type)] -> TCvSubst #
Generates the in-scope set for the TCvSubst
from the types in the
incoming environment. No CoVars, please!
zipTvSubst :: HasDebugCallStack => [TyVar] -> [Type] -> TCvSubst #
Generates the in-scope set for the TCvSubst
from the types in the incoming
environment. No CoVars, please!
unionTCvSubst :: TCvSubst -> TCvSubst -> TCvSubst #
extendTCvInScopeSet :: TCvSubst -> VarSet -> TCvSubst #
extendTCvInScopeList :: TCvSubst -> [Var] -> TCvSubst #
extendTCvInScope :: TCvSubst -> Var -> TCvSubst #
setTvSubstEnv :: TCvSubst -> TvSubstEnv -> TCvSubst #
notElemTCvSubst :: Var -> TCvSubst -> Bool #
getTCvInScope :: TCvSubst -> InScopeSet #
getTvSubstEnv :: TCvSubst -> TvSubstEnv #
mkTvSubst :: InScopeSet -> TvSubstEnv -> TCvSubst #
Make a TCvSubst with specified tyvar subst and empty covar subst
mkTCvSubst :: InScopeSet -> (TvSubstEnv, CvSubstEnv) -> TCvSubst #
mkEmptyTCvSubst :: InScopeSet -> TCvSubst #
Type & coercion substitution
The following invariants must hold of a TCvSubst
:
- The in-scope set is needed only to guide the generation of fresh uniques
- In particular, the kind of the type variables in the in-scope set is not relevant
- The substitution is only applied ONCE! This is because in general such application will not reach a fixed point.
pprTypeApp :: TyCon -> [Type] -> SDoc #
pprTCvBndr :: TyCoVarBinder -> SDoc #
pprTCvBndrs :: [TyCoVarBinder] -> SDoc #
pprSigmaType :: Type -> SDoc #
pprThetaArrowTy :: ThetaType -> SDoc #
pprParendTheta :: ThetaType -> SDoc #
pprClassPred :: Class -> [Type] -> SDoc #
pprParendKind :: Kind -> SDoc #
pprParendType :: Type -> SDoc #
scopedSort :: [TyCoVar] -> [TyCoVar] #
Do a topological sort on a list of tyvars, so that binders occur before occurrences E.g. given [ a::k, k::*, b::k ] it'll return a well-scoped list [ k::*, a::k, b::k ]
This is a deterministic sorting operation (that is, doesn't depend on Uniques).
It is also meant to be stable: that is, variables should not be reordered unnecessarily. This is specified in Note [ScopedSort] See also Note [Ordering of implicit variables] in RnTypes
noFreeVarsOfType :: Type -> Bool #
Returns True if this type has no free variables. Should be the same as isEmptyVarSet . tyCoVarsOfType, but faster in the non-forall case.
tyCoFVsOfTypes :: [Type] -> FV #
tyCoFVsOfType :: Type -> FV #
The worker for tyCoFVsOfType
and tyCoFVsOfTypeList
.
The previous implementation used unionVarSet
which is O(n+m) and can
make the function quadratic.
It's exported, so that it can be composed with
other functions that compute free variables.
See Note [FV naming conventions] in FV.
Eta-expanded because that makes it run faster (apparently) See Note [FV eta expansion] in FV for explanation.
exactTyCoVarsOfTypes :: [Type] -> TyVarSet #
exactTyCoVarsOfType :: Type -> TyCoVarSet #
tyCoVarsOfTypesList :: [Type] -> [TyCoVar] #
Returns free variables of types, including kind variables as a deterministically ordered list. For type synonyms it does not expand the synonym.
tyCoVarsOfTypesDSet :: [Type] -> DTyCoVarSet #
Returns free variables of types, including kind variables as a deterministic set. For type synonyms it does not expand the synonym.
tyCoVarsOfTypeList :: Type -> [TyCoVar] #
tyCoFVsOfType
that returns free variables of a type in deterministic
order. For explanation of why using VarSet
is not deterministic see
Note [Deterministic FV] in FV.
tyCoVarsOfTypeDSet :: Type -> DTyCoVarSet #
tyCoFVsOfType
that returns free variables of a type in a deterministic
set. For explanation of why using VarSet
is not deterministic see
Note [Deterministic FV] in FV.
tyCoVarsOfTypes :: [Type] -> TyCoVarSet #
tyCoVarsOfType :: Type -> TyCoVarSet #
Create the plain type constructor type which has been applied to no type arguments at all.
mkForAllTys :: [TyCoVarBinder] -> Type -> Type #
Wraps foralls over the type using the provided TyCoVar
s from left to right
mkInvisFunTys :: [Type] -> Type -> Type #
Make nested arrow types
mkInvisFunTy :: Type -> Type -> Type infixr 3 #
mkVisFunTy :: Type -> Type -> Type infixr 3 #
mkTyCoVarTys :: [TyCoVar] -> [Type] #
mkTyCoVarTy :: TyCoVar -> Type #
mkTyVarTys :: [TyVar] -> [Type] #
isVisibleBinder :: TyCoBinder -> Bool #
Does this binder bind a visible argument?
isInvisibleBinder :: TyCoBinder -> Bool #
Does this binder bind an invisible argument?
tyThingCategory :: TyThing -> String #
pprTyThingCategory :: TyThing -> SDoc #
A type labeled KnotTied
might have knot-tied tycons in it. See
Note [Type checking recursive type and class declarations] in
TcTyClsDecls
isPredTy :: HasDebugCallStack => Type -> Bool #
eqType :: Type -> Type -> Bool #
Type equality on source types. Does not look through newtypes
or
PredType
s, but it does look through type synonyms.
This first checks that the kinds of the types are equal and then
checks whether the types are equal, ignoring casts and coercions.
(The kind check is a recursive call, but since all kinds have type
Type
, there is no need to check the types of kinds.)
See also Note [Non-trivial definitional equality] in TyCoRep.
coreView :: Type -> Maybe Type #
This function Strips off the top layer only of a type synonym
application (if any) its underlying representation type.
Returns Nothing if there is nothing to look through.
This function considers Constraint
to be a synonym of TYPE LiftedRep
.
By being non-recursive and inlined, this case analysis gets efficiently joined onto the case analysis that the caller is already doing
tcView :: Type -> Maybe Type #
Gives the typechecker view of a type. This unwraps synonyms but
leaves Constraint
alone. c.f. coreView, which turns Constraint into
TYPE LiftedRep. Returns Nothing if no unwrapping happens.
See also Note [coreView vs tcView]
isLiftedTypeKind :: Kind -> Bool #
This version considers Constraint to be the same as *. Returns True if the argument is equivalent to Type/Constraint and False otherwise. See Note [Kind Constraint and kind Type]
isTauTyCon :: TyCon -> Bool #
data ForallVisFlag #
Is a forall
invisible (e.g., forall a b. {...}
, with a dot) or visible
(e.g., forall a b -> {...}
, with an arrow)?
ForallVis | A visible |
ForallInvis | An invisible |
Instances
liftedTypeKind :: Kind #
constraintKind :: Kind #
mkForAllTy :: TyCoVar -> ArgFlag -> Type -> Type #
Like mkTyCoForAllTy
, but does not check the occurrence of the binder
See Note [Unused coercion variable in ForAllTy]
Instances
Data Type | |
Defined in TyCoRep gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Type -> c Type # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Type # dataTypeOf :: Type -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Type) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Type) # gmapT :: (forall b. Data b => b -> b) -> Type -> Type # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Type -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Type -> r # gmapQ :: (forall d. Data d => d -> u) -> Type -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Type -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Type -> m Type # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Type -> m Type # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Type -> m Type # | |
NFData Type Source # | |
Defined in Development.IDE.GHC.Orphans | |
Outputable Type | |
Eq (DeBruijn Type) | |
ToHie (TScoped Type) | |
Defined in Compat.HieAst |
data TyCoBinder #
A TyCoBinder
represents an argument to a function. TyCoBinders can be
dependent (Named
) or nondependent (Anon
). They may also be visible or
not. See Note [TyCoBinders]
Instances
Data TyCoBinder | |
Defined in TyCoRep gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TyCoBinder -> c TyCoBinder # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TyCoBinder # toConstr :: TyCoBinder -> Constr # dataTypeOf :: TyCoBinder -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TyCoBinder) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TyCoBinder) # gmapT :: (forall b. Data b => b -> b) -> TyCoBinder -> TyCoBinder # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TyCoBinder -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TyCoBinder -> r # gmapQ :: (forall d. Data d => d -> u) -> TyCoBinder -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> TyCoBinder -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> TyCoBinder -> m TyCoBinder # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TyCoBinder -> m TyCoBinder # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TyCoBinder -> m TyCoBinder # | |
Outputable TyCoBinder | |
Defined in TyCoRep ppr :: TyCoBinder -> SDoc # pprPrec :: Rational -> TyCoBinder -> SDoc # |
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"
Argument Flag
Is something required to appear in source Haskell (Required
),
permitted by request (Specified
) (visible type application), or
prohibited entirely from appearing in source Haskell (Inferred
)?
See Note [VarBndrs, TyCoVarBinders, TyConBinders, and visibility] in TyCoRep
Instances
Eq ArgFlag | |
Data ArgFlag | |
Defined in Var gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ArgFlag -> c ArgFlag # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ArgFlag # toConstr :: ArgFlag -> Constr # dataTypeOf :: ArgFlag -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ArgFlag) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ArgFlag) # gmapT :: (forall b. Data b => b -> b) -> ArgFlag -> ArgFlag # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ArgFlag -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ArgFlag -> r # gmapQ :: (forall d. Data d => d -> u) -> ArgFlag -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ArgFlag -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ArgFlag -> m ArgFlag # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ArgFlag -> m ArgFlag # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ArgFlag -> m ArgFlag # | |
Ord ArgFlag | |
Binary ArgFlag | |
Outputable ArgFlag | |
Outputable tv => Outputable (VarBndr tv ArgFlag) | |
data AnonArgFlag #
The non-dependent version of ArgFlag
.
VisArg | Used for |
InvisArg | Used for |
Instances
pprTcTyVarDetails :: TcTyVarDetails -> SDoc #
data MetaDetails #
Instances
Outputable MetaDetails | |
Defined in TcType ppr :: MetaDetails -> SDoc # pprPrec :: Rational -> MetaDetails -> SDoc # |
data TcTyVarDetails #
Instances
Outputable TcTyVarDetails | |
Defined in TcType ppr :: TcTyVarDetails -> SDoc # pprPrec :: Rational -> TcTyVarDetails -> SDoc # |
module TcRnTypes
module TcRnDriver
mapAndUnzipM :: Applicative m => (a -> m (b, c)) -> [a] -> m ([b], [c]) #
The mapAndUnzipM
function maps its first argument over a list, returning
the result as a pair of lists. This function is mainly used with complicated
data structures or a state monad.
foldlM :: (Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m b #
Monadic fold over the elements of a structure, associating to the left, i.e. from left to right.
getCCIndexM :: ContainsCostCentreState gbl => FastString -> TcRnIf gbl lcl CostCentreIndex #
Get the next cost centre index associated with a given name.
setImplicitEnvM :: TypeEnv -> IfL a -> IfL a #
getIfModule :: IfL Module #
initIfaceLoad :: HscEnv -> IfG a -> IO a #
initIfaceTcRn :: IfG a -> TcRn a #
setLocalRdrEnv :: LocalRdrEnv -> RnM a -> RnM a #
fixSafeInstances :: SafeHaskellMode -> [ClsInst] -> [ClsInst] #
Switch instances to safe instances if we're in Safe mode.
finalSafeMode :: DynFlags -> TcGblEnv -> IO SafeHaskellMode #
Figure out the final correct safe haskell mode
recordUnsafeInfer :: WarningMessages -> TcM () #
Mark that safe inference has failed See Note [Safe Haskell Overlapping Instances Implementation] although this is used for more than just that failure case.
addModFinalizersWithLclEnv :: ThModFinalizers -> TcM () #
Adds the given modFinalizers to the global environment and set them to use the current local environment.
getStageAndBindLevel :: Name -> TcRn (Maybe (TopLevelFlag, ThLevel, ThStage)) #
recordTopLevelSpliceLoc :: SrcSpan -> TcM () #
When generating an out-of-scope error message for a variable matching a binding in a later inter-splice group, the typechecker uses the splice locations to provide details in the message about the scope of that binding.
recordThSpliceUse :: TcM () #
recordThUse :: TcM () #
emitNamedWildCardHoleConstraints :: [(Name, TcTyVar)] -> TcM () #
emitAnonWildCardHoleConstraint :: TcTyVar -> TcM () #
traceTcConstraints :: String -> TcM () #
setLclTypeEnv :: TcLclEnv -> TcM a -> TcM a #
isTouchableTcM :: TcTyVar -> TcM Bool #
setTcLevel :: TcLevel -> TcM a -> TcM a #
getTcLevel :: TcM TcLevel #
pushTcLevelM :: TcM a -> TcM (TcLevel, a) #
pushTcLevelM_ :: TcM a -> TcM a #
pushLevelAndCaptureConstraints :: TcM a -> TcM (TcLevel, WantedConstraints, a) #
The name says it all. The returned TcLevel is the *inner* TcLevel.
discardConstraints :: TcM a -> TcM a #
Throw out any constraints emitted by the thing_inside
emitInsoluble :: Ct -> TcM () #
emitImplications :: Bag Implication -> TcM () #
emitImplication :: Implication -> TcM () #
emitSimples :: Cts -> TcM () #
emitSimple :: Ct -> TcM () #
emitConstraints :: WantedConstraints -> TcM () #
emitStaticConstraints :: WantedConstraints -> TcM () #
setConstraintVar :: TcRef WantedConstraints -> TcM a -> TcM a #
addTcEvBind :: EvBindsVar -> EvBind -> TcM () #
setTcEvBindsMap :: EvBindsVar -> EvBindMap -> TcM () #
getTcEvBindsMap :: EvBindsVar -> TcM EvBindMap #
getTcEvTyCoVars :: EvBindsVar -> TcM TyCoVarSet #
cloneEvBindsVar :: EvBindsVar -> TcM EvBindsVar #
newNoTcEvBinds :: TcM EvBindsVar #
Creates an EvBindsVar incapable of holding any bindings. It still tracks covar usages (see comments on ebv_tcvs in TcEvidence), thus must be made monadically
add_warn :: WarnReason -> MsgDoc -> MsgDoc -> TcRn () #
Display a warning, with an optional flag, for the current source location.
addWarnAt :: WarnReason -> SrcSpan -> MsgDoc -> TcRn () #
Display a warning for a given source location.
addWarn :: WarnReason -> MsgDoc -> TcRn () #
Display a warning for the current source location.
addWarnTcM :: WarnReason -> (TidyEnv, MsgDoc) -> TcM () #
Display a warning in a given context.
addWarnTc :: WarnReason -> MsgDoc -> TcM () #
Display a warning in the current context.
warnTcM :: WarnReason -> Bool -> (TidyEnv, MsgDoc) -> TcM () #
Display a warning if a condition is met.
warnIfFlag :: WarningFlag -> Bool -> MsgDoc -> TcRn () #
Display a warning if a condition is met, and the warning is enabled
failWithTcM :: (TidyEnv, MsgDoc) -> TcM a #
failWithTc :: MsgDoc -> TcM a #
tryTcDiscardingErrs :: TcM r -> TcM r -> TcM r #
discardErrs :: TcRn a -> TcRn a #
foldAndRecoverM :: (b -> a -> TcRn b) -> b -> [a] -> TcRn b #
The accumulator is not updated if the action fails
mapAndReportM :: (a -> TcRn b) -> [a] -> TcRn [b] #
Apply the function to all elements on the input list If all succeed, return the list of results Othewise fail, propagating all errors
mapAndRecoverM :: (a -> TcRn b) -> [a] -> TcRn [b] #
Drop elements of the input that fail, so the result list can be shorter than the argument list
captureConstraints :: TcM a -> TcM (a, WantedConstraints) #
tryCaptureConstraints :: TcM a -> TcM (Maybe a, WantedConstraints) #
popErrCtxt :: TcM a -> TcM a #
addLandmarkErrCtxtM :: (TidyEnv -> TcM (TidyEnv, MsgDoc)) -> TcM a -> TcM a #
Variant of addLandmarkErrCtxt
that allows for monadic operations
and tidying.
addLandmarkErrCtxt :: MsgDoc -> TcM a -> TcM a #
Add a fixed landmark message to the error context. A landmark message is always sure to be reported, even if there is a lot of context. It also doesn't count toward the maximum number of contexts reported.
addErrCtxtM :: (TidyEnv -> TcM (TidyEnv, MsgDoc)) -> TcM a -> TcM a #
Add a message to the error context. This message may do tidying.
addErrCtxt :: MsgDoc -> TcM a -> TcM a #
Add a fixed message to the error context. This message should not do any tidying.
setErrCtxt :: [ErrCtxt] -> TcM a -> TcM a #
getErrCtxt :: TcM [ErrCtxt] #
failIfErrsM :: TcRn () #
whenNoErrs :: TcM () -> TcM () #
checkNoErrs :: TcM r -> TcM r #
reportWarning :: WarnReason -> ErrMsg -> TcRn () #
reportError :: ErrMsg -> TcRn () #
reportErrors :: [ErrMsg] -> TcM () #
discardWarnings :: TcRn a -> TcRn a #
addMessages :: Messages -> TcRn () #
getErrsVar :: TcRn (TcRef Messages) #
wrapLocM_ :: HasSrcSpan a => (SrcSpanLess a -> TcM ()) -> a -> TcM () #
wrapLocSndM :: (HasSrcSpan a, HasSrcSpan c) => (SrcSpanLess a -> TcM (b, SrcSpanLess c)) -> a -> TcM (b, c) #
wrapLocFstM :: (HasSrcSpan a, HasSrcSpan b) => (SrcSpanLess a -> TcM (SrcSpanLess b, c)) -> a -> TcM (b, c) #
wrapLocM :: (HasSrcSpan a, HasSrcSpan b) => (SrcSpanLess a -> TcM (SrcSpanLess b)) -> a -> TcM b #
addLocM :: HasSrcSpan a => (SrcSpanLess a -> TcM b) -> a -> TcM b #
setSrcSpan :: SrcSpan -> TcRn a -> TcRn a #
getSrcSpanM :: TcRn SrcSpan #
addDependentFiles :: [FilePath] -> TcRn () #
getDeclaredDefaultTys :: TcRn (Maybe [Type]) #
getRdrEnvs :: TcRn (GlobalRdrEnv, LocalRdrEnv) #
tcIsHsBootOrSig :: TcRn Bool #
getGHCiMonad :: TcRn Name #
traceOptIf :: DumpFlag -> SDoc -> TcRnIf m n () #
traceHiDiffs :: SDoc -> TcRnIf m n () #
printForUserTcRn :: SDoc -> TcRn () #
Like logInfoTcRn, but for user consumption
traceTcRnWithStyle :: PprStyle -> DynFlags -> DumpFlag -> SDoc -> TcRn () #
Unconditionally dump some trace output
The DumpFlag is used only to set the output filename for --dump-to-file, not to decide whether or not to output That part is done by the caller
traceTcRnForUser :: DumpFlag -> SDoc -> TcRn () #
A wrapper around traceTcRnWithStyle
which uses PprUser
style.
traceTcRn :: DumpFlag -> SDoc -> TcRn () #
A wrapper around traceTcRnWithStyle
which uses PprDump
style.
traceOptTcRn :: DumpFlag -> SDoc -> TcRn () #
writeTcRef :: TcRef a -> a -> TcRnIf gbl lcl () #
newSysLocalIds :: FastString -> [TcType] -> TcRnIf gbl lcl [TcId] #
newSysLocalId :: FastString -> TcType -> TcRnIf gbl lcl TcId #
newSysName :: OccName -> TcRnIf gbl lcl Name #
cloneLocalName :: Name -> TcM Name #
newUniqueSupply :: TcRnIf gbl lcl UniqSupply #
escapeArrowScope :: TcM a -> TcM a #
newArrowScope :: TcM a -> TcM a #
withException :: TcRnIf gbl lcl (MaybeErr MsgDoc a) -> TcRnIf gbl lcl a #
A convenient wrapper for taking a MaybeErr MsgDoc a
and throwing
an exception if it is an error.
getEpsAndHpt :: TcRnIf gbl lcl (ExternalPackageState, HomePackageTable) #
getHpt :: TcRnIf gbl lcl HomePackageTable #
updateEps_ :: (ExternalPackageState -> ExternalPackageState) -> TcRnIf gbl lcl () #
Update the external package state.
This is an atomic operation and forces evaluation of the modified EPS in order to avoid space leaks.
updateEps :: (ExternalPackageState -> (ExternalPackageState, a)) -> TcRnIf gbl lcl a #
Update the external package state. Returns the second result of the modifier function.
This is an atomic operation and forces evaluation of the modified EPS in order to avoid space leaks.
getEps :: TcRnIf gbl lcl ExternalPackageState #
getEpsVar :: TcRnIf gbl lcl (TcRef ExternalPackageState) #
withDoDynamicToo :: TcRnIf gbl lcl a -> TcRnIf gbl lcl a #
getGhcMode :: TcRnIf gbl lcl GhcMode #
unlessXOptM :: Extension -> TcRnIf gbl lcl () -> TcRnIf gbl lcl () #
whenWOptM :: WarningFlag -> TcRnIf gbl lcl () -> TcRnIf gbl lcl () #
whenGOptM :: GeneralFlag -> TcRnIf gbl lcl () -> TcRnIf gbl lcl () #
unsetWOptM :: WarningFlag -> TcRnIf gbl lcl a -> TcRnIf gbl lcl a #
unsetGOptM :: GeneralFlag -> TcRnIf gbl lcl a -> TcRnIf gbl lcl a #
unsetXOptM :: Extension -> TcRnIf gbl lcl a -> TcRnIf gbl lcl a #
woptM :: WarningFlag -> TcRnIf gbl lcl Bool #
goptM :: GeneralFlag -> TcRnIf gbl lcl Bool #
discardResult :: TcM a -> TcM () #
initTcWithGbl :: HscEnv -> TcGblEnv -> RealSrcSpan -> TcM r -> IO (Messages, Maybe r) #
Run a TcM
action in the context of an existing GblEnv
.
initTc :: HscEnv -> HscSource -> Bool -> Module -> RealSrcSpan -> TcM r -> IO (Messages, Maybe r) #
Setup the initial typechecking environment
class ContainsCostCentreState e where #
Environments which track CostCentreState
extractCostCentreState :: e -> TcRef CostCentreState #
Instances
ContainsCostCentreState DsGblEnv | |
Defined in TcRnMonad | |
ContainsCostCentreState TcGblEnv | |
Defined in TcRnMonad |
getRoleAnnots :: [Name] -> RoleAnnotEnv -> [LRoleAnnotDecl GhcRn] #
lookupRoleAnnot :: RoleAnnotEnv -> Name -> Maybe (LRoleAnnotDecl GhcRn) #
mkRoleAnnotEnv :: [LRoleAnnotDecl GhcRn] -> RoleAnnotEnv #
getEvBindsTcPluginM :: TcPluginM EvBindsVar #
Access the EvBindsVar
carried by the TcPluginM
during
constraint solving. Returns Nothing
if invoked during
tcPluginInit
or tcPluginStop
.
unsafeTcPluginTcM :: TcM a -> TcPluginM a #
runTcPluginM :: TcPluginM a -> EvBindsVar -> TcM a #
hasCompleteSig :: TcSigFun -> Name -> Bool #
No signature or a partial signature
isPartialSig :: TcIdSigInst -> Bool #
plusImportAvails :: ImportAvails -> ImportAvails -> ImportAvails #
Union two ImportAvails
This function is a key part of Import handling, basically for each import we create a separate ImportAvails structure and then union them all together with this function.
modDepsElts :: ModuleNameEnv (ModuleName, IsBootInterface) -> [(ModuleName, IsBootInterface)] #
mkModDeps :: [(ModuleName, IsBootInterface)] -> ModuleNameEnv (ModuleName, IsBootInterface) #
pprPECategory :: PromotionErr -> SDoc #
pprTcTyThingCategory :: TcTyThing -> SDoc #
outerLevel :: ThLevel #
topAnnStage :: ThStage #
removeBindingShadowing :: HasOccName a => [a] -> [a] #
pushErrCtxtSameOrigin :: ErrCtxt -> CtLoc -> CtLoc #
A NameShape
is a substitution on Name
s that can be used
to refine the identities of a hole while we are renaming interfaces
(see RnModIface
). Specifically, a NameShape
for
ns_module_name
A
, defines a mapping from {A.T}
(for some OccName
T
) to some arbitrary other Name
.
The most intruiging thing about a NameShape
, however, is
how it's constructed. A NameShape
is *implied* by the
exported AvailInfo
s of the implementor of an interface:
if an implementor of signature H
exports M.T
, you implicitly
define a substitution from {H.T}
to M.T
. So a NameShape
is computed from the list of AvailInfo
s that are exported
by the implementation of a module, or successively merged
together by the export lists of signatures which are joining
together.
It's not the most obvious way to go about doing this, but it does seem to work!
NB: Can't boot this and put it in NameShape because then we start pulling in too many DynFlags things.
NameShape | |
|
Instances
ContainsDynFlags (Env gbl lcl) | |
Defined in TcRnTypes extractDynFlags :: Env gbl lcl -> DynFlags # | |
ContainsModule gbl => ContainsModule (Env gbl lcl) | |
Defined in TcRnTypes extractModule :: Env gbl lcl -> Module # |
Instances
ContainsCostCentreState DsGblEnv | |
Defined in TcRnMonad | |
ContainsModule DsGblEnv | |
Defined in TcRnTypes extractModule :: DsGblEnv -> Module # |
data FrontendResult #
FrontendResult
describes the result of running the
frontend of a Haskell module. Usually, you'll get
a FrontendTypecheck
, since running the frontend involves
typechecking a program, but for an hs-boot merge you'll
just get a ModIface, since no actual typechecking occurred.
This data type really should be in HscTypes, but it needs to have a TcGblEnv which is only defined here.
TcGblEnv
describes the top-level of the module at the
point at which the typechecker is finished work.
It is this structure that is handed on to the desugarer
For state that needs to be updated during the typechecking
phase and returned at end, use a TcRef
(= IORef
).
TcGblEnv | |
|
Instances
ContainsCostCentreState TcGblEnv | |
Defined in TcRnMonad | |
ContainsModule TcGblEnv | |
Defined in TcRnTypes extractModule :: TcGblEnv -> Module # |
type RecFieldEnv = NameEnv [FieldLabel] #
data SelfBootInfo #
type TcBinderStack = [TcBinder] #
data SpliceType #
Splice SpliceType | |
RunSplice (TcRef [ForeignRef (Q ())]) | |
Comp | |
Brack ThStage PendingStuff |
data PendingStuff #
A typecheckable thing available in a local context. Could be
AGlobal
TyThing
, but also lexically scoped variables, etc.
See TcEnv
for how to retrieve a TyThing
given a Name
.
data PromotionErr #
TyConPE | |
ClassPE | |
FamDataConPE | |
ConstrainedDataConPE PredType | |
PatSynPE | |
RecDataConPE | |
NoDataKindsTC | |
NoDataKindsDC |
Instances
Outputable PromotionErr | |
Defined in TcRnTypes ppr :: PromotionErr -> SDoc # pprPrec :: Rational -> PromotionErr -> SDoc # |
data IdBindingInfo #
IdBindingInfo describes how an Id is bound.
It is used for the following purposes: a) for static forms in TcExpr.checkClosedInStaticForm and b) to figure out when a nested binding can be generalised, in TcBinds.decideGeneralisationPlan.
Instances
Outputable IdBindingInfo | |
Defined in TcRnTypes ppr :: IdBindingInfo -> SDoc # pprPrec :: Rational -> IdBindingInfo -> SDoc # |
data IsGroupClosed #
IsGroupClosed describes a group of mutually-recursive bindings
type ClosedTypeId = Bool #
data ImportAvails #
ImportAvails
summarises what was imported from where, irrespective of
whether the imported things are actually used or not. It is used:
- when processing the export list,
- when constructing usage info for the interface file,
- to identify the list of directly imported modules for initialisation purposes and for optimised overlap checking of family instances,
- when figuring out what things are really unused
ImportAvails | |
|
data TcIdSigInfo #
CompleteSig | |
PartialSig | |
|
Instances
Outputable TcIdSigInfo | |
Defined in TcRnTypes ppr :: TcIdSigInfo -> SDoc # pprPrec :: Rational -> TcIdSigInfo -> SDoc # |
data TcIdSigInst #
TISI | |
|
Instances
Outputable TcIdSigInst | |
Defined in TcRnTypes ppr :: TcIdSigInst -> SDoc # pprPrec :: Rational -> TcIdSigInst -> SDoc # |
data TcPatSynInfo #
TPSI | |
|
Instances
Outputable TcPatSynInfo | |
Defined in TcRnTypes ppr :: TcPatSynInfo -> SDoc # pprPrec :: Rational -> TcPatSynInfo -> SDoc # |
type TcPluginSolver = [Ct] -> [Ct] -> [Ct] -> TcPluginM TcPluginResult #
TcPlugin | |
|
data TcPluginResult #
TcPluginContradiction [Ct] | The plugin found a contradiction. The returned constraints are removed from the inert set, and recorded as insoluble. |
TcPluginOk [(EvTerm, Ct)] [Ct] | The first field is for constraints that were solved. These are removed from the inert set, and the evidence for them is recorded. The second field contains new work, that should be processed by the constraint solver. |
type RoleAnnotEnv = NameEnv (LRoleAnnotDecl GhcRn) #
An expression or type hole
ExprHole UnboundVar | Either an out-of-scope variable or a "true" hole in an expression (TypedHoles) |
TypeHole OccName | A hole in a type (PartialTypeSignatures) |
data CompleteMatch #
A list of conlikes which represents a complete pattern match.
These arise from COMPLETE
signatures.
CompleteMatch | |
|
Instances
Outputable CompleteMatch | |
Defined in HscTypes ppr :: CompleteMatch -> SDoc # pprPrec :: Rational -> CompleteMatch -> SDoc # |
type CompleteMatchMap = UniqFM [CompleteMatch] #
A map keyed by the completeMatchTyCon
.
setLclEnvTcLevel :: TcLclEnv -> TcLevel -> TcLclEnv #
getLclEnvTcLevel :: TcLclEnv -> TcLevel #
setLclEnvLoc :: TcLclEnv -> RealSrcSpan -> TcLclEnv #
getLclEnvLoc :: TcLclEnv -> RealSrcSpan #
TcLclEnv | |
|
updEnv :: (env -> env') -> IOEnv env' a -> IOEnv env a #
Perform a computation with an altered environment
atomicUpdMutVar' :: IORef a -> (a -> (a, b)) -> IOEnv env b #
Strict variant of atomicUpdMutVar
.
atomicUpdMutVar :: IORef a -> (a -> (a, b)) -> IOEnv env b #
Atomically update the reference. Does not force the evaluation of the
new variable contents. For strict update, use atomicUpdMutVar'
.
readMutVar :: IORef a -> IOEnv env a #
writeMutVar :: IORef a -> a -> IOEnv env () #
uninterruptibleMaskM_ :: IOEnv env a -> IOEnv env a #
unsafeInterleaveM :: IOEnv env a -> IOEnv env a #
Instances
Monad (IOEnv m) | |
Functor (IOEnv env) | |
MonadFail (IOEnv m) | |
Applicative (IOEnv m) | |
MonadPlus (IOEnv env) | |
MonadIO (IOEnv env) | |
Alternative (IOEnv env) | |
ContainsDynFlags env => HasDynFlags (IOEnv env) | |
Defined in IOEnv getDynFlags :: IOEnv env DynFlags # | |
ContainsModule env => HasModule (IOEnv env) | |
ExceptionMonad (IOEnv a) | |
data IOEnvFailure #
Instances
Show IOEnvFailure | |
Defined in IOEnv showsPrec :: Int -> IOEnvFailure -> ShowS # show :: IOEnvFailure -> String # showList :: [IOEnvFailure] -> ShowS # | |
Exception IOEnvFailure | |
Defined in IOEnv |
filterOutM :: Applicative m => (a -> m Bool) -> [a] -> m [a] #
Like filterM
, only it reverses the sense of the test.
unlessM :: Monad m => m Bool -> m () -> m () #
Monadic version of unless
, taking the condition in the monad
whenM :: Monad m => m Bool -> m () -> m () #
Monadic version of when
, taking the condition in the monad
maybeMapM :: Monad m => (a -> m b) -> Maybe a -> m (Maybe b) #
Monadic version of fmap specialised for Maybe
foldlM_ :: (Monad m, Foldable t) => (a -> b -> m a) -> a -> t b -> m () #
Monadic version of foldl that discards its result
fmapEitherM :: Monad m => (a -> m b) -> (c -> m d) -> Either a c -> m (Either b d) #
Monadic version of fmap
fmapMaybeM :: Monad m => (a -> m b) -> Maybe a -> m (Maybe b) #
Monadic version of fmap
:: Monad m | |
=> (acc -> x -> m (acc, y)) | combining function |
-> acc | initial state |
-> [x] | inputs |
-> m (acc, [y]) | final state, outputs |
Monadic version of mapAccumL
mapAndUnzip5M :: Monad m => (a -> m (b, c, d, e, f)) -> [a] -> m ([b], [c], [d], [e], [f]) #
mapAndUnzip4M :: Monad m => (a -> m (b, c, d, e)) -> [a] -> m ([b], [c], [d], [e]) #
mapAndUnzip3M :: Monad m => (a -> m (b, c, d)) -> [a] -> m ([b], [c], [d]) #
mapAndUnzipM for triples
zipWithAndUnzipM :: Monad m => (a -> b -> m (c, d)) -> [a] -> [b] -> m ([c], [d]) #
zipWith3M_ :: Monad m => (a -> b -> c -> m d) -> [a] -> [b] -> [c] -> m () #
data ForeignSrcLang #
Foreign formats supported by GHC via TH
LangC | C |
LangCxx | C++ |
LangObjc | Objective C |
LangObjcxx | Objective C++ |
LangAsm | Assembly language (.s) |
RawObject | Object (.o) |
Instances
module TidyPgm
module TyCon
module TysPrim
module TysWiredIn
:: Bool | Should specified binders count towards injective positions in the kind of the TyCon? (If you're using visible kind applications, then you want True here. |
-> TyCon | |
-> Int | The number of args the |
-> Bool | Does |
Does a TyCon
(that is applied to some number of arguments) need to be
ascribed with an explicit kind signature to resolve ambiguity if rendered as
a source-syntax type?
(See Note [When does a tycon application need an explicit kind signature?]
for a full explanation of what this function checks for.)
classifiesTypeWithValues :: Kind -> Bool #
Does this classify a type allowed to have values? Responds True to things like *, #, TYPE Lifted, TYPE v, Constraint.
True of any sub-kind of OpenTypeKind
isKindLevPoly :: Kind -> Bool #
Tests whether the given kind (which should look like TYPE x
)
is something other than a constructor tree (that is, constructors at every node).
E.g. True of TYPE k, TYPE (F Int)
False of TYPE 'LiftedRep
isConstraintKindCon :: TyCon -> Bool #
splitVisVarsOfTypes :: [Type] -> Pair TyCoVarSet #
splitVisVarsOfType :: Type -> Pair TyCoVarSet #
Retrieve the free variables in this type, splitting them based on whether they are used visibly or invisibly. Invisible ones come first.
synTyConResKind :: TyCon -> Kind #
tyConsOfType :: Type -> UniqSet TyCon #
All type constructors occurring in the type; looking through type synonyms, but not newtypes. When it finds a Class, it returns the class TyCon.
resultIsLevPoly :: Type -> Bool #
Looking past all pi-types, is the end result potentially levity polymorphic? Example: True for (forall r (a :: TYPE r). String -> a) Example: False for (forall r1 r2 (a :: TYPE r1) (b :: TYPE r2). a -> b -> Type)
isTypeLevPoly :: Type -> Bool #
Returns True if a type is levity polymorphic. Should be the same as (isKindLevPoly . typeKind) but much faster. Precondition: The type has kind (TYPE blah)
tcReturnsConstraintKind :: Kind -> Bool #
tcIsRuntimeTypeKind :: Kind -> Bool #
Is this kind equivalent to TYPE r
(for some unknown r)?
This considers Constraint
to be distinct from *
.
tcIsLiftedTypeKind :: Kind -> Bool #
Is this kind equivalent to *
?
This considers Constraint
to be distinct from *
. For a version that
treats them as the same type, see isLiftedTypeKind
.
tcIsConstraintKind :: Kind -> Bool #
tcTypeKind :: HasDebugCallStack => Type -> Kind #
typeKind :: HasDebugCallStack => Type -> Kind #
nonDetCmpTc :: TyCon -> TyCon -> Ordering #
nonDetCmpTypes :: [Type] -> [Type] -> Ordering #
nonDetCmpType :: Type -> Type -> Ordering #
eqTypes :: [Type] -> [Type] -> Bool #
Type equality on lists of types, looking through type synonyms but not newtypes.
eqTypeX :: RnEnv2 -> Type -> Type -> Bool #
Compare types with respect to a (presumably) non-empty RnEnv2
.
isValidJoinPointType :: JoinArity -> Type -> Bool #
Determine whether a type could be the type of a join point of given total
arity, according to the polymorphism rule. A join point cannot be polymorphic
in its return type, since given
join j a
b x y z = e1 in e2,
the types of e1 and e2 must be the same, and a and b are not in scope for e2.
(See Note [The polymorphism rule of join points] in CoreSyn.) Returns False
also if the type simply doesn't have enough arguments.
Note that we need to know how many arguments (type *and* value) the putative join point takes; for instance, if j :: forall a. a -> Int then j could be a binary join point returning an Int, but it could *not* be a unary join point returning a -> Int.
TODO: See Note [Excess polymorphism and join points]
isPrimitiveType :: Type -> Bool #
Returns true of types that are opaque to Haskell.
isStrictType :: HasDebugCallStack => Type -> Bool #
Computes whether an argument (or let right hand side) should
be computed strictly or lazily, based only on its type.
Currently, it's just isUnliftedType
. Panics on levity-polymorphic types.
isDataFamilyAppType :: Type -> Bool #
Check whether a type is a data family type
See Type for what an algebraic type is. Should only be applied to types, as opposed to e.g. partially saturated type constructors
isUnboxedSumType :: Type -> Bool #
isUnboxedTupleType :: Type -> Bool #
getRuntimeRep :: HasDebugCallStack => Type -> Type #
Extract the RuntimeRep classifier of a type. For instance,
getRuntimeRep_maybe Int = LiftedRep
. Panics if this is not possible.
getRuntimeRep_maybe :: HasDebugCallStack => Type -> Maybe Type #
Extract the RuntimeRep classifier of a type. For instance,
getRuntimeRep_maybe Int = LiftedRep
. Returns Nothing
if this is not
possible.
dropRuntimeRepArgs :: [Type] -> [Type] #
Drops prefix of RuntimeRep constructors in TyConApp
s. Useful for e.g.
dropping 'LiftedRep arguments of unboxed tuple TyCon applications:
isRuntimeRepKindedTy :: Type -> Bool #
Is this a type of kind RuntimeRep? (e.g. LiftedRep)
mightBeUnliftedType :: Type -> Bool #
isUnliftedType :: HasDebugCallStack => Type -> Bool #
See Type for what an unlifted type is.
Panics on levity polymorphic types; See mightBeUnliftedType
for
a more approximate predicate that behaves better in the presence of
levity polymorphism.
isLiftedType_maybe :: HasDebugCallStack => Type -> Maybe Bool #
Returns Just True if this type is surely lifted, Just False if it is surely unlifted, Nothing if we can't be sure (i.e., it is levity polymorphic), and panics if the kind does not have the shape TYPE r.
isCoVarType :: Type -> Bool #
isFamFreeTy :: Type -> Bool #
coAxNthLHS :: forall (br :: BranchFlag). CoAxiom br -> Int -> Type #
Get the type on the LHS of a coercion induced by a type/data family instance.
mkFamilyTyConApp :: TyCon -> [Type] -> Type #
Given a family instance TyCon and its arg types, return the corresponding family type. E.g:
data family T a data instance T (Maybe b) = MkT b
Where the instance tycon is :RTL, so:
mkFamilyTyConApp :RTL Int = T (Maybe Int)
closeOverKindsDSet :: DTyVarSet -> DTyVarSet #
Add the kind variables free in the kinds of the tyvars in the given set. Returns a deterministic set.
closeOverKindsList :: [TyVar] -> [TyVar] #
Add the kind variables free in the kinds of the tyvars in the given set. Returns a deterministically ordered list.
closeOverKindsFV :: [TyVar] -> FV #
Given a list of tyvars returns a deterministic FV computation that returns the given tyvars with the kind variables free in the kinds of the given tyvars.
closeOverKinds :: TyVarSet -> TyVarSet #
Add the kind variables free in the kinds of the tyvars in the given set. Returns a non-deterministic set.
binderRelevantType_maybe :: TyCoBinder -> Maybe Type #
Extract a relevant type, if there is one.
tyBinderType :: TyBinder -> Type #
tyCoBinderType :: TyCoBinder -> Type #
isAnonTyCoBinder :: TyCoBinder -> Bool #
Does this binder bind a variable that is not erased? Returns
True
for anonymous binders.
mkAnonBinder :: AnonArgFlag -> Type -> TyCoBinder #
Make an anonymous binder
appTyArgFlags :: Type -> [Type] -> [ArgFlag] #
Given a Type
and a list of argument types to which the Type
is
applied, determine each argument's visibility
(Inferred
, Specified
, or Required
).
Most of the time, the arguments will be Required
, but not always. Consider
f :: forall a. a -> Type
. In f Type Bool
, the first argument (Type
) is
Specified
and the second argument (Bool
) is Required
. It is precisely
this sort of higher-rank situation in which appTyArgFlags
comes in handy,
since f Type Bool
would be represented in Core using AppTy
s.
(See also #15792).
tyConArgFlags :: TyCon -> [Type] -> [ArgFlag] #
Given a TyCon
and a list of argument types to which the TyCon
is
applied, determine each argument's visibility
(Inferred
, Specified
, or Required
).
Wrinkle: consider the following scenario:
T :: forall k. k -> k tyConArgFlags T [forall m. m -> m -> m, S, R, Q]
After substituting, we get
T (forall m. m -> m -> m) :: (forall m. m -> m -> m) -> forall n. n -> n -> n
Thus, the first argument is invisible, S
is visible, R
is invisible again,
and Q
is visible.
partitionInvisibles :: [(a, ArgFlag)] -> ([a], [a]) #
Given a list of things paired with their visibilities, partition the things into (invisible things, visible things).
filterOutInferredTypes :: TyCon -> [Type] -> [Type] #
filterOutInvisibleTypes :: TyCon -> [Type] -> [Type] #
splitPiTysInvisibleN :: Int -> Type -> ([TyCoBinder], Type) #
splitPiTysInvisible :: Type -> ([TyCoBinder], Type) #
invisibleTyBndrCount :: Type -> Int #
splitForAllVarBndrs :: Type -> ([TyCoVarBinder], Type) #
Like splitPiTys
but split off only named binders
and returns TyCoVarBinders rather than TyCoBinders
splitPiTys :: Type -> ([TyCoBinder], Type) #
Split off all TyCoBinders to a type, splitting both proper foralls and functions
splitPiTy :: Type -> (TyCoBinder, Type) #
Takes a forall type apart, or panics
splitPiTy_maybe :: Type -> Maybe (TyCoBinder, Type) #
Attempts to take a forall type apart; works with proper foralls and functions
splitForAllTy_co_maybe :: Type -> Maybe (TyCoVar, Type) #
Like splitForAllTy_maybe, but only returns Just if it is a covar binder.
splitForAllTy_ty_maybe :: Type -> Maybe (TyCoVar, Type) #
Like splitForAllTy_maybe, but only returns Just if it is a tyvar binder.
splitForAllTy_maybe :: Type -> Maybe (TyCoVar, Type) #
Attempts to take a forall type apart, but only if it's a proper forall, with a named binder
dropForAlls :: Type -> Type #
Drops all ForAllTys
splitForAllTy :: Type -> (TyCoVar, Type) #
Take a forall type apart, or panics if that is not possible.
isForAllTy_co :: Type -> Bool #
Like isForAllTy
, but returns True only if it is a covar binder
isForAllTy_ty :: Type -> Bool #
Like isForAllTy
, but returns True only if it is a tyvar binder
isForAllTy :: Type -> Bool #
Checks whether this is a proper forall (with a named binder)
splitForAllTysSameVis :: ArgFlag -> Type -> ([TyCoVar], Type) #
Like splitForAllTys
, but only splits a ForAllTy
if
is sameVis
argf supplied_argfTrue
, where argf
is the visibility
of the ForAllTy
's binder and supplied_argf
is the visibility provided
as an argument to this function.
splitForAllTys :: Type -> ([TyCoVar], Type) #
Take a ForAllTy apart, returning the list of tycovars and the result type. This always succeeds, even if it returns only an empty list. Note that the result type returned may have free variables that were bound by a forall.
:: [TyVar] | binders |
-> TyCoVarSet | free variables of result |
-> [TyConBinder] |
Given a list of type-level vars and the free vars of a result kind, makes TyCoBinders, preferring anonymous binders if the variable is, in fact, not dependent. e.g. mkTyConBindersPreferAnon (k:*),(b:k),(c:k) We want (k:*) Named, (b:k) Anon, (c:k) Anon
All non-coercion binders are visible.
mkLamType :: Var -> Type -> Type #
Makes a (->)
type or an implicit forall type, depending
on whether it is given a type variable or a term variable.
This is used, for example, when producing the type of a lambda.
Always uses Inferred binders.
mkVisForAllTys :: [TyVar] -> Type -> Type #
Like mkForAllTys, but assumes all variables are dependent and visible
mkSpecForAllTys :: [TyVar] -> Type -> Type #
Like mkForAllTys
, but assumes all variables are dependent and
Specified
, a common case
mkSpecForAllTy :: TyVar -> Type -> Type #
Like mkForAllTy
, but assumes the variable is dependent and Specified
,
a common case
mkInvForAllTys :: [TyVar] -> Type -> Type #
Like mkTyCoInvForAllTys
, but tvs should be a list of tyvar
mkTyCoInvForAllTys :: [TyCoVar] -> Type -> Type #
Like mkForAllTys
, but assumes all variables are dependent and
Inferred
, a common case
mkInvForAllTy :: TyVar -> Type -> Type #
Like mkTyCoInvForAllTy
, but tv should be a tyvar
stripCoercionTy :: Type -> Coercion #
isCoercionTy_maybe :: Type -> Maybe Coercion #
mkCoercionTy :: Coercion -> Type #
discardCast :: Type -> Type #
Drop the cast on a type, if any. If there is no cast, just return the original type. This is rarely what you want. The CastTy data constructor (in TyCoRep) has the invariant that another CastTy is not inside. See the data constructor for a full description of this invariant. Since CastTy cannot be nested, the result of discardCast cannot be a CastTy.
tyConBindersTyCoBinders :: [TyConBinder] -> [TyCoBinder] #
newTyConInstRhs :: TyCon -> [Type] -> Type #
Unwrap one layer
of newtype on a type constructor and its
arguments, using an eta-reduced version of the newtype
if possible.
This requires tys to have at least newTyConInstArity tycon
elements.
splitListTyConApp_maybe :: Type -> Maybe Type #
Attempts to tease a list type apart and gives the type of the elements if successful (looks through type synonyms)
repSplitTyConApp_maybe :: HasDebugCallStack => Type -> Maybe (TyCon, [Type]) #
Like splitTyConApp_maybe
, but doesn't look through synonyms. This
assumes the synonyms have already been dealt with.
Moreover, for a FunTy, it only succeeds if the argument types have enough info to extract the runtime-rep arguments that the funTyCon requires. This will usually be true; but may be temporarily false during canonicalization: see Note [FunTy and decomposing tycon applications] in TcCanonical
tcSplitTyConApp_maybe :: HasCallStack => Type -> Maybe (TyCon, [Type]) #
Split a type constructor application into its type constructor and
applied types. Note that this may fail in the case of a FunTy
with an
argument of unknown kind FunTy
(e.g. FunTy (a :: k) Int
. since the kind
of a
isn't of the form TYPE rep
). Consequently, you may need to zonk your
type before using this function.
If you only need the TyCon
, consider using tcTyConAppTyCon_maybe
.
splitTyConApp :: Type -> (TyCon, [Type]) #
Attempts to tease a type apart into a type constructor and the application
of a number of arguments to that constructor. Panics if that is not possible.
See also splitTyConApp_maybe
tyConAppArgN :: Int -> Type -> Type #
tyConAppArgs :: Type -> [Type] #
tyConAppArgs_maybe :: Type -> Maybe [Type] #
The same as snd . splitTyConApp
tyConAppTyCon :: Type -> TyCon #
tyConAppTyCon_maybe :: Type -> Maybe TyCon #
The same as fst . splitTyConApp
tyConAppTyConPicky_maybe :: Type -> Maybe TyCon #
Retrieve the tycon heading this type, if there is one. Does not look through synonyms.
mkTyConApp :: TyCon -> [Type] -> Type #
piResultTys :: HasDebugCallStack => Type -> [Type] -> Type #
(piResultTys f_ty [ty1, .., tyn]) gives the type of (f ty1 .. tyn)
where f :: f_ty
piResultTys
is interesting because:
1. f_ty
may have more for-alls than there are args
2. Less obviously, it may have fewer for-alls
For case 2. think of:
piResultTys (forall a.a) [forall b.b, Int]
This really can happen, but only (I think) in situations involving
undefined. For example:
undefined :: forall a. a
Term: undefined (forall b. b->b)
Int
This term should have type (Int -> Int), but notice that
there are more type args than foralls in undefined
s type.
Just like piResultTys
but for a single argument
Try not to iterate piResultTy
, because it's inefficient to substitute
one variable at a time; instead use 'piResultTys"
Extract the function argument type and panic if that is not possible
funResultTy :: Type -> Type #
Extract the function result type and panic if that is not possible
splitFunTys :: Type -> ([Type], Type) #
splitFunTy_maybe :: Type -> Maybe (Type, Type) #
Attempts to extract the argument and result types from a type
splitFunTy :: Type -> (Type, Type) #
Attempts to extract the argument and result types from a type, and
panics if that is not possible. See also splitFunTy_maybe
pprUserTypeErrorTy :: Type -> SDoc #
Render a type corresponding to a user type error into a SDoc.
userTypeError_maybe :: Type -> Maybe Type #
Is this type a custom user error? If so, give us the kind and the error message.
isStrLitTy :: Type -> Maybe FastString #
Is this a symbol literal. We also look through type synonyms.
mkStrLitTy :: FastString -> Type #
isNumLitTy :: Type -> Maybe Integer #
Is this a numeric literal. We also look through type synonyms.
mkNumLitTy :: Integer -> Type #
repSplitAppTys :: HasDebugCallStack => Type -> (Type, [Type]) #
Like splitAppTys
, but doesn't look through type synonyms
splitAppTys :: Type -> (Type, [Type]) #
Recursively splits a type as far as is possible, leaving a residual type being applied to and the type arguments applied to it. Never fails, even if that means returning an empty list of type applications.
splitAppTy :: Type -> (Type, Type) #
Attempts to take a type application apart, as in splitAppTy_maybe
,
and panics if this is not possible
tcRepSplitAppTy_maybe :: Type -> Maybe (Type, Type) #
Does the AppTy split as in tcSplitAppTy_maybe
, but assumes that
any coreView stuff is already done. Refuses to look through (c => t)
repSplitAppTy_maybe :: HasDebugCallStack => Type -> Maybe (Type, Type) #
Does the AppTy split as in splitAppTy_maybe
, but assumes that
any Core view stuff is already done
splitAppTy_maybe :: Type -> Maybe (Type, Type) #
Attempt to take a type application apart, whether it is a function, type constructor, or plain type application. Note that type family applications are NEVER unsaturated by this!
repGetTyVar_maybe :: Type -> Maybe TyVar #
Attempts to obtain the type variable underlying a Type
, without
any expansion
getCastedTyVar_maybe :: Type -> Maybe (TyVar, CoercionN) #
If the type is a tyvar, possibly under a cast, returns it, along with the coercion. Thus, the co is :: kind tv ~N kind ty
getTyVar :: String -> Type -> TyVar #
Attempts to obtain the type variable underlying a Type
, and panics with the
given message if this is not a type variable type. See also getTyVar_maybe
mapCoercion :: Monad m => TyCoMapper env m -> env -> Coercion -> m Coercion #
isRuntimeRepVar :: TyVar -> Bool #
Is a tyvar of type RuntimeRep
?
isUnliftedRuntimeRep :: Type -> Bool #
isUnliftedTypeKind :: Kind -> Bool #
Returns True if the kind classifies unlifted types and False otherwise. Note that this returns False for levity-polymorphic kinds, which may be specialized to a kind that classifies unlifted types.
isLiftedRuntimeRep :: Type -> Bool #
kindRep_maybe :: HasDebugCallStack => Kind -> Maybe Type #
Given a kind (TYPE rr), extract its RuntimeRep classifier rr.
For example, kindRep_maybe * = Just LiftedRep
Returns Nothing
if the kind is not of form (TYPE rr)
Treats * and Constraint as the same
kindRep :: HasDebugCallStack => Kind -> Type #
Extract the RuntimeRep classifier of a type from its kind. For example,
kindRep * = LiftedRep
; Panics if this is not possible.
Treats * and Constraint as the same
expandTypeSynonyms :: Type -> Type #
Expand out all type synonyms. Actually, it'd suffice to expand out just the ones that discard type variables (e.g. type Funny a = Int) But we don't know which those are currently, so we just expand all.
expandTypeSynonyms
only expands out type synonyms mentioned in the type,
not in the kinds of any TyCon or TyVar mentioned in the type.
Keep this synchronized with synonymTyConsOfType
data TyCoMapper env (m :: Type -> Type) #
This describes how a "map" operation over a type/coercion should behave
TyCoMapper | |
|
cloneTyVarBndrs :: TCvSubst -> [TyVar] -> UniqSupply -> (TCvSubst, [TyVar]) #
substVarBndrs :: HasCallStack => TCvSubst -> [TyCoVar] -> (TCvSubst, [TyCoVar]) #
substVarBndr :: HasCallStack => TCvSubst -> TyCoVar -> (TCvSubst, TyCoVar) #
substTyVarBndrs :: HasCallStack => TCvSubst -> [TyVar] -> (TCvSubst, [TyVar]) #
substTyVarBndr :: HasCallStack => TCvSubst -> TyVar -> (TCvSubst, TyVar) #
substCoUnchecked :: TCvSubst -> Coercion -> Coercion #
Substitute within a Coercion
disabling sanity checks.
The problems that the sanity checks in substCo catch are described in
Note [The substitution invariant].
The goal of #11371 is to migrate all the calls of substCoUnchecked to
substCo and remove this function. Please don't use in new code.
substTyVars :: TCvSubst -> [TyVar] -> [Type] #
substTyVar :: TCvSubst -> TyVar -> Type #
substThetaUnchecked :: TCvSubst -> ThetaType -> ThetaType #
Substitute within a ThetaType
disabling the sanity checks.
The problems that the sanity checks in substTys catch are described in
Note [The substitution invariant].
The goal of #11371 is to migrate all the calls of substThetaUnchecked to
substTheta and remove this function. Please don't use in new code.
substTheta :: HasCallStack => TCvSubst -> ThetaType -> ThetaType #
Substitute within a ThetaType
The substitution has to satisfy the invariants described in
Note [The substitution invariant].
substTysUnchecked :: TCvSubst -> [Type] -> [Type] #
Substitute within several Type
s disabling the sanity checks.
The problems that the sanity checks in substTys catch are described in
Note [The substitution invariant].
The goal of #11371 is to migrate all the calls of substTysUnchecked to
substTys and remove this function. Please don't use in new code.
substTys :: HasCallStack => TCvSubst -> [Type] -> [Type] #
Substitute within several Type
s
The substitution has to satisfy the invariants described in
Note [The substitution invariant].
substTyUnchecked :: TCvSubst -> Type -> Type #
Substitute within a Type
disabling the sanity checks.
The problems that the sanity checks in substTy catch are described in
Note [The substitution invariant].
The goal of #11371 is to migrate all the calls of substTyUnchecked to
substTy and remove this function. Please don't use in new code.
substTy :: HasCallStack => TCvSubst -> Type -> Type #
Substitute within a Type
The substitution has to satisfy the invariants described in
Note [The substitution invariant].
substTyAddInScope :: TCvSubst -> Type -> Type #
Substitute within a Type
after adding the free variables of the type
to the in-scope set. This is useful for the case when the free variables
aren't already in the in-scope set or easily available.
See also Note [The substitution invariant].
substTysWith :: [TyVar] -> [Type] -> [Type] -> [Type] #
Type substitution, see zipTvSubst
substCoWithUnchecked :: [TyVar] -> [Type] -> Coercion -> Coercion #
Coercion substitution, see zipTvSubst
. Disables sanity checks.
The problems that the sanity checks in substCo catch are described in
Note [The substitution invariant].
The goal of #11371 is to migrate all the calls of substCoUnchecked to
substCo and remove this function. Please don't use in new code.
substTyWithUnchecked :: [TyVar] -> [Type] -> Type -> Type #
Type substitution, see zipTvSubst
. Disables sanity checks.
The problems that the sanity checks in substTy catch are described in
Note [The substitution invariant].
The goal of #11371 is to migrate all the calls of substTyUnchecked to
substTy and remove this function. Please don't use in new code.
substTyWith :: HasCallStack => [TyVar] -> [Type] -> Type -> Type #
Type substitution, see zipTvSubst
zipCoEnv :: HasDebugCallStack => [CoVar] -> [Coercion] -> CvSubstEnv #
zipTyEnv :: HasDebugCallStack => [TyVar] -> [Type] -> TvSubstEnv #
mkTvSubstPrs :: [(TyVar, Type)] -> TCvSubst #
Generates the in-scope set for the TCvSubst
from the types in the
incoming environment. No CoVars, please!
zipTCvSubst :: HasDebugCallStack => [TyCoVar] -> [Type] -> TCvSubst #
zipTvSubst :: HasDebugCallStack => [TyVar] -> [Type] -> TCvSubst #
Generates the in-scope set for the TCvSubst
from the types in the incoming
environment. No CoVars, please!
unionTCvSubst :: TCvSubst -> TCvSubst -> TCvSubst #
extendTvSubstBinderAndInScope :: TCvSubst -> TyCoBinder -> Type -> TCvSubst #
extendTCvInScopeSet :: TCvSubst -> VarSet -> TCvSubst #
extendTCvInScopeList :: TCvSubst -> [Var] -> TCvSubst #
extendTCvInScope :: TCvSubst -> Var -> TCvSubst #
zapTCvSubst :: TCvSubst -> TCvSubst #
setTvSubstEnv :: TCvSubst -> TvSubstEnv -> TCvSubst #
notElemTCvSubst :: Var -> TCvSubst -> Bool #
getTCvSubstRangeFVs :: TCvSubst -> VarSet #
Returns the free variables of the types in the range of a substitution as a non-deterministic set.
getTCvInScope :: TCvSubst -> InScopeSet #
getTvSubstEnv :: TCvSubst -> TvSubstEnv #
mkTCvSubst :: InScopeSet -> (TvSubstEnv, CvSubstEnv) -> TCvSubst #
isEmptyTCvSubst :: TCvSubst -> Bool #
mkEmptyTCvSubst :: InScopeSet -> TCvSubst #
composeTCvSubst :: TCvSubst -> TCvSubst -> TCvSubst #
Composes two substitutions, applying the second one provided first, like in function composition.
composeTCvSubstEnv :: InScopeSet -> (TvSubstEnv, CvSubstEnv) -> (TvSubstEnv, CvSubstEnv) -> (TvSubstEnv, CvSubstEnv) #
(compose env1 env2)(x)
is env1(env2(x))
; i.e. apply env2
then env1
.
It assumes that both are idempotent.
Typically, env1
is the refinement to a base substitution env2
Type & coercion substitution
The following invariants must hold of a TCvSubst
:
- The in-scope set is needed only to guide the generation of fresh uniques
- In particular, the kind of the type variables in the in-scope set is not relevant
- The substitution is only applied ONCE! This is because in general such application will not reach a fixed point.
tidyTopType :: Type -> Type #
Calls tidyType
on a top-level type (i.e. with an empty tidying environment)
tidyOpenTypes :: TidyEnv -> [Type] -> (TidyEnv, [Type]) #
Grabs the free type variables, tidies them
and then uses tidyType
to work over the type itself
tidyTyCoVarOcc :: TidyEnv -> TyCoVar -> TyCoVar #
tidyOpenTyCoVar :: TidyEnv -> TyCoVar -> (TidyEnv, TyCoVar) #
Treat a new TyCoVar
as a binder, and give it a fresh tidy name
using the environment if one has not already been allocated. See
also tidyVarBndr
tidyFreeTyCoVars :: TidyEnv -> [TyCoVar] -> TidyEnv #
Add the free TyVar
s to the env in tidy form,
so that we can tidy the type they are free in
tidyVarBndrs :: TidyEnv -> [TyCoVar] -> (TidyEnv, [TyCoVar]) #
This tidies up a type for printing in an error message, or in an interface file.
It doesn't change the uniques at all, just the print names.
tyCoVarsOfTypesWellScoped :: [Type] -> [TyVar] #
Get the free vars of types in scoped order
tyCoVarsOfTypeWellScoped :: Type -> [TyVar] #
Get the free vars of a type in scoped order
scopedSort :: [TyCoVar] -> [TyCoVar] #
Do a topological sort on a list of tyvars, so that binders occur before occurrences E.g. given [ a::k, k::*, b::k ] it'll return a well-scoped list [ k::*, a::k, b::k ]
This is a deterministic sorting operation (that is, doesn't depend on Uniques).
It is also meant to be stable: that is, variables should not be reordered unnecessarily. This is specified in Note [ScopedSort] See also Note [Ordering of implicit variables] in RnTypes
noFreeVarsOfType :: Type -> Bool #
Returns True if this type has no free variables. Should be the same as isEmptyVarSet . tyCoVarsOfType, but faster in the non-forall case.
coVarsOfTypes :: [Type] -> TyCoVarSet #
coVarsOfType :: Type -> CoVarSet #
tyCoFVsVarBndr :: Var -> FV -> FV #
tyCoFVsVarBndrs :: [Var] -> FV -> FV #
tyCoFVsBndr :: TyCoVarBinder -> FV -> FV #
tyCoFVsOfType :: Type -> FV #
The worker for tyCoFVsOfType
and tyCoFVsOfTypeList
.
The previous implementation used unionVarSet
which is O(n+m) and can
make the function quadratic.
It's exported, so that it can be composed with
other functions that compute free variables.
See Note [FV naming conventions] in FV.
Eta-expanded because that makes it run faster (apparently) See Note [FV eta expansion] in FV for explanation.
tyCoVarsOfTypeDSet :: Type -> DTyCoVarSet #
tyCoFVsOfType
that returns free variables of a type in a deterministic
set. For explanation of why using VarSet
is not deterministic see
Note [Deterministic FV] in FV.
tyCoVarsOfTypes :: [Type] -> TyCoVarSet #
tyCoVarsOfType :: Type -> TyCoVarSet #
The (->)
type constructor.
(->) :: forall (rep1 :: RuntimeRep) (rep2 :: RuntimeRep). TYPE rep1 -> TYPE rep2 -> *
Create the plain type constructor type which has been applied to no type arguments at all.
mkPiTys :: [TyCoBinder] -> Type -> Type #
mkPiTy :: TyCoBinder -> Type -> Type #
mkForAllTys :: [TyCoVarBinder] -> Type -> Type #
Wraps foralls over the type using the provided TyCoVar
s from left to right
mkInvisFunTys :: [Type] -> Type -> Type #
Make nested arrow types
mkInvisFunTy :: Type -> Type -> Type infixr 3 #
mkVisFunTy :: Type -> Type -> Type infixr 3 #
mkTyVarTys :: [TyVar] -> [Type] #
isNamedBinder :: TyCoBinder -> Bool #
isVisibleBinder :: TyCoBinder -> Bool #
Does this binder bind a visible argument?
isInvisibleBinder :: TyCoBinder -> Bool #
Does this binder bind an invisible argument?
type KindOrType = Type #
The key representation of types within the compiler
A type labeled KnotTied
might have knot-tied tycons in it. See
Note [Type checking recursive type and class declarations] in
TcTyClsDecls
isPredTy :: HasDebugCallStack => Type -> Bool #
isCoercionTy :: Type -> Bool #
mkCastTy :: Type -> Coercion -> Type #
Make a CastTy
. The Coercion must be nominal. Checks the
Coercion for reflexivity, dropping it if it's reflexive.
See Note [Respecting definitional equality] in TyCoRep
piResultTy :: HasDebugCallStack => Type -> Type -> Type #
eqType :: Type -> Type -> Bool #
Type equality on source types. Does not look through newtypes
or
PredType
s, but it does look through type synonyms.
This first checks that the kinds of the types are equal and then
checks whether the types are equal, ignoring casts and coercions.
(The kind check is a recursive call, but since all kinds have type
Type
, there is no need to check the types of kinds.)
See also Note [Non-trivial definitional equality] in TyCoRep.
coreView :: Type -> Maybe Type #
This function Strips off the top layer only of a type synonym
application (if any) its underlying representation type.
Returns Nothing if there is nothing to look through.
This function considers Constraint
to be a synonym of TYPE LiftedRep
.
By being non-recursive and inlined, this case analysis gets efficiently joined onto the case analysis that the caller is already doing
tcView :: Type -> Maybe Type #
Gives the typechecker view of a type. This unwraps synonyms but
leaves Constraint
alone. c.f. coreView, which turns Constraint into
TYPE LiftedRep. Returns Nothing if no unwrapping happens.
See also Note [coreView vs tcView]
isRuntimeRepTy :: Type -> Bool #
Is this the type RuntimeRep
?
isLiftedTypeKind :: Kind -> Bool #
This version considers Constraint to be the same as *. Returns True if the argument is equivalent to Type/Constraint and False otherwise. See Note [Kind Constraint and kind Type]
splitTyConApp_maybe :: HasDebugCallStack => Type -> Maybe (TyCon, [Type]) #
Attempts to tease a type apart into a type constructor and the application of a number of arguments to that constructor
Is this a type-level (i.e., computationally irrelevant, thus erasable)
variable? Satisfies isTyVar = not . isId
.
mkTyVarBinders :: ArgFlag -> [TyVar] -> [TyVarBinder] #
Make many named binders Input vars should be type variables
mkTyCoVarBinders :: ArgFlag -> [TyCoVar] -> [TyCoVarBinder] #
Make many named binders
mkTyCoVarBinder :: ArgFlag -> TyCoVar -> TyCoVarBinder #
Make a named binder
binderType :: VarBndr TyCoVar argf -> Type #
binderArgFlag :: VarBndr tv argf -> argf #
binderVars :: [VarBndr tv argf] -> [tv] #
isInvisibleArgFlag :: ArgFlag -> Bool #
Does this ArgFlag
classify an argument that is not written in Haskell?
isVisibleArgFlag :: ArgFlag -> Bool #
Does this ArgFlag
classify an argument that is written in Haskell?
data ForallVisFlag #
Is a forall
invisible (e.g., forall a b. {...}
, with a dot) or visible
(e.g., forall a b -> {...}
, with an arrow)?
ForallVis | A visible |
ForallInvis | An invisible |
Instances
type TyCoVarBinder = VarBndr TyCoVar ArgFlag #
Variable Binder
A TyCoVarBinder
is the binder of a ForAllTy
It's convenient to define this synonym here rather its natural
home in TyCoRep, because it's used in DataCon.hs-boot
A TyVarBinder
is a binder with only TyVar
type TyVarBinder = VarBndr TyVar ArgFlag #
liftedTypeKind :: Kind #
mkForAllTy :: TyCoVar -> ArgFlag -> Type -> Type #
Like mkTyCoForAllTy
, but does not check the occurrence of the binder
See Note [Unused coercion variable in ForAllTy]
Instances
Data Type | |
Defined in TyCoRep gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Type -> c Type # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Type # dataTypeOf :: Type -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Type) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Type) # gmapT :: (forall b. Data b => b -> b) -> Type -> Type # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Type -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Type -> r # gmapQ :: (forall d. Data d => d -> u) -> Type -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Type -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Type -> m Type # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Type -> m Type # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Type -> m Type # | |
NFData Type Source # | |
Defined in Development.IDE.GHC.Orphans | |
Outputable Type | |
Eq (DeBruijn Type) | |
ToHie (TScoped Type) | |
Defined in Compat.HieAst |
data TyCoBinder #
A TyCoBinder
represents an argument to a function. TyCoBinders can be
dependent (Named
) or nondependent (Anon
). They may also be visible or
not. See Note [TyCoBinders]
Instances
Data TyCoBinder | |
Defined in TyCoRep gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TyCoBinder -> c TyCoBinder # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TyCoBinder # toConstr :: TyCoBinder -> Constr # dataTypeOf :: TyCoBinder -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TyCoBinder) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TyCoBinder) # gmapT :: (forall b. Data b => b -> b) -> TyCoBinder -> TyCoBinder # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TyCoBinder -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TyCoBinder -> r # gmapQ :: (forall d. Data d => d -> u) -> TyCoBinder -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> TyCoBinder -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> TyCoBinder -> m TyCoBinder # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TyCoBinder -> m TyCoBinder # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TyCoBinder -> m TyCoBinder # | |
Outputable TyCoBinder | |
Defined in TyCoRep ppr :: TyCoBinder -> SDoc # pprPrec :: Rational -> TyCoBinder -> SDoc # |
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"
Argument Flag
Is something required to appear in source Haskell (Required
),
permitted by request (Specified
) (visible type application), or
prohibited entirely from appearing in source Haskell (Inferred
)?
See Note [VarBndrs, TyCoVarBinders, TyConBinders, and visibility] in TyCoRep
Instances
Eq ArgFlag | |
Data ArgFlag | |
Defined in Var gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ArgFlag -> c ArgFlag # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ArgFlag # toConstr :: ArgFlag -> Constr # dataTypeOf :: ArgFlag -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ArgFlag) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ArgFlag) # gmapT :: (forall b. Data b => b -> b) -> ArgFlag -> ArgFlag # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ArgFlag -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ArgFlag -> r # gmapQ :: (forall d. Data d => d -> u) -> ArgFlag -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ArgFlag -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ArgFlag -> m ArgFlag # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ArgFlag -> m ArgFlag # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ArgFlag -> m ArgFlag # | |
Ord ArgFlag | |
Binary ArgFlag | |
Outputable ArgFlag | |
Outputable tv => Outputable (VarBndr tv ArgFlag) | |
data AnonArgFlag #
The non-dependent version of ArgFlag
.
VisArg | Used for |
InvisArg | Used for |
Instances
Variable
Essentially a typed Name
, that may also contain some additional information
about the Var
and its use sites.
Instances
Eq Var | |
Data Var | |
Defined in Var gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Var -> c Var # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Var # dataTypeOf :: Var -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Var) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Var) # gmapT :: (forall b. Data b => b -> b) -> Var -> Var # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Var -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Var -> r # gmapQ :: (forall d. Data d => d -> u) -> Var -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Var -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Var -> m Var # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Var -> m Var # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Var -> m Var # | |
Ord Var | |
NamedThing Var | |
HasOccName Var | |
Uniquable Var | |
Outputable Var | |
ModifyState Id | |
Defined in Compat.HieAst addSubstitution :: Id -> Id -> HieState -> HieState | |
Eq (DeBruijn CoreExpr) | |
Eq (DeBruijn CoreAlt) | |
ToHie (Context (Located Var)) | |
module Unify
module UniqSupply
setTyVarUnique :: TyVar -> Unique -> TyVar #
setVarUnique :: Var -> Unique -> Var #
Variable
Essentially a typed Name
, that may also contain some additional information
about the Var
and its use sites.
Instances
Eq Var | |
Data Var | |
Defined in Var gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Var -> c Var # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Var # dataTypeOf :: Var -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Var) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Var) # gmapT :: (forall b. Data b => b -> b) -> Var -> Var # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Var -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Var -> r # gmapQ :: (forall d. Data d => d -> u) -> Var -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Var -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Var -> m Var # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Var -> m Var # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Var -> m Var # | |
Ord Var | |
NamedThing Var | |
HasOccName Var | |
Uniquable Var | |
Outputable Var | |
ModifyState Id | |
Defined in Compat.HieAst addSubstitution :: Id -> Id -> HieState -> HieState | |
Eq (DeBruijn CoreExpr) | |
Eq (DeBruijn CoreAlt) | |
ToHie (Context (Located Var)) | |
Syntax re-exports
module GHC.Hs
module ExtractDocs
module Parser
module Lexer