-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Trace the call graph of a program -- -- A plugin that instruments a program so that running it produces a log -- which can be processed into a visual graph using -- graph-trace-viz. -- -- See the README for details. @package graph-trace @version 0.1.0.1 module Graph.Trace.Internal.GhcFacade -- | The trace function outputs the trace message given as its first -- argument, before returning the second argument as its result. -- -- For example, this returns the value of f x but first outputs -- the message. -- --
-- >>> let x = 123; f = show
--
-- >>> trace ("calling f with x = " ++ show x) (f x)
-- "calling f with x = 123
-- 123"
--
--
-- The trace function should only be used for debugging, or
-- for monitoring execution. The function is not referentially
-- transparent: its type indicates that it is a pure function but it has
-- the side effect of outputting the trace message.
trace :: String -> a -> a
-- | Monads having fixed points with a 'knot-tying' semantics. Instances of
-- MonadFix should satisfy the following laws:
--
-- -- (<*>) = liftA2 id ---- --
-- liftA2 f x y = f <$> x <*> y ---- -- Further, any definition must satisfy the following: -- --
pure id <*> v = -- v
pure (.) <*> u -- <*> v <*> w = u <*> (v -- <*> w)
pure f <*> -- pure x = pure (f x)
u <*> pure y = -- pure ($ y) <*> u
-- 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). class Functor f => Applicative (f :: Type -> Type) -- | Lift a value. pure :: Applicative f => a -> f a -- | Sequential application. -- -- A few functors support an implementation of <*> that is -- more efficient than the default one. -- -- Using ApplicativeDo: 'fs <*> as' can be -- understood as the do expression -- --
-- do f <- fs -- a <- as -- pure (f a) --(<*>) :: Applicative f => f (a -> b) -> f a -> f b -- | 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: 'liftA2 f as bs' can be -- understood as the do expression -- --
-- do a <- as -- b <- bs -- pure (f a b) --liftA2 :: Applicative f => (a -> b -> c) -> f a -> f b -> f c -- | Sequence actions, discarding the value of the first argument. -- -- 'as *> bs' can be understood as the do -- 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 --(*>) :: Applicative f => f a -> f b -> f b -- | Sequence actions, discarding the value of the second argument. -- -- Using ApplicativeDo: 'as <* bs' can be -- understood as the do expression -- --
-- do a <- as -- bs -- pure a --(<*) :: Applicative f => f a -> f b -> f a infixl 4 <* infixl 4 *> infixl 4 <*> -- | Plugin is the compiler plugin data type. Try to avoid -- constructing one of these directly, and just modify some fields of -- defaultPlugin instead: this is to try and preserve source-code -- compatibility when we add fields to this. -- -- Nonetheless, this API is preliminary and highly likely to change in -- the future. data Plugin Plugin :: CorePlugin -> TcPlugin -> HoleFitPlugin -> ([CommandLineOption] -> DynFlags -> IO DynFlags) -> ([CommandLineOption] -> IO PluginRecompile) -> ([CommandLineOption] -> ModSummary -> HsParsedModule -> Hsc HsParsedModule) -> ([CommandLineOption] -> TcGblEnv -> HsGroup GhcRn -> TcM (TcGblEnv, HsGroup GhcRn)) -> ([CommandLineOption] -> ModSummary -> TcGblEnv -> TcM TcGblEnv) -> ([CommandLineOption] -> LHsExpr GhcTc -> TcM (LHsExpr GhcTc)) -> (forall lcl. () => [CommandLineOption] -> ModIface -> IfM lcl ModIface) -> Plugin -- | Modify the Core pipeline that will be used for compilation. This is -- called as the Core pipeline is built for every module being compiled, -- and plugins get the opportunity to modify the pipeline in a -- nondeterministic order. [installCoreToDos] :: Plugin -> CorePlugin -- | An optional typechecker plugin, which may modify the behaviour of the -- constraint solver. [tcPlugin] :: Plugin -> TcPlugin -- | An optional plugin to handle hole fits, which may re-order or change -- the list of valid hole fits and refinement hole fits. [holeFitPlugin] :: Plugin -> HoleFitPlugin -- | An optional plugin to update DynFlags, right after plugin -- loading. This can be used to register hooks or tweak any field of -- DynFlags before doing actual work on a module. [dynflagsPlugin] :: Plugin -> [CommandLineOption] -> DynFlags -> IO DynFlags -- | Specify how the plugin should affect recompilation. [pluginRecompile] :: Plugin -> [CommandLineOption] -> IO PluginRecompile -- | Modify the module when it is parsed. This is called by HscMain when -- the parsing is successful. [parsedResultAction] :: Plugin -> [CommandLineOption] -> ModSummary -> HsParsedModule -> Hsc HsParsedModule -- | Modify each group after it is renamed. This is called after each -- HsGroup has been renamed. [renamedResultAction] :: Plugin -> [CommandLineOption] -> TcGblEnv -> HsGroup GhcRn -> TcM (TcGblEnv, HsGroup GhcRn) -- | Modify the module when it is type checked. This is called at the very -- end of typechecking. [typeCheckResultAction] :: Plugin -> [CommandLineOption] -> ModSummary -> TcGblEnv -> TcM TcGblEnv -- | Modify the TH splice or quasiqoute before it is run. [spliceRunAction] :: Plugin -> [CommandLineOption] -> LHsExpr GhcTc -> TcM (LHsExpr GhcTc) -- | Modify an interface that have been loaded. This is called by LoadIface -- when an interface is successfully loaded. Not applied to the loading -- of the plugin interface. Tools that rely on information from modules -- other than the currently compiled one should implement this function. [interfaceLoadAction] :: Plugin -> forall lcl. () => [CommandLineOption] -> ModIface -> IfM lcl ModIface data FrontendPlugin FrontendPlugin :: FrontendPluginAction -> FrontendPlugin [frontend] :: FrontendPlugin -> FrontendPluginAction -- | Monads in which IO computations may be embedded. Any monad -- built by applying a sequence of monad transformers to the IO -- monad will be an instance of this class. -- -- Instances should satisfy the following laws, which state that -- liftIO is a transformer of monads: -- -- class Monad m => MonadIO (m :: Type -> Type) -- | Lift a computation from the IO monad. liftIO :: MonadIO m => IO a -> m a -- | 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. mapAndUnzipM :: Applicative m => (a -> m (b, c)) -> [a] -> m ([b], [c]) -- | A mutable variable in the IO monad data IORef a -- | Monadic fold over the elements of a structure, associating to the -- left, i.e. from left to right. 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 -- right, i.e. from right to left. foldrM :: (Foldable t, Monad m) => (a -> b -> m b) -> b -> t a -> m b -- | 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. -- --
-- >>> show <$> Nothing -- Nothing -- -- >>> show <$> Just 3 -- Just "3" ---- -- Convert from an Either Int Int to an -- 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) --(<$>) :: Functor f => (a -> b) -> f a -> f b infixl 4 <$> -- | The language extensions known to GHC. -- -- Note that there is an orphan Binary instance for this type -- supplied by the GHC.LanguageExtensions module provided by -- ghc-boot. We can't provide here as this would require adding -- transitive dependencies to the template-haskell package, -- which must have a minimal dependency set. data Extension Cpp :: Extension OverlappingInstances :: Extension UndecidableInstances :: Extension IncoherentInstances :: Extension UndecidableSuperClasses :: Extension MonomorphismRestriction :: Extension MonoPatBinds :: Extension MonoLocalBinds :: Extension RelaxedPolyRec :: Extension ExtendedDefaultRules :: Extension ForeignFunctionInterface :: Extension UnliftedFFITypes :: Extension InterruptibleFFI :: Extension CApiFFI :: Extension GHCForeignImportPrim :: Extension JavaScriptFFI :: Extension ParallelArrays :: Extension Arrows :: Extension TemplateHaskell :: Extension TemplateHaskellQuotes :: Extension QuasiQuotes :: Extension ImplicitParams :: Extension ImplicitPrelude :: Extension ScopedTypeVariables :: Extension AllowAmbiguousTypes :: Extension UnboxedTuples :: Extension UnboxedSums :: Extension UnliftedNewtypes :: Extension BangPatterns :: Extension TypeFamilies :: Extension TypeFamilyDependencies :: Extension TypeInType :: Extension OverloadedStrings :: Extension OverloadedLists :: Extension NumDecimals :: Extension DisambiguateRecordFields :: Extension RecordWildCards :: Extension RecordPuns :: Extension ViewPatterns :: Extension GADTs :: Extension GADTSyntax :: Extension NPlusKPatterns :: Extension DoAndIfThenElse :: Extension BlockArguments :: Extension RebindableSyntax :: Extension ConstraintKinds :: Extension PolyKinds :: Extension DataKinds :: Extension InstanceSigs :: Extension ApplicativeDo :: Extension StandaloneDeriving :: Extension DeriveDataTypeable :: Extension AutoDeriveTypeable :: Extension DeriveFunctor :: Extension DeriveTraversable :: Extension DeriveFoldable :: Extension DeriveGeneric :: Extension DefaultSignatures :: Extension DeriveAnyClass :: Extension DeriveLift :: Extension DerivingStrategies :: Extension DerivingVia :: Extension TypeSynonymInstances :: Extension FlexibleContexts :: Extension FlexibleInstances :: Extension ConstrainedClassMethods :: Extension MultiParamTypeClasses :: Extension NullaryTypeClasses :: Extension FunctionalDependencies :: Extension ExistentialQuantification :: Extension MagicHash :: Extension EmptyDataDecls :: Extension KindSignatures :: Extension RoleAnnotations :: Extension ParallelListComp :: Extension TransformListComp :: Extension MonadComprehensions :: Extension GeneralizedNewtypeDeriving :: Extension RecursiveDo :: Extension PostfixOperators :: Extension TupleSections :: Extension PatternGuards :: Extension LiberalTypeSynonyms :: Extension RankNTypes :: Extension ImpredicativeTypes :: Extension TypeOperators :: Extension ExplicitNamespaces :: Extension PackageImports :: Extension ExplicitForAll :: Extension AlternativeLayoutRule :: Extension AlternativeLayoutRuleTransitional :: Extension DatatypeContexts :: Extension NondecreasingIndentation :: Extension RelaxedLayout :: Extension TraditionalRecordSyntax :: Extension LambdaCase :: Extension MultiWayIf :: Extension BinaryLiterals :: Extension NegativeLiterals :: Extension HexFloatLiterals :: Extension DuplicateRecordFields :: Extension OverloadedLabels :: Extension EmptyCase :: Extension PatternSynonyms :: Extension PartialTypeSignatures :: Extension NamedWildCards :: Extension StaticPointers :: Extension TypeApplications :: Extension Strict :: Extension StrictData :: Extension MonadFailDesugaring :: Extension EmptyDataDeriving :: Extension NumericUnderscores :: Extension QuantifiedConstraints :: Extension StarIsType :: Extension ImportQualifiedPost :: Extension CUSKs :: Extension StandaloneKindSignatures :: Extension -- | Bind an evidence variable. This must not be invoked from -- tcPluginInit or tcPluginStop, or it will panic. setEvBind :: EvBind -> TcPluginM () -- | Create a fresh coercion hole. newCoercionHole :: PredType -> TcPluginM CoercionHole -- | Create a fresh evidence variable. newEvVar :: PredType -> TcPluginM EvVar -- | Create a new given constraint, with the supplied evidence. This must -- not be invoked from tcPluginInit or tcPluginStop, or -- it will panic. newGiven :: CtLoc -> PredType -> EvExpr -> TcPluginM CtEvidence -- | Create a new derived constraint. newDerived :: CtLoc -> PredType -> TcPluginM CtEvidence -- | Create a new wanted constraint. newWanted :: CtLoc -> PredType -> TcPluginM CtEvidence zonkCt :: Ct -> TcPluginM Ct zonkTcType :: TcType -> TcPluginM TcType isTouchableTcPluginM :: TcTyVar -> TcPluginM Bool newFlexiTyVar :: Kind -> TcPluginM TcTyVar matchFam :: TyCon -> [Type] -> TcPluginM (Maybe (TcCoercion, TcType)) getFamInstEnvs :: TcPluginM (FamInstEnv, FamInstEnv) getInstEnvs :: TcPluginM InstEnvs tcLookupId :: Name -> TcPluginM Id tcLookup :: Name -> TcPluginM TcTyThing tcLookupClass :: Name -> TcPluginM Class tcLookupDataCon :: Name -> TcPluginM DataCon tcLookupTyCon :: Name -> TcPluginM TyCon tcLookupGlobal :: Name -> TcPluginM TyThing -- | Output useful for debugging the compiler. tcPluginTrace :: String -> SDoc -> TcPluginM () -- | Perform some IO, typically to interact with an external tool. tcPluginIO :: IO a -> TcPluginM a rnExpr :: HsExpr GhcPs -> RnM (HsExpr GhcRn, FreeVars) defaultFrontendPlugin :: FrontendPlugin -- | Perform a constant operation by using all of the plugins in turn. withPlugins_ :: Monad m => DynFlags -> ConstPluginOperation m a -> a -> m () mapPlugins :: DynFlags -> (Plugin -> [CommandLineOption] -> a) -> [a] -- | Perform an operation by using all of the plugins in turn. withPlugins :: Monad m => DynFlags -> PluginOperation m a -> a -> m a plugins :: DynFlags -> [PluginWithArgs] -- | A renamer plugin which mades the renamed source available in a -- typechecker plugin. keepRenamedSource :: [CommandLineOption] -> TcGblEnv -> HsGroup GhcRn -> TcM (TcGblEnv, HsGroup GhcRn) -- | Default plugin: does nothing at all, except for marking that safe -- inference has failed unless -fplugin-trustworthy is passed. -- For compatibility reaso you should base all your plugin definitions on -- this default value. defaultPlugin :: Plugin flagRecompile :: [CommandLineOption] -> IO PluginRecompile impurePlugin :: [CommandLineOption] -> IO PluginRecompile purePlugin :: [CommandLineOption] -> IO PluginRecompile pluginRecompile' :: PluginWithArgs -> IO PluginRecompile lpModuleName :: LoadedPlugin -> ModuleName -- | Command line options gathered from the -PModule.Name:stuff syntax are -- given to you as this type type CommandLineOption = String data PluginWithArgs PluginWithArgs :: Plugin -> [CommandLineOption] -> PluginWithArgs -- | the actual callable plugin [paPlugin] :: PluginWithArgs -> Plugin -- | command line arguments for the plugin [paArguments] :: PluginWithArgs -> [CommandLineOption] data PluginRecompile ForceRecompile :: PluginRecompile NoForceRecompile :: PluginRecompile MaybeRecompile :: Fingerprint -> PluginRecompile type CorePlugin = [CommandLineOption] -> [CoreToDo] -> CoreM [CoreToDo] type FrontendPluginAction = [String] -> [(String, Maybe Phase)] -> Ghc () -- | HoleFitPluginR adds a TcRef to hole fit plugins so that plugins can -- track internal state. Note the existential quantification, ensuring -- that the state cannot be modified from outside the plugin. data HoleFitPluginR newIfaceNames :: [OccName] -> IfL [Name] newIfaceName :: OccName -> IfL Name -- | Look up a top-level name from the current Iface module lookupIfaceTop :: OccName -> IfL Name extendIfaceEnvs :: [TyCoVar] -> IfL a -> IfL a extendIfaceTyVarEnv :: [TyVar] -> IfL a -> IfL a lookupIfaceVar :: IfaceBndr -> IfL (Maybe TyCoVar) lookupIfaceTyVar :: IfaceTvBndr -> IfL (Maybe TyVar) tcIfaceTyVar :: FastString -> IfL TyVar extendIfaceIdEnv :: [Id] -> IfL a -> IfL a tcIfaceLclId :: FastString -> IfL Id -- | Set the Module of a Name. setNameModule :: Maybe Module -> Name -> TcRnIf m n Name externaliseName :: Module -> Name -> TcRnIf m n Name lookupOrigIO :: HscEnv -> Module -> OccName -> IO Name -- | Look up the Name for a given Module and OccName. -- Consider alternatively using lookupIfaceTop if you're in the -- IfL monad and Module is simply that of the -- ModIface you are typechecking. lookupOrig :: Module -> OccName -> TcRnIf a b Name updNameCacheTc :: Module -> OccName -> (NameCache -> (NameCache, c)) -> TcRnIf a b c mkNameCacheUpdater :: TcRnIf a b NameCacheUpdater ifaceExportNames :: [IfaceExport] -> TcRnIf gbl lcl [AvailInfo] allocateGlobalBinder :: NameCache -> Module -> OccName -> SrcSpan -> (NameCache, Name) newInteractiveBinder :: HscEnv -> OccName -> SrcSpan -> IO Name newGlobalBinder :: Module -> OccName -> SrcSpan -> TcRnIf a b Name -- | A function that atomically updates the name cache given a modifier -- function. The second result of the modifier function will be the -- result of the IO action. newtype NameCacheUpdater NCU :: (forall c. () => (NameCache -> (NameCache, c)) -> IO c) -> NameCacheUpdater [updateNameCache] :: NameCacheUpdater -> forall c. () => (NameCache -> (NameCache, c)) -> IO c -- | Get the next cost centre index associated with a given name. 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 -- | Initialize interface typechecking, but with a NameShape to -- apply when typechecking top-level OccNames (see -- lookupIfaceTop) 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 -- | Run an IfG (top-level interface monad) computation inside an -- existing TcRn (typecheck-renaming monad) computation by -- initializing an IfGblEnv based on TcGblEnv. initIfaceTcRn :: IfG a -> TcRn a mkIfLclEnv :: Module -> SDoc -> Bool -> IfLclEnv setLocalRdrEnv :: LocalRdrEnv -> RnM a -> RnM a getLocalRdrEnv :: RnM LocalRdrEnv -- | Switch instances to safe instances if we're in Safe mode. fixSafeInstances :: SafeHaskellMode -> [ClsInst] -> [ClsInst] -- | Figure out the final correct safe haskell mode finalSafeMode :: DynFlags -> TcGblEnv -> IO SafeHaskellMode -- | Mark that safe inference has failed See Note [Safe Haskell Overlapping -- Instances Implementation] although this is used for more than just -- that failure case. recordUnsafeInfer :: WarningMessages -> TcM () -- | Adds the given modFinalizers to the global environment and set them to -- use the current local environment. 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) -- | 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. 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 -- | The name says it all. The returned TcLevel is the *inner* TcLevel. pushLevelAndCaptureConstraints :: TcM a -> TcM (TcLevel, WantedConstraints, a) -- | Throw out any constraints emitted by the thing_inside 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 -- | 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 newNoTcEvBinds :: TcM EvBindsVar newTcEvBinds :: TcM EvBindsVar addTopEvBinds :: Bag EvBind -> TcM a -> TcM a debugTc :: TcM () -> TcM () mkErrInfo :: TidyEnv -> [ErrCtxt] -> TcM SDoc -- | Display a warning, with an optional flag, for the current source -- location. add_warn :: WarnReason -> MsgDoc -> MsgDoc -> TcRn () -- | Display a warning for a given source location. addWarnAt :: WarnReason -> SrcSpan -> MsgDoc -> TcRn () -- | Display a warning for the current source location. addWarn :: WarnReason -> MsgDoc -> TcRn () -- | Display a warning in a given context. addWarnTcM :: WarnReason -> (TidyEnv, MsgDoc) -> TcM () -- | Display a warning in the current context. addWarnTc :: WarnReason -> MsgDoc -> TcM () -- | Display a warning if a condition is met. warnTcM :: WarnReason -> Bool -> (TidyEnv, MsgDoc) -> TcM () -- | Display a warning if a condition is met. warnTc :: WarnReason -> Bool -> MsgDoc -> TcM () -- | Display a warning if a condition is met. warnIf :: Bool -> MsgDoc -> TcRn () -- | Display a warning if a condition is met, and the warning is enabled 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) -- | The accumulator is not updated if the action fails foldAndRecoverM :: (b -> a -> TcRn b) -> 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 mapAndReportM :: (a -> TcRn b) -> [a] -> TcRn [b] -- | Drop elements of the input that fail, so the result list can be -- shorter than the argument list 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 -- | Variant of addLandmarkErrCtxt that allows for monadic -- operations and tidying. addLandmarkErrCtxtM :: (TidyEnv -> TcM (TidyEnv, 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. addLandmarkErrCtxt :: MsgDoc -> TcM a -> TcM a -- | Add a message to the error context. This message may do tidying. addErrCtxtM :: (TidyEnv -> TcM (TidyEnv, MsgDoc)) -> TcM a -> TcM a -- | Add a fixed message to the error context. This message should not do -- any tidying. 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 () -- | Like logInfoTcRn, but for user consumption printForUserTcRn :: SDoc -> TcRn () getPrintUnqualified :: DynFlags -> TcRn PrintUnqualified -- | 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 traceTcRnWithStyle :: PprStyle -> DynFlags -> DumpFlag -> SDoc -> TcRn () -- | A wrapper around traceTcRnWithStyle which uses PprUser -- style. traceTcRnForUser :: DumpFlag -> SDoc -> TcRn () -- | A wrapper around traceTcRnWithStyle which uses PprDump -- style. traceTcRn :: DumpFlag -> SDoc -> TcRn () -- | Output a doc if the given DumpFlag is set. -- -- By default this logs to stdout However, if the `-ddump-to-file` flag -- is set, then this will dump output to a file -- -- Just a wrapper for dumpSDoc 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 -- | A convenient wrapper for taking a MaybeErr MsgDoc a and -- throwing an exception if it is an error. withException :: TcRnIf gbl lcl (MaybeErr MsgDoc a) -> TcRnIf gbl lcl a getEpsAndHpt :: TcRnIf gbl lcl (ExternalPackageState, HomePackageTable) getHpt :: TcRnIf gbl lcl HomePackageTable -- | 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) -> TcRnIf gbl lcl () -- | 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. 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 () -- | Do it flag is true 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) -- | Run a TcM action in the context of an existing GblEnv. initTcWithGbl :: HscEnv -> TcGblEnv -> RealSrcSpan -> TcM r -> IO (Messages, Maybe r) -- | Setup the initial typechecking environment initTc :: HscEnv -> HscSource -> Bool -> Module -> RealSrcSpan -> TcM r -> IO (Messages, Maybe r) -- | Environments which track CostCentreState class ContainsCostCentreState e extractCostCentreState :: ContainsCostCentreState e => e -> TcRef CostCentreState rnLExpr :: LHsExpr GhcPs -> RnM (LHsExpr GhcRn, FreeVars) -- | Rename some Stmts rnStmts :: Outputable (body GhcPs) => HsStmtContext Name -> (Located (body GhcPs) -> RnM (Located (body GhcRn), FreeVars)) -> [LStmt GhcPs (Located (body GhcPs))] -> ([Name] -> RnM (thing, FreeVars)) -> RnM (([LStmt GhcRn (Located (body GhcRn))], thing), FreeVars) getRoleAnnots :: [Name] -> RoleAnnotEnv -> [LRoleAnnotDecl GhcRn] lookupRoleAnnot :: RoleAnnotEnv -> Name -> Maybe (LRoleAnnotDecl GhcRn) emptyRoleAnnotEnv :: RoleAnnotEnv mkRoleAnnotEnv :: [LRoleAnnotDecl GhcRn] -> RoleAnnotEnv -- | Access the EvBindsVar carried by the TcPluginM during -- constraint solving. Returns Nothing if invoked during -- tcPluginInit or tcPluginStop. getEvBindsTcPluginM :: TcPluginM EvBindsVar -- | This function provides an escape for direct access to the TcM -- monad. It should not be used lightly, and the provided -- TcPluginM API should be favoured instead. unsafeTcPluginTcM :: TcM a -> TcPluginM a runTcPluginM :: TcPluginM a -> EvBindsVar -> TcM a -- | No signature or a partial signature hasCompleteSig :: TcSigFun -> Name -> Bool isPartialSig :: TcIdSigInst -> Bool -- | 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. 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 -- | A NameShape is a substitution on Names 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 -- AvailInfos 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 AvailInfos -- 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. data NameShape NameShape :: ModuleName -> [AvailInfo] -> OccEnv Name -> NameShape [ns_mod_name] :: NameShape -> ModuleName [ns_exports] :: NameShape -> [AvailInfo] [ns_map] :: NameShape -> 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 -- | Historical "renaming monad" (now it's just TcRn). type RnM = TcRn -- | Historical "type-checking monad" (now it's just TcRn). type TcM = TcRn data Env gbl lcl Env :: !HscEnv -> !Char -> gbl -> lcl -> Env gbl lcl [env_top] :: Env gbl lcl -> !HscEnv [env_um] :: Env gbl lcl -> !Char [env_gbl] :: Env gbl lcl -> gbl [env_lcl] :: Env gbl lcl -> lcl data IfGblEnv IfGblEnv :: SDoc -> Maybe (Module, IfG TypeEnv) -> IfGblEnv [if_doc] :: IfGblEnv -> SDoc [if_rec_types] :: IfGblEnv -> Maybe (Module, IfG TypeEnv) data IfLclEnv IfLclEnv :: Module -> Bool -> SDoc -> Maybe NameShape -> Maybe TypeEnv -> FastStringEnv TyVar -> FastStringEnv Id -> IfLclEnv [if_mod] :: IfLclEnv -> Module [if_boot] :: IfLclEnv -> Bool [if_loc] :: IfLclEnv -> SDoc [if_nsubst] :: IfLclEnv -> Maybe NameShape [if_implicits_env] :: IfLclEnv -> Maybe TypeEnv [if_tv_env] :: IfLclEnv -> FastStringEnv TyVar [if_id_env] :: IfLclEnv -> FastStringEnv Id data DsGblEnv DsGblEnv :: Module -> FamInstEnv -> PrintUnqualified -> IORef Messages -> (IfGblEnv, IfLclEnv) -> CompleteMatchMap -> IORef CostCentreState -> DsGblEnv [ds_mod] :: DsGblEnv -> Module [ds_fam_inst_env] :: DsGblEnv -> FamInstEnv [ds_unqual] :: DsGblEnv -> PrintUnqualified [ds_msgs] :: DsGblEnv -> IORef Messages [ds_if_env] :: DsGblEnv -> (IfGblEnv, IfLclEnv) [ds_complete_matches] :: DsGblEnv -> CompleteMatchMap [ds_cc_st] :: DsGblEnv -> IORef CostCentreState data DsLclEnv DsLclEnv :: DsMetaEnv -> RealSrcSpan -> Delta -> DsLclEnv [dsl_meta] :: DsLclEnv -> DsMetaEnv [dsl_loc] :: DsLclEnv -> RealSrcSpan [dsl_delta] :: DsLclEnv -> Delta type DsMetaEnv = NameEnv DsMetaVal data DsMetaVal DsBound :: Id -> DsMetaVal DsSplice :: HsExpr GhcTc -> DsMetaVal -- | 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. data FrontendResult FrontendTypecheck :: TcGblEnv -> FrontendResult -- | 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). data TcGblEnv TcGblEnv :: Module -> Module -> HscSource -> GlobalRdrEnv -> Maybe [Type] -> FixityEnv -> RecFieldEnv -> TypeEnv -> TcRef TypeEnv -> !InstEnv -> !FamInstEnv -> AnnEnv -> [AvailInfo] -> ImportAvails -> DefUses -> TcRef [GlobalRdrElt] -> TcRef NameSet -> TcRef Bool -> TcRef Bool -> TcRef (Set RealSrcSpan) -> TcRef OccSet -> [(Module, Fingerprint)] -> Maybe [(Located (IE GhcRn), Avails)] -> [LImportDecl GhcRn] -> Maybe (HsGroup GhcRn) -> TcRef [FilePath] -> TcRef [LHsDecl GhcPs] -> TcRef [(ForeignSrcLang, FilePath)] -> TcRef NameSet -> TcRef [(TcLclEnv, ThModFinalizers)] -> TcRef [String] -> TcRef (Map TypeRep Dynamic) -> TcRef (Maybe (ForeignRef (IORef QState))) -> Bag EvBind -> Maybe Id -> LHsBinds GhcTc -> NameSet -> [LTcSpecPrag] -> Warnings -> [Annotation] -> [TyCon] -> [ClsInst] -> [FamInst] -> [LRuleDecl GhcTc] -> [LForeignDecl GhcTc] -> [PatSyn] -> Maybe LHsDocString -> !AnyHpcUsage -> SelfBootInfo -> Maybe Name -> TcRef (Bool, WarningMessages) -> [TcPluginSolver] -> [HoleFitPlugin] -> RealSrcSpan -> TcRef WantedConstraints -> [CompleteMatch] -> TcRef CostCentreState -> TcGblEnv -- | Module being compiled [tcg_mod] :: TcGblEnv -> Module -- | If a signature, the backing module See also Note [Identity versus -- semantic module] [tcg_semantic_mod] :: TcGblEnv -> Module -- | What kind of module (regular Haskell, hs-boot, hsig) [tcg_src] :: TcGblEnv -> HscSource -- | Top level envt; used during renaming [tcg_rdr_env] :: TcGblEnv -> GlobalRdrEnv -- | Types used for defaulting. Nothing => no default -- decl [tcg_default] :: TcGblEnv -> Maybe [Type] -- | Just for things in this module [tcg_fix_env] :: TcGblEnv -> FixityEnv -- | Just for things in this module See Note [The interactive package] in -- HscTypes [tcg_field_env] :: TcGblEnv -> RecFieldEnv -- | Global type env for the module we are compiling now. All TyCons and -- Classes (for this module) end up in here right away, along with their -- derived constructors, selectors. -- -- (Ids defined in this module start in the local envt, though they move -- to the global envt during zonking) -- -- NB: for what "things in this module" means, see Note [The interactive -- package] in HscTypes [tcg_type_env] :: TcGblEnv -> TypeEnv [tcg_type_env_var] :: TcGblEnv -> TcRef TypeEnv -- | Instance envt for all home-package modules; Includes the dfuns -- in tcg_insts NB. BangPattern is to fix a leak, see #15111 [tcg_inst_env] :: TcGblEnv -> !InstEnv -- | Ditto for family instances NB. BangPattern is to fix a leak, see -- #15111 [tcg_fam_inst_env] :: TcGblEnv -> !FamInstEnv -- | And for annotations [tcg_ann_env] :: TcGblEnv -> AnnEnv -- | What is exported [tcg_exports] :: TcGblEnv -> [AvailInfo] -- | Information about what was imported from where, including things bound -- in this module. Also store Safe Haskell info here about transitive -- trusted package requirements. -- -- There are not many uses of this field, so you can grep for all them. -- -- The ImportAvails records information about the following things: -- --
-- mkSmallTupleSelector [x] x v e = [| e |]
-- mkSmallTupleSelector [x,y,z] x v e = [| case e of v { (x,y,z) -> x } |]
--
mkSmallTupleSelector :: [Id] -> Id -> Id -> CoreExpr -> CoreExpr
-- | Builds a selector which scrutises the given expression and extracts
-- the one name from the list given. If you want the no-shadowing rule to
-- apply, the caller is responsible for making sure that none of these
-- names are in scope.
--
-- If there is just one Id in the tuple, then the selector is just
-- the identity.
--
-- If necessary, we pattern match on a "big" tuple.
mkTupleSelector1 :: [Id] -> Id -> Id -> CoreExpr -> CoreExpr
-- | mkTupleSelector1 is like mkTupleSelector but one-tuples
-- are NOT flattened (see Note [Flattening one-tuples])
--
-- Builds a selector which scrutises the given expression and extracts
-- the one name from the list given. If you want the no-shadowing rule to
-- apply, the caller is responsible for making sure that none of these
-- names are in scope.
--
-- If there is just one Id in the tuple, then the selector is just
-- the identity.
--
-- If necessary, we pattern match on a "big" tuple.
mkTupleSelector :: [Id] -> Id -> Id -> CoreExpr -> CoreExpr
-- | The unit expression
unitExpr :: CoreExpr
-- | Build the type of a big tuple that holds the specified type of thing
-- One-tuples are flattened; see Note [Flattening one-tuples]
mkBigCoreTupTy :: [Type] -> Type
-- | Build a big tuple holding the specified expressions One-tuples are
-- flattened; see Note [Flattening one-tuples]
mkBigCoreTup :: [CoreExpr] -> CoreExpr
-- | Build the type of a big tuple that holds the specified variables
-- One-tuples are flattened; see Note [Flattening one-tuples]
mkBigCoreVarTupTy :: [Id] -> Type
mkBigCoreVarTup1 :: [Id] -> CoreExpr
-- | Build a big tuple holding the specified variables One-tuples are
-- flattened; see Note [Flattening one-tuples]
mkBigCoreVarTup :: [Id] -> CoreExpr
-- | Make a core tuple of the given boxity; don't flatten 1-tuples
mkCoreTupBoxity :: Boxity -> [CoreExpr] -> CoreExpr
-- | Build a small unboxed tuple holding the specified expressions, with
-- the given types. The types must be the types of the expressions. Do
-- not include the RuntimeRep specifiers; this function calculates them
-- for you. Does not flatten one-tuples; see Note [Flattening
-- one-tuples]
mkCoreUbxTup :: [Type] -> [CoreExpr] -> CoreExpr
-- | Build a small tuple holding the specified expressions One-tuples are
-- flattened; see Note [Flattening one-tuples]
mkCoreTup :: [CoreExpr] -> CoreExpr
-- | Build the type of a small tuple that holds the specified variables
-- One-tuples are flattened; see Note [Flattening one-tuples]
mkCoreVarTupTy :: [Id] -> Type
mkStringExprFSWith :: Monad m => (Name -> m Id) -> FastString -> m CoreExpr
-- | Create a CoreExpr which will evaluate to a string morally
-- equivalent to the given FastString
mkStringExprFS :: MonadThings m => FastString -> m CoreExpr
-- | Create a CoreExpr which will evaluate to the given
-- String
mkStringExpr :: MonadThings m => String -> m CoreExpr
-- | Create a CoreExpr which will evaluate to the given
-- Char
mkCharExpr :: Char -> CoreExpr
-- | Create a CoreExpr which will evaluate to the given
-- Double
mkDoubleExpr :: Double -> CoreExpr
-- | Create a CoreExpr which will evaluate to the given
-- Float
mkFloatExpr :: Float -> CoreExpr
-- | Create a CoreExpr which will evaluate to the given
-- Natural
mkNaturalExpr :: MonadThings m => Integer -> m CoreExpr
-- | Create a CoreExpr which will evaluate to the given
-- Integer
mkIntegerExpr :: MonadThings m => Integer -> m CoreExpr
-- | Create a CoreExpr which will evaluate to the given
-- Word
mkWordExprWord :: DynFlags -> Word -> CoreExpr
-- | Create a CoreExpr which will evaluate to the a Word
-- with the given value
mkWordExpr :: DynFlags -> Integer -> CoreExpr
-- | Create a CoreExpr which will evaluate to the given Int
mkIntExprInt :: DynFlags -> Int -> CoreExpr
-- | Create a CoreExpr which will evaluate to the given Int
mkIntExpr :: DynFlags -> Integer -> CoreExpr
castBottomExpr :: CoreExpr -> Type -> CoreExpr
mkIfThenElse :: CoreExpr -> CoreExpr -> CoreExpr -> CoreExpr
mkWildCase :: CoreExpr -> Type -> Type -> [CoreAlt] -> CoreExpr
-- | Make a wildcard binder. This is typically used when you need a
-- binder that you expect to use only at a *binding* site. Do not use it
-- at occurrence sites because it has a single, fixed unique, and it's
-- very easy to get into difficulties with shadowing. That's why it is
-- used so little. See Note [WildCard binders] in SimplEnv
mkWildValBinder :: Type -> Id
mkWildEvBinder :: PredType -> EvVar
-- | Construct an expression which represents the application of one
-- expression to the other Respects the let/app invariant by building a
-- case expression where necessary See CoreSyn Note [CoreSyn let/app
-- invariant]
mkCoreApp :: SDoc -> CoreExpr -> CoreExpr -> CoreExpr
infixl 4 `mkCoreApp`
-- | Construct an expression which represents the application of a number
-- of expressions to another. The leftmost expression in the list is
-- applied first Respects the let/app invariant by building a case
-- expression where necessary See CoreSyn Note [CoreSyn let/app
-- invariant]
mkCoreApps :: CoreExpr -> [CoreExpr] -> CoreExpr
infixl 4 `mkCoreApps`
-- | Construct an expression which represents the application of a number
-- of expressions to that of a data constructor expression. The leftmost
-- expression in the list is applied first
mkCoreConApps :: DataCon -> [CoreExpr] -> CoreExpr
-- | Bind a list of binding groups over an expression. The leftmost binding
-- group becomes the outermost group in the resulting expression
mkCoreLets :: [CoreBind] -> CoreExpr -> CoreExpr
-- | Create a lambda where the given expression has a number of variables
-- bound over it. The leftmost binder is that bound by the outermost
-- lambda in the result
mkCoreLams :: [CoreBndr] -> CoreExpr -> CoreExpr
-- | Bind a binding group over an expression, using a let or
-- case as appropriate (see CoreSyn#let_app_invariant)
mkCoreLet :: CoreBind -> CoreExpr -> CoreExpr
sortQuantVars :: [Var] -> [Var]
data FloatBind
FloatLet :: CoreBind -> FloatBind
FloatCase :: CoreExpr -> Id -> AltCon -> [Var] -> FloatBind
mkSingleAltCase :: CoreExpr -> Id -> AltCon -> [Var] -> CoreExpr -> CoreExpr
thRdrNameGuesses :: Name -> [RdrName]
convertToHsType :: Origin -> SrcSpan -> Type -> Either MsgDoc (LHsType GhcPs)
convertToPat :: Origin -> SrcSpan -> Pat -> Either MsgDoc (LPat GhcPs)
convertToHsExpr :: Origin -> SrcSpan -> Exp -> Either MsgDoc (LHsExpr GhcPs)
convertToHsDecls :: Origin -> SrcSpan -> [Dec] -> Either MsgDoc [LHsDecl GhcPs]
cannotFindInterface :: DynFlags -> ModuleName -> InstalledFindResult -> SDoc
cannotFindModule :: DynFlags -> ModuleName -> FindResult -> SDoc
findObjectLinkable :: Module -> FilePath -> UTCTime -> IO Linkable
findObjectLinkableMaybe :: Module -> ModLocation -> IO (Maybe Linkable)
mkStubPaths :: DynFlags -> ModuleName -> ModLocation -> FilePath
-- | Constructs the filename of a .hi file for a given source file. Does
-- not check whether the .hi file exists
mkHiPath :: DynFlags -> FilePath -> String -> FilePath
-- | Constructs the filename of a .o file for a given source file. Does
-- not check whether the .o file exists
mkObjPath :: DynFlags -> FilePath -> String -> FilePath
mkHiOnlyModLocation :: DynFlags -> Suffix -> FilePath -> String -> IO ModLocation
mkHomeModLocation2 :: DynFlags -> ModuleName -> FilePath -> String -> IO ModLocation
mkHomeModLocation :: DynFlags -> ModuleName -> FilePath -> IO ModLocation
findHomeModule :: HscEnv -> ModuleName -> IO FindResult
uncacheModule :: HscEnv -> ModuleName -> IO ()
addHomeModuleToFinder :: HscEnv -> ModuleName -> ModLocation -> IO Module
findExposedPackageModule :: HscEnv -> ModuleName -> Maybe FastString -> IO FindResult
-- | Locate a specific Module. The purpose of this function is to
-- create a ModLocation for a given Module, that is to find
-- out where the files associated with this module live. It is used when
-- reading the interface for a module mentioned by another interface, for
-- example (a "system import").
findExactModule :: HscEnv -> InstalledModule -> IO InstalledFindResult
-- | Locate a plugin module requested by the user, for a compiler plugin.
-- This consults the same set of exposed packages as
-- findImportedModule, unless -hide-all-plugin-packages
-- or -plugin-package are specified.
findPluginModule :: HscEnv -> ModuleName -> IO FindResult
-- | Locate a module that was imported by the user. We have the module's
-- name, and possibly a package name. Without a package name, this
-- function will use the search path and the known exposed packages to
-- find the module, if a package is specified then only that package is
-- searched for the module.
findImportedModule :: HscEnv -> ModuleName -> Maybe FastString -> IO FindResult
flushFinderCaches :: HscEnv -> IO ()
extendCompleteMatchMap :: CompleteMatchMap -> [CompleteMatch] -> CompleteMatchMap
mkCompleteMatchMap :: [CompleteMatch] -> CompleteMatchMap
-- | 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).
data FindResult
-- | The module was found
Found :: ModLocation -> Module -> FindResult
-- | The requested package was not found
NoPackage :: UnitId -> FindResult
-- | _Error_: both in multiple packages
FoundMultiple :: [(Module, ModuleOrigin)] -> FindResult
-- | Not found
NotFound :: [FilePath] -> Maybe UnitId -> [UnitId] -> [UnitId] -> [(UnitId, UnusablePackageReason)] -> [ModuleSuggestion] -> FindResult
[fr_paths] :: FindResult -> [FilePath]
[fr_pkg] :: FindResult -> Maybe UnitId
[fr_mods_hidden] :: FindResult -> [UnitId]
[fr_pkgs_hidden] :: FindResult -> [UnitId]
[fr_unusables] :: FindResult -> [(UnitId, UnusablePackageReason)]
[fr_suggestions] :: FindResult -> [ModuleSuggestion]
-- | A list of conlikes which represents a complete pattern match. These
-- arise from COMPLETE signatures.
data CompleteMatch
CompleteMatch :: [Name] -> Name -> CompleteMatch
-- | The ConLikes that form a covering family (e.g. Nothing, Just)
[completeMatchConLikes] :: CompleteMatch -> [Name]
-- | The TyCon that they cover (e.g. Maybe)
[completeMatchTyCon] :: CompleteMatch -> Name
-- | A map keyed by the completeMatchTyCon.
type CompleteMatchMap = UniqFM [CompleteMatch]
pprCtOrigin :: CtOrigin -> SDoc
-- | Extract a suitable CtOrigin from guarded RHSs
grhssCtOrigin :: GRHSs GhcRn (LHsExpr GhcRn) -> CtOrigin
-- | Extract a suitable CtOrigin from a MatchGroup
matchesCtOrigin :: MatchGroup GhcRn (LHsExpr GhcRn) -> CtOrigin
exprCtOrigin :: HsExpr GhcRn -> CtOrigin
-- | Extract a suitable CtOrigin from a HsExpr
lexprCtOrigin :: LHsExpr GhcRn -> CtOrigin
isGivenOrigin :: CtOrigin -> Bool
toInvisibleOrigin :: CtOrigin -> CtOrigin
isVisibleOrigin :: CtOrigin -> Bool
pprSigSkolInfo :: UserTypeCtxt -> TcType -> SDoc
pprSkolInfo :: SkolemInfo -> SDoc
isSigMaybe :: UserTypeCtxt -> Maybe Name
pprUserTypeCtxt :: UserTypeCtxt -> SDoc
-- | UserTypeCtxt describes the origin of the polymorphic type in the
-- places where we need an expression to have that type
data UserTypeCtxt
FunSigCtxt :: Name -> Bool -> UserTypeCtxt
InfSigCtxt :: Name -> UserTypeCtxt
ExprSigCtxt :: UserTypeCtxt
KindSigCtxt :: UserTypeCtxt
StandaloneKindSigCtxt :: Name -> UserTypeCtxt
TypeAppCtxt :: UserTypeCtxt
ConArgCtxt :: Name -> UserTypeCtxt
TySynCtxt :: Name -> UserTypeCtxt
PatSynCtxt :: Name -> UserTypeCtxt
PatSigCtxt :: UserTypeCtxt
RuleSigCtxt :: Name -> UserTypeCtxt
ResSigCtxt :: UserTypeCtxt
ForSigCtxt :: Name -> UserTypeCtxt
DefaultDeclCtxt :: UserTypeCtxt
InstDeclCtxt :: Bool -> UserTypeCtxt
SpecInstCtxt :: UserTypeCtxt
ThBrackCtxt :: UserTypeCtxt
GenSigCtxt :: UserTypeCtxt
GhciCtxt :: Bool -> UserTypeCtxt
ClassSCCtxt :: Name -> UserTypeCtxt
SigmaCtxt :: UserTypeCtxt
DataTyCtxt :: Name -> UserTypeCtxt
DerivClauseCtxt :: UserTypeCtxt
TyVarBndrKindCtxt :: Name -> UserTypeCtxt
DataKindCtxt :: Name -> UserTypeCtxt
TySynKindCtxt :: Name -> UserTypeCtxt
TyFamResKindCtxt :: Name -> UserTypeCtxt
data SkolemInfo
SigSkol :: UserTypeCtxt -> TcType -> [(Name, TcTyVar)] -> SkolemInfo
SigTypeSkol :: UserTypeCtxt -> SkolemInfo
ForAllSkol :: SDoc -> SkolemInfo
DerivSkol :: Type -> SkolemInfo
InstSkol :: SkolemInfo
InstSC :: TypeSize -> SkolemInfo
FamInstSkol :: SkolemInfo
PatSkol :: ConLike -> HsMatchContext Name -> SkolemInfo
ArrowSkol :: SkolemInfo
IPSkol :: [HsIPName] -> SkolemInfo
RuleSkol :: RuleName -> SkolemInfo
InferSkol :: [(Name, TcType)] -> SkolemInfo
BracketSkol :: SkolemInfo
UnifyForAllSkol :: TcType -> SkolemInfo
TyConSkol :: TyConFlavour -> Name -> SkolemInfo
DataConSkol :: Name -> SkolemInfo
ReifySkol :: SkolemInfo
QuantCtxtSkol :: SkolemInfo
UnkSkol :: SkolemInfo
data CtOrigin
GivenOrigin :: SkolemInfo -> CtOrigin
OccurrenceOf :: Name -> CtOrigin
OccurrenceOfRecSel :: RdrName -> CtOrigin
AppOrigin :: CtOrigin
SpecPragOrigin :: UserTypeCtxt -> CtOrigin
TypeEqOrigin :: TcType -> TcType -> Maybe SDoc -> Bool -> CtOrigin
[uo_actual] :: CtOrigin -> TcType
[uo_expected] :: CtOrigin -> TcType
-- | The thing that has type "actual"
[uo_thing] :: CtOrigin -> Maybe SDoc
-- | Is at least one of the three elements above visible? (Errors from the
-- polymorphic subsumption check are considered visible.) Only used for
-- prioritizing error messages.
[uo_visible] :: CtOrigin -> Bool
KindEqOrigin :: TcType -> Maybe TcType -> CtOrigin -> Maybe TypeOrKind -> CtOrigin
IPOccOrigin :: HsIPName -> CtOrigin
OverLabelOrigin :: FastString -> CtOrigin
LiteralOrigin :: HsOverLit GhcRn -> CtOrigin
NegateOrigin :: CtOrigin
ArithSeqOrigin :: ArithSeqInfo GhcRn -> CtOrigin
AssocFamPatOrigin :: CtOrigin
SectionOrigin :: CtOrigin
TupleOrigin :: CtOrigin
ExprSigOrigin :: CtOrigin
PatSigOrigin :: CtOrigin
PatOrigin :: CtOrigin
ProvCtxtOrigin :: PatSynBind GhcRn GhcRn -> CtOrigin
RecordUpdOrigin :: CtOrigin
ViewPatOrigin :: CtOrigin
ScOrigin :: TypeSize -> CtOrigin
DerivClauseOrigin :: CtOrigin
DerivOriginDC :: DataCon -> Int -> Bool -> CtOrigin
DerivOriginCoerce :: Id -> Type -> Type -> Bool -> CtOrigin
StandAloneDerivOrigin :: CtOrigin
DefaultOrigin :: CtOrigin
DoOrigin :: CtOrigin
DoPatOrigin :: LPat GhcRn -> CtOrigin
MCompOrigin :: CtOrigin
MCompPatOrigin :: LPat GhcRn -> CtOrigin
IfOrigin :: CtOrigin
ProcOrigin :: CtOrigin
AnnOrigin :: CtOrigin
FunDepOrigin1 :: PredType -> CtOrigin -> RealSrcSpan -> PredType -> CtOrigin -> RealSrcSpan -> CtOrigin
FunDepOrigin2 :: PredType -> CtOrigin -> PredType -> SrcSpan -> CtOrigin
HoleOrigin :: CtOrigin
UnboundOccurrenceOf :: OccName -> CtOrigin
ListOrigin :: CtOrigin
StaticOrigin :: CtOrigin
FailablePattern :: LPat GhcTcId -> CtOrigin
Shouldn'tHappenOrigin :: String -> CtOrigin
InstProvidedOrigin :: Module -> ClsInst -> CtOrigin
pprStmtInCtxt :: forall (idL :: Pass) (idR :: Pass) body. (OutputableBndrId idL, OutputableBndrId idR, Outputable body) => HsStmtContext (IdP (GhcPass idL)) -> StmtLR (GhcPass idL) (GhcPass idR) body -> SDoc
pprMatchInCtxt :: forall (idR :: Pass) body. (OutputableBndrId idR, Outputable (NameOrRdrName (NameOrRdrName (IdP (GhcPass idR)))), Outputable body) => Match (GhcPass idR) body -> SDoc
matchContextErrString :: Outputable id => HsMatchContext id -> SDoc
pprStmtContext :: (Outputable id, Outputable (NameOrRdrName id)) => HsStmtContext id -> SDoc
pprAStmtContext :: (Outputable id, Outputable (NameOrRdrName id)) => HsStmtContext id -> SDoc
pprMatchContextNoun :: (Outputable (NameOrRdrName id), Outputable id) => HsMatchContext id -> SDoc
pprMatchContext :: (Outputable (NameOrRdrName id), Outputable id) => HsMatchContext id -> SDoc
matchSeparator :: HsMatchContext id -> SDoc
isMonadCompContext :: HsStmtContext id -> Bool
-- | Should pattern match failure in a HsStmtContext be desugared
-- using MonadFail?
isMonadFailStmtContext :: HsStmtContext id -> Bool
isComprehensionContext :: HsStmtContext id -> Bool
isPatSynCtxt :: HsMatchContext id -> Bool
pp_dotdot :: SDoc
thTyBrackets :: SDoc -> SDoc
thBrackets :: SDoc -> SDoc -> SDoc
pprHsBracket :: forall (p :: Pass). OutputableBndrId p => HsBracket (GhcPass p) -> SDoc
isTypedBracket :: HsBracket id -> Bool
ppr_splice :: forall (p :: Pass). OutputableBndrId p => SDoc -> IdP (GhcPass p) -> LHsExpr (GhcPass p) -> SDoc -> SDoc
ppr_quasi :: OutputableBndr p => p -> p -> FastString -> SDoc
ppr_splice_decl :: forall (p :: Pass). OutputableBndrId p => HsSplice (GhcPass p) -> SDoc
pprPendingSplice :: forall (p :: Pass). OutputableBndrId p => SplicePointName -> LHsExpr (GhcPass p) -> SDoc
isTypedSplice :: HsSplice id -> Bool
pprQuals :: forall (p :: Pass) body. (OutputableBndrId p, Outputable body) => [LStmt (GhcPass p) body] -> SDoc
pprComp :: forall (p :: Pass) body. (OutputableBndrId p, Outputable body) => [LStmt (GhcPass p) body] -> SDoc
ppr_do_stmts :: forall (idL :: Pass) (idR :: Pass) body. (OutputableBndrId idL, OutputableBndrId idR, Outputable body) => [LStmtLR (GhcPass idL) (GhcPass idR) body] -> SDoc
pprDo :: forall (p :: Pass) body any. (OutputableBndrId p, Outputable body) => HsStmtContext any -> [LStmt (GhcPass p) body] -> SDoc
pprBy :: Outputable body => Maybe body -> SDoc
pprTransStmt :: Outputable body => Maybe body -> body -> TransForm -> SDoc
pprTransformStmt :: forall (p :: Pass). OutputableBndrId p => [IdP (GhcPass p)] -> LHsExpr (GhcPass p) -> Maybe (LHsExpr (GhcPass p)) -> SDoc
pprArg :: forall (idL :: Pass). OutputableBndrId idL => ApplicativeArg (GhcPass idL) -> SDoc
pprStmt :: forall (idL :: Pass) (idR :: Pass) body. (OutputableBndrId idL, OutputableBndrId idR, Outputable body) => StmtLR (GhcPass idL) (GhcPass idR) body -> SDoc
pp_rhs :: Outputable body => HsMatchContext idL -> body -> SDoc
pprGRHS :: forall (idR :: Pass) body idL. (OutputableBndrId idR, Outputable body) => HsMatchContext idL -> GRHS (GhcPass idR) body -> SDoc
pprGRHSs :: forall (idR :: Pass) body idL. (OutputableBndrId idR, Outputable body) => HsMatchContext idL -> GRHSs (GhcPass idR) body -> SDoc
pprMatch :: forall (idR :: Pass) body. (OutputableBndrId idR, Outputable body) => Match (GhcPass idR) body -> SDoc
pprMatches :: forall (idR :: Pass) body. (OutputableBndrId idR, Outputable body) => MatchGroup (GhcPass idR) body -> SDoc
hsLMatchPats :: forall (id :: Pass) body. LMatch (GhcPass id) body -> [LPat (GhcPass id)]
matchGroupArity :: forall (id :: Pass) body. MatchGroup (GhcPass id) body -> Arity
-- | Is there only one RHS in this list of matches?
isSingletonMatchGroup :: [LMatch id body] -> Bool
isEmptyMatchGroup :: MatchGroup id body -> Bool
isInfixMatch :: Match id body -> Bool
pprCmdArg :: forall (p :: Pass). OutputableBndrId p => HsCmdTop (GhcPass p) -> SDoc
ppr_cmd :: forall (p :: Pass). OutputableBndrId p => HsCmd (GhcPass p) -> SDoc
ppr_lcmd :: forall (p :: Pass). OutputableBndrId p => LHsCmd (GhcPass p) -> SDoc
isQuietHsCmd :: HsCmd id -> Bool
pprCmd :: forall (p :: Pass). OutputableBndrId p => HsCmd (GhcPass p) -> SDoc
pprLCmd :: forall (p :: Pass). OutputableBndrId p => LHsCmd (GhcPass p) -> SDoc
isAtomicHsExpr :: HsExpr id -> Bool
-- | parenthesizeHsExpr p e checks if
-- hsExprNeedsParens p e is true, and if so, surrounds
-- e with an HsPar. Otherwise, it simply returns
-- e.
parenthesizeHsExpr :: forall (p :: Pass). PprPrec -> LHsExpr (GhcPass p) -> LHsExpr (GhcPass p)
-- | hsExprNeedsParens p e returns True if the
-- expression e needs parentheses under precedence p.
hsExprNeedsParens :: PprPrec -> HsExpr p -> Bool
pprParendExpr :: forall (p :: Pass). OutputableBndrId p => PprPrec -> HsExpr (GhcPass p) -> SDoc
pprParendLExpr :: forall (p :: Pass). OutputableBndrId p => PprPrec -> LHsExpr (GhcPass p) -> SDoc
pprDebugParendExpr :: forall (p :: Pass). OutputableBndrId p => PprPrec -> LHsExpr (GhcPass p) -> SDoc
pprExternalSrcLoc :: (StringLiteral, (Int, Int), (Int, Int)) -> SDoc
ppr_apps :: forall (p :: Pass). OutputableBndrId p => HsExpr (GhcPass p) -> [Either (LHsExpr (GhcPass p)) (LHsWcType (NoGhcTc (GhcPass p)))] -> SDoc
ppr_infix_expr :: forall (p :: Pass). OutputableBndrId p => HsExpr (GhcPass p) -> Maybe SDoc
ppr_expr :: forall (p :: Pass). OutputableBndrId p => HsExpr (GhcPass p) -> SDoc
ppr_lexpr :: forall (p :: Pass). OutputableBndrId p => LHsExpr (GhcPass p) -> SDoc
pprBinds :: forall (idL :: Pass) (idR :: Pass). (OutputableBndrId idL, OutputableBndrId idR) => HsLocalBindsLR (GhcPass idL) (GhcPass idR) -> SDoc
isQuietHsExpr :: HsExpr id -> Bool
tupArgPresent :: LHsTupArg id -> Bool
unboundVarOcc :: UnboundVar -> OccName
-- | Make a 'SyntaxExpr Name' (the "rn" is because this is used in the
-- renamer), missing its HsWrappers.
mkRnSyntaxExpr :: Name -> SyntaxExpr GhcRn
-- | Make a 'SyntaxExpr (HsExpr _)', missing its HsWrappers.
mkSyntaxExpr :: forall (p :: Pass). HsExpr (GhcPass p) -> SyntaxExpr (GhcPass p)
noSyntaxExpr :: forall (p :: Pass). SyntaxExpr (GhcPass p)
-- | This is used for rebindable-syntax pieces that are too polymorphic for
-- tcSyntaxOp (trS_fmap and the mzip in ParStmt)
noExpr :: forall (p :: Pass). HsExpr (GhcPass p)
-- | Post-Type checking Expression
--
-- PostTcExpr is an evidence expression attached to the syntax tree by
-- the type checker (c.f. postTcType).
type PostTcExpr = HsExpr GhcTc
-- | Post-Type checking Table
--
-- We use a PostTcTable where there are a bunch of pieces of evidence,
-- more than is convenient to keep individually.
type PostTcTable = [(Name, PostTcExpr)]
-- | Command Syntax Table (for Arrow syntax)
type CmdSyntaxTable p = [(Name, HsExpr p)]
-- | An unbound variable; used for treating out-of-scope variables as
-- expression holes
--
-- Either "x", "y" Plain OutOfScope or "_", "_x" A TrueExprHole
--
-- Both forms indicate an out-of-scope variable, but the latter indicates
-- that the user expects it to be out of scope, and just wants GHC
-- to report its type
data UnboundVar
-- | An (unqualified) out-of-scope variable, together with the GlobalRdrEnv
-- with respect to which it is unbound
OutOfScope :: OccName -> GlobalRdrEnv -> UnboundVar
-- | A "true" expression hole (_ or _x)
TrueExprHole :: OccName -> UnboundVar
-- | Extra data fields for a RecordCon, added by the type checker
data RecordConTc
RecordConTc :: ConLike -> PostTcExpr -> RecordConTc
[rcon_con_like] :: RecordConTc -> ConLike
[rcon_con_expr] :: RecordConTc -> PostTcExpr
-- | Extra data fields for a RecordUpd, added by the type checker
data RecordUpdTc
RecordUpdTc :: [ConLike] -> [Type] -> [Type] -> HsWrapper -> RecordUpdTc
[rupd_cons] :: RecordUpdTc -> [ConLike]
[rupd_in_tys] :: RecordUpdTc -> [Type]
[rupd_out_tys] :: RecordUpdTc -> [Type]
[rupd_wrap] :: RecordUpdTc -> HsWrapper
-- | Located Haskell Tuple Argument
--
-- HsTupArg is used for tuple sections (,a,) is
-- represented by ExplicitTuple [Missing ty1, Present a, Missing
-- ty3] Which in turn stands for (x:ty1 y:ty2. (x,a,y))
type LHsTupArg id = Located HsTupArg id
-- | -- type/data family T :: *->* ---- --
-- data T b = ... deriving (C [a]) ---- -- should produce a derived instance for C [a] (T b). [deriv_clause_tys] :: HsDerivingClause pass -> Located [LHsSigType pass] XHsDerivingClause :: XXHsDerivingClause pass -> HsDerivingClause pass -- | Located Standalone Kind Signature type LStandaloneKindSig pass = Located StandaloneKindSig pass data StandaloneKindSig pass StandaloneKindSig :: XStandaloneKindSig pass -> Located (IdP pass) -> LHsSigType pass -> StandaloneKindSig pass XStandaloneKindSig :: XXStandaloneKindSig pass -> StandaloneKindSig pass data NewOrData -- |
-- newtype Blah ... --NewType :: NewOrData -- |
-- data Blah ... --DataType :: NewOrData -- | Located data Constructor Declaration type LConDecl pass = Located ConDecl pass -- |
-- data T b = forall a. Eq a => MkT a b -- MkT :: forall b a. Eq a => MkT a b -- -- data T b where -- MkT1 :: Int -> T Int -- -- data T = Int MkT Int -- | MkT2 -- -- data T a where -- Int MkT Int :: T Int ---- --
-- deriving instance _ => Eq (Foo a) ---- -- Which signifies that the context should be inferred. [deriv_type] :: DerivDecl pass -> LHsSigWcType pass [deriv_strategy] :: DerivDecl pass -> Maybe (LDerivStrategy pass) -- |
-- -XDeriveAnyClass --AnyclassStrategy :: DerivStrategy pass -- |
-- -XGeneralizedNewtypeDeriving --NewtypeStrategy :: DerivStrategy pass -- |
-- -XDerivingVia --ViaStrategy :: XViaStrategy pass -> DerivStrategy pass -- | Located Default Declaration type LDefaultDecl pass = Located DefaultDecl pass -- | Default Declaration data DefaultDecl pass -- |
-- f :: Int -> forall a. a -> a -- f x y = y ---- -- Then the MatchGroup will have type (Int -> a' -> a') (with a -- free type variable a'). The coercion will take a CoreExpr of this type -- and convert it to a CoreExpr of type Int -> forall a'. a' -> a' -- Notice that the coercion captures the free a'. [fun_co_fn] :: HsBindLR idL idR -> HsWrapper -- | Ticks to put on the rhs, if any [fun_tick] :: HsBindLR idL idR -> [Tickish Id] -- | Pattern Binding -- -- The pattern is never a simple variable; That case is done by FunBind. -- See Note [FunBind vs PatBind] for details about the relationship -- between FunBind and PatBind. PatBind :: XPatBind idL idR -> LPat idL -> GRHSs idR (LHsExpr idR) -> ([Tickish Id], [[Tickish Id]]) -> HsBindLR idL idR -- | See Note [Bind free vars] [pat_ext] :: HsBindLR idL idR -> XPatBind idL idR [pat_lhs] :: HsBindLR idL idR -> LPat idL [pat_rhs] :: HsBindLR idL idR -> GRHSs idR (LHsExpr idR) -- | Ticks to put on the rhs, if any, and ticks to put on the bound -- variables. [pat_ticks] :: HsBindLR idL idR -> ([Tickish Id], [[Tickish Id]]) -- | Variable Binding -- -- Dictionary binding and suchlike. All VarBinds are introduced by the -- type checker VarBind :: XVarBind idL idR -> IdP idL -> LHsExpr idR -> Bool -> HsBindLR idL idR [var_ext] :: HsBindLR idL idR -> XVarBind idL idR [var_id] :: HsBindLR idL idR -> IdP idL -- | Located only for consistency [var_rhs] :: HsBindLR idL idR -> LHsExpr idR -- | True = inline this binding regardless (used for implication -- constraints only) [var_inline] :: HsBindLR idL idR -> Bool -- | Abstraction Bindings AbsBinds :: XAbsBinds idL idR -> [TyVar] -> [EvVar] -> [ABExport idL] -> [TcEvBinds] -> LHsBinds idL -> Bool -> HsBindLR idL idR [abs_ext] :: HsBindLR idL idR -> XAbsBinds idL idR [abs_tvs] :: HsBindLR idL idR -> [TyVar] -- | Includes equality constraints [abs_ev_vars] :: HsBindLR idL idR -> [EvVar] -- | AbsBinds only gets used when idL = idR after renaming, but these need -- to be idL's for the collect... code in HsUtil to have the right type [abs_exports] :: HsBindLR idL idR -> [ABExport idL] -- | Evidence bindings Why a list? See TcInstDcls Note [Typechecking plan -- for instance declarations] [abs_ev_binds] :: HsBindLR idL idR -> [TcEvBinds] -- | Typechecked user bindings [abs_binds] :: HsBindLR idL idR -> LHsBinds idL [abs_sig] :: HsBindLR idL idR -> Bool -- |
-- f :: Num a => a -> a ---- -- After renaming, this list of Names contains the named wildcards -- brought into scope by this signature. For a signature _ -> _a -- -> Bool, the renamer will leave the unnamed wildcard -- _ untouched, and the named wildcard _a is then -- replaced with fresh meta vars in the type. Their names are stored in -- the type signature that brought them into scope, in this third field -- to be more specific. -- --
-- pattern Single :: () => (Show a) => a -> [a] ---- --
-- infixl 8 *** ---- --
-- {#- INLINE f #-}
--
--
--
-- {-# SPECIALISE f :: Int -> Int #-}
--
--
--
-- {-# SPECIALISE instance Eq [Int] #-}
--
--
-- (Class tys); should be a specialisation of the current instance
-- declaration
--
--
-- {-# MINIMAL a | (b, c | (d | e)) #-}
--
--
--
-- {-# SCC funName #-}
--
--
-- or
--
--
-- {-# SCC funName "cost_centre_name" #-}
--
SCCFunSig :: XSCCFunSig pass -> SourceText -> Located (IdP pass) -> Maybe (Located StringLiteral) -> Sig pass
-- | A complete match pragma
--
--
-- {-# COMPLETE C, D [:: T] #-}
--
--
-- Used to inform the pattern match checker about additional complete
-- matchings which, for example, arise from pattern synonym definitions.
CompleteMatchSig :: XCompleteMatchSig pass -> SourceText -> Located [Located (IdP pass)] -> Maybe (Located (IdP pass)) -> Sig pass
XSig :: XXSig pass -> Sig pass
-- | Located Fixity Signature
type LFixitySig pass = Located FixitySig pass
-- | Fixity Signature
data FixitySig pass
FixitySig :: XFixitySig pass -> [Located (IdP pass)] -> Fixity -> FixitySig pass
XFixitySig :: XXFixitySig pass -> FixitySig pass
-- | Type checker Specialisation Pragmas
--
-- TcSpecPrags conveys SPECIALISE pragmas from the type
-- checker to the desugarer
data TcSpecPrags
-- | Super-specialised: a default method should be macro-expanded at every
-- call site
IsDefaultMethod :: TcSpecPrags
SpecPrags :: [LTcSpecPrag] -> TcSpecPrags
-- | Located Type checker Specification Pragmas
type LTcSpecPrag = Located TcSpecPrag
-- | Type checker Specification Pragma
data TcSpecPrag
-- | The Id to be specialised, a wrapper that specialises the polymorphic
-- function, and inlining spec for the specialised function
SpecPrag :: Id -> HsWrapper -> InlinePragma -> TcSpecPrag
-- | Haskell Pattern Synonym Details
type HsPatSynDetails arg = HsConDetails arg [RecordPatSynField arg]
-- | Record Pattern Synonym Field
data RecordPatSynField a
RecordPatSynField :: a -> a -> RecordPatSynField a
[recordPatSynSelectorId] :: RecordPatSynField a -> a
[recordPatSynPatVar] :: RecordPatSynField a -> a
-- | Haskell Pattern Synonym Direction
data HsPatSynDir id
Unidirectional :: HsPatSynDir id
ImplicitBidirectional :: HsPatSynDir id
ExplicitBidirectional :: MatchGroup id (LHsExpr id) -> HsPatSynDir id
-- | Create a Coercion that wraps a value in an implicit-parameter
-- dictionary. See unwrapIP.
wrapIP :: 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.
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
-- | d |> co
evCast :: EvExpr -> TcCoercion -> EvTerm
evCoercion :: TcCoercion -> EvTerm
-- | Any sort of evidence Id, including coercions
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)
-- | Is the wrapper erasable, i.e., will not affect runtime semantics?
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
(<.>) :: HsWrapper -> HsWrapper -> HsWrapper
-- | If the EqRel is ReprEq, makes a SubCo; otherwise, does nothing. Note
-- that the input coercion should always be nominal.
maybeTcSubCo :: EqRel -> TcCoercion -> TcCoercion
tcCoToMCo :: TcCoercion -> TcMCoercion
-- | This version does a slow check, calculating the related types and
-- seeing if they are equal.
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
WpHole :: HsWrapper
WpCompose :: HsWrapper -> HsWrapper -> HsWrapper
WpFun :: HsWrapper -> HsWrapper -> TcType -> SDoc -> HsWrapper
WpCast :: TcCoercionR -> HsWrapper
WpEvLam :: EvVar -> HsWrapper
WpEvApp :: EvTerm -> HsWrapper
WpTyLam :: TyVar -> HsWrapper
WpTyApp :: KindOrType -> HsWrapper
WpLet :: TcEvBinds -> HsWrapper
data TcEvBinds
TcEvBinds :: EvBindsVar -> TcEvBinds
EvBinds :: Bag EvBind -> TcEvBinds
data EvBindsVar
EvBindsVar :: Unique -> IORef EvBindMap -> IORef CoVarSet -> EvBindsVar
[ebv_uniq] :: EvBindsVar -> Unique
[ebv_binds] :: EvBindsVar -> IORef EvBindMap
[ebv_tcvs] :: EvBindsVar -> IORef CoVarSet
CoEvBindsVar :: Unique -> IORef CoVarSet -> EvBindsVar
[ebv_uniq] :: EvBindsVar -> Unique
[ebv_tcvs] :: EvBindsVar -> IORef CoVarSet
newtype EvBindMap
EvBindMap :: DVarEnv EvBind -> EvBindMap
[ev_bind_varenv] :: EvBindMap -> DVarEnv EvBind
data EvBind
EvBind :: EvVar -> EvTerm -> Bool -> EvBind
[eb_lhs] :: EvBind -> EvVar
[eb_rhs] :: EvBind -> EvTerm
[eb_is_given] :: EvBind -> Bool
data EvTerm
EvExpr :: EvExpr -> EvTerm
EvTypeable :: Type -> EvTypeable -> EvTerm
EvFun :: [TyVar] -> [EvVar] -> TcEvBinds -> EvVar -> EvTerm
[et_tvs] :: EvTerm -> [TyVar]
[et_given] :: EvTerm -> [EvVar]
[et_binds] :: EvTerm -> TcEvBinds
[et_body] :: EvTerm -> EvVar
type EvExpr = CoreExpr
-- | Instructions on how to make a Typeable dictionary. See Note
-- [Typeable evidence terms]
data EvTypeable
-- | Dictionary for Typeable T where T is a type
-- constructor with all of its kind variables saturated. The
-- [EvTerm] is Typeable evidence for the applied
-- kinds..
EvTypeableTyCon :: TyCon -> [EvTerm] -> EvTypeable
-- | Dictionary for Typeable (s t), given a dictionaries for
-- s and t.
EvTypeableTyApp :: EvTerm -> EvTerm -> EvTypeable
-- | Dictionary for Typeable (s -> t), given a dictionaries for
-- s and t.
EvTypeableTrFun :: EvTerm -> EvTerm -> EvTypeable
-- | Dictionary for a type literal, e.g. Typeable "foo" or
-- Typeable 3 The EvTerm is evidence of, e.g.,
-- KnownNat 3 (see #10348)
EvTypeableTyLit :: EvTerm -> EvTypeable
-- | Evidence for CallStack implicit parameters.
data EvCallStack
EvCsEmpty :: EvCallStack
-- | EvCsPushCall name loc stk represents a call to name,
-- occurring at loc, in a calling context stk.
EvCsPushCall :: Name -> RealSrcSpan -> EvExpr -> EvCallStack
setLclEnvTcLevel :: TcLclEnv -> TcLevel -> TcLclEnv
getLclEnvTcLevel :: TcLclEnv -> TcLevel
setLclEnvLoc :: TcLclEnv -> RealSrcSpan -> TcLclEnv
getLclEnvLoc :: TcLclEnv -> RealSrcSpan
data TcLclEnv
TcLclEnv :: RealSrcSpan -> [ErrCtxt] -> TcLevel -> ThStage -> ThBindEnv -> ArrowCtxt -> LocalRdrEnv -> TcTypeEnv -> TcBinderStack -> TcRef WantedConstraints -> TcRef Messages -> TcLclEnv
[tcl_loc] :: TcLclEnv -> RealSrcSpan
[tcl_ctxt] :: TcLclEnv -> [ErrCtxt]
[tcl_tclvl] :: TcLclEnv -> TcLevel
[tcl_th_ctxt] :: TcLclEnv -> ThStage
[tcl_th_bndrs] :: TcLclEnv -> ThBindEnv
[tcl_arrow_ctxt] :: TcLclEnv -> ArrowCtxt
[tcl_rdr] :: TcLclEnv -> LocalRdrEnv
[tcl_env] :: TcLclEnv -> TcTypeEnv
[tcl_bndrs] :: TcLclEnv -> TcBinderStack
[tcl_lie] :: TcLclEnv -> TcRef WantedConstraints
[tcl_errs] :: TcLclEnv -> TcRef Messages
-- | parenthesizeHsContext p ctxt checks if ctxt
-- is a single constraint c such that
-- hsTypeNeedsParens p c is true, and if so, surrounds
-- c with an HsParTy to form a parenthesized
-- ctxt. Otherwise, it simply returns ctxt unchanged.
parenthesizeHsContext :: forall (p :: Pass). PprPrec -> LHsContext (GhcPass p) -> LHsContext (GhcPass p)
-- | parenthesizeHsType p ty checks if
-- hsTypeNeedsParens p ty is true, and if so, surrounds
-- ty with an HsParTy. Otherwise, it simply returns
-- ty.
parenthesizeHsType :: forall (p :: Pass). PprPrec -> LHsType (GhcPass p) -> LHsType (GhcPass p)
-- | hsTypeNeedsParens p t returns True if the type
-- t needs parentheses under precedence p.
hsTypeNeedsParens :: PprPrec -> HsType pass -> Bool
pprHsType :: forall (p :: Pass). OutputableBndrId p => HsType (GhcPass p) -> SDoc
pprConDeclFields :: forall (p :: Pass). OutputableBndrId p => [LConDeclField (GhcPass p)] -> SDoc
pprLHsContext :: forall (p :: Pass). OutputableBndrId p => LHsContext (GhcPass p) -> SDoc
-- | Version of pprHsForAll or pprHsForAllExtra that will
-- always print forall. when passed Just []. Prints
-- nothing if passed Nothing
pprHsExplicitForAll :: forall (p :: Pass). OutputableBndrId p => ForallVisFlag -> Maybe [LHsTyVarBndr (GhcPass p)] -> SDoc
-- | Version of pprHsForAll that can also print an extra-constraints
-- wildcard, e.g. _ => a -> Bool or (Show a, _) =>
-- a -> String. This underscore will be printed when the 'Maybe
-- SrcSpan' argument is a Just containing the location of the
-- extra-constraints wildcard. A special function for this is needed, as
-- the extra-constraints wildcard is removed from the actual context and
-- type, and stored in a separate field, thus just printing the type will
-- not print the extra-constraints wildcard.
pprHsForAllExtra :: forall (p :: Pass). OutputableBndrId p => Maybe SrcSpan -> ForallVisFlag -> [LHsTyVarBndr (GhcPass p)] -> LHsContext (GhcPass p) -> SDoc
-- | Prints a forall; When passed an empty list, prints forall
-- ./forall -> only when -dppr-debug is
-- enabled.
pprHsForAll :: forall (p :: Pass). OutputableBndrId p => ForallVisFlag -> [LHsTyVarBndr (GhcPass p)] -> LHsContext (GhcPass p) -> SDoc
pprAnonWildCard :: SDoc
ambiguousFieldOcc :: FieldOcc GhcTc -> AmbiguousFieldOcc GhcTc
unambiguousFieldOcc :: AmbiguousFieldOcc GhcTc -> FieldOcc GhcTc
selectorAmbiguousFieldOcc :: AmbiguousFieldOcc GhcTc -> Id
rdrNameAmbiguousFieldOcc :: forall (p :: Pass). AmbiguousFieldOcc (GhcPass p) -> RdrName
mkAmbiguousFieldOcc :: Located RdrName -> AmbiguousFieldOcc GhcPs
mkFieldOcc :: Located RdrName -> FieldOcc GhcPs
getLHsInstDeclClass_maybe :: forall (p :: Pass). LHsSigType (GhcPass p) -> Maybe (Located (IdP (GhcPass p)))
getLHsInstDeclHead :: forall (p :: Pass). LHsSigType (GhcPass p) -> LHsType (GhcPass p)
-- | Decompose a type class instance type (of the form forall
-- tvs. context => instance_head) into its constituent
-- parts.
--
-- Note that this function looks through parentheses, so it will work on
-- types such as (forall tvs. ...). The downside
-- to this is that it is not generally possible to take the returned
-- types and reconstruct the original type (parentheses and all) from
-- them.
splitLHsInstDeclTy :: LHsSigType GhcRn -> ([Name], LHsContext GhcRn, LHsType GhcRn)
-- | Decompose a type of the form context => body into its
-- constituent parts.
--
-- Note that this function looks through parentheses, so it will work on
-- types such as (context => ...). The downside to
-- this is that it is not generally possible to take the returned types
-- and reconstruct the original type (parentheses and all) from them.
splitLHsQualTy :: LHsType pass -> (LHsContext pass, LHsType pass)
-- | Decompose a type of the form forall tvs. body into its
-- constituent parts. Note that only invisible foralls
-- (i.e., forall a., with a dot) are split apart; visible
-- foralls (i.e., forall a ->, with an arrow) are
-- left untouched.
--
-- This function is used to split apart certain types, such as instance
-- declaration types, which disallow visible foralls. For
-- instance, if GHC split apart the forall in instance
-- forall a -> Show (Blah a), then that declaration would
-- mistakenly be accepted!
--
-- Note that this function looks through parentheses, so it will work on
-- types such as (forall a. ...). The downside to this is
-- that it is not generally possible to take the returned types and
-- reconstruct the original type (parentheses and all) from them.
splitLHsForAllTyInvis :: LHsType pass -> ([LHsTyVarBndr pass], LHsType pass)
-- | Decompose a sigma type (of the form forall tvs. context
-- => body) into its constituent parts. Note that only
-- invisible foralls (i.e., forall a., with a
-- dot) are split apart; visible foralls (i.e.,
-- forall a ->, with an arrow) are left untouched.
--
-- This function is used to split apart certain types, such as instance
-- declaration types, which disallow visible foralls. For
-- instance, if GHC split apart the forall in instance
-- forall a -> Show (Blah a), then that declaration would
-- mistakenly be accepted!
--
-- Note that this function looks through parentheses, so it will work on
-- types such as (forall a. ...). The downside to this is
-- that it is not generally possible to take the returned types and
-- reconstruct the original type (parentheses and all) from them.
splitLHsSigmaTyInvis :: LHsType pass -> ([LHsTyVarBndr pass], LHsContext pass, LHsType pass)
-- | Decompose a pattern synonym type signature into its constituent parts.
--
-- Note that this function looks through parentheses, so it will work on
-- types such as (forall a. ...). The downside to this is
-- that it is not generally possible to take the returned types and
-- reconstruct the original type (parentheses and all) from them.
splitLHsPatSynTy :: LHsType pass -> ([LHsTyVarBndr pass], LHsContext pass, [LHsTyVarBndr pass], LHsContext pass, LHsType pass)
numVisibleArgs :: [HsArg tm ty] -> Arity
hsTyGetAppHead_maybe :: forall (p :: Pass). LHsType (GhcPass p) -> Maybe (Located (IdP (GhcPass p)))
splitHsFunType :: LHsType GhcRn -> ([LHsType GhcRn], LHsType GhcRn)
mkHsAppKindTy :: forall (p :: Pass). XAppKindTy (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)
mkHsAppTys :: forall (p :: Pass). LHsType (GhcPass p) -> [LHsType (GhcPass p)] -> LHsType (GhcPass p)
mkHsAppTy :: forall (p :: Pass). LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)
mkHsOpTy :: forall (p :: Pass). LHsType (GhcPass p) -> Located (IdP (GhcPass p)) -> LHsType (GhcPass p) -> HsType (GhcPass p)
mkAnonWildCardTy :: HsType GhcPs
isLHsForAllTy :: LHsType p -> Bool
ignoreParens :: LHsType pass -> LHsType pass
-- | Get the kind signature of a type, ignoring parentheses:
--
-- hsTyKindSig `Maybe ` = Nothing hsTyKindSig `Maybe :: Type -> Type `
-- = Just `Type -> Type` hsTyKindSig `Maybe :: ((Type -> Type))` =
-- Just `Type -> Type`
--
-- This is used to extract the result kind of type synonyms with a CUSK:
--
-- type S = (F :: res_kind) ^^^^^^^^
hsTyKindSig :: LHsType pass -> Maybe (LHsKind pass)
-- | Convert a LHsTyVarBndrs to a list of types. Works on *type* variable
-- only, no kind vars.
hsLTyVarBndrsToTypes :: forall (p :: Pass). LHsQTyVars (GhcPass p) -> [LHsType (GhcPass p)]
-- | Convert a LHsTyVarBndr to an equivalent LHsType.
hsLTyVarBndrToType :: forall (p :: Pass). LHsTyVarBndr (GhcPass p) -> LHsType (GhcPass p)
hsLTyVarLocNames :: forall (p :: Pass). LHsQTyVars (GhcPass p) -> [Located (IdP (GhcPass p))]
hsLTyVarLocName :: forall (p :: Pass). LHsTyVarBndr (GhcPass p) -> Located (IdP (GhcPass p))
hsAllLTyVarNames :: LHsQTyVars GhcRn -> [Name]
hsExplicitLTyVarNames :: forall (p :: Pass). LHsQTyVars (GhcPass p) -> [IdP (GhcPass p)]
hsLTyVarNames :: forall (p :: Pass). [LHsTyVarBndr (GhcPass p)] -> [IdP (GhcPass p)]
hsLTyVarName :: forall (p :: Pass). LHsTyVarBndr (GhcPass p) -> IdP (GhcPass p)
hsTyVarName :: forall (p :: Pass). HsTyVarBndr (GhcPass p) -> IdP (GhcPass p)
hsScopedTvs :: LHsSigType GhcRn -> [Name]
hsWcScopedTvs :: LHsSigWcType GhcRn -> [Name]
hsConDetailsArgs :: HsConDetails (LHsType a) (Located [LConDeclField a]) -> [LHsType a]
-- | Do all type variables in this LHsQTyVars come with kind
-- annotations?
hsTvbAllKinded :: LHsQTyVars pass -> Bool
-- | Does this HsTyVarBndr come with an explicit kind annotation?
isHsKindedTyVar :: HsTyVarBndr pass -> Bool
hsIPNameFS :: HsIPName -> FastString
mkEmptyWildCardBndrs :: thing -> HsWildCardBndrs GhcRn thing
mkEmptyImplicitBndrs :: thing -> HsImplicitBndrs GhcRn thing
mkHsWildCardBndrs :: thing -> HsWildCardBndrs GhcPs thing
mkHsImplicitBndrs :: thing -> HsImplicitBndrs GhcPs thing
dropWildCards :: LHsSigWcType pass -> LHsSigType pass
hsSigWcType :: LHsSigWcType pass -> LHsType pass
hsSigType :: forall (p :: Pass). LHsSigType (GhcPass p) -> LHsType (GhcPass p)
hsImplicitBody :: forall (p :: Pass) thing. HsImplicitBndrs (GhcPass p) thing -> thing
isEmptyLHsQTvs :: LHsQTyVars GhcRn -> Bool
emptyLHsQTvs :: LHsQTyVars GhcRn
hsQTvExplicit :: LHsQTyVars pass -> [LHsTyVarBndr pass]
mkHsQTvs :: [LHsTyVarBndr GhcPs] -> LHsQTyVars GhcPs
noLHsContext :: LHsContext pass
getBangStrictness :: LHsType a -> HsSrcBang
getBangType :: LHsType a -> LHsType a
-- | Located Bang Type
type LBangType pass = Located BangType pass
-- | Bang Type
--
-- In the parser, strictness and packedness annotations bind more tightly
-- than docstrings. This means that when consuming a BangType (and
-- looking for HsBangTy) we must be ready to peer behind a
-- potential layer of HsDocTy. See #15206 for motivation and
-- getBangType for an example.
type BangType pass = HsType pass
-- | Located Haskell Context
type LHsContext pass = Located HsContext pass
-- | Haskell Context
type HsContext pass = [LHsType pass]
-- | Located Haskell Type
type LHsType pass = Located HsType pass
-- | Haskell Kind
type HsKind pass = HsType pass
-- | Located Haskell Kind
type LHsKind pass = Located HsKind pass
-- | Located Haskell Type Variable Binder
type LHsTyVarBndr pass = Located HsTyVarBndr pass
-- | Located Haskell Quantified Type Variables
data LHsQTyVars pass
HsQTvs :: XHsQTvs pass -> [LHsTyVarBndr pass] -> LHsQTyVars pass
[hsq_ext] :: LHsQTyVars pass -> XHsQTvs pass
[hsq_explicit] :: LHsQTyVars pass -> [LHsTyVarBndr pass]
XLHsQTyVars :: XXLHsQTyVars pass -> LHsQTyVars pass
-- | Haskell Implicit Binders
data HsImplicitBndrs pass thing
HsIB :: XHsIB pass thing -> thing -> HsImplicitBndrs pass thing
[hsib_ext] :: HsImplicitBndrs pass thing -> XHsIB pass thing
[hsib_body] :: HsImplicitBndrs pass thing -> thing
XHsImplicitBndrs :: XXHsImplicitBndrs pass thing -> HsImplicitBndrs pass thing
-- | Haskell Wildcard Binders
data HsWildCardBndrs pass thing
HsWC :: XHsWC pass thing -> thing -> HsWildCardBndrs pass thing
[hswc_ext] :: HsWildCardBndrs pass thing -> XHsWC pass thing
[hswc_body] :: HsWildCardBndrs pass thing -> thing
XHsWildCardBndrs :: XXHsWildCardBndrs pass thing -> HsWildCardBndrs pass thing
-- | Located Haskell Signature Type
type LHsSigType pass = HsImplicitBndrs pass LHsType pass
-- | Located Haskell Wildcard Type
type LHsWcType pass = HsWildCardBndrs pass LHsType pass
-- | Located Haskell Signature Wildcard Type
type LHsSigWcType pass = HsWildCardBndrs pass LHsSigType pass
-- | These names are used early on to store the names of implicit
-- parameters. They completely disappear after type-checking.
newtype HsIPName
HsIPName :: FastString -> HsIPName
-- | Haskell Type Variable Binder
data HsTyVarBndr pass
UserTyVar :: XUserTyVar pass -> Located (IdP pass) -> HsTyVarBndr pass
-- | -- (?x :: ty) ---- --
-- (ty :: kind) ---- --
-- data family T a -- data instance T (Maybe b) = MkT b ---- -- Where the instance tycon is :RTL, so: -- --
-- mkFamilyTyConApp :RTL Int = T (Maybe Int) --mkFamilyTyConApp :: TyCon -> [Type] -> Type -- | Add the kind variables free in the kinds of the tyvars in the given -- set. Returns a deterministic set. closeOverKindsDSet :: DTyVarSet -> DTyVarSet -- | Add the kind variables free in the kinds of the tyvars in the given -- set. Returns a deterministically ordered list. closeOverKindsList :: [TyVar] -> [TyVar] -- | 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. closeOverKindsFV :: [TyVar] -> FV -- | Add the kind variables free in the kinds of the tyvars in the given -- set. Returns a non-deterministic set. closeOverKinds :: TyVarSet -> TyVarSet -- | Extract a relevant type, if there is one. binderRelevantType_maybe :: TyCoBinder -> Maybe Type tyBinderType :: TyBinder -> Type tyCoBinderType :: TyCoBinder -> Type tyCoBinderVar_maybe :: TyCoBinder -> Maybe TyCoVar -- | Does this binder bind a variable that is not erased? Returns -- True for anonymous binders. isAnonTyCoBinder :: TyCoBinder -> Bool -- | Make an anonymous binder mkAnonBinder :: AnonArgFlag -> Type -> TyCoBinder isTauTy :: Type -> Bool -- | 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 AppTys. (See also #15792). appTyArgFlags :: Type -> [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. tyConArgFlags :: TyCon -> [Type] -> [ArgFlag] -- | Given a list of things paired with their visibilities, partition the -- things into (invisible things, visible things). partitionInvisibles :: [(a, ArgFlag)] -> ([a], [a]) -- | Given a TyCon and a list of argument types, filter out any -- Inferred arguments. filterOutInferredTypes :: TyCon -> [Type] -> [Type] -- | Given a TyCon and a list of argument types, filter out any -- invisible (i.e., Inferred or Specified) arguments. filterOutInvisibleTypes :: TyCon -> [Type] -> [Type] splitPiTysInvisibleN :: Int -> Type -> ([TyCoBinder], Type) splitPiTysInvisible :: Type -> ([TyCoBinder], Type) invisibleTyBndrCount :: Type -> Int -- | Like splitPiTys but split off only named binders and -- returns TyCoVarBinders rather than TyCoBinders splitForAllVarBndrs :: Type -> ([TyCoVarBinder], Type) -- | Split off all TyCoBinders to a type, splitting both proper foralls and -- functions splitPiTys :: Type -> ([TyCoBinder], Type) -- | Takes a forall type apart, or panics splitPiTy :: Type -> (TyCoBinder, Type) -- | Attempts to take a forall type apart; works with proper foralls and -- functions splitPiTy_maybe :: Type -> Maybe (TyCoBinder, Type) -- | Like splitForAllTy_maybe, but only returns Just if it is a covar -- binder. splitForAllTy_co_maybe :: Type -> Maybe (TyCoVar, Type) -- | Like splitForAllTy_maybe, but only returns Just if it is a tyvar -- binder. splitForAllTy_ty_maybe :: Type -> Maybe (TyCoVar, Type) -- | Attempts to take a forall type apart, but only if it's a proper -- forall, with a named binder splitForAllTy_maybe :: Type -> Maybe (TyCoVar, Type) -- | Drops all ForAllTys dropForAlls :: Type -> Type -- | Take a forall type apart, or panics if that is not possible. splitForAllTy :: Type -> (TyCoVar, Type) -- | Is this a function? isFunTy :: Type -> Bool -- | Is this a function or forall? isPiTy :: Type -> Bool -- | Like isForAllTy, but returns True only if it is a covar binder isForAllTy_co :: Type -> Bool -- | Like isForAllTy, but returns True only if it is a tyvar binder isForAllTy_ty :: Type -> Bool -- | Checks whether this is a proper forall (with a named binder) isForAllTy :: Type -> Bool -- | Like splitForAllTys, but only splits a ForAllTy if -- sameVis argf supplied_argf is True, where -- argf is the visibility of the ForAllTy's binder and -- supplied_argf is the visibility provided as an argument to -- this function. splitForAllTysSameVis :: ArgFlag -> 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. splitForAllTys :: Type -> ([TyCoVar], Type) -- | 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. mkTyConBindersPreferAnon :: [TyVar] -> TyCoVarSet -> [TyConBinder] -- | mkLamType for multiple type or value arguments mkLamTypes :: [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. mkLamType :: Var -> Type -> Type -- | Like mkForAllTys, but assumes all variables are dependent and visible mkVisForAllTys :: [TyVar] -> Type -> Type -- | Like mkForAllTys, but assumes all variables are dependent and -- Specified, a common case mkSpecForAllTys :: [TyVar] -> Type -> Type -- | Like mkForAllTy, but assumes the variable is dependent and -- Specified, a common case mkSpecForAllTy :: TyVar -> Type -> Type -- | Like mkTyCoInvForAllTys, but tvs should be a list of tyvar mkInvForAllTys :: [TyVar] -> Type -> Type -- | Like mkForAllTys, but assumes all variables are dependent and -- Inferred, a common case mkTyCoInvForAllTys :: [TyCoVar] -> Type -> Type -- | Like mkTyCoInvForAllTy, but tv should be a tyvar mkInvForAllTy :: TyVar -> Type -> Type -- | Make a dependent forall over an Inferred variable mkTyCoInvForAllTy :: TyCoVar -> Type -> Type stripCoercionTy :: Type -> Coercion isCoercionTy_maybe :: Type -> Maybe Coercion mkCoercionTy :: Coercion -> 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. discardCast :: Type -> Type tyConBindersTyCoBinders :: [TyConBinder] -> [TyCoBinder] splitCastTy_maybe :: Type -> Maybe (Type, Coercion) -- | 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. newTyConInstRhs :: TyCon -> [Type] -> Type nextRole :: Type -> Role -- | Attempts to tease a list type apart and gives the type of the elements -- if successful (looks through type synonyms) splitListTyConApp_maybe :: Type -> Maybe 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 repSplitTyConApp_maybe :: HasDebugCallStack => 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. tcSplitTyConApp_maybe :: HasCallStack => 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. Panics if -- that is not possible. See also splitTyConApp_maybe splitTyConApp :: Type -> (TyCon, [Type]) tyConAppArgN :: Int -> Type -> Type tyConAppArgs :: Type -> [Type] -- | The same as snd . splitTyConApp tyConAppArgs_maybe :: Type -> Maybe [Type] tyConAppTyCon :: Type -> TyCon -- | The same as fst . splitTyConApp tyConAppTyCon_maybe :: Type -> Maybe TyCon -- | Retrieve the tycon heading this type, if there is one. Does not -- look through synonyms. tyConAppTyConPicky_maybe :: Type -> Maybe TyCon -- | A key function: builds a TyConApp or FunTy as -- appropriate to its arguments. Applies its arguments to the constructor -- from left to right. mkTyConApp :: TyCon -> [Type] -> Type applyTysX :: [TyVar] -> 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 undefineds type. piResultTys :: HasDebugCallStack => Type -> [Type] -> 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 funArgTy :: Type -> Type -- | Extract the function result type and panic if that is not possible funResultTy :: Type -> Type splitFunTys :: Type -> ([Type], Type) -- | Attempts to extract the argument and result types from a type splitFunTy_maybe :: Type -> Maybe (Type, Type) -- | Attempts to extract the argument and result types from a type, and -- panics if that is not possible. See also splitFunTy_maybe splitFunTy :: Type -> (Type, Type) -- | Render a type corresponding to a user type error into a SDoc. pprUserTypeErrorTy :: Type -> SDoc -- | Is this type a custom user error? If so, give us the kind and the -- error message. userTypeError_maybe :: Type -> Maybe Type -- | Is this a type literal (symbol or numeric). isLitTy :: Type -> Maybe TyLit -- | Is this a symbol literal. We also look through type synonyms. isStrLitTy :: Type -> Maybe FastString mkStrLitTy :: FastString -> Type -- | Is this a numeric literal. We also look through type synonyms. isNumLitTy :: Type -> Maybe Integer mkNumLitTy :: Integer -> Type -- | Like splitAppTys, but doesn't look through type synonyms repSplitAppTys :: HasDebugCallStack => Type -> (Type, [Type]) -- | Recursively splits a type as far as is possible, leaving a residual -- type being applied to and the type arguments applied to it. Never -- fails, even if that means returning an empty list of type -- applications. splitAppTys :: Type -> (Type, [Type]) -- | Attempts to take a type application apart, as in -- splitAppTy_maybe, and panics if this is not possible splitAppTy :: Type -> (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) tcRepSplitAppTy_maybe :: Type -> Maybe (Type, Type) -- | Does the AppTy split as in splitAppTy_maybe, but assumes that -- any Core view stuff is already done repSplitAppTy_maybe :: HasDebugCallStack => Type -> Maybe (Type, Type) -- | Attempt to take a type application apart, whether it is a function, -- type constructor, or plain type application. Note that type family -- applications are NEVER unsaturated by this! splitAppTy_maybe :: Type -> Maybe (Type, Type) mkAppTys :: Type -> [Type] -> Type -- | Attempts to obtain the type variable underlying a Type, without -- any expansion repGetTyVar_maybe :: Type -> Maybe TyVar -- | 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 getCastedTyVar_maybe :: Type -> Maybe (TyVar, CoercionN) -- | Attempts to obtain the type variable underlying a Type getTyVar_maybe :: Type -> Maybe TyVar isTyVarTy :: Type -> Bool -- | 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 getTyVar :: String -> Type -> TyVar mapCoercion :: Monad m => TyCoMapper env m -> env -> Coercion -> m Coercion mapType :: Monad m => TyCoMapper env m -> env -> Type -> m Type -- | Is a tyvar of type RuntimeRep? isRuntimeRepVar :: TyVar -> Bool isUnliftedRuntimeRep :: Type -> 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. isUnliftedTypeKind :: Kind -> Bool isLiftedRuntimeRep :: Type -> Bool -- | 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_maybe :: HasDebugCallStack => Kind -> Maybe 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 kindRep :: HasDebugCallStack => Kind -> 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 expandTypeSynonyms :: Type -> Type -- | This describes how a "map" operation over a type/coercion should -- behave data TyCoMapper env (m :: Type -> Type) TyCoMapper :: (env -> TyVar -> m Type) -> (env -> CoVar -> m Coercion) -> (env -> CoercionHole -> m Coercion) -> (env -> TyCoVar -> ArgFlag -> m (env, TyCoVar)) -> (TyCon -> m TyCon) -> TyCoMapper env (m :: Type -> Type) [tcm_tyvar] :: TyCoMapper env (m :: Type -> Type) -> env -> TyVar -> m Type [tcm_covar] :: TyCoMapper env (m :: Type -> Type) -> env -> CoVar -> m Coercion -- | What to do with coercion holes. See Note [Coercion holes] in TyCoRep. [tcm_hole] :: TyCoMapper env (m :: Type -> Type) -> env -> CoercionHole -> m Coercion -- | The returned env is used in the extended scope [tcm_tycobinder] :: TyCoMapper env (m :: Type -> Type) -> env -> TyCoVar -> ArgFlag -> m (env, TyCoVar) -- | This is used only for TcTyCons a) To zonk TcTyCons b) To turn TcTyCons -- into TyCons. See Note [Type checking recursive type and class -- declarations] in TcTyClsDecls [tcm_tycon] :: TyCoMapper env (m :: Type -> Type) -> TyCon -> m TyCon 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) -- | 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. substCoUnchecked :: TCvSubst -> Coercion -> Coercion lookupTyVar :: TCvSubst -> TyVar -> Maybe Type substTyVars :: TCvSubst -> [TyVar] -> [Type] substTyVar :: TCvSubst -> TyVar -> Type -- | 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. substThetaUnchecked :: TCvSubst -> ThetaType -> ThetaType -- | Substitute within a ThetaType The substitution has to satisfy -- the invariants described in Note [The substitution invariant]. substTheta :: HasCallStack => TCvSubst -> ThetaType -> ThetaType -- | Substitute within several Types 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. substTysUnchecked :: TCvSubst -> [Type] -> [Type] -- | Substitute within several Types The substitution has to satisfy -- the invariants described in Note [The substitution invariant]. substTys :: HasCallStack => 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. substTyUnchecked :: TCvSubst -> Type -> Type -- | Substitute within a Type The substitution has to satisfy the -- invariants described in Note [The substitution invariant]. substTy :: HasCallStack => 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]. substTyAddInScope :: TCvSubst -> Type -> Type -- | Type substitution, see zipTvSubst substTysWith :: [TyVar] -> [Type] -> [Type] -> [Type] -- | 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. substCoWithUnchecked :: [TyVar] -> [Type] -> Coercion -> Coercion -- | 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. substTyWithUnchecked :: [TyVar] -> [Type] -> Type -> Type -- | Type substitution, see zipTvSubst substTyWith :: HasCallStack => [TyVar] -> [Type] -> Type -> Type zipCoEnv :: HasDebugCallStack => [CoVar] -> [Coercion] -> CvSubstEnv zipTyEnv :: HasDebugCallStack => [TyVar] -> [Type] -> TvSubstEnv -- | Generates the in-scope set for the TCvSubst from the types in -- the incoming environment. No CoVars, please! mkTvSubstPrs :: [(TyVar, Type)] -> TCvSubst zipTCvSubst :: HasDebugCallStack => [TyCoVar] -> [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 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 -- | Returns the free variables of the types in the range of a substitution -- as a non-deterministic set. getTCvSubstRangeFVs :: TCvSubst -> VarSet getTCvInScope :: TCvSubst -> InScopeSet getTvSubstEnv :: TCvSubst -> TvSubstEnv mkTCvSubst :: InScopeSet -> (TvSubstEnv, CvSubstEnv) -> TCvSubst isEmptyTCvSubst :: TCvSubst -> Bool mkEmptyTCvSubst :: InScopeSet -> TCvSubst emptyTCvSubst :: TCvSubst -- | Composes two substitutions, applying the second one provided first, -- like in function composition. composeTCvSubst :: TCvSubst -> TCvSubst -> TCvSubst -- | (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 composeTCvSubstEnv :: InScopeSet -> (TvSubstEnv, CvSubstEnv) -> (TvSubstEnv, CvSubstEnv) -> (TvSubstEnv, CvSubstEnv) emptyTvSubstEnv :: TvSubstEnv -- | Type & coercion substitution -- -- The following invariants must hold of a TCvSubst: -- --
-- (->) :: forall (rep1 :: RuntimeRep) (rep2 :: RuntimeRep). -- TYPE rep1 -> TYPE rep2 -> * --funTyCon :: TyCon typeSize :: Type -> Int -- | Create the plain type constructor type which has been applied to no -- type arguments at all. mkTyConTy :: TyCon -> Type mkPiTys :: [TyCoBinder] -> Type -> Type mkPiTy :: TyCoBinder -> Type -> Type -- | Wraps foralls over the type using the provided TyCoVars from -- left to right mkForAllTys :: [TyCoVarBinder] -> Type -> Type -- | Make nested arrow types mkInvisFunTys :: [Type] -> Type -> Type -- | Make nested arrow types mkVisFunTys :: [Type] -> Type -> Type mkInvisFunTy :: Type -> Type -> Type infixr 3 `mkInvisFunTy` mkVisFunTy :: Type -> Type -> Type infixr 3 `mkVisFunTy` mkTyVarTys :: [TyVar] -> [Type] mkTyVarTy :: TyVar -> Type isNamedBinder :: TyCoBinder -> Bool -- | Does this binder bind a visible argument? isVisibleBinder :: TyCoBinder -> Bool -- | Does this binder bind an invisible argument? isInvisibleBinder :: TyCoBinder -> Bool -- | The key representation of types within the compiler type KindOrType = Type -- | A type labeled KnotTied might have knot-tied tycons in it. See -- Note [Type checking recursive type and class declarations] in -- TcTyClsDecls type KnotTied ty = ty -- | A coercion to be filled in by the type-checker. See Note [Coercion -- holes] data CoercionHole isPredTy :: HasDebugCallStack => Type -> Bool isCoercionTy :: Type -> Bool -- | Applies a type to another, as in e.g. k a mkAppTy :: Type -> Type -> 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 mkCastTy :: Type -> Coercion -> Type piResultTy :: HasDebugCallStack => Type -> Type -> Type -- | Type equality on source types. Does not look through newtypes -- or PredTypes, 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. eqType :: Type -> Type -> Bool -- | 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 coreView :: 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] tcView :: Type -> Maybe Type -- | Is this the type RuntimeRep? isRuntimeRepTy :: Type -> 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] isLiftedTypeKind :: Kind -> Bool -- | Attempts to tease a type apart into a type constructor and the -- application of a number of arguments to that constructor splitTyConApp_maybe :: HasDebugCallStack => Type -> Maybe (TyCon, [Type]) -- | Given a TyCon and a list of argument types, partition the -- arguments into: -- --
-- syn_res_wrap $ syn_expr (syn_arg_wraps[0] arg0) -- (syn_arg_wraps[1] arg1) ... ---- -- where the actual arguments come from elsewhere in the AST. This could -- be defined using GhcPass p and such, but it's harder to get -- it all to work out that way. (noSyntaxExpr is hard to write, -- for example.) data SyntaxExpr p SyntaxExpr :: HsExpr p -> [HsWrapper] -> HsWrapper -> SyntaxExpr p [syn_expr] :: SyntaxExpr p -> HsExpr p [syn_arg_wraps] :: SyntaxExpr p -> [HsWrapper] [syn_res_wrap] :: SyntaxExpr p -> HsWrapper -- | Located Haskell Expression type LHsExpr p = Located HsExpr p -- | Pattern -- --
-- f :: (Eq a) => a -> Int
-- g :: (?x :: Int -> Int) => a -> Int
-- h :: (r\l) => {r} => {l::Int | r}
--
--
-- Here the Eq a and ?x :: Int -> Int and
-- rl are all called "predicates"
type PredType = Type
-- | The key type representing kinds in the compiler.
type Kind = Type
-- | A collection of PredTypes
type ThetaType = [PredType]
-- | 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
data ArgFlag
Inferred :: ArgFlag
Specified :: ArgFlag
Required :: ArgFlag
-- | The non-dependent version of ArgFlag.
data AnonArgFlag
-- | Used for (->): an ordinary non-dependent arrow. The
-- argument is visible in source code.
VisArg :: AnonArgFlag
-- | Used for (=>): a non-dependent predicate arrow. The
-- argument is invisible in source code.
InvisArg :: AnonArgFlag
-- | Variable
--
-- Essentially a typed Name, that may also contain some additional
-- information about the Var and its use sites.
data Var
-- | Perform a computation with an altered environment
updEnv :: (env -> env') -> IOEnv env' a -> IOEnv env a
-- | Perform a computation with a different environment
setEnv :: env' -> IOEnv env' a -> IOEnv env a
getEnv :: IOEnv env env
-- | 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'.
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 :: IOEnvFailure
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
-- | Derive a name for the representation type constructor of a
-- data/newtype instance.
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
-- | 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.
isTypeableBindOcc :: OccName -> Bool
isDefaultMethodOcc :: OccName -> Bool
-- | Test for definitions internally generated by GHC. This predicte is
-- used to suppress printing of internal definitions in some debug prints
isDerivedOccName :: OccName -> Bool
-- | Haskell 98 encourages compilers to suppress warnings about unsed names
-- in a pattern if they start with _: this implements that test
startsWithUnderscore :: OccName -> Bool
-- | Wrap parens around an operator
parenSymOcc :: OccName -> SDoc -> SDoc
-- | Test if the OccName is that for any operator (whether it is a
-- data constructor or variable or whatever)
isSymOcc :: OccName -> Bool
-- | Test if the OccName is a data constructor that starts with a
-- symbol (e.g. :, or [])
isDataSymOcc :: OccName -> Bool
isDataOcc :: OccName -> Bool
-- | Value OccNamess are those that are either in the
-- variable or data constructor namespaces
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
varName :: NameSpace
tvName :: NameSpace
srcDataName :: NameSpace
dataName :: NameSpace
tcClsName :: NameSpace
clsName :: NameSpace
tcName :: NameSpace
data NameSpace
-- | Other names in the compiler add additional information to an OccName.
-- This class provides a consistent way to access the underlying OccName.
class HasOccName name
occName :: HasOccName name => name -> OccName
data OccEnv a
type OccSet = UniqSet OccName
type TidyOccEnv = UniqFM Int
-- | An empty FilesToClean
emptyFilesToClean :: FilesToClean
isBmi2Enabled :: DynFlags -> Bool
isBmiEnabled :: DynFlags -> Bool
isAvx512pfEnabled :: DynFlags -> Bool
isAvx512fEnabled :: DynFlags -> Bool
isAvx512erEnabled :: DynFlags -> Bool
isAvx512cdEnabled :: DynFlags -> Bool
isAvx2Enabled :: DynFlags -> Bool
isAvxEnabled :: DynFlags -> Bool
isSse4_2Enabled :: DynFlags -> Bool
isSse2Enabled :: DynFlags -> Bool
isSseEnabled :: DynFlags -> Bool
setUnsafeGlobalDynFlags :: DynFlags -> IO ()
-- | Resolve any internal inconsistencies in a set of DynFlags.
-- Returns the consistent DynFlags as well as a list of warnings
-- to report to the user.
makeDynFlagsConsistent :: DynFlags -> (DynFlags, [Located String])
tARGET_MAX_WORD :: DynFlags -> Integer
tARGET_MAX_INT :: DynFlags -> Integer
tARGET_MIN_INT :: DynFlags -> Integer
mAX_PTR_TAG :: DynFlags -> Int
tAG_MASK :: DynFlags -> Int
wordAlignment :: DynFlags -> Alignment
wORD_SIZE_IN_BITS :: DynFlags -> Int
bLOCK_SIZE_W :: DynFlags -> Int
iLDV_STATE_USE :: DynFlags -> Integer
iLDV_STATE_CREATE :: DynFlags -> Integer
iLDV_CREATE_MASK :: DynFlags -> Integer
lDV_SHIFT :: DynFlags -> Int
dYNAMIC_BY_DEFAULT :: DynFlags -> Bool
wORDS_BIGENDIAN :: DynFlags -> Bool
tAG_BITS :: DynFlags -> Int
bITMAP_BITS_SHIFT :: DynFlags -> Int
cLONG_LONG_SIZE :: DynFlags -> Int
cLONG_SIZE :: DynFlags -> Int
cINT_SIZE :: DynFlags -> Int
dOUBLE_SIZE :: DynFlags -> Int
wORD_SIZE :: DynFlags -> Int
aP_STACK_SPLIM :: DynFlags -> Int
rESERVED_STACK_WORDS :: DynFlags -> Int
rESERVED_C_STACK_BYTES :: DynFlags -> Int
mAX_Real_Long_REG :: DynFlags -> Int
mAX_Real_XMM_REG :: DynFlags -> Int
mAX_Real_Double_REG :: DynFlags -> Int
mAX_Real_Float_REG :: DynFlags -> Int
mAX_Real_Vanilla_REG :: DynFlags -> Int
mAX_XMM_REG :: DynFlags -> Int
mAX_Long_REG :: DynFlags -> Int
mAX_Double_REG :: DynFlags -> Int
mAX_Float_REG :: DynFlags -> Int
mAX_Vanilla_REG :: DynFlags -> Int
mUT_ARR_PTRS_CARD_BITS :: DynFlags -> Int
mAX_CHARLIKE :: DynFlags -> Int
mIN_CHARLIKE :: DynFlags -> Int
mAX_INTLIKE :: DynFlags -> Int
mIN_INTLIKE :: DynFlags -> Int
mIN_PAYLOAD_SIZE :: DynFlags -> Int
mAX_SPEC_AP_SIZE :: DynFlags -> Int
mAX_SPEC_SELECTEE_SIZE :: DynFlags -> Int
oFFSET_StgFunInfoExtraRev_arity :: DynFlags -> Int
sIZEOF_StgFunInfoExtraRev :: DynFlags -> Int
oFFSET_StgFunInfoExtraFwd_arity :: DynFlags -> Int
oFFSET_StgUpdateFrame_updatee :: DynFlags -> Int
oFFSET_StgStack_stack :: DynFlags -> Int
oFFSET_StgStack_sp :: DynFlags -> Int
oFFSET_StgTSO_stackobj :: DynFlags -> Int
oFFSET_StgTSO_cccs :: DynFlags -> Int
oFFSET_StgTSO_alloc_limit :: DynFlags -> Int
oFFSET_StgArrBytes_bytes :: DynFlags -> Int
sIZEOF_StgArrBytes_NoHdr :: DynFlags -> Int
oFFSET_StgSmallMutArrPtrs_ptrs :: DynFlags -> Int
sIZEOF_StgSmallMutArrPtrs_NoHdr :: DynFlags -> Int
oFFSET_StgMutArrPtrs_size :: DynFlags -> Int
oFFSET_StgMutArrPtrs_ptrs :: DynFlags -> Int
sIZEOF_StgMutArrPtrs_NoHdr :: DynFlags -> Int
sIZEOF_StgUpdateFrame_NoHdr :: DynFlags -> Int
oFFSET_StgEntCounter_entry_count :: DynFlags -> Int
oFFSET_StgEntCounter_link :: DynFlags -> Int
oFFSET_StgEntCounter_registeredp :: DynFlags -> Int
oFFSET_StgEntCounter_allocd :: DynFlags -> Int
oFFSET_StgEntCounter_allocs :: DynFlags -> Int
sIZEOF_StgSMPThunkHeader :: DynFlags -> Int
oFFSET_StgHeader_ldvw :: DynFlags -> Int
oFFSET_StgHeader_ccs :: DynFlags -> Int
oFFSET_CostCentreStack_scc_count :: DynFlags -> Int
oFFSET_CostCentreStack_mem_alloc :: DynFlags -> Int
sIZEOF_CostCentreStack :: DynFlags -> Int
oFFSET_bdescr_flags :: DynFlags -> Int
oFFSET_bdescr_blocks :: DynFlags -> Int
oFFSET_bdescr_free :: DynFlags -> Int
oFFSET_bdescr_start :: DynFlags -> Int
oFFSET_Capability_r :: DynFlags -> Int
oFFSET_stgGCFun :: DynFlags -> Int
oFFSET_stgGCEnter1 :: DynFlags -> Int
oFFSET_stgEagerBlackholeInfo :: DynFlags -> Int
oFFSET_StgRegTable_rHpAlloc :: DynFlags -> Int
oFFSET_StgRegTable_rCurrentNursery :: DynFlags -> Int
oFFSET_StgRegTable_rCurrentTSO :: DynFlags -> Int
oFFSET_StgRegTable_rCCCS :: DynFlags -> Int
oFFSET_StgRegTable_rHpLim :: DynFlags -> Int
oFFSET_StgRegTable_rHp :: DynFlags -> Int
oFFSET_StgRegTable_rSpLim :: DynFlags -> Int
oFFSET_StgRegTable_rSp :: DynFlags -> Int
oFFSET_StgRegTable_rL1 :: DynFlags -> Int
oFFSET_StgRegTable_rZMM6 :: DynFlags -> Int
oFFSET_StgRegTable_rZMM5 :: DynFlags -> Int
oFFSET_StgRegTable_rZMM4 :: DynFlags -> Int
oFFSET_StgRegTable_rZMM3 :: DynFlags -> Int
oFFSET_StgRegTable_rZMM2 :: DynFlags -> Int
oFFSET_StgRegTable_rZMM1 :: DynFlags -> Int
oFFSET_StgRegTable_rYMM6 :: DynFlags -> Int
oFFSET_StgRegTable_rYMM5 :: DynFlags -> Int
oFFSET_StgRegTable_rYMM4 :: DynFlags -> Int
oFFSET_StgRegTable_rYMM3 :: DynFlags -> Int
oFFSET_StgRegTable_rYMM2 :: DynFlags -> Int
oFFSET_StgRegTable_rYMM1 :: DynFlags -> Int
oFFSET_StgRegTable_rXMM6 :: DynFlags -> Int
oFFSET_StgRegTable_rXMM5 :: DynFlags -> Int
oFFSET_StgRegTable_rXMM4 :: DynFlags -> Int
oFFSET_StgRegTable_rXMM3 :: DynFlags -> Int
oFFSET_StgRegTable_rXMM2 :: DynFlags -> Int
oFFSET_StgRegTable_rXMM1 :: DynFlags -> Int
oFFSET_StgRegTable_rD6 :: DynFlags -> Int
oFFSET_StgRegTable_rD5 :: DynFlags -> Int
oFFSET_StgRegTable_rD4 :: DynFlags -> Int
oFFSET_StgRegTable_rD3 :: DynFlags -> Int
oFFSET_StgRegTable_rD2 :: DynFlags -> Int
oFFSET_StgRegTable_rD1 :: DynFlags -> Int
oFFSET_StgRegTable_rF6 :: DynFlags -> Int
oFFSET_StgRegTable_rF5 :: DynFlags -> Int
oFFSET_StgRegTable_rF4 :: DynFlags -> Int
oFFSET_StgRegTable_rF3 :: DynFlags -> Int
oFFSET_StgRegTable_rF2 :: DynFlags -> Int
oFFSET_StgRegTable_rF1 :: DynFlags -> Int
oFFSET_StgRegTable_rR10 :: DynFlags -> Int
oFFSET_StgRegTable_rR9 :: DynFlags -> Int
oFFSET_StgRegTable_rR8 :: DynFlags -> Int
oFFSET_StgRegTable_rR7 :: DynFlags -> Int
oFFSET_StgRegTable_rR6 :: DynFlags -> Int
oFFSET_StgRegTable_rR5 :: DynFlags -> Int
oFFSET_StgRegTable_rR4 :: DynFlags -> Int
oFFSET_StgRegTable_rR3 :: DynFlags -> Int
oFFSET_StgRegTable_rR2 :: DynFlags -> Int
oFFSET_StgRegTable_rR1 :: DynFlags -> Int
tICKY_BIN_COUNT :: DynFlags -> Int
bLOCKS_PER_MBLOCK :: DynFlags -> Int
bLOCK_SIZE :: DynFlags -> Int
pROF_HDR_SIZE :: DynFlags -> Int
sTD_HDR_SIZE :: DynFlags -> Int
cONTROL_GROUP_CONST_291 :: DynFlags -> Int
compilerInfo :: DynFlags -> [(String, String)]
picPOpts :: DynFlags -> [String]
picCCOpts :: DynFlags -> [String]
setTmpDir :: FilePath -> DynFlags -> DynFlags
setFlagsFromEnvFile :: FilePath -> String -> DynP ()
canonicalizeModuleIfHome :: DynFlags -> Module -> Module
-- | Given a ModuleName of a signature in the home library, find out
-- how it is instantiated. E.g., the canonical form of A in
-- p[A=q[]:A] is q[]:A.
canonicalizeHomeModule :: DynFlags -> ModuleName -> Module
setUnitId :: String -> DynFlags -> DynFlags
unSetGeneralFlag' :: GeneralFlag -> DynFlags -> DynFlags
setGeneralFlag' :: GeneralFlag -> DynFlags -> DynFlags
addWay' :: Way -> DynFlags -> DynFlags
dynamicGhc :: Bool
-- | Was the runtime system built with profiling enabled?
rtsIsProfiled :: Bool
glasgowExtsFlags :: [Extension]
-- | Warning group hierarchies, where there is an explicit inclusion
-- relation.
--
-- Each inner list is a hierarchy of warning groups, ordered from
-- smallest to largest, where each group is a superset of the one before
-- it.
--
-- Separating this from warningGroups allows for multiple
-- hierarchies with no inherent relation to be defined.
--
-- The special-case Weverything group is not included.
warningHierarchies :: [[String]]
-- | Warning groups.
--
-- As all warnings are in the Weverything set, it is ignored when
-- displaying to the user which group a warning is in.
warningGroups :: [(String, [WarningFlag])]
-- | These -Xblah flags can all be reversed with -XNoblah
xFlags :: [FlagSpec Extension]
supportedLanguagesAndExtensions :: PlatformMini -> [String]
-- | These -f<blah> flags can all be reversed with
-- -fno-<blah>
fLangFlags :: [FlagSpec Extension]
-- | These -f<blah> flags can all be reversed with
-- -fno-<blah>
fFlags :: [FlagSpec GeneralFlag]
-- | These -W<blah> flags can all be reversed with
-- -Wno-<blah>
wWarningFlags :: [FlagSpec WarningFlag]
-- | Make a list of flags for shell completion. Filter all available flags
-- into two groups, for interactive GHC vs all other.
flagsForCompletion :: Bool -> [String]
flagsPackage :: [Flag (CmdLineP DynFlags)]
flagsDynamic :: [Flag (CmdLineP DynFlags)]
flagsAll :: [Flag (CmdLineP DynFlags)]
-- | All dynamic flags option strings without the deprecated ones. These
-- are the user facing strings for enabling and disabling options.
allNonDeprecatedFlags :: [String]
updateWays :: DynFlags -> DynFlags
-- | Write an error or warning to the LogOutput.
putLogMsg :: DynFlags -> WarnReason -> Severity -> SrcSpan -> PprStyle -> MsgDoc -> IO ()
-- | Parses the dynamically set flags for GHC. This is the most general
-- form of the dynamic flag parser that the other methods simply wrap. It
-- allows saying which flags are valid flags and indicating if we are
-- parsing arguments from the command line or from a file pragma.
parseDynamicFlagsFull :: MonadIO m => [Flag (CmdLineP DynFlags)] -> Bool -> DynFlags -> [Located String] -> m (DynFlags, [Located String], [Warn])
-- | 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.
parseDynamicFilePragma :: MonadIO m => DynFlags -> [Located String] -> m (DynFlags, [Located String], [Warn])
-- | 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).
parseDynamicFlagsCmdLine :: MonadIO m => DynFlags -> [Located String] -> m (DynFlags, [Located String], [Warn])
-- | Sets the DynFlags to be appropriate to the optimisation level
updOptLevel :: Int -> DynFlags -> DynFlags
addPluginModuleName :: String -> DynFlags -> DynFlags
thisPackage :: DynFlags -> UnitId
thisUnitIdInsts :: DynFlags -> [(ModuleName, Module)]
thisComponentId :: DynFlags -> ComponentId
-- | Gets the verbosity flag for the current verbosity level. This is fed
-- to other tools, so GHC-specific verbosity flags like
-- -ddump-most are not included
getVerbFlags :: DynFlags -> [String]
-- | Retrieve the options corresponding to a particular opt_*
-- field in the correct order
getOpts :: DynFlags -> (DynFlags -> [a]) -> [a]
-- | A list of unsafe flags under Safe Haskell. Tuple elements are: * name
-- of the flag * function to get srcspan that enabled the flag * function
-- to test if the flag is on * function to turn the flag off
unsafeFlagsForInfer :: [(String, DynFlags -> SrcSpan, DynFlags -> Bool, DynFlags -> DynFlags)]
-- | A list of unsafe flags under Safe Haskell. Tuple elements are: * name
-- of the flag * function to get srcspan that enabled the flag * function
-- to test if the flag is on * function to turn the flag off
unsafeFlags :: [(String, DynFlags -> SrcSpan, DynFlags -> Bool, DynFlags -> DynFlags)]
-- | Are all implicit imports required to be safe for this Safe Haskell
-- mode? Implicit imports are things in the prelude. e.g System.IO when
-- print is used.
safeImplicitImpsReq :: DynFlags -> Bool
-- | Are all direct imports required to be safe for this Safe Haskell mode?
-- Direct imports are when the code explicitly imports a module
safeDirectImpsReq :: DynFlags -> Bool
-- | Test if Safe Imports are on in some form
safeImportsOn :: DynFlags -> Bool
-- | Is the Safe Haskell safe inference mode active
safeInferOn :: DynFlags -> Bool
-- | Is the Safe Haskell safe language in use
safeLanguageOn :: DynFlags -> Bool
safeHaskellModeEnabled :: DynFlags -> Bool
-- | Is Safe Haskell on in some way (including inference mode)
safeHaskellOn :: DynFlags -> Bool
-- | Is the -fpackage-trust mode on
packageTrustOn :: DynFlags -> Bool
-- | Some modules have dependencies on others through the DynFlags rather
-- than textual imports
dynFlagDependencies :: DynFlags -> [ModuleName]
lang_set :: DynFlags -> Maybe Language -> DynFlags
-- | Set or unset a Extension, unless it has been explicitly set or
-- unset before.
xopt_set_unlessExplSpec :: Extension -> (DynFlags -> Extension -> DynFlags) -> DynFlags -> DynFlags
-- | Unset a Extension
xopt_unset :: DynFlags -> Extension -> DynFlags
-- | Set a Extension
xopt_set :: DynFlags -> Extension -> DynFlags
-- | Test whether a Extension is set
xopt :: Extension -> DynFlags -> Bool
-- | Mark a WarningFlag as not fatal
wopt_unset_fatal :: DynFlags -> WarningFlag -> DynFlags
-- | Mark a WarningFlag as fatal (do not set the flag)
wopt_set_fatal :: DynFlags -> WarningFlag -> DynFlags
-- | Test whether a WarningFlag is set as fatal
wopt_fatal :: WarningFlag -> DynFlags -> Bool
-- | Unset a WarningFlag
wopt_unset :: DynFlags -> WarningFlag -> DynFlags
-- | Set a WarningFlag
wopt_set :: DynFlags -> WarningFlag -> DynFlags
-- | Test whether a WarningFlag is set
wopt :: WarningFlag -> DynFlags -> Bool
-- | Unset a GeneralFlag
gopt_unset :: DynFlags -> GeneralFlag -> DynFlags
-- | Set a GeneralFlag
gopt_set :: DynFlags -> GeneralFlag -> DynFlags
-- | Test whether a GeneralFlag is set
gopt :: GeneralFlag -> DynFlags -> Bool
-- | Unset a DumpFlag
dopt_unset :: DynFlags -> DumpFlag -> DynFlags
-- | Set a DumpFlag
dopt_set :: DynFlags -> DumpFlag -> DynFlags
-- | Test whether a DumpFlag is set
dopt :: DumpFlag -> DynFlags -> Bool
hasNoOptCoercion :: DynFlags -> Bool
hasNoStateHack :: DynFlags -> Bool
-- | The language extensions implied by the various language variants. When
-- updating this be sure to update the flag documentation in
-- docsusers-guideglasgow_exts.rst.
languageExtensions :: Maybe Language -> [Extension]
defaultFlushErr :: FlushErr
defaultFlushOut :: FlushOut
defaultLogActionHPutStrDoc :: DynFlags -> Handle -> SDoc -> PprStyle -> IO ()
-- | Like defaultLogActionHPutStrDoc but appends an extra newline.
defaultLogActionHPrintDoc :: DynFlags -> Handle -> SDoc -> PprStyle -> IO ()
defaultLogAction :: LogAction
defaultFatalMessager :: FatalMessager
interpreterDynamic :: DynFlags -> Bool
interpreterProfiled :: DynFlags -> Bool
interpWays :: [Way]
defaultWays :: Settings -> [Way]
-- | The normal DynFlags. Note that they are not suitable for use in
-- this form and must be fully initialized by runGhc first.
defaultDynFlags :: Settings -> LlvmConfig -> DynFlags
-- | Used by runGhc to partially initialize a new DynFlags
-- value
initDynFlags :: DynFlags -> IO DynFlags
-- | Compute the path of the dynamic object corresponding to an object
-- file.
dynamicOutputFile :: DynFlags -> FilePath -> FilePath
dynamicTooMkDynamicDynFlags :: DynFlags -> DynFlags
whenCannotGenerateDynamicToo :: MonadIO m => DynFlags -> m () -> m ()
ifGeneratingDynamicToo :: MonadIO m => DynFlags -> m a -> m a -> m a
whenGeneratingDynamicToo :: MonadIO m => DynFlags -> m () -> m ()
wayUnsetGeneralFlags :: Platform -> Way -> [GeneralFlag]
wayGeneralFlags :: Platform -> Way -> [GeneralFlag]
wayRTSOnly :: Way -> Bool
mkBuildTag :: [Way] -> String
-- | Are we building with -fPIE or -fPIC enabled?
positionIndependent :: DynFlags -> Bool
defaultObjectTarget :: DynFlags -> HscTarget
packageFlagsChanged :: DynFlags -> DynFlags -> Bool
isNoLink :: GhcLink -> Bool
isOneShot :: GhcMode -> Bool
-- | Does this target retain *all* top-level bindings for a module, rather
-- than just the exported bindings, in the TypeEnv and compiled code (if
-- any)? In interpreted mode we do this, so that GHCi can call functions
-- inside a module. In HscNothing mode we also do it, so that Haddock can
-- get access to the GlobalRdrEnv for a module after typechecking it.
targetRetainsAllBindings :: HscTarget -> Bool
-- | Will this target result in an object file on the disk?
isObjectTarget :: HscTarget -> Bool
versionedFilePath :: DynFlags -> FilePath
-- | The directory for this version of ghc in the user's app directory
-- (typically something like ~.ghcx86_64-linux-7.6.3)
versionedAppDir :: DynFlags -> MaybeT IO FilePath
tablesNextToCode :: DynFlags -> Bool
opt_i :: DynFlags -> [String]
opt_lc :: DynFlags -> [String]
opt_lo :: DynFlags -> [String]
opt_lcc :: DynFlags -> [String]
opt_windres :: DynFlags -> [String]
opt_lm :: DynFlags -> [String]
opt_l :: DynFlags -> [String]
opt_a :: DynFlags -> [String]
opt_cxx :: DynFlags -> [String]
opt_c :: DynFlags -> [String]
opt_F :: DynFlags -> [String]
opt_P_signature :: DynFlags -> ([String], Fingerprint)
opt_P :: DynFlags -> [String]
opt_L :: DynFlags -> [String]
pgm_i :: DynFlags -> String
pgm_lc :: DynFlags -> (String, [Option])
pgm_lo :: DynFlags -> (String, [Option])
pgm_ranlib :: DynFlags -> String
pgm_ar :: DynFlags -> String
pgm_lcc :: DynFlags -> (String, [Option])
pgm_libtool :: DynFlags -> String
pgm_windres :: DynFlags -> String
pgm_T :: DynFlags -> String
pgm_dll :: DynFlags -> (String, [Option])
pgm_lm :: DynFlags -> (String, [Option])
pgm_l :: DynFlags -> (String, [Option])
pgm_a :: DynFlags -> (String, [Option])
pgm_c :: DynFlags -> String
pgm_F :: DynFlags -> String
pgm_P :: DynFlags -> (String, [Option])
pgm_L :: DynFlags -> String
systemPackageConfig :: DynFlags -> FilePath
extraGccViaCFlags :: DynFlags -> [String]
tmpDir :: DynFlags -> String
topDir :: DynFlags -> FilePath
ghciUsagePath :: DynFlags -> FilePath
ghcUsagePath :: DynFlags -> FilePath
projectVersion :: DynFlags -> String
programName :: DynFlags -> String
-- | "unbuild" a Settings from a DynFlags. This shouldn't be
-- needed in the vast majority of code. But GHCi questionably uses this
-- to produce a default DynFlags from which to compute a flags
-- diff for printing.
settings :: DynFlags -> Settings
backendMaintainsCfg :: DynFlags -> Bool
-- | Concatenate and flatten the list of global and quoted includes
-- returning just a flat list of paths.
flattenIncludes :: IncludeSpecs -> [String]
-- | Append to the list of includes a path that shall be included using
-- `-iquote` when the C compiler is called. These paths only apply when
-- quoted includes are used. e.g. #include "foo.h"
addQuoteInclude :: IncludeSpecs -> [String] -> IncludeSpecs
-- | Append to the list of includes a path that shall be included using
-- `-I` when the C compiler is called. These paths override system search
-- paths.
addGlobalInclude :: IncludeSpecs -> [String] -> IncludeSpecs
optimisationFlags :: EnumSet GeneralFlag
-- | 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.
data WarnReason
NoReason :: WarnReason
-- | Warning was enabled with the flag
Reason :: !WarningFlag -> WarnReason
-- | Warning was made an error because of -Werror or -Werror=WarningFlag
ErrReason :: !Maybe WarningFlag -> WarnReason
-- | Used to differentiate the scope an include needs to apply to. We have
-- to split the include paths to avoid accidentally forcing recursive
-- includes since -I overrides the system search paths. See #14312.
data IncludeSpecs
IncludeSpecs :: [String] -> [String] -> IncludeSpecs
[includePathsQuote] :: IncludeSpecs -> [String]
[includePathsGlobal] :: IncludeSpecs -> [String]
data WarningFlag
Opt_WarnDuplicateExports :: WarningFlag
Opt_WarnDuplicateConstraints :: WarningFlag
Opt_WarnRedundantConstraints :: WarningFlag
Opt_WarnHiShadows :: WarningFlag
Opt_WarnImplicitPrelude :: WarningFlag
Opt_WarnIncompletePatterns :: WarningFlag
Opt_WarnIncompleteUniPatterns :: WarningFlag
Opt_WarnIncompletePatternsRecUpd :: WarningFlag
Opt_WarnOverflowedLiterals :: WarningFlag
Opt_WarnEmptyEnumerations :: WarningFlag
Opt_WarnMissingFields :: WarningFlag
Opt_WarnMissingImportList :: WarningFlag
Opt_WarnMissingMethods :: WarningFlag
Opt_WarnMissingSignatures :: WarningFlag
Opt_WarnMissingLocalSignatures :: WarningFlag
Opt_WarnNameShadowing :: WarningFlag
Opt_WarnOverlappingPatterns :: WarningFlag
Opt_WarnTypeDefaults :: WarningFlag
Opt_WarnMonomorphism :: WarningFlag
Opt_WarnUnusedTopBinds :: WarningFlag
Opt_WarnUnusedLocalBinds :: WarningFlag
Opt_WarnUnusedPatternBinds :: WarningFlag
Opt_WarnUnusedImports :: WarningFlag
Opt_WarnUnusedMatches :: WarningFlag
Opt_WarnUnusedTypePatterns :: WarningFlag
Opt_WarnUnusedForalls :: WarningFlag
Opt_WarnUnusedRecordWildcards :: WarningFlag
Opt_WarnRedundantRecordWildcards :: WarningFlag
Opt_WarnWarningsDeprecations :: WarningFlag
Opt_WarnDeprecatedFlags :: WarningFlag
Opt_WarnMissingMonadFailInstances :: WarningFlag
Opt_WarnSemigroup :: WarningFlag
Opt_WarnDodgyExports :: WarningFlag
Opt_WarnDodgyImports :: WarningFlag
Opt_WarnOrphans :: WarningFlag
Opt_WarnAutoOrphans :: WarningFlag
Opt_WarnIdentities :: WarningFlag
Opt_WarnTabs :: WarningFlag
Opt_WarnUnrecognisedPragmas :: WarningFlag
Opt_WarnDodgyForeignImports :: WarningFlag
Opt_WarnUnusedDoBind :: WarningFlag
Opt_WarnWrongDoBind :: WarningFlag
Opt_WarnAlternativeLayoutRuleTransitional :: WarningFlag
Opt_WarnUnsafe :: WarningFlag
Opt_WarnSafe :: WarningFlag
Opt_WarnTrustworthySafe :: WarningFlag
Opt_WarnMissedSpecs :: WarningFlag
Opt_WarnAllMissedSpecs :: WarningFlag
Opt_WarnUnsupportedCallingConventions :: WarningFlag
Opt_WarnUnsupportedLlvmVersion :: WarningFlag
Opt_WarnMissedExtraSharedLib :: WarningFlag
Opt_WarnInlineRuleShadowing :: WarningFlag
Opt_WarnTypedHoles :: WarningFlag
Opt_WarnPartialTypeSignatures :: WarningFlag
Opt_WarnMissingExportedSignatures :: WarningFlag
Opt_WarnUntickedPromotedConstructors :: WarningFlag
Opt_WarnDerivingTypeable :: WarningFlag
Opt_WarnDeferredTypeErrors :: WarningFlag
Opt_WarnDeferredOutOfScopeVariables :: WarningFlag
Opt_WarnNonCanonicalMonadInstances :: WarningFlag
Opt_WarnNonCanonicalMonadFailInstances :: WarningFlag
Opt_WarnNonCanonicalMonoidInstances :: WarningFlag
Opt_WarnMissingPatternSynonymSignatures :: WarningFlag
Opt_WarnUnrecognisedWarningFlags :: WarningFlag
Opt_WarnSimplifiableClassConstraints :: WarningFlag
Opt_WarnCPPUndef :: WarningFlag
Opt_WarnUnbangedStrictPatterns :: WarningFlag
Opt_WarnMissingHomeModules :: WarningFlag
Opt_WarnPartialFields :: WarningFlag
Opt_WarnMissingExportList :: WarningFlag
Opt_WarnInaccessibleCode :: WarningFlag
Opt_WarnStarIsType :: WarningFlag
Opt_WarnStarBinder :: WarningFlag
Opt_WarnImplicitKindVars :: WarningFlag
Opt_WarnSpaceAfterBang :: WarningFlag
Opt_WarnMissingDerivingStrategies :: WarningFlag
Opt_WarnPrepositiveQualifiedModule :: WarningFlag
Opt_WarnUnusedPackages :: WarningFlag
Opt_WarnInferredSafeImports :: WarningFlag
Opt_WarnMissingSafeHaskellMode :: WarningFlag
Opt_WarnCompatUnqualifiedImports :: WarningFlag
Opt_WarnDerivingDefaults :: WarningFlag
data Language
Haskell98 :: Language
Haskell2010 :: Language
-- | The various Safe Haskell modes
data SafeHaskellMode
-- | inferred unsafe
Sf_None :: SafeHaskellMode
-- | declared and checked
Sf_Unsafe :: SafeHaskellMode
-- | declared and checked
Sf_Trustworthy :: SafeHaskellMode
-- | declared and checked
Sf_Safe :: SafeHaskellMode
-- | inferred as safe
Sf_SafeInferred :: SafeHaskellMode
-- | -fno-safe-haskell state
Sf_Ignore :: SafeHaskellMode
-- | Edge weights to use when generating a CFG from CMM
data CfgWeights
CFGWeights :: Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> CfgWeights
[uncondWeight] :: CfgWeights -> Int
[condBranchWeight] :: CfgWeights -> Int
[switchWeight] :: CfgWeights -> Int
[callWeight] :: CfgWeights -> Int
[likelyCondWeight] :: CfgWeights -> Int
[unlikelyCondWeight] :: CfgWeights -> Int
[infoTablePenalty] :: CfgWeights -> Int
[backEdgeBonus] :: CfgWeights -> Int
class HasDynFlags (m :: Type -> Type)
getDynFlags :: HasDynFlags m => m DynFlags
class ContainsDynFlags t
extractDynFlags :: ContainsDynFlags t => t -> DynFlags
data ProfAuto
-- | no SCC annotations added
NoProfAuto :: ProfAuto
-- | top-level and nested functions are annotated
ProfAutoAll :: ProfAuto
-- | top-level functions annotated only
ProfAutoTop :: ProfAuto
-- | exported functions annotated only
ProfAutoExports :: ProfAuto
-- | annotate call-sites
ProfAutoCalls :: ProfAuto
data LlvmTarget
LlvmTarget :: String -> String -> [String] -> LlvmTarget
[lDataLayout] :: LlvmTarget -> String
[lCPU] :: LlvmTarget -> String
[lAttributes] :: LlvmTarget -> [String]
-- | See Note [LLVM Configuration] in SysTools.
data LlvmConfig
LlvmConfig :: [(String, LlvmTarget)] -> [(Int, String)] -> LlvmConfig
[llvmTargets] :: LlvmConfig -> [(String, LlvmTarget)]
[llvmPasses] :: LlvmConfig -> [(Int, String)]
-- | The target code type of the compilation (if any).
--
-- Whenever you change the target, also make sure to set ghcLink
-- to something sensible.
--
-- HscNothing can be used to avoid generating any output, however,
-- note that:
--
-- -- ghc -c Foo.hs --OneShot :: GhcMode -- | ghc -M, see Finder for why we need this MkDepend :: GhcMode -- | What to do in the link step, if there is one. data GhcLink -- | Don't link at all NoLink :: GhcLink -- | Link object code into a binary LinkBinary :: GhcLink -- | Use the in-memory dynamic linker (works for both bytecode and object -- code). LinkInMemory :: GhcLink -- | Link objects into a dynamic lib (DLL on Windows, DSO on ELF platforms) LinkDynLib :: GhcLink -- | Link objects into a static lib LinkStaticLib :: GhcLink -- | We accept flags which make packages visible, but how they select the -- package varies; this data type reflects what selection criterion is -- used. data PackageArg -- | -package, by PackageName PackageArg :: String -> PackageArg -- | -package-id, by UnitId UnitIdArg :: UnitId -> PackageArg -- | 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: -- --
-- -ignore-package --IgnorePackage :: String -> IgnorePackageFlag -- | Flags for manipulating package trust. data TrustFlag -- |
-- -trust --TrustPackage :: String -> TrustFlag -- |
-- -distrust --DistrustPackage :: String -> TrustFlag -- | Flags for manipulating packages visibility. data PackageFlag -- | -package, -package-id ExposePackage :: String -> PackageArg -> ModRenaming -> PackageFlag -- |
-- -hide-package --HidePackage :: String -> PackageFlag data PackageDBFlag PackageDB :: PkgConfRef -> PackageDBFlag NoUserPackageDB :: PackageDBFlag NoGlobalPackageDB :: PackageDBFlag ClearPackageDBs :: PackageDBFlag data DynLibLoader Deployable :: DynLibLoader SystemDependent :: DynLibLoader data RtsOptsEnabled RtsOptsNone :: RtsOptsEnabled RtsOptsIgnore :: RtsOptsEnabled RtsOptsIgnoreAll :: RtsOptsEnabled RtsOptsSafeOnly :: RtsOptsEnabled RtsOptsAll :: RtsOptsEnabled data Way WayCustom :: String -> Way WayThreaded :: Way WayDebug :: Way WayProf :: Way WayEventLog :: Way WayDyn :: Way type FatalMessager = String -> IO () type LogAction = DynFlags -> WarnReason -> Severity -> SrcSpan -> PprStyle -> MsgDoc -> IO () newtype FlushOut FlushOut :: IO () -> FlushOut newtype FlushErr FlushErr :: IO () -> FlushErr data FlagSpec flag FlagSpec :: String -> flag -> (TurnOnFlag -> DynP ()) -> GhcFlagMode -> FlagSpec flag -- | Flag in string form [flagSpecName] :: FlagSpec flag -> String -- | Flag in internal form [flagSpecFlag] :: FlagSpec flag -> flag -- | Extra action to run when the flag is found Typically, emit a warning -- or error [flagSpecAction] :: FlagSpec flag -> TurnOnFlag -> DynP () -- | In which ghc mode the flag has effect [flagSpecGhcMode] :: FlagSpec flag -> GhcFlagMode data PkgConfRef GlobalPkgConf :: PkgConfRef UserPkgConf :: PkgConfRef PkgConfFile :: FilePath -> PkgConfRef data LinkerInfo GnuLD :: [Option] -> LinkerInfo GnuGold :: [Option] -> LinkerInfo LlvmLLD :: [Option] -> LinkerInfo DarwinLD :: [Option] -> LinkerInfo SolarisLD :: [Option] -> LinkerInfo AixLD :: [Option] -> LinkerInfo UnknownLD :: LinkerInfo data CompilerInfo GCC :: CompilerInfo Clang :: CompilerInfo AppleClang :: CompilerInfo AppleClang51 :: CompilerInfo UnknownCC :: CompilerInfo -- | A collection of files that must be deleted before ghc exits. The -- current collection is stored in an IORef in DynFlags, -- filesToClean. data FilesToClean FilesToClean :: !Set FilePath -> !Set FilePath -> FilesToClean -- | Files that will be deleted at the end of runGhc(T) [ftcGhcSession] :: FilesToClean -> !Set FilePath -- | Files that will be deleted the next time -- cleanCurrentModuleTempFiles is called, or otherwise at the end -- of the session. [ftcCurrentModule] :: FilesToClean -> !Set FilePath bagToList :: Bag a -> [a] listToBag :: [a] -> Bag a mapAccumBagLM :: Monad m => (acc -> x -> m (acc, y)) -> acc -> Bag x -> m (acc, Bag y) mapAccumBagL :: (acc -> x -> (acc, y)) -> acc -> Bag x -> (acc, Bag y) mapAndUnzipBagM :: Monad m => (a -> m (b, c)) -> Bag a -> m (Bag b, Bag c) flatMapBagPairM :: Monad m => (a -> m (Bag b, Bag c)) -> Bag a -> m (Bag b, Bag c) flatMapBagM :: Monad m => (a -> m (Bag b)) -> Bag a -> m (Bag b) mapBagM_ :: Monad m => (a -> m b) -> Bag a -> m () mapBagM :: Monad m => (a -> m b) -> Bag a -> m (Bag b) mapMaybeBag :: (a -> Maybe b) -> Bag a -> Bag b concatMapBagPair :: (a -> (Bag b, Bag c)) -> Bag a -> (Bag b, Bag c) concatMapBag :: (a -> Bag b) -> Bag a -> Bag b mapBag :: (a -> b) -> Bag a -> Bag b foldBag :: (r -> r -> r) -> (a -> r) -> r -> Bag a -> r partitionBagWith :: (a -> Either b c) -> Bag a -> (Bag b, Bag c) partitionBag :: (a -> Bool) -> Bag a -> (Bag a, Bag a) catBagMaybes :: Bag (Maybe a) -> Bag a concatBag :: Bag (Bag a) -> Bag a anyBagM :: Monad m => (a -> m Bool) -> Bag a -> m Bool anyBag :: (a -> Bool) -> Bag a -> Bool allBag :: (a -> Bool) -> Bag a -> Bool filterBagM :: Monad m => (a -> m Bool) -> Bag a -> m (Bag a) filterBag :: (a -> Bool) -> Bag a -> Bag a isSingletonBag :: Bag a -> Bool isEmptyBag :: Bag a -> Bool snocBag :: Bag a -> a -> Bag a infixl 3 `snocBag` consBag :: a -> Bag a -> Bag a infixr 3 `consBag` unionBags :: Bag a -> Bag a -> Bag a unionManyBags :: [Bag a] -> Bag a elemBag :: Eq a => a -> Bag a -> Bool lengthBag :: Bag a -> Int unitBag :: a -> Bag a emptyBag :: Bag a data Bag a mAIN :: Module liftedTypeKindTyConKey :: Unique 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 -- | 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. 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 -- | See splitModuleInsts. splitUnitIdInsts :: UnitId -> (InstalledUnitId, Maybe IndefUnitId) -- | 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. splitModuleInsts :: Module -> (InstalledModule, Maybe IndefModule) -- | Like 'renameHoleUnitId, but requires only PackageConfigMap so -- it can be used by Packages. renameHoleUnitId' :: PackageConfigMap -> ShHoleSubst -> UnitId -> UnitId -- | Like renameHoleModule, but requires only -- PackageConfigMap so it can be used by Packages. renameHoleModule' :: PackageConfigMap -> ShHoleSubst -> Module -> Module -- | Substitutes holes in a UnitId, suitable for renaming when an -- include occurs; see Note [Representation of module/name variable]. -- -- p[A=A] maps to p[A=B] with -- A=B. renameHoleUnitId :: DynFlags -> ShHoleSubst -> UnitId -> UnitId -- | Substitutes holes in a Module. NOT suitable for being called -- directly on a nameModule, see Note [Representation of -- module/name variable]. p[A=A]:B maps to -- p[A=q():A]:B with A=q():A; similarly, -- A maps to q():A. renameHoleModule :: DynFlags -> ShHoleSubst -> Module -> Module stringToUnitId :: String -> UnitId -- | Create a new simple unit identifier from a FastString. -- Internally, this is primarily used to specify wired-in unit -- identifiers. fsToUnitId :: FastString -> UnitId -- | Create a new simple unit identifier (no holes) from a -- ComponentId. newSimpleUnitId :: ComponentId -> UnitId -- | Compares package ids lexically, rather than by their Uniques stableUnitIdCmp :: UnitId -> UnitId -> Ordering -- | Create a new, un-hashed unit identifier. newUnitId :: ComponentId -> [(ModuleName, Module)] -> UnitId -- | 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. hashUnitId :: ComponentId -> [(ModuleName, Module)] -> FastString -- | A UnitId is definite if it has no free holes. unitIdIsDefinite :: UnitId -> Bool -- | Retrieve the set of free holes of a UnitId. 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 -- | Test if a UnitId corresponds to a given InstalledUnitId, -- modulo instantiation. installedUnitIdEq :: InstalledUnitId -> UnitId -> Bool -- | Test if a Module corresponds to a given InstalledModule, -- modulo instantiation. installedModuleEq :: InstalledModule -> Module -> Bool stringToInstalledUnitId :: String -> InstalledUnitId componentIdToInstalledUnitId :: ComponentId -> InstalledUnitId fsToInstalledUnitId :: FastString -> InstalledUnitId installedUnitIdString :: InstalledUnitId -> String -- | Lossy conversion to the on-disk InstalledUnitId for a -- component. toInstalledUnitId :: UnitId -> InstalledUnitId -- | Injects an IndefModule to Module (see also -- indefUnitIdToUnitId. indefModuleToModule :: DynFlags -> IndefModule -> Module -- | Injects an IndefUnitId (indefinite library which was on-the-fly -- instantiated) to a UnitId (either an indefinite or definite -- library). indefUnitIdToUnitId :: DynFlags -> IndefUnitId -> UnitId -- | Create a new IndefUnitId given an explicit module substitution. newIndefUnitId :: ComponentId -> [(ModuleName, Module)] -> IndefUnitId unitIdKey :: UnitId -> Unique unitIdFS :: UnitId -> FastString pprModule :: Module -> SDoc mkModule :: UnitId -> ModuleName -> Module -- | This gives a stable ordering, as opposed to the Ord instance which -- gives an ordering based on the Uniques of the components, which -- may not be stable from run to run of the compiler. stableModuleCmp :: Module -> Module -> Ordering -- | Create a module variable at some ModuleName. See Note -- [Representation of module/name variables] mkHoleModule :: ModuleName -> Module -- | A Module is definite if it has no free holes. moduleIsDefinite :: Module -> Bool -- | 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. moduleFreeHoles :: Module -> UniqDSet ModuleName -- | Returns the string version of the module name, with dots replaced by -- colons. moduleNameColons :: ModuleName -> String -- | Returns the string version of the module name, with dots replaced by -- slashes. moduleNameSlashes :: ModuleName -> String mkModuleNameFS :: FastString -> ModuleName mkModuleName :: String -> ModuleName -- | Get a string representation of a Module that's unique and -- stable across recompilations. eg. -- "$aeson_70dylHtv1FFGeai1IoxcQr$Data.Aeson.Types.Internal" moduleStableString :: Module -> String moduleNameString :: ModuleName -> String moduleNameFS :: ModuleName -> FastString pprModuleName :: ModuleName -> SDoc -- | Compares module names lexically, rather than by their Uniques stableModuleNameCmp :: ModuleName -> ModuleName -> Ordering -- | Add the -boot suffix to all output file paths associated with -- the module, not including the input file itself addBootSuffixLocnOut :: ModLocation -> ModLocation -- | Add the -boot suffix to all file paths associated with the -- module addBootSuffixLocn :: ModLocation -> ModLocation -- | Add the -boot suffix if the Bool argument is -- True addBootSuffix_maybe :: Bool -> FilePath -> FilePath -- | Add the -boot suffix to .hs, .hi and .o files addBootSuffix :: FilePath -> FilePath -- | Module Location -- -- Where a module lives on the file system: the actual locations of the -- .hs, .hi and .o files, if we have them data ModLocation ModLocation :: Maybe FilePath -> FilePath -> FilePath -> FilePath -> ModLocation [ml_hs_file] :: ModLocation -> Maybe FilePath [ml_hi_file] :: ModLocation -> FilePath [ml_obj_file] :: ModLocation -> FilePath [ml_hie_file] :: ModLocation -> FilePath class ContainsModule t extractModule :: ContainsModule t => t -> Module class HasModule (m :: Type -> Type) getModule :: HasModule m => m Module -- | 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). data IndefUnitId IndefUnitId :: FastString -> Unique -> !ComponentId -> ![(ModuleName, Module)] -> UniqDSet ModuleName -> IndefUnitId -- | A private, uniquely identifying representation of a UnitId. This -- string is completely private to GHC and is just used to get a unique; -- in particular, we don't use it for symbols (indefinite libraries are -- not compiled). [indefUnitIdFS] :: IndefUnitId -> FastString -- | Cached unique of unitIdFS. [indefUnitIdKey] :: IndefUnitId -> Unique -- | The component identity of the indefinite library that is being -- instantiated. [indefUnitIdComponentId] :: IndefUnitId -> !ComponentId -- | The sorted (by ModuleName) instantiations of this library. [indefUnitIdInsts] :: IndefUnitId -> ![(ModuleName, Module)] -- | A cache of the free module variables of unitIdInsts. This -- lets us efficiently tell if a UnitId has been fully -- instantiated (free module variables are empty) and whether or not a -- substitution can have any effect. [indefUnitIdFreeHoles] :: IndefUnitId -> UniqDSet ModuleName data IndefModule IndefModule :: IndefUnitId -> ModuleName -> IndefModule [indefModuleUnitId] :: IndefModule -> IndefUnitId [indefModuleName] :: IndefModule -> ModuleName -- | A InstalledModule is a Module which contains a -- InstalledUnitId. data InstalledModule InstalledModule :: !InstalledUnitId -> !ModuleName -> InstalledModule [installedModuleUnitId] :: InstalledModule -> !InstalledUnitId [installedModuleName] :: InstalledModule -> !ModuleName -- | A DefUnitId is an InstalledUnitId with the invariant -- that it only refers to a definite library; i.e., one we have generated -- code for. newtype DefUnitId DefUnitId :: InstalledUnitId -> DefUnitId [unDefUnitId] :: DefUnitId -> InstalledUnitId -- | A map keyed off of InstalledModule data InstalledModuleEnv elt -- | Substitution on module variables, mapping module names to module -- identifiers. type ShHoleSubst = ModuleNameEnv Module -- | A map keyed off of Modules data ModuleEnv elt -- | A set of Modules type ModuleSet = Set NDModule -- | A map keyed off of ModuleNames (actually, their Uniques) type ModuleNameEnv elt = UniqFM elt -- | A map keyed off of ModuleNames (actually, their Uniques) -- Has deterministic folds and can be deterministically converted to a -- list type DModuleNameEnv elt = UniqDFM elt mkFsEnv :: [(FastString, a)] -> FastStringEnv a lookupFsEnv :: FastStringEnv a -> FastString -> Maybe a extendFsEnv :: FastStringEnv a -> FastString -> a -> FastStringEnv a emptyFsEnv :: FastStringEnv 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. type FastStringEnv a = UniqFM a -- | Run the UniqSM action, discarding the final UniqSupply initUs_ :: UniqSupply -> UniqSM a -> a -- | Run the UniqSM action, returning the final UniqSupply initUs :: UniqSupply -> UniqSM a -> (a, UniqSupply) -- | Obtain the Unique from this particular UniqSupply, and a -- new supply takeUniqFromSupply :: UniqSupply -> (Unique, UniqSupply) -- | Obtain an infinite list of Unique that can be generated by -- constant splitting of the supply uniqsFromSupply :: UniqSupply -> [Unique] -- | Obtain the Unique from this particular UniqSupply uniqFromSupply :: UniqSupply -> Unique -- | Create an infinite list of UniqSupply from a single one listSplitUniqSupply :: UniqSupply -> [UniqSupply] -- | Build two UniqSupply from a single one, each of which can -- supply its own Unique. splitUniqSupply :: UniqSupply -> (UniqSupply, UniqSupply) -- | Create a unique supply out of thin air. The character given must be -- distinct from those of all calls to this function in the compiler for -- the values generated to be truly unique. mkSplitUniqSupply :: Char -> IO UniqSupply uniqFromMask :: Char -> IO Unique initUniqSupply :: Int -> Int -> IO () -- | Unique Supply -- -- A value of type UniqSupply is unique, and it can supply -- one distinct Unique. Also, from the supply, one can also -- manufacture an arbitrary number of further UniqueSupply -- values, which will be distinct from the first and from all others. data UniqSupply -- | A monad which just gives the ability to obtain Uniques data UniqSM result -- | A monad for generating unique identifiers class Monad m => MonadUnique (m :: Type -> Type) -- | Get a new UniqueSupply getUniqueSupplyM :: MonadUnique m => m UniqSupply -- | Get a new unique identifier getUniqueM :: MonadUnique m => m Unique -- | Get an infinite list of new unique identifiers getUniquesM :: MonadUnique m => m [Unique] hasKey :: Uniquable a => a -> Unique -> Bool -- | Unique identifier. -- -- The type of unique identifiers that are used in many places in GHC for -- fast ordering and equality tests. You should generate these with the -- functions from the UniqSupply module -- -- These are sometimes also referred to as "keys" in comments in GHC. data Unique -- | Class of things that we can obtain a Unique from class Uniquable a getUnique :: Uniquable a => a -> Unique isKindLevel :: TypeOrKind -> Bool isTypeLevel :: TypeOrKind -> Bool -- | Inject any integer into an IntWithInf mkIntWithInf :: Int -> IntWithInf -- | Turn a positive number into an IntWithInf, where 0 represents -- infinity treatZeroAsInf :: Int -> IntWithInf intGtLimit :: Int -> IntWithInf -> Bool -- | A representation of infinity 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 -- | Special combinator for showing string literals. 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 -- | Pretty print an alternative in an unboxed sum e.g. "| a | |". 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 -- | It is always safe to assume that an Id has no lambda-bound -- variable information noOneShotInfo :: OneShotInfo alignmentOf :: Int -> Alignment mkAlignment :: Int -> Alignment -- | Tags are allocated from here for real constructors or for superclass -- selectors fIRST_TAG :: ConTag pickLR :: LeftOrRight -> (a, a) -> a data LeftOrRight CLeft :: LeftOrRight CRight :: LeftOrRight -- | 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 type Arity = Int -- | Representation Arity -- -- The number of represented arguments that can be applied to a value -- before it does "real work". So: fib 100 has representation arity 0 x -- -> fib x has representation arity 1 () -> fib (x + y) has -- representation arity 2 type RepArity = Int -- | 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. type JoinArity = Int -- | Constructor Tag -- -- Type of the tags associated with each constructor possibility or -- superclass selector type ConTag = Int -- | A *zero-indexed* constructor tag type ConTagZ = Int -- | A power-of-two alignment data Alignment -- | 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. data OneShotInfo -- | No information NoOneShotInfo :: OneShotInfo -- | The lambda is applied at most once. OneShotLam :: OneShotInfo data SwapFlag NotSwapped :: SwapFlag IsSwapped :: SwapFlag -- | Is a TyCon a promoted data constructor or just a normal type -- constructor? data PromotionFlag NotPromoted :: PromotionFlag IsPromoted :: PromotionFlag data FunctionOrData IsFunction :: FunctionOrData IsData :: FunctionOrData type Version = Int -- | A String Literal in the source, including its original raw format for -- use by source to source manipulation tools. data StringLiteral StringLiteral :: SourceText -> FastString -> StringLiteral [sl_st] :: StringLiteral -> SourceText [sl_fs] :: StringLiteral -> FastString -- | Warning Text -- -- reason/explanation from a WARNING or DEPRECATED pragma data WarningTxt WarningTxt :: Located SourceText -> [Located StringLiteral] -> WarningTxt DeprecatedTxt :: Located SourceText -> [Located StringLiteral] -> WarningTxt type RuleName = FastString data Fixity Fixity :: SourceText -> Int -> FixityDirection -> Fixity data FixityDirection InfixL :: FixityDirection InfixR :: FixityDirection InfixN :: FixityDirection -- | 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. data LexicalFixity Prefix :: LexicalFixity Infix :: LexicalFixity data TopLevelFlag TopLevel :: TopLevelFlag NotTopLevel :: TopLevelFlag data Boxity Boxed :: Boxity Unboxed :: Boxity -- | Recursivity Flag data RecFlag Recursive :: RecFlag NonRecursive :: RecFlag data Origin FromSource :: Origin Generated :: Origin -- | The semantics allowed for overlapping instances for a particular -- instance. See Note [Safe Haskell isSafeOverlap] (in hs) for a -- explanation of the isSafeOverlap field. -- --
-- doOrDoes [] = text "do" -- doOrDoes ["Hello"] = text "does" -- doOrDoes ["Hello", "World"] = text "do" --doOrDoes :: [a] -> SDoc -- | Determines the form of to be appropriate for the length of a list: -- --
-- isOrAre [] = text "are" -- isOrAre ["Hello"] = text "is" -- isOrAre ["Hello", "World"] = text "are" --isOrAre :: [a] -> SDoc -- | Determines the pluralisation suffix appropriate for the length of a -- list: -- --
-- plural [] = char 's' -- plural ["Hello"] = empty -- plural ["Hello", "World"] = char 's' --plural :: [a] -> SDoc -- | Converts an integer and object description to a statement about the -- multiplicity of those objects: -- --
-- speakNOf 0 (text "melon") = text "no melons" -- speakNOf 1 (text "melon") = text "one melon" -- speakNOf 3 (text "melon") = text "three melons" --speakNOf :: Int -> SDoc -> SDoc -- | Converts an integer to a verbal multiplicity: -- --
-- speakN 0 = text "none" -- speakN 5 = text "five" -- speakN 10 = text "10" --speakN :: Int -> SDoc -- | Converts an integer to a verbal index: -- --
-- speakNth 1 = text "first" -- speakNth 5 = text "fifth" -- speakNth 21 = text "21st" --speakNth :: Int -> SDoc intWithCommas :: Integral a => a -> SDoc quotedListWithNor :: [SDoc] -> SDoc quotedListWithOr :: [SDoc] -> SDoc -- | Returns the comma-separated concatenation of the quoted pretty printed -- things. -- --
-- [x,y,z] ==> `x', `y', `z' --pprQuotedList :: Outputable a => [a] -> SDoc -- | Returns the comma-separated concatenation of the pretty printed -- things. interpp'SP :: Outputable a => [a] -> SDoc -- | Returns the separated concatenation of the pretty printed things. interppSP :: Outputable a => [a] -> SDoc pprWithBars :: (a -> SDoc) -> [a] -> SDoc pprWithCommas :: (a -> SDoc) -> [a] -> SDoc -- | Normalise, escape and render a string representing a path -- -- e.g. "c:\whatever" pprFilePathString :: FilePath -> SDoc pprFastFilePath :: FastString -> SDoc pprInfixVar :: Bool -> SDoc -> SDoc pprPrefixVar :: Bool -> SDoc -> SDoc pprPrimWord64 :: Integer -> SDoc pprPrimInt64 :: Integer -> SDoc pprPrimWord :: Integer -> SDoc pprPrimInt :: Integer -> SDoc -- | Special combinator for showing unboxed literals. pprPrimChar :: Char -> SDoc primWord64Suffix :: SDoc primInt64Suffix :: SDoc primWordSuffix :: SDoc primDoubleSuffix :: SDoc primIntSuffix :: SDoc primFloatSuffix :: SDoc primCharSuffix :: SDoc -- | Special combinator for showing bytestring literals. pprHsBytes :: ByteString -> SDoc -- | Special combinator for showing string literals. pprHsString :: FastString -> SDoc -- | Special combinator for showing character literals. pprHsChar :: Char -> SDoc keyword :: SDoc -> SDoc -- | Apply the given colour/style for the argument. -- -- Only takes effect if colours are enabled. coloured :: PprColour -> SDoc -> SDoc ppUnless :: Bool -> SDoc -> SDoc ppWhen :: Bool -> SDoc -> SDoc punctuate :: SDoc -> [SDoc] -> [SDoc] -- | This behaves like hang, but does not indent the second document -- when the header is empty. hangNotEmpty :: SDoc -> Int -> SDoc -> SDoc hang :: SDoc -> Int -> SDoc -> SDoc -- | This behaves like fsep, but it uses <> for -- horizontal conposition rather than <+> fcat :: [SDoc] -> SDoc -- | A paragraph-fill combinator. It's much like sep, only it keeps fitting -- things on one line until it can't fit any more. fsep :: [SDoc] -> SDoc -- | Catenate: is either like hcat or like vcat, depending on -- what fits cat :: [SDoc] -> SDoc -- | Separate: is either like hsep or like vcat, depending on -- what fits sep :: [SDoc] -> SDoc -- | Concatenate SDoc vertically with dovetailing vcat :: [SDoc] -> SDoc -- | Concatenate SDoc horizontally with a space between each one hsep :: [SDoc] -> SDoc -- | Concatenate SDoc horizontally hcat :: [SDoc] -> SDoc -- | Join two SDoc together vertically ($+$) :: SDoc -> SDoc -> SDoc -- | Join two SDoc together vertically; if there is no vertical -- overlap it "dovetails" the two onto one line ($$) :: SDoc -> SDoc -> SDoc -- | Join two SDoc together horizontally with a gap between them (<+>) :: SDoc -> SDoc -> SDoc -- | Join two SDoc together horizontally without a gap (<>) :: SDoc -> SDoc -> SDoc -- | Indent SDoc some specified amount nest :: Int -> SDoc -> SDoc unicodeSyntax :: SDoc -> SDoc -> SDoc bullet :: SDoc kindType :: SDoc forAllLit :: SDoc rbrace :: SDoc lbrace :: SDoc rbrack :: SDoc lbrack :: SDoc rparen :: SDoc lparen :: SDoc vbar :: SDoc dot :: SDoc underscore :: SDoc space :: SDoc equals :: SDoc colon :: SDoc comma :: SDoc semi :: SDoc larrowtt :: SDoc arrowtt :: SDoc larrowt :: SDoc arrowt :: SDoc darrow :: SDoc larrow :: SDoc arrow :: SDoc dcolon :: SDoc blankLine :: SDoc quotes :: SDoc -> SDoc cparen :: Bool -> SDoc -> SDoc angleBrackets :: SDoc -> SDoc doubleQuotes :: SDoc -> SDoc quote :: SDoc -> SDoc brackets :: SDoc -> SDoc braces :: SDoc -> SDoc parens :: SDoc -> SDoc -- | doublePrec p n shows a floating point number n with -- p digits of precision after the decimal point. doublePrec :: Int -> Double -> SDoc word :: Integer -> SDoc rational :: Rational -> SDoc double :: Double -> SDoc float :: Float -> SDoc integer :: Integer -> SDoc int :: Int -> SDoc ztext :: FastZString -> SDoc ptext :: PtrString -> SDoc ftext :: FastString -> SDoc char :: Char -> SDoc empty :: SDoc docToSDoc :: Doc -> SDoc isEmpty :: DynFlags -> SDoc -> Bool showSDocDumpOneLine :: DynFlags -> SDoc -> String showSDocOneLine :: DynFlags -> SDoc -> String renderWithStyle :: DynFlags -> SDoc -> PprStyle -> String showSDocDebug :: DynFlags -> SDoc -> String showSDocDump :: DynFlags -> SDoc -> String showSDocForUser :: DynFlags -> PrintUnqualified -> SDoc -> String showSDocUnqual :: DynFlags -> SDoc -> String showPpr :: Outputable a => DynFlags -> a -> String showSDoc :: DynFlags -> SDoc -> String mkCodeStyle :: CodeStyle -> PprStyle pprCode :: CodeStyle -> SDoc -> SDoc -- | An efficient variant of printSDoc specialized for -- LeftMode that outputs to a BufHandle. bufLeftRenderSDoc :: DynFlags -> BufHandle -> PprStyle -> SDoc -> IO () -- | Like printSDocLn but specialized with LeftMode and -- PprCode CStyle. This is typically used to -- output C-- code. printForC :: DynFlags -> Handle -> SDoc -> IO () printForUserPartWay :: DynFlags -> Handle -> Int -> PrintUnqualified -> SDoc -> IO () printForUser :: DynFlags -> Handle -> PrintUnqualified -> SDoc -> IO () -- | Like printSDoc but appends an extra newline. printSDocLn :: Mode -> DynFlags -> Handle -> PprStyle -> SDoc -> IO () -- | The analog of printDoc_ for SDoc, which tries to make -- sure the terminal doesn't get screwed up by the ANSI color codes if an -- exception is thrown during pretty-printing. printSDoc :: Mode -> DynFlags -> Handle -> PprStyle -> SDoc -> IO () -- | Says what to do with -dppr-debug; without, return empty whenPprDebug :: SDoc -> SDoc -- | Says what to do with and without -dppr-debug ifPprDebug :: SDoc -> SDoc -> SDoc getPprDebug :: (Bool -> SDoc) -> SDoc userStyle :: PprStyle -> Bool debugStyle :: PprStyle -> Bool dumpStyle :: PprStyle -> Bool asmStyle :: PprStyle -> Bool codeStyle :: PprStyle -> Bool queryQual :: PprStyle -> PrintUnqualified qualPackage :: PprStyle -> QueryQualifyPackage qualModule :: PprStyle -> QueryQualifyModule qualName :: PprStyle -> QueryQualifyName updSDocDynFlags :: (DynFlags -> DynFlags) -> SDoc -> SDoc sdocWithPlatform :: (Platform -> SDoc) -> SDoc sdocWithDynFlags :: (DynFlags -> SDoc) -> SDoc getPprStyle :: (PprStyle -> SDoc) -> SDoc pprSetDepth :: Depth -> SDoc -> SDoc -- | Truncate a list that is longer than the current depth. pprDeeperList :: ([SDoc] -> SDoc) -> [SDoc] -> SDoc pprDeeper :: SDoc -> SDoc -- | This is not a recommended way to render SDoc, since it breaks -- the abstraction layer of SDoc. Prefer to use printSDoc, -- printSDocLn, bufLeftRenderSDoc, or -- renderWithStyle instead. withPprStyleDoc :: DynFlags -> PprStyle -> SDoc -> Doc withPprStyle :: PprStyle -> SDoc -> SDoc initSDocContext :: DynFlags -> PprStyle -> SDocContext setStyleColoured :: Bool -> PprStyle -> PprStyle mkUserStyle :: DynFlags -> PrintUnqualified -> Depth -> PprStyle cmdlineParserStyle :: DynFlags -> PprStyle -- | Style for printing error messages mkErrStyle :: DynFlags -> PrintUnqualified -> PprStyle defaultErrStyle :: DynFlags -> PprStyle mkDumpStyle :: DynFlags -> PrintUnqualified -> PprStyle defaultDumpStyle :: DynFlags -> PprStyle defaultUserStyle :: DynFlags -> PprStyle neverQualify :: PrintUnqualified alwaysQualify :: PrintUnqualified reallyAlwaysQualify :: PrintUnqualified neverQualifyPackages :: QueryQualifyPackage alwaysQualifyPackages :: QueryQualifyPackage neverQualifyModules :: QueryQualifyModule alwaysQualifyModules :: QueryQualifyModule neverQualifyNames :: QueryQualifyName -- | NB: This won't ever show package IDs alwaysQualifyNames :: QueryQualifyName reallyAlwaysQualifyNames :: QueryQualifyName data PprStyle data CodeStyle CStyle :: CodeStyle AsmStyle :: CodeStyle data Depth AllTheWay :: Depth PartWay :: Int -> Depth -- | When printing code that contains original names, we need to map the -- original names back to something the user understands. This is the -- purpose of the triple of functions that gets passed around when -- rendering SDoc. data PrintUnqualified QueryQualify :: QueryQualifyName -> QueryQualifyModule -> QueryQualifyPackage -> PrintUnqualified [queryQualifyName] :: PrintUnqualified -> QueryQualifyName [queryQualifyModule] :: PrintUnqualified -> QueryQualifyModule [queryQualifyPackage] :: PrintUnqualified -> QueryQualifyPackage -- | Given a Name's Module and OccName, decide -- whether and how to qualify it. type QueryQualifyName = Module -> OccName -> QualifyName -- | For a given module, we need to know whether to print it with a package -- name to disambiguate it. type QueryQualifyModule = Module -> Bool -- | For a given package, we need to know whether to print it with the -- component id to disambiguate it. type QueryQualifyPackage = UnitId -> Bool data QualifyName NameUnqual :: QualifyName NameQual :: ModuleName -> QualifyName NameNotInScope1 :: QualifyName NameNotInScope2 :: QualifyName -- | Class designating that some type has an SDoc representation class Outputable a ppr :: Outputable a => a -> SDoc pprPrec :: Outputable a => Rational -> a -> SDoc -- | BindingSite is used to tell the thing that prints binder what -- language construct is binding the identifier. This can be used to -- decide how much info to print. Also see Note [Binding-site specific -- printing] in PprCore data BindingSite -- | The x in (x. e) LambdaBind :: BindingSite -- | The x in case scrut of x { (y,z) -> ... } CaseBind :: BindingSite -- | The y,z in case scrut of x { (y,z) -> ... } CasePatBind :: BindingSite -- | The x in (let x = rhs in e) LetBind :: BindingSite -- | When we print a binder, we often want to print its type too. The -- OutputableBndr class encapsulates this idea. class Outputable a => OutputableBndr a pprBndr :: OutputableBndr a => BindingSite -> a -> SDoc pprPrefixOcc :: OutputableBndr a => a -> SDoc pprInfixOcc :: OutputableBndr a => a -> SDoc bndrIsJoin_maybe :: OutputableBndr a => a -> Maybe Int 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.) data Module Module :: !UnitId -> !ModuleName -> Module [moduleUnitId] :: Module -> !UnitId [moduleName] :: Module -> !ModuleName -- | A ModuleName is essentially a simple string, e.g. Data.List. data ModuleName -- | A unit identifier identifies a (possibly partially) instantiated -- library. It is primarily used as part of Module, which in turn -- is used in Name, which is used to give names to entities when -- typechecking. -- -- There are two possible forms for a UnitId. It can be a -- DefiniteUnitId, in which case we just have a string that -- uniquely identifies some fully compiled, installed library we have on -- disk. However, when we are typechecking a library with missing holes, -- we may need to instantiate a library on the fly (in which case we -- don't have any on-disk representation.) In that case, you have an -- IndefiniteUnitId, which explicitly records the instantiation, -- so that we can substitute over it. data UnitId IndefiniteUnitId :: {-# UNPACK #-} !IndefUnitId -> UnitId DefiniteUnitId :: {-# UNPACK #-} !DefUnitId -> UnitId -- | 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. newtype InstalledUnitId InstalledUnitId :: FastString -> InstalledUnitId -- | The full hashed unit identifier, including the component id and the -- hash. [installedUnitIdFS] :: InstalledUnitId -> FastString -- | 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 newtype ComponentId ComponentId :: FastString -> ComponentId fsLit :: String -> FastString sLit :: String -> PtrString -- | Return the length of a PtrString lengthPS :: PtrString -> Int -- | Decode a PtrString back into a String using Latin-1 -- encoding. This does not free the memory associated with -- PtrString. unpackPtrString :: PtrString -> String -- | Encode a String into a newly allocated PtrString using -- Latin-1 encoding. The original string must not contain non-Latin-1 -- characters (above codepoint 0xff). mkPtrString :: String -> PtrString -- | Wrap an unboxed address into a PtrString. mkPtrString# :: Addr# -> PtrString -- | Outputs a FastString with no decoding at all, that is, -- you get the actual bytes in the FastString written to the -- Handle. hPutFS :: Handle -> FastString -> IO () getFastStringZEncCounter :: IO Int getFastStringTable :: IO [[[FastString]]] isUnderscoreFS :: FastString -> Bool nilFS :: FastString uniqueOfFS :: FastString -> Int consFS :: Char -> FastString -> FastString tailFS :: FastString -> FastString headFS :: FastString -> Char concatFS :: [FastString] -> FastString appendFS :: FastString -> FastString -> FastString -- | Returns a Z-encoded version of a FastString. This might be the -- original, if it was already Z-encoded. The first time this function is -- applied to a particular FastString, the results are memoized. zEncodeFS :: FastString -> FastZString -- | Unpacks and decodes the FastString unpackFS :: FastString -> String -- | Returns True if the FastString is empty nullFS :: FastString -> Bool -- | Returns the length of the FastString in characters lengthFS :: FastString -> Int -- | Creates a FastString from a UTF-8 encoded [Word8] mkFastStringByteList :: [Word8] -> FastString -- | Creates a UTF-8 encoded FastString from a String mkFastString :: String -> FastString -- | Create a FastString from an existing ForeignPtr; the -- difference between this and mkFastStringBytes is that we don't -- have to copy the bytes if the string is new to the table. mkFastStringByteString :: ByteString -> FastString -- | Create a FastString from an existing ForeignPtr; the -- difference between this and mkFastStringBytes is that we don't -- have to copy the bytes if the string is new to the table. mkFastStringForeignPtr :: Ptr Word8 -> ForeignPtr Word8 -> Int -> IO FastString mkFastStringBytes :: Ptr Word8 -> Int -> FastString mkFastString# :: Addr# -> FastString lengthFZS :: FastZString -> Int zString :: FastZString -> String hPutFZS :: Handle -> FastZString -> IO () unsafeMkByteString :: String -> ByteString fastZStringToByteString :: FastZString -> ByteString fastStringToByteString :: FastString -> ByteString -- | Gives the UTF-8 encoded bytes corresponding to a FastString bytesFS :: FastString -> ByteString data FastZString -- | A FastString is a UTF-8 encoded string together with a unique -- ID. All FastStrings are stored in a global hashtable to support -- fast O(1) comparison. -- -- It is also associated with a lazy reference to the Z-encoding of this -- string which is used by the compiler internally. data FastString FastString :: {-# UNPACK #-} !Int -> {-# UNPACK #-} !Int -> {-# UNPACK #-} !ByteString -> FastZString -> FastString [uniq] :: FastString -> {-# UNPACK #-} !Int [n_chars] :: FastString -> {-# UNPACK #-} !Int [fs_bs] :: FastString -> {-# UNPACK #-} !ByteString -- | Lazily computed z-encoding of this string. -- -- Since FastStrings are globally memoized this is computed at -- most once for any given string. [fs_zenc] :: FastString -> FastZString -- | A PtrString is a pointer to some array of Latin-1 encoded -- chars. data PtrString PtrString :: !Ptr Word8 -> !Int -> PtrString sGhcRtsWithLibdw :: Settings -> Bool sGhcDebugged :: Settings -> Bool sGhcThreaded :: Settings -> Bool sLibFFI :: Settings -> Bool sLeadingUnderscore :: Settings -> Bool sTablesNextToCode :: Settings -> Bool sGhcRTSWays :: Settings -> String sGhcWithSMP :: Settings -> Bool sGhcWithNativeCodeGen :: Settings -> Bool sGhcWithInterpreter :: Settings -> Bool sIntegerLibraryType :: Settings -> IntegerLibrary sIntegerLibrary :: Settings -> String sTargetPlatformString :: Settings -> String sExtraGccViaCFlags :: Settings -> [String] sOpt_i :: Settings -> [String] sOpt_lcc :: Settings -> [String] sOpt_lc :: Settings -> [String] sOpt_lo :: Settings -> [String] sOpt_windres :: Settings -> [String] sOpt_lm :: Settings -> [String] sOpt_l :: Settings -> [String] sOpt_a :: Settings -> [String] sOpt_cxx :: Settings -> [String] sOpt_c :: Settings -> [String] sOpt_F :: Settings -> [String] sOpt_P_fingerprint :: Settings -> Fingerprint sOpt_P :: Settings -> [String] sOpt_L :: Settings -> [String] sPgm_i :: Settings -> String sPgm_lcc :: Settings -> (String, [Option]) sPgm_lc :: Settings -> (String, [Option]) sPgm_lo :: Settings -> (String, [Option]) sPgm_ranlib :: Settings -> String sPgm_ar :: Settings -> String sPgm_libtool :: Settings -> String sPgm_windres :: Settings -> String sPgm_T :: Settings -> String sPgm_dll :: Settings -> (String, [Option]) sPgm_lm :: Settings -> (String, [Option]) sPgm_l :: Settings -> (String, [Option]) sPgm_a :: Settings -> (String, [Option]) sPgm_c :: Settings -> String sPgm_F :: Settings -> String sPgm_P :: Settings -> (String, [Option]) sPgm_L :: Settings -> String sGccSupportsNoPie :: Settings -> Bool sLdIsGnuLd :: Settings -> Bool sLdSupportsFilelist :: Settings -> Bool sLdSupportsBuildId :: Settings -> Bool sLdSupportsCompactUnwind :: Settings -> Bool sSystemPackageConfig :: Settings -> FilePath sTmpDir :: Settings -> String sTopDir :: Settings -> FilePath sToolDir :: Settings -> Maybe FilePath sGhciUsagePath :: Settings -> FilePath sGhcUsagePath :: Settings -> FilePath sProjectVersion :: Settings -> String sProgramName :: Settings -> String data Settings Settings :: {-# UNPACK #-} !GhcNameVersion -> {-# UNPACK #-} !FileSettings -> Platform -> {-# UNPACK #-} !ToolSettings -> {-# UNPACK #-} !PlatformMisc -> PlatformConstants -> [(String, String)] -> Settings [sGhcNameVersion] :: Settings -> {-# UNPACK #-} !GhcNameVersion [sFileSettings] :: Settings -> {-# UNPACK #-} !FileSettings [sTargetPlatform] :: Settings -> Platform [sToolSettings] :: Settings -> {-# UNPACK #-} !ToolSettings [sPlatformMisc] :: Settings -> {-# UNPACK #-} !PlatformMisc [sPlatformConstants] :: Settings -> PlatformConstants [sRawSettings] :: Settings -> [(String, String)] -- | A plugin with its arguments. The result of loading the plugin. data LoadedPlugin LoadedPlugin :: PluginWithArgs -> ModIface -> LoadedPlugin -- | the actual plugin together with its commandline arguments [lpPlugin] :: LoadedPlugin -> PluginWithArgs -- | the module containing the plugin [lpModule] :: LoadedPlugin -> ModIface -- | A static plugin with its arguments. For registering compiled-in -- plugins through the GHC API. data StaticPlugin StaticPlugin :: PluginWithArgs -> StaticPlugin -- | the actual plugin together with its commandline arguments [spPlugin] :: StaticPlugin -> PluginWithArgs data PlatformConstants PlatformConstants :: Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Bool -> Bool -> Int -> Integer -> Integer -> Integer -> PlatformConstants [pc_CONTROL_GROUP_CONST_291] :: PlatformConstants -> Int [pc_STD_HDR_SIZE] :: PlatformConstants -> Int [pc_PROF_HDR_SIZE] :: PlatformConstants -> Int [pc_BLOCK_SIZE] :: PlatformConstants -> Int [pc_BLOCKS_PER_MBLOCK] :: PlatformConstants -> Int [pc_TICKY_BIN_COUNT] :: PlatformConstants -> Int [pc_OFFSET_StgRegTable_rR1] :: PlatformConstants -> Int [pc_OFFSET_StgRegTable_rR2] :: PlatformConstants -> Int [pc_OFFSET_StgRegTable_rR3] :: PlatformConstants -> Int [pc_OFFSET_StgRegTable_rR4] :: PlatformConstants -> Int [pc_OFFSET_StgRegTable_rR5] :: PlatformConstants -> Int [pc_OFFSET_StgRegTable_rR6] :: PlatformConstants -> Int [pc_OFFSET_StgRegTable_rR7] :: PlatformConstants -> Int [pc_OFFSET_StgRegTable_rR8] :: PlatformConstants -> Int [pc_OFFSET_StgRegTable_rR9] :: PlatformConstants -> Int [pc_OFFSET_StgRegTable_rR10] :: PlatformConstants -> Int [pc_OFFSET_StgRegTable_rF1] :: PlatformConstants -> Int [pc_OFFSET_StgRegTable_rF2] :: PlatformConstants -> Int [pc_OFFSET_StgRegTable_rF3] :: PlatformConstants -> Int [pc_OFFSET_StgRegTable_rF4] :: PlatformConstants -> Int [pc_OFFSET_StgRegTable_rF5] :: PlatformConstants -> Int [pc_OFFSET_StgRegTable_rF6] :: PlatformConstants -> Int [pc_OFFSET_StgRegTable_rD1] :: PlatformConstants -> Int [pc_OFFSET_StgRegTable_rD2] :: PlatformConstants -> Int [pc_OFFSET_StgRegTable_rD3] :: PlatformConstants -> Int [pc_OFFSET_StgRegTable_rD4] :: PlatformConstants -> Int [pc_OFFSET_StgRegTable_rD5] :: PlatformConstants -> Int [pc_OFFSET_StgRegTable_rD6] :: PlatformConstants -> Int [pc_OFFSET_StgRegTable_rXMM1] :: PlatformConstants -> Int [pc_OFFSET_StgRegTable_rXMM2] :: PlatformConstants -> Int [pc_OFFSET_StgRegTable_rXMM3] :: PlatformConstants -> Int [pc_OFFSET_StgRegTable_rXMM4] :: PlatformConstants -> Int [pc_OFFSET_StgRegTable_rXMM5] :: PlatformConstants -> Int [pc_OFFSET_StgRegTable_rXMM6] :: PlatformConstants -> Int [pc_OFFSET_StgRegTable_rYMM1] :: PlatformConstants -> Int [pc_OFFSET_StgRegTable_rYMM2] :: PlatformConstants -> Int [pc_OFFSET_StgRegTable_rYMM3] :: PlatformConstants -> Int [pc_OFFSET_StgRegTable_rYMM4] :: PlatformConstants -> Int [pc_OFFSET_StgRegTable_rYMM5] :: PlatformConstants -> Int [pc_OFFSET_StgRegTable_rYMM6] :: PlatformConstants -> Int [pc_OFFSET_StgRegTable_rZMM1] :: PlatformConstants -> Int [pc_OFFSET_StgRegTable_rZMM2] :: PlatformConstants -> Int [pc_OFFSET_StgRegTable_rZMM3] :: PlatformConstants -> Int [pc_OFFSET_StgRegTable_rZMM4] :: PlatformConstants -> Int [pc_OFFSET_StgRegTable_rZMM5] :: PlatformConstants -> Int [pc_OFFSET_StgRegTable_rZMM6] :: PlatformConstants -> Int [pc_OFFSET_StgRegTable_rL1] :: PlatformConstants -> Int [pc_OFFSET_StgRegTable_rSp] :: PlatformConstants -> Int [pc_OFFSET_StgRegTable_rSpLim] :: PlatformConstants -> Int [pc_OFFSET_StgRegTable_rHp] :: PlatformConstants -> Int [pc_OFFSET_StgRegTable_rHpLim] :: PlatformConstants -> Int [pc_OFFSET_StgRegTable_rCCCS] :: PlatformConstants -> Int [pc_OFFSET_StgRegTable_rCurrentTSO] :: PlatformConstants -> Int [pc_OFFSET_StgRegTable_rCurrentNursery] :: PlatformConstants -> Int [pc_OFFSET_StgRegTable_rHpAlloc] :: PlatformConstants -> Int [pc_OFFSET_stgEagerBlackholeInfo] :: PlatformConstants -> Int [pc_OFFSET_stgGCEnter1] :: PlatformConstants -> Int [pc_OFFSET_stgGCFun] :: PlatformConstants -> Int [pc_OFFSET_Capability_r] :: PlatformConstants -> Int [pc_OFFSET_bdescr_start] :: PlatformConstants -> Int [pc_OFFSET_bdescr_free] :: PlatformConstants -> Int [pc_OFFSET_bdescr_blocks] :: PlatformConstants -> Int [pc_OFFSET_bdescr_flags] :: PlatformConstants -> Int [pc_SIZEOF_CostCentreStack] :: PlatformConstants -> Int [pc_OFFSET_CostCentreStack_mem_alloc] :: PlatformConstants -> Int [pc_REP_CostCentreStack_mem_alloc] :: PlatformConstants -> Int [pc_OFFSET_CostCentreStack_scc_count] :: PlatformConstants -> Int [pc_REP_CostCentreStack_scc_count] :: PlatformConstants -> Int [pc_OFFSET_StgHeader_ccs] :: PlatformConstants -> Int [pc_OFFSET_StgHeader_ldvw] :: PlatformConstants -> Int [pc_SIZEOF_StgSMPThunkHeader] :: PlatformConstants -> Int [pc_OFFSET_StgEntCounter_allocs] :: PlatformConstants -> Int [pc_REP_StgEntCounter_allocs] :: PlatformConstants -> Int [pc_OFFSET_StgEntCounter_allocd] :: PlatformConstants -> Int [pc_REP_StgEntCounter_allocd] :: PlatformConstants -> Int [pc_OFFSET_StgEntCounter_registeredp] :: PlatformConstants -> Int [pc_OFFSET_StgEntCounter_link] :: PlatformConstants -> Int [pc_OFFSET_StgEntCounter_entry_count] :: PlatformConstants -> Int [pc_SIZEOF_StgUpdateFrame_NoHdr] :: PlatformConstants -> Int [pc_SIZEOF_StgMutArrPtrs_NoHdr] :: PlatformConstants -> Int [pc_OFFSET_StgMutArrPtrs_ptrs] :: PlatformConstants -> Int [pc_OFFSET_StgMutArrPtrs_size] :: PlatformConstants -> Int [pc_SIZEOF_StgSmallMutArrPtrs_NoHdr] :: PlatformConstants -> Int [pc_OFFSET_StgSmallMutArrPtrs_ptrs] :: PlatformConstants -> Int [pc_SIZEOF_StgArrBytes_NoHdr] :: PlatformConstants -> Int [pc_OFFSET_StgArrBytes_bytes] :: PlatformConstants -> Int [pc_OFFSET_StgTSO_alloc_limit] :: PlatformConstants -> Int [pc_OFFSET_StgTSO_cccs] :: PlatformConstants -> Int [pc_OFFSET_StgTSO_stackobj] :: PlatformConstants -> Int [pc_OFFSET_StgStack_sp] :: PlatformConstants -> Int [pc_OFFSET_StgStack_stack] :: PlatformConstants -> Int [pc_OFFSET_StgUpdateFrame_updatee] :: PlatformConstants -> Int [pc_OFFSET_StgFunInfoExtraFwd_arity] :: PlatformConstants -> Int [pc_REP_StgFunInfoExtraFwd_arity] :: PlatformConstants -> Int [pc_SIZEOF_StgFunInfoExtraRev] :: PlatformConstants -> Int [pc_OFFSET_StgFunInfoExtraRev_arity] :: PlatformConstants -> Int [pc_REP_StgFunInfoExtraRev_arity] :: PlatformConstants -> Int [pc_MAX_SPEC_SELECTEE_SIZE] :: PlatformConstants -> Int [pc_MAX_SPEC_AP_SIZE] :: PlatformConstants -> Int [pc_MIN_PAYLOAD_SIZE] :: PlatformConstants -> Int [pc_MIN_INTLIKE] :: PlatformConstants -> Int [pc_MAX_INTLIKE] :: PlatformConstants -> Int [pc_MIN_CHARLIKE] :: PlatformConstants -> Int [pc_MAX_CHARLIKE] :: PlatformConstants -> Int [pc_MUT_ARR_PTRS_CARD_BITS] :: PlatformConstants -> Int [pc_MAX_Vanilla_REG] :: PlatformConstants -> Int [pc_MAX_Float_REG] :: PlatformConstants -> Int [pc_MAX_Double_REG] :: PlatformConstants -> Int [pc_MAX_Long_REG] :: PlatformConstants -> Int [pc_MAX_XMM_REG] :: PlatformConstants -> Int [pc_MAX_Real_Vanilla_REG] :: PlatformConstants -> Int [pc_MAX_Real_Float_REG] :: PlatformConstants -> Int [pc_MAX_Real_Double_REG] :: PlatformConstants -> Int [pc_MAX_Real_XMM_REG] :: PlatformConstants -> Int [pc_MAX_Real_Long_REG] :: PlatformConstants -> Int [pc_RESERVED_C_STACK_BYTES] :: PlatformConstants -> Int [pc_RESERVED_STACK_WORDS] :: PlatformConstants -> Int [pc_AP_STACK_SPLIM] :: PlatformConstants -> Int [pc_WORD_SIZE] :: PlatformConstants -> Int [pc_DOUBLE_SIZE] :: PlatformConstants -> Int [pc_CINT_SIZE] :: PlatformConstants -> Int [pc_CLONG_SIZE] :: PlatformConstants -> Int [pc_CLONG_LONG_SIZE] :: PlatformConstants -> Int [pc_BITMAP_BITS_SHIFT] :: PlatformConstants -> Int [pc_TAG_BITS] :: PlatformConstants -> Int [pc_WORDS_BIGENDIAN] :: PlatformConstants -> Bool [pc_DYNAMIC_BY_DEFAULT] :: PlatformConstants -> Bool [pc_LDV_SHIFT] :: PlatformConstants -> Int [pc_ILDV_CREATE_MASK] :: PlatformConstants -> Integer [pc_ILDV_STATE_CREATE] :: PlatformConstants -> Integer [pc_ILDV_STATE_USE] :: PlatformConstants -> Integer -- | Throw a failed assertion exception for a given filename and line -- number. assertPanic :: String -> Int -> a -- | Panics and asserts. pgmError :: String -> a -- | Panics and asserts. sorry :: String -> a -- | Panics and asserts. panic :: String -> a showSDocUnsafe :: SDoc -> String -- | Just warn about an assertion failure, recording the given file and -- line number. Should typically be accessed with the WARN macros warnPprTrace :: HasCallStack => Bool -> String -> Int -> SDoc -> a -> a text :: String -> SDoc -- | Represents a pretty-printable document. -- -- To display an SDoc, use printSDoc, printSDocLn, -- bufLeftRenderSDoc, or renderWithStyle. Avoid calling -- runSDoc directly as it breaks the abstraction layer. data SDoc -- | Occurrence Name -- -- In this context that means: "classified (i.e. as a type name, value -- name, etc) but not qualified and not yet resolved" data OccName -- | A unique, unambiguous name for something, containing information about -- where that thing originated. data Name -- | Like filterM, only it reverses the sense of the test. filterOutM :: Applicative m => (a -> m Bool) -> [a] -> m [a] -- | Monadic version of unless, taking the condition in the monad unlessM :: Monad m => m Bool -> m () -> m () -- | Monadic version of when, taking the condition in the monad whenM :: Monad m => m Bool -> m () -> m () -- | Monadic version of fmap specialised for Maybe maybeMapM :: Monad m => (a -> m b) -> Maybe a -> m (Maybe b) -- | Monadic version of foldl that discards its result foldlM_ :: (Monad m, Foldable t) => (a -> b -> m a) -> a -> t b -> m () -- | Monadic version of or orM :: Monad m => m Bool -> m Bool -> m Bool -- | Monad version of all, aborts the computation at the first -- False value allM :: Monad m => (a -> m Bool) -> [a] -> m Bool -- | Monadic version of any, aborts the computation at the first -- True value anyM :: Monad m => (a -> m Bool) -> [a] -> m Bool -- | Monadic version of fmap 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) -- | Applicative version of mapMaybe mapMaybeM :: Applicative m => (a -> m (Maybe b)) -> [a] -> m [b] -- | Monadic version of concatMap concatMapM :: Monad m => (a -> m [b]) -> [a] -> m [b] -- | Monadic version of mapSnd mapSndM :: Monad m => (b -> m c) -> [(a, b)] -> m [(a, c)] -- | Monadic version of mapAccumL 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]) -- | mapAndUnzipM for triples 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] showOpt :: Option -> String -- | When invoking external tools as part of the compilation pipeline, we -- pass these a sequence of options on the command-line. Rather than just -- using a list of Strings, we use a type that allows us to distinguish -- between filepaths and 'other stuff'. The reason for this is that this -- type gives us a handle on transforming filenames, and filenames only, -- to whatever format they're expected to be on a particular platform. data Option FileOption :: String -> String -> Option Option :: String -> Option unsafeGlobalDynFlags :: DynFlags -- | An internal helper to check whether to use unicode syntax for output. -- -- Note: You should very likely be using unicodeSyntax instead of -- this function. useUnicodeSyntax :: DynFlags -> Bool useStarIsType :: DynFlags -> Bool shouldUseColor :: DynFlags -> Bool shouldUseHexWordLiterals :: DynFlags -> Bool hasPprDebug :: DynFlags -> Bool hasNoDebugOutput :: DynFlags -> Bool -- | Contains not only a collection of GeneralFlags but also a -- plethora of information relating to the compilation of a single file -- or GHC session data DynFlags DynFlags :: GhcMode -> GhcLink -> HscTarget -> {-# UNPACK #-} !GhcNameVersion -> {-# UNPACK #-} !FileSettings -> Platform -> {-# UNPACK #-} !ToolSettings -> {-# UNPACK #-} !PlatformMisc -> PlatformConstants -> [(String, String)] -> IntegerLibrary -> LlvmConfig -> Int -> Int -> Int -> Int -> Int -> Maybe String -> Maybe String -> [Int] -> Maybe Int -> Bool -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Int -> Int -> Int -> Maybe Int -> Maybe Int -> Int -> Word -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Bool -> Maybe Int -> Int -> [FilePath] -> Module -> Maybe String -> IntWithInf -> IntWithInf -> InstalledUnitId -> Maybe ComponentId -> Maybe [(ModuleName, Module)] -> [Way] -> String -> Maybe (String, Int) -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> String -> String -> String -> String -> IORef Bool -> String -> String -> Maybe String -> Maybe String -> Maybe String -> DynLibLoader -> Maybe FilePath -> Maybe FilePath -> [Option] -> IncludeSpecs -> [String] -> [String] -> [String] -> Maybe String -> RtsOptsEnabled -> Bool -> String -> [ModuleName] -> [(ModuleName, String)] -> [String] -> [LoadedPlugin] -> [StaticPlugin] -> Hooks -> FilePath -> Bool -> Bool -> [ModuleName] -> [String] -> [PackageDBFlag] -> [IgnorePackageFlag] -> [PackageFlag] -> [PackageFlag] -> [TrustFlag] -> Maybe FilePath -> Maybe [(FilePath, [PackageConfig])] -> PackageState -> IORef FilesToClean -> IORef (Map FilePath FilePath) -> IORef Int -> IORef (Set FilePath) -> EnumSet DumpFlag -> EnumSet GeneralFlag -> EnumSet WarningFlag -> EnumSet WarningFlag -> Maybe Language -> SafeHaskellMode -> Bool -> Bool -> SrcSpan -> SrcSpan -> SrcSpan -> SrcSpan -> SrcSpan -> SrcSpan -> SrcSpan -> SrcSpan -> [OnOff Extension] -> EnumSet Extension -> Int -> Int -> Int -> Int -> Float -> Int -> Bool -> Int -> Int -> LogAction -> FlushOut -> FlushErr -> Maybe FilePath -> Maybe String -> [String] -> Int -> Int -> Bool -> OverridingBool -> Bool -> Scheme -> ProfAuto -> Maybe String -> IORef (ModuleEnv Int) -> Maybe SseVersion -> Maybe BmiVersion -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> IORef (Maybe LinkerInfo) -> IORef (Maybe CompilerInfo) -> Int -> Int -> Int -> Bool -> Maybe Int -> Int -> Int -> CfgWeights -> DynFlags [ghcMode] :: DynFlags -> GhcMode [ghcLink] :: DynFlags -> GhcLink [hscTarget] :: DynFlags -> HscTarget [ghcNameVersion] :: DynFlags -> {-# UNPACK #-} !GhcNameVersion [fileSettings] :: DynFlags -> {-# UNPACK #-} !FileSettings [targetPlatform] :: DynFlags -> Platform [toolSettings] :: DynFlags -> {-# UNPACK #-} !ToolSettings [platformMisc] :: DynFlags -> {-# UNPACK #-} !PlatformMisc [platformConstants] :: DynFlags -> PlatformConstants [rawSettings] :: DynFlags -> [(String, String)] -- | IntegerGMP or IntegerSimple. Set at configure time, but may be -- overriden by GHC-API users. See Note [The integer library] in -- PrelNames [integerLibrary] :: DynFlags -> IntegerLibrary -- | N.B. It's important that this field is lazy since we load the LLVM -- configuration lazily. See Note [LLVM Configuration] in SysTools. [llvmConfig] :: DynFlags -> LlvmConfig -- | Verbosity level: see Note [Verbosity levels] [verbosity] :: DynFlags -> Int -- | Optimisation level [optLevel] :: DynFlags -> Int -- | How much debug information to produce [debugLevel] :: DynFlags -> Int -- | Number of simplifier phases [simplPhases] :: DynFlags -> Int -- | Max simplifier iterations [maxSimplIterations] :: DynFlags -> Int [ruleCheck] :: DynFlags -> Maybe String -- | A prefix to report inlining decisions about [inlineCheck] :: DynFlags -> Maybe String -- | Additional demand analysis [strictnessBefore] :: DynFlags -> [Int] -- | The number of modules to compile in parallel in --make mode, where -- Nothing ==> compile as many in parallel as there are CPUs. [parMakeCount] :: DynFlags -> Maybe Int -- | Enable RTS timing statistics? [enableTimeStats] :: DynFlags -> Bool -- | The heap size to set. [ghcHeapSize] :: DynFlags -> Maybe Int -- | Maximum number of bindings from the type envt to show in type error -- messages [maxRelevantBinds] :: DynFlags -> Maybe Int -- | Maximum number of hole fits to show in typed hole error messages [maxValidHoleFits] :: DynFlags -> Maybe Int -- | Maximum number of refinement hole fits to show in typed hole error -- messages [maxRefHoleFits] :: DynFlags -> Maybe Int -- | Maximum level of refinement for refinement hole fits in typed hole -- error messages [refLevelHoleFits] :: DynFlags -> Maybe Int -- | Maximum number of unmatched patterns to show in non-exhaustiveness -- warnings [maxUncoveredPatterns] :: DynFlags -> Int -- | Soft limit on the number of models the pattern match checker checks a -- pattern against. A safe guard against exponential blow-up. [maxPmCheckModels] :: DynFlags -> Int -- | Multiplier for simplifier ticks [simplTickFactor] :: DynFlags -> Int -- | Threshold for SpecConstr [specConstrThreshold] :: DynFlags -> Maybe Int -- | Max number of specialisations for any one function [specConstrCount] :: DynFlags -> Maybe Int -- | Max number of specialisations for recursive types Not optional; -- otherwise ForceSpecConstr can diverge. [specConstrRecursive] :: DynFlags -> Int -- | Binary literals (e.g. strings) whose size is above this threshold will -- be dumped in a binary file by the assembler code generator (0 to -- disable) [binBlobThreshold] :: DynFlags -> Word -- | Threshold for LiberateCase [liberateCaseThreshold] :: DynFlags -> Maybe Int -- | Arg count for lambda floating See CoreMonad.FloatOutSwitches [floatLamArgs] :: DynFlags -> Maybe Int -- | Maximum number of arguments after lambda lifting a recursive function. [liftLamsRecArgs] :: DynFlags -> Maybe Int -- | Maximum number of arguments after lambda lifting a non-recursive -- function. [liftLamsNonRecArgs] :: DynFlags -> Maybe Int -- | Lambda lift even when this turns a known call into an unknown call. [liftLamsKnown] :: DynFlags -> Bool -- | Align Cmm functions at this boundary or use default. [cmmProcAlignment] :: DynFlags -> Maybe Int -- | Simplification history size [historySize] :: DynFlags -> Int [importPaths] :: DynFlags -> [FilePath] [mainModIs] :: DynFlags -> Module [mainFunIs] :: DynFlags -> Maybe String -- | Typechecker maximum stack depth [reductionDepth] :: DynFlags -> IntWithInf -- | Number of iterations in the constraints solver Typically only 1 is -- needed [solverIterations] :: DynFlags -> IntWithInf [thisInstalledUnitId] :: DynFlags -> InstalledUnitId [thisComponentId_] :: DynFlags -> Maybe ComponentId [thisUnitIdInsts_] :: DynFlags -> Maybe [(ModuleName, Module)] -- | Way flags from the command line [ways] :: DynFlags -> [Way] -- | The global "way" (e.g. "p" for prof) [buildTag] :: DynFlags -> String [splitInfo] :: DynFlags -> Maybe (String, Int) [objectDir] :: DynFlags -> Maybe String [dylibInstallName] :: DynFlags -> Maybe String [hiDir] :: DynFlags -> Maybe String [hieDir] :: DynFlags -> Maybe String [stubDir] :: DynFlags -> Maybe String [dumpDir] :: DynFlags -> Maybe String [objectSuf] :: DynFlags -> String [hcSuf] :: DynFlags -> String [hiSuf] :: DynFlags -> String [hieSuf] :: DynFlags -> String [canGenerateDynamicToo] :: DynFlags -> IORef Bool [dynObjectSuf] :: DynFlags -> String [dynHiSuf] :: DynFlags -> String [outputFile] :: DynFlags -> Maybe String [dynOutputFile] :: DynFlags -> Maybe String [outputHi] :: DynFlags -> Maybe String [dynLibLoader] :: DynFlags -> DynLibLoader -- | This is set by runPipeline based on where its output is going. [dumpPrefix] :: DynFlags -> Maybe FilePath -- | Override the dumpPrefix set by runPipeline. Set by -- -ddump-file-prefix [dumpPrefixForce] :: DynFlags -> Maybe FilePath [ldInputs] :: DynFlags -> [Option] [includePaths] :: DynFlags -> IncludeSpecs [libraryPaths] :: DynFlags -> [String] [frameworkPaths] :: DynFlags -> [String] [cmdlineFrameworks] :: DynFlags -> [String] [rtsOpts] :: DynFlags -> Maybe String [rtsOptsEnabled] :: DynFlags -> RtsOptsEnabled [rtsOptsSuggestions] :: DynFlags -> Bool -- | Path to store the .mix files [hpcDir] :: DynFlags -> String [pluginModNames] :: DynFlags -> [ModuleName] [pluginModNameOpts] :: DynFlags -> [(ModuleName, String)] -- | the -ffrontend-opt flags given on the command line, in -- *reverse* order that they're specified on the command line. [frontendPluginOpts] :: DynFlags -> [String] -- | plugins dynamically loaded after processing arguments. What will be -- loaded here is directed by pluginModNames. Arguments are loaded from -- pluginModNameOpts. The purpose of this field is to cache the plugins -- so they don't have to be loaded each time they are needed. See -- initializePlugins. [cachedPlugins] :: DynFlags -> [LoadedPlugin] -- | 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. [staticPlugins] :: DynFlags -> [StaticPlugin] [hooks] :: DynFlags -> Hooks [depMakefile] :: DynFlags -> FilePath [depIncludePkgDeps] :: DynFlags -> Bool [depIncludeCppDeps] :: DynFlags -> Bool [depExcludeMods] :: DynFlags -> [ModuleName] [depSuffixes] :: DynFlags -> [String] -- | The -package-db flags given on the command line, In *reverse* -- order that they're specified on the command line. This is intended to -- be applied with the list of "initial" package databases derived from -- GHC_PACKAGE_PATH; see getPackageConfRefs. [packageDBFlags] :: DynFlags -> [PackageDBFlag] -- | The -ignore-package flags from the command line. In *reverse* -- order that they're specified on the command line. [ignorePackageFlags] :: DynFlags -> [IgnorePackageFlag] -- | The -package and -hide-package flags from the -- command-line. In *reverse* order that they're specified on the command -- line. [packageFlags] :: DynFlags -> [PackageFlag] -- | The -plugin-package-id flags from command line. In *reverse* -- order that they're specified on the command line. [pluginPackageFlags] :: DynFlags -> [PackageFlag] -- | The -trust and -distrust flags. In *reverse* order -- that they're specified on the command line. [trustFlags] :: DynFlags -> [TrustFlag] -- | Filepath to the package environment file (if overriding default) [packageEnv] :: DynFlags -> Maybe FilePath [pkgDatabase] :: DynFlags -> Maybe [(FilePath, [PackageConfig])] [pkgState] :: DynFlags -> PackageState [filesToClean] :: DynFlags -> IORef FilesToClean [dirsToClean] :: DynFlags -> IORef (Map FilePath FilePath) [nextTempSuffix] :: DynFlags -> IORef Int [generatedDumps] :: DynFlags -> IORef (Set FilePath) [dumpFlags] :: DynFlags -> EnumSet DumpFlag [generalFlags] :: DynFlags -> EnumSet GeneralFlag [warningFlags] :: DynFlags -> EnumSet WarningFlag [fatalWarningFlags] :: DynFlags -> EnumSet WarningFlag [language] :: DynFlags -> Maybe Language -- | Safe Haskell mode [safeHaskell] :: DynFlags -> SafeHaskellMode [safeInfer] :: DynFlags -> Bool [safeInferred] :: DynFlags -> Bool [thOnLoc] :: DynFlags -> SrcSpan [newDerivOnLoc] :: DynFlags -> SrcSpan [overlapInstLoc] :: DynFlags -> SrcSpan [incoherentOnLoc] :: DynFlags -> SrcSpan [pkgTrustOnLoc] :: DynFlags -> SrcSpan [warnSafeOnLoc] :: DynFlags -> SrcSpan [warnUnsafeOnLoc] :: DynFlags -> SrcSpan [trustworthyOnLoc] :: DynFlags -> SrcSpan [extensions] :: DynFlags -> [OnOff Extension] [extensionFlags] :: DynFlags -> EnumSet Extension [ufCreationThreshold] :: DynFlags -> Int [ufUseThreshold] :: DynFlags -> Int [ufFunAppDiscount] :: DynFlags -> Int [ufDictDiscount] :: DynFlags -> Int [ufKeenessFactor] :: DynFlags -> Float [ufDearOp] :: DynFlags -> Int [ufVeryAggressive] :: DynFlags -> Bool [maxWorkerArgs] :: DynFlags -> Int [ghciHistSize] :: DynFlags -> Int -- | MsgDoc output action: use ErrUtils instead of this if you can [log_action] :: DynFlags -> LogAction [flushOut] :: DynFlags -> FlushOut [flushErr] :: DynFlags -> FlushErr [ghcVersionFile] :: DynFlags -> Maybe FilePath [haddockOptions] :: DynFlags -> Maybe String -- | GHCi scripts specified by -ghci-script, in reverse order [ghciScripts] :: DynFlags -> [String] [pprUserLength] :: DynFlags -> Int [pprCols] :: DynFlags -> Int [useUnicode] :: DynFlags -> Bool [useColor] :: DynFlags -> OverridingBool [canUseColor] :: DynFlags -> Bool [colScheme] :: DynFlags -> Scheme -- | what kind of {--} to add automatically [profAuto] :: DynFlags -> ProfAuto [interactivePrint] :: DynFlags -> Maybe String [nextWrapperNum] :: DynFlags -> IORef (ModuleEnv Int) -- | Machine dependent flags (-mblah stuff) [sseVersion] :: DynFlags -> Maybe SseVersion [bmiVersion] :: DynFlags -> Maybe BmiVersion [avx] :: DynFlags -> Bool [avx2] :: DynFlags -> Bool [avx512cd] :: DynFlags -> Bool [avx512er] :: DynFlags -> Bool [avx512f] :: DynFlags -> Bool [avx512pf] :: DynFlags -> Bool -- | Run-time linker information (what options we need, etc.) [rtldInfo] :: DynFlags -> IORef (Maybe LinkerInfo) -- | Run-time compiler information [rtccInfo] :: DynFlags -> IORef (Maybe CompilerInfo) -- | Max size, in bytes, of inline array allocations. [maxInlineAllocSize] :: DynFlags -> Int -- | Only inline memcpy if it generates no more than this many pseudo -- (roughly: Cmm) instructions. [maxInlineMemcpyInsns] :: DynFlags -> Int -- | Only inline memset if it generates no more than this many pseudo -- (roughly: Cmm) instructions. [maxInlineMemsetInsns] :: DynFlags -> Int -- | Reverse the order of error messages in GHC/GHCi [reverseErrors] :: DynFlags -> Bool -- | Limit the maximum number of errors to show [maxErrors] :: DynFlags -> Maybe Int -- | Unique supply configuration for testing build determinism [initialUnique] :: DynFlags -> Int [uniqueIncrement] :: DynFlags -> Int -- | Temporary: CFG Edge weights for fast iterations [cfgWeightInfo] :: DynFlags -> CfgWeights data DumpFlag Opt_D_dump_cmm :: DumpFlag Opt_D_dump_cmm_from_stg :: DumpFlag Opt_D_dump_cmm_raw :: DumpFlag Opt_D_dump_cmm_verbose_by_proc :: DumpFlag Opt_D_dump_cmm_verbose :: DumpFlag Opt_D_dump_cmm_cfg :: DumpFlag Opt_D_dump_cmm_cbe :: DumpFlag Opt_D_dump_cmm_switch :: DumpFlag Opt_D_dump_cmm_proc :: DumpFlag Opt_D_dump_cmm_sp :: DumpFlag Opt_D_dump_cmm_sink :: DumpFlag Opt_D_dump_cmm_caf :: DumpFlag Opt_D_dump_cmm_procmap :: DumpFlag Opt_D_dump_cmm_split :: DumpFlag Opt_D_dump_cmm_info :: DumpFlag Opt_D_dump_cmm_cps :: DumpFlag -- | Dump the cfg used for block layout. Opt_D_dump_cfg_weights :: DumpFlag Opt_D_dump_asm :: DumpFlag Opt_D_dump_asm_native :: DumpFlag Opt_D_dump_asm_liveness :: DumpFlag Opt_D_dump_asm_regalloc :: DumpFlag Opt_D_dump_asm_regalloc_stages :: DumpFlag Opt_D_dump_asm_conflicts :: DumpFlag Opt_D_dump_asm_stats :: DumpFlag Opt_D_dump_asm_expanded :: DumpFlag Opt_D_dump_llvm :: DumpFlag Opt_D_dump_core_stats :: DumpFlag Opt_D_dump_deriv :: DumpFlag Opt_D_dump_ds :: DumpFlag Opt_D_dump_ds_preopt :: DumpFlag Opt_D_dump_foreign :: DumpFlag Opt_D_dump_inlinings :: DumpFlag Opt_D_dump_rule_firings :: DumpFlag Opt_D_dump_rule_rewrites :: DumpFlag Opt_D_dump_simpl_trace :: DumpFlag Opt_D_dump_occur_anal :: DumpFlag Opt_D_dump_parsed :: DumpFlag Opt_D_dump_parsed_ast :: DumpFlag Opt_D_dump_rn :: DumpFlag Opt_D_dump_rn_ast :: DumpFlag Opt_D_dump_simpl :: DumpFlag Opt_D_dump_simpl_iterations :: DumpFlag Opt_D_dump_spec :: DumpFlag Opt_D_dump_prep :: DumpFlag Opt_D_dump_stg :: DumpFlag Opt_D_dump_stg_unarised :: DumpFlag Opt_D_dump_stg_final :: DumpFlag Opt_D_dump_call_arity :: DumpFlag Opt_D_dump_exitify :: DumpFlag Opt_D_dump_stranal :: DumpFlag Opt_D_dump_str_signatures :: DumpFlag Opt_D_dump_tc :: DumpFlag Opt_D_dump_tc_ast :: DumpFlag Opt_D_dump_types :: DumpFlag Opt_D_dump_rules :: DumpFlag Opt_D_dump_cse :: DumpFlag Opt_D_dump_worker_wrapper :: DumpFlag Opt_D_dump_rn_trace :: DumpFlag Opt_D_dump_rn_stats :: DumpFlag Opt_D_dump_opt_cmm :: DumpFlag Opt_D_dump_simpl_stats :: DumpFlag Opt_D_dump_cs_trace :: DumpFlag Opt_D_dump_tc_trace :: DumpFlag Opt_D_dump_ec_trace :: DumpFlag Opt_D_dump_if_trace :: DumpFlag Opt_D_dump_vt_trace :: DumpFlag Opt_D_dump_splices :: DumpFlag Opt_D_th_dec_file :: DumpFlag Opt_D_dump_BCOs :: DumpFlag Opt_D_dump_ticked :: DumpFlag Opt_D_dump_rtti :: DumpFlag Opt_D_source_stats :: DumpFlag Opt_D_verbose_stg2stg :: DumpFlag Opt_D_dump_hi :: DumpFlag Opt_D_dump_hi_diffs :: DumpFlag Opt_D_dump_mod_cycles :: DumpFlag Opt_D_dump_mod_map :: DumpFlag Opt_D_dump_timings :: DumpFlag Opt_D_dump_view_pattern_commoning :: DumpFlag Opt_D_verbose_core2core :: DumpFlag Opt_D_dump_debug :: DumpFlag Opt_D_dump_json :: DumpFlag Opt_D_ppr_debug :: DumpFlag Opt_D_no_debug_output :: DumpFlag -- | Enumerates the simple on-or-off dynamic flags data GeneralFlag -- | Append dump output to files instead of stdout. Opt_DumpToFile :: GeneralFlag Opt_D_faststring_stats :: GeneralFlag Opt_D_dump_minimal_imports :: GeneralFlag Opt_DoCoreLinting :: GeneralFlag Opt_DoStgLinting :: GeneralFlag Opt_DoCmmLinting :: GeneralFlag Opt_DoAsmLinting :: GeneralFlag Opt_DoAnnotationLinting :: GeneralFlag Opt_NoLlvmMangler :: GeneralFlag Opt_FastLlvm :: GeneralFlag Opt_NoTypeableBinds :: GeneralFlag Opt_WarnIsError :: GeneralFlag Opt_ShowWarnGroups :: GeneralFlag Opt_HideSourcePaths :: GeneralFlag Opt_PrintExplicitForalls :: GeneralFlag Opt_PrintExplicitKinds :: GeneralFlag Opt_PrintExplicitCoercions :: GeneralFlag Opt_PrintExplicitRuntimeReps :: GeneralFlag Opt_PrintEqualityRelations :: GeneralFlag Opt_PrintAxiomIncomps :: GeneralFlag Opt_PrintUnicodeSyntax :: GeneralFlag Opt_PrintExpandedSynonyms :: GeneralFlag Opt_PrintPotentialInstances :: GeneralFlag Opt_PrintTypecheckerElaboration :: GeneralFlag Opt_CallArity :: GeneralFlag Opt_Exitification :: GeneralFlag Opt_Strictness :: GeneralFlag Opt_LateDmdAnal :: GeneralFlag Opt_KillAbsence :: GeneralFlag Opt_KillOneShot :: GeneralFlag Opt_FullLaziness :: GeneralFlag Opt_FloatIn :: GeneralFlag Opt_LateSpecialise :: GeneralFlag Opt_Specialise :: GeneralFlag Opt_SpecialiseAggressively :: GeneralFlag Opt_CrossModuleSpecialise :: GeneralFlag Opt_StaticArgumentTransformation :: GeneralFlag Opt_CSE :: GeneralFlag Opt_StgCSE :: GeneralFlag Opt_StgLiftLams :: GeneralFlag Opt_LiberateCase :: GeneralFlag Opt_SpecConstr :: GeneralFlag Opt_SpecConstrKeen :: GeneralFlag Opt_DoLambdaEtaExpansion :: GeneralFlag Opt_IgnoreAsserts :: GeneralFlag Opt_DoEtaReduction :: GeneralFlag Opt_CaseMerge :: GeneralFlag Opt_CaseFolding :: GeneralFlag Opt_UnboxStrictFields :: GeneralFlag Opt_UnboxSmallStrictFields :: GeneralFlag Opt_DictsCheap :: GeneralFlag Opt_EnableRewriteRules :: GeneralFlag Opt_EnableThSpliceWarnings :: GeneralFlag Opt_RegsGraph :: GeneralFlag Opt_RegsIterative :: GeneralFlag Opt_PedanticBottoms :: GeneralFlag Opt_LlvmTBAA :: GeneralFlag Opt_LlvmFillUndefWithGarbage :: GeneralFlag Opt_IrrefutableTuples :: GeneralFlag Opt_CmmSink :: GeneralFlag Opt_CmmElimCommonBlocks :: GeneralFlag Opt_AsmShortcutting :: GeneralFlag Opt_OmitYields :: GeneralFlag Opt_FunToThunk :: GeneralFlag Opt_DictsStrict :: GeneralFlag Opt_DmdTxDictSel :: GeneralFlag Opt_Loopification :: GeneralFlag -- | Use the cfg based block layout algorithm. Opt_CfgBlocklayout :: GeneralFlag -- | Layout based on last instruction per block. Opt_WeightlessBlocklayout :: GeneralFlag Opt_CprAnal :: GeneralFlag Opt_WorkerWrapper :: GeneralFlag Opt_SolveConstantDicts :: GeneralFlag Opt_AlignmentSanitisation :: GeneralFlag Opt_CatchBottoms :: GeneralFlag Opt_NumConstantFolding :: GeneralFlag Opt_SimplPreInlining :: GeneralFlag Opt_IgnoreInterfacePragmas :: GeneralFlag Opt_OmitInterfacePragmas :: GeneralFlag Opt_ExposeAllUnfoldings :: GeneralFlag Opt_WriteInterface :: GeneralFlag Opt_WriteHie :: GeneralFlag Opt_AutoSccsOnIndividualCafs :: GeneralFlag Opt_ProfCountEntries :: GeneralFlag Opt_Pp :: GeneralFlag Opt_ForceRecomp :: GeneralFlag Opt_IgnoreOptimChanges :: GeneralFlag Opt_IgnoreHpcChanges :: GeneralFlag Opt_ExcessPrecision :: GeneralFlag Opt_EagerBlackHoling :: GeneralFlag Opt_NoHsMain :: GeneralFlag Opt_SplitSections :: GeneralFlag Opt_StgStats :: GeneralFlag Opt_HideAllPackages :: GeneralFlag Opt_HideAllPluginPackages :: GeneralFlag Opt_PrintBindResult :: GeneralFlag Opt_Haddock :: GeneralFlag Opt_HaddockOptions :: GeneralFlag Opt_BreakOnException :: GeneralFlag Opt_BreakOnError :: GeneralFlag Opt_PrintEvldWithShow :: GeneralFlag Opt_PrintBindContents :: GeneralFlag Opt_GenManifest :: GeneralFlag Opt_EmbedManifest :: GeneralFlag Opt_SharedImplib :: GeneralFlag Opt_BuildingCabalPackage :: GeneralFlag Opt_IgnoreDotGhci :: GeneralFlag Opt_GhciSandbox :: GeneralFlag Opt_GhciHistory :: GeneralFlag Opt_GhciLeakCheck :: GeneralFlag Opt_ValidateHie :: GeneralFlag Opt_LocalGhciHistory :: GeneralFlag Opt_NoIt :: GeneralFlag Opt_HelpfulErrors :: GeneralFlag Opt_DeferTypeErrors :: GeneralFlag Opt_DeferTypedHoles :: GeneralFlag Opt_DeferOutOfScopeVariables :: GeneralFlag -- |
-- -fPIC --Opt_PIC :: GeneralFlag -- |
-- -fPIE --Opt_PIE :: GeneralFlag -- |
-- -pie --Opt_PICExecutable :: GeneralFlag Opt_ExternalDynamicRefs :: GeneralFlag Opt_SccProfilingOn :: GeneralFlag Opt_Ticky :: GeneralFlag Opt_Ticky_Allocd :: GeneralFlag Opt_Ticky_LNE :: GeneralFlag Opt_Ticky_Dyn_Thunk :: GeneralFlag Opt_RPath :: GeneralFlag Opt_RelativeDynlibPaths :: GeneralFlag Opt_Hpc :: GeneralFlag Opt_FlatCache :: GeneralFlag Opt_ExternalInterpreter :: GeneralFlag Opt_OptimalApplicativeDo :: GeneralFlag Opt_VersionMacros :: GeneralFlag Opt_WholeArchiveHsLibs :: GeneralFlag Opt_SingleLibFolder :: GeneralFlag Opt_KeepCAFs :: GeneralFlag Opt_KeepGoing :: GeneralFlag Opt_ByteCode :: GeneralFlag Opt_ErrorSpans :: GeneralFlag Opt_DeferDiagnostics :: GeneralFlag Opt_DiagnosticsShowCaret :: GeneralFlag Opt_PprCaseAsLet :: GeneralFlag Opt_PprShowTicks :: GeneralFlag Opt_ShowHoleConstraints :: GeneralFlag Opt_ShowValidHoleFits :: GeneralFlag Opt_SortValidHoleFits :: GeneralFlag Opt_SortBySizeHoleFits :: GeneralFlag Opt_SortBySubsumHoleFits :: GeneralFlag Opt_AbstractRefHoleFits :: GeneralFlag Opt_UnclutterValidHoleFits :: GeneralFlag Opt_ShowTypeAppOfHoleFits :: GeneralFlag Opt_ShowTypeAppVarsOfHoleFits :: GeneralFlag Opt_ShowDocsOfHoleFits :: GeneralFlag Opt_ShowTypeOfHoleFits :: GeneralFlag Opt_ShowProvOfHoleFits :: GeneralFlag Opt_ShowMatchesOfHoleFits :: GeneralFlag Opt_ShowLoadedModules :: GeneralFlag Opt_HexWordLiterals :: GeneralFlag Opt_SuppressCoercions :: GeneralFlag Opt_SuppressVarKinds :: GeneralFlag Opt_SuppressModulePrefixes :: GeneralFlag Opt_SuppressTypeApplications :: GeneralFlag Opt_SuppressIdInfo :: GeneralFlag Opt_SuppressUnfoldings :: GeneralFlag Opt_SuppressTypeSignatures :: GeneralFlag Opt_SuppressUniques :: GeneralFlag Opt_SuppressStgExts :: GeneralFlag Opt_SuppressTicks :: GeneralFlag -- | Suppress timestamps in dumps Opt_SuppressTimestamps :: GeneralFlag Opt_AutoLinkPackages :: GeneralFlag Opt_ImplicitImportQualified :: GeneralFlag Opt_KeepHscppFiles :: GeneralFlag Opt_KeepHiDiffs :: GeneralFlag Opt_KeepHcFiles :: GeneralFlag Opt_KeepSFiles :: GeneralFlag Opt_KeepTmpFiles :: GeneralFlag Opt_KeepRawTokenStream :: GeneralFlag Opt_KeepLlvmFiles :: GeneralFlag Opt_KeepHiFiles :: GeneralFlag Opt_KeepOFiles :: GeneralFlag Opt_BuildDynamicToo :: GeneralFlag Opt_DistrustAllPackages :: GeneralFlag Opt_PackageTrust :: GeneralFlag Opt_PluginTrustworthy :: GeneralFlag Opt_G_NoStateHack :: GeneralFlag Opt_G_NoOptCoercion :: GeneralFlag -- | Paths to various files and directories used by GHC, including those -- that provide more settings. data FileSettings FileSettings :: FilePath -> FilePath -> Maybe FilePath -> FilePath -> String -> FilePath -> FileSettings [fileSettings_ghcUsagePath] :: FileSettings -> FilePath [fileSettings_ghciUsagePath] :: FileSettings -> FilePath [fileSettings_toolDir] :: FileSettings -> Maybe FilePath [fileSettings_topDir] :: FileSettings -> FilePath [fileSettings_tmpDir] :: FileSettings -> String [fileSettings_systemPackageConfig] :: FileSettings -> FilePath -- | Settings for what GHC this is. data GhcNameVersion GhcNameVersion :: String -> String -> GhcNameVersion [ghcNameVersion_programName] :: GhcNameVersion -> String [ghcNameVersion_projectVersion] :: GhcNameVersion -> String data IntegerLibrary IntegerGMP :: IntegerLibrary IntegerSimple :: IntegerLibrary -- | Platform-specific settings formerly hard-coded in Config.hs. -- -- These should probably be all be triaged whether they can be computed -- from other settings or belong in another another place (like -- Platform above). data PlatformMisc PlatformMisc :: String -> String -> IntegerLibrary -> Bool -> Bool -> Bool -> String -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> String -> PlatformMisc [platformMisc_targetPlatformString] :: PlatformMisc -> String [platformMisc_integerLibrary] :: PlatformMisc -> String [platformMisc_integerLibraryType] :: PlatformMisc -> IntegerLibrary [platformMisc_ghcWithInterpreter] :: PlatformMisc -> Bool [platformMisc_ghcWithNativeCodeGen] :: PlatformMisc -> Bool [platformMisc_ghcWithSMP] :: PlatformMisc -> Bool [platformMisc_ghcRTSWays] :: PlatformMisc -> String -- | Determines whether we will be compiling info tables that reside just -- before the entry code, or with an indirection to the entry code. See -- TABLES_NEXT_TO_CODE in includesrtsstorage/InfoTables.h. [platformMisc_tablesNextToCode] :: PlatformMisc -> Bool [platformMisc_leadingUnderscore] :: PlatformMisc -> Bool [platformMisc_libFFI] :: PlatformMisc -> Bool [platformMisc_ghcThreaded] :: PlatformMisc -> Bool [platformMisc_ghcDebugged] :: PlatformMisc -> Bool [platformMisc_ghcRtsWithLibdw] :: PlatformMisc -> Bool [platformMisc_llvmTarget] :: PlatformMisc -> String -- | Foreign formats supported by GHC via TH data ForeignSrcLang -- | C LangC :: ForeignSrcLang -- | C++ LangCxx :: ForeignSrcLang -- | Objective C LangObjc :: ForeignSrcLang -- | Objective C++ LangObjcxx :: ForeignSrcLang -- | Assembly language (.s) LangAsm :: ForeignSrcLang -- | Object (.o) RawObject :: ForeignSrcLang enumSetMember :: Enum a => a -> EnumSet a -> Bool pattern FunBind' :: XFunBind GhcRn GhcRn -> Located (IdP GhcRn) -> MatchGroup GhcRn (LHsExpr GhcRn) -> HsBindLR GhcRn GhcRn fun_ext' :: HsBindLR GhcRn GhcRn -> XFunBind GhcRn GhcRn fun_id' :: HsBindLR GhcRn GhcRn -> Located (IdP GhcRn) fun_matches' :: HsBindLR GhcRn GhcRn -> MatchGroup GhcRn (LHsExpr GhcRn) pattern HsSig' :: LHsType GhcRn -> HsImplicitBndrs GhcRn (LHsType GhcRn) setSigBody :: LHsType GhcRn -> LHsSigType GhcRn -> LHsSigType GhcRn noLocA' :: a -> Located a emptyEpAnn :: NoExtField noLoc' :: a -> Located a emptyComments' :: NoExtField pattern HsQualTy' :: XQualTy GhcRn -> Maybe (LHsContext GhcRn) -> LHsType GhcRn -> HsType GhcRn pattern RealSrcLoc' :: RealSrcLoc -> SrcLoc pattern L' :: SrcSpan -> a -> Located a module Graph.Trace.Internal.Solver tcPlugin :: TcPlugin module Graph.Trace.Internal.TH -- | A splice for generating instances for a given RuntimeRep makeInstancesForRep :: Name -> Name -> Q Type -> Q [InstanceDec] allRuntimeReps :: [Q Type] module Graph.Trace.Internal.RuntimeRep -- | Levity polymorphic id function. Doesn't cover all runtime reps, in -- particular unboxed products and sums with more than 2 elements. -- Handles linearity as well. class LPId (r :: RuntimeRep) lpId :: forall (a :: TYPE r). LPId r => a -> a instance Graph.Trace.Internal.RuntimeRep.LPId 'GHC.Types.LiftedRep instance Graph.Trace.Internal.RuntimeRep.LPId 'GHC.Types.UnliftedRep instance Graph.Trace.Internal.RuntimeRep.LPId 'GHC.Types.IntRep instance Graph.Trace.Internal.RuntimeRep.LPId 'GHC.Types.Int8Rep instance Graph.Trace.Internal.RuntimeRep.LPId 'GHC.Types.Int16Rep instance Graph.Trace.Internal.RuntimeRep.LPId 'GHC.Types.Int32Rep instance Graph.Trace.Internal.RuntimeRep.LPId 'GHC.Types.Int64Rep instance Graph.Trace.Internal.RuntimeRep.LPId 'GHC.Types.WordRep instance Graph.Trace.Internal.RuntimeRep.LPId 'GHC.Types.Word8Rep instance Graph.Trace.Internal.RuntimeRep.LPId 'GHC.Types.Word16Rep instance Graph.Trace.Internal.RuntimeRep.LPId 'GHC.Types.Word32Rep instance Graph.Trace.Internal.RuntimeRep.LPId 'GHC.Types.Word64Rep instance Graph.Trace.Internal.RuntimeRep.LPId 'GHC.Types.AddrRep instance Graph.Trace.Internal.RuntimeRep.LPId 'GHC.Types.FloatRep instance Graph.Trace.Internal.RuntimeRep.LPId 'GHC.Types.DoubleRep instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.LiftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.UnliftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.IntRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.WordRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.AddrRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.FloatRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.DoubleRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.LiftedRep, 'GHC.Types.LiftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.LiftedRep, 'GHC.Types.UnliftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.LiftedRep, 'GHC.Types.IntRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.LiftedRep, 'GHC.Types.Int8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.LiftedRep, 'GHC.Types.Int16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.LiftedRep, 'GHC.Types.Int32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.LiftedRep, 'GHC.Types.Int64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.LiftedRep, 'GHC.Types.WordRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.LiftedRep, 'GHC.Types.Word8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.LiftedRep, 'GHC.Types.Word16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.LiftedRep, 'GHC.Types.Word32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.LiftedRep, 'GHC.Types.Word64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.LiftedRep, 'GHC.Types.AddrRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.LiftedRep, 'GHC.Types.FloatRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.LiftedRep, 'GHC.Types.DoubleRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.UnliftedRep, 'GHC.Types.LiftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.UnliftedRep, 'GHC.Types.UnliftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.UnliftedRep, 'GHC.Types.IntRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.UnliftedRep, 'GHC.Types.Int8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.UnliftedRep, 'GHC.Types.Int16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.UnliftedRep, 'GHC.Types.Int32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.UnliftedRep, 'GHC.Types.Int64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.UnliftedRep, 'GHC.Types.WordRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.UnliftedRep, 'GHC.Types.Word8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.UnliftedRep, 'GHC.Types.Word16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.UnliftedRep, 'GHC.Types.Word32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.UnliftedRep, 'GHC.Types.Word64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.UnliftedRep, 'GHC.Types.AddrRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.UnliftedRep, 'GHC.Types.FloatRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.UnliftedRep, 'GHC.Types.DoubleRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.IntRep, 'GHC.Types.LiftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.IntRep, 'GHC.Types.UnliftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.IntRep, 'GHC.Types.IntRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.IntRep, 'GHC.Types.Int8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.IntRep, 'GHC.Types.Int16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.IntRep, 'GHC.Types.Int32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.IntRep, 'GHC.Types.Int64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.IntRep, 'GHC.Types.WordRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.IntRep, 'GHC.Types.Word8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.IntRep, 'GHC.Types.Word16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.IntRep, 'GHC.Types.Word32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.IntRep, 'GHC.Types.Word64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.IntRep, 'GHC.Types.AddrRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.IntRep, 'GHC.Types.FloatRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.IntRep, 'GHC.Types.DoubleRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int8Rep, 'GHC.Types.LiftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int8Rep, 'GHC.Types.UnliftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int8Rep, 'GHC.Types.IntRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int8Rep, 'GHC.Types.Int8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int8Rep, 'GHC.Types.Int16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int8Rep, 'GHC.Types.Int32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int8Rep, 'GHC.Types.Int64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int8Rep, 'GHC.Types.WordRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int8Rep, 'GHC.Types.Word8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int8Rep, 'GHC.Types.Word16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int8Rep, 'GHC.Types.Word32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int8Rep, 'GHC.Types.Word64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int8Rep, 'GHC.Types.AddrRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int8Rep, 'GHC.Types.FloatRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int8Rep, 'GHC.Types.DoubleRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int16Rep, 'GHC.Types.LiftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int16Rep, 'GHC.Types.UnliftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int16Rep, 'GHC.Types.IntRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int16Rep, 'GHC.Types.Int8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int16Rep, 'GHC.Types.Int16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int16Rep, 'GHC.Types.Int32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int16Rep, 'GHC.Types.Int64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int16Rep, 'GHC.Types.WordRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int16Rep, 'GHC.Types.Word8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int16Rep, 'GHC.Types.Word16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int16Rep, 'GHC.Types.Word32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int16Rep, 'GHC.Types.Word64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int16Rep, 'GHC.Types.AddrRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int16Rep, 'GHC.Types.FloatRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int16Rep, 'GHC.Types.DoubleRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int32Rep, 'GHC.Types.LiftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int32Rep, 'GHC.Types.UnliftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int32Rep, 'GHC.Types.IntRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int32Rep, 'GHC.Types.Int8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int32Rep, 'GHC.Types.Int16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int32Rep, 'GHC.Types.Int32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int32Rep, 'GHC.Types.Int64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int32Rep, 'GHC.Types.WordRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int32Rep, 'GHC.Types.Word8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int32Rep, 'GHC.Types.Word16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int32Rep, 'GHC.Types.Word32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int32Rep, 'GHC.Types.Word64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int32Rep, 'GHC.Types.AddrRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int32Rep, 'GHC.Types.FloatRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int32Rep, 'GHC.Types.DoubleRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int64Rep, 'GHC.Types.LiftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int64Rep, 'GHC.Types.UnliftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int64Rep, 'GHC.Types.IntRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int64Rep, 'GHC.Types.Int8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int64Rep, 'GHC.Types.Int16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int64Rep, 'GHC.Types.Int32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int64Rep, 'GHC.Types.Int64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int64Rep, 'GHC.Types.WordRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int64Rep, 'GHC.Types.Word8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int64Rep, 'GHC.Types.Word16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int64Rep, 'GHC.Types.Word32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int64Rep, 'GHC.Types.Word64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int64Rep, 'GHC.Types.AddrRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int64Rep, 'GHC.Types.FloatRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Int64Rep, 'GHC.Types.DoubleRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.WordRep, 'GHC.Types.LiftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.WordRep, 'GHC.Types.UnliftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.WordRep, 'GHC.Types.IntRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.WordRep, 'GHC.Types.Int8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.WordRep, 'GHC.Types.Int16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.WordRep, 'GHC.Types.Int32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.WordRep, 'GHC.Types.Int64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.WordRep, 'GHC.Types.WordRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.WordRep, 'GHC.Types.Word8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.WordRep, 'GHC.Types.Word16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.WordRep, 'GHC.Types.Word32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.WordRep, 'GHC.Types.Word64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.WordRep, 'GHC.Types.AddrRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.WordRep, 'GHC.Types.FloatRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.WordRep, 'GHC.Types.DoubleRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word8Rep, 'GHC.Types.LiftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word8Rep, 'GHC.Types.UnliftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word8Rep, 'GHC.Types.IntRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word8Rep, 'GHC.Types.Int8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word8Rep, 'GHC.Types.Int16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word8Rep, 'GHC.Types.Int32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word8Rep, 'GHC.Types.Int64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word8Rep, 'GHC.Types.WordRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word8Rep, 'GHC.Types.Word8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word8Rep, 'GHC.Types.Word16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word8Rep, 'GHC.Types.Word32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word8Rep, 'GHC.Types.Word64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word8Rep, 'GHC.Types.AddrRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word8Rep, 'GHC.Types.FloatRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word8Rep, 'GHC.Types.DoubleRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word16Rep, 'GHC.Types.LiftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word16Rep, 'GHC.Types.UnliftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word16Rep, 'GHC.Types.IntRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word16Rep, 'GHC.Types.Int8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word16Rep, 'GHC.Types.Int16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word16Rep, 'GHC.Types.Int32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word16Rep, 'GHC.Types.Int64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word16Rep, 'GHC.Types.WordRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word16Rep, 'GHC.Types.Word8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word16Rep, 'GHC.Types.Word16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word16Rep, 'GHC.Types.Word32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word16Rep, 'GHC.Types.Word64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word16Rep, 'GHC.Types.AddrRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word16Rep, 'GHC.Types.FloatRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word16Rep, 'GHC.Types.DoubleRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word32Rep, 'GHC.Types.LiftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word32Rep, 'GHC.Types.UnliftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word32Rep, 'GHC.Types.IntRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word32Rep, 'GHC.Types.Int8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word32Rep, 'GHC.Types.Int16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word32Rep, 'GHC.Types.Int32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word32Rep, 'GHC.Types.Int64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word32Rep, 'GHC.Types.WordRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word32Rep, 'GHC.Types.Word8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word32Rep, 'GHC.Types.Word16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word32Rep, 'GHC.Types.Word32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word32Rep, 'GHC.Types.Word64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word32Rep, 'GHC.Types.AddrRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word32Rep, 'GHC.Types.FloatRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word32Rep, 'GHC.Types.DoubleRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word64Rep, 'GHC.Types.LiftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word64Rep, 'GHC.Types.UnliftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word64Rep, 'GHC.Types.IntRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word64Rep, 'GHC.Types.Int8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word64Rep, 'GHC.Types.Int16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word64Rep, 'GHC.Types.Int32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word64Rep, 'GHC.Types.Int64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word64Rep, 'GHC.Types.WordRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word64Rep, 'GHC.Types.Word8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word64Rep, 'GHC.Types.Word16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word64Rep, 'GHC.Types.Word32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word64Rep, 'GHC.Types.Word64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word64Rep, 'GHC.Types.AddrRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word64Rep, 'GHC.Types.FloatRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.Word64Rep, 'GHC.Types.DoubleRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.AddrRep, 'GHC.Types.LiftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.AddrRep, 'GHC.Types.UnliftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.AddrRep, 'GHC.Types.IntRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.AddrRep, 'GHC.Types.Int8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.AddrRep, 'GHC.Types.Int16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.AddrRep, 'GHC.Types.Int32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.AddrRep, 'GHC.Types.Int64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.AddrRep, 'GHC.Types.WordRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.AddrRep, 'GHC.Types.Word8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.AddrRep, 'GHC.Types.Word16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.AddrRep, 'GHC.Types.Word32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.AddrRep, 'GHC.Types.Word64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.AddrRep, 'GHC.Types.AddrRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.AddrRep, 'GHC.Types.FloatRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.AddrRep, 'GHC.Types.DoubleRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.FloatRep, 'GHC.Types.LiftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.FloatRep, 'GHC.Types.UnliftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.FloatRep, 'GHC.Types.IntRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.FloatRep, 'GHC.Types.Int8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.FloatRep, 'GHC.Types.Int16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.FloatRep, 'GHC.Types.Int32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.FloatRep, 'GHC.Types.Int64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.FloatRep, 'GHC.Types.WordRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.FloatRep, 'GHC.Types.Word8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.FloatRep, 'GHC.Types.Word16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.FloatRep, 'GHC.Types.Word32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.FloatRep, 'GHC.Types.Word64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.FloatRep, 'GHC.Types.AddrRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.FloatRep, 'GHC.Types.FloatRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.FloatRep, 'GHC.Types.DoubleRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.DoubleRep, 'GHC.Types.LiftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.DoubleRep, 'GHC.Types.UnliftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.DoubleRep, 'GHC.Types.IntRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.DoubleRep, 'GHC.Types.Int8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.DoubleRep, 'GHC.Types.Int16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.DoubleRep, 'GHC.Types.Int32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.DoubleRep, 'GHC.Types.Int64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.DoubleRep, 'GHC.Types.WordRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.DoubleRep, 'GHC.Types.Word8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.DoubleRep, 'GHC.Types.Word16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.DoubleRep, 'GHC.Types.Word32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.DoubleRep, 'GHC.Types.Word64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.DoubleRep, 'GHC.Types.AddrRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.DoubleRep, 'GHC.Types.FloatRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.TupleRep '[ 'GHC.Types.DoubleRep, 'GHC.Types.DoubleRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.LiftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.UnliftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.IntRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.WordRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.AddrRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.FloatRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.DoubleRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.LiftedRep, 'GHC.Types.LiftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.LiftedRep, 'GHC.Types.UnliftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.LiftedRep, 'GHC.Types.IntRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.LiftedRep, 'GHC.Types.Int8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.LiftedRep, 'GHC.Types.Int16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.LiftedRep, 'GHC.Types.Int32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.LiftedRep, 'GHC.Types.Int64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.LiftedRep, 'GHC.Types.WordRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.LiftedRep, 'GHC.Types.Word8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.LiftedRep, 'GHC.Types.Word16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.LiftedRep, 'GHC.Types.Word32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.LiftedRep, 'GHC.Types.Word64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.LiftedRep, 'GHC.Types.AddrRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.LiftedRep, 'GHC.Types.FloatRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.LiftedRep, 'GHC.Types.DoubleRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.UnliftedRep, 'GHC.Types.LiftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.UnliftedRep, 'GHC.Types.UnliftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.UnliftedRep, 'GHC.Types.IntRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.UnliftedRep, 'GHC.Types.Int8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.UnliftedRep, 'GHC.Types.Int16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.UnliftedRep, 'GHC.Types.Int32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.UnliftedRep, 'GHC.Types.Int64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.UnliftedRep, 'GHC.Types.WordRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.UnliftedRep, 'GHC.Types.Word8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.UnliftedRep, 'GHC.Types.Word16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.UnliftedRep, 'GHC.Types.Word32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.UnliftedRep, 'GHC.Types.Word64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.UnliftedRep, 'GHC.Types.AddrRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.UnliftedRep, 'GHC.Types.FloatRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.UnliftedRep, 'GHC.Types.DoubleRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.IntRep, 'GHC.Types.LiftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.IntRep, 'GHC.Types.UnliftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.IntRep, 'GHC.Types.IntRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.IntRep, 'GHC.Types.Int8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.IntRep, 'GHC.Types.Int16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.IntRep, 'GHC.Types.Int32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.IntRep, 'GHC.Types.Int64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.IntRep, 'GHC.Types.WordRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.IntRep, 'GHC.Types.Word8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.IntRep, 'GHC.Types.Word16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.IntRep, 'GHC.Types.Word32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.IntRep, 'GHC.Types.Word64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.IntRep, 'GHC.Types.AddrRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.IntRep, 'GHC.Types.FloatRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.IntRep, 'GHC.Types.DoubleRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int8Rep, 'GHC.Types.LiftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int8Rep, 'GHC.Types.UnliftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int8Rep, 'GHC.Types.IntRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int8Rep, 'GHC.Types.Int8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int8Rep, 'GHC.Types.Int16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int8Rep, 'GHC.Types.Int32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int8Rep, 'GHC.Types.Int64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int8Rep, 'GHC.Types.WordRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int8Rep, 'GHC.Types.Word8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int8Rep, 'GHC.Types.Word16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int8Rep, 'GHC.Types.Word32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int8Rep, 'GHC.Types.Word64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int8Rep, 'GHC.Types.AddrRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int8Rep, 'GHC.Types.FloatRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int8Rep, 'GHC.Types.DoubleRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int16Rep, 'GHC.Types.LiftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int16Rep, 'GHC.Types.UnliftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int16Rep, 'GHC.Types.IntRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int16Rep, 'GHC.Types.Int8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int16Rep, 'GHC.Types.Int16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int16Rep, 'GHC.Types.Int32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int16Rep, 'GHC.Types.Int64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int16Rep, 'GHC.Types.WordRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int16Rep, 'GHC.Types.Word8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int16Rep, 'GHC.Types.Word16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int16Rep, 'GHC.Types.Word32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int16Rep, 'GHC.Types.Word64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int16Rep, 'GHC.Types.AddrRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int16Rep, 'GHC.Types.FloatRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int16Rep, 'GHC.Types.DoubleRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int32Rep, 'GHC.Types.LiftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int32Rep, 'GHC.Types.UnliftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int32Rep, 'GHC.Types.IntRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int32Rep, 'GHC.Types.Int8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int32Rep, 'GHC.Types.Int16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int32Rep, 'GHC.Types.Int32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int32Rep, 'GHC.Types.Int64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int32Rep, 'GHC.Types.WordRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int32Rep, 'GHC.Types.Word8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int32Rep, 'GHC.Types.Word16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int32Rep, 'GHC.Types.Word32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int32Rep, 'GHC.Types.Word64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int32Rep, 'GHC.Types.AddrRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int32Rep, 'GHC.Types.FloatRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int32Rep, 'GHC.Types.DoubleRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int64Rep, 'GHC.Types.LiftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int64Rep, 'GHC.Types.UnliftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int64Rep, 'GHC.Types.IntRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int64Rep, 'GHC.Types.Int8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int64Rep, 'GHC.Types.Int16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int64Rep, 'GHC.Types.Int32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int64Rep, 'GHC.Types.Int64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int64Rep, 'GHC.Types.WordRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int64Rep, 'GHC.Types.Word8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int64Rep, 'GHC.Types.Word16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int64Rep, 'GHC.Types.Word32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int64Rep, 'GHC.Types.Word64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int64Rep, 'GHC.Types.AddrRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int64Rep, 'GHC.Types.FloatRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Int64Rep, 'GHC.Types.DoubleRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.WordRep, 'GHC.Types.LiftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.WordRep, 'GHC.Types.UnliftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.WordRep, 'GHC.Types.IntRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.WordRep, 'GHC.Types.Int8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.WordRep, 'GHC.Types.Int16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.WordRep, 'GHC.Types.Int32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.WordRep, 'GHC.Types.Int64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.WordRep, 'GHC.Types.WordRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.WordRep, 'GHC.Types.Word8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.WordRep, 'GHC.Types.Word16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.WordRep, 'GHC.Types.Word32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.WordRep, 'GHC.Types.Word64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.WordRep, 'GHC.Types.AddrRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.WordRep, 'GHC.Types.FloatRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.WordRep, 'GHC.Types.DoubleRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word8Rep, 'GHC.Types.LiftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word8Rep, 'GHC.Types.UnliftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word8Rep, 'GHC.Types.IntRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word8Rep, 'GHC.Types.Int8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word8Rep, 'GHC.Types.Int16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word8Rep, 'GHC.Types.Int32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word8Rep, 'GHC.Types.Int64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word8Rep, 'GHC.Types.WordRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word8Rep, 'GHC.Types.Word8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word8Rep, 'GHC.Types.Word16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word8Rep, 'GHC.Types.Word32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word8Rep, 'GHC.Types.Word64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word8Rep, 'GHC.Types.AddrRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word8Rep, 'GHC.Types.FloatRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word8Rep, 'GHC.Types.DoubleRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word16Rep, 'GHC.Types.LiftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word16Rep, 'GHC.Types.UnliftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word16Rep, 'GHC.Types.IntRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word16Rep, 'GHC.Types.Int8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word16Rep, 'GHC.Types.Int16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word16Rep, 'GHC.Types.Int32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word16Rep, 'GHC.Types.Int64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word16Rep, 'GHC.Types.WordRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word16Rep, 'GHC.Types.Word8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word16Rep, 'GHC.Types.Word16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word16Rep, 'GHC.Types.Word32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word16Rep, 'GHC.Types.Word64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word16Rep, 'GHC.Types.AddrRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word16Rep, 'GHC.Types.FloatRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word16Rep, 'GHC.Types.DoubleRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word32Rep, 'GHC.Types.LiftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word32Rep, 'GHC.Types.UnliftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word32Rep, 'GHC.Types.IntRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word32Rep, 'GHC.Types.Int8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word32Rep, 'GHC.Types.Int16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word32Rep, 'GHC.Types.Int32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word32Rep, 'GHC.Types.Int64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word32Rep, 'GHC.Types.WordRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word32Rep, 'GHC.Types.Word8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word32Rep, 'GHC.Types.Word16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word32Rep, 'GHC.Types.Word32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word32Rep, 'GHC.Types.Word64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word32Rep, 'GHC.Types.AddrRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word32Rep, 'GHC.Types.FloatRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word32Rep, 'GHC.Types.DoubleRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word64Rep, 'GHC.Types.LiftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word64Rep, 'GHC.Types.UnliftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word64Rep, 'GHC.Types.IntRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word64Rep, 'GHC.Types.Int8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word64Rep, 'GHC.Types.Int16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word64Rep, 'GHC.Types.Int32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word64Rep, 'GHC.Types.Int64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word64Rep, 'GHC.Types.WordRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word64Rep, 'GHC.Types.Word8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word64Rep, 'GHC.Types.Word16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word64Rep, 'GHC.Types.Word32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word64Rep, 'GHC.Types.Word64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word64Rep, 'GHC.Types.AddrRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word64Rep, 'GHC.Types.FloatRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.Word64Rep, 'GHC.Types.DoubleRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.AddrRep, 'GHC.Types.LiftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.AddrRep, 'GHC.Types.UnliftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.AddrRep, 'GHC.Types.IntRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.AddrRep, 'GHC.Types.Int8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.AddrRep, 'GHC.Types.Int16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.AddrRep, 'GHC.Types.Int32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.AddrRep, 'GHC.Types.Int64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.AddrRep, 'GHC.Types.WordRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.AddrRep, 'GHC.Types.Word8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.AddrRep, 'GHC.Types.Word16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.AddrRep, 'GHC.Types.Word32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.AddrRep, 'GHC.Types.Word64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.AddrRep, 'GHC.Types.AddrRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.AddrRep, 'GHC.Types.FloatRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.AddrRep, 'GHC.Types.DoubleRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.FloatRep, 'GHC.Types.LiftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.FloatRep, 'GHC.Types.UnliftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.FloatRep, 'GHC.Types.IntRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.FloatRep, 'GHC.Types.Int8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.FloatRep, 'GHC.Types.Int16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.FloatRep, 'GHC.Types.Int32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.FloatRep, 'GHC.Types.Int64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.FloatRep, 'GHC.Types.WordRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.FloatRep, 'GHC.Types.Word8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.FloatRep, 'GHC.Types.Word16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.FloatRep, 'GHC.Types.Word32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.FloatRep, 'GHC.Types.Word64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.FloatRep, 'GHC.Types.AddrRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.FloatRep, 'GHC.Types.FloatRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.FloatRep, 'GHC.Types.DoubleRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.DoubleRep, 'GHC.Types.LiftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.DoubleRep, 'GHC.Types.UnliftedRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.DoubleRep, 'GHC.Types.IntRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.DoubleRep, 'GHC.Types.Int8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.DoubleRep, 'GHC.Types.Int16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.DoubleRep, 'GHC.Types.Int32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.DoubleRep, 'GHC.Types.Int64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.DoubleRep, 'GHC.Types.WordRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.DoubleRep, 'GHC.Types.Word8Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.DoubleRep, 'GHC.Types.Word16Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.DoubleRep, 'GHC.Types.Word32Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.DoubleRep, 'GHC.Types.Word64Rep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.DoubleRep, 'GHC.Types.AddrRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.DoubleRep, 'GHC.Types.FloatRep]) instance Graph.Trace.Internal.RuntimeRep.LPId ('GHC.Types.SumRep '[ 'GHC.Types.DoubleRep, 'GHC.Types.DoubleRep]) module Graph.Trace.Internal.Types data DebugTag DT :: {-# UNPACK #-} !Word -> Either FunName UserKey -> DebugTag [invocationId] :: DebugTag -> {-# UNPACK #-} !Word [debugKey] :: DebugTag -> Either FunName UserKey data DebugContext DC :: !Maybe DebugTag -> {-# UNPACK #-} !DebugTag -> !Propagation -> !Maybe DefinitionSite -> DebugContext [previousTag] :: DebugContext -> !Maybe DebugTag [currentTag] :: DebugContext -> {-# UNPACK #-} !DebugTag [propagation] :: DebugContext -> !Propagation [definitionSite] :: DebugContext -> !Maybe DefinitionSite data Propagation -- | Does not output traces, overrides other options Mute :: Propagation -- | Does not output traces, doesn't override other options Inert :: Propagation -- | Outputs traces for current scope, but does not propagate Shallow :: Propagation -- | Outputs traces and propagates to descendents Deep :: Propagation data SrcCodeLoc SrcCodeLoc :: !SrcModule -> !SrcLine -> !SrcCol -> SrcCodeLoc [srcModule] :: SrcCodeLoc -> !SrcModule [srcLine] :: SrcCodeLoc -> !SrcLine [srcCol] :: SrcCodeLoc -> !SrcCol type DefinitionSite = SrcCodeLoc type CallSite = SrcCodeLoc type DebugIP = (?_debug_ip :: Maybe DebugContext, HasCallStack) type TraceMute = DebugIP type TraceDeep = DebugIP type TraceDeepKey (key :: Symbol) = DebugIP type Trace = DebugIP type TraceKey (key :: Symbol) = DebugIP type TraceInert = DebugIP data Event EntryEvent :: !DebugTag -> !Maybe DebugTag -> !Maybe DefinitionSite -> !Maybe CallSite -> Event TraceEvent :: !DebugTag -> !MessageContent -> !Maybe CallSite -> Event -- | Serialize an Event. The ยง character is used as both a separator and -- terminator. Don't use this character in trace messages, it will break! eventToLogStr :: Event -> Builder type FunName = String type UserKey = String type SrcModule = String type SrcLine = Int type SrcCol = Int callStackToCallSite :: CallStack -> Maybe CallSite data DebugNames DebugNames :: Name -> Name -> Name -> Name -> Name -> Name -> Name -> Name -> DebugNames [traceMutePredName] :: DebugNames -> Name [traceDeepPredName] :: DebugNames -> Name [traceDeepKeyPredName] :: DebugNames -> Name [tracePredName] :: DebugNames -> Name [traceKeyPredName] :: DebugNames -> Name [traceInertPredName] :: DebugNames -> Name [entryName] :: DebugNames -> Name [debugContextName] :: DebugNames -> Name instance Language.Haskell.TH.Syntax.Lift Graph.Trace.Internal.Types.Propagation instance GHC.Show.Show Graph.Trace.Internal.Types.Propagation instance GHC.Classes.Eq Graph.Trace.Internal.Types.Propagation instance Language.Haskell.TH.Syntax.Lift Graph.Trace.Internal.Types.SrcCodeLoc module Graph.Trace.Internal.Trace trace :: DebugIP => String -> a -> a traceId :: DebugIP => String -> String traceShow :: (DebugIP, Show a) => a -> b -> b traceShowId :: (DebugIP, Show a) => a -> a traceM :: (Applicative f, DebugIP) => String -> f () traceShowM :: (Applicative f, Show a, DebugIP) => a -> f () -- | Emits a message to the log signaling a function invocation entry :: forall rep (a :: TYPE rep). (DebugIP, LPId rep) => a -> a omitTraces :: Propagation -> Bool module Graph.Trace.Internal.Predicates -- | Removes debug predicates from the type signatures in an expression. -- This is necessary if there are type signatures for pattern bound names -- and the monomorphism restriction is on. removeConstraints :: Data a => DebugNames -> Set Name -> a -> a -- | Matches on type signatures in order to add the constraint to them. addConstraintToSig :: DebugNames -> Bool -> Sig GhcRn -> Writer (Map Name (Maybe FastString, Propagation)) (Sig GhcRn) module Graph.Trace.Internal.Instrument -- | Instrument value bindings that have a signature with a debug pred. -- This gets applied to both top level bindings as well as arbitrarily -- nested value bindings. modifyValBinds :: DebugNames -> Map Name (Maybe FastString, Propagation) -> NHsValBindsLR GhcRn -> WriterT (Set Name) (StateT (Set Name) TcM) (NHsValBindsLR GhcRn) -- | Instrument default method implementations in a type class declaration -- if they contain a Debug pred. modifyTyClDecl :: DebugNames -> Map Name (Maybe FastString, Propagation) -> TyClDecl GhcRn -> WriterT (Set Name) (StateT (Set Name) TcM) (TyClDecl GhcRn) -- | Instrument the method implementations in an type class instance if it -- has a signature containing a debug pred. modifyClsInstDecl :: DebugNames -> Map Name (Maybe FastString, Propagation) -> ClsInstDecl GhcRn -> WriterT (Set Name) (StateT (Set Name) TcM) (ClsInstDecl GhcRn) module Graph.Trace plugin :: Plugin