-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Set breakpoints using a GHC plugin
--
-- A plugin that allows you to set breakpoints for debugging purposes.
@package breakpoint
@version 0.1.4.0
module Debug.Breakpoint.GhcFacade
data () => Levity
Lifted :: Levity
Unlifted :: Levity
-- | TyCons represent type constructors. Type constructors are introduced
-- by things such as:
--
-- 1) Data declarations: data Foo = ... creates the Foo
-- type constructor of kind *
--
-- 2) Type synonyms: type Foo = ... creates the Foo
-- type constructor
--
-- 3) Newtypes: newtype Foo a = MkFoo ... creates the
-- Foo type constructor of kind * -> *
--
-- 4) Class declarations: class Foo where creates the
-- Foo type constructor of kind *
--
-- This data type also encodes a number of primitive, built in type
-- constructors such as those for function and tuple types.
--
-- If you edit this type, you may need to update the GHC formalism See
-- Note [GHC Formalism] in GHC.Core.Lint
data () => TyCon
-- | A Module is a pair of a Unit and a ModuleName.
type Module = GenModule Unit
data () => Type
-- | Vanilla type or kind variable (*never* a coercion variable)
TyVarTy :: Var -> Type
-- | Type application to something other than a TyCon. Parameters:
--
-- 1) Function: must not be a TyConApp or CastTy,
-- must be another AppTy, or TyVarTy See Note [Respecting
-- definitional equality] (EQ1) about the no CastTy requirement
--
-- 2) Argument type
AppTy :: Type -> Type -> Type
-- | Application of a TyCon, including newtypes and synonyms.
-- Invariant: saturated applications of FunTyCon must use
-- FunTy and saturated synonyms must use their own constructors.
-- However, unsaturated FunTyCons do appear as
-- TyConApps. Parameters:
--
-- 1) Type constructor being applied to.
--
-- 2) Type arguments. Might not have enough type arguments here to
-- saturate the constructor. Even type synonyms are not necessarily
-- saturated; for example unsaturated type synonyms can appear as the
-- right hand side of a type synonym.
TyConApp :: TyCon -> [KindOrType] -> Type
-- | A Π type. Note [When we quantify over a coercion variable] INVARIANT:
-- If the binder is a coercion variable, it must be mentioned in the
-- Type. See Note [Unused coercion variable in ForAllTy]
ForAllTy :: {-# UNPACK #-} !ForAllTyBinder -> Type -> Type
-- | FUN m t1 t2 Very common, so an important special case See Note
-- [Function types]
FunTy :: FunTyFlag -> Mult -> Type -> Type -> Type
[ft_af] :: Type -> FunTyFlag
[ft_mult] :: Type -> Mult
[ft_arg] :: Type -> Type
[ft_res] :: Type -> Type
-- | Type literals are similar to type constructors.
LitTy :: TyLit -> Type
-- | A kind cast. The coercion is always nominal. INVARIANT: The cast is
-- never reflexive (EQ2) INVARIANT: The Type is not a CastTy (use TransCo
-- instead) (EQ3) INVARIANT: The Type is not a ForAllTy over a tyvar
-- (EQ4) See Note [Respecting definitional equality]
CastTy :: Type -> KindCoercion -> Type
-- | Injection of a Coercion into a type This should only ever be used in
-- the RHS of an AppTy, in the list of a TyConApp, when applying a
-- promoted GADT data constructor
CoercionTy :: Coercion -> Type
-- | A functor with application, providing operations to
--
--
-- - embed pure expressions (pure), and
-- - sequence computations and combine their results (<*>
-- and liftA2).
--
--
-- A minimal complete definition must include implementations of
-- pure and of either <*> or liftA2. If it
-- defines both, then they must behave the same as their default
-- definitions:
--
--
-- (<*>) = liftA2 id
--
--
--
-- liftA2 f x y = f <$> x <*> y
--
--
-- Further, any definition must satisfy the following:
--
--
--
-- The other methods have the following default definitions, which may be
-- overridden with equivalent specialized implementations:
--
--
--
-- As a consequence of these laws, the Functor instance for
-- f will satisfy
--
--
--
-- It may be useful to note that supposing
--
--
-- forall x y. p (q x y) = f x . g y
--
--
-- it follows from the above that
--
--
-- liftA2 p (liftA2 q u v) = liftA2 f u . liftA2 g v
--
--
-- If f is also a Monad, it should satisfy
--
--
--
-- (which implies that pure and <*> satisfy the
-- applicative functor laws).
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.
--
-- Example
--
-- Used in combination with (<$>),
-- (<*>) can be used to build a record.
--
--
-- >>> data MyState = MyState {arg1 :: Foo, arg2 :: Bar, arg3 :: Baz}
--
--
--
-- >>> produceFoo :: Applicative f => f Foo
--
--
--
-- >>> produceBar :: Applicative f => f Bar
--
-- >>> produceBaz :: Applicative f => f Baz
--
--
--
-- >>> mkState :: Applicative f => f MyState
--
-- >>> mkState = MyState <$> produceFoo <*> produceBar <*> produceBaz
--
(<*>) :: 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.
--
-- Example
--
--
-- >>> liftA2 (,) (Just 3) (Just 5)
-- Just (3,5)
--
liftA2 :: Applicative f => (a -> b -> c) -> f a -> f b -> f c
-- | Sequence actions, discarding the value of the first argument.
--
-- Examples
--
-- If used in conjunction with the Applicative instance for Maybe,
-- you can chain Maybe computations, with a possible "early return" in
-- case of Nothing.
--
--
-- >>> Just 2 *> Just 3
-- Just 3
--
--
--
-- >>> Nothing *> Just 3
-- Nothing
--
--
-- Of course a more interesting use case would be to have effectful
-- computations instead of just returning pure values.
--
--
-- >>> import Data.Char
--
-- >>> import Text.ParserCombinators.ReadP
--
-- >>> let p = string "my name is " *> munch1 isAlpha <* eof
--
-- >>> readP_to_S p "my name is Simon"
-- [("Simon","")]
--
(*>) :: Applicative f => f a -> f b -> f b
-- | Sequence actions, discarding the value of the second argument.
(<*) :: Applicative f => f a -> f b -> f a
infixl 4 <*>
infixl 4 *>
infixl 4 <*
-- | 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. This allows us to run IO
-- computations in any monadic stack, so long as it supports these kinds
-- of operations (i.e. IO is the base monad for the stack).
--
-- Example
--
--
-- import Control.Monad.Trans.State -- from the "transformers" library
--
-- printState :: Show s => StateT s IO ()
-- printState = do
-- state <- get
-- liftIO $ print state
--
--
-- Had we omitted liftIO, we would have ended up with
-- this error:
--
--
-- • Couldn't match type ‘IO’ with ‘StateT s IO’
-- Expected type: StateT s IO ()
-- Actual type: IO ()
--
--
-- The important part here is the mismatch between StateT s IO
-- () and IO ().
--
-- Luckily, we know of a function that takes an IO a and
-- returns an (m a): liftIO, enabling us to run
-- the program and see the expected results:
--
--
-- > evalStateT printState "hello"
-- "hello"
--
-- > evalStateT printState 3
-- 3
--
liftIO :: MonadIO m => IO a -> m a
-- | Monads having fixed points with a 'knot-tying' semantics. Instances of
-- MonadFix should satisfy the following laws:
--
--
-- - Purity mfix (return . h) = return
-- (fix h)
-- - Left shrinking (or Tightening) mfix (\x -> a
-- >>= \y -> f x y) = a >>= \y -> mfix (\x ->
-- f x y)
-- - Sliding mfix (liftM h . f) = liftM
-- h (mfix (f . h)), for strict h.
-- - Nesting mfix (\x -> mfix (\y -> f x
-- y)) = mfix (\x -> f x x)
--
--
-- This class is used in the translation of the recursive do
-- notation supported by GHC and Hugs.
class Monad m => MonadFix (m :: Type -> Type)
-- | The fixed point of a monadic computation. mfix f
-- executes the action f only once, with the eventual output fed
-- back as the input. Hence f should not be strict, for then
-- mfix f would diverge.
mfix :: MonadFix m => (a -> m a) -> m a
-- | Source Location
data () => SrcLoc
RealSrcLoc :: !RealSrcLoc -> !Maybe BufPos -> SrcLoc
UnhelpfulLoc :: !FastString -> SrcLoc
-- | A Coercion is concrete evidence of the equality/convertibility
-- of two types.
data () => Coercion
Refl :: Type -> Coercion
GRefl :: Role -> Type -> MCoercionN -> Coercion
TyConAppCo :: Role -> TyCon -> [Coercion] -> Coercion
AppCo :: Coercion -> CoercionN -> Coercion
ForAllCo :: TyCoVar -> KindCoercion -> Coercion -> Coercion
FunCo :: Role -> FunTyFlag -> FunTyFlag -> CoercionN -> Coercion -> Coercion -> Coercion
[fco_role] :: Coercion -> Role
[fco_afl] :: Coercion -> FunTyFlag
[fco_afr] :: Coercion -> FunTyFlag
[fco_mult] :: Coercion -> CoercionN
[fco_arg] :: Coercion -> Coercion
[fco_res] :: Coercion -> Coercion
CoVarCo :: CoVar -> Coercion
AxiomInstCo :: CoAxiom Branched -> BranchIndex -> [Coercion] -> Coercion
AxiomRuleCo :: CoAxiomRule -> [Coercion] -> Coercion
UnivCo :: UnivCoProvenance -> Role -> Type -> Type -> Coercion
SymCo :: Coercion -> Coercion
TransCo :: Coercion -> Coercion -> Coercion
SelCo :: CoSel -> Coercion -> Coercion
LRCo :: LeftOrRight -> CoercionN -> Coercion
InstCo :: Coercion -> CoercionN -> Coercion
KindCo :: Coercion -> Coercion
SubCo :: CoercionN -> Coercion
-- | See Note [Coercion holes] Only present during typechecking
HoleCo :: CoercionHole -> Coercion
-- | A mutable variable in the IO monad.
--
--
-- >>> import Data.IORef
--
-- >>> r <- newIORef 0
--
-- >>> readIORef r
-- 0
--
-- >>> writeIORef r 1
--
-- >>> readIORef r
-- 1
--
-- >>> atomicWriteIORef r 2
--
-- >>> readIORef r
-- 2
--
-- >>> modifyIORef' r (+ 1)
--
-- >>> readIORef r
-- 3
--
-- >>> atomicModifyIORef' r (\a -> (a + 1, ()))
--
-- >>> readIORef r
-- 4
--
--
-- See also STRef and MVar.
data () => IORef a
-- | 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
-- | Represents a pretty-printable document.
--
-- To display an SDoc, use printSDoc, printSDocLn,
-- bufLeftRenderSDoc, or renderWithContext. Avoid calling
-- runSDoc directly as it breaks the abstraction layer.
data () => SDoc
-- | Exact print annotations exist so that tools can perform source to
-- source conversions of Haskell code. They are used to keep track of the
-- various syntactic keywords that are not otherwise captured in the AST.
--
-- The wiki page describing this feature is
-- https://gitlab.haskell.org/ghc/ghc/wikis/api-annotations
-- https://gitlab.haskell.org/ghc/ghc/-/wikis/implementing-trees-that-grow/in-tree-api-annotations
--
-- Note: in general the names of these are taken from the corresponding
-- token, unless otherwise noted See Note [exact print annotations] above
-- for details of the usage
data () => AnnKeywordId
AnnAnyclass :: AnnKeywordId
AnnAs :: AnnKeywordId
-- | !
AnnBang :: AnnKeywordId
-- | '`'
AnnBackquote :: AnnKeywordId
AnnBy :: AnnKeywordId
-- | case or lambda case
AnnCase :: AnnKeywordId
-- | lambda cases
AnnCases :: AnnKeywordId
AnnClass :: AnnKeywordId
-- | '#)' or '#-}' etc
AnnClose :: AnnKeywordId
-- | '|)'
AnnCloseB :: AnnKeywordId
-- | '|)', unicode variant
AnnCloseBU :: AnnKeywordId
-- | '}'
AnnCloseC :: AnnKeywordId
-- | '|]'
AnnCloseQ :: AnnKeywordId
-- | '|]', unicode variant
AnnCloseQU :: AnnKeywordId
-- | ')'
AnnCloseP :: AnnKeywordId
-- | '#)'
AnnClosePH :: AnnKeywordId
-- | ']'
AnnCloseS :: AnnKeywordId
AnnColon :: AnnKeywordId
-- | as a list separator
AnnComma :: AnnKeywordId
-- | in a RdrName for a tuple
AnnCommaTuple :: AnnKeywordId
-- | '=>'
AnnDarrow :: AnnKeywordId
-- | '=>', unicode variant
AnnDarrowU :: AnnKeywordId
AnnData :: AnnKeywordId
-- | '::'
AnnDcolon :: AnnKeywordId
-- | '::', unicode variant
AnnDcolonU :: AnnKeywordId
AnnDefault :: AnnKeywordId
AnnDeriving :: AnnKeywordId
AnnDo :: AnnKeywordId
-- | .
AnnDot :: AnnKeywordId
-- | '..'
AnnDotdot :: AnnKeywordId
AnnElse :: AnnKeywordId
AnnEqual :: AnnKeywordId
AnnExport :: AnnKeywordId
AnnFamily :: AnnKeywordId
AnnForall :: AnnKeywordId
-- | Unicode variant
AnnForallU :: AnnKeywordId
AnnForeign :: AnnKeywordId
-- | for function name in matches where there are multiple equations for
-- the function.
AnnFunId :: AnnKeywordId
AnnGroup :: AnnKeywordId
-- | for CType
AnnHeader :: AnnKeywordId
AnnHiding :: AnnKeywordId
AnnIf :: AnnKeywordId
AnnImport :: AnnKeywordId
AnnIn :: AnnKeywordId
-- | 'infix' or 'infixl' or 'infixr'
AnnInfix :: AnnKeywordId
AnnInstance :: AnnKeywordId
AnnLam :: AnnKeywordId
-- | '<-'
AnnLarrow :: AnnKeywordId
-- | '<-', unicode variant
AnnLarrowU :: AnnKeywordId
AnnLet :: AnnKeywordId
-- | The ⊸ unicode arrow
AnnLollyU :: AnnKeywordId
AnnMdo :: AnnKeywordId
-- | -
AnnMinus :: AnnKeywordId
AnnModule :: AnnKeywordId
AnnNewtype :: AnnKeywordId
-- | where a name loses its location in the AST, this carries it
AnnName :: AnnKeywordId
AnnOf :: AnnKeywordId
-- | '{-# DEPRECATED' etc. Opening of pragmas where the capitalisation of
-- the string can be changed by the user. The actual text used is stored
-- in a SourceText on the relevant pragma item.
AnnOpen :: AnnKeywordId
-- | '(|'
AnnOpenB :: AnnKeywordId
-- | '(|', unicode variant
AnnOpenBU :: AnnKeywordId
-- | '{'
AnnOpenC :: AnnKeywordId
-- | '[e|' or '[e||'
AnnOpenE :: AnnKeywordId
-- | '[|'
AnnOpenEQ :: AnnKeywordId
-- | '[|', unicode variant
AnnOpenEQU :: AnnKeywordId
-- | '('
AnnOpenP :: AnnKeywordId
-- | '['
AnnOpenS :: AnnKeywordId
-- | '(#'
AnnOpenPH :: AnnKeywordId
-- | prefix $ -- TemplateHaskell
AnnDollar :: AnnKeywordId
-- | prefix $$ -- TemplateHaskell
AnnDollarDollar :: AnnKeywordId
AnnPackageName :: AnnKeywordId
AnnPattern :: AnnKeywordId
-- | % -- for HsExplicitMult
AnnPercent :: AnnKeywordId
-- | '%1' -- for HsLinearArrow
AnnPercentOne :: AnnKeywordId
AnnProc :: AnnKeywordId
AnnQualified :: AnnKeywordId
-- | ->
AnnRarrow :: AnnKeywordId
-- | ->, unicode variant
AnnRarrowU :: AnnKeywordId
AnnRec :: AnnKeywordId
AnnRole :: AnnKeywordId
AnnSafe :: AnnKeywordId
-- | ';'
AnnSemi :: AnnKeywordId
-- | '''
AnnSimpleQuote :: AnnKeywordId
AnnSignature :: AnnKeywordId
-- | static
AnnStatic :: AnnKeywordId
AnnStock :: AnnKeywordId
AnnThen :: AnnKeywordId
-- | double '''
AnnThTyQuote :: AnnKeywordId
-- | ~
AnnTilde :: AnnKeywordId
AnnType :: AnnKeywordId
-- | () for types
AnnUnit :: AnnKeywordId
AnnUsing :: AnnKeywordId
-- | e.g. INTEGER
AnnVal :: AnnKeywordId
-- | String value, will need quotes when output
AnnValStr :: AnnKeywordId
-- | '|'
AnnVbar :: AnnKeywordId
-- | via
AnnVia :: AnnKeywordId
AnnWhere :: AnnKeywordId
-- | -<
Annlarrowtail :: AnnKeywordId
-- | -<, unicode variant
AnnlarrowtailU :: AnnKeywordId
-- | ->
Annrarrowtail :: AnnKeywordId
-- | ->, unicode variant
AnnrarrowtailU :: AnnKeywordId
-- | -<<
AnnLarrowtail :: AnnKeywordId
-- | -<<, unicode variant
AnnLarrowtailU :: AnnKeywordId
-- | >>-
AnnRarrowtail :: AnnKeywordId
-- | >>-, unicode variant
AnnRarrowtailU :: AnnKeywordId
-- | Annotation Declaration
data () => AnnDecl pass
-- |
HsAnnotation :: XHsAnnotation pass -> AnnProvenance pass -> XRec pass (HsExpr pass) -> AnnDecl pass
XAnnDecl :: !XXAnnDecl pass -> AnnDecl pass
-- | Imported or exported entity.
data () => IE pass
-- | Imported or Exported Variable
IEVar :: XIEVar pass -> LIEWrappedName pass -> IE pass
-- | Imported or exported Thing with Absent list
--
-- The thing is a Class/Type (can't tell) - AnnKeywordIds :
-- AnnPattern, AnnType,AnnVal
IEThingAbs :: XIEThingAbs pass -> LIEWrappedName pass -> IE pass
-- | Imported or exported Thing with All imported or exported
--
-- The thing is a ClassType and the All refers to
-- methodsconstructors
--
--
IEThingAll :: XIEThingAll pass -> LIEWrappedName pass -> IE pass
-- | Imported or exported Thing With given imported or exported
--
-- The thing is a Class/Type and the imported or exported things are
-- methods/constructors and record fields; see Note [IEThingWith] -
-- AnnKeywordIds : AnnOpen, AnnClose,
-- AnnComma, AnnType
IEThingWith :: XIEThingWith pass -> LIEWrappedName pass -> IEWildcard -> [LIEWrappedName pass] -> IE pass
-- | Imported or exported module contents
--
-- (Export Only)
--
--
IEModuleContents :: XIEModuleContents pass -> XRec pass ModuleName -> IE pass
-- | Doc section heading
IEGroup :: XIEGroup pass -> Int -> LHsDoc pass -> IE pass
-- | Some documentation
IEDoc :: XIEDoc pass -> LHsDoc pass -> IE pass
-- | Reference to named doc
IEDocNamed :: XIEDocNamed pass -> String -> IE pass
XIE :: !XXIE pass -> IE pass
-- | The key type representing kinds in the compiler.
type Kind = Type
-- | A Haskell expression.
data () => HsExpr p
-- | Variable See Note [Located RdrNames]
HsVar :: XVar p -> LIdP p -> HsExpr p
-- | Unbound variable; also used for "holes" (_ or _x). Turned from HsVar
-- to HsUnboundVar by the renamer, when it finds an out-of-scope variable
-- or hole. The (XUnboundVar p) field becomes an HoleExprRef after
-- typechecking; this is where the erroring expression will be written
-- after solving. See Note [Holes] in GHC.Tc.Types.Constraint.
HsUnboundVar :: XUnboundVar p -> RdrName -> HsExpr p
-- | Variable pointing to record selector See Note [Non-overloaded record
-- field selectors] and Note [Record selectors in the AST]
HsRecSel :: XRecSel p -> FieldOcc p -> HsExpr p
-- | Overloaded label (Note [Overloaded labels] in GHC.OverloadedLabels)
-- Note [Pragma source text] in GHC.Types.SourceText
HsOverLabel :: XOverLabel p -> SourceText -> FastString -> HsExpr p
-- | Implicit parameter (not in use after typechecking)
HsIPVar :: XIPVar p -> HsIPName -> HsExpr p
-- | Overloaded literals
HsOverLit :: XOverLitE p -> HsOverLit p -> HsExpr p
-- | Simple (non-overloaded) literals
HsLit :: XLitE p -> HsLit p -> HsExpr p
-- | Lambda abstraction. Currently always a single match
--
--
HsLam :: XLam p -> MatchGroup p (LHsExpr p) -> HsExpr p
-- | Lambda-case
--
--
HsLamCase :: XLamCase p -> LamCaseVariant -> MatchGroup p (LHsExpr p) -> HsExpr p
-- | Application
HsApp :: XApp p -> LHsExpr p -> LHsExpr p -> HsExpr p
-- | Visible type application
--
-- Explicit type argument; e.g f @Int x y NB: Has wildcards, but no
-- implicit quantification
--
--
HsAppType :: XAppTypeE p -> LHsExpr p -> !LHsToken "@" p -> LHsWcType (NoGhcTc p) -> HsExpr p
-- | Operator applications: NB Bracketed ops such as (+) come out as Vars.
OpApp :: XOpApp p -> LHsExpr p -> LHsExpr p -> LHsExpr p -> HsExpr p
-- | Negation operator. Contains the negated expression and the name of
-- negate
--
--
NegApp :: XNegApp p -> LHsExpr p -> SyntaxExpr p -> HsExpr p
-- |
HsPar :: XPar p -> !LHsToken "(" p -> LHsExpr p -> !LHsToken ")" p -> HsExpr p
SectionL :: XSectionL p -> LHsExpr p -> LHsExpr p -> HsExpr p
SectionR :: XSectionR p -> LHsExpr p -> LHsExpr p -> HsExpr p
-- | Used for explicit tuples and sections thereof
--
--
ExplicitTuple :: XExplicitTuple p -> [HsTupArg p] -> Boxity -> HsExpr p
-- | Used for unboxed sum types
--
--
--
-- There will be multiple AnnVbar, (1 - alternative) before the
-- expression, (arity - alternative) after it
ExplicitSum :: XExplicitSum p -> ConTag -> SumWidth -> LHsExpr p -> HsExpr p
-- |
HsCase :: XCase p -> LHsExpr p -> MatchGroup p (LHsExpr p) -> HsExpr p
-- |
HsIf :: XIf p -> LHsExpr p -> LHsExpr p -> LHsExpr p -> HsExpr p
-- | Multi-way if
--
--
HsMultiIf :: XMultiIf p -> [LGRHS p (LHsExpr p)] -> HsExpr p
-- | let(rec)
--
--
HsLet :: XLet p -> !LHsToken "let" p -> HsLocalBinds p -> !LHsToken "in" p -> LHsExpr p -> HsExpr p
-- |
HsDo :: XDo p -> HsDoFlavour -> XRec p [ExprLStmt p] -> HsExpr p
-- | Syntactic list: [a,b,c,...]
--
--
ExplicitList :: XExplicitList p -> [LHsExpr p] -> HsExpr p
-- | Record construction
--
--
RecordCon :: XRecordCon p -> XRec p (ConLikeP p) -> HsRecordBinds p -> HsExpr p
[rcon_ext] :: HsExpr p -> XRecordCon p
[rcon_con] :: HsExpr p -> XRec p (ConLikeP p)
[rcon_flds] :: HsExpr p -> HsRecordBinds p
-- | Record update
--
--
RecordUpd :: XRecordUpd p -> LHsExpr p -> Either [LHsRecUpdField p] [LHsRecUpdProj p] -> HsExpr p
[rupd_ext] :: HsExpr p -> XRecordUpd p
[rupd_expr] :: HsExpr p -> LHsExpr p
[rupd_flds] :: HsExpr p -> Either [LHsRecUpdField p] [LHsRecUpdProj p]
-- | Record field selection e.g z.x.
--
--
HsGetField :: XGetField p -> LHsExpr p -> XRec p (DotFieldOcc p) -> HsExpr p
[gf_ext] :: HsExpr p -> XGetField p
[gf_expr] :: HsExpr p -> LHsExpr p
[gf_field] :: HsExpr p -> XRec p (DotFieldOcc p)
-- | Record field selector. e.g. (.x) or (.x.y)
--
-- This case only arises when the OverloadedRecordDot langauge extensions
-- is enabled. See Note [Record selectors in the AST].
HsProjection :: XProjection p -> NonEmpty (XRec p (DotFieldOcc p)) -> HsExpr p
[proj_ext] :: HsExpr p -> XProjection p
[proj_flds] :: HsExpr p -> NonEmpty (XRec p (DotFieldOcc p))
-- | Expression with an explicit type signature. e :: type
--
--
ExprWithTySig :: XExprWithTySig p -> LHsExpr p -> LHsSigWcType (NoGhcTc p) -> HsExpr p
-- | Arithmetic sequence
--
--
ArithSeq :: XArithSeq p -> Maybe (SyntaxExpr p) -> ArithSeqInfo p -> HsExpr p
-- |
HsTypedBracket :: XTypedBracket p -> LHsExpr p -> HsExpr p
HsUntypedBracket :: XUntypedBracket p -> HsQuote p -> HsExpr p
-- |
HsTypedSplice :: XTypedSplice p -> LHsExpr p -> HsExpr p
HsUntypedSplice :: XUntypedSplice p -> HsUntypedSplice p -> HsExpr p
-- | proc notation for Arrows
--
--
HsProc :: XProc p -> LPat p -> LHsCmdTop p -> HsExpr p
-- |
HsStatic :: XStatic p -> LHsExpr p -> HsExpr p
HsPragE :: XPragE p -> HsPragE p -> LHsExpr p -> HsExpr p
XExpr :: !XXExpr p -> HsExpr p
-- | Identifier
type Id = Var
-- | Type & coercion & id substitution
--
-- The Subst data type defined in this module contains
-- substitution for tyvar, covar and id. However, operations on
-- IdSubstEnv (mapping from Id to CoreExpr) that require
-- the definition of the Expr data type are defined in
-- GHC.Core.Subst to avoid circular module dependency.
data () => Subst
Subst :: InScopeSet -> IdSubstEnv -> TvSubstEnv -> CvSubstEnv -> Subst
-- | A placeholder type for TTG extension points that are not currently
-- unused to represent any particular value.
--
-- This should not be confused with DataConCantHappen, which are
-- found in unused extension constructors and therefore should
-- never be inhabited. In contrast, NoExtField is used in
-- extension points (e.g., as the field of some constructor), so
-- it must have an inhabitant to construct AST passes that manipulate
-- fields with that extension point as their type.
data () => NoExtField
NoExtField :: NoExtField
-- | 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 -> KnotVars (IORef TypeEnv) -> !InstEnv -> !FamInstEnv -> AnnEnv -> [AvailInfo] -> ImportAvails -> DefUses -> TcRef [GlobalRdrElt] -> TcRef NameSet -> TcRef Bool -> TcRef Bool -> TcRef ([Linkable], PkgsLoaded) -> TcRef OccSet -> [(Module, Fingerprint)] -> Maybe [(LIE 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))) -> TcRef THDocs -> Bag EvBind -> Maybe Id -> LHsBinds GhcTc -> NameSet -> [LTcSpecPrag] -> Warnings GhcRn -> [Annotation] -> [TyCon] -> NameSet -> [ClsInst] -> [FamInst] -> [LRuleDecl GhcTc] -> [LForeignDecl GhcTc] -> [PatSyn] -> Maybe (LHsDoc GhcRn) -> !AnyHpcUsage -> SelfBootInfo -> Maybe Name -> TcRef Bool -> TcRef (Messages TcRnMessage) -> [TcPluginSolver] -> UniqFM TyCon [TcPluginRewriter] -> [FillDefaulting] -> [HoleFitPlugin] -> RealSrcSpan -> TcRef WantedConstraints -> !CompleteMatches -> TcRef CostCentreState -> TcRef (ModuleEnv Int) -> 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
-- GHC.Runtime.Context
[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 GHC.Runtime.Context
[tcg_type_env] :: TcGblEnv -> TypeEnv
[tcg_type_env_var] :: TcGblEnv -> KnotVars (IORef 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:
--
--
-- - All of the modules you directly imported (tcRnImports)
-- - The orphans (only!) of all imported modules in a GHCi session
-- (runTcInteractive)
-- - The module that instantiated a signature
-- - Each of the signatures that merged in
--
--
-- It is used in the following ways: - imp_orphs is used to determine
-- what orphan modules should be visible in the context
-- (tcVisibleOrphanMods) - imp_finsts is used to determine what family
-- instances should be visible (tcExtendLocalFamInstEnv) - To resolve the
-- meaning of the export list of a module (tcRnExports) - imp_mods is
-- used to compute usage info (mkIfaceTc, deSugar) - imp_trust_own_pkg is
-- used for Safe Haskell in interfaces (mkIfaceTc, as well as in
-- GHC.Driver.Main) - To create the Dependencies field in
-- interface (mkDependencies)
[tcg_imports] :: TcGblEnv -> ImportAvails
[tcg_dus] :: TcGblEnv -> DefUses
[tcg_used_gres] :: TcGblEnv -> TcRef [GlobalRdrElt]
[tcg_keep] :: TcGblEnv -> TcRef NameSet
-- | True <=> Template Haskell syntax used.
--
-- We need this so that we can generate a dependency on the Template
-- Haskell package, because the desugarer is going to emit loads of
-- references to TH symbols. The reference is implicit rather than
-- explicit, so we have to zap a mutable variable.
[tcg_th_used] :: TcGblEnv -> TcRef Bool
-- | True <=> A Template Haskell splice was used.
--
-- Splices disable recompilation avoidance (see #481)
[tcg_th_splice_used] :: TcGblEnv -> TcRef Bool
-- | The set of runtime dependencies required by this module See Note
-- [Object File Dependencies]
[tcg_th_needed_deps] :: TcGblEnv -> TcRef ([Linkable], PkgsLoaded)
-- | Allows us to choose unique DFun names.
[tcg_dfun_n] :: TcGblEnv -> TcRef OccSet
-- | The requirements we merged with; we always have to recompile if any of
-- these changed.
[tcg_merged] :: TcGblEnv -> [(Module, Fingerprint)]
[tcg_rn_exports] :: TcGblEnv -> Maybe [(LIE GhcRn, Avails)]
[tcg_rn_imports] :: TcGblEnv -> [LImportDecl GhcRn]
-- | Renamed decls, maybe. Nothing <=> Don't retain renamed
-- decls.
[tcg_rn_decls] :: TcGblEnv -> Maybe (HsGroup GhcRn)
-- | dependencies from addDependentFile
[tcg_dependent_files] :: TcGblEnv -> TcRef [FilePath]
-- | Top-level declarations from addTopDecls
[tcg_th_topdecls] :: TcGblEnv -> TcRef [LHsDecl GhcPs]
-- | Foreign files emitted from TH.
[tcg_th_foreign_files] :: TcGblEnv -> TcRef [(ForeignSrcLang, FilePath)]
-- | Exact names bound in top-level declarations in tcg_th_topdecls
[tcg_th_topnames] :: TcGblEnv -> TcRef NameSet
-- | Template Haskell module finalizers.
--
-- They can use particular local environments.
[tcg_th_modfinalizers] :: TcGblEnv -> TcRef [(TcLclEnv, ThModFinalizers)]
-- | Core plugins added by Template Haskell code.
[tcg_th_coreplugins] :: TcGblEnv -> TcRef [String]
[tcg_th_state] :: TcGblEnv -> TcRef (Map TypeRep Dynamic)
-- | Template Haskell state
[tcg_th_remote_state] :: TcGblEnv -> TcRef (Maybe (ForeignRef (IORef QState)))
-- | Docs added in Template Haskell via putDoc.
[tcg_th_docs] :: TcGblEnv -> TcRef THDocs
[tcg_ev_binds] :: TcGblEnv -> Bag EvBind
[tcg_tr_module] :: TcGblEnv -> Maybe Id
[tcg_binds] :: TcGblEnv -> LHsBinds GhcTc
[tcg_sigs] :: TcGblEnv -> NameSet
[tcg_imp_specs] :: TcGblEnv -> [LTcSpecPrag]
[tcg_warns] :: TcGblEnv -> Warnings GhcRn
[tcg_anns] :: TcGblEnv -> [Annotation]
[tcg_tcs] :: TcGblEnv -> [TyCon]
[tcg_ksigs] :: TcGblEnv -> NameSet
[tcg_insts] :: TcGblEnv -> [ClsInst]
[tcg_fam_insts] :: TcGblEnv -> [FamInst]
[tcg_rules] :: TcGblEnv -> [LRuleDecl GhcTc]
[tcg_fords] :: TcGblEnv -> [LForeignDecl GhcTc]
[tcg_patsyns] :: TcGblEnv -> [PatSyn]
-- | Maybe Haddock header docs
[tcg_doc_hdr] :: TcGblEnv -> Maybe (LHsDoc GhcRn)
-- | True if any part of the prog uses hpc instrumentation. NB.
-- BangPattern is to fix a leak, see #15111
[tcg_hpc] :: TcGblEnv -> !AnyHpcUsage
-- | Whether this module has a corresponding hi-boot file
[tcg_self_boot] :: TcGblEnv -> SelfBootInfo
-- | The Name of the main function, if this module is the main module.
[tcg_main] :: TcGblEnv -> Maybe Name
-- | Has the typechecker inferred this module as -XSafe (Safe Haskell)? See
-- Note [Safe Haskell Overlapping Instances Implementation], although
-- this is used for more than just that failure case.
[tcg_safe_infer] :: TcGblEnv -> TcRef Bool
-- | Unreported reasons why tcg_safe_infer is False. INVARIANT: If this
-- Messages is non-empty, then tcg_safe_infer is False. It may be that
-- tcg_safe_infer is False but this is empty, if no reasons are supplied
-- (#19714), or if those reasons have already been reported by
-- GHC.Driver.Main.markUnsafeInfer
[tcg_safe_infer_reasons] :: TcGblEnv -> TcRef (Messages TcRnMessage)
-- | A list of user-defined type-checking plugins for constraint solving.
[tcg_tc_plugin_solvers] :: TcGblEnv -> [TcPluginSolver]
-- | A collection of all the user-defined type-checking plugins for
-- rewriting type family applications, collated by their type family
-- TyCons.
[tcg_tc_plugin_rewriters] :: TcGblEnv -> UniqFM TyCon [TcPluginRewriter]
-- | A list of user-defined plugins for type defaulting plugins.
[tcg_defaulting_plugins] :: TcGblEnv -> [FillDefaulting]
-- | A list of user-defined plugins for hole fit suggestions.
[tcg_hf_plugins] :: TcGblEnv -> [HoleFitPlugin]
-- | The RealSrcSpan this module came from
[tcg_top_loc] :: TcGblEnv -> RealSrcSpan
-- | Wanted constraints of static forms. See Note [Constraints in static
-- forms].
[tcg_static_wc] :: TcGblEnv -> TcRef WantedConstraints
-- | Tracking indices for cost centre annotations
[tcg_complete_matches] :: TcGblEnv -> !CompleteMatches
[tcg_cc_st] :: TcGblEnv -> TcRef CostCentreState
-- | See Note [Generating fresh names for FFI wrappers]
[tcg_next_wrapper_num] :: TcGblEnv -> TcRef (ModuleEnv Int)
-- | 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 -> DefaultingPlugin -> HoleFitPlugin -> ([CommandLineOption] -> HscEnv -> IO HscEnv) -> ([CommandLineOption] -> IO PluginRecompile) -> ([CommandLineOption] -> ModSummary -> ParsedResult -> Hsc ParsedResult) -> ([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 defaulting plugin, which may specify the additional
-- type-defaulting rules.
[defaultingPlugin] :: Plugin -> DefaultingPlugin
-- | 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 HscEnv, right after plugin
-- loading. This can be used to register hooks or tweak any field of
-- DynFlags before doing actual work on a module.
[driverPlugin] :: Plugin -> [CommandLineOption] -> HscEnv -> IO HscEnv
-- | Specify how the plugin should affect recompilation.
[pluginRecompile] :: Plugin -> [CommandLineOption] -> IO PluginRecompile
-- | Modify the module when it is parsed. This is called by
-- GHC.Driver.Main when the parser has produced no or only
-- non-fatal errors. Compilation will fail if the messages produced by
-- this function contain any errors.
[parsedResultAction] :: Plugin -> [CommandLineOption] -> ModSummary -> ParsedResult -> Hsc ParsedResult
-- | 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
-- GHC.Iface.Load 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
-- | 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
-- | JavaScript
LangJs :: ForeignSrcLang
-- | Object (.o)
RawObject :: ForeignSrcLang
-- | A PtrString is a pointer to some array of Latin-1 encoded
-- chars.
data () => PtrString
PtrString :: !Ptr Word8 -> !Int -> PtrString
-- | Lexical FastString
--
-- This is a simple FastString wrapper with an Ord instance using
-- lexicalCompareFS (i.e. which compares FastStrings on their
-- String representation). Hence it is deterministic from one run to the
-- other.
newtype () => LexicalFastString
LexicalFastString :: FastString -> LexicalFastString
-- | Non-deterministic FastString
--
-- This is a simple FastString wrapper with an Ord instance using
-- uniqCompareFS (i.e. which compares FastStrings on their
-- Uniques). Hence it is not deterministic from one run to the other.
newtype () => NonDetFastString
NonDetFastString :: FastString -> NonDetFastString
-- | 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 #-} !ShortByteString -> FastZString -> FastString
[uniq] :: FastString -> {-# UNPACK #-} !Int
[n_chars] :: FastString -> {-# UNPACK #-} !Int
[fs_sbs] :: FastString -> {-# UNPACK #-} !ShortByteString
-- | Lazily computed Z-encoding of this string. See Note [Z-Encoding] in
-- GHC.Utils.Encoding.
--
-- Since FastStrings are globally memoized this is computed at
-- most once for any given string.
[fs_zenc] :: FastString -> FastZString
data () => FastZString
-- | See Note [Roles] in GHC.Core.Coercion
--
-- Order of constructors matters: the Ord instance coincides with the
-- *super*typing relation on roles.
data () => Role
Nominal :: Role
Representational :: Role
Phantom :: Role
-- | A *one-index* constructor tag
--
-- Type of the tags associated with each constructor possibility or
-- superclass selector
type ConTag = Int
data () => Boxity
Boxed :: Boxity
Unboxed :: Boxity
-- | See Note [NoGhcTc] in GHC.Hs.Extension. It has to be in this module
-- because it is used like an extension point (in the data definitions of
-- types that should be parameter-agnostic.
type family NoGhcTc p
type family XXIEWrappedName p
type family XIEType p
type family XIEPattern p
type family XIEName p
type family XXIE x
type family XIEDocNamed x
type family XIEDoc x
type family XIEGroup x
type family XIEModuleContents x
type family XIEThingWith x
type family XIEThingAll x
type family XIEThingAbs x
type family XIEVar x
type family ImportDeclPkgQual x
type family XXImportDecl x
type family XCImportDecl x
type family XXFieldOcc x
type family XCFieldOcc x
type family XXConDeclField x
type family XConDeclField x
type family XXTyVarBndr x
type family XKindedTyVar x
type family XUserTyVar x
type family XXHsForAllTelescope x
type family XHsForAllInvis x
type family XHsForAllVis x
type family XXTyLit x
type family XCharTy x
type family XStrTy x
type family XNumTy x
type family XXType x
type family XWildCardTy x
type family XTyLit x
type family XExplicitTupleTy x
type family XExplicitListTy x
type family XRecTy x
type family XBangTy x
type family XDocTy x
type family XSpliceTy x
type family XKindSig x
type family XStarTy x
type family XIParamTy x
type family XParTy x
type family XOpTy x
type family XSumTy x
type family XTupleTy x
type family XListTy x
type family XFunTy x
type family XAppKindTy x
type family XAppTy x
type family XTyVar x
type family XQualTy x
type family XForAllTy x
type family XXHsPatSigType x
type family XHsPS x
type family XXHsWildCardBndrs x b
type family XHsWC x b
type family XXHsSigType x
type family XHsSig x
type family XXHsOuterTyVarBndrs x
type family XHsOuterExplicit x flag
type family XHsOuterImplicit x
type family XXLHsQTyVars x
type family XHsQTvs x
type family XHsFieldBind x
type family XXPat x
type family XCoPat x
type family XSigPat x
type family XNPlusKPat x
type family XNPat x
type family XLitPat x
type family XSplicePat x
type family XViewPat x
type family XConPat x
type family XSumPat x
type family XTuplePat x
type family XListPat x
type family XBangPat x
type family XParPat x
type family XAsPat x
type family XLazyPat x
type family XVarPat x
type family XWildPat x
type family XXOverLit x
type family XOverLit x
type family XXLit x
type family XHsDoublePrim x
type family XHsFloatPrim x
type family XHsRat x
type family XHsInteger x
type family XHsWord64Prim x
type family XHsInt64Prim x
type family XHsWordPrim x
type family XHsIntPrim x
type family XHsInt x
type family XHsStringPrim x
type family XHsString x
type family XHsCharPrim x
type family XHsChar x
type family XXApplicativeArg x
type family XApplicativeArgMany x
type family XApplicativeArgOne x
type family XXParStmtBlock x x'
type family XParStmtBlock x x'
type family XXCmd x
type family XCmdWrap x
type family XCmdDo x
type family XCmdLet x
type family XCmdIf x
type family XCmdLamCase x
type family XCmdCase x
type family XCmdPar x
type family XCmdLam x
type family XCmdApp x
type family XCmdArrForm x
type family XCmdArrApp x
type family XXStmtLR x x' b
type family XRecStmt x x' b
type family XTransStmt x x' b
type family XParStmt x x' b
type family XLetStmt x x' b
type family XBodyStmt x x' b
type family XApplicativeStmt x x' b
type family XBindStmt x x' b
type family XLastStmt x x' b
type family XXGRHS x b
type family XCGRHS x b
type family XXGRHSs x b
type family XCGRHSs x b
type family XXMatch x b
type family XCMatch x b
type family XXMatchGroup x b
type family XMG x b
type family XXCmdTop x
type family XCmdTop x
type family XXQuote x
type family XVarBr x
type family XTypBr x
type family XDecBrG x
type family XDecBrL x
type family XPatBr x
type family XExpBr x
type family XXUntypedSplice x
type family XQuasiQuote x
type family XUntypedSpliceExpr x
type family XXTupArg x
type family XMissing x
type family XPresent x
type family XXAmbiguousFieldOcc x
type family XAmbiguous x
type family XUnambiguous x
type family XXPragE x
type family XSCC x
type family XXDotFieldOcc x
type family XCDotFieldOcc x
type family XXExpr x
type family XPragE x
type family XBinTick x
type family XTick x
type family XStatic x
type family XProc x
type family XUntypedSplice x
type family XTypedSplice x
type family XUntypedBracket x
type family XTypedBracket x
type family XArithSeq x
type family XExprWithTySig x
type family XProjection x
type family XGetField x
type family XRecordUpd x
type family XRecordCon x
type family XExplicitList x
type family XDo x
type family XLet x
type family XMultiIf x
type family XIf x
type family XCase x
type family XExplicitSum x
type family XExplicitTuple x
type family XSectionR x
type family XSectionL x
type family XPar x
type family XNegApp x
type family XOpApp x
type family XAppTypeE x
type family XApp x
type family XLamCase x
type family XLam x
type family XLitE x
type family XOverLitE x
type family XIPVar x
type family XOverLabel x
type family XRecSel x
type family XUnboundVar x
type family XVar x
type family XXModule x
type family XCModule x
type family XXInjectivityAnn x
type family XCInjectivityAnn x
type family XXRoleAnnotDecl x
type family XCRoleAnnotDecl x
type family XXAnnDecl x
type family XHsAnnotation x
type family XXWarnDecl x
type family XWarning x
type family XXWarnDecls x
type family XWarnings x
type family XXRuleBndr x
type family XRuleBndrSig x
type family XCRuleBndr x
type family XXRuleDecl x
type family XHsRule x
type family XXRuleDecls x
type family XCRuleDecls x
type family XXForeignExport x
type family XCExport x
type family XXForeignImport x
type family XCImport x
type family XXForeignDecl x
type family XForeignExport x
type family XForeignImport x
type family XXDefaultDecl x
type family XCDefaultDecl x
type family XViaStrategy x
type family XNewtypeStrategy x
type family XAnyClassStrategy x
type family XStockStrategy x
type family XXDerivDecl x
type family XCDerivDecl x
type family XXInstDecl x
type family XTyFamInstD x
type family XDataFamInstD x
type family XClsInstD x
type family XXClsInstDecl x
type family XCClsInstDecl x
type family XXTyFamInstDecl x
type family XCTyFamInstDecl x
type family XXFamEqn x r
type family XCFamEqn x r
type family XXConDecl x
type family XConDeclH98 x
type family XConDeclGADT x
type family XXDerivClauseTys x
type family XDctMulti x
type family XDctSingle x
type family XXHsDerivingClause x
type family XCHsDerivingClause x
type family XXHsDataDefn x
type family XCHsDataDefn x
type family XXFamilyDecl x
type family XCFamilyDecl x
type family XXFamilyResultSig x
type family XTyVarSig x
type family XCKindSig x
type family XNoSig x
type family XXTyClGroup x
type family XCTyClGroup x
type family XXFunDep x
type family XCFunDep x
type family XXTyClDecl x
type family XClassDecl x
type family XDataDecl x
type family XSynDecl x
type family XFamDecl x
type family XXSpliceDecl x
type family XSpliceDecl x
type family XXHsGroup x
type family XCHsGroup x
type family XXHsDecl x
type family XRoleAnnotD x
type family XDocD x
type family XSpliceD x
type family XRuleD x
type family XAnnD x
type family XWarningD x
type family XForD x
type family XDefD x
type family XKindSigD x
type family XSigD x
type family XValD x
type family XDerivD x
type family XInstD x
type family XTyClD x
type family XXStandaloneKindSig x
type family XStandaloneKindSig x
type family XXFixitySig x
type family XFixitySig x
type family XXSig x
type family XCompleteMatchSig x
type family XSCCFunSig x
type family XMinimalSig x
type family XSpecInstSig x
type family XSpecSig x
type family XInlineSig x
type family XFixSig x
type family XIdSig x
type family XClassOpSig x
type family XPatSynSig x
type family XTypeSig x
type family XXIPBind x
type family XCIPBind x
type family XXHsIPBinds x
type family XIPBinds x
type family XXPatSynBind x x'
type family XPSB x x'
type family XXHsBindsLR x x'
type family XPatSynBind x x'
type family XVarBind x x'
type family XPatBind x x'
type family XFunBind x x'
type family XXValBindsLR x x'
type family XValBinds x x'
type family XXHsLocalBindsLR x x'
type family XEmptyLocalBinds x x'
type family XHsIPBinds x x'
type family XHsValBinds x x'
type LIdP p = XRec p IdP p
-- | Maps the "normal" id type for a given pass
type family IdP p
-- | The trivial wrapper that carries no additional information See Note
-- [XRec and SrcSpans in the AST]
class () => WrapXRec p a
wrapXRec :: WrapXRec p a => a -> XRec p a
-- | We can map over the underlying type contained in an XRec
-- while preserving the annotation as is.
class () => MapXRec p
mapXRec :: (MapXRec p, Anno a ~ Anno b) => (a -> b) -> XRec p a -> XRec p b
-- | We can strip off the XRec to access the underlying data. See Note
-- [XRec and SrcSpans in the AST]
class () => UnXRec p
unXRec :: UnXRec p => XRec p a -> a
type family Anno a = (b :: Type)
-- | GHC's L prefixed variants wrap their vanilla variant in this type
-- family, to add SrcLoc info via Located. Other passes
-- than GhcPass not interested in location information can
-- define this as type instance XRec NoLocated a = a. See Note
-- [XRec and SrcSpans in the AST]
type family XRec p a = (r :: Type) | r -> a
data () => DataConCantHappen
-- | A ModuleName is essentially a simple string, e.g. Data.List.
newtype () => ModuleName
ModuleName :: FastString -> ModuleName
data () => ClsInstOrQC
IsClsInst :: ClsInstOrQC
IsQC :: CtOrigin -> ClsInstOrQC
data () => CtOrigin
-- | A given constraint from a user-written type signature. The
-- SkolemInfo inside gives more information.
GivenOrigin :: SkolemInfoAnon -> CtOrigin
-- | GivenSCOrigin is used for a Given constraint obtained by
-- superclass selection from the context of an instance declaration. E.g.
-- instance (Foo a, Bar a) => C [a] where ... When
-- typechecking the instance decl itself, including producing evidence
-- for the superclasses of C, the superclasses of (Foo
-- a) and (Bar a) will have GivenSCOrigin origin.
GivenSCOrigin :: SkolemInfoAnon -> ScDepth -> Bool -> CtOrigin
OccurrenceOf :: Name -> CtOrigin
OccurrenceOfRecSel :: RdrName -> CtOrigin
AppOrigin :: CtOrigin
SpecPragOrigin :: UserTypeCtxt -> CtOrigin
TypeEqOrigin :: TcType -> TcType -> Maybe TypedThing -> Bool -> CtOrigin
[uo_actual] :: CtOrigin -> TcType
[uo_expected] :: CtOrigin -> TcType
-- | The thing that has type "actual"
[uo_thing] :: CtOrigin -> Maybe TypedThing
-- | 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 -> 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
HasFieldOrigin :: FastString -> CtOrigin
TupleOrigin :: CtOrigin
ExprSigOrigin :: CtOrigin
PatSigOrigin :: CtOrigin
PatOrigin :: CtOrigin
ProvCtxtOrigin :: PatSynBind GhcRn GhcRn -> CtOrigin
RecordUpdOrigin :: CtOrigin
ViewPatOrigin :: CtOrigin
-- | ScOrigin is used only for the Wanted constraints for the
-- superclasses of an instance declaration.
ScOrigin :: ClsInstOrQC -> NakedScFlag -> 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
ProcOrigin :: CtOrigin
ArrowCmdOrigin :: CtOrigin
AnnOrigin :: CtOrigin
FunDepOrigin1 :: PredType -> CtOrigin -> RealSrcSpan -> PredType -> CtOrigin -> RealSrcSpan -> CtOrigin
FunDepOrigin2 :: PredType -> CtOrigin -> PredType -> SrcSpan -> CtOrigin
InjTFOrigin1 :: PredType -> CtOrigin -> RealSrcSpan -> PredType -> CtOrigin -> RealSrcSpan -> CtOrigin
ExprHoleOrigin :: Maybe RdrName -> CtOrigin
TypeHoleOrigin :: OccName -> CtOrigin
PatCheckOrigin :: CtOrigin
ListOrigin :: CtOrigin
IfThenElseOrigin :: CtOrigin
BracketOrigin :: CtOrigin
StaticOrigin :: CtOrigin
Shouldn'tHappenOrigin :: String -> CtOrigin
GhcBug20076 :: CtOrigin
-- | Testing whether the constraint associated with an instance declaration
-- in a signature file is satisfied upon instantiation.
--
-- Test cases: backpackshould_failbkpfail{11,43}.bkp
InstProvidedOrigin :: Module -> ClsInst -> CtOrigin
NonLinearPatternOrigin :: CtOrigin
UsageEnvironmentOf :: Name -> CtOrigin
CycleBreakerOrigin :: CtOrigin -> CtOrigin
FRROrigin :: FixedRuntimeRepOrigin -> CtOrigin
WantedSuperclassOrigin :: PredType -> CtOrigin -> CtOrigin
InstanceSigOrigin :: Name -> Type -> Type -> CtOrigin
AmbiguityCheckOrigin :: UserTypeCtxt -> CtOrigin
-- | The context for a representation-polymorphism check.
--
-- For example, when typechecking (a :: k) -> ..., we are
-- checking the type a because it's the type of a term variable
-- bound in a lambda, so we use FRRBinder.
data () => FixedRuntimeRepOrigin
FixedRuntimeRepOrigin :: Type -> FixedRuntimeRepContext -> FixedRuntimeRepOrigin
-- | What type are we checking? For example, `a[tau]` in `a[tau] :: TYPE
-- rr[tau]`.
[frr_type] :: FixedRuntimeRepOrigin -> Type
-- | What context requires a fixed runtime representation?
[frr_context] :: FixedRuntimeRepOrigin -> FixedRuntimeRepContext
-- | The context in which a representation-polymorphism check was
-- performed.
--
-- Does not include the type on which the check was performed; see
-- FixedRuntimeRepOrigin for that.
data () => FixedRuntimeRepContext
-- | Record fields in record construction must have a fixed runtime
-- representation.
FRRRecordCon :: !RdrName -> !HsExpr GhcTc -> FixedRuntimeRepContext
-- | Record fields in record updates must have a fixed runtime
-- representation.
--
-- Test case: RepPolyRecordUpdate.
FRRRecordUpdate :: !Name -> !HsExpr GhcRn -> FixedRuntimeRepContext
-- | Variable binders must have a fixed runtime representation.
--
-- Test cases: LevPolyLet, RepPolyPatBind.
FRRBinder :: !Name -> FixedRuntimeRepContext
-- | Pattern binds must have a fixed runtime representation.
--
-- Test case: RepPolyInferPatBind.
FRRPatBind :: FixedRuntimeRepContext
-- | Pattern synonym arguments must have a fixed runtime representation.
--
-- Test case: RepPolyInferPatSyn.
FRRPatSynArg :: FixedRuntimeRepContext
-- | The type of the scrutinee in a case statement must have a fixed
-- runtime representation.
--
-- Test cases: RepPolyCase{1,2}.
FRRCase :: FixedRuntimeRepContext
-- | An instantiation of a newtype/data constructor pattern in which an
-- argument type does not have a fixed runtime representation.
--
-- Test case: T20363.
FRRDataConPatArg :: !DataCon -> !Int -> FixedRuntimeRepContext
-- | An instantiation of a function with no binding (e.g. coerce,
-- `unsafeCoerce#`, an unboxed tuple DataCon) in which one of the
-- remaining arguments types does not have a fixed runtime
-- representation.
--
-- Test cases: RepPolyWrappedVar, T14561, UnliftedNewtypesLevityBinder,
-- UnliftedNewtypesCoerceFail.
FRRNoBindingResArg :: !RepPolyFun -> !ArgPos -> FixedRuntimeRepContext
-- | Arguments to unboxed tuples must have fixed runtime representations.
--
-- Test case: RepPolyTuple.
FRRTupleArg :: !Int -> FixedRuntimeRepContext
-- | Tuple sections must have a fixed runtime representation.
--
-- Test case: RepPolyTupleSection.
FRRTupleSection :: !Int -> FixedRuntimeRepContext
-- | Unboxed sums must have a fixed runtime representation.
--
-- Test cases: RepPolySum.
FRRUnboxedSum :: FixedRuntimeRepContext
-- | The body of a do expression or a monad comprehension must
-- have a fixed runtime representation.
--
-- Test cases: RepPolyDoBody{1,2}, RepPolyMcBody.
FRRBodyStmt :: !StmtOrigin -> !Int -> FixedRuntimeRepContext
-- | Arguments to a guard in a monad comprehension must have a fixed
-- runtime representation.
--
-- Test case: RepPolyMcGuard.
FRRBodyStmtGuard :: FixedRuntimeRepContext
-- | Arguments to (>>=) arising from a do expression
-- or a monad comprehension must have a fixed runtime representation.
--
-- Test cases: RepPolyDoBind, RepPolyMcBind.
FRRBindStmt :: !StmtOrigin -> FixedRuntimeRepContext
-- | A value bound by a pattern guard must have a fixed runtime
-- representation.
--
-- Test cases: none.
FRRBindStmtGuard :: FixedRuntimeRepContext
-- | A representation-polymorphism check arising from arrow notation.
--
-- See FRRArrowContext for more details.
FRRArrow :: !FRRArrowContext -> FixedRuntimeRepContext
-- | A representation-polymorphic check arising from a call to
-- matchExpectedFunTys or matchActualFunTySigma.
--
-- See ExpectedFunTyOrigin for more details.
FRRExpectedFunTy :: !ExpectedFunTyOrigin -> !Int -> FixedRuntimeRepContext
-- | SkolemInfo stores the origin of a skolem type variable, so that
-- we can display this information to the user in case of a type error.
--
-- The Unique field allows us to report all skolem type variables
-- bound in the same place in a single report.
data () => SkolemInfo
SkolemInfo :: Unique -> SkolemInfoAnon -> SkolemInfo
-- | SkolemInfoAnon stores the origin of a skolem type variable
-- (e.g. bound by a user-written forall, the header of a data
-- declaration, a deriving clause, ...).
--
-- This information is displayed when reporting an error message, such as
--
--
-- "Couldn't match k with l"
--
--
-- This allows us to explain where the type variable came from.
--
-- When several skolem type variables are bound at once, prefer using
-- SkolemInfo, which stores a Unique which allows these
-- type variables to be reported
data () => SkolemInfoAnon
SigSkol :: UserTypeCtxt -> TcType -> [(Name, TcTyVar)] -> SkolemInfoAnon
SigTypeSkol :: UserTypeCtxt -> SkolemInfoAnon
ForAllSkol :: TyVarBndrs -> SkolemInfoAnon
DerivSkol :: Type -> SkolemInfoAnon
InstSkol :: ClsInstOrQC -> PatersonSize -> SkolemInfoAnon
FamInstSkol :: SkolemInfoAnon
PatSkol :: ConLike -> HsMatchContext GhcTc -> SkolemInfoAnon
IPSkol :: [HsIPName] -> SkolemInfoAnon
RuleSkol :: RuleName -> SkolemInfoAnon
InferSkol :: [(Name, TcType)] -> SkolemInfoAnon
BracketSkol :: SkolemInfoAnon
UnifyForAllSkol :: TcType -> SkolemInfoAnon
TyConSkol :: TyConFlavour -> Name -> SkolemInfoAnon
DataConSkol :: Name -> SkolemInfoAnon
ReifySkol :: SkolemInfoAnon
RuntimeUnkSkol :: SkolemInfoAnon
ArrowReboundIfSkol :: SkolemInfoAnon
UnkSkol :: CallStack -> SkolemInfoAnon
-- | 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
-- | 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
-- | Indicates whether a module name is referring to a boot interface
-- (hs-boot file) or regular module (hs file). We need to treat boot
-- modules specially when building compilation graphs, since they break
-- cycles. Regular source files and signature files are treated
-- equivalently.
data () => IsBootInterface
NotBoot :: IsBootInterface
IsBoot :: IsBootInterface
type Unit = GenUnit UnitId
-- | A unit identifier identifies a (possibly partially) instantiated
-- library. It is primarily used as part of GenModule, which in
-- turn is used in Name, which is used to give names to entities
-- when typechecking.
--
-- There are two possible forms for a Unit:
--
-- 1) It can be a RealUnit, in which case we just have a
-- DefUnitId that uniquely identifies some fully compiled,
-- installed library we have on disk.
--
-- 2) It can be an VirtUnit. When we are typechecking a library
-- with missing holes, we may need to instantiate a library on the fly
-- (in which case we don't have any on-disk representation.) In that
-- case, you have an GenInstantiatedUnit, which explicitly records
-- the instantiation, so that we can substitute over it.
data () => GenUnit uid
-- | Installed definite unit (either a fully instantiated unit or a closed
-- unit)
RealUnit :: !Definite uid -> GenUnit uid
-- | Virtual unit instantiated on-the-fly. It may be definite if all the
-- holes are instantiated but we don't have code objects for it.
VirtUnit :: {-# UNPACK #-} !GenInstantiatedUnit uid -> GenUnit uid
-- | Fake hole unit
HoleUnit :: GenUnit uid
-- | A generic module is a pair of a unit identifier and a
-- ModuleName.
data () => GenModule unit
Module :: !unit -> !ModuleName -> GenModule unit
-- | Unit the module belongs to
[moduleUnit] :: GenModule unit -> !unit
-- | Module name (e.g. A.B.C)
[moduleName] :: GenModule unit -> !ModuleName
-- | A UnitId identifies a built library in a database and is used to
-- generate unique symbols, etc. It's usually of the form:
--
-- pkgname-1.2:libname+hash
--
-- These UnitId are provided to us via the -this-unit-id flag.
--
-- The library in question may be definite or indefinite; if it is
-- indefinite, none of the holes have been filled (we never install
-- partially instantiated libraries as we can cheaply instantiate them
-- on-the-fly, cf VirtUnit). Put another way, an installed unit id is
-- either fully instantiated, or not instantiated at all.
newtype () => UnitId
UnitId :: FastString -> UnitId
-- | The full hashed unit identifier, including the component id and the
-- hash.
[unitIdFS] :: UnitId -> FastString
-- | A class of types that represent a multiline document, with support for
-- vertical composition.
--
-- See Note [HLine versus HDoc] and Note [The outputable class hierarchy]
-- for more details.
class (IsOutput doc, IsLine Line doc) => IsDoc doc where {
type family Line doc = (r :: Type) | r -> doc;
}
line :: IsDoc doc => Line doc -> doc
-- | Join two docs together vertically. If there is no vertical
-- overlap it "dovetails" the two onto one line.
($$) :: IsDoc doc => doc -> doc -> doc
lines_ :: IsDoc doc => [Line doc] -> doc
-- | Concatenate docs vertically with dovetailing.
vcat :: IsDoc doc => [doc] -> doc
-- | Prints as either the given SDoc or the given HDoc,
-- depending on which type the result is instantiated to. This should
-- generally be avoided; see Note [dualLine and dualDoc] for details.
dualDoc :: IsDoc doc => SDoc -> HDoc -> doc
type family Line doc = (r :: Type) | r -> doc
-- | A class of types that represent a single logical line of text, with
-- support for horizontal composition.
--
-- See Note [HLine versus HDoc] and Note [The outputable class hierarchy]
-- for more details.
class IsOutput doc => IsLine doc
char :: IsLine doc => Char -> doc
text :: IsLine doc => String -> doc
ftext :: IsLine doc => FastString -> doc
ztext :: IsLine doc => FastZString -> doc
-- | Join two docs together horizontally without a gap.
(<>) :: IsLine doc => doc -> doc -> doc
-- | Join two docs together horizontally with a gap between them.
(<+>) :: IsLine doc => doc -> doc -> doc
-- | Separate: is either like hsep or like vcat, depending on
-- what fits.
sep :: IsLine doc => [doc] -> doc
-- | 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 :: IsLine doc => [doc] -> doc
-- | Concatenate docs horizontally without gaps.
hcat :: IsLine doc => [doc] -> doc
-- | Concatenate docs horizontally with a space between each one.
hsep :: IsLine doc => [doc] -> doc
-- | Prints as either the given SDoc or the given HLine,
-- depending on which type the result is instantiated to. This should
-- generally be avoided; see Note [dualLine and dualDoc] for details.
dualLine :: IsLine doc => SDoc -> HLine -> doc
-- | A superclass for IsLine and IsDoc that provides an
-- identity, empty, as well as access to the shared
-- SDocContext.
--
-- See Note [The outputable class hierarchy] for more details.
class () => IsOutput doc
empty :: IsOutput doc => doc
docWithContext :: IsOutput doc => (SDocContext -> doc) -> doc
-- | Represents a (possibly empty) sequence of lines that can be
-- efficiently printed directly to a Handle (actually a
-- BufHandle). See Note [SDoc versus HDoc] and Note [HLine versus
-- HDoc] for more details.
data () => HDoc
-- | Represents a single line of output that can be efficiently printed
-- directly to a Handle (actually a BufHandle). See Note
-- [SDoc versus HDoc] and Note [HLine versus HDoc] for more details.
data () => HLine
-- | 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
-- | BindingSite is used to tell the thing that prints binder what
-- language construct is binding the identifier. This can be used to
-- decide how much info to print. Also see Note [Binding-site specific
-- printing] in GHC.Core.Ppr
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
-- | Wrapper for types having a Outputable instance when an OutputableP
-- instance is required.
newtype () => PDoc a
PDoc :: a -> PDoc a
-- | Outputable class with an additional environment value
--
-- See Note [The OutputableP class]
class () => OutputableP env a
pdoc :: OutputableP env a => env -> a -> SDoc
-- | Class designating that some type has an SDoc representation
class () => Outputable a
ppr :: Outputable a => a -> SDoc
data () => SDocContext
SDC :: !PprStyle -> !Scheme -> !PprColour -> !Bool -> !Int -> !Int -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !FastString -> SDoc -> SDocContext
[sdocStyle] :: SDocContext -> !PprStyle
[sdocColScheme] :: SDocContext -> !Scheme
-- | The most recently used colour. This allows nesting colours.
[sdocLastColour] :: SDocContext -> !PprColour
[sdocShouldUseColor] :: SDocContext -> !Bool
[sdocDefaultDepth] :: SDocContext -> !Int
[sdocLineLength] :: SDocContext -> !Int
-- | True if Unicode encoding is supported and not disabled by
-- GHC_NO_UNICODE environment variable
[sdocCanUseUnicode] :: SDocContext -> !Bool
[sdocHexWordLiterals] :: SDocContext -> !Bool
[sdocPprDebug] :: SDocContext -> !Bool
[sdocPrintUnicodeSyntax] :: SDocContext -> !Bool
[sdocPrintCaseAsLet] :: SDocContext -> !Bool
[sdocPrintTypecheckerElaboration] :: SDocContext -> !Bool
[sdocPrintAxiomIncomps] :: SDocContext -> !Bool
[sdocPrintExplicitKinds] :: SDocContext -> !Bool
[sdocPrintExplicitCoercions] :: SDocContext -> !Bool
[sdocPrintExplicitRuntimeReps] :: SDocContext -> !Bool
[sdocPrintExplicitForalls] :: SDocContext -> !Bool
[sdocPrintPotentialInstances] :: SDocContext -> !Bool
[sdocPrintEqualityRelations] :: SDocContext -> !Bool
[sdocSuppressTicks] :: SDocContext -> !Bool
[sdocSuppressTypeSignatures] :: SDocContext -> !Bool
[sdocSuppressTypeApplications] :: SDocContext -> !Bool
[sdocSuppressIdInfo] :: SDocContext -> !Bool
[sdocSuppressCoercions] :: SDocContext -> !Bool
[sdocSuppressCoercionTypes] :: SDocContext -> !Bool
[sdocSuppressUnfoldings] :: SDocContext -> !Bool
[sdocSuppressVarKinds] :: SDocContext -> !Bool
[sdocSuppressUniques] :: SDocContext -> !Bool
[sdocSuppressModulePrefixes] :: SDocContext -> !Bool
[sdocSuppressStgExts] :: SDocContext -> !Bool
[sdocSuppressStgReps] :: SDocContext -> !Bool
[sdocErrorSpans] :: SDocContext -> !Bool
[sdocStarIsType] :: SDocContext -> !Bool
[sdocLinearTypes] :: SDocContext -> !Bool
[sdocListTuplePuns] :: SDocContext -> !Bool
[sdocPrintTypeAbbreviations] :: SDocContext -> !Bool
-- | Used to map UnitIds to more friendly "package-version:component"
-- strings while pretty-printing.
--
-- Use pprWithUnitState to set it. Users should never have to set
-- it to pretty-print SDocs emitted by GHC, otherwise it's a bug. It's an
-- internal field used to thread the UnitState so that the Outputable
-- instance of UnitId can use it.
--
-- See Note [Pretty-printing UnitId] in GHC.Unit for more details.
--
-- Note that we use FastString instead of UnitId to avoid
-- boring module inter-dependency issues.
[sdocUnitIdForUser] :: SDocContext -> !FastString -> SDoc
data () => QualifyName
NameUnqual :: QualifyName
NameQual :: ModuleName -> QualifyName
NameNotInScope1 :: QualifyName
NameNotInScope2 :: QualifyName
newtype () => IsEmptyOrSingleton
IsEmptyOrSingleton :: Bool -> IsEmptyOrSingleton
data () => PromotedItem
PromotedItemListSyntax :: IsEmptyOrSingleton -> PromotedItem
PromotedItemTupleSyntax :: PromotedItem
PromotedItemDataCon :: OccName -> PromotedItem
-- | Flags that affect whether a promotion tick is printed.
data () => PromotionTickContext
PromTickCtx :: !Bool -> !Bool -> PromotionTickContext
[ptcListTuplePuns] :: PromotionTickContext -> !Bool
[ptcPrintRedundantPromTicks] :: PromotionTickContext -> !Bool
-- | Given a promoted data constructor, decide whether to print a tick to
-- disambiguate the namespace.
type QueryPromotionTick = PromotedItem -> Bool
-- | For a given package, we need to know whether to print it with the
-- component id to disambiguate it.
type QueryQualifyPackage = Unit -> Bool
-- | For a given module, we need to know whether to print it with a package
-- name to disambiguate it.
type QueryQualifyModule = Module -> Bool
-- | Given a Name's Module and OccName, decide
-- whether and how to qualify it.
type QueryQualifyName = Module -> OccName -> QualifyName
-- | 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 () => NamePprCtx
QueryQualify :: QueryQualifyName -> QueryQualifyModule -> QueryQualifyPackage -> QueryPromotionTick -> NamePprCtx
[queryQualifyName] :: NamePprCtx -> QueryQualifyName
[queryQualifyModule] :: NamePprCtx -> QueryQualifyModule
[queryQualifyPackage] :: NamePprCtx -> QueryQualifyPackage
[queryPromotionTick] :: NamePprCtx -> QueryPromotionTick
data () => Depth
AllTheWay :: Depth
-- | 0 => stop
PartWay :: Int -> Depth
-- | Use sdocDefaultDepth field as depth
DefaultDepth :: Depth
data () => PprStyle
PprUser :: NamePprCtx -> Depth -> Coloured -> PprStyle
PprDump :: NamePprCtx -> PprStyle
-- | Print code; either C or assembler
PprCode :: PprStyle
-- | 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
-- | 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
data () => Plugins
Plugins :: ![StaticPlugin] -> ![ExternalPlugin] -> ![LoadedPlugin] -> !([Linkable], PkgsLoaded) -> Plugins
-- | Static 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] :: Plugins -> ![StaticPlugin]
-- | External plugins loaded directly from libraries without loading module
-- interfaces.
[externalPlugins] :: Plugins -> ![ExternalPlugin]
-- | Plugins dynamically loaded after processing arguments. What will be
-- loaded here is directed by DynFlags.pluginModNames. Arguments are
-- loaded from DynFlags.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.
[loadedPlugins] :: Plugins -> ![LoadedPlugin]
-- | The object files required by the loaded plugins See Note [Plugin
-- dependencies]
[loadedPluginDeps] :: Plugins -> !([Linkable], PkgsLoaded)
-- | Class of things that we can obtain a Unique from
class () => Uniquable a
getUnique :: Uniquable a => a -> Unique
-- | A class allowing convenient access to the Name of various
-- datatypes
class () => NamedThing a
getOccName :: NamedThing a => a -> OccName
getName :: NamedThing a => a -> Name
-- | A unique, unambiguous name for something, containing information about
-- where that thing originated.
data () => Name
-- | Type variable that might be a metavariable
type TcTyVar = Var
-- | Type or Coercion Variable
type TyCoVar = Id
-- | Type or kind Variable
type TyVar = Var
-- | Whether an Invisible argument may appear in source Haskell.
data () => Specificity
-- | the argument may not appear in source Haskell, it is only inferred.
InferredSpec :: Specificity
-- | the argument may appear in source Haskell, but isn't required.
SpecifiedSpec :: Specificity
-- | Variable
--
-- Essentially a typed Name, that may also contain some additional
-- information about the Var and its use sites.
data () => Var
-- | The non-dependent version of ForAllTyFlag. See Note [FunTyFlag]
-- Appears here partly so that it's together with its friends
-- ForAllTyFlag and ForallVisFlag, but also because it is used in
-- IfaceType, rather early in the compilation chain
data () => FunTyFlag
FTF_T_T :: FunTyFlag
FTF_T_C :: FunTyFlag
FTF_C_T :: FunTyFlag
FTF_C_C :: FunTyFlag
-- | ForAllTyFlag
--
-- Is something required to appear in source Haskell (Required),
-- permitted by request (Specified) (visible type application), or
-- prohibited entirely from appearing in source Haskell
-- (Inferred)? See Note [VarBndrs, ForAllTyBinders, TyConBinders,
-- and visibility] in GHC.Core.TyCo.Rep
data () => ForAllTyFlag
Invisible :: Specificity -> ForAllTyFlag
Required :: ForAllTyFlag
pattern Specified :: ForAllTyFlag
pattern Inferred :: ForAllTyFlag
data () => TcTyVarDetails
SkolemTv :: SkolemInfo -> TcLevel -> Bool -> TcTyVarDetails
RuntimeUnk :: TcTyVarDetails
MetaTv :: MetaInfo -> IORef MetaDetails -> TcLevel -> TcTyVarDetails
[mtv_info] :: TcTyVarDetails -> MetaInfo
[mtv_ref] :: TcTyVarDetails -> IORef MetaDetails
[mtv_tclvl] :: TcTyVarDetails -> TcLevel
data () => MetaDetails
Flexi :: MetaDetails
Indirect :: TcType -> MetaDetails
type TyConRepName = Name
type MCoercionN = MCoercion
type CoercionN = Coercion
-- | A collection of PredTypes
type ThetaType = [PredType]
-- | Type synonym used for types of kind RuntimeRep.
type RuntimeRepType = Type
-- | A type of the form p of constraint kind represents a value
-- whose type is the Haskell predicate p, where a predicate is
-- what occurs before the => in a Haskell type.
--
-- We use PredType as documentation to mark those types that we
-- guarantee to have this kind.
--
-- It can be expanded into its representation, but:
--
--
-- - The type checker must treat it as opaque
-- - The rest of the compiler treats it as transparent
--
--
-- Consider these examples:
--
--
-- f :: (Eq a) => a -> Int
-- g :: (?x :: Int -> Int) => a -> Int
-- h :: (r\l) => {r} => {l::Int | r}
--
--
-- Here the Eq a and ?x :: Int -> Int and
-- rl are all called "predicates"
type PredType = Type
-- | Mult is a type alias for Type.
--
-- Mult must contain Type because multiplicity variables are mere type
-- variables (of kind Multiplicity) in Haskell. So the simplest
-- implementation is to make Mult be Type.
--
-- Multiplicities can be formed with: - One: GHC.Types.One (= oneDataCon)
-- - Many: GHC.Types.Many (= manyDataCon) - Multiplication:
-- GHC.Types.MultMul (= multMulTyCon)
--
-- So that Mult feels a bit more structured, we provide pattern synonyms
-- and smart constructors for these.
type Mult = Type
-- | A shorthand for data with an attached Mult element (the
-- multiplicity).
data () => Scaled a
Scaled :: !Mult -> a -> Scaled a
-- | A semantically more meaningful type to represent what may or may not
-- be a useful Coercion.
data () => MCoercion
MRefl :: MCoercion
MCo :: Coercion -> MCoercion
data () => TyLit
NumTyLit :: Integer -> TyLit
StrTyLit :: FastString -> TyLit
CharTyLit :: Char -> TyLit
-- | For simplicity, we have just one UnivCo that represents a coercion
-- from some type to some other type, with (in general) no restrictions
-- on the type. The UnivCoProvenance specifies more exactly what the
-- coercion really is and why a program should (or shouldn't!) trust the
-- coercion. It is reasonable to consider each constructor of
-- UnivCoProvenance as a totally independent coercion form; their
-- only commonality is that they don't tell you what types they coercion
-- between. (That info is in the UnivCo constructor of
-- Coercion.
data () => UnivCoProvenance
-- | See Note [Phantom coercions]. Only in Phantom roled coercions
PhantomProv :: KindCoercion -> UnivCoProvenance
-- | From the fact that any two coercions are considered equivalent. See
-- Note [ProofIrrelProv]. Can be used in Nominal or Representational
-- coercions
ProofIrrelProv :: KindCoercion -> UnivCoProvenance
-- | From a plugin, which asserts that this coercion is sound. The string
-- is for the use of the plugin.
PluginProv :: String -> UnivCoProvenance
CorePrepProv :: Bool -> UnivCoProvenance
data () => CoSel
SelTyCon :: Int -> Role -> CoSel
SelFun :: FunSel -> CoSel
SelForAll :: CoSel
-- | Layout information for declarations.
data () => LayoutInfo pass
-- | Explicit braces written by the user.
--
--
-- class C a where { foo :: a; bar :: a }
--
ExplicitBraces :: !LHsToken "{" pass -> !LHsToken "}" pass -> LayoutInfo pass
-- | Virtual braces inserted by the layout algorithm.
--
--
-- class C a where
-- foo :: a
-- bar :: a
--
VirtualBraces :: !Int -> LayoutInfo pass
-- | Empty or compiler-generated blocks do not have layout information
-- associated with them.
NoLayoutInfo :: LayoutInfo pass
-- | With UnicodeSyntax, there might be multiple ways to write the
-- same token. For example an arrow could be either -> or
-- →. This choice must be recorded in order to exactprint such
-- tokens, so instead of HsToken "->" we introduce
-- HsUniToken "->" "→".
--
-- See also IsUnicodeSyntax in GHC.Parser.Annotation;
-- we do not use here to avoid a dependency.
data () => HsUniToken (tok :: Symbol) (utok :: Symbol)
HsNormalTok :: HsUniToken (tok :: Symbol) (utok :: Symbol)
HsUnicodeTok :: HsUniToken (tok :: Symbol) (utok :: Symbol)
-- | A token stored in the syntax tree. For example, when parsing a
-- let-expression, we store HsToken "let" and HsToken
-- "in". The locations of those tokens can be used to faithfully
-- reproduce (exactprint) the original program text.
data () => HsToken (tok :: Symbol)
HsTok :: HsToken (tok :: Symbol)
type LHsUniToken (tok :: Symbol) (utok :: Symbol) p = XRec p HsUniToken tok utok
type LHsToken (tok :: Symbol) p = XRec p HsToken tok
type PsLocated = GenLocated PsSpan
data () => PsSpan
PsSpan :: !RealSrcSpan -> !BufSpan -> PsSpan
[psRealSpan] :: PsSpan -> !RealSrcSpan
[psBufSpan] :: PsSpan -> !BufSpan
-- | A location as produced by the parser. Consists of two components:
--
--
-- - The location in the file, adjusted for #line and {-# LINE ... #-}
-- pragmas (RealSrcLoc)
-- - The location in the string buffer (BufPos) with monotonicity
-- guarantees (see #17632)
--
data () => PsLoc
PsLoc :: !RealSrcLoc -> !BufPos -> PsLoc
[psRealLoc] :: PsLoc -> !RealSrcLoc
[psBufPos] :: PsLoc -> !BufPos
type RealLocated = GenLocated RealSrcSpan
type Located = GenLocated SrcSpan
-- | We attach SrcSpans to lots of things, so let's have a datatype for it.
data () => GenLocated l e
L :: l -> e -> GenLocated l e
data () => UnhelpfulSpanReason
UnhelpfulNoLocationInfo :: UnhelpfulSpanReason
UnhelpfulWiredIn :: UnhelpfulSpanReason
UnhelpfulInteractive :: UnhelpfulSpanReason
UnhelpfulGenerated :: UnhelpfulSpanReason
UnhelpfulOther :: !FastString -> UnhelpfulSpanReason
-- | Source Span
--
-- A SrcSpan identifies either a specific portion of a text file
-- or a human-readable description of a location.
data () => SrcSpan
RealSrcSpan :: !RealSrcSpan -> !Maybe BufSpan -> SrcSpan
UnhelpfulSpan :: !UnhelpfulSpanReason -> SrcSpan
-- | A RealSrcSpan delimits a portion of a text file. It could be
-- represented by a pair of (line,column) coordinates, but in fact we
-- optimise slightly by using more compact representations for
-- single-line and zero-length spans, both of which are quite common.
--
-- The end position is defined to be the column after the end of
-- the span. That is, a span of (1,1)-(1,2) is one character long, and a
-- span of (1,1)-(1,1) is zero characters long.
--
-- Real Source Span
data () => RealSrcSpan
-- | StringBuffer Source Span
data () => BufSpan
BufSpan :: {-# UNPACK #-} !BufPos -> {-# UNPACK #-} !BufPos -> BufSpan
[bufSpanStart] :: BufSpan -> {-# UNPACK #-} !BufPos
[bufSpanEnd] :: BufSpan -> {-# UNPACK #-} !BufPos
-- | Real Source Location
--
-- Represents a single point within a file
data () => RealSrcLoc
-- | 0-based offset identifying the raw location in the
-- StringBuffer.
--
-- The lexer increments the BufPos every time a character (UTF-8
-- code point) is read from the input buffer. As UTF-8 is a
-- variable-length encoding and StringBuffer needs a byte offset
-- for indexing, a BufPos cannot be used for indexing.
--
-- The parser guarantees that BufPos are monotonic. See #17632.
-- This means that syntactic constructs that appear later in the
-- StringBuffer are guaranteed to have a higher BufPos.
-- Contrast that with RealSrcLoc, which does *not* make the
-- analogous guarantee about higher line/column numbers.
--
-- This is due to #line and {-# LINE ... #-} pragmas that can arbitrarily
-- modify RealSrcLoc. Notice how setSrcLoc and
-- resetAlrLastLoc in GHC.Parser.Lexer update
-- PsLoc, modifying RealSrcLoc but preserving
-- BufPos.
--
-- Monotonicity makes BufPos useful to determine the order in
-- which syntactic elements appear in the source. Consider this example
-- (haddockA041 in the test suite):
--
-- haddockA041.hs {-# LANGUAGE CPP #-} -- | Module header documentation
-- module Comments_and_CPP_include where #include "IncludeMe.hs"
--
-- IncludeMe.hs: -- | Comment on T data T = MkT -- ^ Comment on MkT
--
-- After the C preprocessor runs, the StringBuffer will contain
-- a program that looks like this (unimportant lines at the beginning
-- removed):
--
-- # 1 "haddockA041.hs" {-# LANGUAGE CPP #-} -- | Module header
-- documentation module Comments_and_CPP_include where # 1 "IncludeMe.hs"
-- 1 -- | Comment on T data T = MkT -- ^ Comment on MkT # 7
-- "haddockA041.hs" 2
--
-- The line pragmas inserted by CPP make the error messages more
-- informative. The downside is that we can't use RealSrcLoc to determine
-- the ordering of syntactic elements.
--
-- With RealSrcLoc, we have the following location information recorded
-- in the AST: * The module name is located at haddockA041.hs:3:8-31 *
-- The Haddock comment "Comment on T" is located at IncludeMe:1:1-17 *
-- The data declaration is located at IncludeMe.hs:2:1-32
--
-- Is the Haddock comment located between the module name and the data
-- declaration? This is impossible to tell because the locations are not
-- comparable; they even refer to different files.
--
-- On the other hand, with BufPos, we have the following location
-- information: * The module name is located at 846-870 * The Haddock
-- comment "Comment on T" is located at 898-915 * The data declaration is
-- located at 916-928
--
-- Aside: if you're wondering why the numbers are so high, try running
-- ghc -E haddockA041.hs and see the extra fluff that CPP
-- inserts at the start of the file.
--
-- For error messages, BufPos is not useful at all. On the other
-- hand, this is exactly what we need to determine the order of syntactic
-- elements: 870 < 898, therefore the Haddock comment appears *after*
-- the module name. 915 < 916, therefore the Haddock comment appears
-- *before* the data declaration.
--
-- We use BufPos in in GHC.Parser.PostProcess.Haddock to associate
-- Haddock comments with parts of the AST using location information
-- (#17544).
newtype () => BufPos
BufPos :: Int -> BufPos
[bufPos] :: BufPos -> Int
-- | A non-deterministic set of FastStrings. See Note [Deterministic
-- UniqFM] in GHC.Types.Unique.DFM for explanation why it's not
-- deterministic and why it matters. Use DFastStringEnv if the set
-- eventually gets converted into a list or folded over in a way where
-- the order changes the generated code.
type FastStringEnv a = UniqFM FastString a
data () => UniqSet a
data () => Bag a
type ModuleWithIsBoot = GenWithIsBoot Module
type ModuleNameWithIsBoot = GenWithIsBoot ModuleName
-- | This data type just pairs a value mod with an IsBootInterface
-- flag. In practice, mod is usually a Module or
-- ModuleName'.
data () => GenWithIsBoot mod
GWIB :: mod -> IsBootInterface -> GenWithIsBoot mod
[gwib_mod] :: GenWithIsBoot mod -> mod
[gwib_isBoot] :: GenWithIsBoot mod -> IsBootInterface
-- | A definite unit (i.e. without any free module hole)
newtype () => Definite unit
Definite :: unit -> Definite unit
[unDefinite] :: Definite unit -> unit
-- | A DefUnitId is an UnitId with the invariant that it only
-- refers to a definite library; i.e., one we have generated code for.
type DefUnitId = Definite UnitId
type Instantiations = GenInstantiations UnitId
type GenInstantiations unit = [(ModuleName, GenModule GenUnit unit)]
type InstantiatedUnit = GenInstantiatedUnit UnitId
-- | An instantiated unit.
--
-- It identifies an indefinite library (with holes) that has been
-- instantiated.
--
-- This unit may be indefinite or not (i.e. with remaining holes or not).
-- If it is definite, we don't know if it has already been compiled and
-- installed in a database. Nevertheless, we have a mechanism called
-- "improvement" to try to match a fully instantiated unit with existing
-- compiled and installed units: see Note [VirtUnit to RealUnit
-- improvement].
--
-- An indefinite unit identifier pretty-prints to something like
-- p[H=H,A=aimpl:A>] (p is the UnitId,
-- and the brackets enclose the module substitution).
data () => GenInstantiatedUnit unit
InstantiatedUnit :: !FastString -> !Unique -> !unit -> !GenInstantiations unit -> UniqDSet ModuleName -> GenInstantiatedUnit unit
-- | A private, uniquely identifying representation of an InstantiatedUnit.
-- This string is completely private to GHC and is just used to get a
-- unique.
[instUnitFS] :: GenInstantiatedUnit unit -> !FastString
-- | Cached unique of unitFS.
[instUnitKey] :: GenInstantiatedUnit unit -> !Unique
-- | The (indefinite) unit being instantiated.
[instUnitInstanceOf] :: GenInstantiatedUnit unit -> !unit
-- | The sorted (by ModuleName) instantiations of this unit.
[instUnitInsts] :: GenInstantiatedUnit unit -> !GenInstantiations unit
-- | A cache of the free module holes of instUnitInsts. This lets us
-- efficiently tell if a GenInstantiatedUnit has been fully
-- instantiated (empty set of free module holes) and whether or not a
-- substitution can have any effect.
[instUnitHoles] :: GenInstantiatedUnit unit -> UniqDSet ModuleName
-- | A unit key in the database
newtype () => UnitKey
UnitKey :: FastString -> UnitKey
-- | Class for types that are used as unit identifiers (UnitKey, UnitId,
-- Unit)
--
-- We need this class because we create new unit ids for virtual units
-- (see VirtUnit) and they have to to be made from units with different
-- kinds of identifiers.
class () => IsUnitId u
unitFS :: IsUnitId u => u -> FastString
-- | An InstantiatedModule is a GenModule whose unit is
-- identified with an GenInstantiatedUnit.
type InstantiatedModule = GenModule InstantiatedUnit
-- | A HomeUnitModule is like an InstalledModule but we
-- expect to find it in one of the home units rather than the package
-- database.
type HomeUnitModule = GenModule UnitId
-- | A InstalledModule is a GenModule whose unit is
-- identified with an UnitId.
type InstalledModule = GenModule UnitId
-- | Package-qualifier after renaming
--
-- Renaming detects if "this" or the unit-id of the home-unit was used as
-- a package qualifier.
data () => PkgQual
-- | No package qualifier
NoPkgQual :: PkgQual
-- | Import from home-unit
ThisPkg :: UnitId -> PkgQual
-- | Import from another unit
OtherPkg :: UnitId -> PkgQual
-- | Package-qualifier as it was parsed
data () => RawPkgQual
-- | No package qualifier
NoRawPkgQual :: RawPkgQual
-- | Raw package qualifier string.
RawPkgQual :: StringLiteral -> RawPkgQual
type LPat p = XRec p Pat p
-- | Pattern
--
--
data () => Pat p
-- | Wildcard Pattern The sole reason for a type on a WildPat is to support
-- hsPatType :: Pat Id -> Type
WildPat :: XWildPat p -> Pat p
-- | Variable Pattern
VarPat :: XVarPat p -> LIdP p -> Pat p
-- | Lazy Pattern ^ - AnnKeywordId : AnnTilde
LazyPat :: XLazyPat p -> LPat p -> Pat p
-- | As pattern ^ - AnnKeywordId : AnnAt
AsPat :: XAsPat p -> LIdP p -> !LHsToken "@" p -> LPat p -> Pat p
ParPat :: XParPat p -> !LHsToken "(" p -> LPat p -> !LHsToken ")" p -> Pat p
-- | Bang pattern ^ - AnnKeywordId : AnnBang
BangPat :: XBangPat p -> LPat p -> Pat p
-- | Syntactic List
--
--
ListPat :: XListPat p -> [LPat p] -> Pat p
-- | Tuple sub-patterns
--
--
TuplePat :: XTuplePat p -> [LPat p] -> Boxity -> Pat p
-- | Anonymous sum pattern
--
--
SumPat :: XSumPat p -> LPat p -> ConTag -> SumWidth -> Pat p
-- | Constructor Pattern
ConPat :: XConPat p -> XRec p (ConLikeP p) -> HsConPatDetails p -> Pat p
[pat_con_ext] :: Pat p -> XConPat p
[pat_con] :: Pat p -> XRec p (ConLikeP p)
[pat_args] :: Pat p -> HsConPatDetails p
-- |
ViewPat :: XViewPat p -> LHsExpr p -> LPat p -> Pat p
-- |
SplicePat :: XSplicePat p -> HsUntypedSplice p -> Pat p
-- | Literal Pattern Used for *non-overloaded* literal patterns: Int#,
-- Char#, Int, Char, String, etc.
LitPat :: XLitPat p -> HsLit p -> Pat p
-- | Natural Pattern
--
--
NPat :: XNPat p -> XRec p (HsOverLit p) -> Maybe (SyntaxExpr p) -> SyntaxExpr p -> Pat p
-- | n+k pattern
NPlusKPat :: XNPlusKPat p -> LIdP p -> XRec p (HsOverLit p) -> HsOverLit p -> SyntaxExpr p -> SyntaxExpr p -> Pat p
-- |
SigPat :: XSigPat p -> LPat p -> HsPatSigType (NoGhcTc p) -> Pat p
XPat :: !XXPat p -> Pat p
-- | Located Haskell Expression
type LHsExpr p = XRec p HsExpr p
-- | Syntax Expression
--
-- SyntaxExpr is represents the function used in interpreting rebindable
-- syntax. In the parser, we have no information to supply; in the
-- renamer, we have the name of the function (but see Note [Monad fail :
-- Rebindable syntax, overloaded strings] for a wrinkle) and in the
-- type-checker we have a more elaborate structure SyntaxExprTc.
--
-- In some contexts, rebindable syntax is not implemented, and so we have
-- constructors to represent that possibility in both the renamer and
-- typechecker instantiations.
--
-- E.g. (>>=) is filled in before the renamer by the
-- appropriate Name for (>>=), and then
-- instantiated by the type checker with its type args etc
type family SyntaxExpr p
-- | Guarded Right-Hand Sides
--
-- GRHSs are used both for pattern bindings and for Matches
--
--
data () => GRHSs p body
GRHSs :: XCGRHSs p body -> [LGRHS p body] -> HsLocalBinds p -> GRHSs p body
[grhssExt] :: GRHSs p body -> XCGRHSs p body
-- | Guarded RHSs
[grhssGRHSs] :: GRHSs p body -> [LGRHS p body]
-- | The where clause
[grhssLocalBinds] :: GRHSs p body -> HsLocalBinds p
XGRHSs :: !XXGRHSs p body -> GRHSs p body
data () => MatchGroup p body
MG :: XMG p body -> XRec p [LMatch p body] -> MatchGroup p body
[mg_ext] :: MatchGroup p body -> XMG p body
[mg_alts] :: MatchGroup p body -> XRec p [LMatch p body]
XMatchGroup :: !XXMatchGroup p body -> MatchGroup p body
-- | Haskell Splice
data () => HsUntypedSplice id
HsUntypedSpliceExpr :: XUntypedSpliceExpr id -> LHsExpr id -> HsUntypedSplice id
HsQuasiQuote :: XQuasiQuote id -> IdP id -> XRec id FastString -> HsUntypedSplice id
XUntypedSplice :: !XXUntypedSplice id -> HsUntypedSplice id
-- | Is a TyCon a promoted data constructor or just a normal type
-- constructor?
data () => PromotionFlag
NotPromoted :: PromotionFlag
IsPromoted :: PromotionFlag
-- | Specify whether to default kind variables, and type variables of kind
-- RuntimeRepLevityMultiplicity.
data () => DefaultingStrategy
-- | Default kind variables:
--
--
-- - default kind variables of kind Type to
-- Type,
-- - default
-- RuntimeRepLevityMultiplicity kind
-- variables to LiftedRepLiftedMany,
-- respectively.
--
--
-- When this strategy is used, it means that we have determined that the
-- variables we are considering defaulting are all kind variables.
--
-- Usually, we pass this option when -XNoPolyKinds is enabled.
DefaultKindVars :: DefaultingStrategy
-- | Default (or don't default) non-standard variables, of kinds
-- RuntimeRep, Levity and Multiplicity.
NonStandardDefaulting :: NonStandardDefaultingStrategy -> DefaultingStrategy
-- | Specify whether to default type variables of kind
-- RuntimeRepLevityMultiplicity.
data () => NonStandardDefaultingStrategy
-- | Default type variables of the given kinds:
--
--
-- - default RuntimeRep variables to LiftedRep
-- - default Levity variables to Lifted
-- - default Multiplicity variables to Many
--
DefaultNonStandardTyVars :: NonStandardDefaultingStrategy
-- | Try not to default type variables of the kinds
-- RuntimeRepLevityMultiplicity.
--
-- Note that these might get defaulted anyway, if they are kind variables
-- and `-XNoPolyKinds` is enabled.
TryNotToDefaultNonStandardTyVars :: NonStandardDefaultingStrategy
data () => TypeOrConstraint
TypeLike :: TypeOrConstraint
ConstraintLike :: TypeOrConstraint
-- | Flag to see whether we're type-checking terms or kind-checking types
data () => TypeOrKind
TypeLevel :: TypeOrKind
KindLevel :: TypeOrKind
-- | An integer or infinity
data () => IntWithInf
data () => UnfoldingSource
VanillaSrc :: UnfoldingSource
StableUserSrc :: UnfoldingSource
StableSystemSrc :: UnfoldingSource
CompulsorySrc :: UnfoldingSource
-- | Inline Specification
data () => InlineSpec
Inline :: SourceText -> InlineSpec
Inlinable :: SourceText -> InlineSpec
NoInline :: SourceText -> InlineSpec
Opaque :: SourceText -> InlineSpec
NoUserInlinePrag :: InlineSpec
-- | Rule Match Information
data () => RuleMatchInfo
ConLike :: RuleMatchInfo
FunLike :: RuleMatchInfo
data () => InlinePragma
InlinePragma :: SourceText -> InlineSpec -> Maybe Arity -> Activation -> RuleMatchInfo -> InlinePragma
[inl_src] :: InlinePragma -> SourceText
[inl_inline] :: InlinePragma -> InlineSpec
[inl_sat] :: InlinePragma -> Maybe Arity
[inl_act] :: InlinePragma -> Activation
[inl_rule] :: InlinePragma -> RuleMatchInfo
data () => Activation
AlwaysActive :: Activation
ActiveBefore :: SourceText -> PhaseNum -> Activation
ActiveAfter :: SourceText -> PhaseNum -> Activation
FinalActive :: Activation
NeverActive :: Activation
data () => CompilerPhase
InitialPhase :: CompilerPhase
Phase :: PhaseNum -> CompilerPhase
FinalPhase :: CompilerPhase
-- | Phase Number
type PhaseNum = Int
data () => SuccessFlag
Succeeded :: SuccessFlag
Failed :: SuccessFlag
-- | Default Method Specification
data () => DefMethSpec ty
VanillaDM :: DefMethSpec ty
GenericDM :: ty -> DefMethSpec ty
data () => TailCallInfo
AlwaysTailCalled :: JoinArity -> TailCallInfo
NoTailCallInfo :: TailCallInfo
-- | Inside Lambda
data () => InsideLam
-- | Occurs inside a non-linear lambda Substituting a redex for this
-- occurrence is dangerous because it might duplicate work.
IsInsideLam :: InsideLam
NotInsideLam :: InsideLam
-- | Interesting Context
data () => InterestingCxt
-- | Function: is applied Data value: scrutinised by a case with at least
-- one non-DEFAULT branch
IsInteresting :: InterestingCxt
NotInteresting :: InterestingCxt
type BranchCount = Int
-- | identifier Occurrence Information
data () => OccInfo
-- | There are many occurrences, or unknown occurrences
ManyOccs :: !TailCallInfo -> OccInfo
[occ_tail] :: OccInfo -> !TailCallInfo
-- | Marks unused variables. Sometimes useful for lambda and case-bound
-- variables.
IAmDead :: OccInfo
-- | Occurs exactly once (per branch), not inside a rule
OneOcc :: !InsideLam -> {-# UNPACK #-} !BranchCount -> !InterestingCxt -> !TailCallInfo -> OccInfo
[occ_in_lam] :: OccInfo -> !InsideLam
[occ_n_br] :: OccInfo -> {-# UNPACK #-} !BranchCount
[occ_int_cxt] :: OccInfo -> !InterestingCxt
[occ_tail] :: OccInfo -> !TailCallInfo
-- | This identifier breaks a loop of mutually recursive functions. The
-- field marks whether it is only a loop breaker due to a reference in a
-- rule
IAmALoopBreaker :: !RulesOnly -> !TailCallInfo -> OccInfo
[occ_rules_only] :: OccInfo -> !RulesOnly
[occ_tail] :: OccInfo -> !TailCallInfo
-- | Embedding Projection pair
data () => EP a
EP :: a -> a -> EP a
[fromEP] :: EP a -> a
[toEP] :: EP a -> a
-- | Are we dealing with an unboxed tuple or an unboxed sum?
--
-- Used when validity checking, see check_ubx_tuple_or_sum.
data () => UnboxedTupleOrSum
UnboxedTupleType :: UnboxedTupleOrSum
UnboxedSumType :: UnboxedTupleOrSum
data () => TupleSort
BoxedTuple :: TupleSort
UnboxedTuple :: TupleSort
ConstraintTuple :: TupleSort
-- | A general-purpose pretty-printing precedence type.
newtype () => PprPrec
PprPrec :: Int -> PprPrec
data () => OverlapMode
-- | This instance must not overlap another NoOverlap instance.
-- However, it may be overlapped by Overlapping instances, and it
-- may overlap Overlappable instances.
NoOverlap :: SourceText -> OverlapMode
-- | Silently ignore this instance if you find a more specific one that
-- matches the constraint you are trying to resolve
--
-- Example: constraint (Foo [Int]) instance Foo [Int] instance {-#
-- OVERLAPPABLE #-} Foo [a]
--
-- Since the second instance has the Overlappable flag, the first
-- instance will be chosen (otherwise its ambiguous which to choose)
Overlappable :: SourceText -> OverlapMode
-- | Silently ignore any more general instances that may be used to solve
-- the constraint.
--
-- Example: constraint (Foo [Int]) instance {-# OVERLAPPING #-} Foo [Int]
-- instance Foo [a]
--
-- Since the first instance has the Overlapping flag, the second---more
-- general---instance will be ignored (otherwise it is ambiguous which to
-- choose)
Overlapping :: SourceText -> OverlapMode
-- | Equivalent to having both Overlapping and Overlappable
-- flags.
Overlaps :: SourceText -> OverlapMode
-- | Behave like Overlappable and Overlapping, and in addition pick an
-- arbitrary one if there are multiple matching candidates, and don't
-- worry about later instantiation
--
-- Example: constraint (Foo [b]) instance {-# INCOHERENT -} Foo [Int]
-- instance Foo [a] Without the Incoherent flag, we'd complain that
-- instantiating b would change which instance was chosen. See
-- also Note [Incoherent instances] in GHC.Core.InstEnv
Incoherent :: SourceText -> OverlapMode
-- | The semantics allowed for overlapping instances for a particular
-- instance. See Note [Safe Haskell isSafeOverlap] in GHC.Core.InstEnv
-- for a explanation of the isSafeOverlap field.
--
--
data () => OverlapFlag
OverlapFlag :: OverlapMode -> Bool -> OverlapFlag
[overlapMode] :: OverlapFlag -> OverlapMode
[isSafeOverlap] :: OverlapFlag -> Bool
data () => Origin
FromSource :: Origin
Generated :: Origin
-- | Recursivity Flag
data () => RecFlag
Recursive :: RecFlag
NonRecursive :: RecFlag
-- | Should an argument be passed evaluated *and* tagged.
data () => CbvMark
MarkedCbv :: CbvMark
NotMarkedCbv :: CbvMark
data () => TopLevelFlag
TopLevel :: TopLevelFlag
NotTopLevel :: TopLevelFlag
type RuleName = FastString
data () => FunctionOrData
IsFunction :: FunctionOrData
IsData :: FunctionOrData
data () => SwapFlag
NotSwapped :: SwapFlag
IsSwapped :: SwapFlag
-- | If the Id is a lambda-bound variable then it may have
-- lambda-bound variable info. Sometimes we know whether the lambda
-- binding this variable is a "one-shot" lambda; that is, whether it is
-- applied at most once.
--
-- This information may be useful in optimisation, as computations may
-- safely be floated inside such a lambda without risk of duplicating
-- work.
--
-- See also Note [OneShotInfo overview] above.
data () => OneShotInfo
-- | No information
NoOneShotInfo :: OneShotInfo
-- | The lambda is applied at most once.
OneShotLam :: OneShotInfo
-- | A power-of-two alignment
data () => Alignment
-- | A *zero-indexed* constructor tag
type ConTagZ = Int
-- | FullArgCount is the number of type or value arguments in an
-- application, or the number of type or value binders in a lambda. Note:
-- it includes both type and value arguments!
type FullArgCount = 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
-- | Representation Arity
--
-- The number of represented arguments that can be applied to a value
-- before it does "real work". So: fib 100 has representation arity 0 x
-- -> fib x has representation arity 1 (# x, y #) -> fib (x + y)
-- has representation arity 2
type RepArity = Int
-- | The number of value arguments that can be applied to a value before it
-- does "real work". So: fib 100 has arity 0 x -> fib x has arity 1
-- See also Note [Definition of arity] in GHC.Core.Opt.Arity
type Arity = Int
data () => LeftOrRight
CLeft :: LeftOrRight
CRight :: LeftOrRight
type TidyOccEnv = UniqFM FastString Int
type OccSet = UniqSet OccName
data () => OccEnv a
data () => NameSpace
-- | BuiltInSyntax is for things like (:), [] and tuples,
-- which have special syntactic forms. They aren't in scope as such.
data () => BuiltInSyntax
BuiltInSyntax :: BuiltInSyntax
UserSyntax :: BuiltInSyntax
-- | A PiTyBinder represents an argument to a function. PiTyBinders
-- can be dependent (Named) or nondependent (Anon). They
-- may also be visible or not. See Note [PiTyBinders]
data () => PiTyBinder
type TyVarBinder = VarBndr TyVar ForAllTyFlag
-- | Variable Binder
--
-- A ForAllTyBinder is the binder of a ForAllTy It's convenient to
-- define this synonym here rather its natural home in
-- GHC.Core.TyCo.Rep, because it's used in
-- GHC.Core.DataCon.hs-boot
--
-- A TyVarBinder is a binder with only TyVar
type ForAllTyBinder = VarBndr TyCoVar ForAllTyFlag
type OutId = Id
type OutVar = Var
type InId = Id
type InVar = Var
type JoinId = Id
-- | Dictionary Function Identifier
type DFunId = Id
-- | Deterministic Name Environment
--
-- See Note [Deterministic UniqFM] in GHC.Types.Unique.DFM for
-- explanation why we need DNameEnv.
type DNameEnv a = UniqDFM Name a
-- | Name Environment
type NameEnv a = UniqFM Name a
data () => NoEpAnns
NoEpAnns :: NoEpAnns
type EpAnnCO = EpAnn NoEpAnns
-- | Captures the sort order of sub elements. This is needed when the
-- sub-elements have been split (as in a HsLocalBind which holds separate
-- binds and sigs) or for infix patterns where the order has been
-- re-arranged. It is captured explicitly so that after the Delta phase a
-- SrcSpan is used purely as an index into the annotations, allowing
-- transformations of the AST including the introduction of new Located
-- items or re-arranging existing ones.
data () => AnnSortKey
NoAnnSortKey :: AnnSortKey
AnnSortKey :: [RealSrcSpan] -> AnnSortKey
-- | exact print annotation used for capturing the locations of annotations
-- in pragmas.
data () => AnnPragma
AnnPragma :: AddEpAnn -> AddEpAnn -> [AddEpAnn] -> AnnPragma
[apr_open] :: AnnPragma -> AddEpAnn
[apr_close] :: AnnPragma -> AddEpAnn
[apr_rest] :: AnnPragma -> [AddEpAnn]
-- | A NameAnn can capture the locations of surrounding adornments,
-- such as parens or backquotes. This data type identifies what
-- particular pair are being used.
data () => NameAdornment
-- | '(' ')'
NameParens :: NameAdornment
-- | '(#' '#)'
NameParensHash :: NameAdornment
-- | '`'
NameBackquotes :: NameAdornment
-- | '[' ']'
NameSquare :: NameAdornment
-- | exact print annotations for a RdrName. There are many kinds
-- of adornment that can be attached to a given RdrName. This
-- type captures them, as detailed on the individual constructors.
data () => NameAnn
-- | Used for a name with an adornment, so `foo`, (bar)
NameAnn :: NameAdornment -> EpaLocation -> EpaLocation -> EpaLocation -> [TrailingAnn] -> NameAnn
[nann_adornment] :: NameAnn -> NameAdornment
[nann_open] :: NameAnn -> EpaLocation
[nann_name] :: NameAnn -> EpaLocation
[nann_close] :: NameAnn -> EpaLocation
[nann_trailing] :: NameAnn -> [TrailingAnn]
-- | Used for (,,,), or @()#
NameAnnCommas :: NameAdornment -> EpaLocation -> [EpaLocation] -> EpaLocation -> [TrailingAnn] -> NameAnn
[nann_adornment] :: NameAnn -> NameAdornment
[nann_open] :: NameAnn -> EpaLocation
[nann_commas] :: NameAnn -> [EpaLocation]
[nann_close] :: NameAnn -> EpaLocation
[nann_trailing] :: NameAnn -> [TrailingAnn]
-- | Used for (# | | #)
NameAnnBars :: NameAdornment -> EpaLocation -> [EpaLocation] -> EpaLocation -> [TrailingAnn] -> NameAnn
[nann_adornment] :: NameAnn -> NameAdornment
[nann_open] :: NameAnn -> EpaLocation
[nann_bars] :: NameAnn -> [EpaLocation]
[nann_close] :: NameAnn -> EpaLocation
[nann_trailing] :: NameAnn -> [TrailingAnn]
-- | Used for (), (##), []
NameAnnOnly :: NameAdornment -> EpaLocation -> EpaLocation -> [TrailingAnn] -> NameAnn
[nann_adornment] :: NameAnn -> NameAdornment
[nann_open] :: NameAnn -> EpaLocation
[nann_close] :: NameAnn -> EpaLocation
[nann_trailing] :: NameAnn -> [TrailingAnn]
-- | Used for ->, as an identifier
NameAnnRArrow :: EpaLocation -> [TrailingAnn] -> NameAnn
[nann_name] :: NameAnn -> EpaLocation
[nann_trailing] :: NameAnn -> [TrailingAnn]
-- | Used for an item with a leading '. The annotation for
-- unquoted item is stored in nann_quoted.
NameAnnQuote :: EpaLocation -> SrcSpanAnnN -> [TrailingAnn] -> NameAnn
[nann_quote] :: NameAnn -> EpaLocation
[nann_quoted] :: NameAnn -> SrcSpanAnnN
[nann_trailing] :: NameAnn -> [TrailingAnn]
-- | Used when adding a TrailingAnn to an existing LocatedN
-- which has no Api Annotation (via the EpAnnNotUsed constructor.
NameAnnTrailing :: [TrailingAnn] -> NameAnn
[nann_trailing] :: NameAnn -> [TrailingAnn]
-- | Exact print annotation for the Context data type.
data () => AnnContext
AnnContext :: Maybe (IsUnicodeSyntax, EpaLocation) -> [EpaLocation] -> [EpaLocation] -> AnnContext
-- | location and encoding of the '=>', if present.
[ac_darrow] :: AnnContext -> Maybe (IsUnicodeSyntax, EpaLocation)
-- | zero or more opening parentheses.
[ac_open] :: AnnContext -> [EpaLocation]
-- | zero or more closing parentheses.
[ac_close] :: AnnContext -> [EpaLocation]
-- | Detail of the "brackets" used in an AnnParen exact print
-- annotation.
data () => ParenType
-- | '(', ')'
AnnParens :: ParenType
-- | '(#', '#)'
AnnParensHash :: ParenType
-- | '[', ']'
AnnParensSquare :: ParenType
-- | exact print annotation for an item having surrounding "brackets", such
-- as tuples or lists
data () => AnnParen
AnnParen :: ParenType -> EpaLocation -> EpaLocation -> AnnParen
[ap_adornment] :: AnnParen -> ParenType
[ap_open] :: AnnParen -> EpaLocation
[ap_close] :: AnnParen -> EpaLocation
-- | Annotation for the "container" of a list. This captures surrounding
-- items such as braces if present, and introductory keywords such as
-- 'where'.
data () => AnnList
AnnList :: Maybe Anchor -> Maybe AddEpAnn -> Maybe AddEpAnn -> [AddEpAnn] -> [TrailingAnn] -> AnnList
-- | start point of a list having layout
[al_anchor] :: AnnList -> Maybe Anchor
[al_open] :: AnnList -> Maybe AddEpAnn
[al_close] :: AnnList -> Maybe AddEpAnn
-- | context, such as 'where' keyword
[al_rest] :: AnnList -> [AddEpAnn]
-- | items appearing after the list, such as '=>' for a context
[al_trailing] :: AnnList -> [TrailingAnn]
-- | Annotation for items appearing in a list. They can have one or more
-- trailing punctuations items, such as commas or semicolons.
data () => AnnListItem
AnnListItem :: [TrailingAnn] -> AnnListItem
[lann_trailing] :: AnnListItem -> [TrailingAnn]
-- | Captures the location of punctuation occurring between items, normally
-- in a list. It is captured as a trailing annotation.
data () => TrailingAnn
-- | Trailing ';'
AddSemiAnn :: EpaLocation -> TrailingAnn
-- | Trailing ','
AddCommaAnn :: EpaLocation -> TrailingAnn
-- | Trailing '|'
AddVbarAnn :: EpaLocation -> TrailingAnn
-- | General representation of a GenLocated type carrying a
-- parameterised annotation type.
type LocatedAn an = GenLocated SrcAnn an
type SrcSpanAnnC = SrcAnn AnnContext
type SrcSpanAnnP = SrcAnn AnnPragma
type SrcSpanAnnL = SrcAnn AnnList
type SrcSpanAnnN = SrcAnn NameAnn
type SrcSpanAnnA = SrcAnn AnnListItem
type LocatedC = GenLocated SrcSpanAnnC
type LocatedP = GenLocated SrcSpanAnnP
type LocatedL = GenLocated SrcSpanAnnL
type LocatedN = GenLocated SrcSpanAnnN
type LocatedA = GenLocated SrcSpanAnnA
-- | We mostly use 'SrcSpanAnn'' with an 'EpAnn''
type SrcAnn ann = SrcSpanAnn' EpAnn ann
-- | The 'SrcSpanAnn'' type wraps a normal SrcSpan, together with an
-- extra annotation type. This is mapped to a specific GenLocated
-- usage in the AST through the XRec and Anno type
-- families.
data () => SrcSpanAnn' a
SrcSpanAnn :: !a -> !SrcSpan -> SrcSpanAnn' a
[ann] :: SrcSpanAnn' a -> !a
[locA] :: SrcSpanAnn' a -> !SrcSpan
type LEpaComment = GenLocated Anchor EpaComment
-- | When we are parsing we add comments that belong a particular AST
-- element, and print them together with the element, interleaving them
-- into the output stream. But when editing the AST to move fragments
-- around it is useful to be able to first separate the comments into
-- those occurring before the AST element and those following it. The
-- EpaCommentsBalanced constructor is used to do this. The GHC
-- parser will only insert the EpaComments form.
data () => EpAnnComments
EpaComments :: ![LEpaComment] -> EpAnnComments
[priorComments] :: EpAnnComments -> ![LEpaComment]
EpaCommentsBalanced :: ![LEpaComment] -> ![LEpaComment] -> EpAnnComments
[priorComments] :: EpAnnComments -> ![LEpaComment]
[followingComments] :: EpAnnComments -> ![LEpaComment]
-- | If tools modify the parsed source, the MovedAnchor variant can
-- directly provide the spacing for this item relative to the previous
-- one when printing. This allows AST fragments with a particular anchor
-- to be freely moved, without worrying about recalculating the
-- appropriate anchor span.
data () => AnchorOperation
UnchangedAnchor :: AnchorOperation
MovedAnchor :: DeltaPos -> AnchorOperation
-- | An Anchor records the base location for the start of the
-- syntactic element holding the annotations, and is used as the point of
-- reference for calculating delta positions for contained annotations.
-- It is also normally used as the reference point for the spacing of the
-- element relative to its container. If it is moved, that relationship
-- is tracked in the anchor_op instead.
data () => Anchor
Anchor :: RealSrcSpan -> AnchorOperation -> Anchor
-- | Base location for the start of the syntactic element holding the
-- annotations.
[anchor] :: Anchor -> RealSrcSpan
[anchor_op] :: Anchor -> AnchorOperation
-- | The exact print annotations (EPAs) are kept in the HsSyn AST for the
-- GhcPs phase. We do not always have EPAs though, only for code that has
-- been parsed as they do not exist for generated code. This type
-- captures that they may be missing.
--
-- A goal of the annotations is that an AST can be edited, including
-- moving subtrees from one place to another, duplicating them, and so
-- on. This means that each fragment must be self-contained. To this end,
-- each annotated fragment keeps track of the anchor position it was
-- originally captured at, being simply the start span of the topmost
-- element of the ast fragment. This gives us a way to later re-calculate
-- all Located items in this layer of the AST, as well as any annotations
-- captured. The comments associated with the AST fragment are also
-- captured here.
--
-- The ann type parameter allows this general structure to be
-- specialised to the specific set of locations of original exact print
-- annotation elements. So for HsLet we have
--
-- type instance XLet GhcPs = EpAnn AnnsLet data AnnsLet = AnnsLet {
-- alLet :: EpaLocation, alIn :: EpaLocation } deriving Data
--
-- The spacing between the items under the scope of a given EpAnn is
-- normally derived from the original Anchor. But if a sub-element
-- is not in its original position, the required spacing can be directly
-- captured in the anchor_op field of the entry Anchor.
-- This allows us to freely move elements around, and stitch together new
-- AST fragments out of old ones, and have them still printed out in a
-- precise way.
data () => EpAnn ann
EpAnn :: !Anchor -> !ann -> !EpAnnComments -> EpAnn ann
-- | Base location for the start of the syntactic element holding the
-- annotations.
[entry] :: EpAnn ann -> !Anchor
-- | Annotations added by the Parser
[anns] :: EpAnn ann -> !ann
-- | Comments enclosed in the SrcSpan of the element this EpAnn is
-- attached to
[comments] :: EpAnn ann -> !EpAnnComments
-- | No Annotation for generated code, e.g. from TH, deriving, etc.
EpAnnNotUsed :: EpAnn ann
-- | Spacing between output items when exact printing. It captures the
-- spacing from the current print position on the page to the position
-- required for the thing about to be printed. This is either on the same
-- line in which case is is simply the number of spaces to emit, or it is
-- some number of lines down, with a given column offset. The exact
-- printing algorithm keeps track of the column offset pertaining to the
-- current anchor position, so the deltaColumn is the additional
-- spaces to add in this case. See
-- https://gitlab.haskell.org/ghc/ghc/wikis/api-annotations for
-- details.
data () => DeltaPos
SameLine :: !Int -> DeltaPos
[deltaColumn] :: DeltaPos -> !Int
DifferentLine :: !Int -> !Int -> DeltaPos
-- | deltaLine should always be > 0
[deltaLine] :: DeltaPos -> !Int
[deltaColumn] :: DeltaPos -> !Int
-- | Tokens embedded in the AST have an EpaLocation, unless they come from
-- generated code (e.g. by TH).
data () => TokenLocation
NoTokenLoc :: TokenLocation
TokenLoc :: !EpaLocation -> TokenLocation
-- | The anchor for an AnnKeywordId. The Parser inserts the
-- EpaSpan variant, giving the exact location of the
-- original item in the parsed source. This can be replaced by the
-- EpaDelta version, to provide a position for the item
-- relative to the end of the previous item in the source. This is useful
-- when editing an AST prior to exact printing the changed one. The list
-- of comments in the EpaDelta variant captures any
-- comments between the prior output and the thing being marked here,
-- since we cannot otherwise sort the relative order.
data () => EpaLocation
EpaSpan :: !RealSrcSpan -> !Maybe BufSpan -> EpaLocation
EpaDelta :: !DeltaPos -> ![LEpaComment] -> EpaLocation
-- | Captures an annotation, storing the AnnKeywordId and
-- its location. The parser only ever inserts EpaLocation
-- fields with a RealSrcSpan being the original location of the
-- annotation in the source file. The EpaLocation can
-- also store a delta position if the AST has been modified and needs to
-- be pretty printed again. The usual way an AddEpAnn is created
-- is using the mj ("make jump") function, and then it can be
-- inserted into the appropriate annotation.
data () => AddEpAnn
AddEpAnn :: AnnKeywordId -> EpaLocation -> AddEpAnn
data () => EpaCommentTok
-- | a docstring that can be pretty printed using pprHsDocString
EpaDocComment :: HsDocString -> EpaCommentTok
-- | doc options (prune, ignore-exports, etc)
EpaDocOptions :: String -> EpaCommentTok
-- | comment starting by "--"
EpaLineComment :: String -> EpaCommentTok
-- | comment in {- -}
EpaBlockComment :: String -> EpaCommentTok
-- | empty comment, capturing location of EOF
EpaEofComment :: EpaCommentTok
data () => EpaComment
EpaComment :: EpaCommentTok -> RealSrcSpan -> EpaComment
[ac_tok] :: EpaComment -> EpaCommentTok
-- | The location of the prior token, used in exact printing. The
-- EpaComment appears as an LEpaComment containing its
-- location. The difference between the end of the prior token and the
-- start of this location is used for the spacing when exact printing the
-- comment.
[ac_prior_tok] :: EpaComment -> RealSrcSpan
-- | Some template haskell tokens have two variants, one with an e
-- the other not:
--
--
-- [| or [e|
-- [|| or [e||
--
--
-- This type indicates whether the e is present or not.
data () => HasE
HasE :: HasE
NoE :: HasE
-- | Certain tokens can have alternate representations when unicode syntax
-- is enabled. This flag is attached to those tokens in the lexer so that
-- the original source representation can be reproduced in the
-- corresponding EpAnnotation
data () => IsUnicodeSyntax
UnicodeSyntax :: IsUnicodeSyntax
NormalSyntax :: IsUnicodeSyntax
-- | Constraint type to bundle up the requirement for OutputableBndr
-- on both the id and the NoGhcTc of it. See Note
-- [NoGhcTc].
type OutputableBndrId (pass :: Pass) = (OutputableBndr IdGhcP pass, OutputableBndr IdGhcP NoGhcTcPass pass, Outputable GenLocated Anno IdGhcP pass IdGhcP pass, Outputable GenLocated Anno IdGhcP NoGhcTcPass pass IdGhcP NoGhcTcPass pass, IsPass pass)
type family NoGhcTcPass (p :: Pass) :: Pass
-- | Maps the "normal" id type for a given GHC pass
type family IdGhcP (pass :: Pass)
-- | Allows us to check what phase we're in at GHC's runtime. For example,
-- this class allows us to write > f :: forall p. IsPass p =>
-- HsExpr (GhcPass p) -> blah > f e = case ghcPass @p of > GhcPs
-- -> ... in this RHS we have HsExpr GhcPs... > GhcRn -> ... in
-- this RHS we have HsExpr GhcRn... > GhcTc -> ... in this RHS we
-- have HsExpr GhcTc... which is very useful, for example, when
-- pretty-printing. See Note [IsPass].
class (NoGhcTcPass NoGhcTcPass p ~ NoGhcTcPass p, IsPass NoGhcTcPass p) => IsPass (p :: Pass)
ghcPass :: IsPass p => GhcPass p
type GhcTc = GhcPass 'Typechecked
type GhcRn = GhcPass 'Renamed
type GhcPs = GhcPass 'Parsed
data () => Pass
Parsed :: Pass
Renamed :: Pass
Typechecked :: Pass
-- | Used as a data type index for the hsSyn AST; also serves as a
-- singleton type for Pass
data () => GhcPass (c :: Pass)
[GhcPs] :: GhcPass 'Parsed
[GhcRn] :: GhcPass 'Renamed
[GhcTc] :: GhcPass 'Typechecked
type IsSrcSpanAnn (p :: Pass) a = (Anno IdGhcP p ~ SrcSpanAnn' EpAnn a, IsPass p)
-- | Located name with possible adornment - AnnKeywordIds :
-- AnnType, AnnPattern
type LIEWrappedName p = XRec p IEWrappedName p
-- | A name in an import or export specification which may have adornments.
-- Used primarily for accurate pretty printing of ParsedSource, and API
-- Annotation placement. The Annotation is the location of the
-- adornment in the original source.
data () => IEWrappedName p
-- | no extra
IEName :: XIEName p -> LIdP p -> IEWrappedName p
-- | pattern X
IEPattern :: XIEPattern p -> LIdP p -> IEWrappedName p
-- | type (:+:)
IEType :: XIEType p -> LIdP p -> IEWrappedName p
XIEWrappedName :: !XXIEWrappedName p -> IEWrappedName p
-- | Wildcard in an import or export sublist, like the .. in
-- import Mod ( T(Mk1, Mk2, ..) ).
data () => IEWildcard
-- | no wildcard in this list
NoIEWildcard :: IEWildcard
-- | wildcard after the given # of items in this list The Int is
-- in the range [0..n], where n is the length of the list.
IEWildcard :: Int -> IEWildcard
-- | Located Import or Export
type LIE pass = XRec pass IE pass
-- | Whether the import list is exactly what to import, or whether
-- hiding was used, and therefore everything but what was listed
-- should be imported
data () => ImportListInterpretation
Exactly :: ImportListInterpretation
EverythingBut :: ImportListInterpretation
-- | Import Declaration
--
-- A single Haskell import declaration.
data () => ImportDecl pass
ImportDecl :: XCImportDecl pass -> XRec pass ModuleName -> ImportDeclPkgQual pass -> IsBootInterface -> Bool -> ImportDeclQualifiedStyle -> Maybe (XRec pass ModuleName) -> Maybe (ImportListInterpretation, XRec pass [LIE pass]) -> ImportDecl pass
[ideclExt] :: ImportDecl pass -> XCImportDecl pass
-- | Module name.
[ideclName] :: ImportDecl pass -> XRec pass ModuleName
-- | Package qualifier.
[ideclPkgQual] :: ImportDecl pass -> ImportDeclPkgQual pass
-- | IsBoot = {-# SOURCE #-} import
[ideclSource] :: ImportDecl pass -> IsBootInterface
-- | True => safe import
[ideclSafe] :: ImportDecl pass -> Bool
-- | If/how the import is qualified.
[ideclQualified] :: ImportDecl pass -> ImportDeclQualifiedStyle
-- | as Module
[ideclAs] :: ImportDecl pass -> Maybe (XRec pass ModuleName)
-- | Explicit import list (EverythingBut => hiding, names)
[ideclImportList] :: ImportDecl pass -> Maybe (ImportListInterpretation, XRec pass [LIE pass])
-- | AnnKeywordIds
--
--
XImportDecl :: !XXImportDecl pass -> ImportDecl pass
-- | If/how an import is qualified.
data () => ImportDeclQualifiedStyle
-- | qualified appears in prepositive position.
QualifiedPre :: ImportDeclQualifiedStyle
-- | qualified appears in postpositive position.
QualifiedPost :: ImportDeclQualifiedStyle
-- | Not qualified.
NotQualified :: ImportDeclQualifiedStyle
-- | Located Import Declaration
type LImportDecl pass = XRec pass ImportDecl pass
type ClassMinimalDef = BooleanFormula Name
-- | Information about an associated type family default implementation.
-- This is used solely for validity checking. See Note [Type-checking
-- default assoc decls] in GHC.Tc.TyCl.
data () => ATValidityInfo
NoATVI :: ATValidityInfo
ATVI :: SrcSpan -> [Type] -> ATValidityInfo
data () => ClassATItem
ATI :: TyCon -> Maybe (Type, ATValidityInfo) -> ClassATItem
type DefMethInfo = Maybe (Name, DefMethSpec Type)
type ClassOpItem = (Id, DefMethInfo)
data () => FunDep pass
FunDep :: XCFunDep pass -> [LIdP pass] -> [LIdP pass] -> FunDep pass
XFunDep :: !XXFunDep pass -> FunDep pass
data () => Class
-- | Paints a picture of what a TyCon represents, in broad strokes.
-- This is used towards more informative error messages.
data () => TyConFlavour
ClassFlavour :: TyConFlavour
TupleFlavour :: Boxity -> TyConFlavour
SumFlavour :: TyConFlavour
DataTypeFlavour :: TyConFlavour
NewtypeFlavour :: TyConFlavour
AbstractTypeFlavour :: TyConFlavour
DataFamilyFlavour :: Maybe TyCon -> TyConFlavour
OpenTypeFamilyFlavour :: Maybe TyCon -> TyConFlavour
ClosedTypeFamilyFlavour :: TyConFlavour
TypeSynonymFlavour :: TyConFlavour
-- | e.g., the (->) TyCon.
BuiltInTypeFlavour :: TyConFlavour
PromotedDataConFlavour :: TyConFlavour
data () => ExpandSynResult tyco
NoExpansion :: ExpandSynResult tyco
ExpandsSyn :: [(TyVar, tyco)] -> Type -> [tyco] -> ExpandSynResult tyco
data () => PrimElemRep
Int8ElemRep :: PrimElemRep
Int16ElemRep :: PrimElemRep
Int32ElemRep :: PrimElemRep
Int64ElemRep :: PrimElemRep
Word8ElemRep :: PrimElemRep
Word16ElemRep :: PrimElemRep
Word32ElemRep :: PrimElemRep
Word64ElemRep :: PrimElemRep
FloatElemRep :: PrimElemRep
DoubleElemRep :: PrimElemRep
-- | A PrimRep is an abstraction of a type. It contains information
-- that the code generator needs in order to pass arguments, return
-- results, and store values of this type. See also Note [RuntimeRep and
-- PrimRep] in GHC.Types.RepType and Note [VoidRep] in
-- GHC.Types.RepType.
data () => PrimRep
VoidRep :: PrimRep
LiftedRep :: PrimRep
-- | Unlifted pointer
UnliftedRep :: PrimRep
-- | Signed, 8-bit value
Int8Rep :: PrimRep
-- | Signed, 16-bit value
Int16Rep :: PrimRep
-- | Signed, 32-bit value
Int32Rep :: PrimRep
-- | Signed, 64 bit value
Int64Rep :: PrimRep
-- | Signed, word-sized value
IntRep :: PrimRep
-- | Unsigned, 8 bit value
Word8Rep :: PrimRep
-- | Unsigned, 16 bit value
Word16Rep :: PrimRep
-- | Unsigned, 32 bit value
Word32Rep :: PrimRep
-- | Unsigned, 64 bit value
Word64Rep :: PrimRep
-- | Unsigned, word-sized value
WordRep :: PrimRep
-- | A pointer, but not to a Haskell value (use '(Un)liftedRep')
AddrRep :: PrimRep
FloatRep :: PrimRep
DoubleRep :: PrimRep
-- | A vector
VecRep :: Int -> PrimElemRep -> PrimRep
-- | Information pertaining to the expansion of a type synonym
-- (type)
data () => FamTyConFlav
-- | Represents an open type family without a fixed right hand side.
-- Additional instances can appear at any time.
--
-- These are introduced by either a top level declaration:
--
--
-- data family T a :: *
--
--
-- Or an associated data type declaration, within a class declaration:
--
--
-- class C a b where
-- data T b :: *
--
DataFamilyTyCon :: TyConRepName -> FamTyConFlav
-- | An open type synonym family e.g. type family F x y :: * ->
-- *
OpenSynFamilyTyCon :: FamTyConFlav
-- | A closed type synonym family e.g. type family F x where { F Int =
-- Bool }
ClosedSynFamilyTyCon :: Maybe (CoAxiom Branched) -> FamTyConFlav
-- | A closed type synonym family declared in an hs-boot file with type
-- family F a where ..
AbstractClosedSynFamilyTyCon :: FamTyConFlav
-- | Built-in type family used by the TypeNats solver
BuiltInSynFamTyCon :: BuiltInSynFamily -> FamTyConFlav
data () => Injectivity
NotInjective :: Injectivity
Injective :: [Bool] -> Injectivity
-- | Describes the flavour of an algebraic type constructor. For classes
-- and data families, this flavour includes a reference to the parent
-- TyCon.
data () => AlgTyConFlav
-- | An ordinary algebraic type constructor. This includes unlifted and
-- representation-polymorphic datatypes and newtypes and unboxed tuples,
-- but NOT unboxed sums; see UnboxedSumTyCon.
VanillaAlgTyCon :: TyConRepName -> AlgTyConFlav
-- | An unboxed sum type constructor. This is distinct from VanillaAlgTyCon
-- because we currently don't allow unboxed sums to be Typeable since
-- there are too many of them. See #13276.
UnboxedSumTyCon :: AlgTyConFlav
-- | Type constructors representing a class dictionary. See Note [ATyCon
-- for classes] in GHC.Core.TyCo.Rep
ClassTyCon :: Class -> TyConRepName -> AlgTyConFlav
-- | Type constructors representing an *instance* of a *data* family.
-- Parameters:
--
-- 1) The type family in question
--
-- 2) Instance types; free variables are the tyConTyVars of the
-- current TyCon (not the family one). INVARIANT: the number of
-- types matches the arity of the family TyCon
--
-- 3) A CoTyCon identifying the representation type with the
-- type instance family
DataFamInstTyCon :: CoAxiom Unbranched -> TyCon -> [Type] -> AlgTyConFlav
-- | Some promoted datacons signify extra info relevant to GHC. For
-- example, the IntRep constructor of RuntimeRep
-- corresponds to the IntRep constructor of PrimRep. This
-- data structure allows us to store this information right in the
-- TyCon. The other approach would be to look up things like
-- RuntimeRep's PrimRep by known-key every time. See also
-- Note [Getting from RuntimeRep to PrimRep] in GHC.Types.RepType
data () => PromDataConInfo
-- | an ordinary promoted data con
NoPromInfo :: PromDataConInfo
-- | A constructor of RuntimeRep. The argument to the function
-- should be the list of arguments to the promoted datacon.
RuntimeRep :: ([Type] -> [PrimRep]) -> PromDataConInfo
-- | A constructor of VecCount
VecCount :: Int -> PromDataConInfo
-- | A constructor of VecElem
VecElem :: PrimElemRep -> PromDataConInfo
-- | A constructor of PromDataConInfo
Levity :: Levity -> PromDataConInfo
-- | Represents right-hand-sides of TyCons for algebraic types
data () => AlgTyConRhs
-- | Says that we know nothing about this data type, except that it's
-- represented by a pointer. Used when we export a data type abstractly
-- into an .hi file.
AbstractTyCon :: AlgTyConRhs
-- | Information about those TyCons derived from a data
-- declaration. This includes data types with no constructors at all.
DataTyCon :: [DataCon] -> Int -> Bool -> Bool -> Bool -> AlgTyConRhs
-- | The data type constructors; can be empty if the user declares the type
-- to have no constructors
--
-- INVARIANT: Kept in order of increasing DataCon tag (see the tag
-- assignment in mkTyConTagMap)
[data_cons] :: AlgTyConRhs -> [DataCon]
-- | Cached value: length data_cons
[data_cons_size] :: AlgTyConRhs -> Int
-- | Cached value: is this an enumeration type? See Note [Enumeration
-- types]
[is_enum] :: AlgTyConRhs -> Bool
[is_type_data] :: AlgTyConRhs -> Bool
-- | True if the data type constructor has a known, fixed levity
-- when fully applied to its arguments, False otherwise.
--
-- This can only be False with UnliftedDatatypes, e.g.
--
--
-- data A :: TYPE (BoxedRep l) where { MkA :: Int -> A }
--
--
-- This boolean is cached to make it cheaper to check for levity and
-- representation-polymorphism in tcHasFixedRuntimeRep.
[data_fixed_lev] :: AlgTyConRhs -> Bool
TupleTyCon :: DataCon -> TupleSort -> AlgTyConRhs
-- | The unique constructor for the newtype. It has no
-- existentials
[data_con] :: AlgTyConRhs -> DataCon
-- | Is this a boxed, unboxed or constraint tuple?
[tup_sort] :: AlgTyConRhs -> TupleSort
-- | An unboxed sum type.
SumTyCon :: [DataCon] -> Int -> AlgTyConRhs
-- | The data type constructors; can be empty if the user declares the type
-- to have no constructors
--
-- INVARIANT: Kept in order of increasing DataCon tag (see the tag
-- assignment in mkTyConTagMap)
[data_cons] :: AlgTyConRhs -> [DataCon]
-- | Cached value: length data_cons
[data_cons_size] :: AlgTyConRhs -> Int
-- | Information about those TyCons derived from a newtype
-- declaration
NewTyCon :: DataCon -> Type -> ([TyVar], Type) -> CoAxiom Unbranched -> Bool -> AlgTyConRhs
-- | The unique constructor for the newtype. It has no
-- existentials
[data_con] :: AlgTyConRhs -> DataCon
-- | Cached value: the argument type of the constructor, which is just the
-- representation type of the TyCon (remember that
-- newtypes do not exist at runtime so need a different
-- representation type).
--
-- The free TyVars of this type are the tyConTyVars from
-- the corresponding TyCon
[nt_rhs] :: AlgTyConRhs -> Type
-- | Same as the nt_rhs, but this time eta-reduced. Hence the list
-- of TyVars in this field may be shorter than the declared arity
-- of the TyCon.
[nt_etad_rhs] :: AlgTyConRhs -> ([TyVar], Type)
[nt_co] :: AlgTyConRhs -> CoAxiom Unbranched
-- | True if the newtype has a known, fixed representation when
-- fully applied to its arguments, False otherwise. This can only
-- ever be False with UnliftedNewtypes.
--
-- Example:
--
--
-- newtype N (a :: TYPE r) = MkN a
--
--
-- Invariant: nt_fixed_rep nt = tcHasFixedRuntimeRep (nt_rhs nt)
--
-- This boolean is cached to make it cheaper to check if a variable
-- binding is representation-polymorphic in tcHasFixedRuntimeRep.
[nt_fixed_rep] :: AlgTyConRhs -> Bool
data () => TyConBndrVis
NamedTCB :: ForAllTyFlag -> TyConBndrVis
AnonTCB :: FunTyFlag -> TyConBndrVis
type TyConPiTyBinder = VarBndr TyCoVar TyConBndrVis
type TyConBinder = VarBndr TyVar TyConBndrVis
data () => TyCoFolder env a
TyCoFolder :: (Type -> Maybe Type) -> (env -> TyVar -> a) -> (env -> CoVar -> a) -> (env -> CoercionHole -> a) -> (env -> TyCoVar -> ForAllTyFlag -> env) -> TyCoFolder env a
[tcf_view] :: TyCoFolder env a -> Type -> Maybe Type
[tcf_tyvar] :: TyCoFolder env a -> env -> TyVar -> a
[tcf_covar] :: TyCoFolder env a -> env -> CoVar -> a
-- | What to do with coercion holes. See Note [Coercion holes] in
-- GHC.Core.TyCo.Rep.
[tcf_hole] :: TyCoFolder env a -> env -> CoercionHole -> a
-- | The returned env is used in the extended scope
[tcf_tycobinder] :: TyCoFolder env a -> env -> TyCoVar -> ForAllTyFlag -> env
-- | A coercion to be filled in by the type-checker. See Note [Coercion
-- holes]
data () => CoercionHole
CoercionHole :: CoVar -> IORef (Maybe Coercion) -> CoercionHole
[ch_co_var] :: CoercionHole -> CoVar
[ch_ref] :: CoercionHole -> IORef (Maybe Coercion)
type MCoercionR = MCoercion
type KindCoercion = CoercionN
type CoercionP = Coercion
type CoercionR = Coercion
data () => FunSel
SelMult :: FunSel
SelArg :: FunSel
SelRes :: FunSel
-- | A type labeled KnotTied might have knot-tied tycons in it. See
-- Note [Type checking recursive type and class declarations] in
-- GHC.Tc.TyCl
type KnotTied ty = ty
type FRRType = Type
-- | Type synonym used for types of kind Levity.
type LevityType = Type
-- | The key representation of types within the compiler
type KindOrType = Type
-- | A substitution of Types for TyVars and Kinds for
-- KindVars
type TvSubstEnv = TyVarEnv Type
-- | A substitution of Exprs for non-coercion Ids
type IdSubstEnv = IdEnv CoreExpr
-- | 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 -> ForAllTyFlag -> 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
-- GHC.Core.TyCo.Rep.
[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 -> ForAllTyFlag -> 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 GHC.Tc.TyCl
[tcm_tycon] :: TyCoMapper env (m :: Type -> Type) -> TyCon -> m TyCon
-- | Overloaded Literal Value
data () => OverLitVal
-- | Integer-looking literals;
HsIntegral :: !IntegralLit -> OverLitVal
-- | Frac-looking literals
HsFractional :: !FractionalLit -> OverLitVal
-- | String-looking literals
HsIsString :: !SourceText -> !FastString -> OverLitVal
-- | Haskell Overloaded Literal
data () => HsOverLit p
OverLit :: XOverLit p -> OverLitVal -> HsOverLit p
[ol_ext] :: HsOverLit p -> XOverLit p
[ol_val] :: HsOverLit p -> OverLitVal
XOverLit :: !XXOverLit p -> HsOverLit p
-- | Haskell Literal
data () => HsLit x
-- | Character
HsChar :: XHsChar x -> Char -> HsLit x
-- | Unboxed character
HsCharPrim :: XHsCharPrim x -> Char -> HsLit x
-- | String
HsString :: XHsString x -> FastString -> HsLit x
-- | Packed bytes
HsStringPrim :: XHsStringPrim x -> !ByteString -> HsLit x
-- | Genuinely an Int; arises from GHC.Tc.Deriv.Generate, and from
-- TRANSLATION
HsInt :: XHsInt x -> IntegralLit -> HsLit x
-- | literal Int#
HsIntPrim :: XHsIntPrim x -> Integer -> HsLit x
-- | literal Word#
HsWordPrim :: XHsWordPrim x -> Integer -> HsLit x
-- | literal Int64#
HsInt64Prim :: XHsInt64Prim x -> Integer -> HsLit x
-- | literal Word64#
HsWord64Prim :: XHsWord64Prim x -> Integer -> HsLit x
-- | Genuinely an integer; arises only from TRANSLATION (overloaded
-- literals are done with HsOverLit)
HsInteger :: XHsInteger x -> Integer -> Type -> HsLit x
-- | Genuinely a rational; arises only from TRANSLATION (overloaded
-- literals are done with HsOverLit)
HsRat :: XHsRat x -> FractionalLit -> Type -> HsLit x
-- | Unboxed Float
HsFloatPrim :: XHsFloatPrim x -> FractionalLit -> HsLit x
-- | Unboxed Double
HsDoublePrim :: XHsDoublePrim x -> FractionalLit -> HsLit x
XLit :: !XXLit x -> HsLit x
-- | Haskell Source Bang
--
-- Bangs on data constructor arguments as the user wrote them in the
-- source code.
--
-- (HsSrcBang _ SrcUnpack SrcLazy) and (HsSrcBang _
-- SrcUnpack NoSrcStrict) (without StrictData) makes no sense, we
-- emit a warning (in checkValidDataCon) and treat it like (HsSrcBang
-- _ NoSrcUnpack SrcLazy)
data () => HsSrcBang
HsSrcBang :: SourceText -> SrcUnpackedness -> SrcStrictness -> HsSrcBang
-- | Ambiguous Field Occurrence
--
-- Represents an *occurrence* of a field that is potentially ambiguous
-- after the renamer, with the ambiguity resolved by the typechecker. We
-- always store the RdrName that the user originally wrote, and
-- store the selector function after the renamer (for unambiguous
-- occurrences) or the typechecker (for ambiguous occurrences).
--
-- See Note [HsRecField and HsRecUpdField] in GHC.Hs.Pat. See Note
-- [Located RdrNames] in GHC.Hs.Expr.
data () => AmbiguousFieldOcc pass
Unambiguous :: XUnambiguous pass -> XRec pass RdrName -> AmbiguousFieldOcc pass
Ambiguous :: XAmbiguous pass -> XRec pass RdrName -> AmbiguousFieldOcc pass
XAmbiguousFieldOcc :: !XXAmbiguousFieldOcc pass -> AmbiguousFieldOcc pass
-- | Located Ambiguous Field Occurence
type LAmbiguousFieldOcc pass = XRec pass AmbiguousFieldOcc pass
-- | Field Occurrence
--
-- Represents an *occurrence* of a field. This may or may not be a
-- binding occurrence (e.g. this type is used in ConDeclField and
-- RecordPatSynField which bind their fields, but also in
-- HsRecField for record construction and patterns, which do
-- not).
--
-- We store both the RdrName the user originally wrote, and after
-- the renamer we use the extension field to store the selector function.
data () => FieldOcc pass
FieldOcc :: XCFieldOcc pass -> XRec pass RdrName -> FieldOcc pass
[foExt] :: FieldOcc pass -> XCFieldOcc pass
[foLabel] :: FieldOcc pass -> XRec pass RdrName
XFieldOcc :: !XXFieldOcc pass -> FieldOcc pass
-- | Located Field Occurrence
type LFieldOcc pass = XRec pass FieldOcc pass
type LHsTypeArg p = HsArg LHsType p LHsKind p
-- | Arguments in an expression/type after splitting
data () => HsArg tm ty
HsValArg :: tm -> HsArg tm ty
HsTypeArg :: SrcSpan -> ty -> HsArg tm ty
HsArgPar :: SrcSpan -> HsArg tm ty
-- | Describes the arguments to a data constructor. This is a common
-- representation for several constructor-related concepts, including:
--
--
-- - The arguments in a Haskell98-style constructor declaration (see
-- HsConDeclH98Details in GHC.Hs.Decls).
-- - The arguments in constructor patterns in case/function
-- definitions (see HsConPatDetails in GHC.Hs.Pat).
-- - The left-hand side arguments in a pattern synonym binding (see
-- HsPatSynDetails in GHC.Hs.Binds).
--
--
-- One notable exception is the arguments in a GADT constructor, which
-- uses a separate data type entirely (see HsConDeclGADTDetails
-- in GHC.Hs.Decls). This is because GADT constructors cannot be
-- declared with infix syntax, unlike the concepts above (#18844).
data () => HsConDetails tyarg arg rec
PrefixCon :: [tyarg] -> [arg] -> HsConDetails tyarg arg rec
RecCon :: rec -> HsConDetails tyarg arg rec
InfixCon :: arg -> arg -> HsConDetails tyarg arg rec
-- | Constructor Declaration Field
data () => ConDeclField pass
ConDeclField :: XConDeclField pass -> [LFieldOcc pass] -> LBangType pass -> Maybe (LHsDoc pass) -> ConDeclField pass
[cd_fld_ext] :: ConDeclField pass -> XConDeclField pass
-- | See Note [ConDeclField pass]
[cd_fld_names] :: ConDeclField pass -> [LFieldOcc pass]
[cd_fld_type] :: ConDeclField pass -> LBangType pass
-- |
[cd_fld_doc] :: ConDeclField pass -> Maybe (LHsDoc pass)
XConDeclField :: !XXConDeclField pass -> ConDeclField pass
-- | Located Constructor Declaration Field
type LConDeclField pass = XRec pass ConDeclField pass
-- | Haskell Tuple Sort
data () => HsTupleSort
HsUnboxedTuple :: HsTupleSort
HsBoxedOrConstraintTuple :: HsTupleSort
-- | This is used in the syntax. In constructor declaration. It must keep
-- the arrow representation.
data () => HsScaled pass a
HsScaled :: HsArrow pass -> a -> HsScaled pass a
data () => HsLinearArrowTokens pass
HsPct1 :: !LHsToken "%1" pass -> !LHsUniToken "->" "\8594" pass -> HsLinearArrowTokens pass
HsLolly :: !LHsToken "\8888" pass -> HsLinearArrowTokens pass
-- | Denotes the type of arrows in the surface language
data () => HsArrow pass
-- | a -> b or a → b
HsUnrestrictedArrow :: !LHsUniToken "->" "\8594" pass -> HsArrow pass
-- | a %1 -> b or a %1 → b, or a ⊸ b
HsLinearArrow :: !HsLinearArrowTokens pass -> HsArrow pass
-- | a %m -> b or a %m → b (very much including `a %Many -> b`! This
-- is how the programmer wrote it). It is stored as an HsType so
-- as to preserve the syntax as written in the program.
HsExplicitMult :: !LHsToken "%" pass -> !LHsType pass -> !LHsUniToken "->" "\8594" pass -> HsArrow pass
-- | Haskell Type Literal
data () => HsTyLit pass
HsNumTy :: XNumTy pass -> Integer -> HsTyLit pass
HsStrTy :: XStrTy pass -> FastString -> HsTyLit pass
HsCharTy :: XCharTy pass -> Char -> HsTyLit pass
XTyLit :: !XXTyLit pass -> HsTyLit pass
-- | Haskell Type
data () => HsType pass
-- |
HsForAllTy :: XForAllTy pass -> HsForAllTelescope pass -> LHsType pass -> HsType pass
[hst_xforall] :: HsType pass -> XForAllTy pass
[hst_tele] :: HsType pass -> HsForAllTelescope pass
[hst_body] :: HsType pass -> LHsType pass
HsQualTy :: XQualTy pass -> LHsContext pass -> LHsType pass -> HsType pass
[hst_xqual] :: HsType pass -> XQualTy pass
[hst_ctxt] :: HsType pass -> LHsContext pass
[hst_body] :: HsType pass -> LHsType pass
-- |
HsTyVar :: XTyVar pass -> PromotionFlag -> LIdP pass -> HsType pass
-- |
HsAppTy :: XAppTy pass -> LHsType pass -> LHsType pass -> HsType pass
HsAppKindTy :: XAppKindTy pass -> LHsType pass -> LHsKind pass -> HsType pass
-- |
HsFunTy :: XFunTy pass -> HsArrow pass -> LHsType pass -> LHsType pass -> HsType pass
-- |
HsListTy :: XListTy pass -> LHsType pass -> HsType pass
-- |
HsTupleTy :: XTupleTy pass -> HsTupleSort -> [LHsType pass] -> HsType pass
-- |
HsSumTy :: XSumTy pass -> [LHsType pass] -> HsType pass
-- |
HsOpTy :: XOpTy pass -> PromotionFlag -> LHsType pass -> LIdP pass -> LHsType pass -> HsType pass
-- |
HsParTy :: XParTy pass -> LHsType pass -> HsType pass
-- |
-- (?x :: ty)
--
--
--
HsIParamTy :: XIParamTy pass -> XRec pass HsIPName -> LHsType pass -> HsType pass
-- |
HsStarTy :: XStarTy pass -> Bool -> HsType pass
-- |
-- (ty :: kind)
--
--
--
HsKindSig :: XKindSig pass -> LHsType pass -> LHsKind pass -> HsType pass
-- |
HsSpliceTy :: XSpliceTy pass -> HsUntypedSplice pass -> HsType pass
-- |
HsDocTy :: XDocTy pass -> LHsType pass -> LHsDoc pass -> HsType pass
-- |
HsBangTy :: XBangTy pass -> HsSrcBang -> LHsType pass -> HsType pass
-- |
HsRecTy :: XRecTy pass -> [LConDeclField pass] -> HsType pass
-- |
HsExplicitListTy :: XExplicitListTy pass -> PromotionFlag -> [LHsType pass] -> HsType pass
-- |
HsExplicitTupleTy :: XExplicitTupleTy pass -> [LHsType pass] -> HsType pass
-- |
HsTyLit :: XTyLit pass -> HsTyLit pass -> HsType pass
-- |
HsWildCardTy :: XWildCardTy pass -> HsType pass
XHsType :: !XXType pass -> HsType pass
-- | Haskell Type Variable Binder The flag annotates the binder. It is
-- Specificity in places where explicit specificity is allowed
-- (e.g. x :: forall {a} b. ...) or () in other places.
data () => HsTyVarBndr flag pass
UserTyVar :: XUserTyVar pass -> flag -> LIdP pass -> HsTyVarBndr flag pass
-- |
KindedTyVar :: XKindedTyVar pass -> flag -> LIdP pass -> LHsKind pass -> HsTyVarBndr flag pass
XTyVarBndr :: !XXTyVarBndr pass -> HsTyVarBndr flag 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
-- | A type signature that obeys the forall-or-nothing rule. In
-- other words, an LHsType that uses an
-- HsOuterSigTyVarBndrs to represent its outermost type variable
-- quantification. See Note [Representing type signatures].
data () => HsSigType pass
HsSig :: XHsSig pass -> HsOuterSigTyVarBndrs pass -> LHsType pass -> HsSigType pass
[sig_ext] :: HsSigType pass -> XHsSig pass
[sig_bndrs] :: HsSigType pass -> HsOuterSigTyVarBndrs pass
[sig_body] :: HsSigType pass -> LHsType pass
XHsSigType :: !XXHsSigType pass -> HsSigType pass
-- | Located Haskell Signature Wildcard Type
type LHsSigWcType pass = HsWildCardBndrs pass LHsSigType pass
-- | Located Haskell Wildcard Type
type LHsWcType pass = HsWildCardBndrs pass LHsType pass
-- | Located Haskell Signature Type
type LHsSigType pass = XRec pass HsSigType pass
-- | Types that can appear in pattern signatures, as well as the signatures
-- for term-level binders in RULES. See Note [Pattern signature
-- binders and scoping].
--
-- This is very similar to HsSigWcType, but with slightly
-- different semantics: see Note [HsType binders]. See also
-- Note [The wildcard story for types].
data () => HsPatSigType pass
HsPS :: XHsPS pass -> LHsType pass -> HsPatSigType pass
-- | After renamer: HsPSRn
[hsps_ext] :: HsPatSigType pass -> XHsPS pass
-- | Main payload (the type itself)
[hsps_body] :: HsPatSigType pass -> LHsType pass
XHsPatSigType :: !XXHsPatSigType pass -> HsPatSigType pass
-- | 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
-- | Used for type-family instance equations, e.g.,
--
--
-- type instance forall a. F [a] = Tree a
--
--
-- The notion of specificity is irrelevant in type family equations, so
-- we use () for the HsOuterTyVarBndrs flag.
type HsOuterFamEqnTyVarBndrs = HsOuterTyVarBndrs ()
-- | Used for signatures, e.g.,
--
--
-- f :: forall a {b}. blah
--
--
-- We use Specificity for the HsOuterTyVarBndrs
-- flag to allow distinguishing between specified and inferred
-- type variables.
type HsOuterSigTyVarBndrs = HsOuterTyVarBndrs Specificity
-- | The outermost type variables in a type that obeys the
-- forall-or-nothing rule. See Note [forall-or-nothing
-- rule].
data () => HsOuterTyVarBndrs flag pass
-- | Implicit forall, e.g., f :: a -> b -> b
HsOuterImplicit :: XHsOuterImplicit pass -> HsOuterTyVarBndrs flag pass
[hso_ximplicit] :: HsOuterTyVarBndrs flag pass -> XHsOuterImplicit pass
-- | Explicit forall, e.g., f :: forall a b. a -> b -> b
HsOuterExplicit :: XHsOuterExplicit pass flag -> [LHsTyVarBndr flag (NoGhcTc pass)] -> HsOuterTyVarBndrs flag pass
[hso_xexplicit] :: HsOuterTyVarBndrs flag pass -> XHsOuterExplicit pass flag
[hso_bndrs] :: HsOuterTyVarBndrs flag pass -> [LHsTyVarBndr flag (NoGhcTc pass)]
XHsOuterTyVarBndrs :: !XXHsOuterTyVarBndrs pass -> HsOuterTyVarBndrs flag 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
-- | Located Haskell Type Variable Binder
type LHsTyVarBndr flag pass = XRec pass HsTyVarBndr flag pass
-- | The type variable binders in an HsForAllTy. See also Note
-- [Variable Specificity and Forall Visibility] in
-- GHC.Tc.Gen.HsType.
data () => HsForAllTelescope pass
-- | A visible forall (e.g., forall a -> {...}). These
-- do not have any notion of specificity, so we use () as a
-- placeholder value.
HsForAllVis :: XHsForAllVis pass -> [LHsTyVarBndr () pass] -> HsForAllTelescope pass
[hsf_xvis] :: HsForAllTelescope pass -> XHsForAllVis pass
[hsf_vis_bndrs] :: HsForAllTelescope pass -> [LHsTyVarBndr () pass]
-- | An invisible forall (e.g., forall a {b} c. {...}),
-- where each binder has a Specificity.
HsForAllInvis :: XHsForAllInvis pass -> [LHsTyVarBndr Specificity pass] -> HsForAllTelescope pass
[hsf_xinvis] :: HsForAllTelescope pass -> XHsForAllInvis pass
[hsf_invis_bndrs] :: HsForAllTelescope pass -> [LHsTyVarBndr Specificity pass]
XHsForAllTelescope :: !XXHsForAllTelescope pass -> HsForAllTelescope pass
-- | Located Haskell Kind
type LHsKind pass = XRec pass HsKind pass
-- | Haskell Kind
type HsKind pass = HsType pass
-- | Located Haskell Type
type LHsType pass = XRec pass HsType pass
-- | Haskell Context
type HsContext pass = [LHsType pass]
-- | Located Haskell Context
type LHsContext pass = XRec pass HsContext 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 Bang Type
type LBangType pass = XRec pass BangType pass
-- | Haskell Field Binding
--
--
--
-- For details on above see Note [exact print annotations] in
-- GHC.Parser.Annotation
data () => HsFieldBind lhs rhs
HsFieldBind :: XHsFieldBind lhs -> lhs -> rhs -> Bool -> HsFieldBind lhs rhs
[hfbAnn] :: HsFieldBind lhs rhs -> XHsFieldBind lhs
[hfbLHS] :: HsFieldBind lhs rhs -> lhs
-- | Filled in by renamer when punning
[hfbRHS] :: HsFieldBind lhs rhs -> rhs
-- | Note [Punning]
[hfbPun] :: HsFieldBind lhs rhs -> Bool
-- | Haskell Record Update Field
type HsRecUpdField p = HsFieldBind LAmbiguousFieldOcc p LHsExpr p
-- | Haskell Record Field
type HsRecField p arg = HsFieldBind LFieldOcc p arg
-- | Located Haskell Record Update Field
type LHsRecUpdField p = XRec p HsRecUpdField p
-- | Located Haskell Record Field
type LHsRecField p arg = XRec p HsRecField p arg
-- | Located Haskell Record Field
type LHsFieldBind p id arg = XRec p HsFieldBind id arg
-- | Newtype to be able to have a specific XRec instance for the Int in
-- rec_dotdot
newtype () => RecFieldsDotDot
RecFieldsDotDot :: Int -> RecFieldsDotDot
[unRecFieldsDotDot] :: RecFieldsDotDot -> Int
-- | Haskell Record Fields
--
-- HsRecFields is used only for patterns and expressions (not data type
-- declarations)
data () => HsRecFields p arg
HsRecFields :: [LHsRecField p arg] -> Maybe (XRec p RecFieldsDotDot) -> HsRecFields p arg
[rec_flds] :: HsRecFields p arg -> [LHsRecField p arg]
[rec_dotdot] :: HsRecFields p arg -> Maybe (XRec p RecFieldsDotDot)
-- | Haskell Constructor Pattern Details
type HsConPatDetails p = HsConDetails HsConPatTyArg NoGhcTc p LPat p HsRecFields p LPat p
-- | Type argument in a data constructor pattern, e.g. the @a in
-- f (Just @a x) = ....
data () => HsConPatTyArg p
HsConPatTyArg :: !LHsToken "@" p -> HsPatSigType p -> HsConPatTyArg p
type family ConLikeP x
-- | Haskell Pattern Synonym Direction
data () => HsPatSynDir id
Unidirectional :: HsPatSynDir id
ImplicitBidirectional :: HsPatSynDir id
ExplicitBidirectional :: MatchGroup id (LHsExpr id) -> HsPatSynDir id
-- | Record Pattern Synonym Field
data () => RecordPatSynField pass
RecordPatSynField :: FieldOcc pass -> LIdP pass -> RecordPatSynField pass
-- | Field label visible in rest of the file
[recordPatSynField] :: RecordPatSynField pass -> FieldOcc pass
-- | Filled in by renamer, the name used internally by the pattern
[recordPatSynPatVar] :: RecordPatSynField pass -> LIdP pass
-- | Haskell Pattern Synonym Details
type HsPatSynDetails pass = HsConDetails Void LIdP pass [RecordPatSynField pass]
-- | Fixity Signature
data () => FixitySig pass
FixitySig :: XFixitySig pass -> [LIdP pass] -> Fixity -> FixitySig pass
XFixitySig :: !XXFixitySig pass -> FixitySig pass
-- | Located Fixity Signature
type LFixitySig pass = XRec pass FixitySig pass
-- | Signatures and pragmas
data () => Sig pass
-- | An ordinary type signature
--
--
-- f :: Num a => a -> a
--
--
-- After renaming, this list of Names contains the named wildcards
-- brought into scope by this signature. For a signature _ -> _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.
--
--
TypeSig :: XTypeSig pass -> [LIdP pass] -> LHsSigWcType pass -> Sig pass
-- | A pattern synonym type signature
--
--
-- pattern Single :: () => (Show a) => a -> [a]
--
--
--
PatSynSig :: XPatSynSig pass -> [LIdP pass] -> LHsSigType pass -> Sig pass
-- | A signature for a class method False: ordinary class-method signature
-- True: generic-default class method signature e.g. class C a where op
-- :: a -> a -- Ordinary default op :: Eq a => a -> a -- Generic
-- default No wildcards allowed here
--
--
ClassOpSig :: XClassOpSig pass -> Bool -> [LIdP pass] -> LHsSigType pass -> Sig pass
-- | An ordinary fixity declaration
--
--
-- infixl 8 ***
--
--
--
FixSig :: XFixSig pass -> FixitySig pass -> Sig pass
-- | An inline pragma
--
--
-- {#- INLINE f #-}
--
--
--
InlineSig :: XInlineSig pass -> LIdP pass -> InlinePragma -> Sig pass
-- | A specialisation pragma
--
--
-- {-# SPECIALISE f :: Int -> Int #-}
--
--
--
SpecSig :: XSpecSig pass -> LIdP pass -> [LHsSigType pass] -> InlinePragma -> Sig pass
-- | A specialisation pragma for instance declarations only
--
--
-- {-# SPECIALISE instance Eq [Int] #-}
--
--
-- (Class tys); should be a specialisation of the current instance
-- declaration
--
--
SpecInstSig :: XSpecInstSig pass -> LHsSigType pass -> Sig pass
-- | A minimal complete definition pragma
--
--
-- {-# MINIMAL a | (b, c | (d | e)) #-}
--
--
--
MinimalSig :: XMinimalSig pass -> LBooleanFormula (LIdP pass) -> Sig pass
-- | A "set cost centre" pragma for declarations
--
--
-- {-# SCC funName #-}
--
--
-- or
--
--
-- {-# SCC funName "cost_centre_name" #-}
--
SCCFunSig :: XSCCFunSig pass -> LIdP pass -> Maybe (XRec pass 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 -> XRec pass [LIdP pass] -> Maybe (LIdP pass) -> Sig pass
XSig :: !XXSig pass -> Sig pass
-- | Located Signature
type LSig pass = XRec pass Sig pass
-- | Implicit parameter bindings.
--
--
data () => IPBind id
IPBind :: XCIPBind id -> XRec id HsIPName -> LHsExpr id -> IPBind id
XIPBind :: !XXIPBind id -> IPBind id
-- | Located Implicit Parameter Binding
--
-- May have AnnKeywordId : AnnSemi when in a list
type LIPBind id = XRec id IPBind id
-- | Haskell Implicit Parameter Bindings
data () => HsIPBinds id
IPBinds :: XIPBinds id -> [LIPBind id] -> HsIPBinds id
XHsIPBinds :: !XXHsIPBinds id -> HsIPBinds id
-- |
--
-- Pattern Synonym binding
data () => PatSynBind idL idR
PSB :: XPSB idL idR -> LIdP idL -> HsPatSynDetails idR -> LPat idR -> HsPatSynDir idR -> PatSynBind idL idR
[psb_ext] :: PatSynBind idL idR -> XPSB idL idR
-- | Name of the pattern synonym
[psb_id] :: PatSynBind idL idR -> LIdP idL
-- | Formal parameter names
[psb_args] :: PatSynBind idL idR -> HsPatSynDetails idR
-- | Right-hand side
[psb_def] :: PatSynBind idL idR -> LPat idR
-- | Directionality
[psb_dir] :: PatSynBind idL idR -> HsPatSynDir idR
XPatSynBind :: !XXPatSynBind idL idR -> PatSynBind idL idR
-- | Haskell Binding with separate Left and Right id's
data () => HsBindLR idL idR
-- | Function-like Binding
--
-- FunBind is used for both functions f x = e and variables
-- f = x -> e and strict variables !x = x + 1
--
-- Reason 1: Special case for type inference: see tcMonoBinds.
--
-- Reason 2: Instance decls can only have FunBinds, which is convenient.
-- If you change this, you'll need to change e.g. rnMethodBinds
--
-- But note that the form f :: a->a = ... parses as a pattern
-- binding, just like (f :: a -> a) = ...
--
-- Strict bindings have their strictness recorded in the
-- SrcStrictness of their MatchContext. See Note
-- [FunBind vs PatBind] for details about the relationship between
-- FunBind and PatBind.
--
-- AnnKeywordIds
--
--
FunBind :: XFunBind idL idR -> LIdP idL -> MatchGroup idR (LHsExpr idR) -> HsBindLR idL idR
[fun_ext] :: HsBindLR idL idR -> XFunBind idL idR
[fun_id] :: HsBindLR idL idR -> LIdP idL
-- | The payload
[fun_matches] :: HsBindLR idL idR -> MatchGroup idR (LHsExpr idR)
-- | 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) -> HsBindLR idL idR
[pat_ext] :: HsBindLR idL idR -> XPatBind idL idR
[pat_lhs] :: HsBindLR idL idR -> LPat idL
[pat_rhs] :: HsBindLR idL idR -> GRHSs idR (LHsExpr idR)
-- | Variable Binding
--
-- Dictionary binding and suchlike. All VarBinds are introduced by the
-- type checker
VarBind :: XVarBind idL idR -> IdP idL -> LHsExpr idR -> 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
-- | Patterns Synonym Binding
PatSynBind :: XPatSynBind idL idR -> PatSynBind idL idR -> HsBindLR idL idR
XHsBindsLR :: !XXHsBindsLR idL idR -> HsBindLR idL idR
-- | Located Haskell Binding with separate Left and Right identifier types
type LHsBindLR idL idR = XRec idL HsBindLR idL idR
-- | Located Haskell Bindings with separate Left and Right identifier types
type LHsBindsLR idL idR = Bag LHsBindLR idL idR
-- | Haskell Binding
type HsBind id = HsBindLR id id
-- | Located Haskell Bindings
type LHsBinds id = LHsBindsLR id id
-- | Located Haskell Binding
type LHsBind id = LHsBindLR id id
-- | Haskell Value bindings with separate Left and Right identifier types
-- (not implicit parameters) Used for both top level and nested bindings
-- May contain pattern synonym bindings
data () => HsValBindsLR idL idR
-- | Value Bindings In
--
-- Before renaming RHS; idR is always RdrName Not dependency analysed
-- Recursive by default
ValBinds :: XValBinds idL idR -> LHsBindsLR idL idR -> [LSig idR] -> HsValBindsLR idL idR
-- | Value Bindings Out
--
-- After renaming RHS; idR can be Name or Id Dependency analysed, later
-- bindings in the list may depend on earlier ones.
XValBindsLR :: !XXValBindsLR idL idR -> HsValBindsLR idL idR
-- | Haskell Value Bindings
type HsValBinds id = HsValBindsLR id id
type LHsLocalBindsLR idL idR = XRec idL HsLocalBindsLR idL idR
-- | Haskell Local Bindings with separate Left and Right identifier types
--
-- Bindings in a 'let' expression or a 'where' clause
data () => HsLocalBindsLR idL idR
-- | Haskell Value Bindings
HsValBinds :: XHsValBinds idL idR -> HsValBindsLR idL idR -> HsLocalBindsLR idL idR
-- | Haskell Implicit Parameter Bindings
HsIPBinds :: XHsIPBinds idL idR -> HsIPBinds idR -> HsLocalBindsLR idL idR
-- | Empty Local Bindings
EmptyLocalBinds :: XEmptyLocalBinds idL idR -> HsLocalBindsLR idL idR
XHsLocalBindsLR :: !XXHsLocalBindsLR idL idR -> HsLocalBindsLR idL idR
-- | Located Haskell local bindings
type LHsLocalBinds id = XRec id HsLocalBinds id
-- | Haskell Local Bindings
type HsLocalBinds id = HsLocalBindsLR id id
-- | Role Annotation Declaration
data () => RoleAnnotDecl pass
-- |
RoleAnnotDecl :: XCRoleAnnotDecl pass -> LIdP pass -> [XRec pass (Maybe Role)] -> RoleAnnotDecl pass
XRoleAnnotDecl :: !XXRoleAnnotDecl pass -> RoleAnnotDecl pass
-- | Located Role Annotation Declaration
type LRoleAnnotDecl pass = XRec pass RoleAnnotDecl pass
-- | Annotation Provenance
data () => AnnProvenance pass
ValueAnnProvenance :: LIdP pass -> AnnProvenance pass
TypeAnnProvenance :: LIdP pass -> AnnProvenance pass
ModuleAnnProvenance :: AnnProvenance pass
-- | Located Annotation Declaration
type LAnnDecl pass = XRec pass AnnDecl pass
-- | Warning pragma Declaration
data () => WarnDecl pass
Warning :: XWarning pass -> [LIdP pass] -> WarningTxt pass -> WarnDecl pass
XWarnDecl :: !XXWarnDecl pass -> WarnDecl pass
-- | Located Warning pragma Declaration
type LWarnDecl pass = XRec pass WarnDecl pass
-- | Warning pragma Declarations
data () => WarnDecls pass
Warnings :: XWarnings pass -> [LWarnDecl pass] -> WarnDecls pass
[wd_ext] :: WarnDecls pass -> XWarnings pass
[wd_warnings] :: WarnDecls pass -> [LWarnDecl pass]
XWarnDecls :: !XXWarnDecls pass -> WarnDecls pass
-- | Located Warning Declarations
type LWarnDecls pass = XRec pass WarnDecls pass
-- | Documentation comment Declaration
data () => DocDecl pass
DocCommentNext :: LHsDoc pass -> DocDecl pass
DocCommentPrev :: LHsDoc pass -> DocDecl pass
DocCommentNamed :: String -> LHsDoc pass -> DocDecl pass
DocGroup :: Int -> LHsDoc pass -> DocDecl pass
-- | Located Documentation comment Declaration
type LDocDecl pass = XRec pass DocDecl pass
-- | Rule Binder
data () => RuleBndr pass
RuleBndr :: XCRuleBndr pass -> LIdP pass -> RuleBndr pass
RuleBndrSig :: XRuleBndrSig pass -> LIdP pass -> HsPatSigType pass -> RuleBndr pass
-- |
XRuleBndr :: !XXRuleBndr pass -> RuleBndr pass
-- | Located Rule Binder
type LRuleBndr pass = XRec pass RuleBndr pass
-- | Rule Declaration
data () => RuleDecl pass
HsRule :: XHsRule pass -> XRec pass RuleName -> Activation -> Maybe [LHsTyVarBndr () (NoGhcTc pass)] -> [LRuleBndr pass] -> XRec pass (HsExpr pass) -> XRec pass (HsExpr pass) -> RuleDecl pass
-- | After renamer, free-vars from the LHS and RHS
[rd_ext] :: RuleDecl pass -> XHsRule pass
-- | Note [Pragma source text] in GHC.Types.Basic
[rd_name] :: RuleDecl pass -> XRec pass RuleName
[rd_act] :: RuleDecl pass -> Activation
-- | Forall'd type vars
[rd_tyvs] :: RuleDecl pass -> Maybe [LHsTyVarBndr () (NoGhcTc pass)]
-- | Forall'd term vars, before typechecking; after typechecking this
-- includes all forall'd vars
[rd_tmvs] :: RuleDecl pass -> [LRuleBndr pass]
[rd_lhs] :: RuleDecl pass -> XRec pass (HsExpr pass)
-- |
[rd_rhs] :: RuleDecl pass -> XRec pass (HsExpr pass)
XRuleDecl :: !XXRuleDecl pass -> RuleDecl pass
-- | Located Rule Declaration
type LRuleDecl pass = XRec pass RuleDecl pass
-- | Rule Declarations
data () => RuleDecls pass
HsRules :: XCRuleDecls pass -> [LRuleDecl pass] -> RuleDecls pass
[rds_ext] :: RuleDecls pass -> XCRuleDecls pass
[rds_rules] :: RuleDecls pass -> [LRuleDecl pass]
XRuleDecls :: !XXRuleDecls pass -> RuleDecls pass
-- | Located Rule Declarations
type LRuleDecls pass = XRec pass RuleDecls pass
data () => ForeignExport pass
CExport :: XCExport pass -> XRec pass CExportSpec -> ForeignExport pass
XForeignExport :: !XXForeignExport pass -> ForeignExport pass
data () => CImportSpec
CLabel :: CLabelString -> CImportSpec
CFunction :: CCallTarget -> CImportSpec
CWrapper :: CImportSpec
data () => ForeignImport pass
CImport :: XCImport pass -> XRec pass CCallConv -> XRec pass Safety -> Maybe Header -> CImportSpec -> ForeignImport pass
XForeignImport :: !XXForeignImport pass -> ForeignImport pass
-- | Foreign Declaration
data () => ForeignDecl pass
ForeignImport :: XForeignImport pass -> LIdP pass -> LHsSigType pass -> ForeignImport pass -> ForeignDecl pass
[fd_i_ext] :: ForeignDecl pass -> XForeignImport pass
[fd_name] :: ForeignDecl pass -> LIdP pass
[fd_sig_ty] :: ForeignDecl pass -> LHsSigType pass
[fd_fi] :: ForeignDecl pass -> ForeignImport pass
-- |
ForeignExport :: XForeignExport pass -> LIdP pass -> LHsSigType pass -> ForeignExport pass -> ForeignDecl pass
[fd_e_ext] :: ForeignDecl pass -> XForeignExport pass
[fd_name] :: ForeignDecl pass -> LIdP pass
[fd_sig_ty] :: ForeignDecl pass -> LHsSigType pass
[fd_fe] :: ForeignDecl pass -> ForeignExport pass
XForeignDecl :: !XXForeignDecl pass -> ForeignDecl pass
-- | Located Foreign Declaration
type LForeignDecl pass = XRec pass ForeignDecl pass
-- | Default Declaration
data () => DefaultDecl pass
-- |
DefaultDecl :: XCDefaultDecl pass -> [LHsType pass] -> DefaultDecl pass
XDefaultDecl :: !XXDefaultDecl pass -> DefaultDecl pass
-- | Located Default Declaration
type LDefaultDecl pass = XRec pass DefaultDecl pass
-- | Which technique the user explicitly requested when deriving an
-- instance.
data () => DerivStrategy pass
-- | GHC's "standard" strategy, which is to implement a custom instance for
-- the data type. This only works for certain types that GHC knows about
-- (e.g., Eq, Show, Functor when
-- -XDeriveFunctor is enabled, etc.)
StockStrategy :: XStockStrategy pass -> DerivStrategy pass
-- |
-- -XDeriveAnyClass
--
AnyclassStrategy :: XAnyClassStrategy pass -> DerivStrategy pass
-- |
-- -XGeneralizedNewtypeDeriving
--
NewtypeStrategy :: XNewtypeStrategy pass -> DerivStrategy pass
-- |
-- -XDerivingVia
--
ViaStrategy :: XViaStrategy pass -> DerivStrategy pass
-- | A Located DerivStrategy.
type LDerivStrategy pass = XRec pass DerivStrategy pass
-- | Stand-alone 'deriving instance' declaration
data () => DerivDecl pass
DerivDecl :: XCDerivDecl pass -> LHsSigWcType pass -> Maybe (LDerivStrategy pass) -> Maybe (XRec pass OverlapMode) -> DerivDecl pass
[deriv_ext] :: DerivDecl pass -> XCDerivDecl pass
-- | The instance type to derive.
--
-- It uses an LHsSigWcType because the context is allowed to be a
-- single wildcard:
--
--
-- 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)
-- |
[deriv_overlap_mode] :: DerivDecl pass -> Maybe (XRec pass OverlapMode)
XDerivDecl :: !XXDerivDecl pass -> DerivDecl pass
-- | Located stand-alone 'deriving instance' declaration
type LDerivDecl pass = XRec pass DerivDecl pass
-- | Instance Declaration
data () => InstDecl pass
ClsInstD :: XClsInstD pass -> ClsInstDecl pass -> InstDecl pass
[cid_d_ext] :: InstDecl pass -> XClsInstD pass
[cid_inst] :: InstDecl pass -> ClsInstDecl pass
DataFamInstD :: XDataFamInstD pass -> DataFamInstDecl pass -> InstDecl pass
[dfid_ext] :: InstDecl pass -> XDataFamInstD pass
[dfid_inst] :: InstDecl pass -> DataFamInstDecl pass
TyFamInstD :: XTyFamInstD pass -> TyFamInstDecl pass -> InstDecl pass
[tfid_ext] :: InstDecl pass -> XTyFamInstD pass
[tfid_inst] :: InstDecl pass -> TyFamInstDecl pass
XInstDecl :: !XXInstDecl pass -> InstDecl pass
-- | Located Instance Declaration
type LInstDecl pass = XRec pass InstDecl pass
-- | Class Instance Declaration - AnnKeywordId : AnnInstance,
-- AnnWhere, AnnOpen,AnnClose, For details on above
-- see Note [exact print annotations] in GHC.Parser.Annotation
data () => ClsInstDecl pass
ClsInstDecl :: XCClsInstDecl pass -> LHsSigType pass -> LHsBinds pass -> [LSig pass] -> [LTyFamInstDecl pass] -> [LDataFamInstDecl pass] -> Maybe (XRec pass OverlapMode) -> ClsInstDecl pass
[cid_ext] :: ClsInstDecl pass -> XCClsInstDecl pass
[cid_poly_ty] :: ClsInstDecl pass -> LHsSigType pass
[cid_binds] :: ClsInstDecl pass -> LHsBinds pass
[cid_sigs] :: ClsInstDecl pass -> [LSig pass]
[cid_tyfam_insts] :: ClsInstDecl pass -> [LTyFamInstDecl pass]
[cid_datafam_insts] :: ClsInstDecl pass -> [LDataFamInstDecl pass]
-- |
[cid_overlap_mode] :: ClsInstDecl pass -> Maybe (XRec pass OverlapMode)
XClsInstDecl :: !XXClsInstDecl pass -> ClsInstDecl pass
-- | Located Class Instance Declaration
type LClsInstDecl pass = XRec pass ClsInstDecl pass
-- | Family Equation
--
-- One equation in a type family instance declaration, data family
-- instance declaration, or type family default. See Note [Type family
-- instance declarations in HsSyn] See Note [Family instance declaration
-- binders]
data () => FamEqn pass rhs
FamEqn :: XCFamEqn pass rhs -> LIdP pass -> HsOuterFamEqnTyVarBndrs pass -> HsTyPats pass -> LexicalFixity -> rhs -> FamEqn pass rhs
[feqn_ext] :: FamEqn pass rhs -> XCFamEqn pass rhs
[feqn_tycon] :: FamEqn pass rhs -> LIdP pass
-- | Optional quantified type vars
[feqn_bndrs] :: FamEqn pass rhs -> HsOuterFamEqnTyVarBndrs pass
[feqn_pats] :: FamEqn pass rhs -> HsTyPats pass
-- | Fixity used in the declaration
[feqn_fixity] :: FamEqn pass rhs -> LexicalFixity
-- |
[feqn_rhs] :: FamEqn pass rhs -> rhs
XFamEqn :: !XXFamEqn pass rhs -> FamEqn pass rhs
-- | Data Family Instance Declaration
newtype () => DataFamInstDecl pass
-- |
DataFamInstDecl :: FamEqn pass (HsDataDefn pass) -> DataFamInstDecl pass
[dfid_eqn] :: DataFamInstDecl pass -> FamEqn pass (HsDataDefn pass)
-- | Located Data Family Instance Declaration
type LDataFamInstDecl pass = XRec pass DataFamInstDecl pass
-- | Type Family Instance Declaration
data () => TyFamInstDecl pass
-- |
TyFamInstDecl :: XCTyFamInstDecl pass -> TyFamInstEqn pass -> TyFamInstDecl pass
[tfid_xtn] :: TyFamInstDecl pass -> XCTyFamInstDecl pass
[tfid_eqn] :: TyFamInstDecl pass -> TyFamInstEqn pass
XTyFamInstDecl :: !XXTyFamInstDecl pass -> TyFamInstDecl pass
-- | Located Type Family Instance Declaration
type LTyFamInstDecl pass = XRec pass TyFamInstDecl pass
-- | Located type family default declarations.
type LTyFamDefltDecl pass = XRec pass TyFamDefltDecl pass
-- | Type family default declarations. A convenient synonym for
-- TyFamInstDecl. See Note [Type family instance declarations
-- in HsSyn].
type TyFamDefltDecl = TyFamInstDecl
-- | Type Family Instance Equation
type TyFamInstEqn pass = FamEqn pass LHsType pass
-- | Haskell Type Patterns
type HsTyPats pass = [LHsTypeArg pass]
-- | Located Type Family Instance Equation
type LTyFamInstEqn pass = XRec pass TyFamInstEqn pass
-- | The arguments in a GADT constructor. Unlike Haskell98-style
-- constructors, GADT constructors cannot be declared with infix syntax.
-- As a result, we do not use HsConDetails here, as
-- InfixCon would be an unrepresentable state. (There is a notion
-- of infix GADT constructors for the purposes of derived Show
-- instances—see Note [Infix GADT constructors] in GHC.Tc.TyCl—but that
-- is an orthogonal concern.)
data () => HsConDeclGADTDetails pass
PrefixConGADT :: [HsScaled pass (LBangType pass)] -> HsConDeclGADTDetails pass
RecConGADT :: XRec pass [LConDeclField pass] -> LHsUniToken "->" "\8594" pass -> HsConDeclGADTDetails pass
-- | The arguments in a Haskell98-style data constructor.
type HsConDeclH98Details pass = HsConDetails Void HsScaled pass LBangType pass XRec pass [LConDeclField 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
--
--
--
--
-- data Constructor Declaration
data () => ConDecl pass
ConDeclGADT :: XConDeclGADT pass -> NonEmpty (LIdP pass) -> !LHsUniToken "::" "\8759" pass -> XRec pass (HsOuterSigTyVarBndrs pass) -> Maybe (LHsContext pass) -> HsConDeclGADTDetails pass -> LHsType pass -> Maybe (LHsDoc pass) -> ConDecl pass
[con_g_ext] :: ConDecl pass -> XConDeclGADT pass
[con_names] :: ConDecl pass -> NonEmpty (LIdP pass)
[con_dcolon] :: ConDecl pass -> !LHsUniToken "::" "\8759" pass
-- | The outermost type variable binders, be they explicit or implicit. The
-- XRec is used to anchor exact print annotations, AnnForall and
-- AnnDot.
[con_bndrs] :: ConDecl pass -> XRec pass (HsOuterSigTyVarBndrs pass)
-- | User-written context (if any)
[con_mb_cxt] :: ConDecl pass -> Maybe (LHsContext pass)
-- | Arguments; never infix
[con_g_args] :: ConDecl pass -> HsConDeclGADTDetails pass
-- | Result type
[con_res_ty] :: ConDecl pass -> LHsType pass
-- | A possible Haddock comment.
[con_doc] :: ConDecl pass -> Maybe (LHsDoc pass)
ConDeclH98 :: XConDeclH98 pass -> LIdP pass -> Bool -> [LHsTyVarBndr Specificity pass] -> Maybe (LHsContext pass) -> HsConDeclH98Details pass -> Maybe (LHsDoc pass) -> ConDecl pass
[con_ext] :: ConDecl pass -> XConDeclH98 pass
[con_name] :: ConDecl pass -> LIdP pass
-- | True = explicit user-written forall e.g. data T a = forall b.
-- MkT b (b->a) con_ex_tvs = {b} False => con_ex_tvs is empty
[con_forall] :: ConDecl pass -> Bool
-- | Existentials only
[con_ex_tvs] :: ConDecl pass -> [LHsTyVarBndr Specificity pass]
-- | User-written context (if any)
[con_mb_cxt] :: ConDecl pass -> Maybe (LHsContext pass)
-- | Arguments; can be infix
[con_args] :: ConDecl pass -> HsConDeclH98Details pass
-- | A possible Haddock comment.
[con_doc] :: ConDecl pass -> Maybe (LHsDoc pass)
XConDecl :: !XXConDecl pass -> ConDecl pass
-- | Located data Constructor Declaration
type LConDecl pass = XRec pass ConDecl pass
-- | Whether a data-type declaration is data or newtype,
-- and its constructors.
data () => DataDefnCons a
NewTypeCon :: a -> DataDefnCons a
DataTypeCons :: Bool -> [a] -> DataDefnCons a
-- | When we only care whether a data-type declaration is `data` or
-- `newtype`, but not what constructors it has
data () => NewOrData
-- |
-- newtype Blah ...
--
NewType :: NewOrData
-- |
-- data Blah ...
--
DataType :: NewOrData
data () => StandaloneKindSig pass
StandaloneKindSig :: XStandaloneKindSig pass -> LIdP pass -> LHsSigType pass -> StandaloneKindSig pass
XStandaloneKindSig :: !XXStandaloneKindSig pass -> StandaloneKindSig pass
-- | Located Standalone Kind Signature
type LStandaloneKindSig pass = XRec pass StandaloneKindSig pass
-- | The types mentioned in a single deriving clause. This can
-- come in two forms, DctSingle or DctMulti, depending on
-- whether the types are surrounded by enclosing parentheses or not.
-- These parentheses are semantically different than HsParTy. For
-- example, deriving () means "derive zero classes" rather than
-- "derive an instance of the 0-tuple".
--
-- DerivClauseTys use LHsSigType because deriving
-- clauses can mention type variables that aren't bound by the datatype,
-- e.g.
--
--
-- data T b = ... deriving (C [a])
--
--
-- should produce a derived instance for C [a] (T b).
data () => DerivClauseTys pass
-- | A deriving clause with a single type. Moreover, that type can
-- only be a type constructor without any arguments.
--
-- Example: deriving Eq
DctSingle :: XDctSingle pass -> LHsSigType pass -> DerivClauseTys pass
-- | A deriving clause with a comma-separated list of types,
-- surrounded by enclosing parentheses.
--
-- Example: deriving (Eq, C a)
DctMulti :: XDctMulti pass -> [LHsSigType pass] -> DerivClauseTys pass
XDerivClauseTys :: !XXDerivClauseTys pass -> DerivClauseTys pass
type LDerivClauseTys pass = XRec pass DerivClauseTys pass
-- | A single deriving clause of a data declaration.
--
--
data () => HsDerivingClause pass
HsDerivingClause :: XCHsDerivingClause pass -> Maybe (LDerivStrategy pass) -> LDerivClauseTys pass -> HsDerivingClause pass
[deriv_clause_ext] :: HsDerivingClause pass -> XCHsDerivingClause pass
-- | The user-specified strategy (if any) to use when deriving
-- deriv_clause_tys.
[deriv_clause_strategy] :: HsDerivingClause pass -> Maybe (LDerivStrategy pass)
-- | The types to derive.
[deriv_clause_tys] :: HsDerivingClause pass -> LDerivClauseTys pass
XHsDerivingClause :: !XXHsDerivingClause pass -> HsDerivingClause pass
type LHsDerivingClause pass = XRec pass HsDerivingClause pass
-- | Haskell Deriving clause
type HsDeriving pass = [LHsDerivingClause pass]
-- | Haskell Data type Definition
data () => HsDataDefn pass
-- | Declares a data type or newtype, giving its constructors
-- data/newtype T a = constrs data/newtype instance T [a] =
-- constrs
HsDataDefn :: XCHsDataDefn pass -> Maybe (LHsContext pass) -> Maybe (XRec pass CType) -> Maybe (LHsKind pass) -> DataDefnCons (LConDecl pass) -> HsDeriving pass -> HsDataDefn pass
[dd_ext] :: HsDataDefn pass -> XCHsDataDefn pass
-- | Context
[dd_ctxt] :: HsDataDefn pass -> Maybe (LHsContext pass)
[dd_cType] :: HsDataDefn pass -> Maybe (XRec pass CType)
-- | Optional kind signature.
--
-- (Just k) for a GADT-style data, or data
-- instance decl, with explicit kind sig
--
-- Always Nothing for H98-syntax decls
[dd_kindSig] :: HsDataDefn pass -> Maybe (LHsKind pass)
-- | Data constructors
--
-- For data T a = T1 | T2 a the LConDecls all have
-- ConDeclH98. For data T a where { T1 :: T a } the
-- LConDecls all have ConDeclGADT.
[dd_cons] :: HsDataDefn pass -> DataDefnCons (LConDecl pass)
-- | Optional 'deriving' clause
[dd_derivs] :: HsDataDefn pass -> HsDeriving pass
XHsDataDefn :: !XXHsDataDefn pass -> HsDataDefn pass
data () => FamilyInfo pass
DataFamily :: FamilyInfo pass
OpenTypeFamily :: FamilyInfo pass
-- | Nothing if we're in an hs-boot file and the user said "type
-- family Foo x where .."
ClosedTypeFamily :: Maybe [LTyFamInstEqn pass] -> FamilyInfo pass
-- | If the user supplied an injectivity annotation it is represented using
-- InjectivityAnn. At the moment this is a single injectivity condition -
-- see Note [Injectivity annotation]. `Located name` stores the LHS of
-- injectivity condition. `[Located name]` stores the RHS of injectivity
-- condition. Example:
--
-- type family Foo a b c = r | r -> a c where ...
--
-- This will be represented as "InjectivityAnn r [a,
-- c]"
data () => InjectivityAnn pass
-- |
InjectivityAnn :: XCInjectivityAnn pass -> LIdP pass -> [LIdP pass] -> InjectivityAnn pass
XInjectivityAnn :: !XXInjectivityAnn pass -> InjectivityAnn pass
-- | Located Injectivity Annotation
type LInjectivityAnn pass = XRec pass InjectivityAnn pass
-- | type Family Declaration
data () => FamilyDecl pass
FamilyDecl :: XCFamilyDecl pass -> FamilyInfo pass -> TopLevelFlag -> LIdP pass -> LHsQTyVars pass -> LexicalFixity -> LFamilyResultSig pass -> Maybe (LInjectivityAnn pass) -> FamilyDecl pass
[fdExt] :: FamilyDecl pass -> XCFamilyDecl pass
[fdInfo] :: FamilyDecl pass -> FamilyInfo pass
[fdTopLevel] :: FamilyDecl pass -> TopLevelFlag
[fdLName] :: FamilyDecl pass -> LIdP pass
[fdTyVars] :: FamilyDecl pass -> LHsQTyVars pass
[fdFixity] :: FamilyDecl pass -> LexicalFixity
[fdResultSig] :: FamilyDecl pass -> LFamilyResultSig pass
[fdInjectivityAnn] :: FamilyDecl pass -> Maybe (LInjectivityAnn pass)
-- |
XFamilyDecl :: !XXFamilyDecl pass -> FamilyDecl pass
-- | Located type Family Declaration
type LFamilyDecl pass = XRec pass FamilyDecl pass
-- | type Family Result Signature
data () => FamilyResultSig pass
-- |
NoSig :: XNoSig pass -> FamilyResultSig pass
-- |
KindSig :: XCKindSig pass -> LHsKind pass -> FamilyResultSig pass
-- |
TyVarSig :: XTyVarSig pass -> LHsTyVarBndr () pass -> FamilyResultSig pass
XFamilyResultSig :: !XXFamilyResultSig pass -> FamilyResultSig pass
-- | Located type Family Result Signature
type LFamilyResultSig pass = XRec pass FamilyResultSig pass
-- | Type or Class Group
data () => TyClGroup pass
TyClGroup :: XCTyClGroup pass -> [LTyClDecl pass] -> [LRoleAnnotDecl pass] -> [LStandaloneKindSig pass] -> [LInstDecl pass] -> TyClGroup pass
[group_ext] :: TyClGroup pass -> XCTyClGroup pass
[group_tyclds] :: TyClGroup pass -> [LTyClDecl pass]
[group_roles] :: TyClGroup pass -> [LRoleAnnotDecl pass]
[group_kisigs] :: TyClGroup pass -> [LStandaloneKindSig pass]
[group_instds] :: TyClGroup pass -> [LInstDecl pass]
XTyClGroup :: !XXTyClGroup pass -> TyClGroup pass
type LHsFunDep pass = XRec pass FunDep pass
-- | A type or class declaration.
data () => TyClDecl pass
-- |
-- type/data family T :: *->*
--
--
--
-- - AnnKeywordId : AnnType, AnnData,
-- AnnFamily,AnnDcolon, AnnWhere,AnnOpenP,
-- AnnDcolon,AnnCloseP, AnnEqual,AnnRarrow,
-- AnnVbar
--
FamDecl :: XFamDecl pass -> FamilyDecl pass -> TyClDecl pass
[tcdFExt] :: TyClDecl pass -> XFamDecl pass
[tcdFam] :: TyClDecl pass -> FamilyDecl pass
-- | type declaration
--
--
SynDecl :: XSynDecl pass -> LIdP pass -> LHsQTyVars pass -> LexicalFixity -> LHsType pass -> TyClDecl pass
-- | Post renamer, FVs
[tcdSExt] :: TyClDecl pass -> XSynDecl pass
-- | Type constructor
[tcdLName] :: TyClDecl pass -> LIdP pass
-- | Type variables; for an associated type these include outer binders
[tcdTyVars] :: TyClDecl pass -> LHsQTyVars pass
-- | Fixity used in the declaration
[tcdFixity] :: TyClDecl pass -> LexicalFixity
-- | RHS of type declaration
[tcdRhs] :: TyClDecl pass -> LHsType pass
-- | data declaration
--
--
DataDecl :: XDataDecl pass -> LIdP pass -> LHsQTyVars pass -> LexicalFixity -> HsDataDefn pass -> TyClDecl pass
-- | Post renamer, CUSK flag, FVs
[tcdDExt] :: TyClDecl pass -> XDataDecl pass
-- | Type constructor
[tcdLName] :: TyClDecl pass -> LIdP pass
-- | Type variables; for an associated type these include outer binders
[tcdTyVars] :: TyClDecl pass -> LHsQTyVars pass
-- | Fixity used in the declaration
[tcdFixity] :: TyClDecl pass -> LexicalFixity
[tcdDataDefn] :: TyClDecl pass -> HsDataDefn pass
-- |
ClassDecl :: XClassDecl pass -> !LayoutInfo pass -> Maybe (LHsContext pass) -> LIdP pass -> LHsQTyVars pass -> LexicalFixity -> [LHsFunDep pass] -> [LSig pass] -> LHsBinds pass -> [LFamilyDecl pass] -> [LTyFamDefltDecl pass] -> [LDocDecl pass] -> TyClDecl pass
-- | Post renamer, FVs
[tcdCExt] :: TyClDecl pass -> XClassDecl pass
-- | Explicit or virtual braces See Note [Class LayoutInfo]
[tcdLayout] :: TyClDecl pass -> !LayoutInfo pass
-- | Context...
[tcdCtxt] :: TyClDecl pass -> Maybe (LHsContext pass)
-- | Type constructor
[tcdLName] :: TyClDecl pass -> LIdP pass
-- | Type variables; for an associated type these include outer binders
[tcdTyVars] :: TyClDecl pass -> LHsQTyVars pass
-- | Fixity used in the declaration
[tcdFixity] :: TyClDecl pass -> LexicalFixity
-- | Functional deps
[tcdFDs] :: TyClDecl pass -> [LHsFunDep pass]
-- | Methods' signatures
[tcdSigs] :: TyClDecl pass -> [LSig pass]
-- | Default methods
[tcdMeths] :: TyClDecl pass -> LHsBinds pass
-- | Associated types;
[tcdATs] :: TyClDecl pass -> [LFamilyDecl pass]
-- | Associated type defaults
[tcdATDefs] :: TyClDecl pass -> [LTyFamDefltDecl pass]
-- | Haddock docs
[tcdDocs] :: TyClDecl pass -> [LDocDecl pass]
XTyClDecl :: !XXTyClDecl pass -> TyClDecl pass
-- | Located Declaration of a Type or Class
type LTyClDecl pass = XRec pass TyClDecl pass
-- | A splice can appear with various decorations wrapped around it. This
-- data type captures explicitly how it was originally written, for use
-- in the pretty printer.
data () => SpliceDecoration
-- | $splice
DollarSplice :: SpliceDecoration
-- | bare splice
BareSplice :: SpliceDecoration
-- | Splice Declaration
data () => SpliceDecl p
SpliceDecl :: XSpliceDecl p -> XRec p (HsUntypedSplice p) -> SpliceDecoration -> SpliceDecl p
XSpliceDecl :: !XXSpliceDecl p -> SpliceDecl p
-- | Located Splice Declaration
type LSpliceDecl pass = XRec pass SpliceDecl pass
-- | Haskell Group
--
-- A HsDecl is categorised into a HsGroup before being fed
-- to the renamer.
data () => HsGroup p
HsGroup :: XCHsGroup p -> HsValBinds p -> [LSpliceDecl p] -> [TyClGroup p] -> [LDerivDecl p] -> [LFixitySig p] -> [LDefaultDecl p] -> [LForeignDecl p] -> [LWarnDecls p] -> [LAnnDecl p] -> [LRuleDecls p] -> [LDocDecl p] -> HsGroup p
[hs_ext] :: HsGroup p -> XCHsGroup p
[hs_valds] :: HsGroup p -> HsValBinds p
[hs_splcds] :: HsGroup p -> [LSpliceDecl p]
[hs_tyclds] :: HsGroup p -> [TyClGroup p]
[hs_derivds] :: HsGroup p -> [LDerivDecl p]
[hs_fixds] :: HsGroup p -> [LFixitySig p]
[hs_defds] :: HsGroup p -> [LDefaultDecl p]
[hs_fords] :: HsGroup p -> [LForeignDecl p]
[hs_warnds] :: HsGroup p -> [LWarnDecls p]
[hs_annds] :: HsGroup p -> [LAnnDecl p]
[hs_ruleds] :: HsGroup p -> [LRuleDecls p]
[hs_docs] :: HsGroup p -> [LDocDecl p]
XHsGroup :: !XXHsGroup p -> HsGroup p
-- | A Haskell Declaration
data () => HsDecl p
-- | Type or Class Declaration
TyClD :: XTyClD p -> TyClDecl p -> HsDecl p
-- | Instance declaration
InstD :: XInstD p -> InstDecl p -> HsDecl p
-- | Deriving declaration
DerivD :: XDerivD p -> DerivDecl p -> HsDecl p
-- | Value declaration
ValD :: XValD p -> HsBind p -> HsDecl p
-- | Signature declaration
SigD :: XSigD p -> Sig p -> HsDecl p
-- | Standalone kind signature
KindSigD :: XKindSigD p -> StandaloneKindSig p -> HsDecl p
-- | 'default' declaration
DefD :: XDefD p -> DefaultDecl p -> HsDecl p
-- | Foreign declaration
ForD :: XForD p -> ForeignDecl p -> HsDecl p
-- | Warning declaration
WarningD :: XWarningD p -> WarnDecls p -> HsDecl p
-- | Annotation declaration
AnnD :: XAnnD p -> AnnDecl p -> HsDecl p
-- | Rule declaration
RuleD :: XRuleD p -> RuleDecls p -> HsDecl p
-- | Splice declaration (Includes quasi-quotes)
SpliceD :: XSpliceD p -> SpliceDecl p -> HsDecl p
-- | Documentation comment declaration
DocD :: XDocD p -> DocDecl p -> HsDecl p
-- | Role annotation declaration
RoleAnnotD :: XRoleAnnotD p -> RoleAnnotDecl p -> HsDecl p
XHsDecl :: !XXHsDecl p -> HsDecl p
type LHsDecl p = XRec p HsDecl p
data () => HsDoFlavour
-- |
-- - ModuleName. do { ... }
--
DoExpr :: Maybe ModuleName -> HsDoFlavour
-- |
-- - ModuleName. mdo { ... } ie recursive do-expression
--
MDoExpr :: Maybe ModuleName -> HsDoFlavour
-- | A command-line Stmt in GHCi pat <- rhs
GhciStmtCtxt :: HsDoFlavour
ListComp :: HsDoFlavour
MonadComp :: HsDoFlavour
-- | Haskell arrow match context.
data () => HsArrowMatchContext
-- | A proc expression
ProcExpr :: HsArrowMatchContext
-- | A case alternative inside arrow notation
ArrowCaseAlt :: HsArrowMatchContext
-- | A case or cases alternative inside arrow notation
ArrowLamCaseAlt :: LamCaseVariant -> HsArrowMatchContext
-- | An arrow kappa abstraction
KappaExpr :: HsArrowMatchContext
-- | Haskell Statement Context.
data () => HsStmtContext p
-- | Context for HsDo (do-notation and comprehensions)
HsDoStmt :: HsDoFlavour -> HsStmtContext p
-- | Pattern guard for specified thing
PatGuard :: HsMatchContext p -> HsStmtContext p
-- | A branch of a parallel stmt
ParStmtCtxt :: HsStmtContext p -> HsStmtContext p
-- | A branch of a transform stmt
TransStmtCtxt :: HsStmtContext p -> HsStmtContext p
-- | do-notation in an arrow-command context
ArrowExpr :: HsStmtContext p
-- | Haskell Match Context
--
-- Context of a pattern match. This is more subtle than it would seem.
-- See Note [FunBind vs PatBind].
data () => HsMatchContext p
-- | A pattern matching on an argument of a function binding
FunRhs :: LIdP (NoGhcTc p) -> LexicalFixity -> SrcStrictness -> HsMatchContext p
-- | function binder of f See Note [mc_fun field of FunRhs] See
-- #20415 for a long discussion about this field and why it uses NoGhcTc.
[mc_fun] :: HsMatchContext p -> LIdP (NoGhcTc p)
-- | fixing of f
[mc_fixity] :: HsMatchContext p -> LexicalFixity
-- | was f banged? See Note [FunBind vs PatBind]
[mc_strictness] :: HsMatchContext p -> SrcStrictness
-- | Patterns of a lambda
LambdaExpr :: HsMatchContext p
-- | Patterns and guards in a case alternative
CaseAlt :: HsMatchContext p
-- | Patterns and guards in case and cases
LamCaseAlt :: LamCaseVariant -> HsMatchContext p
-- | Guards of a multi-way if alternative
IfAlt :: HsMatchContext p
-- | A pattern match inside arrow notation
ArrowMatchCtxt :: HsArrowMatchContext -> HsMatchContext p
-- | A pattern binding eg [y] <- e = e
PatBindRhs :: HsMatchContext p
-- | Guards of pattern bindings, e.g., (Just b) | Just _ <- x = e |
-- otherwise = e'
PatBindGuards :: HsMatchContext p
-- | Record update [used only in GHC.HsToCore.Expr to tell matchWrapper
-- what sort of runtime error message to generate]
RecUpd :: HsMatchContext p
-- | Pattern of a do-stmt, list comprehension, pattern guard, etc
StmtCtxt :: HsStmtContext p -> HsMatchContext p
-- | A Template Haskell pattern splice
ThPatSplice :: HsMatchContext p
-- | A Template Haskell pattern quotation [p| (a,b) |]
ThPatQuote :: HsMatchContext p
-- | A pattern synonym declaration
PatSyn :: HsMatchContext p
-- | Arithmetic Sequence Information
data () => ArithSeqInfo id
From :: LHsExpr id -> ArithSeqInfo id
FromThen :: LHsExpr id -> LHsExpr id -> ArithSeqInfo id
FromTo :: LHsExpr id -> LHsExpr id -> ArithSeqInfo id
FromThenTo :: LHsExpr id -> LHsExpr id -> LHsExpr id -> ArithSeqInfo id
-- | Haskell (Untyped) Quote = Expr + Pat + Type + Var
data () => HsQuote p
ExpBr :: XExpBr p -> LHsExpr p -> HsQuote p
PatBr :: XPatBr p -> LPat p -> HsQuote p
DecBrL :: XDecBrL p -> [LHsDecl p] -> HsQuote p
DecBrG :: XDecBrG p -> HsGroup p -> HsQuote p
TypBr :: XTypBr p -> LHsType p -> HsQuote p
VarBr :: XVarBr p -> Bool -> LIdP p -> HsQuote p
XQuote :: !XXQuote p -> HsQuote p
-- | Applicative Argument
data () => ApplicativeArg idL
ApplicativeArgOne :: XApplicativeArgOne idL -> LPat idL -> LHsExpr idL -> Bool -> ApplicativeArg idL
-- | The fail operator, after renaming
--
-- The fail operator is needed if this is a BindStmt where the pattern
-- can fail. E.g.: (Just a) <- stmt The fail operator will be invoked
-- if the pattern match fails. It is also used for guards in
-- MonadComprehensions. The fail operator is Nothing if the pattern match
-- can't fail
[xarg_app_arg_one] :: ApplicativeArg idL -> XApplicativeArgOne idL
[app_arg_pattern] :: ApplicativeArg idL -> LPat idL
[arg_expr] :: ApplicativeArg idL -> LHsExpr idL
-- | True = was a BodyStmt, False = was a BindStmt. See Note
-- [Applicative BodyStmt]
[is_body_stmt] :: ApplicativeArg idL -> Bool
ApplicativeArgMany :: XApplicativeArgMany idL -> [ExprLStmt idL] -> HsExpr idL -> LPat idL -> HsDoFlavour -> ApplicativeArg idL
[xarg_app_arg_many] :: ApplicativeArg idL -> XApplicativeArgMany idL
[app_stmts] :: ApplicativeArg idL -> [ExprLStmt idL]
[final_expr] :: ApplicativeArg idL -> HsExpr idL
[bv_pattern] :: ApplicativeArg idL -> LPat idL
-- | context of the do expression, used in pprArg
[stmt_context] :: ApplicativeArg idL -> HsDoFlavour
XApplicativeArg :: !XXApplicativeArg idL -> ApplicativeArg idL
-- | The fail operator
--
-- This is used for `.. <-` "bind statements" in do notation,
-- including non-monadic "binds" in applicative.
--
-- The fail operator is 'Just expr' if it potentially fail monadically.
-- if the pattern match cannot fail, or shouldn't fail monadically
-- (regular incomplete pattern exception), it is Nothing.
--
-- See Note [Monad fail : Rebindable syntax, overloaded strings] for the
-- type of expression in the Just case, and why it is so.
--
-- See Note [Failing pattern matches in Stmts] for which contexts for
-- 'BindStmt's should use the monadic fail and which shouldn't.
type FailOperator id = Maybe SyntaxExpr id
-- | Parenthesised Statement Block
data () => ParStmtBlock idL idR
ParStmtBlock :: XParStmtBlock idL idR -> [ExprLStmt idL] -> [IdP idR] -> SyntaxExpr idR -> ParStmtBlock idL idR
XParStmtBlock :: !XXParStmtBlock idL idR -> ParStmtBlock idL idR
data () => TransForm
ThenForm :: TransForm
GroupForm :: TransForm
-- | Exact print annotations when in qualifier lists or guards -
-- AnnKeywordId : AnnVbar, AnnComma,AnnThen,
-- AnnBy,AnnBy, AnnGroup,AnnUsing
data () => StmtLR idL idR body
LastStmt :: XLastStmt idL idR body -> body -> Maybe Bool -> SyntaxExpr idR -> StmtLR idL idR body
BindStmt :: XBindStmt idL idR body -> LPat idL -> body -> StmtLR idL idR body
-- | ApplicativeStmt represents an applicative expression built with
-- <$> and <*>. It is generated by the
-- renamer, and is desugared into the appropriate applicative expression
-- by the desugarer, but it is intended to be invisible in error
-- messages.
--
-- For full details, see Note [ApplicativeDo] in GHC.Rename.Expr
ApplicativeStmt :: XApplicativeStmt idL idR body -> [(SyntaxExpr idR, ApplicativeArg idL)] -> Maybe (SyntaxExpr idR) -> StmtLR idL idR body
BodyStmt :: XBodyStmt idL idR body -> body -> SyntaxExpr idR -> SyntaxExpr idR -> StmtLR idL idR body
-- |
LetStmt :: XLetStmt idL idR body -> HsLocalBindsLR idL idR -> StmtLR idL idR body
ParStmt :: XParStmt idL idR body -> [ParStmtBlock idL idR] -> HsExpr idR -> SyntaxExpr idR -> StmtLR idL idR body
TransStmt :: XTransStmt idL idR body -> TransForm -> [ExprLStmt idL] -> [(IdP idR, IdP idR)] -> LHsExpr idR -> Maybe (LHsExpr idR) -> SyntaxExpr idR -> SyntaxExpr idR -> HsExpr idR -> StmtLR idL idR body
[trS_ext] :: StmtLR idL idR body -> XTransStmt idL idR body
[trS_form] :: StmtLR idL idR body -> TransForm
[trS_stmts] :: StmtLR idL idR body -> [ExprLStmt idL]
[trS_bndrs] :: StmtLR idL idR body -> [(IdP idR, IdP idR)]
[trS_using] :: StmtLR idL idR body -> LHsExpr idR
[trS_by] :: StmtLR idL idR body -> Maybe (LHsExpr idR)
[trS_ret] :: StmtLR idL idR body -> SyntaxExpr idR
[trS_bind] :: StmtLR idL idR body -> SyntaxExpr idR
[trS_fmap] :: StmtLR idL idR body -> HsExpr idR
-- |
RecStmt :: XRecStmt idL idR body -> XRec idR [LStmtLR idL idR body] -> [IdP idR] -> [IdP idR] -> SyntaxExpr idR -> SyntaxExpr idR -> SyntaxExpr idR -> StmtLR idL idR body
[recS_ext] :: StmtLR idL idR body -> XRecStmt idL idR body
[recS_stmts] :: StmtLR idL idR body -> XRec idR [LStmtLR idL idR body]
[recS_later_ids] :: StmtLR idL idR body -> [IdP idR]
[recS_rec_ids] :: StmtLR idL idR body -> [IdP idR]
[recS_bind_fn] :: StmtLR idL idR body -> SyntaxExpr idR
[recS_ret_fn] :: StmtLR idL idR body -> SyntaxExpr idR
[recS_mfix_fn] :: StmtLR idL idR body -> SyntaxExpr idR
XStmtLR :: !XXStmtLR idL idR body -> StmtLR idL idR body
-- | Ghci Statement
type GhciStmt id = Stmt id LHsExpr id
-- | Ghci Located Statement
type GhciLStmt id = LStmt id LHsExpr id
-- | Guard Statement
type GuardStmt id = Stmt id LHsExpr id
-- | Guard Located Statement
type GuardLStmt id = LStmt id LHsExpr id
-- | Expression Statement
type ExprStmt id = Stmt id LHsExpr id
-- | Expression Located Statement
type ExprLStmt id = LStmt id LHsExpr id
-- | Command Statement
type CmdStmt id = Stmt id LHsCmd id
-- | Command Located Statement
type CmdLStmt id = LStmt id LHsCmd id
-- | do block Statement
type Stmt id body = StmtLR id id body
-- | Located Statement with separate Left and Right id's
type LStmtLR idL idR body = XRec idL StmtLR idL idR body
-- | Located do block Statement
type LStmt id body = XRec id StmtLR id id body
-- | Guarded Right Hand Side.
data () => GRHS p body
GRHS :: XCGRHS p body -> [GuardLStmt p] -> body -> GRHS p body
XGRHS :: !XXGRHS p body -> GRHS p body
-- | Located Guarded Right-Hand Side
type LGRHS id body = XRec id GRHS id body
data () => Match p body
Match :: XCMatch p body -> HsMatchContext p -> [LPat p] -> GRHSs p body -> Match p body
[m_ext] :: Match p body -> XCMatch p body
[m_ctxt] :: Match p body -> HsMatchContext p
[m_pats] :: Match p body -> [LPat p]
[m_grhss] :: Match p body -> GRHSs p body
XMatch :: !XXMatch p body -> Match p body
-- | Located Match
--
-- May have AnnKeywordId : AnnSemi when in a list
type LMatch id body = XRec id Match id body
-- | Haskell Record Bindings
type HsRecordBinds p = HsRecFields p LHsExpr p
-- | Haskell Top-level Command
data () => HsCmdTop p
HsCmdTop :: XCmdTop p -> LHsCmd p -> HsCmdTop p
XCmdTop :: !XXCmdTop p -> HsCmdTop p
-- | Top-level command, introducing a new arrow. This may occur inside a
-- proc (where the stack is empty) or as an argument of a command-forming
-- operator.
--
-- Located Haskell Top-level Command
type LHsCmdTop p = XRec p HsCmdTop p
-- | Haskell arrow application type.
data () => HsArrAppType
-- | First order arrow application -<
HsHigherOrderApp :: HsArrAppType
-- | Higher order arrow application -<<
HsFirstOrderApp :: HsArrAppType
-- | Haskell Command (e.g. a "statement" in an Arrow proc block)
data () => HsCmd id
-- |
HsCmdArrApp :: XCmdArrApp id -> LHsExpr id -> LHsExpr id -> HsArrAppType -> Bool -> HsCmd id
-- |
HsCmdArrForm :: XCmdArrForm id -> LHsExpr id -> LexicalFixity -> Maybe Fixity -> [LHsCmdTop id] -> HsCmd id
HsCmdApp :: XCmdApp id -> LHsCmd id -> LHsExpr id -> HsCmd id
-- |
HsCmdLam :: XCmdLam id -> MatchGroup id (LHsCmd id) -> HsCmd id
-- |
HsCmdPar :: XCmdPar id -> !LHsToken "(" id -> LHsCmd id -> !LHsToken ")" id -> HsCmd id
-- |
HsCmdCase :: XCmdCase id -> LHsExpr id -> MatchGroup id (LHsCmd id) -> HsCmd id
-- | Lambda-case
--
--
HsCmdLamCase :: XCmdLamCase id -> LamCaseVariant -> MatchGroup id (LHsCmd id) -> HsCmd id
-- |
HsCmdIf :: XCmdIf id -> SyntaxExpr id -> LHsExpr id -> LHsCmd id -> LHsCmd id -> HsCmd id
-- |
HsCmdLet :: XCmdLet id -> !LHsToken "let" id -> HsLocalBinds id -> !LHsToken "in" id -> LHsCmd id -> HsCmd id
-- |
HsCmdDo :: XCmdDo id -> XRec id [CmdLStmt id] -> HsCmd id
XCmd :: !XXCmd id -> HsCmd id
-- | Located Haskell Command (for arrow syntax)
type LHsCmd id = XRec id HsCmd id
-- | Which kind of lambda case are we dealing with?
data () => LamCaseVariant
-- | `case`
LamCase :: LamCaseVariant
-- | `cases`
LamCases :: LamCaseVariant
-- |
--
-- Haskell Tuple Argument
data () => HsTupArg id
-- | The argument
Present :: XPresent id -> LHsExpr id -> HsTupArg id
-- | The argument is missing, but this is its type
Missing :: XMissing id -> HsTupArg id
-- | Extension point; see Note [Trees That Grow] in
-- Language.Haskell.Syntax.Extension
XTupArg :: !XXTupArg id -> HsTupArg id
-- | Located Haskell Tuple Argument
--
-- HsTupArg is used for tuple sections (,a,) is
-- represented by ExplicitTuple [Missing ty1, Present a, Missing
-- ty3] Which in turn stands for (x:ty1 y:ty2. (x,a,y))
type LHsTupArg id = XRec id HsTupArg id
-- | A pragma, written as {-# ... #-}, that may appear within an
-- expression.
data () => HsPragE p
HsPragSCC :: XSCC p -> StringLiteral -> HsPragE p
-- |
-- - AnnKeywordId : AnnOpen, AnnOpen '{-#
-- GENERATED', AnnVal,AnnVal,
-- AnnColon,AnnVal, AnnMinus,
-- AnnVal,AnnColon, AnnVal, AnnClose
-- '#-}'
--
XHsPragE :: !XXPragE p -> HsPragE p
data () => DotFieldOcc p
DotFieldOcc :: XCDotFieldOcc p -> XRec p FieldLabelString -> DotFieldOcc p
[dfoExt] :: DotFieldOcc p -> XCDotFieldOcc p
[dfoLabel] :: DotFieldOcc p -> XRec p FieldLabelString
XDotFieldOcc :: !XXDotFieldOcc p -> DotFieldOcc p
type LHsRecUpdProj p = XRec p RecUpdProj p
type RecUpdProj p = RecProj p LHsExpr p
type LHsRecProj p arg = XRec p RecProj p arg
type RecProj p arg = HsFieldBind LFieldLabelStrings p arg
newtype () => FieldLabelStrings p
FieldLabelStrings :: [XRec p (DotFieldOcc p)] -> FieldLabelStrings p
-- | RecordDotSyntax field updates
type LFieldLabelStrings p = XRec p FieldLabelStrings p
data () => HsUntypedSpliceResult thing
HsUntypedSpliceTop :: ThModFinalizers -> thing -> HsUntypedSpliceResult thing
-- | TH finalizers produced by the splice.
[utsplice_result_finalizers] :: HsUntypedSpliceResult thing -> ThModFinalizers
-- | The result of splicing; See Note [Lifecycle of a splice]
[utsplice_result] :: HsUntypedSpliceResult thing -> thing
HsUntypedSpliceNested :: SplicePointName -> HsUntypedSpliceResult thing
-- | Finalizers produced by a splice with addModFinalizer
--
-- See Note [Delaying modFinalizers in untyped splices] in
-- GHC.Rename.Splice. For how this is used.
newtype () => ThModFinalizers
ThModFinalizers :: [ForeignRef (Q ())] -> ThModFinalizers
type SplicePointName = Name
-- | Haskell Module
--
-- All we actually declare here is the top-level structure for a module.
data () => HsModule p
-- | AnnKeywordIds
--
--
HsModule :: XCModule p -> Maybe (XRec p ModuleName) -> Maybe (XRec p [LIE p]) -> [LImportDecl p] -> [LHsDecl p] -> HsModule p
-- | HsModule extension point
[hsmodExt] :: HsModule p -> XCModule p
-- | Nothing: "module X where" is omitted (in which case the next
-- field is Nothing too)
[hsmodName] :: HsModule p -> Maybe (XRec p ModuleName)
-- | Export list
--
--
-- - Nothing: export list omitted, so export everything
-- - Just []: export nothing
-- - Just [...]: as you would expect...
-- - AnnKeywordIds : AnnOpen ,AnnClose
--
[hsmodExports] :: HsModule p -> Maybe (XRec p [LIE p])
[hsmodImports] :: HsModule p -> [LImportDecl p]
-- | Type, class, value, and interface signature decls
[hsmodDecls] :: HsModule p -> [LHsDecl p]
XModule :: !XXModule p -> HsModule p
type IdUnfoldingFun = Id -> Unfolding
type CompleteMatches = [CompleteMatch]
-- | A list of conlikes which represents a complete pattern match. These
-- arise from COMPLETE signatures. See also Note [Implementation
-- of COMPLETE pragmas].
data () => CompleteMatch
data () => BoxingInfo b
BI_NoBoxNeeded :: BoxingInfo b
BI_NoBoxAvailable :: BoxingInfo b
BI_Box :: DataCon -> Expr b -> Type -> BoxingInfo b
[bi_data_con] :: BoxingInfo b -> DataCon
[bi_inst_con] :: BoxingInfo b -> Expr b
[bi_boxed_type] :: BoxingInfo b -> Type
data () => FloatBind
FloatLet :: CoreBind -> FloatBind
FloatCase :: CoreExpr -> Id -> AltCon -> [Var] -> FloatBind
data () => MkStringIds
MkStringIds :: !Id -> !Id -> MkStringIds
[unpackCStringId] :: MkStringIds -> !Id
[unpackCStringUtf8Id] :: MkStringIds -> !Id
type TypeSize = IntWithInf
-- | The Paterson size of a given type, in the sense of Note [Paterson
-- conditions] in GHC.Tc.Validity
--
--
-- - after expanding synonyms,
-- - ignoring coercions (as they are not user written).
--
data () => PatersonSize
-- | The type mentions a type family, so the size could be anything.
PS_TyFam :: TyCon -> PatersonSize
-- | The type does not mention a type family.
PS_Vanilla :: [TyVar] -> Int -> PatersonSize
-- | free tyvars, including repetitions;
[ps_tvs] :: PatersonSize -> [TyVar]
-- | number of type constructors and variables
[ps_size] :: PatersonSize -> Int
-- | Why was the LHS PatersonSize not strictly smaller than the RHS
-- PatersonSize?
--
-- See Note [Paterson conditions] in GHC.Tc.Validity.
data () => PatersonSizeFailure
-- | Either side contains a type family.
PSF_TyFam :: TyCon -> PatersonSizeFailure
-- | The size of the LHS is not strictly less than the size of the RHS.
PSF_Size :: PatersonSizeFailure
-- | These type variables appear more often in the LHS than in the RHS.
PSF_TyVar :: [TyVar] -> PatersonSizeFailure
-- | Reason why a type cannot be marshalled through the FFI.
data () => TypeCannotBeMarshaledReason
NotADataType :: TypeCannotBeMarshaledReason
NewtypeDataConNotInScope :: !Maybe TyCon -> TypeCannotBeMarshaledReason
UnliftedFFITypesNeeded :: TypeCannotBeMarshaledReason
NotABoxedMarshalableTyCon :: TypeCannotBeMarshaledReason
ForeignLabelNotAPtr :: TypeCannotBeMarshaledReason
NotSimpleUnliftedType :: TypeCannotBeMarshaledReason
NotBoxedKindAny :: TypeCannotBeMarshaledReason
-- | Reason why a type in an FFI signature is invalid
data () => IllegalForeignTypeReason
TypeCannotBeMarshaled :: !Type -> TypeCannotBeMarshaledReason -> IllegalForeignTypeReason
ForeignDynNotPtr :: !Type -> !Type -> IllegalForeignTypeReason
SafeHaskellMustBeInIO :: IllegalForeignTypeReason
IOResultExpected :: IllegalForeignTypeReason
UnexpectedNestedForall :: IllegalForeignTypeReason
LinearTypesNotAllowed :: IllegalForeignTypeReason
OneArgExpected :: IllegalForeignTypeReason
AtLeastOneArgExpected :: IllegalForeignTypeReason
newtype () => TcLevel
TcLevel :: Int -> TcLevel
-- | What caused us to create a ConcreteTv metavariable? See Note
-- [ConcreteTv] in GHC.Tc.Utils.Concrete.
data () => ConcreteTvOrigin
-- | A ConcreteTv used to enforce the representation-polymorphism
-- invariants.
--
-- See FixedRuntimeRepOrigin for more information.
ConcreteFRR :: FixedRuntimeRepOrigin -> ConcreteTvOrigin
-- | What restrictions are on this metavariable around unification? These
-- are checked in GHC.Tc.Utils.Unify.startSolvingByUnification.
data () => MetaInfo
-- | This MetaTv is an ordinary unification variable A TauTv is always
-- filled in with a tau-type, which never contains any ForAlls.
TauTv :: MetaInfo
-- | A variant of TauTv, except that it should not be unified with a type,
-- only with a type variable See Note [TyVarTv] in GHC.Tc.Utils.TcMType
TyVarTv :: MetaInfo
-- | A unification variable used in the GHCi debugger. It is allowed
-- to unify with a polytype, unlike TauTv
RuntimeUnkTv :: MetaInfo
CycleBreakerTv :: MetaInfo
-- | A unification variable that can only be unified with a concrete type,
-- in the sense of Note [Concrete types] in GHC.Tc.Utils.Concrete. See
-- Note [ConcreteTv] in GHC.Tc.Utils.Concrete. See also Note [The
-- Concrete mechanism] in GHC.Tc.Utils.Concrete for an overview of how
-- this works in context.
ConcreteTv :: ConcreteTvOrigin -> MetaInfo
-- | What to expect for an argument to a rebindable-syntax operator. Quite
-- like Type, but allows for holes to be filled in by tcSyntaxOp.
-- The callback called from tcSyntaxOp gets a list of types; the meaning
-- of these types is determined by a left-to-right depth-first traversal
-- of the SyntaxOpType tree. So if you pass in
--
--
-- SynAny `SynFun` (SynList `SynFun` SynType Int) `SynFun` SynAny
--
--
-- you'll get three types back: one for the first SynAny, the
-- element type of the list, and one for the last SynAny.
-- You don't get anything for the SynType, because you've said
-- positively that it should be an Int, and so it shall be.
--
-- You'll also get three multiplicities back: one for each function
-- arrow. See also Note [Linear types] in Multiplicity.
--
-- This is defined here to avoid defining it in GHC.Tc.Gen.Expr
-- boot file.
data () => SyntaxOpType
-- | Any type
SynAny :: SyntaxOpType
-- | A rho type, skolemised or instantiated as appropriate
SynRho :: SyntaxOpType
-- | A list type. You get back the element type of the list
SynList :: SyntaxOpType
-- | A function.
SynFun :: SyntaxOpType -> SyntaxOpType -> SyntaxOpType
-- | A known type.
SynType :: ExpType -> SyntaxOpType
infixr 0 `SynFun`
type ExpRhoType = ExpType
-- | Like TcSigmaTypeFRR, but for an expected type.
--
-- See ExpTypeFRR.
type ExpSigmaTypeFRR = ExpTypeFRR
-- | An ExpType which has a fixed RuntimeRep.
--
-- For a Check ExpType, the stored TcType must have
-- a fixed RuntimeRep. For an Infer ExpType, the
-- ir_frr field must be of the form Just frr_orig.
type ExpTypeFRR = ExpType
type ExpSigmaType = ExpType
data () => InferResult
IR :: Unique -> TcLevel -> Maybe FixedRuntimeRepContext -> IORef (Maybe TcType) -> InferResult
-- | This Unique is for debugging only
[ir_uniq] :: InferResult -> Unique
-- | See Note [TcLevel of ExpType] in GHC.Tc.Utils.TcMType
[ir_lvl] :: InferResult -> TcLevel
-- | See Note [FixedRuntimeRep context in ExpType] in GHC.Tc.Utils.TcMType
[ir_frr] :: InferResult -> Maybe FixedRuntimeRepContext
-- | The type that fills in this hole should be a Type, that is,
-- its kind should be TYPE rr for some rr ::
-- RuntimeRep.
--
-- Additionally, if the ir_frr field is Just frr_orig
-- then rr must be concrete, in the sense of Note [Concrete
-- types] in GHC.Tc.Utils.Concrete.
[ir_ref] :: InferResult -> IORef (Maybe TcType)
-- | An expected type to check against during type-checking. See Note
-- [ExpType] in GHC.Tc.Utils.TcMType, where you'll also find
-- manipulators.
data () => ExpType
Check :: TcType -> ExpType
Infer :: !InferResult -> ExpType
type TcDTyCoVarSet = DTyCoVarSet
type TcDTyVarSet = DTyVarSet
type TcTyCoVarSet = TyCoVarSet
type TcTyVarSet = TyVarSet
type TcKind = Kind
type TcTauType = TcType
type TcRhoType = TcType
-- | A TcSigmaTypeFRR is a TcSigmaType which has a
-- syntactically fixed RuntimeRep in the sense of Note [Fixed
-- RuntimeRep] in GHC.Tc.Utils.Concrete.
--
-- In particular, this means that:
--
--
--
-- This property is important in functions such as
-- matchExpectedFunTys, where we want to provide argument types
-- which have a known runtime representation. See Note [Return arguments
-- with a fixed RuntimeRep.
type TcSigmaTypeFRR = TcSigmaType
type TcSigmaType = TcType
type TcThetaType = ThetaType
type TcPredType = PredType
type TcTyConBinder = TyConBinder
type PolyTcTyCon = TcTyCon
type MonoTcTyCon = TcTyCon
type TcTyCon = TyCon
type TcReqTVBinder = ReqTVBinder
type TcInvisTVBinder = InvisTVBinder
type TcTyVarBinder = TyVarBinder
-- | A type which has a syntactically fixed RuntimeRep as per Note [Fixed
-- RuntimeRep] in GHC.Tc.Utils.Concrete.
type TcTypeFRR = TcType
type TcTyCoVar = Var
type TcType = Type
type TcCoVar = CoVar
-- | A typecheckable thing available in a local context. Could be
-- AGlobal TyThing, but also lexically scoped variables,
-- etc. See GHC.Tc.Utils.Env for how to retrieve a TyThing
-- given a Name.
data () => TcTyThing
AGlobal :: TyThing -> TcTyThing
ATcId :: TcId -> IdBindingInfo -> TcTyThing
[tct_id] :: TcTyThing -> TcId
[tct_info] :: TcTyThing -> IdBindingInfo
ATyVar :: Name -> TcTyVar -> TcTyThing
ATcTyCon :: TyCon -> TcTyThing
APromotionErr :: PromotionErr -> TcTyThing
data () => TcIdSigInfo
CompleteSig :: TcId -> UserTypeCtxt -> SrcSpan -> TcIdSigInfo
[sig_bndr] :: TcIdSigInfo -> TcId
[sig_ctxt] :: TcIdSigInfo -> UserTypeCtxt
[sig_loc] :: TcIdSigInfo -> SrcSpan
PartialSig :: Name -> LHsSigWcType GhcRn -> UserTypeCtxt -> SrcSpan -> TcIdSigInfo
[psig_name] :: TcIdSigInfo -> Name
[psig_hs_ty] :: TcIdSigInfo -> LHsSigWcType GhcRn
[sig_ctxt] :: TcIdSigInfo -> UserTypeCtxt
[sig_loc] :: TcIdSigInfo -> SrcSpan
data () => SelfBootInfo
NoSelfBoot :: SelfBootInfo
SelfBoot :: ModDetails -> NameSet -> SelfBootInfo
[sb_mds] :: SelfBootInfo -> ModDetails
[sb_tcs] :: SelfBootInfo -> NameSet
data () => TcLclEnv
TcLclEnv :: RealSrcSpan -> [ErrCtxt] -> Bool -> TcLevel -> ThStage -> ThBindEnv -> ArrowCtxt -> LocalRdrEnv -> TcTypeEnv -> TcRef UsageEnv -> TcBinderStack -> TcRef WantedConstraints -> TcRef (Messages TcRnMessage) -> TcLclEnv
[tcl_loc] :: TcLclEnv -> RealSrcSpan
[tcl_ctxt] :: TcLclEnv -> [ErrCtxt]
[tcl_in_gen_code] :: TcLclEnv -> Bool
[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_usage] :: TcLclEnv -> TcRef UsageEnv
[tcl_bndrs] :: TcLclEnv -> TcBinderStack
[tcl_lie] :: TcLclEnv -> TcRef WantedConstraints
[tcl_errs] :: TcLclEnv -> TcRef (Messages TcRnMessage)
data () => QuoteWrapper
QuoteWrapper :: EvVar -> Type -> QuoteWrapper
-- | Where to store evidence for expression holes See Note [Holes] in
-- GHC.Tc.Types.Constraint
data () => HoleExprRef
HER :: IORef EvTerm -> TcType -> Unique -> HoleExprRef
-- | Evidence for CallStack implicit parameters.
data () => EvCallStack
EvCsEmpty :: EvCallStack
-- | EvCsPushCall origin loc stk represents a call from
-- origin, occurring at loc, in a calling context
-- stk.
EvCsPushCall :: FastString -> RealSrcSpan -> EvExpr -> EvCallStack
-- | 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 % w -> t), given a dictionaries
-- for w, s, and t.
EvTypeableTrFun :: EvTerm -> 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
type EvExpr = CoreExpr
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
data () => EvBind
EvBind :: EvVar -> EvTerm -> Bool -> EvBind
[eb_lhs] :: EvBind -> EvVar
[eb_rhs] :: EvBind -> EvTerm
[eb_is_given] :: EvBind -> Bool
newtype () => EvBindMap
EvBindMap :: DVarEnv EvBind -> EvBindMap
[ev_bind_varenv] :: EvBindMap -> DVarEnv EvBind
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
data () => TcEvBinds
TcEvBinds :: EvBindsVar -> TcEvBinds
EvBinds :: Bag EvBind -> TcEvBinds
data () => HsWrapper
WpHole :: HsWrapper
WpCompose :: HsWrapper -> HsWrapper -> HsWrapper
WpFun :: HsWrapper -> HsWrapper -> Scaled TcTypeFRR -> HsWrapper
WpCast :: TcCoercionR -> HsWrapper
WpEvLam :: EvVar -> HsWrapper
WpEvApp :: EvTerm -> HsWrapper
WpTyLam :: TyVar -> HsWrapper
WpTyApp :: KindOrType -> HsWrapper
WpLet :: TcEvBinds -> HsWrapper
WpMultCoercion :: Coercion -> HsWrapper
type TcMCoercionR = MCoercionR
type TcMCoercionN = MCoercionN
type TcMCoercion = MCoercion
type TcCoercionP = CoercionP
type TcCoercionR = CoercionR
type TcCoercionN = CoercionN
type TcCoercion = Coercion
data () => PotentialUnifiers
NoUnifiers :: PotentialUnifiers
OneOrMoreUnifiers :: [ClsInst] -> PotentialUnifiers
type ClsInstLookupResult = ([InstMatch], PotentialUnifiers, [InstMatch])
type InstMatch = (ClsInst, [DFunInstType])
type DFunInstType = Maybe Type
-- | Set of visible orphan modules, according to what modules have been
-- directly imported. This is based off of the dep_orphs field, which
-- records transitively reachable orphan modules (modules that define
-- orphan instances).
type VisibleOrphanModules = ModuleSet
-- | InstEnvs represents the combination of the global type class
-- instance environment, the local type class instance environment, and
-- the set of transitively reachable orphan modules (according to what
-- modules have been directly imported) used to test orphan instance
-- visibility.
data () => InstEnvs
InstEnvs :: InstEnv -> InstEnv -> VisibleOrphanModules -> InstEnvs
[ie_global] :: InstEnvs -> InstEnv
[ie_local] :: InstEnvs -> InstEnv
[ie_visible] :: InstEnvs -> VisibleOrphanModules
data () => InstEnv
-- | A type-class instance. Note that there is some tricky laziness at work
-- here. See Note [ClsInst laziness and the rough-match fields] for more
-- details.
data () => ClsInst
ClsInst :: Name -> [RoughMatchTc] -> Name -> [TyVar] -> Class -> [Type] -> DFunId -> OverlapFlag -> IsOrphan -> ClsInst
-- | Class name
[is_cls_nm] :: ClsInst -> Name
-- | Top of type args The class itself is always the first element of this
-- list
[is_tcs] :: ClsInst -> [RoughMatchTc]
-- | is_dfun_name = idName . is_dfun.
--
-- We use is_dfun_name for the visibility check,
-- instIsVisible, which needs to know the GenModule which
-- the dictionary is defined in. However, we cannot use the
-- GenModule attached to is_dfun since doing so would mean
-- we would potentially pull in an entire interface file unnecessarily.
-- This was the cause of #12367.
[is_dfun_name] :: ClsInst -> Name
[is_tvs] :: ClsInst -> [TyVar]
[is_cls] :: ClsInst -> Class
[is_tys] :: ClsInst -> [Type]
[is_dfun] :: ClsInst -> DFunId
[is_flag] :: ClsInst -> OverlapFlag
[is_orphan] :: ClsInst -> IsOrphan
-- | ImportAvails summarises what was imported from where,
-- irrespective of whether the imported things are actually used or not.
-- It is used:
--
--
-- - when processing the export list,
-- - when constructing usage info for the interface file,
-- - to identify the list of directly imported modules for
-- initialisation purposes and for optimised overlap checking of family
-- instances,
-- - when figuring out what things are really unused
--
data () => ImportAvails
ImportAvails :: ImportedMods -> InstalledModuleEnv ModuleNameWithIsBoot -> Set UnitId -> Bool -> Set UnitId -> InstalledModuleEnv ModuleNameWithIsBoot -> [ModuleName] -> [Module] -> [Module] -> ImportAvails
-- | Domain is all directly-imported modules
--
-- See the documentation on ImportedModsVal in
-- GHC.Unit.Module.Imported for the meaning of the fields.
--
-- We need a full ModuleEnv rather than a ModuleNameEnv here, because we
-- might be importing modules of the same name from different packages.
-- (currently not the case, but might be in the future).
[imp_mods] :: ImportAvails -> ImportedMods
-- | Home-package modules directly imported by the module being compiled.
[imp_direct_dep_mods] :: ImportAvails -> InstalledModuleEnv ModuleNameWithIsBoot
-- | Packages directly needed by the module being compiled
[imp_dep_direct_pkgs] :: ImportAvails -> Set UnitId
-- | Do we require that our own package is trusted? This is to handle
-- efficiently the case where a Safe module imports a Trustworthy module
-- that resides in the same package as it. See Note [Trust Own Package]
-- in GHC.Rename.Names
[imp_trust_own_pkg] :: ImportAvails -> Bool
-- | This records the packages the current module needs to trust for Safe
-- Haskell compilation to succeed. A package is required to be trusted if
-- we are dependent on a trustworthy module in that package. See Note
-- [Tracking Trust Transitively] in GHC.Rename.Names
[imp_trust_pkgs] :: ImportAvails -> Set UnitId
-- | Domain is all modules which have hs-boot files, and whether we should
-- import the boot version of interface file. Only used in one-shot mode
-- to populate eps_is_boot.
[imp_boot_mods] :: ImportAvails -> InstalledModuleEnv ModuleNameWithIsBoot
-- | Signature modules below this one
[imp_sig_mods] :: ImportAvails -> [ModuleName]
-- | Orphan modules below us in the import tree (and maybe including us for
-- imported modules)
[imp_orphs] :: ImportAvails -> [Module]
-- | Family instance modules below us in the import tree (and maybe
-- including us for imported modules)
[imp_finsts] :: ImportAvails -> [Module]
-- | Locations and information the finder cares about.
--
-- Should be taken from DynFlags via initFinderOpts.
data () => FinderOpts
FinderOpts :: [FilePath] -> Bool -> Bool -> Ways -> Bool -> Maybe FilePath -> Maybe FastString -> Set ModuleName -> Set ModuleName -> Maybe FilePath -> String -> Maybe FilePath -> String -> String -> Maybe FilePath -> String -> String -> Maybe FilePath -> FinderOpts
-- | Where are we allowed to look for Modules and Source files
[finder_importPaths] :: FinderOpts -> [FilePath]
-- | When looking up a home module:
--
--
-- - True: search interface files (e.g. in '-c' mode)
-- - False: search source files (e.g. in '--make' mode)
--
[finder_lookupHomeInterfaces] :: FinderOpts -> Bool
-- | Don't check that an imported interface file actually exists if it can
-- only be at one location. The interface will be reported as
-- InstalledFound even if the file doesn't exist, so this is only
-- useful in specific cases (e.g. to generate dependencies with `ghc -M`)
[finder_bypassHiFileCheck] :: FinderOpts -> Bool
[finder_ways] :: FinderOpts -> Ways
-- | If we encounter unknown modules, should we suggest modules that have a
-- similar name.
[finder_enableSuggestions] :: FinderOpts -> Bool
[finder_workingDirectory] :: FinderOpts -> Maybe FilePath
[finder_thisPackageName] :: FinderOpts -> Maybe FastString
[finder_hiddenModules] :: FinderOpts -> Set ModuleName
[finder_reexportedModules] :: FinderOpts -> Set ModuleName
[finder_hieDir] :: FinderOpts -> Maybe FilePath
[finder_hieSuf] :: FinderOpts -> String
[finder_hiDir] :: FinderOpts -> Maybe FilePath
[finder_hiSuf] :: FinderOpts -> String
[finder_dynHiSuf] :: FinderOpts -> String
[finder_objectDir] :: FinderOpts -> Maybe FilePath
[finder_objectSuf] :: FinderOpts -> String
[finder_dynObjectSuf] :: FinderOpts -> String
[finder_stubDir] :: FinderOpts -> Maybe FilePath
-- | The result of searching for an imported module.
--
-- NB: FindResult manages both user source-import lookups (which can
-- result in GenModule) as well as direct imports for interfaces
-- (which always result in InstalledModule).
data () => FindResult
-- | The module was found
Found :: ModLocation -> Module -> FindResult
-- | The requested unit was not found
NoPackage :: Unit -> FindResult
-- | _Error_: both in multiple packages
FoundMultiple :: [(Module, ModuleOrigin)] -> FindResult
-- | Not found
NotFound :: [FilePath] -> Maybe Unit -> [Unit] -> [Unit] -> [(Unit, UnusableUnitReason)] -> [ModuleSuggestion] -> FindResult
-- | Places where I looked
[fr_paths] :: FindResult -> [FilePath]
-- | Just p => module is in this unit's manifest, but couldn't find the
-- .hi file
[fr_pkg] :: FindResult -> Maybe Unit
-- | Module is in these units, but the *module* is hidden
[fr_mods_hidden] :: FindResult -> [Unit]
-- | Module is in these units, but the *unit* is hidden
[fr_pkgs_hidden] :: FindResult -> [Unit]
-- | Module is in these units, but it is unusable
[fr_unusables] :: FindResult -> [(Unit, UnusableUnitReason)]
-- | Possible mis-spelled modules
[fr_suggestions] :: FindResult -> [ModuleSuggestion]
data () => InstalledFindResult
InstalledFound :: ModLocation -> InstalledModule -> InstalledFindResult
InstalledNoPackage :: UnitId -> InstalledFindResult
InstalledNotFound :: [FilePath] -> Maybe UnitId -> InstalledFindResult
data () => FinderCache
data () => IOEnvFailure
IOEnvFailure :: IOEnvFailure
data () => IOEnv env a
-- | 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
-- | Located Type checker Specification Pragmas
type LTcSpecPrag = Located TcSpecPrag
-- | 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
data () => AnnSig
AnnSig :: AddEpAnn -> [AddEpAnn] -> AnnSig
[asDcolon] :: AnnSig -> AddEpAnn
[asRest] :: AnnSig -> [AddEpAnn]
-- | A type signature in generated code, notably the code generated for
-- record selectors. We simply record the desired Id itself, replete with
-- its name, type and IdDetails. Otherwise it's just like a type
-- signature: there should be an accompanying binding
newtype () => IdSig
IdSig :: Id -> IdSig
[unIdSig] :: IdSig -> Id
-- | Abstraction Bindings Export
data () => ABExport
ABE :: Id -> Id -> HsWrapper -> TcSpecPrags -> ABExport
-- | Any INLINE pragma is attached to this Id
[abe_poly] :: ABExport -> Id
[abe_mono] :: ABExport -> Id
-- | See Note [ABExport wrapper] Shape: (forall abs_tvs. abs_ev_vars =>
-- abe_mono) ~ abe_poly
[abe_wrap] :: ABExport -> HsWrapper
-- | SPECIALISE pragmas
[abe_prags] :: ABExport -> TcSpecPrags
-- | Typechecked, generalised bindings, used in the output to the type
-- checker. See Note [AbsBinds].
data () => AbsBinds
AbsBinds :: [TyVar] -> [EvVar] -> [ABExport] -> [TcEvBinds] -> LHsBinds GhcTc -> Bool -> AbsBinds
[abs_tvs] :: AbsBinds -> [TyVar]
-- | Includes equality constraints
[abs_ev_vars] :: AbsBinds -> [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] :: AbsBinds -> [ABExport]
-- | Evidence bindings Why a list? See GHC.Tc.TyCl.Instance Note
-- [Typechecking plan for instance declarations]
[abs_ev_binds] :: AbsBinds -> [TcEvBinds]
-- | Typechecked user bindings
[abs_binds] :: AbsBinds -> LHsBinds GhcTc
[abs_sig] :: AbsBinds -> Bool
data () => NHsValBindsLR idL
NValBinds :: [(RecFlag, LHsBinds idL)] -> [LSig GhcRn] -> NHsValBindsLR idL
-- | Pending Type-checker Splice
data () => PendingTcSplice
PendingTcSplice :: SplicePointName -> LHsExpr GhcTc -> PendingTcSplice
-- | Pending Renamer Splice
data () => PendingRnSplice
PendingRnSplice :: UntypedSpliceFlavour -> SplicePointName -> LHsExpr GhcRn -> PendingRnSplice
data () => UntypedSpliceFlavour
UntypedExpSplice :: UntypedSpliceFlavour
UntypedPatSplice :: UntypedSpliceFlavour
UntypedTypeSplice :: UntypedSpliceFlavour
UntypedDeclSplice :: UntypedSpliceFlavour
data () => DelayedSplice
DelayedSplice :: TcLclEnv -> LHsExpr GhcRn -> TcType -> LHsExpr GhcTc -> DelayedSplice
data () => XBindStmtTc
XBindStmtTc :: SyntaxExpr GhcTc -> Type -> Mult -> FailOperator GhcTc -> XBindStmtTc
[xbstc_bindOp] :: XBindStmtTc -> SyntaxExpr GhcTc
[xbstc_boundResultType] :: XBindStmtTc -> Type
[xbstc_boundResultMult] :: XBindStmtTc -> Mult
[xbstc_failOp] :: XBindStmtTc -> FailOperator GhcTc
data () => XBindStmtRn
XBindStmtRn :: SyntaxExpr GhcRn -> FailOperator GhcRn -> XBindStmtRn
[xbsrn_bindOp] :: XBindStmtRn -> SyntaxExpr GhcRn
[xbsrn_failOp] :: XBindStmtRn -> FailOperator GhcRn
data () => RecStmtTc
RecStmtTc :: Type -> [PostTcExpr] -> [PostTcExpr] -> Type -> RecStmtTc
[recS_bind_ty] :: RecStmtTc -> Type
[recS_later_rets] :: RecStmtTc -> [PostTcExpr]
[recS_rec_rets] :: RecStmtTc -> [PostTcExpr]
[recS_ret_ty] :: RecStmtTc -> Type
data () => GrhsAnn
GrhsAnn :: Maybe EpaLocation -> AddEpAnn -> GrhsAnn
[ga_vbar] :: GrhsAnn -> Maybe EpaLocation
-- | Match separator location
[ga_sep] :: GrhsAnn -> AddEpAnn
data () => MatchGroupTc
MatchGroupTc :: [Scaled Type] -> Type -> Origin -> MatchGroupTc
[mg_arg_tys] :: MatchGroupTc -> [Scaled Type]
[mg_res_ty] :: MatchGroupTc -> Type
[mg_origin] :: MatchGroupTc -> Origin
data () => CmdTopTc
CmdTopTc :: Type -> Type -> CmdSyntaxTable GhcTc -> CmdTopTc
-- | Command Syntax Table (for Arrow syntax)
type CmdSyntaxTable p = [(Name, HsExpr p)]
data () => HsExpansion orig expanded
HsExpanded :: orig -> expanded -> HsExpansion orig expanded
data () => XXExprGhcTc
WrapExpr :: {-# UNPACK #-} !HsWrap HsExpr -> XXExprGhcTc
ExpansionExpr :: {-# UNPACK #-} !HsExpansion (HsExpr GhcRn) (HsExpr GhcTc) -> XXExprGhcTc
ConLikeTc :: ConLike -> [TcTyVar] -> [Scaled TcType] -> XXExprGhcTc
HsTick :: CoreTickish -> LHsExpr GhcTc -> XXExprGhcTc
HsBinTick :: Int -> Int -> LHsExpr GhcTc -> XXExprGhcTc
data () => AnnsIf
AnnsIf :: EpaLocation -> EpaLocation -> EpaLocation -> Maybe EpaLocation -> Maybe EpaLocation -> AnnsIf
[aiIf] :: AnnsIf -> EpaLocation
[aiThen] :: AnnsIf -> EpaLocation
[aiElse] :: AnnsIf -> EpaLocation
[aiThenSemi] :: AnnsIf -> Maybe EpaLocation
[aiElseSemi] :: AnnsIf -> Maybe EpaLocation
data () => AnnProjection
AnnProjection :: EpaLocation -> EpaLocation -> AnnProjection
-- | '('
[apOpen] :: AnnProjection -> EpaLocation
-- | ')'
[apClose] :: AnnProjection -> EpaLocation
data () => AnnFieldLabel
AnnFieldLabel :: Maybe EpaLocation -> AnnFieldLabel
[afDot] :: AnnFieldLabel -> Maybe EpaLocation
data () => AnnExplicitSum
AnnExplicitSum :: EpaLocation -> [EpaLocation] -> [EpaLocation] -> EpaLocation -> AnnExplicitSum
[aesOpen] :: AnnExplicitSum -> EpaLocation
[aesBarsBefore] :: AnnExplicitSum -> [EpaLocation]
[aesBarsAfter] :: AnnExplicitSum -> [EpaLocation]
[aesClose] :: AnnExplicitSum -> EpaLocation
data () => EpAnnUnboundVar
EpAnnUnboundVar :: (EpaLocation, EpaLocation) -> EpaLocation -> EpAnnUnboundVar
[hsUnboundBackquotes] :: EpAnnUnboundVar -> (EpaLocation, EpaLocation)
[hsUnboundHole] :: EpAnnUnboundVar -> EpaLocation
data () => EpAnnHsCase
EpAnnHsCase :: EpaLocation -> EpaLocation -> [AddEpAnn] -> EpAnnHsCase
[hsCaseAnnCase] :: EpAnnHsCase -> EpaLocation
[hsCaseAnnOf] :: EpAnnHsCase -> EpaLocation
[hsCaseAnnsRest] :: EpAnnHsCase -> [AddEpAnn]
data () => HsBracketTc
HsBracketTc :: HsQuote GhcRn -> Type -> Maybe QuoteWrapper -> [PendingTcSplice] -> HsBracketTc
[hsb_quote] :: HsBracketTc -> HsQuote GhcRn
[hsb_ty] :: HsBracketTc -> Type
[hsb_wrap] :: HsBracketTc -> Maybe QuoteWrapper
[hsb_splices] :: HsBracketTc -> [PendingTcSplice]
-- | HsWrap appears only in typechecker output
data () => HsWrap (hs_syn :: Type -> Type)
HsWrap :: HsWrapper -> hs_syn GhcTc -> HsWrap (hs_syn :: Type -> Type)
-- | An expression with wrappers, used for rebindable syntax
--
-- This should desugar to
--
--
-- 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.
data () => SyntaxExprTc
SyntaxExprTc :: HsExpr GhcTc -> [HsWrapper] -> HsWrapper -> SyntaxExprTc
[syn_expr] :: SyntaxExprTc -> HsExpr GhcTc
[syn_arg_wraps] :: SyntaxExprTc -> [HsWrapper]
[syn_res_wrap] :: SyntaxExprTc -> HsWrapper
NoSyntaxExprTc :: SyntaxExprTc
-- | The function to use in rebindable syntax. See Note [NoSyntaxExpr].
data () => SyntaxExprRn
SyntaxExprRn :: HsExpr GhcRn -> SyntaxExprRn
NoSyntaxExprRn :: SyntaxExprRn
type family SyntaxExprGhc (p :: Pass) = (r :: Type) | r -> p
-- | 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)]
-- | 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
-- | This class specifies how to collect variable identifiers from
-- extension patterns in the given pass. Consumers of the GHC API that
-- define their own passes should feel free to implement instances in
-- order to make use of functions which depend on it.
--
-- In particular, Haddock already makes use of this, with an instance for
-- its DocNameI pass so that it can reuse the code in GHC for
-- collecting binders.
class UnXRec p => CollectPass p
collectXXPat :: CollectPass p => CollectFlag p -> XXPat p -> [IdP p] -> [IdP p]
collectXXHsBindsLR :: CollectPass p => XXHsBindsLR p pR -> [IdP p] -> [IdP p]
collectXSplicePat :: CollectPass p => CollectFlag p -> XSplicePat p -> [IdP p] -> [IdP p]
-- | Indicate if evidence binders have to be collected.
--
-- This type is used as a boolean (should we collect evidence binders or
-- not?) but also to pass an evidence that the AST has been typechecked
-- when we do want to collect evidence binders, otherwise these binders
-- are not available.
--
-- See Note [Dictionary binders in ConPatOut]
data () => CollectFlag p
-- | Don't collect evidence binders
[CollNoDictBinders] :: forall p. CollectFlag p
-- | Collect evidence binders
[CollWithDictBinders] :: CollectFlag (GhcPass 'Typechecked)
-- | In what context are we calling matchExpectedFunTys or
-- matchActualFunTySigma?
--
-- Used for two things:
--
--
-- - Reporting error messages which explain that a function has been
-- given an unexpected number of arguments. Uses
-- pprExpectedFunTyHerald. See Note [Herald for
-- matchExpectedFunTys] in GHC.Tc.Utils.Unify.
-- - Reporting representation-polymorphism errors when a function
-- argument doesn't have a fixed RuntimeRep as per Note [Fixed
-- RuntimeRep] in GHC.Tc.Utils.Concrete. Uses
-- pprExpectedFunTyOrigin. See FixedRuntimeRepContext for
-- the situations in which representation-polymorphism checks are
-- performed.
--
data () => ExpectedFunTyOrigin
-- | A rebindable syntax operator is expected to have a function type.
--
-- Test cases for representation-polymorphism checks: RepPolyDoBind,
-- RepPolyDoBody{1,2}, RepPolyMc{Bind,Body,Guard}, RepPolyNPlusK
ExpectedFunTySyntaxOp :: !CtOrigin -> !HsExpr GhcRn -> ExpectedFunTyOrigin
-- | A view pattern must have a function type.
--
-- Test cases for representation-polymorphism checks: RepPolyBinder
ExpectedFunTyViewPat :: !HsExpr GhcRn -> ExpectedFunTyOrigin
-- | Need to be able to extract an argument type from a function type.
--
-- Test cases for representation-polymorphism checks: RepPolyApp
ExpectedFunTyArg :: !TypedThing -> !HsExpr (GhcPass p) -> ExpectedFunTyOrigin
-- | Ensure that a function defined by equations indeed has a function type
-- with the appropriate number of arguments.
--
-- Test cases for representation-polymorphism checks: RepPolyBinder,
-- RepPolyRecordPattern, RepPolyWildcardPattern
ExpectedFunTyMatches :: !TypedThing -> !MatchGroup GhcRn (LHsExpr GhcRn) -> ExpectedFunTyOrigin
-- | Ensure that a lambda abstraction has a function type.
--
-- Test cases for representation-polymorphism checks: RepPolyLambda
ExpectedFunTyLam :: !MatchGroup GhcRn (LHsExpr GhcRn) -> ExpectedFunTyOrigin
-- | Ensure that a lambda case expression has a function type.
--
-- Test cases for representation-polymorphism checks: RepPolyMatch
ExpectedFunTyLamCase :: LamCaseVariant -> !HsExpr GhcRn -> ExpectedFunTyOrigin
-- | While typechecking arrow notation, in which context did a
-- representation polymorphism check arise?
--
-- See FixedRuntimeRepContext for more general origins of
-- representation polymorphism checks.
data () => FRRArrowContext
-- | The result of an arrow command does not have a fixed runtime
-- representation.
--
-- Test case: RepPolyArrowCmd.
ArrowCmdResTy :: !HsCmd GhcRn -> FRRArrowContext
-- | The argument to an arrow in an arrow command application does not have
-- a fixed runtime representation.
--
-- Test cases: none.
ArrowCmdApp :: !HsCmd GhcRn -> !HsExpr GhcRn -> FRRArrowContext
-- | A function in an arrow application does not have a fixed runtime
-- representation.
--
-- Test cases: none.
ArrowCmdArrApp :: !HsExpr GhcRn -> !HsExpr GhcRn -> !HsArrAppType -> FRRArrowContext
-- | The scrutinee type in an arrow command case statement does not have a
-- fixed runtime representation.
--
-- Test cases: none.
ArrowCmdCase :: FRRArrowContext
-- | The overall type of an arrow proc expression does not have a fixed
-- runtime representation.
--
-- Test case: RepPolyArrowFun.
ArrowFun :: !HsExpr GhcRn -> FRRArrowContext
-- | The position of an argument (to be reported in an error message).
data () => ArgPos
-- | Invisible argument: don't report its position to the user.
ArgPosInvis :: ArgPos
-- | Visible argument in i-th position.
ArgPosVis :: !Int -> ArgPos
-- | A function with representation-polymorphic arguments, such as
-- coerce or (#, #).
--
-- Used for reporting partial applications of representation-polymorphic
-- functions in error messages.
data () => RepPolyFun
-- | A wired-in function with representation-polymorphic arguments, such as
-- coerce.
RepPolyWiredIn :: !Id -> RepPolyFun
-- | A data constructor with representation-polymorphic arguments, such as
-- an unboxed tuple or a newtype constructor with
-- -XUnliftedNewtypes.
RepPolyDataCon :: !DataCon -> RepPolyFun
-- | Are we in a do expression or a monad comprehension?
--
-- This datatype is only used to report this context to the user in error
-- messages.
data () => StmtOrigin
MonadComprehension :: StmtOrigin
DoNotation :: StmtOrigin
data () => NakedScFlag
NakedSc :: NakedScFlag
NotNakedSc :: NakedScFlag
-- | Some kind of type variable binder.
--
-- Used for reporting errors, in SkolemInfo and
-- TcSolverReportMsg.
data () => TyVarBndrs
HsTyVarBndrsRn :: [HsTyVarBndr flag GhcRn] -> TyVarBndrs
-- | Some thing which has a type.
--
-- This datatype is used when we want to report to the user that
-- something has an unexpected type.
data () => TypedThing
HsTypeRnThing :: HsType GhcRn -> TypedThing
TypeThing :: Type -> TypedThing
HsExprRnThing :: HsExpr GhcRn -> TypedThing
NameThing :: Name -> TypedThing
-- | Report Redundant Constraints.
data () => ReportRedundantConstraints
-- | Don't report redundant constraints
NoRRC :: ReportRedundantConstraints
-- | Report redundant constraints, and here is the SrcSpan for the
-- constraints E.g. f :: (Eq a, Ord b) => blah The span is for the (Eq
-- a, Ord b)
WantRRC :: SrcSpan -> ReportRedundantConstraints
-- | UserTypeCtxt describes the origin of the polymorphic type in the
-- places where we need an expression to have that type
data () => UserTypeCtxt
FunSigCtxt :: Name -> ReportRedundantConstraints -> UserTypeCtxt
InfSigCtxt :: Name -> UserTypeCtxt
ExprSigCtxt :: ReportRedundantConstraints -> UserTypeCtxt
KindSigCtxt :: UserTypeCtxt
StandaloneKindSigCtxt :: Name -> UserTypeCtxt
TypeAppCtxt :: UserTypeCtxt
ConArgCtxt :: Name -> UserTypeCtxt
TySynCtxt :: Name -> UserTypeCtxt
PatSynCtxt :: Name -> UserTypeCtxt
PatSigCtxt :: UserTypeCtxt
RuleSigCtxt :: FastString -> Name -> UserTypeCtxt
ForSigCtxt :: Name -> UserTypeCtxt
DefaultDeclCtxt :: UserTypeCtxt
InstDeclCtxt :: Bool -> UserTypeCtxt
SpecInstCtxt :: 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 () => CtLoc
CtLoc :: CtOrigin -> TcLclEnv -> Maybe TypeOrKind -> !SubGoalDepth -> CtLoc
[ctl_origin] :: CtLoc -> CtOrigin
[ctl_env] :: CtLoc -> TcLclEnv
[ctl_t_or_k] :: CtLoc -> Maybe TypeOrKind
[ctl_depth] :: CtLoc -> !SubGoalDepth
-- | See Note [SubGoalDepth]
data () => SubGoalDepth
-- | Whether or not one Ct can rewrite another is determined by its
-- flavour and its equality relation. See also Note [Flavours with roles]
-- in GHC.Tc.Solver.InertSet
type CtFlavourRole = (CtFlavour, EqRel)
data () => CtFlavour
Given :: CtFlavour
Wanted :: CtFlavour
-- | Stores a set of CoercionHoles that have been used to rewrite a
-- constraint. See Note [Wanteds rewrite Wanteds].
newtype () => RewriterSet
RewriterSet :: UniqSet CoercionHole -> RewriterSet
data () => CtEvidence
CtGiven :: TcPredType -> EvVar -> CtLoc -> CtEvidence
[ctev_pred] :: CtEvidence -> TcPredType
[ctev_evar] :: CtEvidence -> EvVar
[ctev_loc] :: CtEvidence -> CtLoc
CtWanted :: TcPredType -> TcEvDest -> CtLoc -> RewriterSet -> CtEvidence
[ctev_pred] :: CtEvidence -> TcPredType
[ctev_dest] :: CtEvidence -> TcEvDest
[ctev_loc] :: CtEvidence -> CtLoc
[ctev_rewriters] :: CtEvidence -> RewriterSet
-- | A place for type-checking evidence to go after it is generated.
--
--
-- - Wanted equalities use HoleDest,
-- - other Wanteds use EvVarDest.
--
data () => TcEvDest
-- | bind this var to the evidence EvVarDest is always used for
-- non-type-equalities e.g. class constraints
EvVarDest :: EvVar -> TcEvDest
-- | fill in this hole with the evidence HoleDest is always used for
-- type-equalities See Note [Coercion holes] in GHC.Core.TyCo.Rep
HoleDest :: CoercionHole -> TcEvDest
type UserGiven = Implication
data () => HasGivenEqs
NoGivenEqs :: HasGivenEqs
LocalGivenEqs :: HasGivenEqs
MaybeGivenEqs :: HasGivenEqs
data () => ImplicStatus
IC_Solved :: [EvVar] -> ImplicStatus
[ics_dead] :: ImplicStatus -> [EvVar]
IC_Insoluble :: ImplicStatus
IC_BadTelescope :: ImplicStatus
IC_Unsolved :: ImplicStatus
data () => Implication
Implic :: TcLevel -> SkolemInfoAnon -> [TcTyVar] -> [EvVar] -> HasGivenEqs -> Bool -> TcLclEnv -> WantedConstraints -> EvBindsVar -> VarSet -> VarSet -> ImplicStatus -> Implication
[ic_tclvl] :: Implication -> TcLevel
[ic_info] :: Implication -> SkolemInfoAnon
[ic_skols] :: Implication -> [TcTyVar]
[ic_given] :: Implication -> [EvVar]
[ic_given_eqs] :: Implication -> HasGivenEqs
[ic_warn_inaccessible] :: Implication -> Bool
[ic_env] :: Implication -> TcLclEnv
[ic_wanted] :: Implication -> WantedConstraints
[ic_binds] :: Implication -> EvBindsVar
[ic_need_inner] :: Implication -> VarSet
[ic_need_outer] :: Implication -> VarSet
[ic_status] :: Implication -> ImplicStatus
data () => WantedConstraints
WC :: Cts -> Bag Implication -> Bag DelayedError -> WantedConstraints
[wc_simple] :: WantedConstraints -> Cts
[wc_impl] :: WantedConstraints -> Bag Implication
[wc_errors] :: WantedConstraints -> Bag DelayedError
-- | An individual problem that might be logged in a CheckTyEqResult
data () => CheckTyEqProblem
-- | A set of problems in checking the validity of a type equality. See
-- checkTypeEq.
data () => CheckTyEqResult
-- | Used to indicate extra information about why a CIrredCan is
-- irreducible
data () => CtIrredReason
-- | this constraint has a non-canonical shape (e.g. c Int, for a
-- variable c)
IrredShapeReason :: CtIrredReason
-- | an equality where some invariant other than (TyEq:H) of CEqCan
-- is not satisfied; the CheckTyEqResult states exactly why
NonCanonicalReason :: CheckTyEqResult -> CtIrredReason
-- | an equality that cannot be decomposed because it is representational.
-- Example: a b ~R# Int. These might still be solved later.
-- INVARIANT: The constraint is a representational equality constraint
ReprEqReason :: CtIrredReason
-- | a nominal equality that relates two wholly different types, like
-- Int ~# Bool or a b ~# 3. INVARIANT: The constraint
-- is a nominal equality constraint
ShapeMismatchReason :: CtIrredReason
-- | an equality like T a b c ~ Q d e where either T or
-- Q is an abstract type constructor. See Note [Skolem abstract
-- data] in GHC.Core.TyCon. INVARIANT: The constraint is an equality
-- constraint between two TyConApps
AbstractTyConReason :: CtIrredReason
-- | Why did we decide that a type was not concrete?
data () => NotConcreteReason
-- | The type contains a TyConApp of a non-concrete TyCon.
--
-- See Note [Concrete types] in GHC.Tc.Utils.Concrete.
NonConcreteTyCon :: TyCon -> [TcType] -> NotConcreteReason
-- | The type contains a type variable that could not be made concrete
-- (e.g. a skolem type variable).
NonConcretisableTyVar :: TyVar -> NotConcreteReason
-- | The type contains a cast.
ContainsCast :: TcType -> TcCoercionN -> NotConcreteReason
-- | The type contains a forall.
ContainsForall :: ForAllTyBinder -> TcType -> NotConcreteReason
-- | The type contains a CoercionTy.
ContainsCoercionTy :: TcCoercion -> NotConcreteReason
-- | Why did we require that a certain type be concrete?
data () => NotConcreteError
-- | Concreteness was required by a representation-polymorphism check.
--
-- See Note [The Concrete mechanism] in GHC.Tc.Utils.Concrete.
NCE_FRR :: CtLoc -> FixedRuntimeRepOrigin -> NonEmpty NotConcreteReason -> NotConcreteError
-- | Where did this check take place?
[nce_loc] :: NotConcreteError -> CtLoc
-- | Which representation-polymorphism check did we perform?
[nce_frr_origin] :: NotConcreteError -> FixedRuntimeRepOrigin
-- | Why did the check fail?
[nce_reasons] :: NotConcreteError -> NonEmpty NotConcreteReason
-- | Used to indicate which sort of hole we have.
data () => HoleSort
-- | Either an out-of-scope variable or a "true" hole in an expression
-- (TypedHoles). The HoleExprRef says where to write the the erroring
-- expression for -fdefer-type-errors.
ExprHole :: HoleExprRef -> HoleSort
-- | A hole in a type (PartialTypeSignatures)
TypeHole :: HoleSort
-- | A hole in a constraint, like @f :: (_, Eq a) => ... Differentiated
-- from TypeHole because a ConstraintHole is simplified differently. See
-- Note [Do not simplify ConstraintHoles] in GHC.Tc.Solver.
ConstraintHole :: HoleSort
-- | A hole stores the information needed to report diagnostics about holes
-- in terms (unbound identifiers or underscores) or in types (also called
-- wildcards, as used in partial type signatures). See Note [Holes].
data () => Hole
Hole :: HoleSort -> RdrName -> TcType -> CtLoc -> Hole
-- | What flavour of hole is this?
[hole_sort] :: Hole -> HoleSort
-- | The name of this hole
[hole_occ] :: Hole -> RdrName
-- | Type to be printed to the user For expression holes: type of expr For
-- type holes: the missing type
[hole_ty] :: Hole -> TcType
-- | Where hole was written
[hole_loc] :: Hole -> CtLoc
-- | A delayed error, to be reported after constraint solving, in order to
-- benefit from deferred unifications.
data () => DelayedError
-- | A hole (in a type or in a term).
--
-- See Note [Holes].
DE_Hole :: Hole -> DelayedError
-- | A type could not be ensured to be concrete.
--
-- See Note [The Concrete mechanism] in GHC.Tc.Utils.Concrete.
DE_NotConcrete :: NotConcreteError -> DelayedError
data () => QCInst
QCI :: CtEvidence -> [TcTyVar] -> TcPredType -> Bool -> QCInst
[qci_ev] :: QCInst -> CtEvidence
[qci_tvs] :: QCInst -> [TcTyVar]
[qci_pred] :: QCInst -> TcPredType
[qci_pend_sc] :: QCInst -> Bool
-- | A CanEqLHS is a type that can appear on the left of a canonical
-- equality: a type variable or exactly-saturated type family
-- application.
data () => CanEqLHS
TyVarLHS :: TcTyVar -> CanEqLHS
TyFamLHS :: TyCon -> [Xi] -> CanEqLHS
data () => Ct
CDictCan :: CtEvidence -> Class -> [Xi] -> Bool -> Ct
[cc_ev] :: Ct -> CtEvidence
[cc_class] :: Ct -> Class
[cc_tyargs] :: Ct -> [Xi]
[cc_pend_sc] :: Ct -> Bool
CIrredCan :: CtEvidence -> CtIrredReason -> Ct
[cc_ev] :: Ct -> CtEvidence
[cc_reason] :: Ct -> CtIrredReason
CEqCan :: CtEvidence -> CanEqLHS -> Xi -> EqRel -> Ct
[cc_ev] :: Ct -> CtEvidence
[cc_lhs] :: Ct -> CanEqLHS
[cc_rhs] :: Ct -> Xi
[cc_eq_rel] :: Ct -> EqRel
CNonCanonical :: CtEvidence -> Ct
[cc_ev] :: Ct -> CtEvidence
CQuantCan :: QCInst -> Ct
type Cts = Bag Ct
-- | A Xi-type is one that has been fully rewritten with respect to
-- the inert set; that is, it has been rewritten by the algorithm in
-- GHC.Tc.Solver.Rewrite. (Historical note: Xi, for years and
-- years, meant that a type was type-family-free. It does *not* mean this
-- any more.)
type Xi = TcType
data () => PromotionErr
TyConPE :: PromotionErr
ClassPE :: PromotionErr
FamDataConPE :: PromotionErr
ConstrainedDataConPE :: PredType -> PromotionErr
PatSynPE :: PromotionErr
RecDataConPE :: PromotionErr
TermVariablePE :: PromotionErr
NoDataKindsDC :: PromotionErr
-- | An error which might arise during typechecking/renaming.
data () => TcRnMessage
-- | The current collection of docs that Template Haskell has built up via
-- putDoc.
type THDocs = Map DocLoc HsDoc GhcRn
-- | This is a mirror of Template Haskell's DocLoc, but the TH names are
-- resolved to GHC names.
data () => DocLoc
DeclDoc :: Name -> DocLoc
ArgDoc :: Name -> Int -> DocLoc
InstDoc :: Name -> DocLoc
ModuleDoc :: DocLoc
type RoleAnnotEnv = NameEnv LRoleAnnotDecl GhcRn
type DefaultingPlugin = [CommandLineOption] -> Maybe DefaultingPlugin
type FillDefaulting = WantedConstraints -> TcPluginM [DefaultingProposal]
type DefaultingPluginResult = [DefaultingProposal]
-- | A collection of candidate default types for a type variable.
data () => DefaultingProposal
DefaultingProposal :: TcTyVar -> [Type] -> [Ct] -> DefaultingProposal
-- | The type variable to default.
[deProposalTyVar] :: DefaultingProposal -> TcTyVar
-- | Candidate types to default the type variable to.
[deProposalCandidates] :: DefaultingProposal -> [Type]
-- | The constraints against which defaults are checked.
[deProposalCts] :: DefaultingProposal -> [Ct]
data () => TcPluginRewriteResult
-- | The plugin does not rewrite the type family application.
TcPluginNoRewrite :: TcPluginRewriteResult
-- | The plugin rewrites the type family application providing a rewriting
-- together with evidence: a Reduction, which contains the
-- rewritten type together with a Coercion whose right-hand-side
-- type is the rewritten type.
--
-- The plugin can also emit additional Wanted constraints.
TcPluginRewriteTo :: !Reduction -> [Ct] -> TcPluginRewriteResult
[tcPluginReduction] :: TcPluginRewriteResult -> !Reduction
[tcRewriterNewWanteds] :: TcPluginRewriteResult -> [Ct]
-- | Result of running a solver plugin.
data () => TcPluginSolveResult
TcPluginSolveResult :: [Ct] -> [(EvTerm, Ct)] -> [Ct] -> TcPluginSolveResult
-- | Insoluble constraints found by the plugin.
--
-- These constraints will be added to the inert set, and reported as
-- insoluble to the user.
[tcPluginInsolubleCts] :: TcPluginSolveResult -> [Ct]
-- | Solved constraints, together with their evidence.
--
-- These are removed from the inert set, and the evidence for them is
-- recorded.
[tcPluginSolvedCts] :: TcPluginSolveResult -> [(EvTerm, Ct)]
-- | New constraints that the plugin wishes to emit.
--
-- These will be added to the work list.
[tcPluginNewCts] :: TcPluginSolveResult -> [Ct]
-- | The plugin has not found any contradictions,
--
-- The first field is for constraints that were solved. The second field
-- contains new work, that should be processed by the constraint solver.
pattern TcPluginOk :: [(EvTerm, Ct)] -> [Ct] -> TcPluginSolveResult
-- | The plugin found a contradiction. The returned constraints are removed
-- from the inert set, and recorded as insoluble.
--
-- The returned list of constraints should never be empty.
pattern TcPluginContradiction :: [Ct] -> TcPluginSolveResult
data () => TcPlugin
TcPlugin :: TcPluginM s -> (s -> TcPluginSolver) -> (s -> UniqFM TyCon TcPluginRewriter) -> (s -> TcPluginM ()) -> TcPlugin
-- | Initialize plugin, when entering type-checker.
[tcPluginInit] :: TcPlugin -> TcPluginM s
-- | Solve some constraints.
--
-- This function will be invoked at two points in the constraint solving
-- process: once to simplify Given constraints, and once to solve Wanted
-- constraints. In the first case (and only in the first case), no Wanted
-- constraints will be passed to the plugin.
--
-- The plugin can either return a contradiction, or specify that it has
-- solved some constraints (with evidence), and possibly emit additional
-- constraints. These returned constraints must be Givens in the first
-- case, and Wanteds in the second.
--
-- Use \ _ _ _ _ _ -> pure $ TcPluginOK [] [] if your
-- plugin does not provide this functionality.
[tcPluginSolve] :: TcPlugin -> s -> TcPluginSolver
-- | Rewrite saturated type family applications.
--
-- The plugin is expected to supply a mapping from type family names to
-- rewriting functions. For each type family TyCon, the plugin
-- should provide a function which takes in the given constraints and
-- arguments of a saturated type family application, and return a
-- possible rewriting. See TcPluginRewriter for the expected shape
-- of such a function.
--
-- Use \ _ -> emptyUFM if your plugin does not provide this
-- functionality.
[tcPluginRewrite] :: TcPlugin -> s -> UniqFM TyCon TcPluginRewriter
-- | Clean up after the plugin, when exiting the type-checker.
[tcPluginStop] :: TcPlugin -> s -> TcPluginM ()
-- | TcPluginM is the monad in which type-checking plugins operate.
data () => TcPluginM a
-- | For rewriting type family applications, a type-checking plugin
-- provides a function of this type for each type family TyCon.
--
-- The function is provided with the current set of Given constraints,
-- together with the arguments to the type family. The type family
-- application will always be fully saturated.
type TcPluginRewriter = RewriteEnv -> [Ct] -> [TcType] -> TcPluginM TcPluginRewriteResult
-- | The solve function of a type-checking plugin takes in Given
-- and Wanted constraints, and should return a TcPluginSolveResult
-- indicating which Wanted constraints it could solve, or whether any are
-- insoluble.
type TcPluginSolver = EvBindsVar -> [Ct] -> [Ct] -> TcPluginM TcPluginSolveResult
data () => TcPatSynInfo
TPSI :: Name -> [InvisTVBinder] -> [InvisTVBinder] -> TcThetaType -> [InvisTVBinder] -> TcThetaType -> TcSigmaType -> TcPatSynInfo
[patsig_name] :: TcPatSynInfo -> Name
[patsig_implicit_bndrs] :: TcPatSynInfo -> [InvisTVBinder]
[patsig_univ_bndrs] :: TcPatSynInfo -> [InvisTVBinder]
[patsig_req] :: TcPatSynInfo -> TcThetaType
[patsig_ex_bndrs] :: TcPatSynInfo -> [InvisTVBinder]
[patsig_prov] :: TcPatSynInfo -> TcThetaType
[patsig_body_ty] :: TcPatSynInfo -> TcSigmaType
data () => TcIdSigInst
TISI :: TcIdSigInfo -> [(Name, InvisTVBinder)] -> TcThetaType -> TcSigmaType -> [(Name, TcTyVar)] -> Maybe TcType -> TcIdSigInst
[sig_inst_sig] :: TcIdSigInst -> TcIdSigInfo
[sig_inst_skols] :: TcIdSigInst -> [(Name, InvisTVBinder)]
[sig_inst_theta] :: TcIdSigInst -> TcThetaType
[sig_inst_tau] :: TcIdSigInst -> TcSigmaType
[sig_inst_wcs] :: TcIdSigInst -> [(Name, TcTyVar)]
[sig_inst_wcx] :: TcIdSigInst -> Maybe TcType
data () => TcSigInfo
TcIdSig :: TcIdSigInfo -> TcSigInfo
TcPatSynSig :: TcPatSynInfo -> TcSigInfo
type TcSigFun = Name -> Maybe TcSigInfo
data () => WhereFrom
ImportByUser :: IsBootInterface -> WhereFrom
ImportBySystem :: WhereFrom
ImportByPlugin :: WhereFrom
type ClosedTypeId = Bool
type RhsNames = NameSet
-- | IsGroupClosed describes a group of mutually-recursive bindings
data () => IsGroupClosed
IsGroupClosed :: NameEnv RhsNames -> ClosedTypeId -> IsGroupClosed
-- | IdBindingInfo describes how an Id is bound.
--
-- It is used for the following purposes: a) for static forms in
-- checkClosedInStaticForm and b) to figure out when a nested
-- binding can be generalised, in decideGeneralisationPlan.
data () => IdBindingInfo
NotLetBound :: IdBindingInfo
ClosedLet :: IdBindingInfo
NonClosedLet :: RhsNames -> ClosedTypeId -> IdBindingInfo
data () => ArrowCtxt
NoArrowCtxt :: ArrowCtxt
ArrowCtxt :: LocalRdrEnv -> TcRef WantedConstraints -> ArrowCtxt
type ThLevel = Int
data () => PendingStuff
RnPendingUntyped :: TcRef [PendingRnSplice] -> PendingStuff
RnPendingTyped :: PendingStuff
TcPending :: TcRef [PendingTcSplice] -> TcRef WantedConstraints -> QuoteWrapper -> PendingStuff
data () => ThStage
Splice :: SpliceType -> ThStage
RunSplice :: TcRef [ForeignRef (Q ())] -> ThStage
Comp :: ThStage
Brack :: ThStage -> PendingStuff -> ThStage
data () => SpliceType
Typed :: SpliceType
Untyped :: SpliceType
data () => TcBinder
TcIdBndr :: TcId -> TopLevelFlag -> TcBinder
TcIdBndr_ExpType :: Name -> ExpType -> TopLevelFlag -> TcBinder
TcTvBndr :: Name -> TyVar -> TcBinder
type TcBinderStack = [TcBinder]
type TcIdSet = IdSet
type TcId = Id
-- | Type alias for IORef; the convention is we'll use this for
-- mutable bits of data in TcGblEnv which are updated during
-- typechecking and returned at the end.
type TcRef a = IORef a
type ThBindEnv = NameEnv (TopLevelFlag, ThLevel)
type TcTypeEnv = NameEnv TcTyThing
type ErrCtxt = (Bool, TidyEnv -> TcM (TidyEnv, SDoc))
type RecFieldEnv = NameEnv [FieldLabel]
-- | FrontendResult describes the result of running the frontend of
-- a Haskell module. Currently one always gets a
-- FrontendTypecheck, since running the frontend involves
-- typechecking a program. hs-sig merges are not handled here.
--
-- This data type really should be in GHC.Driver.Env, but it needs to
-- have a TcGblEnv which is only defined here.
data () => FrontendResult
FrontendTypecheck :: TcGblEnv -> FrontendResult
data () => IfLclEnv
IfLclEnv :: !Module -> IsBootInterface -> SDoc -> Maybe NameShape -> Maybe TypeEnv -> FastStringEnv TyVar -> FastStringEnv Id -> IfLclEnv
[if_mod] :: IfLclEnv -> !Module
[if_boot] :: IfLclEnv -> IsBootInterface
[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 () => IfGblEnv
IfGblEnv :: SDoc -> KnotVars (IfG TypeEnv) -> IfGblEnv
[if_doc] :: IfGblEnv -> SDoc
[if_rec_types] :: IfGblEnv -> KnotVars (IfG TypeEnv)
-- | A RewriteEnv carries the necessary context for performing
-- rewrites (i.e. type family reductions and following filled-in
-- metavariables) in the solver.
data () => RewriteEnv
RE :: !CtLoc -> !CtFlavour -> !EqRel -> !TcRef RewriterSet -> RewriteEnv
-- | In which context are we rewriting?
--
-- Type-checking plugins might want to use this location information when
-- emitting new Wanted constraints when rewriting type family
-- applications. This ensures that such Wanted constraints will, when
-- unsolved, give rise to error messages with the correct source
-- location.
[re_loc] :: RewriteEnv -> !CtLoc
[re_flavour] :: RewriteEnv -> !CtFlavour
-- | At what role are we rewriting?
--
-- See Note [Rewriter EqRels] in GHC.Tc.Solver.Rewrite
[re_eq_rel] :: RewriteEnv -> !EqRel
-- | See Note [Wanteds rewrite Wanteds]
[re_rewriters] :: RewriteEnv -> !TcRef RewriterSet
data () => Env gbl lcl
Env :: !HscEnv -> {-# UNPACK #-} !Char -> gbl -> lcl -> Env gbl lcl
[env_top] :: Env gbl lcl -> !HscEnv
[env_um] :: Env gbl lcl -> {-# UNPACK #-} !Char
[env_gbl] :: Env gbl lcl -> gbl
[env_lcl] :: Env gbl lcl -> lcl
-- | Historical "type-checking monad" (now it's just TcRn).
type TcM = TcRn
-- | Historical "renaming monad" (now it's just TcRn).
type RnM = TcRn
type IfL = IfM IfLclEnv
type IfG = IfM ()
type IfM lcl = TcRnIf IfGblEnv lcl
type TcRn = TcRnIf TcGblEnv TcLclEnv
type TcRnIf a b = IOEnv Env a b
-- | A NameShape is a substitution on Names that can be used
-- to refine the identities of a hole while we are renaming interfaces
-- (see GHC.Iface.Rename). 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 intriguing 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
-- | 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
type FrontendPluginAction = [String] -> [(String, Maybe Phase)] -> Ghc ()
type CorePlugin = [CommandLineOption] -> [CoreToDo] -> CoreM [CoreToDo]
data () => PluginRecompile
ForceRecompile :: PluginRecompile
NoForceRecompile :: PluginRecompile
MaybeRecompile :: Fingerprint -> PluginRecompile
-- | External plugin loaded directly from a library without loading module
-- interfaces
data () => ExternalPlugin
ExternalPlugin :: PluginWithArgs -> String -> String -> ExternalPlugin
-- | Plugin with its arguments
[epPlugin] :: ExternalPlugin -> PluginWithArgs
-- | UnitId
[epUnit] :: ExternalPlugin -> String
-- | Module name
[epModule] :: ExternalPlugin -> String
data () => PluginWithArgs
PluginWithArgs :: Plugin -> [CommandLineOption] -> PluginWithArgs
-- | the actual callable plugin
[paPlugin] :: PluginWithArgs -> Plugin
-- | command line arguments for the plugin
[paArguments] :: PluginWithArgs -> [CommandLineOption]
-- | Result of running the parser and the parser plugin
data () => ParsedResult
ParsedResult :: HsParsedModule -> PsMessages -> ParsedResult
-- | Parsed module, potentially modified by a plugin
[parsedResultModule] :: ParsedResult -> HsParsedModule
-- | Warnings and errors from parser, potentially modified by a plugin
[parsedResultMessages] :: ParsedResult -> PsMessages
-- | Errors and warnings produced by the parser
data () => PsMessages
PsMessages :: Messages PsWarning -> Messages PsError -> PsMessages
[psWarnings] :: PsMessages -> Messages PsWarning
[psErrors] :: PsMessages -> Messages PsError
-- | Command line options gathered from the -PModule.Name:stuff syntax are
-- given to you as this type
type CommandLineOption = String
data () => IsExtraConstraint
YesExtraConstraint :: IsExtraConstraint
NoExtraConstraint :: IsExtraConstraint
pattern ManyTy :: Mult
pattern OneTy :: Mult
-- | An infix synonym for fmap.
--
-- The name of this operator is an allusion to $. Note the
-- similarities between their types:
--
--
-- ($) :: (a -> b) -> a -> b
-- (<$>) :: Functor f => (a -> b) -> f a -> f b
--
--
-- Whereas $ is function application, <$> is function
-- application lifted over a Functor.
--
-- Examples
--
-- Convert from a Maybe Int to a Maybe
-- String using show:
--
--
-- >>> 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 <$>
getEnv :: IOEnv env env
-- | Perform a computation with a different environment
setEnv :: env' -> IOEnv env' a -> IOEnv env a
-- | Gives the filename of the RealSrcLoc
srcLocFile :: RealSrcLoc -> FastString
appPrec :: PprPrec
-- | A representation of infinity
infinity :: IntWithInf
parens :: IsLine doc => doc -> doc
-- | Right-to-left monadic fold over the elements of a structure.
--
-- Given a structure t with elements (a, b, c, ..., x,
-- y), the result of a fold with an operator function f is
-- equivalent to:
--
--
-- foldrM f z t = do
-- yy <- f y z
-- xx <- f x yy
-- ...
-- bb <- f b cc
-- aa <- f a bb
-- return aa -- Just @return z@ when the structure is empty
--
--
-- For a Monad m, given two functions f1 :: a -> m b
-- and f2 :: b -> m c, their Kleisli composition (f1
-- >=> f2) :: a -> m c is defined by:
--
--
-- (f1 >=> f2) a = f1 a >>= f2
--
--
-- Another way of thinking about foldrM is that it amounts to an
-- application to z of a Kleisli composition:
--
--
-- foldrM f z t = f y >=> f x >=> ... >=> f b >=> f a $ z
--
--
-- The monadic effects of foldrM are sequenced from right to
-- left, and e.g. folds of infinite lists will diverge.
--
-- If at some step the bind operator (>>=)
-- short-circuits (as with, e.g., mzero in a MonadPlus),
-- the evaluated effects will be from a tail of the element sequence. If
-- you want to evaluate the monadic effects in left-to-right order, or
-- perhaps be able to short-circuit after an initial sequence of
-- elements, you'll need to use foldlM instead.
--
-- If the monadic effects don't short-circuit, the outermost application
-- of f is to the leftmost element a, so that, ignoring
-- effects, the result looks like a right fold:
--
--
-- a `f` (b `f` (c `f` (... (x `f` (y `f` z))))).
--
--
-- Examples
--
-- Basic usage:
--
--
-- >>> let f i acc = do { print i ; return $ i : acc }
--
-- >>> foldrM f [] [0..3]
-- 3
-- 2
-- 1
-- 0
-- [0,1,2,3]
--
foldrM :: (Foldable t, Monad m) => (a -> b -> m b) -> b -> t a -> m b
-- | Left-to-right monadic fold over the elements of a structure.
--
-- Given a structure t with elements (a, b, ..., w, x,
-- y), the result of a fold with an operator function f is
-- equivalent to:
--
--
-- foldlM f z t = do
-- aa <- f z a
-- bb <- f aa b
-- ...
-- xx <- f ww x
-- yy <- f xx y
-- return yy -- Just @return z@ when the structure is empty
--
--
-- For a Monad m, given two functions f1 :: a -> m b
-- and f2 :: b -> m c, their Kleisli composition (f1
-- >=> f2) :: a -> m c is defined by:
--
--
-- (f1 >=> f2) a = f1 a >>= f2
--
--
-- Another way of thinking about foldlM is that it amounts to an
-- application to z of a Kleisli composition:
--
--
-- foldlM f z t =
-- flip f a >=> flip f b >=> ... >=> flip f x >=> flip f y $ z
--
--
-- The monadic effects of foldlM are sequenced from left to
-- right.
--
-- If at some step the bind operator (>>=)
-- short-circuits (as with, e.g., mzero in a MonadPlus),
-- the evaluated effects will be from an initial segment of the element
-- sequence. If you want to evaluate the monadic effects in right-to-left
-- order, or perhaps be able to short-circuit after processing a tail of
-- the sequence of elements, you'll need to use foldrM instead.
--
-- If the monadic effects don't short-circuit, the outermost application
-- of f is to the rightmost element y, so that,
-- ignoring effects, the result looks like a left fold:
--
--
-- ((((z `f` a) `f` b) ... `f` w) `f` x) `f` y
--
--
-- Examples
--
-- Basic usage:
--
--
-- >>> let f a e = do { print e ; return $ e : a }
--
-- >>> foldlM f [] [0..3]
-- 0
-- 1
-- 2
-- 3
-- [3,2,1,0]
--
foldlM :: (Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m b
-- | Extract the function result type and panic if that is not possible
funResultTy :: HasDebugCallStack => Type -> Type
mkFunTy :: HasDebugCallStack => FunTyFlag -> Mult -> Type -> Type -> Type
infixr 3 `mkFunTy`
-- | 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])
-- | 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])
newUnique :: TcRnIf gbl lcl Unique
-- | See Type#type_classification for what an algebraic type is.
-- Should only be applied to types, as opposed to e.g. partially
-- saturated type constructors
isAlgType :: Type -> Bool
isEmpty :: SDocContext -> SDoc -> Bool
(<.>) :: HsWrapper -> HsWrapper -> HsWrapper
-- | (mkTyConTy tc) returns (TyConApp tc []) but arranges to share that
-- TyConApp among all calls See Note [Sharing nullary TyConApps] So it's
-- just an alias for tyConNullaryTy!
mkTyConTy :: TyCon -> Type
-- | Construct an expression which represents the application of a number
-- of expressions to another. The leftmost expression in the list is
-- applied first
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
-- | Create a CoreExpr which will evaluate to the given Int
mkIntExpr :: Platform -> Integer -> CoreExpr
-- | Create a CoreExpr which will evaluate to a Word with
-- the given value
mkWordExpr :: Platform -> Integer -> CoreExpr
-- | Create a CoreExpr which will evaluate to the given
-- Char
mkCharExpr :: Char -> 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
-- Float
mkFloatExpr :: Float -> CoreExpr
-- | Create a CoreExpr which will evaluate to the given
-- Double
mkDoubleExpr :: Double -> 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 list of binding groups over an expression. The leftmost binding
-- group becomes the outermost group in the resulting expression
mkCoreLets :: [CoreBind] -> CoreExpr -> CoreExpr
-- | Bind a binding group over an expression, using a let or
-- case as appropriate (see
-- GHC.Core#let_can_float_invariant)
mkCoreLet :: CoreBind -> CoreExpr -> CoreExpr
-- | Tries to compute the PromDataConInfo of the given type. Returns
-- either a definite PromDataConInfo, or Nothing if we
-- aren't sure (e.g. the type is representation-polymorphic).
--
-- Panics if the kind does not have the shape TYPE r.
typeLevity_maybe :: HasDebugCallStack => Type -> Maybe Levity
-- | 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
-- | Gives the Modified UTF-8 encoded bytes corresponding to a
-- FastString
bytesFS :: FastString -> ByteString
-- | Gives the Modified UTF-8 encoded bytes corresponding to a
-- FastString
fastStringToByteString :: FastString -> ByteString
fastStringToShortByteString :: FastString -> ShortByteString
fastZStringToByteString :: FastZString -> ByteString
unsafeMkByteString :: String -> ByteString
hPutFZS :: Handle -> FastZString -> IO ()
zString :: FastZString -> String
-- | zStringTakeN n = take n . zString but is
-- performed in <math> rather than <math>, where <math>
-- is the length of the FastZString.
zStringTakeN :: Int -> FastZString -> String
lengthFZS :: FastZString -> Int
-- | Compare FastString lexically
--
-- If you don't care about the lexical ordering, use uniqCompareFS
-- instead.
lexicalCompareFS :: FastString -> FastString -> Ordering
-- | Compare FastString by their Unique (not lexically).
--
-- Much cheaper than lexicalCompareFS but non-deterministic!
uniqCompareFS :: FastString -> FastString -> Ordering
mkFastString# :: Addr# -> FastString
mkFastStringBytes :: Ptr Word8 -> Int -> FastString
-- | Create a FastString by copying an existing ByteString
mkFastStringByteString :: ByteString -> FastString
-- | Create a FastString from an existing ShortByteString
-- without copying.
mkFastStringShortByteString :: ShortByteString -> FastString
-- | Creates a UTF-8 encoded FastString from a String
mkFastString :: String -> FastString
-- | Creates a FastString from a UTF-8 encoded [Word8]
mkFastStringByteList :: [Word8] -> FastString
-- | Returns the length of the FastString in characters
lengthFS :: FastString -> Int
-- | Returns True if the FastString is empty
nullFS :: FastString -> Bool
-- | Lazily unpacks and decodes the FastString
unpackFS :: FastString -> String
-- | 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
appendFS :: FastString -> FastString -> FastString
concatFS :: [FastString] -> FastString
consFS :: Char -> FastString -> FastString
unconsFS :: FastString -> Maybe (Char, FastString)
uniqueOfFS :: FastString -> Int
nilFS :: FastString
getFastStringTable :: IO [[[FastString]]]
getFastStringZEncCounter :: IO Int
-- | 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 ()
-- | Wrap an unboxed address into a PtrString.
mkPtrString# :: Addr# -> PtrString
-- | Decode a PtrString back into a String using Latin-1
-- encoding. This does not free the memory associated with
-- PtrString.
unpackPtrString :: PtrString -> String
-- | unpackPtrStringTakeN n = take n .
-- unpackPtrString but is performed in <math> rather
-- than <math>, where <math> is the length of the
-- PtrString.
unpackPtrStringTakeN :: Int -> PtrString -> String
-- | Return the length of a PtrString
lengthPS :: PtrString -> Int
fsLit :: String -> FastString
ptext :: PtrString -> SDoc
semi :: IsLine doc => doc
comma :: IsLine doc => doc
colon :: IsLine doc => doc
space :: IsLine doc => doc
equals :: IsLine doc => doc
lparen :: IsLine doc => doc
rparen :: IsLine doc => doc
lbrack :: IsLine doc => doc
rbrack :: IsLine doc => doc
lbrace :: IsLine doc => doc
rbrace :: IsLine doc => doc
int :: IsLine doc => Int -> doc
integer :: IsLine doc => Integer -> doc
float :: IsLine doc => Float -> doc
double :: IsLine doc => Double -> doc
rational :: Rational -> SDoc
quotes :: SDoc -> SDoc
quote :: SDoc -> SDoc
doubleQuotes :: IsLine doc => doc -> doc
brackets :: IsLine doc => doc -> doc
braces :: IsLine doc => doc -> doc
-- | Indent SDoc some specified amount
nest :: Int -> SDoc -> SDoc
hang :: SDoc -> Int -> SDoc -> SDoc
-- | This behaves like hang, but does not indent the second document
-- when the header is empty.
hangNotEmpty :: SDoc -> Int -> SDoc -> SDoc
punctuate :: IsLine doc => doc -> [doc] -> [doc]
-- | Join two SDoc together vertically
($+$) :: SDoc -> 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.
cat :: [SDoc] -> SDoc
-- | This behaves like fsep, but it uses <> for
-- horizontal composition rather than <+>
fcat :: [SDoc] -> SDoc
isBoxed :: Boxity -> Bool
-- | Used when constructing a term with an unused extension point.
noExtField :: NoExtField
-- | Eliminate a DataConCantHappen. See Note [Constructor cannot
-- occur].
dataConCantHappen :: DataConCantHappen -> a
-- | Compares module names lexically, rather than by their Uniques
stableModuleNameCmp :: ModuleName -> ModuleName -> Ordering
moduleNameFS :: ModuleName -> FastString
moduleNameString :: ModuleName -> String
mkModuleName :: String -> ModuleName
mkModuleNameFS :: FastString -> ModuleName
-- | Returns the string version of the module name, with dots replaced by
-- slashes.
moduleNameSlashes :: ModuleName -> String
-- | Returns the string version of the module name, with dots replaced by
-- colons.
moduleNameColons :: ModuleName -> String
parseModuleName :: ReadP ModuleName
-- | Use this when you can't specify a helpful origin for some skolem type
-- variable.
--
-- We're hoping to be able to get rid of this entirely, but for the
-- moment it's still needed.
unkSkol :: HasCallStack => SkolemInfo
mkVarOccFS :: FastString -> OccName
mkRecFldSelOcc :: FastString -> OccName
isListEmptyOrSingleton :: [a] -> IsEmptyOrSingleton
reallyAlwaysQualifyNames :: QueryQualifyName
-- | NB: This won't ever show package IDs
alwaysQualifyNames :: QueryQualifyName
neverQualifyNames :: QueryQualifyName
alwaysQualifyModules :: QueryQualifyModule
neverQualifyModules :: QueryQualifyModule
alwaysQualifyPackages :: QueryQualifyPackage
neverQualifyPackages :: QueryQualifyPackage
alwaysPrintPromTick :: QueryPromotionTick
reallyAlwaysQualify :: NamePprCtx
alwaysQualify :: NamePprCtx
neverQualify :: NamePprCtx
defaultUserStyle :: PprStyle
defaultDumpStyle :: PprStyle
mkDumpStyle :: NamePprCtx -> PprStyle
-- | Default style for error messages, when we don't know NamePprCtx It's a
-- bit of a hack because it doesn't take into account what's in scope
-- Only used for desugarer warnings, and typechecker errors in interface
-- sigs
defaultErrStyle :: PprStyle
-- | Style for printing error messages
mkErrStyle :: NamePprCtx -> PprStyle
cmdlineParserStyle :: PprStyle
mkUserStyle :: NamePprCtx -> Depth -> PprStyle
withUserStyle :: NamePprCtx -> Depth -> SDoc -> SDoc
withErrStyle :: NamePprCtx -> SDoc -> SDoc
setStyleColoured :: Bool -> PprStyle -> PprStyle
runSDoc :: SDoc -> SDocContext -> Doc
-- | Default pretty-printing options
defaultSDocContext :: SDocContext
traceSDocContext :: SDocContext
withPprStyle :: PprStyle -> SDoc -> SDoc
pprDeeper :: SDoc -> SDoc
-- | Truncate a list that is longer than the current depth.
pprDeeperList :: ([SDoc] -> SDoc) -> [SDoc] -> SDoc
pprSetDepth :: Depth -> SDoc -> SDoc
getPprStyle :: (PprStyle -> SDoc) -> SDoc
sdocWithContext :: (SDocContext -> SDoc) -> SDoc
sdocOption :: (SDocContext -> a) -> (a -> SDoc) -> SDoc
updSDocContext :: (SDocContext -> SDocContext) -> SDoc -> SDoc
qualName :: PprStyle -> QueryQualifyName
qualModule :: PprStyle -> QueryQualifyModule
qualPackage :: PprStyle -> QueryQualifyPackage
promTick :: PprStyle -> QueryPromotionTick
queryQual :: PprStyle -> NamePprCtx
codeStyle :: PprStyle -> Bool
dumpStyle :: PprStyle -> Bool
userStyle :: PprStyle -> Bool
-- | Indicate if -dppr-debug mode is enabled
getPprDebug :: IsOutput doc => (Bool -> doc) -> doc
-- | Says what to do with and without -dppr-debug
ifPprDebug :: IsOutput doc => doc -> doc -> doc
-- | Says what to do with -dppr-debug; without, return empty
whenPprDebug :: IsOutput doc => doc -> doc
-- | 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 :: SDocContext -> Mode -> Handle -> SDoc -> IO ()
-- | Like printSDoc but appends an extra newline.
printSDocLn :: SDocContext -> Mode -> Handle -> SDoc -> IO ()
-- | An efficient variant of printSDoc specialized for
-- LeftMode that outputs to a BufHandle.
bufLeftRenderSDoc :: SDocContext -> BufHandle -> SDoc -> IO ()
pprCode :: SDoc -> SDoc
renderWithContext :: SDocContext -> SDoc -> String
showSDocOneLine :: SDocContext -> SDoc -> String
showSDocUnsafe :: SDoc -> String
showPprUnsafe :: Outputable a => a -> String
pprDebugAndThen :: SDocContext -> (String -> a) -> SDoc -> SDoc -> a
docToSDoc :: Doc -> SDoc
word :: Integer -> SDoc
-- | doublePrec p n shows a floating point number n with
-- p digits of precision after the decimal point.
doublePrec :: Int -> Double -> SDoc
angleBrackets :: IsLine doc => doc -> doc
cparen :: Bool -> SDoc -> SDoc
blankLine :: SDoc
dcolon :: SDoc
arrow :: SDoc
lollipop :: SDoc
larrow :: SDoc
darrow :: SDoc
arrowt :: SDoc
larrowt :: SDoc
arrowtt :: SDoc
larrowtt :: SDoc
lambda :: SDoc
underscore :: IsLine doc => doc
dot :: IsLine doc => doc
vbar :: IsLine doc => doc
forAllLit :: SDoc
bullet :: SDoc
unicodeSyntax :: SDoc -> SDoc -> SDoc
ppWhen :: IsOutput doc => Bool -> doc -> doc
ppUnless :: IsOutput doc => Bool -> doc -> doc
ppWhenOption :: (SDocContext -> Bool) -> SDoc -> SDoc
ppUnlessOption :: IsLine doc => (SDocContext -> Bool) -> doc -> doc
-- | Apply the given colour/style for the argument.
--
-- Only takes effect if colours are enabled.
coloured :: PprColour -> SDoc -> SDoc
keyword :: SDoc -> SDoc
pprModuleName :: IsLine doc => ModuleName -> doc
-- | Special combinator for showing character literals.
pprHsChar :: Char -> SDoc
-- | Special combinator for showing string literals.
pprHsString :: FastString -> SDoc
-- | Special combinator for showing bytestring literals.
pprHsBytes :: ByteString -> SDoc
primCharSuffix :: SDoc
primFloatSuffix :: SDoc
primIntSuffix :: SDoc
primDoubleSuffix :: SDoc
primWordSuffix :: SDoc
primInt8Suffix :: SDoc
primWord8Suffix :: SDoc
primInt16Suffix :: SDoc
primWord16Suffix :: SDoc
primInt32Suffix :: SDoc
primWord32Suffix :: SDoc
primInt64Suffix :: SDoc
primWord64Suffix :: SDoc
-- | Special combinator for showing unboxed literals.
pprPrimChar :: Char -> SDoc
pprPrimInt :: Integer -> SDoc
pprPrimWord :: Integer -> SDoc
pprPrimInt8 :: Integer -> SDoc
pprPrimInt16 :: Integer -> SDoc
pprPrimInt32 :: Integer -> SDoc
pprPrimInt64 :: Integer -> SDoc
pprPrimWord8 :: Integer -> SDoc
pprPrimWord16 :: Integer -> SDoc
pprPrimWord32 :: Integer -> SDoc
pprPrimWord64 :: Integer -> SDoc
pprPrefixVar :: Bool -> SDoc -> SDoc
pprInfixVar :: Bool -> SDoc -> SDoc
pprFastFilePath :: FastString -> SDoc
-- | Normalise, escape and render a string representing a path
--
-- e.g. "c:\whatever"
pprFilePathString :: IsLine doc => FilePath -> doc
pprWithCommas :: (a -> SDoc) -> [a] -> SDoc
pprWithBars :: (a -> SDoc) -> [a] -> SDoc
spaceIfSingleQuote :: SDoc -> SDoc
-- | Returns the separated concatenation of the pretty printed things.
interppSP :: Outputable a => [a] -> SDoc
-- | Returns the comma-separated concatenation of the pretty printed
-- things.
interpp'SP :: Outputable a => [a] -> SDoc
interpp'SP' :: (a -> SDoc) -> [a] -> SDoc
-- | Returns the comma-separated concatenation of the quoted pretty printed
-- things.
--
--
-- [x,y,z] ==> `x', `y', `z'
--
pprQuotedList :: Outputable a => [a] -> SDoc
quotedListWithOr :: [SDoc] -> SDoc
quotedListWithNor :: [SDoc] -> SDoc
intWithCommas :: Integral a => a -> SDoc
-- | Converts an integer to a verbal index:
--
--
-- speakNth 1 = text "first"
-- speakNth 5 = text "fifth"
-- speakNth 21 = text "21st"
--
speakNth :: Int -> 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 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
-- | 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
-- | Determines the singular verb suffix appropriate for the length of a
-- list:
--
--
-- singular [] = empty
-- singular["Hello"] = char 's'
-- singular ["Hello", "World"] = empty
--
singular :: [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 form of to do appropriate for the length of a list:
--
--
-- doOrDoes [] = text "do"
-- doOrDoes ["Hello"] = text "does"
-- doOrDoes ["Hello", "World"] = text "do"
--
doOrDoes :: [a] -> SDoc
-- | Determines the form of possessive appropriate for the length of a
-- list:
--
--
-- itsOrTheir [x] = text "its"
-- itsOrTheir [x,y] = text "their"
-- itsOrTheir [] = text "their" -- probably avoid this
--
itsOrTheir :: [a] -> SDoc
-- | Determines the form of subject appropriate for the length of a list:
--
--
-- thisOrThese [x] = text "This"
-- thisOrThese [x,y] = text "These"
-- thisOrThese [] = text "These" -- probably avoid this
--
thisOrThese :: [a] -> SDoc
-- | "has" or "have" depending on the length of a list.
hasOrHave :: [a] -> SDoc
bPutHDoc :: BufHandle -> SDocContext -> HDoc -> IO ()
emptyPlugins :: Plugins
hasKey :: Uniquable a => a -> Unique -> Bool
tidyNameOcc :: Name -> OccName -> Name
nameOccName :: Name -> OccName
setNameUnique :: Name -> Unique -> Name
nameUnique :: Name -> Unique
-- | Is this type variable a concrete type variable, i.e. it is a
-- metavariable with ConcreteTv MetaInfo?
isConcreteTyVar :: TcTyVar -> Bool
isTyConableTyVar :: TcTyVar -> Bool
isMetaTyVar :: TcTyVar -> Bool
vanillaSkolemTvUnk :: HasCallStack => TcTyVarDetails
pprTcTyVarDetails :: TcTyVarDetails -> SDoc
idName :: Id -> Name
-- | Make a Name for the Typeable representation of the
-- given wired-in type
mkPrelTyConRepName :: Name -> TyConRepName
tyConRepName_maybe :: TyCon -> Maybe TyConRepName
-- | Is this the TyCon for an unboxed tuple?
isUnboxedTupleTyCon :: TyCon -> Bool
-- | Does this TyCon represent a tuple?
--
-- NB: when compiling Data.Tuple, the tycons won't reply
-- True to isTupleTyCon, because they are built as
-- AlgTyCons. However they get spat into the interface file as
-- tuple tycons, so I don't think it matters.
isTupleTyCon :: TyCon -> Bool
mkNakedFunTy :: FunTyFlag -> Kind -> Kind -> Kind
-- | mkNakedTyConTy creates a nullary TyConApp. In general
-- you should rather use mkTyConTy, which picks the shared nullary
-- TyConApp from inside the TyCon (via tyConNullaryTy. But we have to
-- build the TyConApp tc [] in that TyCon field; that's what
-- mkNakedTyConTy is for.
mkNakedTyConTy :: TyCon -> Type
-- | Like mkTyCoForAllTy, but does not check the occurrence of the
-- binder See Note [Unused coercion variable in ForAllTy]
mkForAllTy :: ForAllTyBinder -> Type -> Type
scaledThing :: Scaled a -> a
pprKind :: Kind -> SDoc
pprType :: Type -> SDoc
noFreeVarsOfType :: Type -> Bool
zipWith3M :: Monad m => (a -> b -> c -> m d) -> [a] -> [b] -> [c] -> m [d]
zipWith3M_ :: Monad m => (a -> b -> c -> m d) -> [a] -> [b] -> [c] -> m ()
zipWith4M :: Monad m => (a -> b -> c -> d -> m e) -> [a] -> [b] -> [c] -> [d] -> m [e]
zipWithAndUnzipM :: Monad m => (a -> b -> m (c, d)) -> [a] -> [b] -> m ([c], [d])
-- | mapAndUnzipM for triples
mapAndUnzip3M :: Monad m => (a -> m (b, c, d)) -> [a] -> m ([b], [c], [d])
mapAndUnzip4M :: Monad m => (a -> m (b, c, d, e)) -> [a] -> m ([b], [c], [d], [e])
mapAndUnzip5M :: Monad m => (a -> m (b, c, d, e, f)) -> [a] -> m ([b], [c], [d], [e], [f])
-- | Monadic version of mapAccumL
mapAccumLM :: (Monad m, Traversable t) => (acc -> x -> m (acc, y)) -> acc -> t x -> m (acc, t y)
-- | Monadic version of mapSnd
mapSndM :: (Applicative m, Traversable f) => (b -> m c) -> f (a, b) -> m (f (a, c))
-- | Monadic version of concatMap
concatMapM :: (Monad m, Traversable f) => (a -> m [b]) -> f a -> m [b]
-- | Applicative version of mapMaybe
mapMaybeM :: Applicative m => (a -> m (Maybe b)) -> [a] -> m [b]
-- | Monadic version of any, aborts the computation at the first
-- True value
anyM :: (Monad m, Foldable f) => (a -> m Bool) -> f a -> m Bool
-- | Monad version of all, aborts the computation at the first
-- False value
allM :: (Monad m, Foldable f) => (a -> m Bool) -> f a -> m Bool
-- | Monadic version of or
orM :: Monad m => m Bool -> m Bool -> m Bool
-- | Monadic version of foldl that discards its result
foldlM_ :: (Monad m, Foldable t) => (a -> b -> m a) -> a -> t b -> m ()
-- | Monadic version of when, taking the condition in the monad
whenM :: Monad m => m Bool -> m () -> m ()
-- | Monadic version of unless, taking the condition in the monad
unlessM :: Monad m => m Bool -> m () -> m ()
-- | Like filterM, only it reverses the sense of the test.
filterOutM :: Applicative m => (a -> m Bool) -> [a] -> m [a]
-- | Monadic version of partition
partitionM :: Monad m => (a -> m Bool) -> [a] -> m ([a], [a])
mkSrcLoc :: FastString -> Int -> Int -> SrcLoc
mkRealSrcLoc :: FastString -> Int -> Int -> RealSrcLoc
-- | Indentation level is 1-indexed, so the leftmost column is 1.
leftmostColumn :: Int
getBufPos :: SrcLoc -> Maybe BufPos
-- | Built-in "bad" RealSrcLoc values for particular locations
noSrcLoc :: SrcLoc
-- | Built-in "bad" RealSrcLoc values for particular locations
generatedSrcLoc :: SrcLoc
-- | Built-in "bad" RealSrcLoc values for particular locations
interactiveSrcLoc :: SrcLoc
-- | Creates a "bad" RealSrcLoc that has no detailed information
-- about its location
mkGeneralSrcLoc :: FastString -> SrcLoc
-- | Raises an error when used on a "bad" RealSrcLoc
srcLocLine :: RealSrcLoc -> Int
-- | Raises an error when used on a "bad" RealSrcLoc
srcLocCol :: RealSrcLoc -> Int
-- | Move the RealSrcLoc down by one line if the character is a
-- newline, to the next 8-char tabstop if it is a tab, and across by one
-- character in any other case
advanceSrcLoc :: RealSrcLoc -> Char -> RealSrcLoc
advanceBufPos :: BufPos -> BufPos
sortLocated :: [Located a] -> [Located a]
sortRealLocated :: [RealLocated a] -> [RealLocated a]
lookupSrcLoc :: SrcLoc -> Map RealSrcLoc a -> Maybe a
lookupSrcSpan :: SrcSpan -> Map RealSrcSpan a -> Maybe a
removeBufSpan :: SrcSpan -> SrcSpan
getBufSpan :: SrcSpan -> Maybe BufSpan
-- | Built-in "bad" SrcSpans for common sources of location
-- uncertainty
noSrcSpan :: SrcSpan
-- | Built-in "bad" SrcSpans for common sources of location
-- uncertainty
wiredInSrcSpan :: SrcSpan
-- | Built-in "bad" SrcSpans for common sources of location
-- uncertainty
interactiveSrcSpan :: SrcSpan
-- | Built-in "bad" SrcSpans for common sources of location
-- uncertainty
generatedSrcSpan :: SrcSpan
isGeneratedSrcSpan :: SrcSpan -> Bool
isNoSrcSpan :: SrcSpan -> Bool
-- | Create a "bad" SrcSpan that has not location information
mkGeneralSrcSpan :: FastString -> SrcSpan
-- | Create a SrcSpan corresponding to a single point
srcLocSpan :: SrcLoc -> SrcSpan
realSrcLocSpan :: RealSrcLoc -> RealSrcSpan
-- | Create a SrcSpan between two points in a file
mkRealSrcSpan :: RealSrcLoc -> RealSrcLoc -> RealSrcSpan
-- | Create a SrcSpan between two points in a file
mkSrcSpan :: SrcLoc -> SrcLoc -> SrcSpan
-- | Combines two SrcSpan into one that spans at least all the
-- characters within both spans. Returns UnhelpfulSpan if the files
-- differ.
combineSrcSpans :: SrcSpan -> SrcSpan -> SrcSpan
-- | Combines two SrcSpan into one that spans at least all the
-- characters within both spans. Assumes the "file" part is the same in
-- both inputs
combineRealSrcSpans :: RealSrcSpan -> RealSrcSpan -> RealSrcSpan
combineBufSpans :: BufSpan -> BufSpan -> BufSpan
-- | Convert a SrcSpan into one that represents only its first character
srcSpanFirstCharacter :: SrcSpan -> SrcSpan
-- | Test if a SrcSpan is "good", i.e. has precise location
-- information
isGoodSrcSpan :: SrcSpan -> Bool
-- | True if the span is known to straddle only one line. For "bad"
-- SrcSpan, it returns False
isOneLineSpan :: SrcSpan -> Bool
-- | True if the span has a width of zero, as returned for "virtual"
-- semicolons in the lexer. For "bad" SrcSpan, it returns False
isZeroWidthSpan :: SrcSpan -> Bool
-- | Tests whether the first span "contains" the other span, meaning that
-- it covers at least as much source code. True where spans are equal.
containsSpan :: RealSrcSpan -> RealSrcSpan -> Bool
srcSpanStartLine :: RealSrcSpan -> Int
srcSpanEndLine :: RealSrcSpan -> Int
srcSpanStartCol :: RealSrcSpan -> Int
srcSpanEndCol :: RealSrcSpan -> Int
-- | Returns the location at the start of the SrcSpan or a "bad"
-- SrcSpan if that is unavailable
srcSpanStart :: SrcSpan -> SrcLoc
-- | Returns the location at the end of the SrcSpan or a "bad"
-- SrcSpan if that is unavailable
srcSpanEnd :: SrcSpan -> SrcLoc
realSrcSpanStart :: RealSrcSpan -> RealSrcLoc
realSrcSpanEnd :: RealSrcSpan -> RealSrcLoc
-- | Obtains the filename for a SrcSpan if it is "good"
srcSpanFileName_maybe :: SrcSpan -> Maybe FastString
srcSpanToRealSrcSpan :: SrcSpan -> Maybe RealSrcSpan
unhelpfulSpanFS :: UnhelpfulSpanReason -> FastString
pprUnhelpfulSpanReason :: UnhelpfulSpanReason -> SDoc
pprUserSpan :: Bool -> SrcSpan -> SDoc
pprUserRealSpan :: Bool -> RealSrcSpan -> SDoc
unLoc :: GenLocated l e -> e
getLoc :: GenLocated l e -> l
noLoc :: e -> Located e
mkGeneralLocated :: String -> e -> Located e
combineLocs :: Located a -> Located b -> SrcSpan
-- | Combine locations from two Located things and add them to a
-- third thing
addCLoc :: Located a -> Located b -> c -> Located c
-- | Tests whether the two located things are equal
eqLocated :: Eq a => GenLocated l a -> GenLocated l a -> Bool
-- | Tests the ordering of the two located things
cmpLocated :: Ord a => GenLocated l a -> GenLocated l a -> Ordering
-- | Compare the BufSpan of two located things.
--
-- Precondition: both operands have an associated BufSpan.
cmpBufSpan :: HasDebugCallStack => Located a -> Located a -> Ordering
pprLocated :: (Outputable l, Outputable e) => GenLocated l e -> SDoc
-- | Always prints the location, even without -dppr-debug
pprLocatedAlways :: (Outputable l, Outputable e) => GenLocated l e -> SDoc
-- | Strategies for ordering SrcSpans
rightmost_smallest :: SrcSpan -> SrcSpan -> Ordering
-- | Strategies for ordering SrcSpans
leftmost_smallest :: SrcSpan -> SrcSpan -> Ordering
-- | Strategies for ordering SrcSpans
leftmost_largest :: SrcSpan -> SrcSpan -> Ordering
-- | Determines whether a span encloses a given line and column index
spans :: SrcSpan -> (Int, Int) -> Bool
-- | Determines whether a span is enclosed by another one
isSubspanOf :: SrcSpan -> SrcSpan -> Bool
-- | Determines whether a span is enclosed by another one
isRealSubspanOf :: RealSrcSpan -> RealSrcSpan -> Bool
getRealSrcSpan :: RealLocated a -> RealSrcSpan
unRealSrcSpan :: RealLocated a -> a
psLocatedToLocated :: PsLocated a -> Located a
advancePsLoc :: PsLoc -> Char -> PsLoc
mkPsSpan :: PsLoc -> PsLoc -> PsSpan
psSpanStart :: PsSpan -> PsLoc
psSpanEnd :: PsSpan -> PsLoc
mkSrcSpanPs :: PsSpan -> SrcSpan
emptyFsEnv :: FastStringEnv a
extendFsEnv :: FastStringEnv a -> FastString -> a -> FastStringEnv a
lookupFsEnv :: FastStringEnv a -> FastString -> Maybe a
mkFsEnv :: [(FastString, a)] -> FastStringEnv a
emptyUniqSet :: UniqSet a
unitUniqSet :: Uniquable a => a -> UniqSet a
mkUniqSet :: Uniquable a => [a] -> UniqSet a
addOneToUniqSet :: Uniquable a => UniqSet a -> a -> UniqSet a
addListToUniqSet :: Uniquable a => UniqSet a -> [a] -> UniqSet a
delOneFromUniqSet :: Uniquable a => UniqSet a -> a -> UniqSet a
delOneFromUniqSet_Directly :: UniqSet a -> Unique -> UniqSet a
delListFromUniqSet :: Uniquable a => UniqSet a -> [a] -> UniqSet a
delListFromUniqSet_Directly :: UniqSet a -> [Unique] -> UniqSet a
unionUniqSets :: UniqSet a -> UniqSet a -> UniqSet a
unionManyUniqSets :: [UniqSet a] -> UniqSet a
minusUniqSet :: UniqSet a -> UniqSet a -> UniqSet a
intersectUniqSets :: UniqSet a -> UniqSet a -> UniqSet a
disjointUniqSets :: UniqSet a -> UniqSet a -> Bool
restrictUniqSetToUFM :: UniqSet key -> UniqFM key b -> UniqSet key
uniqSetMinusUFM :: UniqSet key -> UniqFM key b -> UniqSet key
uniqSetMinusUDFM :: UniqSet key -> UniqDFM key b -> UniqSet key
elementOfUniqSet :: Uniquable a => a -> UniqSet a -> Bool
elemUniqSet_Directly :: Unique -> UniqSet a -> Bool
filterUniqSet :: (a -> Bool) -> UniqSet a -> UniqSet a
filterUniqSet_Directly :: (Unique -> elt -> Bool) -> UniqSet elt -> UniqSet elt
partitionUniqSet :: (a -> Bool) -> UniqSet a -> (UniqSet a, UniqSet a)
uniqSetAny :: (a -> Bool) -> UniqSet a -> Bool
uniqSetAll :: (a -> Bool) -> UniqSet a -> Bool
sizeUniqSet :: UniqSet a -> Int
isEmptyUniqSet :: UniqSet a -> Bool
-- | What's the point you might ask? We might have changed an object
-- without it's key changing. In which case this lookup makes sense.
lookupUniqSet :: Uniquable key => UniqSet key -> key -> Maybe key
lookupUniqSet_Directly :: UniqSet a -> Unique -> Maybe a
nonDetEltsUniqSet :: UniqSet elt -> [elt]
nonDetKeysUniqSet :: UniqSet elt -> [Unique]
nonDetStrictFoldUniqSet :: (elt -> a -> a) -> a -> UniqSet elt -> a
mapUniqSet :: Uniquable b => (a -> b) -> UniqSet a -> UniqSet b
getUniqSet :: UniqSet a -> UniqFM a a
-- | unsafeUFMToUniqSet converts a UniqFM a into a
-- UniqSet a assuming, without checking, that it maps
-- each Unique to a value that has that Unique. See Note
-- [UniqSet invariant].
unsafeUFMToUniqSet :: UniqFM a a -> UniqSet a
pprUniqSet :: (a -> SDoc) -> UniqSet a -> SDoc
emptyBag :: Bag a
unitBag :: a -> Bag a
lengthBag :: Bag a -> Int
elemBag :: Eq a => a -> Bag a -> Bool
unionManyBags :: [Bag a] -> Bag a
unionBags :: Bag a -> Bag a -> Bag a
consBag :: a -> Bag a -> Bag a
infixr 3 `consBag`
snocBag :: Bag a -> a -> Bag a
infixl 3 `snocBag`
isEmptyBag :: Bag a -> Bool
isSingletonBag :: Bag a -> Bool
filterBag :: (a -> Bool) -> Bag a -> Bag a
filterBagM :: Monad m => (a -> m Bool) -> Bag a -> m (Bag a)
allBag :: (a -> Bool) -> Bag a -> Bool
anyBag :: (a -> Bool) -> Bag a -> Bool
anyBagM :: Monad m => (a -> m Bool) -> Bag a -> m Bool
concatBag :: Bag (Bag a) -> Bag a
catBagMaybes :: Bag (Maybe a) -> Bag a
partitionBag :: (a -> Bool) -> Bag a -> (Bag a, Bag a)
partitionBagWith :: (a -> Either b c) -> Bag a -> (Bag b, Bag c)
foldBag :: (r -> r -> r) -> (a -> r) -> r -> Bag a -> r
mapBag :: (a -> b) -> Bag a -> Bag b
concatMapBag :: (a -> Bag b) -> Bag a -> Bag b
concatMapBagPair :: (a -> (Bag b, Bag c)) -> Bag a -> (Bag b, Bag c)
mapMaybeBag :: (a -> Maybe b) -> Bag a -> Bag b
mapBagM :: Monad m => (a -> m b) -> Bag a -> m (Bag b)
mapBagM_ :: Monad m => (a -> m b) -> Bag a -> m ()
flatMapBagM :: Monad m => (a -> m (Bag b)) -> Bag a -> m (Bag b)
flatMapBagPairM :: Monad m => (a -> m (Bag b, Bag c)) -> Bag a -> m (Bag b, Bag c)
mapAndUnzipBagM :: Monad m => (a -> m (b, c)) -> Bag a -> m (Bag b, Bag c)
mapAccumBagL :: (acc -> x -> (acc, y)) -> acc -> Bag x -> (acc, Bag y)
mapAccumBagLM :: Monad m => (acc -> x -> m (acc, y)) -> acc -> Bag x -> m (acc, Bag y)
listToBag :: [a] -> Bag a
nonEmptyToBag :: NonEmpty a -> Bag a
bagToList :: Bag a -> [a]
unzipBag :: Bag (a, b) -> (Bag a, Bag b)
headMaybe :: Bag a -> Maybe a
moduleUnitId :: Module -> UnitId
mkModule :: u -> ModuleName -> GenModule u
pprModule :: IsLine doc => Module -> doc
pprInstantiatedModule :: InstantiatedModule -> SDoc
isHoleUnit :: GenUnit u -> Bool
-- | Compares unit ids lexically, rather than by their Uniques
stableUnitCmp :: Unit -> Unit -> Ordering
pprUnit :: IsLine doc => Unit -> doc
-- | Retrieve the set of free module holes of a Unit.
unitFreeModuleHoles :: GenUnit u -> UniqDSet ModuleName
-- | Calculate the free holes of a GenModule. If this set is
-- non-empty, this module was defined in an indefinite library that had
-- required signatures.
--
-- If a module has free holes, that means that substitutions can operate
-- on it; if it has no free holes, substituting over a module has no
-- effect.
moduleFreeHoles :: GenModule (GenUnit u) -> UniqDSet ModuleName
-- | Create a new GenInstantiatedUnit given an explicit module
-- substitution.
mkInstantiatedUnit :: IsUnitId u => u -> GenInstantiations u -> GenInstantiatedUnit u
-- | Smart constructor for instantiated GenUnit
mkVirtUnit :: IsUnitId u => u -> [(ModuleName, GenModule (GenUnit u))] -> GenUnit u
-- | Generate a uniquely identifying hash (internal unit-id) for an
-- instantiated unit.
--
-- This is a one-way function. If the indefinite unit has not been
-- instantiated at all, we return its unit-id.
--
-- This hash is completely internal to GHC and is not used for symbol
-- names or file paths. It is different from the hash Cabal would produce
-- for the same instantiated unit.
mkInstantiatedUnitHash :: IsUnitId u => u -> [(ModuleName, GenModule (GenUnit u))] -> FastString
-- | Create a new simple unit identifier from a FastString.
-- Internally, this is primarily used to specify wired-in unit
-- identifiers.
fsToUnit :: FastString -> Unit
unitString :: IsUnitId u => u -> String
stringToUnit :: String -> Unit
-- | Map over the unit type of a GenUnit
mapGenUnit :: IsUnitId v => (u -> v) -> GenUnit u -> GenUnit v
-- | Map over the unit identifier of unit instantiations.
mapInstantiations :: IsUnitId v => (u -> v) -> GenInstantiations u -> GenInstantiations v
-- | Return the UnitId of the Unit. For on-the-fly instantiated units,
-- return the UnitId of the indefinite unit this unit is an instance of.
toUnitId :: Unit -> UnitId
-- | Return the virtual UnitId of an on-the-fly instantiated unit.
virtualUnitId :: InstantiatedUnit -> UnitId
-- | A Unit is definite if it has no free holes.
unitIsDefinite :: Unit -> Bool
unitIdString :: UnitId -> String
stringToUnitId :: String -> UnitId
primUnitId :: UnitId
bignumUnitId :: UnitId
baseUnitId :: UnitId
rtsUnitId :: UnitId
thisGhcUnitId :: UnitId
interactiveUnitId :: UnitId
thUnitId :: UnitId
thUnit :: Unit
primUnit :: Unit
bignumUnit :: Unit
baseUnit :: Unit
rtsUnit :: Unit
thisGhcUnit :: Unit
interactiveUnit :: Unit
-- | 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
mainUnit :: Unit
isInteractiveModule :: Module -> Bool
wiredInUnitIds :: [UnitId]
isPromoted :: PromotionFlag -> Bool
pickLR :: LeftOrRight -> (a, a) -> a
-- | Tags are allocated from here for real constructors or for superclass
-- selectors
fIRST_TAG :: ConTag
mkAlignment :: Int -> Alignment
alignmentOf :: Int -> Alignment
-- | It is always safe to assume that an Id has no lambda-bound
-- variable information
noOneShotInfo :: OneShotInfo
isOneShotInfo :: OneShotInfo -> Bool
hasNoOneShotInfo :: OneShotInfo -> Bool
worstOneShot :: OneShotInfo -> OneShotInfo -> OneShotInfo
bestOneShot :: OneShotInfo -> OneShotInfo -> OneShotInfo
flipSwap :: SwapFlag -> SwapFlag
isSwapped :: SwapFlag -> Bool
unSwap :: SwapFlag -> (a -> a -> b) -> a -> a -> b
pprRuleName :: RuleName -> SDoc
isNotTopLevel :: TopLevelFlag -> Bool
isTopLevel :: TopLevelFlag -> Bool
isMarkedCbv :: CbvMark -> Bool
isRec :: RecFlag -> Bool
isNonRec :: RecFlag -> Bool
boolToRecFlag :: Bool -> RecFlag
isGenerated :: Origin -> Bool
setOverlapModeMaybe :: OverlapFlag -> Maybe OverlapMode -> OverlapFlag
hasIncoherentFlag :: OverlapMode -> Bool
hasOverlappableFlag :: OverlapMode -> Bool
hasOverlappingFlag :: OverlapMode -> Bool
topPrec :: PprPrec
sigPrec :: PprPrec
funPrec :: PprPrec
opPrec :: PprPrec
starPrec :: PprPrec
maxPrec :: PprPrec
maybeParen :: PprPrec -> PprPrec -> SDoc -> SDoc
tupleSortBoxity :: TupleSort -> Boxity
boxityTupleSort :: Boxity -> TupleSort
tupleParens :: TupleSort -> SDoc -> SDoc
sumParens :: SDoc -> SDoc
-- | Pretty print an alternative in an unboxed sum e.g. "| a | |".
pprAlternative :: (a -> SDoc) -> a -> ConTag -> Arity -> SDoc
unboxedTupleOrSumExtension :: UnboxedTupleOrSum -> Extension
oneBranch :: BranchCount
noOccInfo :: OccInfo
isNoOccInfo :: OccInfo -> Bool
isManyOccs :: OccInfo -> Bool
seqOccInfo :: OccInfo -> ()
tailCallInfo :: OccInfo -> TailCallInfo
zapOccTailCallInfo :: OccInfo -> OccInfo
isAlwaysTailCalled :: OccInfo -> Bool
strongLoopBreaker :: OccInfo
weakLoopBreaker :: OccInfo
isWeakLoopBreaker :: OccInfo -> Bool
isStrongLoopBreaker :: OccInfo -> Bool
isDeadOcc :: OccInfo -> Bool
isOneOcc :: OccInfo -> Bool
zapFragileOcc :: OccInfo -> OccInfo
successIf :: Bool -> SuccessFlag
succeeded :: SuccessFlag -> Bool
failed :: SuccessFlag -> Bool
beginPhase :: Activation -> CompilerPhase
activeAfter :: CompilerPhase -> Activation
nextPhase :: CompilerPhase -> CompilerPhase
laterPhase :: CompilerPhase -> CompilerPhase -> CompilerPhase
activateAfterInitial :: Activation
activateDuringFinal :: Activation
isActive :: CompilerPhase -> Activation -> Bool
activeInFinalPhase :: Activation -> Bool
isNeverActive :: Activation -> Bool
isAlwaysActive :: Activation -> Bool
competesWith :: Activation -> Activation -> Bool
isConLike :: RuleMatchInfo -> Bool
isFunLike :: RuleMatchInfo -> Bool
noUserInlineSpec :: InlineSpec -> Bool
defaultInlinePragma :: InlinePragma
alwaysInlinePragma :: InlinePragma
neverInlinePragma :: InlinePragma
alwaysInlineConLikePragma :: InlinePragma
inlinePragmaSpec :: InlinePragma -> InlineSpec
inlinePragmaSource :: InlinePragma -> SourceText
inlineSpecSource :: InlineSpec -> SourceText
dfunInlinePragma :: InlinePragma
isDefaultInlinePragma :: InlinePragma -> Bool
isInlinePragma :: InlinePragma -> Bool
isInlinablePragma :: InlinePragma -> Bool
isNoInlinePragma :: InlinePragma -> Bool
isAnyInlinePragma :: InlinePragma -> Bool
isOpaquePragma :: InlinePragma -> Bool
inlinePragmaSat :: InlinePragma -> Maybe Arity
inlinePragmaActivation :: InlinePragma -> Activation
inlinePragmaRuleMatchInfo :: InlinePragma -> RuleMatchInfo
setInlinePragmaActivation :: InlinePragma -> Activation -> InlinePragma
setInlinePragmaRuleMatchInfo :: InlinePragma -> RuleMatchInfo -> InlinePragma
-- | Outputs string for pragma name for any of
-- INLINEINLINABLENOINLINE. This differs from the Outputable
-- instance for the InlineSpec type where the pragma name string as well
-- as the accompanying SourceText (if any) is printed.
inlinePragmaName :: InlineSpec -> SDoc
-- | Pretty-print without displaying the user-specified InlineSpec.
pprInline :: InlinePragma -> SDoc
-- | Pretty-print including the user-specified InlineSpec.
pprInlineDebug :: InlinePragma -> SDoc
isStableUserSource :: UnfoldingSource -> Bool
isStableSystemSource :: UnfoldingSource -> Bool
isCompulsorySource :: UnfoldingSource -> Bool
isStableSource :: UnfoldingSource -> Bool
intGtLimit :: Int -> IntWithInf -> Bool
-- | Subtract an IntWithInf from an IntWithInf
subWithInf :: IntWithInf -> Int -> IntWithInf
-- | Turn a positive number into an IntWithInf, where 0 represents
-- infinity
treatZeroAsInf :: Int -> IntWithInf
-- | Inject any integer into an IntWithInf
mkIntWithInf :: Int -> IntWithInf
isTypeLevel :: TypeOrKind -> Bool
isKindLevel :: TypeOrKind -> Bool
mightBeLifted :: Maybe Levity -> Bool
mightBeUnlifted :: Maybe Levity -> Bool
defaultNonStandardTyVars :: DefaultingStrategy -> Bool
-- | Type constructor for n-ary unboxed sum.
sumTyCon :: Arity -> TyCon
-- | Data constructor for i-th alternative of a n-ary unboxed sum.
sumDataCon :: ConTag -> Arity -> DataCon
cTupleSelIdName :: ConTag -> Arity -> Name
cTupleTyConName :: Arity -> Name
cTupleDataConName :: Arity -> Name
cTupleDataCon :: Arity -> DataCon
tupleTyCon :: Boxity -> Arity -> TyCon
tupleDataCon :: Boxity -> Arity -> DataCon
promotedTupleDataCon :: Boxity -> Arity -> TyCon
integerTy :: Type
naturalTy :: Type
tupleDataConName :: Boxity -> Arity -> Name
tupleTyConName :: TupleSort -> Arity -> Name
multMulTyCon :: TyCon
unrestrictedFunTyCon :: TyCon
manyDataConTyCon :: TyCon
manyDataConTy :: Type
oneDataConTyCon :: TyCon
oneDataConTy :: Type
multiplicityTy :: Type
multiplicityTyCon :: TyCon
-- | Specialization of unboxedTupleSumKind for tuples
unboxedTupleKind :: [Type] -> Kind
anyTypeOfKind :: Kind -> Type
int8ElemRepDataConTy :: Type
int16ElemRepDataConTy :: Type
int32ElemRepDataConTy :: Type
int64ElemRepDataConTy :: Type
word8ElemRepDataConTy :: Type
word16ElemRepDataConTy :: Type
word32ElemRepDataConTy :: Type
word64ElemRepDataConTy :: Type
floatElemRepDataConTy :: Type
doubleElemRepDataConTy :: Type
vec2DataConTy :: Type
vec4DataConTy :: Type
vec8DataConTy :: Type
vec16DataConTy :: Type
vec32DataConTy :: Type
vec64DataConTy :: Type
intRepDataConTy :: RuntimeRepType
int8RepDataConTy :: RuntimeRepType
int16RepDataConTy :: RuntimeRepType
int32RepDataConTy :: RuntimeRepType
int64RepDataConTy :: RuntimeRepType
wordRepDataConTy :: RuntimeRepType
word8RepDataConTy :: RuntimeRepType
word16RepDataConTy :: RuntimeRepType
word32RepDataConTy :: RuntimeRepType
word64RepDataConTy :: RuntimeRepType
addrRepDataConTy :: RuntimeRepType
floatRepDataConTy :: RuntimeRepType
doubleRepDataConTy :: RuntimeRepType
liftedDataConTy :: Type
unliftedDataConTy :: Type
liftedRepTy :: RuntimeRepType
unliftedRepTy :: RuntimeRepType
zeroBitRepTy :: RuntimeRepType
vecRepDataConTyCon :: TyCon
tupleRepDataConTyCon :: TyCon
boxedRepDataConTyCon :: TyCon
liftedDataConTyCon :: TyCon
runtimeRepTy :: Type
levityTy :: Type
runtimeRepTyCon :: TyCon
levityTyCon :: TyCon
vecCountTyCon :: TyCon
vecElemTyCon :: TyCon
constraintKind :: Kind
-- |
-- type LiftedRep = 'BoxedRep 'Lifted
--
liftedRepTyCon :: TyCon
-- |
-- type UnliftedRep = 'BoxedRep 'Unlifted
--
unliftedRepTyCon :: TyCon
liftedTypeKindTyCon :: TyCon
unliftedTypeKindTyCon :: TyCon
liftedTypeKind :: Type
unliftedTypeKind :: Type
zeroBitTypeKind :: Type
constraintKindTyConName :: Name
liftedTypeKindTyConName :: Name
unitTy :: Type
coercibleTyCon :: TyCon
heqTyCon :: TyCon
-- | Build the type of a small tuple that holds the specified type of thing
-- Flattens 1-tuples. See Note [One-tuples].
mkBoxedTupleTy :: [Type] -> Type
charTy :: Type
typeSymbolKind :: Kind
listTyCon :: TyCon
tcName :: NameSpace
clsName :: NameSpace
tcClsName :: NameSpace
dataName :: NameSpace
srcDataName :: NameSpace
tvName :: NameSpace
varName :: NameSpace
isDataConNameSpace :: NameSpace -> Bool
isTcClsNameSpace :: NameSpace -> Bool
isTvNameSpace :: NameSpace -> Bool
isVarNameSpace :: NameSpace -> Bool
isValNameSpace :: NameSpace -> Bool
pprNameSpace :: NameSpace -> SDoc
pprNonVarNameSpace :: NameSpace -> SDoc
pprNameSpaceBrief :: IsLine doc => NameSpace -> doc
pprOccName :: IsLine doc => OccName -> doc
mkOccName :: NameSpace -> String -> OccName
mkOccNameFS :: NameSpace -> FastString -> OccName
mkVarOcc :: String -> OccName
mkDataOcc :: String -> OccName
mkDataOccFS :: FastString -> OccName
mkTyVarOcc :: String -> OccName
mkTyVarOccFS :: FastString -> OccName
mkTcOcc :: String -> OccName
mkTcOccFS :: FastString -> OccName
mkClsOcc :: String -> OccName
mkClsOccFS :: FastString -> OccName
demoteOccName :: OccName -> Maybe OccName
promoteOccName :: OccName -> Maybe OccName
emptyOccEnv :: OccEnv a
unitOccEnv :: OccName -> a -> OccEnv a
extendOccEnv :: OccEnv a -> OccName -> a -> OccEnv a
extendOccEnvList :: OccEnv a -> [(OccName, a)] -> OccEnv a
lookupOccEnv :: OccEnv a -> OccName -> Maybe a
mkOccEnv :: [(OccName, a)] -> OccEnv a
elemOccEnv :: OccName -> OccEnv a -> Bool
foldOccEnv :: (a -> b -> b) -> b -> OccEnv a -> b
nonDetOccEnvElts :: OccEnv a -> [a]
plusOccEnv :: OccEnv a -> OccEnv a -> OccEnv a
plusOccEnv_C :: (a -> a -> a) -> OccEnv a -> OccEnv a -> OccEnv a
extendOccEnv_C :: (a -> a -> a) -> OccEnv a -> OccName -> a -> OccEnv a
extendOccEnv_Acc :: (a -> b -> b) -> (a -> b) -> OccEnv b -> OccName -> a -> OccEnv b
mapOccEnv :: (a -> b) -> OccEnv a -> OccEnv b
mkOccEnv_C :: (a -> a -> a) -> [(OccName, a)] -> OccEnv a
delFromOccEnv :: OccEnv a -> OccName -> OccEnv a
delListFromOccEnv :: OccEnv a -> [OccName] -> OccEnv a
filterOccEnv :: (elt -> Bool) -> OccEnv elt -> OccEnv elt
alterOccEnv :: (Maybe elt -> Maybe elt) -> OccEnv elt -> OccName -> OccEnv elt
minusOccEnv :: OccEnv a -> OccEnv b -> OccEnv a
-- | Alters (replaces or removes) those elements of the map that are
-- mentioned in the second map
minusOccEnv_C :: (a -> b -> Maybe a) -> OccEnv a -> OccEnv b -> OccEnv a
pprOccEnv :: (a -> SDoc) -> OccEnv a -> SDoc
emptyOccSet :: OccSet
unitOccSet :: OccName -> OccSet
mkOccSet :: [OccName] -> OccSet
extendOccSet :: OccSet -> OccName -> OccSet
extendOccSetList :: OccSet -> [OccName] -> OccSet
unionOccSets :: OccSet -> OccSet -> OccSet
unionManyOccSets :: [OccSet] -> OccSet
minusOccSet :: OccSet -> OccSet -> OccSet
elemOccSet :: OccName -> OccSet -> Bool
isEmptyOccSet :: OccSet -> Bool
intersectOccSet :: OccSet -> OccSet -> OccSet
filterOccSet :: (OccName -> Bool) -> OccSet -> OccSet
-- | Converts an OccSet to an OccEnv (operationally the identity)
occSetToEnv :: OccSet -> OccEnv OccName
occNameString :: OccName -> String
setOccNameSpace :: NameSpace -> OccName -> OccName
isVarOcc :: OccName -> Bool
isTvOcc :: OccName -> Bool
isTcOcc :: OccName -> Bool
-- | Value OccNamess are those that are either in the
-- variable or data constructor namespaces
isValOcc :: OccName -> Bool
isDataOcc :: OccName -> Bool
-- | Test if the OccName is a data constructor that starts with a
-- symbol (e.g. :, or [])
isDataSymOcc :: OccName -> Bool
-- | Test if the OccName is that for any operator (whether it is a
-- data constructor or variable or whatever)
isSymOcc :: OccName -> Bool
-- | Wrap parens around an operator
parenSymOcc :: OccName -> SDoc -> SDoc
-- | Haskell 98 encourages compilers to suppress warnings about unused
-- names in a pattern if they start with _: this implements that
-- test
startsWithUnderscore :: OccName -> Bool
-- | Test for definitions internally generated by GHC. This predicate is
-- used to suppress printing of internal definitions in some debug prints
isDerivedOccName :: OccName -> Bool
isDefaultMethodOcc :: OccName -> Bool
-- | Is an OccName one of a Typeable TyCon or
-- Module binding? This is needed as these bindings are renamed
-- differently. See Note [Grand plan for Typeable] in
-- GHC.Tc.Instance.Typeable.
isTypeableBindOcc :: OccName -> Bool
mkDataConWrapperOcc :: OccName -> OccName
mkWorkerOcc :: OccName -> OccName
mkMatcherOcc :: OccName -> OccName
mkBuilderOcc :: OccName -> OccName
mkDefaultMethodOcc :: OccName -> OccName
mkClassOpAuxOcc :: OccName -> OccName
mkDictOcc :: OccName -> OccName
mkIPOcc :: OccName -> OccName
mkSpecOcc :: OccName -> OccName
mkForeignExportOcc :: OccName -> OccName
mkRepEqOcc :: OccName -> OccName
mkClassDataConOcc :: OccName -> OccName
mkNewTyCoOcc :: OccName -> OccName
mkInstTyCoOcc :: OccName -> OccName
mkEqPredCoOcc :: OccName -> OccName
mkCon2TagOcc :: OccName -> OccName
mkTag2ConOcc :: OccName -> OccName
mkMaxTagOcc :: OccName -> OccName
mkDataTOcc :: OccName -> OccName
mkDataCOcc :: OccName -> OccName
mkTyConRepOcc :: OccName -> OccName
mkGenR :: OccName -> OccName
mkGen1R :: OccName -> OccName
mkDataConWorkerOcc :: OccName -> OccName
mkSuperDictAuxOcc :: Int -> OccName -> OccName
mkSuperDictSelOcc :: Int -> OccName -> OccName
mkLocalOcc :: Unique -> OccName -> OccName
-- | Derive a name for the representation type constructor of a
-- data/newtype instance.
mkInstTyTcOcc :: String -> OccSet -> OccName
mkDFunOcc :: String -> Bool -> OccSet -> OccName
mkMethodOcc :: OccName -> OccName
emptyTidyOccEnv :: TidyOccEnv
initTidyOccEnv :: [OccName] -> TidyOccEnv
delTidyOccEnvList :: TidyOccEnv -> [FastString] -> TidyOccEnv
avoidClashesOccEnv :: TidyOccEnv -> [OccName] -> TidyOccEnv
tidyOccName :: TidyOccEnv -> OccName -> (TidyOccEnv, OccName)
nameNameSpace :: Name -> NameSpace
nameSrcLoc :: Name -> SrcLoc
nameSrcSpan :: Name -> SrcSpan
isWiredInName :: Name -> Bool
isWiredIn :: NamedThing thing => thing -> Bool
wiredInNameTyThing_maybe :: Name -> Maybe TyThing
isBuiltInSyntax :: Name -> Bool
isExternalName :: Name -> Bool
isInternalName :: Name -> Bool
isHoleName :: Name -> Bool
-- | Will the Name come from a dynamically linked package?
isDynLinkName :: Platform -> Module -> Name -> Bool
nameModule :: HasDebugCallStack => Name -> Module
nameModule_maybe :: Name -> Maybe Module
namePun_maybe :: Name -> Maybe FastString
-- | Returns True if the name is (a) Internal (b) External but from the
-- specified module (c) External but from the interactive
-- package
--
-- The key idea is that False means: the entity is defined in some other
-- module you can find the details (type, fixity, instances) in some
-- interface file those details will be stored in the EPT or HPT
--
-- True means: the entity is defined in this module or earlier in the
-- GHCi session you can find details (type, fixity, instances) in the
-- TcGblEnv or TcLclEnv
--
-- The isInteractiveModule part is because successive interactions of a
-- GHCi session each give rise to a fresh module (Ghci1, Ghci2, etc), but
-- they all come from the magic interactive package; and all the
-- details are kept in the TcLclEnv, TcGblEnv, NOT in the HPT or EPT. See
-- Note [The interactive package] in GHC.Runtime.Context
nameIsLocalOrFrom :: Module -> Name -> Bool
-- | Returns True if the name is external or from the interactive
-- package See documentation of nameIsLocalOrFrom function
nameIsExternalOrFrom :: Module -> Name -> Bool
nameIsHomePackage :: Module -> Name -> Bool
nameIsHomePackageImport :: Module -> Name -> Bool
-- | Returns True if the Name comes from some other package: neither this
-- package nor the interactive package.
nameIsFromExternalPackage :: HomeUnit -> Name -> Bool
isTyVarName :: Name -> Bool
isTyConName :: Name -> Bool
isDataConName :: Name -> Bool
isValName :: Name -> Bool
isVarName :: Name -> Bool
isSystemName :: Name -> Bool
-- | Create a name which is (for now at least) local to the current module
-- and hence does not need a GenModule to disambiguate it from
-- other Names
mkInternalName :: Unique -> OccName -> SrcSpan -> Name
mkClonedInternalName :: Unique -> Name -> Name
mkDerivedInternalName :: (OccName -> OccName) -> Unique -> Name -> Name
-- | Create a name which definitely originates in the given module
mkExternalName :: Unique -> Module -> OccName -> SrcSpan -> Name
-- | Create a name which is actually defined by the compiler itself
mkWiredInName :: Module -> OccName -> Unique -> TyThing -> BuiltInSyntax -> Name
-- | Create a name brought into being by the compiler
mkSystemName :: Unique -> OccName -> Name
mkSystemNameAt :: Unique -> OccName -> SrcSpan -> Name
mkSystemVarName :: Unique -> FastString -> Name
mkSysTvName :: Unique -> FastString -> Name
-- | Make a name for a foreign call
mkFCallName :: Unique -> FastString -> Name
setNameLoc :: Name -> SrcSpan -> Name
-- | Make the Name into an internal name, regardless of what it was
-- to begin with
localiseName :: Name -> Name
-- | Compare Names lexicographically This only works for Names that
-- originate in the source code or have been tidied.
stableNameCmp :: Name -> Name -> Ordering
pprName :: IsLine doc => Name -> doc
-- | Print fully qualified name (with unit-id, module and unique)
pprFullName :: Module -> Name -> SDoc
-- | Print a ticky ticky styled name
--
-- Module argument is the module to use for internal and system names.
-- When printing the name in a ticky profile, the module name is included
-- even for local things. However, ticky uses the format "x (M)" rather
-- than "M.x". Hence, this function provides a separation from normal
-- styling.
pprTickyName :: Module -> Name -> SDoc
-- | Print the string of Name unqualifiedly directly.
pprNameUnqualified :: Name -> SDoc
pprModulePrefix :: IsLine doc => PprStyle -> Module -> OccName -> doc
pprDefinedAt :: Name -> SDoc
pprNameDefnLoc :: Name -> SDoc
-- | Get a string representation of a Name that's unique and stable
-- across recompilations. Used for deterministic generation of binds for
-- derived instances. eg.
-- "$aeson_70dylHtv1FFGeai1IoxcQr$Data.Aeson.Types.Internal$String"
nameStableString :: Name -> String
getSrcLoc :: NamedThing a => a -> SrcLoc
getSrcSpan :: NamedThing a => a -> SrcSpan
getOccString :: NamedThing a => a -> String
getOccFS :: NamedThing a => a -> FastString
pprInfixName :: (Outputable a, NamedThing a) => a -> SDoc
pprPrefixName :: NamedThing a => a -> SDoc
-- | Does this ForAllTyFlag classify an argument that is written in
-- Haskell?
isVisibleForAllTyFlag :: ForAllTyFlag -> Bool
-- | Does this ForAllTyFlag classify an argument that is not written
-- in Haskell?
isInvisibleForAllTyFlag :: ForAllTyFlag -> Bool
tyVarSpecToBinders :: [VarBndr a Specificity] -> [VarBndr a ForAllTyFlag]
binderVar :: VarBndr tv argf -> tv
binderVars :: [VarBndr tv argf] -> [tv]
binderFlag :: VarBndr tv argf -> argf
binderFlags :: [VarBndr tv argf] -> [argf]
binderType :: VarBndr TyCoVar argf -> Type
-- | Make a named binder
mkForAllTyBinder :: vis -> TyCoVar -> VarBndr TyCoVar vis
-- | Make a named binder var should be a type variable
mkTyVarBinder :: vis -> TyVar -> VarBndr TyVar vis
-- | Make many named binders
mkForAllTyBinders :: vis -> [TyCoVar] -> [VarBndr TyCoVar vis]
-- | Make many named binders Input vars should be type variables
mkTyVarBinders :: vis -> [TyVar] -> [VarBndr TyVar vis]
-- | Does this binder bind an invisible argument?
isInvisiblePiTyBinder :: PiTyBinder -> Bool
-- | Does this binder bind a visible argument?
isVisiblePiTyBinder :: PiTyBinder -> Bool
isNamedPiTyBinder :: PiTyBinder -> Bool
namedPiTyBinder_maybe :: PiTyBinder -> Maybe TyCoVar
-- | Does this binder bind a variable that is not erased? Returns
-- True for anonymous binders.
isAnonPiTyBinder :: PiTyBinder -> Bool
-- | Extract a relevant type, if there is one.
anonPiTyBinderType_maybe :: PiTyBinder -> Maybe Type
piTyBinderType :: PiTyBinder -> Type
tyVarKind :: TyVar -> Kind
idInfo :: HasDebugCallStack => Id -> IdInfo
idDetails :: Id -> IdDetails
lazySetIdInfo :: Id -> IdInfo -> Id
-- | If it's a local, make it global
globaliseId :: Id -> Id
setIdExported :: Id -> Id
setIdNotExported :: Id -> Id
updateIdTypeButNotMult :: (Type -> Type) -> Id -> Id
updateIdTypeAndMult :: (Type -> Type) -> Id -> Id
updateIdTypeAndMultM :: Monad m => (Type -> m Type) -> Id -> m Id
setIdMult :: Id -> Mult -> Id
-- | Is this a type-level (i.e., computationally irrelevant, thus erasable)
-- variable? Satisfies isTyVar = not . isId.
isTyVar :: Var -> Bool
-- | Is this a value-level (i.e., computationally relevant)
-- Varentifier? Satisfies isId = not . isTyVar.
isId :: Var -> Bool
isLocalId :: Var -> Bool
isGlobalId :: Var -> Bool
-- | isExportedIdVar means "don't throw this away"
isExportedId :: Var -> Bool
-- | See GHC.Types.Var Note [FunTyFlag]
chooseFunTyFlag :: HasDebugCallStack => Type -> Type -> FunTyFlag
-- | Given a TyCon and a list of argument types, partition the
-- arguments into:
--
--
-- - Inferred or Specified (i.e., invisible) arguments
-- and
-- - Required (i.e., visible) arguments
--
partitionInvisibleTypes :: TyCon -> [Type] -> ([Type], [Type])
-- | Extract the PromDataConInfo of a type. For example,
-- getLevity Int = Lifted, or getLevity (Array# Int) =
-- Unlifted.
--
-- Panics if this is not possible. Does not look through type family
-- applications.
getLevity :: HasDebugCallStack => Type -> Type
-- | Attempts to obtain the type variable underlying a Type
getTyVar_maybe :: Type -> Maybe TyVar
-- | The same as fst . splitTyConApp We can short-cut the FunTy
-- case
tyConAppTyCon_maybe :: Type -> Maybe TyCon
-- | 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])
-- | Returns True if the argument is (lifted) Type or Constraint See Note
-- [TYPE and CONSTRAINT] in GHC.Builtin.Types.Prim
isLiftedTypeKind :: Kind -> Bool
-- | Is this the type Multiplicity?
isMultiplicityTy :: Type -> Bool
-- | Is this the type PromDataConInfo?
isLevityTy :: Type -> Bool
-- | Is this the type RuntimeRep?
isRuntimeRepTy :: 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 does not look through type family applications.
--
-- By being non-recursive and inlined, this case analysis gets
-- efficiently joined onto the case analysis that the caller is already
-- doing
coreView :: Type -> Maybe Type
typeTypeOrConstraint :: HasDebugCallStack => Type -> TypeOrConstraint
typeKind :: HasDebugCallStack => Type -> Kind
piResultTy :: HasDebugCallStack => Type -> Type -> Type
mkCoercionTy :: Coercion -> Type
-- | 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
-- | Make a CastTy. The Coercion must be nominal. Checks the
-- Coercion for reflexivity, dropping it if it's reflexive. See Note
-- [Respecting definitional equality] in GHC.Core.TyCo.Rep
mkCastTy :: Type -> Coercion -> Type
-- | Applies a type to another, as in e.g. k a
mkAppTy :: Type -> Type -> Type
isCoercionTy :: Type -> Bool
isPredTy :: HasDebugCallStack => Type -> Bool
depAnal :: (node -> [Name]) -> (node -> [Name]) -> [node] -> [SCC node]
nonDetNameEnvElts :: NameEnv a -> [a]
emptyNameEnv :: NameEnv a
isEmptyNameEnv :: NameEnv a -> Bool
unitNameEnv :: Name -> a -> NameEnv a
extendNameEnv :: NameEnv a -> Name -> a -> NameEnv a
extendNameEnvList :: NameEnv a -> [(Name, a)] -> NameEnv a
lookupNameEnv :: NameEnv a -> Name -> Maybe a
alterNameEnv :: (Maybe a -> Maybe a) -> NameEnv a -> Name -> NameEnv a
mkNameEnv :: [(Name, a)] -> NameEnv a
mkNameEnvWith :: (a -> Name) -> [a] -> NameEnv a
elemNameEnv :: Name -> NameEnv a -> Bool
plusNameEnv :: NameEnv a -> NameEnv a -> NameEnv a
plusNameEnv_C :: (a -> a -> a) -> NameEnv a -> NameEnv a -> NameEnv a
plusNameEnv_CD :: (a -> a -> a) -> NameEnv a -> a -> NameEnv a -> a -> NameEnv a
plusNameEnv_CD2 :: (Maybe a -> Maybe a -> a) -> NameEnv a -> NameEnv a -> NameEnv a
extendNameEnv_C :: (a -> a -> a) -> NameEnv a -> Name -> a -> NameEnv a
mapNameEnv :: (elt1 -> elt2) -> NameEnv elt1 -> NameEnv elt2
extendNameEnv_Acc :: (a -> b -> b) -> (a -> b) -> NameEnv b -> Name -> a -> NameEnv b
extendNameEnvList_C :: (a -> a -> a) -> NameEnv a -> [(Name, a)] -> NameEnv a
delFromNameEnv :: NameEnv a -> Name -> NameEnv a
delListFromNameEnv :: NameEnv a -> [Name] -> NameEnv a
filterNameEnv :: (elt -> Bool) -> NameEnv elt -> NameEnv elt
mapMaybeNameEnv :: (a -> Maybe b) -> NameEnv a -> NameEnv b
anyNameEnv :: (elt -> Bool) -> NameEnv elt -> Bool
disjointNameEnv :: NameEnv a -> NameEnv a -> Bool
seqEltsNameEnv :: (elt -> ()) -> NameEnv elt -> ()
lookupNameEnv_NF :: NameEnv a -> Name -> a
emptyDNameEnv :: DNameEnv a
isEmptyDNameEnv :: DNameEnv a -> Bool
lookupDNameEnv :: DNameEnv a -> Name -> Maybe a
delFromDNameEnv :: DNameEnv a -> Name -> DNameEnv a
filterDNameEnv :: (a -> Bool) -> DNameEnv a -> DNameEnv a
mapDNameEnv :: (a -> b) -> DNameEnv a -> DNameEnv b
adjustDNameEnv :: (a -> a) -> DNameEnv a -> Name -> DNameEnv a
alterDNameEnv :: (Maybe a -> Maybe a) -> DNameEnv a -> Name -> DNameEnv a
extendDNameEnv :: DNameEnv a -> Name -> a -> DNameEnv a
extendDNameEnv_C :: (a -> a -> a) -> DNameEnv a -> Name -> a -> DNameEnv a
eltsDNameEnv :: DNameEnv a -> [a]
foldDNameEnv :: (a -> b -> b) -> b -> DNameEnv a -> b
plusDNameEnv_C :: (elt -> elt -> elt) -> DNameEnv elt -> DNameEnv elt -> DNameEnv elt
nonDetStrictFoldDNameEnv :: (a -> b -> b) -> b -> DNameEnv a -> b
-- | Convert a normal annotation into its unicode equivalent one
unicodeAnn :: AnnKeywordId -> AnnKeywordId
-- | Smart constructor for a DeltaPos. It preserves the invariant
-- that for the DifferentLine constructor deltaLine is
-- always > 0.
deltaPos :: Int -> Int -> DeltaPos
getDeltaLine :: DeltaPos -> Int
-- | Used in the parser only, extract the RealSrcSpan from an
-- EpaLocation. The parser will never insert a DeltaPos, so
-- the partial function is safe.
epaLocationRealSrcSpan :: EpaLocation -> RealSrcSpan
epaLocationFromSrcAnn :: SrcAnn ann -> EpaLocation
spanAsAnchor :: SrcSpan -> Anchor
realSpanAsAnchor :: RealSrcSpan -> Anchor
emptyComments :: EpAnnComments
-- | Maps the ParenType to the related opening and closing
-- AnnKeywordId. Used when actually printing the item.
parenTypeKws :: ParenType -> (AnnKeywordId, AnnKeywordId)
-- | Convert a TrailingAnn to an AddEpAnn
trailingAnnToAddEpAnn :: TrailingAnn -> AddEpAnn
-- | Helper function used in the parser to add a TrailingAnn items
-- to an existing annotation.
addTrailingAnnToL :: SrcSpan -> TrailingAnn -> EpAnnComments -> EpAnn AnnList -> EpAnn AnnList
-- | Helper function used in the parser to add a TrailingAnn items
-- to an existing annotation.
addTrailingAnnToA :: SrcSpan -> TrailingAnn -> EpAnnComments -> EpAnn AnnListItem -> EpAnn AnnListItem
-- | Helper function used in the parser to add a comma location to an
-- existing annotation.
addTrailingCommaToN :: SrcSpan -> EpAnn NameAnn -> EpaLocation -> EpAnn NameAnn
-- | Helper function (temporary) during transition of names Discards any
-- annotations
l2n :: LocatedAn a1 a2 -> LocatedN a2
n2l :: LocatedN a -> LocatedA a
-- | Helper function (temporary) during transition of names Discards any
-- annotations
la2na :: SrcSpanAnn' a -> SrcSpanAnnN
-- | Helper function (temporary) during transition of names Discards any
-- annotations
la2la :: LocatedAn ann1 a2 -> LocatedAn ann2 a2
l2l :: SrcSpanAnn' a -> SrcAnn ann
-- | Helper function (temporary) during transition of names Discards any
-- annotations
na2la :: SrcSpanAnn' a -> SrcAnn ann
reLoc :: LocatedAn a e -> Located e
reLocA :: Located e -> LocatedAn ann e
reLocL :: LocatedN e -> LocatedA e
reLocC :: LocatedN e -> LocatedC e
reLocN :: LocatedN a -> Located a
realSrcSpan :: SrcSpan -> RealSrcSpan
srcSpan2e :: SrcSpan -> EpaLocation
la2e :: SrcSpanAnn' a -> EpaLocation
extraToAnnList :: AnnList -> [AddEpAnn] -> AnnList
reAnn :: [TrailingAnn] -> EpAnnComments -> Located a -> LocatedA a
reAnnC :: AnnContext -> EpAnnComments -> Located a -> LocatedC a
reAnnL :: ann -> EpAnnComments -> Located e -> GenLocated (SrcAnn ann) e
getLocAnn :: Located a -> SrcSpanAnnA
getLocA :: GenLocated (SrcSpanAnn' a) e -> SrcSpan
noLocA :: a -> LocatedAn an a
noAnnSrcSpan :: SrcSpan -> SrcAnn ann
noSrcSpanA :: SrcAnn ann
-- | Short form for EpAnnNotUsed
noAnn :: EpAnn a
addAnns :: EpAnn [AddEpAnn] -> [AddEpAnn] -> EpAnnComments -> EpAnn [AddEpAnn]
addAnnsA :: SrcSpanAnnA -> [TrailingAnn] -> EpAnnComments -> SrcSpanAnnA
-- | The annotations need to all come after the anchor. Make sure this is
-- the case.
widenSpan :: SrcSpan -> [AddEpAnn] -> SrcSpan
widenAnchor :: Anchor -> [AddEpAnn] -> Anchor
widenAnchorR :: Anchor -> RealSrcSpan -> Anchor
widenLocatedAn :: SrcSpanAnn' an -> [AddEpAnn] -> SrcSpanAnn' an
epAnnAnnsL :: EpAnn a -> [a]
epAnnAnns :: EpAnn [AddEpAnn] -> [AddEpAnn]
annParen2AddEpAnn :: EpAnn AnnParen -> [AddEpAnn]
epAnnComments :: EpAnn an -> EpAnnComments
sortLocatedA :: [GenLocated (SrcSpanAnn' a) e] -> [GenLocated (SrcSpanAnn' a) e]
mapLocA :: (a -> b) -> GenLocated SrcSpan a -> GenLocated (SrcAnn ann) b
combineLocsA :: Semigroup a => GenLocated (SrcAnn a) e1 -> GenLocated (SrcAnn a) e2 -> SrcAnn a
combineSrcSpansA :: Semigroup a => SrcAnn a -> SrcAnn a -> SrcAnn a
-- | Combine locations from two Located things and add them to a
-- third thing
addCLocA :: GenLocated (SrcSpanAnn' a) e1 -> GenLocated SrcSpan e2 -> e3 -> GenLocated (SrcAnn ann) e3
addCLocAA :: GenLocated (SrcSpanAnn' a1) e1 -> GenLocated (SrcSpanAnn' a2) e2 -> e3 -> GenLocated (SrcAnn ann) e3
getFollowingComments :: EpAnnComments -> [LEpaComment]
setFollowingComments :: EpAnnComments -> [LEpaComment] -> EpAnnComments
setPriorComments :: EpAnnComments -> [LEpaComment] -> EpAnnComments
noComments :: EpAnnCO
placeholderRealSpan :: RealSrcSpan
comment :: RealSrcSpan -> EpAnnComments -> EpAnnCO
-- | Add additional comments to a SrcAnn, used for manipulating the
-- AST prior to exact printing the changed one.
addCommentsToSrcAnn :: Monoid ann => SrcAnn ann -> EpAnnComments -> SrcAnn ann
-- | Replace any existing comments on a SrcAnn, used for
-- manipulating the AST prior to exact printing the changed one.
setCommentsSrcAnn :: Monoid ann => SrcAnn ann -> EpAnnComments -> SrcAnn ann
-- | Add additional comments, used for manipulating the AST prior to exact
-- printing the changed one.
addCommentsToEpAnn :: Monoid a => SrcSpan -> EpAnn a -> EpAnnComments -> EpAnn a
-- | Replace any existing comments, used for manipulating the AST prior to
-- exact printing the changed one.
setCommentsEpAnn :: Monoid a => SrcSpan -> EpAnn a -> EpAnnComments -> EpAnn a
-- | Transfer comments and trailing items from the annotations in the first
-- SrcSpanAnnA argument to those in the second.
transferAnnsA :: SrcSpanAnnA -> SrcSpanAnnA -> (SrcSpanAnnA, SrcSpanAnnA)
-- | Remove the exact print annotations payload, leaving only the anchor
-- and comments.
commentsOnlyA :: Monoid ann => SrcAnn ann -> SrcAnn ann
-- | Remove the comments, leaving the exact print annotations payload
removeCommentsA :: SrcAnn ann -> SrcAnn ann
pprIfPs :: forall (p :: Pass). IsPass p => (p ~ 'Parsed => SDoc) -> SDoc
pprIfRn :: forall (p :: Pass). IsPass p => (p ~ 'Renamed => SDoc) -> SDoc
pprIfTc :: forall (p :: Pass). IsPass p => (p ~ 'Typechecked => SDoc) -> SDoc
noHsTok :: forall (tok :: Symbol). GenLocated TokenLocation (HsToken tok)
noHsUniTok :: forall (tok :: Symbol) (utok :: Symbol). GenLocated TokenLocation (HsUniToken tok utok)
allNameStrings :: Infinite String
allNameStringList :: [String]
itName :: Unique -> SrcSpan -> Name
mkUnboundName :: OccName -> Name
isUnboundName :: Name -> Bool
basicKnownKeyNames :: [Name]
genericTyConNames :: [Name]
pRELUDE :: Module
gHC_PRIM :: Module
gHC_PRIM_PANIC :: Module
gHC_TYPES :: Module
gHC_MAGIC :: Module
gHC_MAGIC_DICT :: Module
gHC_CSTRING :: Module
gHC_CLASSES :: Module
gHC_PRIMOPWRAPPERS :: Module
gHC_BASE :: Module
gHC_ENUM :: Module
gHC_GHCI :: Module
gHC_GHCI_HELPERS :: Module
gHC_SHOW :: Module
gHC_READ :: Module
gHC_NUM :: Module
gHC_MAYBE :: Module
gHC_NUM_INTEGER :: Module
gHC_NUM_NATURAL :: Module
gHC_NUM_BIGNAT :: Module
gHC_LIST :: Module
gHC_TUPLE :: Module
gHC_TUPLE_PRIM :: Module
dATA_EITHER :: Module
dATA_LIST :: Module
dATA_STRING :: Module
dATA_FOLDABLE :: Module
dATA_TRAVERSABLE :: Module
gHC_CONC :: Module
gHC_IO :: Module
gHC_IO_Exception :: Module
gHC_ST :: Module
gHC_IX :: Module
gHC_STABLE :: Module
gHC_PTR :: Module
gHC_ERR :: Module
gHC_REAL :: Module
gHC_FLOAT :: Module
gHC_TOP_HANDLER :: Module
sYSTEM_IO :: Module
dYNAMIC :: Module
tYPEABLE :: Module
tYPEABLE_INTERNAL :: Module
gENERICS :: Module
rEAD_PREC :: Module
lEX :: Module
gHC_INT :: Module
gHC_WORD :: Module
mONAD :: Module
mONAD_FIX :: Module
mONAD_ZIP :: Module
mONAD_FAIL :: Module
aRROW :: Module
gHC_DESUGAR :: Module
rANDOM :: Module
gHC_EXTS :: Module
gHC_IS_LIST :: Module
cONTROL_EXCEPTION_BASE :: Module
gHC_GENERICS :: Module
gHC_TYPEERROR :: Module
gHC_TYPELITS :: Module
gHC_TYPELITS_INTERNAL :: Module
gHC_TYPENATS :: Module
gHC_TYPENATS_INTERNAL :: Module
dATA_COERCE :: Module
dEBUG_TRACE :: Module
uNSAFE_COERCE :: Module
fOREIGN_C_CONSTPTR :: Module
gHC_SRCLOC :: Module
gHC_STACK :: Module
gHC_STACK_TYPES :: Module
gHC_STATICPTR :: Module
gHC_STATICPTR_INTERNAL :: Module
gHC_FINGERPRINT_TYPE :: Module
gHC_OVER_LABELS :: Module
gHC_RECORDS :: Module
rOOT_MAIN :: Module
mkInteractiveModule :: Int -> Module
pRELUDE_NAME :: ModuleName
mAIN_NAME :: ModuleName
mkPrimModule :: FastString -> Module
mkBignumModule :: FastString -> Module
mkBaseModule :: FastString -> Module
mkBaseModule_ :: ModuleName -> Module
mkThisGhcModule :: FastString -> Module
mkThisGhcModule_ :: ModuleName -> Module
mkMainModule :: FastString -> Module
mkMainModule_ :: ModuleName -> Module
main_RDR_Unqual :: RdrName
eq_RDR :: RdrName
ge_RDR :: RdrName
le_RDR :: RdrName
lt_RDR :: RdrName
gt_RDR :: RdrName
compare_RDR :: RdrName
ltTag_RDR :: RdrName
eqTag_RDR :: RdrName
gtTag_RDR :: RdrName
eqClass_RDR :: RdrName
numClass_RDR :: RdrName
ordClass_RDR :: RdrName
enumClass_RDR :: RdrName
monadClass_RDR :: RdrName
map_RDR :: RdrName
append_RDR :: RdrName
foldr_RDR :: RdrName
build_RDR :: RdrName
returnM_RDR :: RdrName
bindM_RDR :: RdrName
failM_RDR :: RdrName
left_RDR :: RdrName
right_RDR :: RdrName
fromEnum_RDR :: RdrName
toEnum_RDR :: RdrName
enumFrom_RDR :: RdrName
enumFromTo_RDR :: RdrName
enumFromThen_RDR :: RdrName
enumFromThenTo_RDR :: RdrName
ratioDataCon_RDR :: RdrName
integerAdd_RDR :: RdrName
integerMul_RDR :: RdrName
ioDataCon_RDR :: RdrName
newStablePtr_RDR :: RdrName
bindIO_RDR :: RdrName
returnIO_RDR :: RdrName
fromInteger_RDR :: RdrName
fromRational_RDR :: RdrName
minus_RDR :: RdrName
times_RDR :: RdrName
plus_RDR :: RdrName
toInteger_RDR :: RdrName
toRational_RDR :: RdrName
fromIntegral_RDR :: RdrName
fromString_RDR :: RdrName
fromList_RDR :: RdrName
fromListN_RDR :: RdrName
toList_RDR :: RdrName
compose_RDR :: RdrName
and_RDR :: RdrName
not_RDR :: RdrName
dataToTag_RDR :: RdrName
succ_RDR :: RdrName
pred_RDR :: RdrName
minBound_RDR :: RdrName
maxBound_RDR :: RdrName
range_RDR :: RdrName
inRange_RDR :: RdrName
index_RDR :: RdrName
unsafeIndex_RDR :: RdrName
unsafeRangeSize_RDR :: RdrName
readList_RDR :: RdrName
readListDefault_RDR :: RdrName
readListPrec_RDR :: RdrName
readListPrecDefault_RDR :: RdrName
readPrec_RDR :: RdrName
parens_RDR :: RdrName
choose_RDR :: RdrName
lexP_RDR :: RdrName
expectP_RDR :: RdrName
readField_RDR :: RdrName
readFieldHash_RDR :: RdrName
readSymField_RDR :: RdrName
punc_RDR :: RdrName
ident_RDR :: RdrName
symbol_RDR :: RdrName
step_RDR :: RdrName
alt_RDR :: RdrName
reset_RDR :: RdrName
prec_RDR :: RdrName
pfail_RDR :: RdrName
showsPrec_RDR :: RdrName
shows_RDR :: RdrName
showString_RDR :: RdrName
showSpace_RDR :: RdrName
showCommaSpace_RDR :: RdrName
showParen_RDR :: RdrName
error_RDR :: RdrName
u1DataCon_RDR :: RdrName
par1DataCon_RDR :: RdrName
rec1DataCon_RDR :: RdrName
k1DataCon_RDR :: RdrName
m1DataCon_RDR :: RdrName
l1DataCon_RDR :: RdrName
r1DataCon_RDR :: RdrName
prodDataCon_RDR :: RdrName
comp1DataCon_RDR :: RdrName
unPar1_RDR :: RdrName
unRec1_RDR :: RdrName
unK1_RDR :: RdrName
unComp1_RDR :: RdrName
from_RDR :: RdrName
from1_RDR :: RdrName
to_RDR :: RdrName
to1_RDR :: RdrName
datatypeName_RDR :: RdrName
moduleName_RDR :: RdrName
packageName_RDR :: RdrName
isNewtypeName_RDR :: RdrName
selName_RDR :: RdrName
conName_RDR :: RdrName
conFixity_RDR :: RdrName
conIsRecord_RDR :: RdrName
prefixDataCon_RDR :: RdrName
infixDataCon_RDR :: RdrName
leftAssocDataCon_RDR :: RdrName
rightAssocDataCon_RDR :: RdrName
notAssocDataCon_RDR :: RdrName
uAddrDataCon_RDR :: RdrName
uCharDataCon_RDR :: RdrName
uDoubleDataCon_RDR :: RdrName
uFloatDataCon_RDR :: RdrName
uIntDataCon_RDR :: RdrName
uWordDataCon_RDR :: RdrName
uAddrHash_RDR :: RdrName
uCharHash_RDR :: RdrName
uDoubleHash_RDR :: RdrName
uFloatHash_RDR :: RdrName
uIntHash_RDR :: RdrName
uWordHash_RDR :: RdrName
fmap_RDR :: RdrName
replace_RDR :: RdrName
pure_RDR :: RdrName
ap_RDR :: RdrName
liftA2_RDR :: RdrName
foldable_foldr_RDR :: RdrName
foldMap_RDR :: RdrName
null_RDR :: RdrName
all_RDR :: RdrName
traverse_RDR :: RdrName
mempty_RDR :: RdrName
mappend_RDR :: RdrName
varQual_RDR :: Module -> FastString -> RdrName
tcQual_RDR :: Module -> FastString -> RdrName
clsQual_RDR :: Module -> FastString -> RdrName
dataQual_RDR :: Module -> FastString -> RdrName
wildCardName :: Name
runMainIOName :: Name
runRWName :: Name
orderingTyConName :: Name
ordLTDataConName :: Name
ordEQDataConName :: Name
ordGTDataConName :: Name
specTyConName :: Name
eitherTyConName :: Name
leftDataConName :: Name
rightDataConName :: Name
voidTyConName :: Name
v1TyConName :: Name
u1TyConName :: Name
par1TyConName :: Name
rec1TyConName :: Name
k1TyConName :: Name
m1TyConName :: Name
sumTyConName :: Name
prodTyConName :: Name
compTyConName :: Name
rTyConName :: Name
dTyConName :: Name
cTyConName :: Name
sTyConName :: Name
rec0TyConName :: Name
d1TyConName :: Name
c1TyConName :: Name
s1TyConName :: Name
repTyConName :: Name
rep1TyConName :: Name
uRecTyConName :: Name
uAddrTyConName :: Name
uCharTyConName :: Name
uDoubleTyConName :: Name
uFloatTyConName :: Name
uIntTyConName :: Name
uWordTyConName :: Name
prefixIDataConName :: Name
infixIDataConName :: Name
leftAssociativeDataConName :: Name
rightAssociativeDataConName :: Name
notAssociativeDataConName :: Name
sourceUnpackDataConName :: Name
sourceNoUnpackDataConName :: Name
noSourceUnpackednessDataConName :: Name
sourceLazyDataConName :: Name
sourceStrictDataConName :: Name
noSourceStrictnessDataConName :: Name
decidedLazyDataConName :: Name
decidedStrictDataConName :: Name
decidedUnpackDataConName :: Name
metaDataDataConName :: Name
metaConsDataConName :: Name
metaSelDataConName :: Name
divIntName :: Name
modIntName :: Name
cstringLengthName :: Name
eqStringName :: Name
unpackCStringName :: Name
unpackCStringAppendName :: Name
unpackCStringFoldrName :: Name
unpackCStringUtf8Name :: Name
unpackCStringAppendUtf8Name :: Name
unpackCStringFoldrUtf8Name :: Name
inlineIdName :: Name
eqClassName :: Name
eqName :: Name
ordClassName :: Name
geName :: Name
functorClassName :: Name
fmapName :: Name
monadClassName :: Name
thenMName :: Name
bindMName :: Name
returnMName :: Name
monadFailClassName :: Name
failMName :: Name
applicativeClassName :: Name
apAName :: Name
pureAName :: Name
thenAName :: Name
foldableClassName :: Name
traversableClassName :: Name
semigroupClassName :: Name
sappendName :: Name
monoidClassName :: Name
memptyName :: Name
mappendName :: Name
mconcatName :: Name
joinMName :: Name
alternativeClassName :: Name
joinMIdKey :: Unique
apAClassOpKey :: Unique
pureAClassOpKey :: Unique
thenAClassOpKey :: Unique
alternativeClassKey :: Unique
considerAccessibleName :: Name
dollarName :: Name
otherwiseIdName :: Name
foldrName :: Name
buildName :: Name
augmentName :: Name
mapName :: Name
appendName :: Name
assertName :: Name
fromStringName :: Name
numClassName :: Name
fromIntegerName :: Name
minusName :: Name
negateName :: Name
bnbVarQual :: String -> Unique -> Name
bnnVarQual :: String -> Unique -> Name
bniVarQual :: String -> Unique -> Name
bignatFromWordListName :: Name
bignatEqName :: Name
bignatCompareName :: Name
bignatCompareWordName :: Name
naturalToWordName :: Name
naturalPopCountName :: Name
naturalShiftRName :: Name
naturalShiftLName :: Name
naturalAddName :: Name
naturalSubName :: Name
naturalSubThrowName :: Name
naturalSubUnsafeName :: Name
naturalMulName :: Name
naturalQuotRemName :: Name
naturalQuotName :: Name
naturalRemName :: Name
naturalAndName :: Name
naturalAndNotName :: Name
naturalOrName :: Name
naturalXorName :: Name
naturalTestBitName :: Name
naturalBitName :: Name
naturalGcdName :: Name
naturalLcmName :: Name
naturalLog2Name :: Name
naturalLogBaseWordName :: Name
naturalLogBaseName :: Name
naturalPowModName :: Name
naturalSizeInBaseName :: Name
integerFromNaturalName :: Name
integerToNaturalClampName :: Name
integerToNaturalThrowName :: Name
integerToNaturalName :: Name
integerToWordName :: Name
integerToIntName :: Name
integerToWord64Name :: Name
integerToInt64Name :: Name
integerFromWordName :: Name
integerFromWord64Name :: Name
integerFromInt64Name :: Name
integerAddName :: Name
integerMulName :: Name
integerSubName :: Name
integerNegateName :: Name
integerAbsName :: Name
integerPopCountName :: Name
integerQuotName :: Name
integerRemName :: Name
integerDivName :: Name
integerModName :: Name
integerDivModName :: Name
integerQuotRemName :: Name
integerEncodeFloatName :: Name
integerEncodeDoubleName :: Name
integerGcdName :: Name
integerLcmName :: Name
integerAndName :: Name
integerOrName :: Name
integerXorName :: Name
integerComplementName :: Name
integerBitName :: Name
integerTestBitName :: Name
integerShiftLName :: Name
integerShiftRName :: Name
rationalTyConName :: Name
ratioTyConName :: Name
ratioDataConName :: Name
realClassName :: Name
integralClassName :: Name
realFracClassName :: Name
fractionalClassName :: Name
fromRationalName :: Name
toIntegerName :: Name
toRationalName :: Name
fromIntegralName :: Name
realToFracName :: Name
mkRationalBase2Name :: Name
mkRationalBase10Name :: Name
floatingClassName :: Name
realFloatClassName :: Name
integerToFloatName :: Name
integerToDoubleName :: Name
naturalToFloatName :: Name
naturalToDoubleName :: Name
rationalToFloatName :: Name
rationalToDoubleName :: Name
ixClassName :: Name
trModuleTyConName :: Name
trModuleDataConName :: Name
trNameTyConName :: Name
trNameSDataConName :: Name
trNameDDataConName :: Name
trTyConTyConName :: Name
trTyConDataConName :: Name
kindRepTyConName :: Name
kindRepTyConAppDataConName :: Name
kindRepVarDataConName :: Name
kindRepAppDataConName :: Name
kindRepFunDataConName :: Name
kindRepTYPEDataConName :: Name
kindRepTypeLitSDataConName :: Name
kindRepTypeLitDDataConName :: Name
typeLitSortTyConName :: Name
typeLitSymbolDataConName :: Name
typeLitNatDataConName :: Name
typeLitCharDataConName :: Name
typeableClassName :: Name
typeRepTyConName :: Name
someTypeRepTyConName :: Name
someTypeRepDataConName :: Name
typeRepIdName :: Name
mkTrTypeName :: Name
mkTrConName :: Name
mkTrAppName :: Name
mkTrFunName :: Name
typeNatTypeRepName :: Name
typeSymbolTypeRepName :: Name
typeCharTypeRepName :: Name
trGhcPrimModuleName :: Name
starKindRepName :: Name
starArrStarKindRepName :: Name
starArrStarArrStarKindRepName :: Name
constraintKindRepName :: Name
withDictClassName :: Name
nonEmptyTyConName :: Name
errorMessageTypeErrorFamName :: Name
typeErrorTextDataConName :: Name
typeErrorAppendDataConName :: Name
typeErrorVAppendDataConName :: Name
typeErrorShowTypeDataConName :: Name
unsafeEqualityProofName :: Name
unsafeEqualityTyConName :: Name
unsafeReflDataConName :: Name
unsafeCoercePrimName :: Name
toDynName :: Name
dataClassName :: Name
assertErrorName :: Name
traceName :: Name
enumClassName :: Name
enumFromName :: Name
enumFromToName :: Name
enumFromThenName :: Name
enumFromThenToName :: Name
boundedClassName :: Name
concatName :: Name
filterName :: Name
zipName :: Name
isListClassName :: Name
fromListName :: Name
fromListNName :: Name
toListName :: Name
getFieldName :: Name
setFieldName :: Name
showClassName :: Name
readClassName :: Name
genClassName :: Name
gen1ClassName :: Name
datatypeClassName :: Name
constructorClassName :: Name
selectorClassName :: Name
genericClassNames :: [Name]
ghciIoClassName :: Name
ghciStepIoMName :: Name
ioTyConName :: Name
ioDataConName :: Name
thenIOName :: Name
bindIOName :: Name
returnIOName :: Name
failIOName :: Name
printName :: Name
int8TyConName :: Name
int16TyConName :: Name
int32TyConName :: Name
int64TyConName :: Name
word8TyConName :: Name
word16TyConName :: Name
word32TyConName :: Name
word64TyConName :: Name
ptrTyConName :: Name
funPtrTyConName :: Name
stablePtrTyConName :: Name
newStablePtrName :: Name
monadFixClassName :: Name
mfixName :: Name
arrAName :: Name
composeAName :: Name
firstAName :: Name
appAName :: Name
choiceAName :: Name
loopAName :: Name
guardMName :: Name
liftMName :: Name
mzipName :: Name
toAnnotationWrapperName :: Name
monadPlusClassName :: Name
isStringClassName :: Name
knownNatClassName :: Name
knownSymbolClassName :: Name
knownCharClassName :: Name
fromLabelClassOpName :: Name
ipClassName :: Name
hasFieldClassName :: Name
callStackTyConName :: Name
emptyCallStackName :: Name
pushCallStackName :: Name
srcLocDataConName :: Name
pLUGINS :: Module
pluginTyConName :: Name
frontendPluginTyConName :: Name
makeStaticName :: Name
staticPtrInfoTyConName :: Name
staticPtrInfoDataConName :: Name
staticPtrTyConName :: Name
staticPtrDataConName :: Name
fromStaticPtrName :: Name
fingerprintDataConName :: Name
constPtrConName :: Name
varQual :: Module -> FastString -> Unique -> Name
tcQual :: Module -> FastString -> Unique -> Name
clsQual :: Module -> FastString -> Unique -> Name
dcQual :: Module -> FastString -> Unique -> Name
mk_known_key_name :: NameSpace -> Module -> FastString -> Unique -> Name
boundedClassKey :: Unique
enumClassKey :: Unique
eqClassKey :: Unique
floatingClassKey :: Unique
fractionalClassKey :: Unique
integralClassKey :: Unique
monadClassKey :: Unique
dataClassKey :: Unique
functorClassKey :: Unique
numClassKey :: Unique
ordClassKey :: Unique
readClassKey :: Unique
realClassKey :: Unique
realFloatClassKey :: Unique
realFracClassKey :: Unique
showClassKey :: Unique
ixClassKey :: Unique
typeableClassKey :: Unique
withDictClassKey :: Unique
monadFixClassKey :: Unique
monadFailClassKey :: Unique
monadPlusClassKey :: Unique
randomClassKey :: Unique
randomGenClassKey :: Unique
isStringClassKey :: Unique
applicativeClassKey :: Unique
foldableClassKey :: Unique
traversableClassKey :: Unique
genClassKey :: Unique
gen1ClassKey :: Unique
datatypeClassKey :: Unique
constructorClassKey :: Unique
selectorClassKey :: Unique
knownNatClassNameKey :: Unique
knownSymbolClassNameKey :: Unique
knownCharClassNameKey :: Unique
ghciIoClassKey :: Unique
semigroupClassKey :: Unique
monoidClassKey :: Unique
ipClassKey :: Unique
hasFieldClassNameKey :: Unique
addrPrimTyConKey :: Unique
arrayPrimTyConKey :: Unique
boolTyConKey :: Unique
byteArrayPrimTyConKey :: Unique
stringTyConKey :: Unique
charPrimTyConKey :: Unique
charTyConKey :: Unique
doublePrimTyConKey :: Unique
doubleTyConKey :: Unique
floatPrimTyConKey :: Unique
floatTyConKey :: Unique
fUNTyConKey :: Unique
intPrimTyConKey :: Unique
intTyConKey :: Unique
int8PrimTyConKey :: Unique
int8TyConKey :: Unique
int16PrimTyConKey :: Unique
int16TyConKey :: Unique
int32PrimTyConKey :: Unique
int32TyConKey :: Unique
int64PrimTyConKey :: Unique
int64TyConKey :: Unique
integerTyConKey :: Unique
naturalTyConKey :: Unique
listTyConKey :: Unique
foreignObjPrimTyConKey :: Unique
maybeTyConKey :: Unique
weakPrimTyConKey :: Unique
mutableArrayPrimTyConKey :: Unique
mutableByteArrayPrimTyConKey :: Unique
orderingTyConKey :: Unique
mVarPrimTyConKey :: Unique
ioPortPrimTyConKey :: Unique
ratioTyConKey :: Unique
rationalTyConKey :: Unique
realWorldTyConKey :: Unique
stablePtrPrimTyConKey :: Unique
stablePtrTyConKey :: Unique
eqTyConKey :: Unique
heqTyConKey :: Unique
ctArrowTyConKey :: Unique
ccArrowTyConKey :: Unique
tcArrowTyConKey :: Unique
statePrimTyConKey :: Unique
stableNamePrimTyConKey :: Unique
stableNameTyConKey :: Unique
eqPrimTyConKey :: Unique
eqReprPrimTyConKey :: Unique
eqPhantPrimTyConKey :: Unique
mutVarPrimTyConKey :: Unique
ioTyConKey :: Unique
wordPrimTyConKey :: Unique
wordTyConKey :: Unique
word8PrimTyConKey :: Unique
word8TyConKey :: Unique
word16PrimTyConKey :: Unique
word16TyConKey :: Unique
word32PrimTyConKey :: Unique
word32TyConKey :: Unique
word64PrimTyConKey :: Unique
word64TyConKey :: Unique
kindConKey :: Unique
boxityConKey :: Unique
typeConKey :: Unique
threadIdPrimTyConKey :: Unique
bcoPrimTyConKey :: Unique
ptrTyConKey :: Unique
funPtrTyConKey :: Unique
tVarPrimTyConKey :: Unique
compactPrimTyConKey :: Unique
stackSnapshotPrimTyConKey :: Unique
promptTagPrimTyConKey :: Unique
eitherTyConKey :: Unique
voidTyConKey :: Unique
nonEmptyTyConKey :: Unique
dictTyConKey :: Unique
liftedTypeKindTyConKey :: Unique
unliftedTypeKindTyConKey :: Unique
tYPETyConKey :: Unique
cONSTRAINTTyConKey :: Unique
constraintKindTyConKey :: Unique
levityTyConKey :: Unique
runtimeRepTyConKey :: Unique
vecCountTyConKey :: Unique
vecElemTyConKey :: Unique
liftedRepTyConKey :: Unique
unliftedRepTyConKey :: Unique
zeroBitRepTyConKey :: Unique
zeroBitTypeTyConKey :: Unique
pluginTyConKey :: Unique
frontendPluginTyConKey :: Unique
trTyConTyConKey :: Unique
trModuleTyConKey :: Unique
trNameTyConKey :: Unique
kindRepTyConKey :: Unique
typeLitSortTyConKey :: Unique
v1TyConKey :: Unique
u1TyConKey :: Unique
par1TyConKey :: Unique
rec1TyConKey :: Unique
k1TyConKey :: Unique
m1TyConKey :: Unique
sumTyConKey :: Unique
prodTyConKey :: Unique
compTyConKey :: Unique
rTyConKey :: Unique
dTyConKey :: Unique
cTyConKey :: Unique
sTyConKey :: Unique
rec0TyConKey :: Unique
d1TyConKey :: Unique
c1TyConKey :: Unique
s1TyConKey :: Unique
repTyConKey :: Unique
rep1TyConKey :: Unique
uRecTyConKey :: Unique
uAddrTyConKey :: Unique
uCharTyConKey :: Unique
uDoubleTyConKey :: Unique
uFloatTyConKey :: Unique
uIntTyConKey :: Unique
uWordTyConKey :: Unique
errorMessageTypeErrorFamKey :: Unique
coercibleTyConKey :: Unique
proxyPrimTyConKey :: Unique
specTyConKey :: Unique
anyTyConKey :: Unique
smallArrayPrimTyConKey :: Unique
smallMutableArrayPrimTyConKey :: Unique
staticPtrTyConKey :: Unique
staticPtrInfoTyConKey :: Unique
callStackTyConKey :: Unique
typeRepTyConKey :: Unique
someTypeRepTyConKey :: Unique
someTypeRepDataConKey :: Unique
typeSymbolAppendFamNameKey :: Unique
unsafeEqualityTyConKey :: Unique
multiplicityTyConKey :: Unique
unrestrictedFunTyConKey :: Unique
multMulTyConKey :: Unique
int8X16PrimTyConKey :: Unique
int16X8PrimTyConKey :: Unique
int32X4PrimTyConKey :: Unique
int64X2PrimTyConKey :: Unique
int8X32PrimTyConKey :: Unique
int16X16PrimTyConKey :: Unique
int32X8PrimTyConKey :: Unique
int64X4PrimTyConKey :: Unique
int8X64PrimTyConKey :: Unique
int16X32PrimTyConKey :: Unique
int32X16PrimTyConKey :: Unique
int64X8PrimTyConKey :: Unique
word8X16PrimTyConKey :: Unique
word16X8PrimTyConKey :: Unique
word32X4PrimTyConKey :: Unique
word64X2PrimTyConKey :: Unique
word8X32PrimTyConKey :: Unique
word16X16PrimTyConKey :: Unique
word32X8PrimTyConKey :: Unique
word64X4PrimTyConKey :: Unique
word8X64PrimTyConKey :: Unique
word16X32PrimTyConKey :: Unique
word32X16PrimTyConKey :: Unique
word64X8PrimTyConKey :: Unique
floatX4PrimTyConKey :: Unique
doubleX2PrimTyConKey :: Unique
floatX8PrimTyConKey :: Unique
doubleX4PrimTyConKey :: Unique
floatX16PrimTyConKey :: Unique
doubleX8PrimTyConKey :: Unique
typeSymbolKindConNameKey :: Unique
typeCharKindConNameKey :: Unique
typeNatAddTyFamNameKey :: Unique
typeNatMulTyFamNameKey :: Unique
typeNatExpTyFamNameKey :: Unique
typeNatSubTyFamNameKey :: Unique
typeSymbolCmpTyFamNameKey :: Unique
typeNatCmpTyFamNameKey :: Unique
typeCharCmpTyFamNameKey :: Unique
typeLeqCharTyFamNameKey :: Unique
typeNatDivTyFamNameKey :: Unique
typeNatModTyFamNameKey :: Unique
typeNatLogTyFamNameKey :: Unique
typeConsSymbolTyFamNameKey :: Unique
typeUnconsSymbolTyFamNameKey :: Unique
typeCharToNatTyFamNameKey :: Unique
typeNatToCharTyFamNameKey :: Unique
constPtrTyConKey :: Unique
charDataConKey :: Unique
consDataConKey :: Unique
doubleDataConKey :: Unique
falseDataConKey :: Unique
floatDataConKey :: Unique
intDataConKey :: Unique
nothingDataConKey :: Unique
justDataConKey :: Unique
eqDataConKey :: Unique
nilDataConKey :: Unique
ratioDataConKey :: Unique
word8DataConKey :: Unique
stableNameDataConKey :: Unique
trueDataConKey :: Unique
wordDataConKey :: Unique
ioDataConKey :: Unique
heqDataConKey :: Unique
crossDataConKey :: Unique
inlDataConKey :: Unique
inrDataConKey :: Unique
genUnitDataConKey :: Unique
leftDataConKey :: Unique
rightDataConKey :: Unique
ordLTDataConKey :: Unique
ordEQDataConKey :: Unique
ordGTDataConKey :: Unique
mkDictDataConKey :: Unique
coercibleDataConKey :: Unique
staticPtrDataConKey :: Unique
staticPtrInfoDataConKey :: Unique
fingerprintDataConKey :: Unique
srcLocDataConKey :: Unique
trTyConDataConKey :: Unique
trModuleDataConKey :: Unique
trNameSDataConKey :: Unique
trNameDDataConKey :: Unique
trGhcPrimModuleKey :: Unique
typeErrorTextDataConKey :: Unique
typeErrorAppendDataConKey :: Unique
typeErrorVAppendDataConKey :: Unique
typeErrorShowTypeDataConKey :: Unique
prefixIDataConKey :: Unique
infixIDataConKey :: Unique
leftAssociativeDataConKey :: Unique
rightAssociativeDataConKey :: Unique
notAssociativeDataConKey :: Unique
sourceUnpackDataConKey :: Unique
sourceNoUnpackDataConKey :: Unique
noSourceUnpackednessDataConKey :: Unique
sourceLazyDataConKey :: Unique
sourceStrictDataConKey :: Unique
noSourceStrictnessDataConKey :: Unique
decidedLazyDataConKey :: Unique
decidedStrictDataConKey :: Unique
decidedUnpackDataConKey :: Unique
metaDataDataConKey :: Unique
metaConsDataConKey :: Unique
metaSelDataConKey :: Unique
vecRepDataConKey :: Unique
tupleRepDataConKey :: Unique
sumRepDataConKey :: Unique
boxedRepDataConKey :: Unique
boxedRepDataConTyConKey :: Unique
tupleRepDataConTyConKey :: Unique
runtimeRepSimpleDataConKeys :: [Unique]
liftedDataConKey :: Unique
unliftedDataConKey :: Unique
vecCountDataConKeys :: [Unique]
vecElemDataConKeys :: [Unique]
kindRepTyConAppDataConKey :: Unique
kindRepVarDataConKey :: Unique
kindRepAppDataConKey :: Unique
kindRepFunDataConKey :: Unique
kindRepTYPEDataConKey :: Unique
kindRepTypeLitSDataConKey :: Unique
kindRepTypeLitDDataConKey :: Unique
typeLitSymbolDataConKey :: Unique
typeLitNatDataConKey :: Unique
typeLitCharDataConKey :: Unique
unsafeReflDataConKey :: Unique
oneDataConKey :: Unique
manyDataConKey :: Unique
integerISDataConKey :: Unique
integerINDataConKey :: Unique
integerIPDataConKey :: Unique
naturalNSDataConKey :: Unique
naturalNBDataConKey :: Unique
wildCardKey :: Unique
absentErrorIdKey :: Unique
absentConstraintErrorIdKey :: Unique
augmentIdKey :: Unique
appendIdKey :: Unique
buildIdKey :: Unique
foldrIdKey :: Unique
recSelErrorIdKey :: Unique
seqIdKey :: Unique
absentSumFieldErrorIdKey :: Unique
eqStringIdKey :: Unique
noMethodBindingErrorIdKey :: Unique
nonExhaustiveGuardsErrorIdKey :: Unique
impossibleErrorIdKey :: Unique
impossibleConstraintErrorIdKey :: Unique
patErrorIdKey :: Unique
realWorldPrimIdKey :: Unique
recConErrorIdKey :: Unique
unpackCStringUtf8IdKey :: Unique
unpackCStringAppendUtf8IdKey :: Unique
unpackCStringFoldrUtf8IdKey :: Unique
unpackCStringIdKey :: Unique
unpackCStringAppendIdKey :: Unique
unpackCStringFoldrIdKey :: Unique
voidPrimIdKey :: Unique
typeErrorIdKey :: Unique
divIntIdKey :: Unique
modIntIdKey :: Unique
cstringLengthIdKey :: Unique
concatIdKey :: Unique
filterIdKey :: Unique
zipIdKey :: Unique
bindIOIdKey :: Unique
returnIOIdKey :: Unique
newStablePtrIdKey :: Unique
printIdKey :: Unique
failIOIdKey :: Unique
nullAddrIdKey :: Unique
voidArgIdKey :: Unique
otherwiseIdKey :: Unique
assertIdKey :: Unique
leftSectionKey :: Unique
rightSectionKey :: Unique
rootMainKey :: Unique
runMainKey :: Unique
thenIOIdKey :: Unique
lazyIdKey :: Unique
assertErrorIdKey :: Unique
oneShotKey :: Unique
runRWKey :: Unique
traceKey :: Unique
nospecIdKey :: Unique
inlineIdKey :: Unique
mapIdKey :: Unique
dollarIdKey :: Unique
coercionTokenIdKey :: Unique
considerAccessibleIdKey :: Unique
noinlineIdKey :: Unique
noinlineConstraintIdKey :: Unique
integerToFloatIdKey :: Unique
integerToDoubleIdKey :: Unique
naturalToFloatIdKey :: Unique
naturalToDoubleIdKey :: Unique
rationalToFloatIdKey :: Unique
rationalToDoubleIdKey :: Unique
coerceKey :: Unique
unboundKey :: Unique
fromIntegerClassOpKey :: Unique
minusClassOpKey :: Unique
fromRationalClassOpKey :: Unique
enumFromClassOpKey :: Unique
enumFromThenClassOpKey :: Unique
enumFromToClassOpKey :: Unique
enumFromThenToClassOpKey :: Unique
eqClassOpKey :: Unique
geClassOpKey :: Unique
negateClassOpKey :: Unique
bindMClassOpKey :: Unique
thenMClassOpKey :: Unique
fmapClassOpKey :: Unique
returnMClassOpKey :: Unique
mfixIdKey :: Unique
failMClassOpKey :: Unique
fromLabelClassOpKey :: Unique
arrAIdKey :: Unique
composeAIdKey :: Unique
firstAIdKey :: Unique
appAIdKey :: Unique
choiceAIdKey :: Unique
loopAIdKey :: Unique
fromStringClassOpKey :: Unique
toAnnotationWrapperIdKey :: Unique
fromIntegralIdKey :: Unique
realToFracIdKey :: Unique
toIntegerClassOpKey :: Unique
toRationalClassOpKey :: Unique
guardMIdKey :: Unique
liftMIdKey :: Unique
mzipIdKey :: Unique
ghciStepIoMClassOpKey :: Unique
isListClassKey :: Unique
fromListClassOpKey :: Unique
fromListNClassOpKey :: Unique
toListClassOpKey :: Unique
proxyHashKey :: Unique
mkTyConKey :: Unique
mkTrTypeKey :: Unique
mkTrConKey :: Unique
mkTrAppKey :: Unique
typeNatTypeRepKey :: Unique
typeSymbolTypeRepKey :: Unique
typeCharTypeRepKey :: Unique
typeRepIdKey :: Unique
mkTrFunKey :: Unique
trTYPEKey :: Unique
trTYPE'PtrRepLiftedKey :: Unique
trRuntimeRepKey :: Unique
tr'PtrRepLiftedKey :: Unique
trLiftedRepKey :: Unique
starKindRepKey :: Unique
starArrStarKindRepKey :: Unique
starArrStarArrStarKindRepKey :: Unique
constraintKindRepKey :: Unique
toDynIdKey :: Unique
bitIntegerIdKey :: Unique
eqSCSelIdKey :: Unique
heqSCSelIdKey :: Unique
coercibleSCSelIdKey :: Unique
sappendClassOpKey :: Unique
memptyClassOpKey :: Unique
mappendClassOpKey :: Unique
mconcatClassOpKey :: Unique
emptyCallStackKey :: Unique
pushCallStackKey :: Unique
fromStaticPtrClassOpKey :: Unique
makeStaticKey :: Unique
unsafeEqualityProofIdKey :: Unique
unsafeCoercePrimIdKey :: Unique
getFieldClassOpKey :: Unique
setFieldClassOpKey :: Unique
integerFromNaturalIdKey :: Unique
integerToNaturalClampIdKey :: Unique
integerToNaturalThrowIdKey :: Unique
integerToNaturalIdKey :: Unique
integerToWordIdKey :: Unique
integerToIntIdKey :: Unique
integerToWord64IdKey :: Unique
integerToInt64IdKey :: Unique
integerAddIdKey :: Unique
integerMulIdKey :: Unique
integerSubIdKey :: Unique
integerNegateIdKey :: Unique
integerAbsIdKey :: Unique
integerPopCountIdKey :: Unique
integerQuotIdKey :: Unique
integerRemIdKey :: Unique
integerDivIdKey :: Unique
integerModIdKey :: Unique
integerDivModIdKey :: Unique
integerQuotRemIdKey :: Unique
integerEncodeFloatIdKey :: Unique
integerEncodeDoubleIdKey :: Unique
integerGcdIdKey :: Unique
integerLcmIdKey :: Unique
integerAndIdKey :: Unique
integerOrIdKey :: Unique
integerXorIdKey :: Unique
integerComplementIdKey :: Unique
integerBitIdKey :: Unique
integerTestBitIdKey :: Unique
integerShiftLIdKey :: Unique
integerShiftRIdKey :: Unique
integerFromWordIdKey :: Unique
integerFromWord64IdKey :: Unique
integerFromInt64IdKey :: Unique
naturalToWordIdKey :: Unique
naturalPopCountIdKey :: Unique
naturalShiftRIdKey :: Unique
naturalShiftLIdKey :: Unique
naturalAddIdKey :: Unique
naturalSubIdKey :: Unique
naturalSubThrowIdKey :: Unique
naturalSubUnsafeIdKey :: Unique
naturalMulIdKey :: Unique
naturalQuotRemIdKey :: Unique
naturalQuotIdKey :: Unique
naturalRemIdKey :: Unique
naturalAndIdKey :: Unique
naturalAndNotIdKey :: Unique
naturalOrIdKey :: Unique
naturalXorIdKey :: Unique
naturalTestBitIdKey :: Unique
naturalBitIdKey :: Unique
naturalGcdIdKey :: Unique
naturalLcmIdKey :: Unique
naturalLog2IdKey :: Unique
naturalLogBaseWordIdKey :: Unique
naturalLogBaseIdKey :: Unique
naturalPowModIdKey :: Unique
naturalSizeInBaseIdKey :: Unique
bignatFromWordListIdKey :: Unique
bignatEqIdKey :: Unique
bignatCompareIdKey :: Unique
bignatCompareWordIdKey :: Unique
mkRationalBase2IdKey :: Unique
mkRationalBase10IdKey :: Unique
numericClassKeys :: [Unique]
fractionalClassKeys :: [Unique]
standardClassKeys :: [Unique]
derivableClassKeys :: [Unique]
interactiveClassNames :: [Name]
interactiveClassKeys :: [Unique]
-- | Should this name be considered in-scope, even though it technically
-- isn't?
--
-- This ensures that we don't filter out information because, e.g.,
-- Data.Kind.Type isn't imported.
--
-- See Note [pretendNameIsInScope].
pretendNameIsInScope :: Name -> Bool
classMinimalDef :: Class -> ClassMinimalDef
mkClass :: Name -> [TyVar] -> [FunDep TyVar] -> [PredType] -> [Id] -> [ClassATItem] -> [ClassOpItem] -> ClassMinimalDef -> TyCon -> Class
mkAbstractClass :: Name -> [TyVar] -> [FunDep TyVar] -> TyCon -> Class
classArity :: Class -> Arity
classAllSelIds :: Class -> [Id]
classSCSelIds :: Class -> [Id]
classSCSelId :: Class -> Int -> Id
classMethods :: Class -> [Id]
classOpItems :: Class -> [ClassOpItem]
classATs :: Class -> [TyCon]
classATItems :: Class -> [ClassATItem]
classSCTheta :: Class -> [PredType]
classTvsFds :: Class -> ([TyVar], [FunDep TyVar])
classHasFds :: Class -> Bool
classBigSig :: Class -> ([TyVar], [PredType], [Id], [ClassOpItem])
classExtraBigSig :: Class -> ([TyVar], [FunDep TyVar], [PredType], [Id], [ClassATItem], [ClassOpItem])
isAbstractClass :: Class -> Bool
pprDefMethInfo :: DefMethInfo -> SDoc
pprFundeps :: Outputable a => [FunDep a] -> SDoc
pprFunDep :: Outputable a => FunDep a -> SDoc
-- | Maps a label to information about the field
algTcFields :: TyConDetails -> FieldLabelEnv
mkAnonTyConBinder :: TyVar -> TyConBinder
mkAnonTyConBinders :: [TyVar] -> [TyConBinder]
mkInvisAnonTyConBinder :: TyVar -> TyConBinder
mkNamedTyConBinder :: ForAllTyFlag -> TyVar -> TyConBinder
mkNamedTyConBinders :: ForAllTyFlag -> [TyVar] -> [TyConBinder]
-- | Make a Required TyConBinder. It chooses between NamedTCB and AnonTCB
-- based on whether the tv is mentioned in the dependent set
mkRequiredTyConBinder :: TyCoVarSet -> TyVar -> TyConBinder
tyConBinderForAllTyFlag :: TyConBinder -> ForAllTyFlag
tyConBndrVisForAllTyFlag :: TyConBndrVis -> ForAllTyFlag
isNamedTyConBinder :: TyConBinder -> Bool
isVisibleTyConBinder :: VarBndr tv TyConBndrVis -> Bool
isVisibleTcbVis :: TyConBndrVis -> Bool
isInvisibleTyConBinder :: VarBndr tv TyConBndrVis -> Bool
mkTyConKind :: [TyConBinder] -> Kind -> Kind
tyConInvisTVBinders :: [TyConBinder] -> [InvisTVBinder]
tyConVisibleTyVars :: TyCon -> [TyVar]
-- | Create an AlgTyConRhs from the data constructors, for a
-- potentially levity-polymorphic datatype (with
-- UnliftedDatatypes).
mkLevPolyDataTyConRhs :: Bool -> Bool -> [DataCon] -> AlgTyConRhs
-- | Create an AlgTyConRhs from the data constructors.
--
-- Use mkLevPolyDataConRhs if the datatype can be
-- levity-polymorphic or if it comes from a "data type" declaration
mkDataTyConRhs :: [DataCon] -> AlgTyConRhs
-- | Extract those DataCons that we are able to learn about. Note
-- that visibility in this sense does not correspond to visibility in the
-- context of any particular user program!
visibleDataCons :: AlgTyConRhs -> [DataCon]
isNoParent :: AlgTyConFlav -> Bool
-- | The name (and defining module) for the Typeable representation (TyCon)
-- of a type constructor.
--
-- See Note [Grand plan for Typeable] in GHC.Tc.Instance.Typeable.
tyConRepModOcc :: Module -> OccName -> (Module, OccName)
isVoidRep :: PrimRep -> Bool
isGcPtrRep :: PrimRep -> Bool
primRepCompatible :: Platform -> PrimRep -> PrimRep -> Bool
primRepsCompatible :: Platform -> [PrimRep] -> [PrimRep] -> Bool
-- | The size of a PrimRep in bytes.
--
-- This applies also when used in a constructor, where we allow packing
-- the fields. For instance, in data Foo = Foo Float# Float# the
-- two fields will take only 8 bytes, which for 64-bit arch will be equal
-- to 1 word. See also mkVirtHeapOffsetsWithPadding for details of how
-- data fields are laid out.
primRepSizeB :: Platform -> PrimRep -> Int
primElemRepSizeB :: Platform -> PrimElemRep -> Int
primElemRepToPrimRep :: PrimElemRep -> PrimRep
-- | Return if Rep stands for floating type, returns Nothing for vector
-- types.
primRepIsFloat :: PrimRep -> Maybe Bool
primRepIsWord :: PrimRep -> Bool
primRepIsInt :: PrimRep -> Bool
-- | The labels for the fields of this particular TyCon
tyConFieldLabels :: TyCon -> [FieldLabel]
-- | Look up a field label belonging to this TyCon
lookupTyConFieldLabel :: FieldLabelString -> TyCon -> Maybe FieldLabel
-- | This is the making of an algebraic TyCon.
mkAlgTyCon :: Name -> [TyConBinder] -> Kind -> [Role] -> Maybe CType -> [PredType] -> AlgTyConRhs -> AlgTyConFlav -> Bool -> TyCon
-- | Simpler specialization of mkAlgTyCon for classes
mkClassTyCon :: Name -> [TyConBinder] -> [Role] -> AlgTyConRhs -> Class -> Name -> TyCon
mkTupleTyCon :: Name -> [TyConBinder] -> Kind -> DataCon -> TupleSort -> AlgTyConFlav -> TyCon
mkSumTyCon :: Name -> [TyConBinder] -> Kind -> [DataCon] -> AlgTyConFlav -> TyCon
-- | Makes a tycon suitable for use during type-checking. It stores a
-- variety of details about the definition of the TyCon, but no
-- right-hand side. It lives only during the type-checking of a
-- mutually-recursive group of tycons; it is then zonked to a proper
-- TyCon in zonkTcTyCon. See also Note [Kind checking recursive type and
-- class declarations] in GHC.Tc.TyCl.
mkTcTyCon :: Name -> [TyConBinder] -> Kind -> [(Name, TcTyVar)] -> Bool -> TyConFlavour -> TyCon
-- | No scoped type variables (to be used with mkTcTyCon).
noTcTyConScopedTyVars :: [(Name, TcTyVar)]
-- | Create an primitive TyCon, such as Int#, Type
-- or RealWorld# Primitive TyCons are marshalable iff not
-- lifted. If you'd like to change this, modify marshalablePrimTyCon.
mkPrimTyCon :: Name -> [TyConBinder] -> Kind -> [Role] -> TyCon
-- | Create a type synonym TyCon
mkSynonymTyCon :: Name -> [TyConBinder] -> Kind -> [Role] -> Type -> Bool -> Bool -> Bool -> TyCon
-- | Create a type family TyCon
mkFamilyTyCon :: Name -> [TyConBinder] -> Kind -> Maybe Name -> FamTyConFlav -> Maybe Class -> Injectivity -> TyCon
-- | Create a promoted data constructor TyCon Somewhat dodgily, we
-- give it the same Name as the data constructor itself; when we
-- pretty-print the TyCon we add a quote; see the Outputable TyCon
-- instance
mkPromotedDataCon :: DataCon -> Name -> TyConRepName -> [TyConPiTyBinder] -> Kind -> [Role] -> PromDataConInfo -> TyCon
-- | Test if the TyCon is algebraic but abstract (invisible data
-- constructors)
isAbstractTyCon :: TyCon -> Bool
-- | Does this TyCon represent something that cannot be defined in
-- Haskell?
isPrimTyCon :: TyCon -> Bool
-- | Returns True if the supplied TyCon resulted from
-- either a data or newtype declaration
isAlgTyCon :: TyCon -> Bool
-- | Returns True for vanilla AlgTyCons -- that is, those created
-- with a data or newtype declaration.
isVanillaAlgTyCon :: TyCon -> Bool
-- | Returns True for data types that are definitely
-- represented by heap-allocated constructors. These are scrutinised by
-- Core-level case expressions, and they get info tables
-- allocated for them.
--
-- Generally, the function will be true for all data types and
-- false for newtypes, unboxed tuples, unboxed sums and type
-- family TyCons. But it is not guaranteed to return True
-- in all cases that it could.
--
-- NB: for a data type family, only the instance TyCons get
-- an info table. The family declaration TyCon does not
isDataTyCon :: TyCon -> Bool
-- | Was this TyCon declared as "type data"? See Note [Type data
-- declarations] in GHC.Rename.Module.
isTypeDataTyCon :: TyCon -> Bool
-- | isInjectiveTyCon is true of TyCons for which this
-- property holds (where r is the role passed in): If (T a1 b1 c1) ~r (T
-- a2 b2 c2), then (a1 ~r1 a2), (b1 ~r2 b2), and (c1 ~r3 c2) (where r1,
-- r2, and r3, are the roles given by tyConRolesX tc r) See also Note
-- [Decomposing TyConApp equalities] in GHC.Tc.Solver.Canonical
isInjectiveTyCon :: TyCon -> Role -> Bool
-- | isGenerativeTyCon is true of TyCons for which this
-- property holds (where r is the role passed in): If (T tys ~r t), then
-- (t's head ~r T). See also Note [Decomposing TyConApp equalities] in
-- GHC.Tc.Solver.Canonical
isGenerativeTyCon :: TyCon -> Role -> Bool
-- | Is this an AlgTyConRhs of a TyCon that is generative and
-- injective with respect to representational equality?
isGenInjAlgRhs :: AlgTyConRhs -> Bool
-- | Is this TyCon that for a newtype
isNewTyCon :: TyCon -> Bool
-- | Take a TyCon apart into the TyVars it scopes over, the
-- Type it expands into, and (possibly) a coercion from the
-- representation type to the newtype. Returns Nothing
-- if this is not possible.
unwrapNewTyCon_maybe :: TyCon -> Maybe ([TyVar], Type, CoAxiom Unbranched)
unwrapNewTyConEtad_maybe :: TyCon -> Maybe ([TyVar], Type, CoAxiom Unbranched)
-- | Is this a TyCon representing a regular H98 type synonym
-- (type)?
isTypeSynonymTyCon :: TyCon -> Bool
isTauTyCon :: TyCon -> Bool
-- | Is this tycon neither a type family nor a synonym that expands to a
-- type family?
isFamFreeTyCon :: TyCon -> Bool
-- | Is this a forgetful type synonym? If this is a type synonym whose RHS
-- does not mention one (or more) of its bound variables, returns True.
-- Thus, False means that all bound variables appear on the RHS; True may
-- not mean anything, as the test to set this flag is conservative.
isForgetfulSynTyCon :: TyCon -> Bool
-- | True iff we can decompose (T a b c) into ((T a b) c) I.e. is it
-- injective and generative w.r.t nominal equality? That is, if (T a b)
-- ~N d e f, is it always the case that (T ~N d), (a ~N e) and (b ~N f)?
-- Specifically NOT true of synonyms (open and otherwise)
--
-- It'd be unusual to call tyConMustBeSaturated on a regular H98 type
-- synonym, because you should probably have expanded it first But
-- regardless, it's not decomposable
tyConMustBeSaturated :: TyCon -> Bool
-- | Is this an algebraic TyCon declared with the GADT syntax?
isGadtSyntaxTyCon :: TyCon -> Bool
-- | Is this an algebraic TyCon which is just an enumeration of
-- values?
isEnumerationTyCon :: TyCon -> Bool
-- | Is this a TyCon, synonym or otherwise, that defines a family?
isFamilyTyCon :: TyCon -> Bool
-- | Is this a TyCon, synonym or otherwise, that defines a family
-- with instances?
isOpenFamilyTyCon :: TyCon -> Bool
-- | Is this a synonym TyCon that can have may have further
-- instances appear?
isTypeFamilyTyCon :: TyCon -> Bool
-- | Is this a synonym TyCon that can have may have further
-- instances appear?
isDataFamilyTyCon :: TyCon -> Bool
-- | Is this an open type family TyCon?
isOpenTypeFamilyTyCon :: TyCon -> Bool
-- | Is this a non-empty closed type family? Returns Nothing for
-- abstract or empty closed families.
isClosedSynFamilyTyConWithAxiom_maybe :: TyCon -> Maybe (CoAxiom Branched)
isBuiltInSynFamTyCon_maybe :: TyCon -> Maybe BuiltInSynFamily
-- | Extract type variable naming the result of injective type family
tyConFamilyResVar_maybe :: TyCon -> Maybe Name
-- | tyConInjectivityInfo tc returns Injective
-- is if tc is an injective tycon (where is states
-- for which tyConBinders tc is injective), or
-- NotInjective otherwise.
tyConInjectivityInfo :: TyCon -> Injectivity
-- | Is this TyCon for an associated type?
isTyConAssoc :: TyCon -> Bool
-- | Get the enclosing class TyCon (if there is one) for the given TyCon.
tyConAssoc_maybe :: TyCon -> Maybe TyCon
-- | Get the enclosing class TyCon (if there is one) for the given
-- TyConFlavour
tyConFlavourAssoc_maybe :: TyConFlavour -> Maybe TyCon
tyConTuple_maybe :: TyCon -> Maybe TupleSort
-- | Is this the TyCon for a boxed tuple?
isBoxedTupleTyCon :: TyCon -> Bool
-- | Is this the TyCon for an unboxed sum?
isUnboxedSumTyCon :: TyCon -> Bool
isLiftedAlgTyCon :: TyCon -> Bool
-- | Retrieves the promoted DataCon if this is a PromotedDataCon;
isPromotedDataCon_maybe :: TyCon -> Maybe DataCon
-- | Is this the TyCon for a promoted tuple?
isPromotedTupleTyCon :: TyCon -> Bool
-- | Is this a PromotedDataCon?
isPromotedDataCon :: TyCon -> Bool
-- | This function identifies PromotedDataCon's from data constructors in
-- `data T = K1 | K2`, promoted by -XDataKinds. These type constructors
-- are printed with a tick mark 'K1 and 'K2, and similarly have a tick
-- mark added to their OccName's.
--
-- In contrast, constructors in `type data T = K1 | K2` are printed and
-- represented with their original undecorated names. See Note [Type data
-- declarations] in GHC.Rename.Module
isDataKindsPromotedDataCon :: TyCon -> Bool
-- | Is this tycon really meant for use at the kind level? That is, should
-- it be permitted without -XDataKinds?
isKindTyCon :: TyCon -> Bool
isLiftedTypeKindTyConName :: Name -> Bool
-- | Identifies implicit tycons that, in particular, do not go into
-- interface files (because they are implicitly reconstructed when the
-- interface is read).
--
-- Note that:
--
--
-- - Associated families are implicit, as they are re-constructed from
-- the class declaration in which they reside, and
-- - Family instances are not implicit as they represent the
-- instance body (similar to a dfun does that for a class
-- instance).
-- - Tuples are implicit iff they have a wired-in name (namely: boxed
-- and unboxed tuples are wired-in and implicit, but constraint tuples
-- are not)
--
isImplicitTyCon :: TyCon -> Bool
tyConCType_maybe :: TyCon -> Maybe CType
-- | Does this TyCon have a syntactically fixed RuntimeRep when
-- fully applied, as per Note [Fixed RuntimeRep] in
-- GHC.Tc.Utils.Concrete?
--
-- False is safe. True means we're sure. Does only a quick check, based
-- on the TyCon's category.
--
-- See Note [Representation-polymorphic TyCons]
tcHasFixedRuntimeRep :: TyCon -> Bool
-- | Is this TyCon concrete (i.e. not a synonym/type family)?
--
-- Used for representation polymorphism checks.
isConcreteTyCon :: TyCon -> Bool
-- | Is this a TcTyCon? (That is, one only used during type-checking?)
isTcTyCon :: TyCon -> Bool
setTcTyConKind :: TyCon -> Kind -> TyCon
isMonoTcTyCon :: TyCon -> Bool
tcTyConScopedTyVars :: TyCon -> [(Name, TcTyVar)]
expandSynTyCon_maybe :: TyCon -> [tyco] -> ExpandSynResult tyco
-- | Check if the tycon actually refers to a proper `data` or `newtype`
-- with user defined constructors rather than one from a class or other
-- construction.
isTyConWithSrcDataCons :: TyCon -> Bool
-- | As tyConDataCons_maybe, but returns the empty list of
-- constructors if no constructors could be found
tyConDataCons :: TyCon -> [DataCon]
-- | Determine the DataCons originating from the given TyCon,
-- if the TyCon is the sort that can have any constructors (note:
-- this does not include abstract algebraic types)
tyConDataCons_maybe :: TyCon -> Maybe [DataCon]
-- | If the given TyCon has a single data constructor, i.e.
-- it is a data type with one alternative, a tuple type or a
-- newtype then that constructor is returned. If the
-- TyCon has more than one constructor, or represents a primitive
-- or function type constructor then Nothing is returned.
tyConSingleDataCon_maybe :: TyCon -> Maybe DataCon
-- | Like tyConSingleDataCon_maybe, but panics if Nothing.
tyConSingleDataCon :: TyCon -> DataCon
-- | Like tyConSingleDataCon_maybe, but returns Nothing for
-- newtypes.
tyConSingleAlgDataCon_maybe :: TyCon -> Maybe DataCon
-- | Returns Just dcs if the given TyCon is a data
-- type, a tuple type or a sum type with data constructors dcs. If the
-- TyCon has more than one constructor, or represents a primitive
-- or function type constructor then Nothing is returned.
--
-- Like tyConDataCons_maybe, but returns Nothing for
-- newtypes.
tyConAlgDataCons_maybe :: TyCon -> Maybe [DataCon]
-- | Determine the number of value constructors a TyCon has. Panics
-- if the TyCon is not algebraic or a tuple
tyConFamilySize :: TyCon -> Int
-- | Extract an AlgTyConRhs with information about data constructors
-- from an algebraic or tuple TyCon. Panics for any other sort of
-- TyCon
algTyConRhs :: TyCon -> AlgTyConRhs
-- | Extract the bound type variables and type expansion of a type synonym
-- TyCon. Panics if the TyCon is not a synonym
newTyConRhs :: TyCon -> ([TyVar], Type)
-- | The number of type parameters that need to be passed to a newtype to
-- resolve it. May be less than in the definition if it can be
-- eta-contracted.
newTyConEtadArity :: TyCon -> Int
-- | Extract the bound type variables and type expansion of an
-- eta-contracted type synonym TyCon. Panics if the TyCon
-- is not a synonym
newTyConEtadRhs :: TyCon -> ([TyVar], Type)
-- | Extracts the newtype coercion from such a TyCon, which
-- can be used to construct something with the newtypes type
-- from its representation type (right hand side). If the supplied
-- TyCon is not a newtype, returns Nothing
newTyConCo_maybe :: TyCon -> Maybe (CoAxiom Unbranched)
newTyConCo :: TyCon -> CoAxiom Unbranched
newTyConDataCon_maybe :: TyCon -> Maybe DataCon
-- | Find the "stupid theta" of the TyCon. A "stupid theta" is the
-- context to the left of an algebraic type declaration, e.g. Eq
-- a in the declaration data Eq a => T a .... See
-- Note [The stupid context] in GHC.Core.DataCon.
tyConStupidTheta :: TyCon -> [PredType]
-- | Extract the TyVars bound by a vanilla type synonym and the
-- corresponding (unsubstituted) right hand side.
synTyConDefn_maybe :: TyCon -> Maybe ([TyVar], Type)
-- | Extract the information pertaining to the right hand side of a type
-- synonym (type) declaration.
synTyConRhs_maybe :: TyCon -> Maybe Type
-- | Extract the flavour of a type family (with all the extra information
-- that it carries)
famTyConFlav_maybe :: TyCon -> Maybe FamTyConFlav
-- | Is this TyCon that for a class instance?
isClassTyCon :: TyCon -> Bool
-- | If this TyCon is that for a class instance, return the class it
-- is for. Otherwise returns Nothing
tyConClass_maybe :: TyCon -> Maybe Class
-- | Return the associated types of the TyCon, if any
tyConATs :: TyCon -> [TyCon]
-- | Is this TyCon that for a data family instance?
isFamInstTyCon :: TyCon -> Bool
tyConFamInstSig_maybe :: TyCon -> Maybe (TyCon, [Type], CoAxiom Unbranched)
-- | If this TyCon is that of a data family instance, return the
-- family in question and the instance types. Otherwise, return
-- Nothing
tyConFamInst_maybe :: TyCon -> Maybe (TyCon, [Type])
-- | If this TyCon is that of a data family instance, return a
-- TyCon which represents a coercion identifying the
-- representation type with the type instance family. Otherwise, return
-- Nothing
tyConFamilyCoercion_maybe :: TyCon -> Maybe (CoAxiom Unbranched)
-- | Extract any RuntimeRepInfo from this TyCon
tyConPromDataConInfo :: TyCon -> PromDataConInfo
mkTyConTagMap :: TyCon -> NameEnv ConTag
tyConFlavour :: TyCon -> TyConFlavour
-- | Is this flavour of TyCon an open type family or a data family?
tcFlavourIsOpen :: TyConFlavour -> Bool
pprPromotionQuote :: TyCon -> SDoc
-- | Returns whether or not this TyCon is definite, or a hole that
-- may be filled in at some later point. See Note [Skolem abstract data]
tyConSkolem :: TyCon -> Bool
nonDetCmpTyLit :: TyLit -> TyLit -> Ordering
cmpTyLit :: TyLit -> TyLit -> Ordering
mkTyVarTy :: TyVar -> Type
mkTyVarTys :: [TyVar] -> [Type]
mkTyCoVarTy :: TyCoVar -> Type
mkTyCoVarTys :: [TyCoVar] -> [Type]
mkInvisFunTy :: HasDebugCallStack => Type -> Type -> Type
infixr 3 `mkInvisFunTy`
mkInvisFunTys :: HasDebugCallStack => [Type] -> Type -> Type
tcMkVisFunTy :: Mult -> Type -> Type -> Type
tcMkInvisFunTy :: TypeOrConstraint -> Type -> Type -> Type
mkVisFunTy :: HasDebugCallStack => Mult -> Type -> Type -> Type
-- | Make nested arrow types | Special, common, case: Arrow type with mult
-- Many
mkVisFunTyMany :: HasDebugCallStack => Type -> Type -> Type
infixr 3 `mkVisFunTyMany`
mkVisFunTysMany :: [Type] -> Type -> Type
mkScaledFunTys :: HasDebugCallStack => [Scaled Type] -> Type -> Type
tcMkScaledFunTys :: [Scaled Type] -> Type -> Type
-- | Wraps foralls over the type using the provided TyCoVars from
-- left to right
mkForAllTys :: [ForAllTyBinder] -> Type -> Type
-- | Wraps foralls over the type using the provided InvisTVBinders
-- from left to right
mkInvisForAllTys :: [InvisTVBinder] -> Type -> Type
mkPiTy :: PiTyBinder -> Type -> Type
mkPiTys :: [PiTyBinder] -> Type -> Type
coHoleCoVar :: CoercionHole -> CoVar
setCoHoleCoVar :: CoercionHole -> CoVar -> CoercionHole
foldTyCo :: Monoid a => TyCoFolder env a -> env -> (Type -> a, [Type] -> a, Coercion -> a, [Coercion] -> a)
-- | A view function that looks through nothing.
noView :: Type -> Maybe Type
typeSize :: Type -> Int
coercionSize :: Coercion -> Int
provSize :: UnivCoProvenance -> Int
scaledMult :: Scaled a -> Mult
-- | Apply a function to both the Mult and the Type in a 'Scaled Type'
mapScaledType :: (Type -> Type) -> Scaled Type -> Scaled Type
funTyFlagTyCon :: FunTyFlag -> TyCon
tYPETyCon :: TyCon
tYPETyConName :: Name
tYPEKind :: Type
cONSTRAINTTyCon :: TyCon
cONSTRAINTTyConName :: Name
cONSTRAINTKind :: Type
tyCoVarsOfType :: Type -> TyCoVarSet
tyCoVarsOfTypes :: [Type] -> TyCoVarSet
coVarsOfType :: Type -> CoVarSet
coVarsOfTypes :: [Type] -> CoVarSet
closeOverKinds :: TyCoVarSet -> TyCoVarSet
-- | Add the kind variables free in the kinds of the tyvars in the given
-- set. Returns a deterministically ordered list.
closeOverKindsList :: [TyVar] -> [TyVar]
-- | Add the kind variables free in the kinds of the tyvars in the given
-- set. Returns a deterministic set.
closeOverKindsDSet :: DTyVarSet -> DTyVarSet
-- | tyCoFVsOfType that returns free variables of a type in a
-- deterministic set. For explanation of why using VarSet is not
-- deterministic see Note [Deterministic FV] in GHC.Utils.FV.
tyCoVarsOfTypeDSet :: Type -> DTyCoVarSet
-- | tyCoFVsOfType that returns free variables of a type in
-- deterministic order. For explanation of why using VarSet is not
-- deterministic see Note [Deterministic FV] in GHC.Utils.FV.
tyCoVarsOfTypeList :: Type -> [TyCoVar]
-- | Returns free variables of types, including kind variables as a
-- deterministic set. For type synonyms it does not expand the
-- synonym.
tyCoVarsOfTypesDSet :: [Type] -> DTyCoVarSet
-- | Returns free variables of types, including kind variables as a
-- deterministically ordered list. For type synonyms it does not
-- expand the synonym.
tyCoVarsOfTypesList :: [Type] -> [TyCoVar]
-- | The worker for tyCoFVsOfType and tyCoFVsOfTypeList.
-- The previous implementation used unionVarSet which is O(n+m)
-- and can make the function quadratic. It's exported, so that it can be
-- composed with other functions that compute free variables. See Note
-- [FV naming conventions] in GHC.Utils.FV.
--
-- Eta-expanded because that makes it run faster (apparently) See Note
-- [FV eta expansion] in GHC.Utils.FV for explanation.
tyCoFVsOfType :: Type -> FV
tyCoFVsBndr :: ForAllTyBinder -> FV -> FV
tyCoFVsVarBndrs :: [Var] -> FV -> FV
tyCoFVsVarBndr :: Var -> FV -> FV
tyCoFVsOfTypes :: [Type] -> FV
anyFreeVarsOfType :: (TyCoVar -> Bool) -> Type -> Bool
anyFreeVarsOfTypes :: (TyCoVar -> Bool) -> [Type] -> Bool
-- | Do a topological sort on a list of tyvars, so that binders occur
-- before occurrences E.g. given [ a::k, k::*, b::k ] it'll return a
-- well-scoped list [ k::*, a::k, b::k ]
--
-- This is a deterministic sorting operation (that is, doesn't depend on
-- Uniques).
--
-- It is also meant to be stable: that is, variables should not be
-- reordered unnecessarily. This is specified in Note [ScopedSort] See
-- also Note [Ordering of implicit variables] in GHC.Rename.HsType
scopedSort :: [TyCoVar] -> [TyCoVar]
-- | Get the free vars of a type in scoped order
tyCoVarsOfTypeWellScoped :: Type -> [TyVar]
-- | Get the free vars of types in scoped order
tyCoVarsOfTypesWellScoped :: [Type] -> [TyVar]
-- | All type constructors occurring in the type; looking through type
-- synonyms, but not newtypes. When it finds a Class, it returns the
-- class TyCon.
tyConsOfType :: Type -> UniqSet TyCon
occCheckExpand :: [Var] -> Type -> Maybe Type
emptyTvSubstEnv :: TvSubstEnv
-- | Composes two substitutions, applying the second one provided first,
-- like in function composition. This function leaves IdSubstEnv
-- untouched because IdSubstEnv is not used during substitution for
-- types.
composeTCvSubst :: Subst -> Subst -> Subst
emptySubst :: Subst
mkEmptySubst :: InScopeSet -> Subst
isEmptySubst :: Subst -> Bool
-- | Checks whether the tyvar and covar environments are empty. This
-- function should be used over isEmptySubst when substituting for
-- types, because types currently do not contain expressions; we can
-- safely disregard the expression environment when deciding whether to
-- skip a substitution. Using isEmptyTCvSubst gives us a
-- non-trivial performance boost (up to 70% less allocation for T18223)
isEmptyTCvSubst :: Subst -> Bool
mkSubst :: InScopeSet -> TvSubstEnv -> CvSubstEnv -> IdSubstEnv -> Subst
-- | Make a TCvSubst with specified tyvar subst and empty covar subst
mkTvSubst :: InScopeSet -> TvSubstEnv -> Subst
getTvSubstEnv :: Subst -> TvSubstEnv
-- | Find the in-scope set: see Note [The substitution invariant]
getSubstInScope :: Subst -> InScopeSet
setInScope :: Subst -> InScopeSet -> Subst
-- | Returns the free variables of the types in the range of a substitution
-- as a non-deterministic set.
getSubstRangeTyCoFVs :: Subst -> VarSet
isInScope :: Var -> Subst -> Bool
notElemSubst :: Var -> Subst -> Bool
-- | Remove all substitutions that might have been built up while
-- preserving the in-scope set originally called zapSubstEnv
zapSubst :: Subst -> Subst
-- | Add the Var to the in-scope set
extendSubstInScope :: Subst -> Var -> Subst
-- | Add the Vars to the in-scope set: see also
-- extendInScope
extendSubstInScopeList :: Subst -> [Var] -> Subst
-- | Add the Vars to the in-scope set: see also
-- extendInScope
extendSubstInScopeSet :: Subst -> VarSet -> Subst
extendTCvSubst :: Subst -> TyCoVar -> Type -> Subst
extendTCvSubstWithClone :: Subst -> TyCoVar -> TyCoVar -> Subst
-- | Add a substitution for a TyVar to the Subst The
-- TyVar *must* be a real TyVar, and not a CoVar You must ensure
-- that the in-scope set is such that Note [The substitution invariant]
-- holds after extending the substitution like this.
extendTvSubst :: Subst -> TyVar -> Type -> Subst
extendTvSubstBinderAndInScope :: Subst -> PiTyBinder -> Type -> Subst
extendTvSubstWithClone :: Subst -> TyVar -> TyVar -> Subst
-- | Add a substitution from a CoVar to a Coercion to the
-- Subst: you must ensure that the in-scope set satisfies Note
-- [The substitution invariant] after extending the substitution like
-- this
extendCvSubst :: Subst -> CoVar -> Coercion -> Subst
extendTvSubstAndInScope :: Subst -> TyVar -> Type -> Subst
-- | Adds multiple TyVar substitutions to the Subst: see also
-- extendTvSubst
extendTvSubstList :: Subst -> [(TyVar, Type)] -> Subst
extendTCvSubstList :: Subst -> [Var] -> [Type] -> Subst
unionSubst :: Subst -> Subst -> Subst
-- | Generates the in-scope set for the Subst from the types in the
-- incoming environment. No CoVars or Ids, please!
zipTvSubst :: HasDebugCallStack => [TyVar] -> [Type] -> Subst
zipTCvSubst :: HasDebugCallStack => [TyCoVar] -> [Type] -> Subst
-- | Generates the in-scope set for the TCvSubst from the types in
-- the incoming environment. No CoVars, please! The InScopeSet is just a
-- thunk so with a bit of luck it'll never be evaluated
mkTvSubstPrs :: [(TyVar, Type)] -> Subst
-- | The InScopeSet is just a thunk so with a bit of luck it'll never be
-- evaluated
zipTyEnv :: HasDebugCallStack => [TyVar] -> [Type] -> TvSubstEnv
zipCoEnv :: HasDebugCallStack => [CoVar] -> [Coercion] -> CvSubstEnv
-- | Type substitution, see zipTvSubst
substTyWith :: HasDebugCallStack => [TyVar] -> [Type] -> Type -> Type
-- | Type substitution, see zipTvSubst. Disables sanity checks. The
-- problems that the sanity checks in substTy catch are described in Note
-- [The substitution invariant]. The goal of #11371 is to migrate all the
-- calls of substTyUnchecked to substTy and remove this function. Please
-- don't use in new code.
substTyWithUnchecked :: [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
-- | Substitute covars within a type
substTyWithCoVars :: [CoVar] -> [Coercion] -> Type -> Type
-- | Type substitution, see zipTvSubst
substTysWith :: [TyVar] -> [Type] -> [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 :: Subst -> Type -> Type
-- | Substitute within a Type The substitution has to satisfy the
-- invariants described in Note [The substitution invariant].
substTy :: HasDebugCallStack => Subst -> Type -> Type
-- | Substitute within a Type disabling the sanity checks. The
-- problems that the sanity checks in substTy catch are described in Note
-- [The substitution invariant]. The goal of #11371 is to migrate all the
-- calls of substTyUnchecked to substTy and remove this function. Please
-- don't use in new code.
substTyUnchecked :: Subst -> Type -> Type
substScaledTy :: HasDebugCallStack => Subst -> Scaled Type -> Scaled Type
substScaledTyUnchecked :: HasDebugCallStack => Subst -> Scaled Type -> Scaled Type
-- | Substitute within several Types The substitution has to satisfy
-- the invariants described in Note [The substitution invariant].
substTys :: HasDebugCallStack => Subst -> [Type] -> [Type]
substScaledTys :: HasDebugCallStack => Subst -> [Scaled Type] -> [Scaled Type]
-- | 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 :: Subst -> [Type] -> [Type]
substScaledTysUnchecked :: Subst -> [Scaled Type] -> [Scaled Type]
-- | Substitute within a ThetaType The substitution has to satisfy
-- the invariants described in Note [The substitution invariant].
substTheta :: HasDebugCallStack => Subst -> ThetaType -> ThetaType
-- | Substitute within a ThetaType disabling the sanity checks. The
-- problems that the sanity checks in substTys catch are described in
-- Note [The substitution invariant]. The goal of #11371 is to migrate
-- all the calls of substThetaUnchecked to substTheta and remove this
-- function. Please don't use in new code.
substThetaUnchecked :: Subst -> ThetaType -> ThetaType
substTyVar :: Subst -> TyVar -> Type
substTyVarToTyVar :: HasDebugCallStack => Subst -> TyVar -> TyVar
substTyVars :: Subst -> [TyVar] -> [Type]
lookupTyVar :: Subst -> TyVar -> Maybe Type
-- | Substitute within a Coercion The substitution has to satisfy
-- the invariants described in Note [The substitution invariant].
substCo :: HasDebugCallStack => Subst -> Coercion -> Coercion
-- | Substitute within a Coercion disabling sanity checks. The
-- problems that the sanity checks in substCo catch are described in Note
-- [The substitution invariant]. The goal of #11371 is to migrate all the
-- calls of substCoUnchecked to substCo and remove this function. Please
-- don't use in new code.
substCoUnchecked :: Subst -> Coercion -> Coercion
substTyVarBndr :: HasDebugCallStack => Subst -> TyVar -> (Subst, TyVar)
substTyVarBndrs :: HasDebugCallStack => Subst -> [TyVar] -> (Subst, [TyVar])
substVarBndr :: HasDebugCallStack => Subst -> TyCoVar -> (Subst, TyCoVar)
substVarBndrs :: HasDebugCallStack => Subst -> [TyCoVar] -> (Subst, [TyCoVar])
cloneTyVarBndr :: Subst -> TyVar -> Unique -> (Subst, TyVar)
cloneTyVarBndrs :: Subst -> [TyVar] -> UniqSupply -> (Subst, [TyVar])
substTyCoBndr :: Subst -> PiTyBinder -> (Subst, PiTyBinder)
-- | This tidies up a type for printing in an error message, or in an
-- interface file.
--
-- It doesn't change the uniques at all, just the print names.
tidyVarBndrs :: TidyEnv -> [TyCoVar] -> (TidyEnv, [TyCoVar])
tidyVarBndr :: TidyEnv -> TyCoVar -> (TidyEnv, TyCoVar)
tidyForAllTyBinder :: TidyEnv -> VarBndr TyCoVar vis -> (TidyEnv, VarBndr TyCoVar vis)
tidyForAllTyBinders :: TidyEnv -> [VarBndr TyCoVar vis] -> (TidyEnv, [VarBndr TyCoVar vis])
-- | Add the free TyVars to the env in tidy form, so that we can
-- tidy the type they are free in
tidyFreeTyCoVars :: TidyEnv -> [TyCoVar] -> TidyEnv
tidyOpenTyCoVars :: TidyEnv -> [TyCoVar] -> (TidyEnv, [TyCoVar])
-- | Treat a new TyCoVar as a binder, and give it a fresh tidy name
-- using the environment if one has not already been allocated. See also
-- tidyVarBndr
tidyOpenTyCoVar :: TidyEnv -> TyCoVar -> (TidyEnv, TyCoVar)
tidyTyCoVarOcc :: TidyEnv -> TyCoVar -> TyCoVar
-- | Tidy a list of Types
--
-- See Note [Strictness in tidyType and friends]
tidyTypes :: TidyEnv -> [Type] -> [Type]
-- | Tidy a Type
--
-- See Note [Strictness in tidyType and friends]
tidyType :: TidyEnv -> Type -> Type
-- | Grabs the free type variables, tidies them and then uses
-- tidyType to work over the type itself
tidyOpenTypes :: TidyEnv -> [Type] -> (TidyEnv, [Type])
tidyOpenType :: TidyEnv -> Type -> (TidyEnv, Type)
-- | Calls tidyType on a top-level type (i.e. with an empty tidying
-- environment)
tidyTopType :: Type -> 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 -> RuntimeRepType
-- | Given a kind (TYPE rr) or (CONSTRAINT rr), extract its RuntimeRep
-- classifier rr. For example, kindRep_maybe * = Just LiftedRep
-- Returns Nothing if the kind is not of form (TYPE rr)
kindRep_maybe :: HasDebugCallStack => Kind -> Maybe RuntimeRepType
-- | Returns True if the kind classifies unlifted types (like 'Int#') and
-- False otherwise. Note that this returns False for
-- representation-polymorphic kinds, which may be specialized to a kind
-- that classifies unlifted types.
isUnliftedTypeKind :: Kind -> Bool
pickyIsLiftedTypeKind :: Kind -> Bool
-- | Check whether a kind is of the form `TYPE (BoxedRep Lifted)` or `TYPE
-- (BoxedRep Unlifted)`.
--
-- Returns:
--
--
-- - `Just Lifted` for `TYPE (BoxedRep Lifted)` and Type,
-- - `Just Unlifted` for `TYPE (BoxedRep Unlifted)` and
-- UnliftedType,
-- - Nothing for anything else, e.g. `TYPE IntRep`, `TYPE
-- (BoxedRep l)`, etc.
--
kindBoxedRepLevity_maybe :: Type -> Maybe Levity
-- | Check whether a type of kind RuntimeRep is lifted.
--
-- isLiftedRuntimeRep is:
--
--
-- - True of LiftedRep :: RuntimeRep
-- - False of type variables, type family applications, and of other
-- reps such as IntRep :: RuntimeRep.
--
isLiftedRuntimeRep :: RuntimeRepType -> Bool
-- | Check whether a type of kind RuntimeRep is unlifted.
--
--
isUnliftedRuntimeRep :: RuntimeRepType -> Bool
isLiftedLevity :: Type -> Bool
isUnliftedLevity :: Type -> Bool
-- | Is a tyvar of type RuntimeRep?
isRuntimeRepVar :: TyVar -> Bool
-- | Is a tyvar of type PromDataConInfo?
isLevityVar :: TyVar -> Bool
-- | Is a tyvar of type Multiplicity?
isMultiplicityVar :: TyVar -> Bool
-- | (splitRuntimeRep_maybe rr) takes a Type rr :: RuntimeRep, and returns
-- the (TyCon,[Type]) for the RuntimeRep, if possible, where the TyCon is
-- one of the promoted DataCons of RuntimeRep. Remember: the unique on
-- TyCon that is a a promoted DataCon is the same as the unique on the
-- DataCon See Note [Promoted data constructors] in GHC.Core.TyCon May
-- not be possible if rr is a type variable or type family
-- application
splitRuntimeRep_maybe :: RuntimeRepType -> Maybe (TyCon, [Type])
-- | See isBoxedRuntimeRep_maybe.
isBoxedRuntimeRep :: RuntimeRepType -> Bool
-- | Check whether a type of kind RuntimeRep is lifted, unlifted, or
-- unknown.
--
-- `isLiftedRuntimeRep rr` returns:
--
--
-- - `Just Lifted` if rr is `LiftedRep :: RuntimeRep`
-- - `Just Unlifted` if rr is definitely unlifted, e.g.
-- IntRep
-- - Nothing if not known (e.g. it's a type variable or a type
-- family application).
--
runtimeRepLevity_maybe :: RuntimeRepType -> Maybe Levity
-- | levity_maybe takes a Type of kind Levity, and returns its
-- levity May not be possible for a type variable or type family
-- application
levityType_maybe :: LevityType -> Maybe Levity
mapTyCo :: Monad m => TyCoMapper () m -> (Type -> m Type, [Type] -> m [Type], Coercion -> m Coercion, [Coercion] -> m [Coercion])
mapTyCoX :: Monad m => TyCoMapper env m -> (env -> Type -> m Type, env -> [Type] -> m [Type], env -> Coercion -> m Coercion, env -> [Coercion] -> m [Coercion])
-- | 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 :: HasDebugCallStack => Type -> TyVar
-- | Attempts to obtain the type variable underlying a Type, without
-- any expansion
repGetTyVar_maybe :: Type -> Maybe TyVar
isTyVarTy :: Type -> Bool
-- | 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)
mkAppTys :: Type -> [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)
-- | 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 splitAppTy_maybe, but assumes that
-- any coreView stuff is already done
splitAppTyNoView_maybe :: HasDebugCallStack => Type -> Maybe (Type, Type)
-- | Just like splitAppTyNoView_maybe, but does not split (c => t) See
-- Note [Decomposing fat arrow c=>t]
tcSplitAppTyNoView_maybe :: Type -> Maybe (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])
-- | Like splitAppTys, but doesn't look through type synonyms
splitAppTysNoView :: HasDebugCallStack => Type -> (Type, [Type])
mkNumLitTy :: Integer -> Type
-- | Is this a numeric literal. We also look through type synonyms.
isNumLitTy :: Type -> Maybe Integer
mkStrLitTy :: FastString -> Type
-- | Is this a symbol literal. We also look through type synonyms.
isStrLitTy :: Type -> Maybe FastString
mkCharLitTy :: Char -> Type
-- | Is this a char literal? We also look through type synonyms.
isCharLitTy :: Type -> Maybe Char
-- | Is this a type literal (symbol, numeric, or char)?
isLitTy :: Type -> Maybe TyLit
-- | Is this type a custom user error? If so, give us the kind and the
-- error message.
userTypeError_maybe :: Type -> Maybe Type
-- | Render a type corresponding to a user type error into a SDoc.
pprUserTypeErrorTy :: Type -> SDoc
-- | Given the components of a FunTy figure out the corresponding TyConApp.
funTyConAppTy_maybe :: FunTyFlag -> Type -> Type -> Type -> Maybe (TyCon, [Type])
-- | Return Just if this TyConApp should be represented as a FunTy
tyConAppFunTy_maybe :: HasDebugCallStack => TyCon -> [Type] -> Maybe Type
-- | Return Just if this TyConAppCo should be represented as a FunCo
tyConAppFunCo_maybe :: HasDebugCallStack => Role -> TyCon -> [Coercion] -> Maybe Coercion
-- | This one works out the FunTyFlag from the argument type See
-- GHC.Types.Var Note [FunTyFlag]
mkFunctionType :: HasDebugCallStack => Mult -> Type -> Type -> Type
-- | Like mkFunctionType, compute the FunTyFlag from the arguments
mkScaledFunctionTys :: [Scaled Type] -> Type -> Type
-- | Attempts to extract the multiplicity, argument and result types from a
-- type, and panics if that is not possible. See also
-- splitFunTy_maybe
splitFunTy :: Type -> (Mult, Type, Type)
-- | Attempts to extract the multiplicity, argument and result types from a
-- type
splitFunTy_maybe :: Type -> Maybe (FunTyFlag, Mult, Type, Type)
splitFunTys :: Type -> ([Scaled 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
-- | (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
applyTysX :: HasDebugCallStack => [TyVar] -> Type -> [Type] -> Type
-- | Retrieve the tycon heading this type, if there is one. Does not
-- look through synonyms.
tyConAppTyConPicky_maybe :: Type -> Maybe TyCon
tyConAppTyCon :: HasDebugCallStack => Type -> TyCon
-- | The same as snd . splitTyConApp
tyConAppArgs_maybe :: Type -> Maybe [Type]
tyConAppArgs :: HasCallStack => Type -> [Type]
splitTyConAppNoView_maybe :: Type -> Maybe (TyCon, [Type])
-- | tcSplitTyConApp_maybe splits a type constructor application into its
-- type constructor and applied types.
--
-- Differs from splitTyConApp_maybe in that it does *not* split types
-- headed with (=>), as that's not a TyCon in the type-checker.
--
-- Note that this may fail (in funTyConAppTy_maybe) in the case of a
-- FunTy with an argument of unknown kind FunTy (e.g.
-- `FunTy (a :: k) Int`, since the kind of a isn't of the form
-- `TYPE rep`. This isn't usually a problem but may be temporarily the
-- cas during canonicalization: see Note [Decomposing FunTy] in
-- GHC.Tc.Solver.Canonical and Note [The Purely Kinded Type Invariant
-- (PKTI)] in GHC.Tc.Gen.HsType, Wrinkle around FunTy
--
-- Consequently, you may need to zonk your type before using this
-- function.
tcSplitTyConApp_maybe :: HasCallStack => Type -> Maybe (TyCon, [Type])
tcSplitTyConApp :: Type -> (TyCon, [Type])
-- | Unwrap one layer of newtype on a type constructor and its
-- arguments, using an eta-reduced version of the newtype if
-- possible. This requires tys to have at least newTyConInstArity
-- tycon elements.
newTyConInstRhs :: TyCon -> [Type] -> Type
splitCastTy_maybe :: Type -> Maybe (Type, Coercion)
isCoercionTy_maybe :: Type -> Maybe Coercion
stripCoercionTy :: Type -> Coercion
tyConBindersPiTyBinders :: [TyConBinder] -> [PiTyBinder]
-- | Make a dependent forall over an Inferred variable
mkTyCoInvForAllTy :: TyCoVar -> Type -> Type
-- | Like mkTyCoInvForAllTy, but tv should be a tyvar
mkInfForAllTy :: TyVar -> Type -> Type
-- | Like mkForAllTys, but assumes all variables are dependent and
-- Inferred, a common case
mkTyCoInvForAllTys :: [TyCoVar] -> Type -> Type
-- | Like mkTyCoInvForAllTys, but tvs should be a list of tyvar
mkInfForAllTys :: [TyVar] -> Type -> Type
-- | Like mkForAllTy, but assumes the variable is dependent and
-- Specified, a common case
mkSpecForAllTy :: TyVar -> Type -> Type
-- | Like mkForAllTys, but assumes all variables are dependent and
-- Specified, a common case
mkSpecForAllTys :: [TyVar] -> Type -> Type
-- | Like mkForAllTys, but assumes all variables are dependent and visible
mkVisForAllTys :: [TyVar] -> Type -> Type
-- | Given a list of type-level vars and the free vars of a result kind,
-- makes PiTyBinders, preferring anonymous binders if the variable is, in
-- fact, not dependent. e.g. mkTyConBindersPreferAnon
-- (k:*),(b:k),(c:k) We want (k:*) Named, (b:k) Anon, (c:k) Anon
--
-- All non-coercion binders are visible.
mkTyConBindersPreferAnon :: [TyVar] -> TyCoVarSet -> [TyConBinder]
-- | Take a ForAllTy apart, returning the binders and result type
splitForAllForAllTyBinders :: Type -> ([ForAllTyBinder], 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.
splitForAllTyCoVars :: Type -> ([TyCoVar], Type)
-- | Like splitForAllTyCoVars, but split only for tyvars. This
-- always succeeds, even if it returns only an empty list. Note that the
-- result type returned may have free variables that were bound by a
-- forall.
splitForAllTyVars :: Type -> ([TyVar], Type)
-- | Like splitForAllTyCoVars, but only splits ForAllTys with
-- Required type variable binders. Furthermore, each returned
-- tyvar is annotated with ().
splitForAllReqTyBinders :: Type -> ([ReqTyBinder], Type)
-- | Like splitForAllTyCoVars, but only splits ForAllTys with
-- Invisible type variable binders. Furthermore, each returned
-- tyvar is annotated with its Specificity.
splitForAllInvisTyBinders :: Type -> ([InvisTyBinder], Type)
-- | Checks whether this is a proper forall (with a named binder)
isForAllTy :: Type -> Bool
-- | Like isForAllTy, but returns True only if it is a tyvar binder
isForAllTy_ty :: Type -> Bool
-- | Like isForAllTy, but returns True only if it is a covar binder
isForAllTy_co :: Type -> Bool
-- | Is this a function or forall?
isPiTy :: Type -> Bool
-- | Is this a function?
isFunTy :: Type -> Bool
-- | Take a forall type apart, or panics if that is not possible.
splitForAllTyCoVar :: Type -> (TyCoVar, Type)
-- | Drops all ForAllTys
dropForAlls :: Type -> Type
-- | Attempts to take a forall type apart, but only if it's a proper
-- forall, with a named binder
splitForAllTyCoVar_maybe :: Type -> Maybe (TyCoVar, Type)
-- | Like splitForAllTyCoVar_maybe, but only returns Just if it is a
-- tyvar binder.
splitForAllTyVar_maybe :: Type -> Maybe (TyVar, Type)
-- | Like splitForAllTyCoVar_maybe, but only returns Just if it is a
-- covar binder.
splitForAllCoVar_maybe :: Type -> Maybe (CoVar, Type)
-- | Attempts to take a forall type apart; works with proper foralls and
-- functions
splitPiTy_maybe :: Type -> Maybe (PiTyBinder, Type)
-- | Takes a forall type apart, or panics
splitPiTy :: Type -> (PiTyBinder, Type)
-- | Split off all PiTyBinders to a type, splitting both proper foralls and
-- functions
splitPiTys :: Type -> ([PiTyBinder], Type)
-- | Extracts a list of run-time arguments from a function type, looking
-- through newtypes to the right of arrows.
--
-- Examples:
--
--
-- newtype Identity a = I a
--
-- getRuntimeArgTys (Int -> Bool -> Double) == [(Int, FTF_T_T), (Bool, FTF_T_T)]
-- getRuntimeArgTys (Identity Int -> Bool -> Double) == [(Identity Int, FTF_T_T), (Bool, FTF_T_T)]
-- getRuntimeArgTys (Int -> Identity (Bool -> Identity Double)) == [(Int, FTF_T_T), (Bool, FTF_T_T)]
-- getRuntimeArgTys (forall a. Show a => Identity a -> a -> Int -> Bool)
-- == [(Show a, FTF_C_T), (Identity a, FTF_T_T),(a, FTF_T_T),(Int, FTF_T_T)]
--
--
-- Note that, in the last case, the returned types might mention an
-- out-of-scope type variable. This function is used only when we really
-- care about the kinds of the returned types, so this is OK.
--
--
-- - *Warning**: this function can return an infinite list. For
-- example:
--
--
--
-- newtype N a = MkN (a -> N a)
-- getRuntimeArgTys (N a) == repeat (a, FTF_T_T)
--
getRuntimeArgTys :: Type -> [(Scaled Type, FunTyFlag)]
invisibleTyBndrCount :: Type -> Int
-- | Like splitPiTys, but returns only *invisible* binders,
-- including constraints. Stops at the first visible binder.
splitInvisPiTys :: Type -> ([PiTyBinder], Type)
-- | Same as splitInvisPiTys, but stop when - you have found
-- n PiTyBinders, - or you run out of invisible binders
splitInvisPiTysN :: Int -> Type -> ([PiTyBinder], Type)
-- | Given a TyCon and a list of argument types, filter out any
-- invisible (i.e., Inferred or Specified) arguments.
filterOutInvisibleTypes :: TyCon -> [Type] -> [Type]
-- | Given a TyCon and a list of argument types, filter out any
-- Inferred arguments.
filterOutInferredTypes :: TyCon -> [Type] -> [Type]
-- | Given a list of things paired with their visibilities, partition the
-- things into (invisible things, visible things).
partitionInvisibles :: [(a, ForAllTyFlag)] -> ([a], [a])
-- | Given a TyCon and a list of argument types to which the
-- TyCon is applied, determine each argument's visibility
-- (Inferred, Specified, or Required).
--
-- Wrinkle: consider the following scenario:
--
--
-- T :: forall k. k -> k
-- tyConForAllTyFlags T [forall m. m -> m -> m, S, R, Q]
--
--
-- After substituting, we get
--
--
-- T (forall m. m -> m -> m) :: (forall m. m -> m -> m) -> forall n. n -> n -> n
--
--
-- Thus, the first argument is invisible, S is visible,
-- R is invisible again, and Q is visible.
tyConForAllTyFlags :: TyCon -> [Type] -> [ForAllTyFlag]
-- | Given a Type and a list of argument types to which the
-- Type is applied, determine each argument's visibility
-- (Inferred, Specified, or Required).
--
-- Most of the time, the arguments will be Required, but not
-- always. Consider f :: forall a. a -> Type. In f Type
-- Bool, the first argument (Type) is Specified and
-- the second argument (Bool) is Required. It is
-- precisely this sort of higher-rank situation in which
-- appTyForAllTyFlags comes in handy, since f Type Bool
-- would be represented in Core using AppTys. (See also #15792).
appTyForAllTyFlags :: Type -> [Type] -> [ForAllTyFlag]
isTauTy :: Type -> Bool
isAtomicTy :: Type -> Bool
-- | Given a family instance TyCon and its arg types, return the
-- corresponding family type. E.g:
--
--
-- data family T a
-- data instance T (Maybe b) = MkT b
--
--
-- Where the instance tycon is :RTL, so:
--
--
-- mkFamilyTyConApp :RTL Int = T (Maybe Int)
--
mkFamilyTyConApp :: TyCon -> [Type] -> Type
-- | Get the type on the LHS of a coercion induced by a type/data family
-- instance.
coAxNthLHS :: forall (br :: BranchFlag). CoAxiom br -> Int -> Type
isFamFreeTy :: Type -> Bool
-- | Does this type classify a core (unlifted) Coercion? At either role
-- nominal or representational (t1 ~# t2) or (t1 ~R# t2) See Note [Types
-- for coercions, predicates, and evidence] in GHC.Core.TyCo.Rep
isCoVarType :: Type -> Bool
buildSynTyCon :: Name -> [KnotTied TyConBinder] -> Kind -> [Role] -> KnotTied Type -> TyCon
-- | Is the given type definitely unlifted? See
-- Type#type_classification for what an unlifted type is.
--
-- Panics on representation-polymorphic types; See
-- mightBeUnliftedType for a more approximate predicate that
-- behaves better in the presence of representation polymorphism.
isUnliftedType :: HasDebugCallStack => Type -> Bool
-- | Returns:
--
--
-- - False if the type is guaranteed unlifted or
-- - True if it lifted, OR we aren't sure (e.g. in a
-- representation-polymorphic case)
--
mightBeLiftedType :: Type -> Bool
-- | Returns:
--
--
-- - False if the type is guaranteed lifted or
-- - True if it is unlifted, OR we aren't sure (e.g. in a
-- representation-polymorphic case)
--
mightBeUnliftedType :: Type -> Bool
-- | See Type#type_classification for what a boxed type is. Panics
-- on representation-polymorphic types; See mightBeUnliftedType
-- for a more approximate predicate that behaves better in the presence
-- of representation polymorphism.
isBoxedType :: Type -> Bool
-- | Is this a type of kind RuntimeRep? (e.g. LiftedRep)
isRuntimeRepKindedTy :: Type -> Bool
-- | Drops prefix of RuntimeRep constructors in TyConApps. Useful
-- for e.g. dropping 'LiftedRep arguments of unboxed tuple TyCon
-- applications:
--
-- dropRuntimeRepArgs [ 'LiftedRep, 'IntRep , String, Int# ] == [String,
-- Int#]
dropRuntimeRepArgs :: [Type] -> [Type]
-- | Extract the RuntimeRep classifier of a type. For instance,
-- getRuntimeRep_maybe Int = LiftedRep. Panics if this is not
-- possible.
getRuntimeRep :: HasDebugCallStack => Type -> RuntimeRepType
isUnboxedTupleType :: Type -> Bool
isUnboxedSumType :: Type -> Bool
-- | Check whether a type is a data family type
isDataFamilyAppType :: Type -> Bool
-- | Computes whether an argument (or let right hand side) should be
-- computed strictly or lazily, based only on its type. Currently, it's
-- just isUnliftedType. Panics on representation-polymorphic
-- types.
isStrictType :: HasDebugCallStack => Type -> Bool
-- | Returns true of types that are opaque to Haskell.
isPrimitiveType :: Type -> Bool
-- | Determine whether a type could be the type of a join point of given
-- total arity, according to the polymorphism rule. A join point cannot
-- be polymorphic in its return type, since given join j a b x y
-- z = e1 in e2, the types of e1 and e2 must be the same, and a and b are
-- not in scope for e2. (See Note [The polymorphism rule of join points]
-- in GHC.Core.) Returns False also if the type simply doesn't
-- have enough arguments.
--
-- Note that we need to know how many arguments (type *and* value) the
-- putative join point takes; for instance, if j :: forall a. a -> Int
-- then j could be a binary join point returning an Int, but it could
-- *not* be a unary join point returning a -> Int.
--
-- TODO: See Note [Excess polymorphism and join points]
isValidJoinPointType :: JoinArity -> Type -> Bool
seqType :: Type -> ()
seqTypes :: [Type] -> ()
sORTKind_maybe :: Kind -> Maybe (TypeOrConstraint, Type)
-- | Does this classify a type allowed to have values? Responds True to
-- things like *, TYPE Lifted, TYPE IntRep, TYPE v, Constraint.
--
-- True of a kind `TYPE _` or `CONSTRAINT _`
isTYPEorCONSTRAINT :: Kind -> Bool
tyConIsTYPEorCONSTRAINT :: TyCon -> Bool
isConstraintLikeKind :: Kind -> Bool
isConstraintKind :: Kind -> Bool
-- | Is this kind equivalent to Type i.e. TYPE LiftedRep?
tcIsLiftedTypeKind :: Kind -> Bool
-- | Is this kind equivalent to TYPE (BoxedRep l) for some l
-- :: Levity?
tcIsBoxedTypeKind :: Kind -> Bool
-- | Is this kind equivalent to TYPE r (for some unknown r)?
--
-- This considers Constraint to be distinct from *.
isTypeLikeKind :: Kind -> Bool
returnsConstraintKind :: Kind -> Bool
-- | Returns True if a type has a syntactically fixed runtime rep, as per
-- Note [Fixed RuntimeRep] in GHC.Tc.Utils.Concrete.
--
-- This function is equivalent to `isFixedRuntimeRepKind . typeKind` but
-- much faster.
--
-- Precondition: The type has kind (TYPE blah)
typeHasFixedRuntimeRep :: HasDebugCallStack => Type -> Bool
-- | True if the argument types of this function type all have a
-- fixed-runtime-rep
argsHaveFixedRuntimeRep :: Type -> Bool
-- | Checks that a kind of the form Type, Constraint or
-- 'TYPE r is concrete. See isConcrete.
--
-- Precondition: The type has kind `TYPE blah` or `CONSTRAINT
-- blah`
isFixedRuntimeRepKind :: HasDebugCallStack => Kind -> Bool
-- | Tests whether the given type is concrete, i.e. it whether it consists
-- only of concrete type constructors, concrete type variables, and
-- applications.
--
-- See Note [Concrete types] in GHC.Tc.Utils.Concrete.
isConcrete :: Type -> Bool
-- | Does a TyCon (that is applied to some number of arguments) need
-- to be ascribed with an explicit kind signature to resolve ambiguity if
-- rendered as a source-syntax type? (See Note [When does a tycon
-- application need an explicit kind signature?] for a full
-- explanation of what this function checks for.)
tyConAppNeedsKindSig :: Bool -> TyCon -> Int -> Bool
-- | Scale a payload by Many
unrestricted :: a -> Scaled a
-- | Scale a payload by One
linear :: a -> Scaled a
-- | Scale a payload by Many; used for type arguments in core
tymult :: a -> Scaled a
irrelevantMult :: Scaled a -> a
mkScaled :: Mult -> a -> Scaled a
scaledSet :: Scaled a -> b -> Scaled b
isManyTy :: Mult -> Bool
isOneTy :: Mult -> Bool
-- | isLinear t returns True of a if t is a type
-- of (curried) function where at least one argument is linear (or
-- otherwise non-unrestricted). We use this function to check whether it
-- is safe to eta reduce an Id in CorePrep. It is always safe to return
-- True, because True deactivates the optimisation.
isLinearType :: Type -> Bool
mkTYPEapp :: RuntimeRepType -> Type
-- | Given a RuntimeRep, applies TYPE to it. On the fly
-- it rewrites TYPE LiftedRep --> liftedTypeKind (a synonym) TYPE
-- UnliftedRep --> unliftedTypeKind (ditto) TYPE ZeroBitRep -->
-- zeroBitTypeKind (ditto) NB: no need to check for TYPE (BoxedRep
-- Lifted), TYPE (BoxedRep Unlifted) because those inner types should
-- already have been rewritten to LiftedRep and UnliftedRep respectively,
-- by mkTyConApp
--
-- see Note [TYPE and CONSTRAINT] in GHC.Builtin.Types.Prim. See Note
-- [Using synonyms to compress types] in GHC.Core.Type
mkTYPEapp_maybe :: RuntimeRepType -> Maybe Type
-- | Just like mkTYPEapp
mkCONSTRAINTapp :: RuntimeRepType -> Type
-- | Just like mkTYPEapp_maybe
mkCONSTRAINTapp_maybe :: RuntimeRepType -> Maybe Type
-- | Given a PromDataConInfo, apply BoxedRep to it On the
-- fly, rewrite BoxedRep Lifted --> liftedRepTy (a synonym) BoxedRep
-- Unlifted --> unliftedRepTy (ditto) See Note [TYPE and CONSTRAINT]
-- in GHC.Builtin.Types.Prim. See Note [Using synonyms to compress types]
-- in GHC.Core.Type
mkBoxedRepApp_maybe :: LevityType -> Maybe Type
-- | Given a `[RuntimeRep]`, apply TupleRep to it On the fly,
-- rewrite TupleRep [] -> zeroBitRepTy (a synonym) See Note [TYPE and
-- CONSTRAINT] in GHC.Builtin.Types.Prim. See Note [Using synonyms to
-- compress types] in GHC.Core.Type
mkTupleRepApp_maybe :: Type -> Maybe Type
typeOrConstraintKind :: TypeOrConstraint -> RuntimeRepType -> Kind
negateOverLitVal :: OverLitVal -> OverLitVal
tcEqKind :: HasDebugCallStack => Kind -> Kind -> Bool
-- | tcEqType implements typechecker equality It behaves just like eqType,
-- but is implemented differently (for now)
tcEqType :: HasDebugCallStack => Type -> Type -> Bool
-- | Just like tcEqType, but will return True for types of different
-- kinds as long as their non-coercion structure is identical.
tcEqTypeNoKindCheck :: Type -> Type -> Bool
-- | Check whether two TyConApps are the same; if the number of arguments
-- are different, just checks the common prefix of arguments.
tcEqTyConApps :: TyCon -> [Type] -> TyCon -> [Type] -> Bool
-- | Like tcEqType, but returns True if the visible part of
-- the types are equal, even if they are really unequal (in the invisible
-- bits)
tcEqTypeVis :: Type -> Type -> Bool
-- | Like pickyEqTypeVis, but returns a Bool for convenience
pickyEqType :: Type -> Type -> Bool
-- | Do these denote the same level of visibility? Required
-- arguments are visible, others are not. So this function equates
-- Specified and Inferred. Used for printing.
eqForAllVis :: ForAllTyFlag -> ForAllTyFlag -> Bool
-- | Type equality on source types. Does not look through
-- newtypes, PredTypes or type families, but it does look
-- through type synonyms. This first checks that the kinds of the types
-- are equal and then checks whether the types are equal, ignoring casts
-- and coercions. (The kind check is a recursive call, but since all
-- kinds have type Type, there is no need to check the types of
-- kinds.) See also Note [Non-trivial definitional equality] in
-- GHC.Core.TyCo.Rep.
eqType :: Type -> Type -> Bool
-- | Compare types with respect to a (presumably) non-empty RnEnv2.
eqTypeX :: RnEnv2 -> Type -> Type -> Bool
-- | Type equality on lists of types, looking through type synonyms but not
-- newtypes.
eqTypes :: [Type] -> [Type] -> Bool
eqVarBndrs :: RnEnv2 -> [Var] -> [Var] -> Maybe RnEnv2
nonDetCmpType :: Type -> Type -> Ordering
nonDetCmpTypes :: [Type] -> [Type] -> Ordering
instanceCantMatch :: [RoughMatchTc] -> [RoughMatchTc] -> Bool
roughMatchTcs :: [Type] -> [RoughMatchTc]
pprParendType :: Type -> SDoc
pprParendKind :: Kind -> SDoc
pprClassPred :: Class -> [Type] -> SDoc
pprTheta :: ThetaType -> SDoc
pprParendTheta :: ThetaType -> SDoc
pprThetaArrowTy :: ThetaType -> SDoc
pprSigmaType :: Type -> SDoc
pprTCvBndrs :: [ForAllTyBinder] -> SDoc
pprTCvBndr :: ForAllTyBinder -> SDoc
pprTypeApp :: TyCon -> [Type] -> SDoc
addErr :: TcRnMessage -> TcRn ()
mkClassPred :: Class -> [Type] -> PredType
isEqPredClass :: Class -> Bool
isClassPred :: PredType -> Bool
isEqPred :: PredType -> Bool
isEqPrimPred :: PredType -> Bool
isIPLikePred :: Type -> Bool
hsQTvExplicit :: LHsQTyVars pass -> [LHsTyVarBndr () pass]
hsPatSigType :: HsPatSigType pass -> LHsType pass
mapHsOuterImplicit :: (XHsOuterImplicit pass -> XHsOuterImplicit pass) -> HsOuterTyVarBndrs flag pass -> HsOuterTyVarBndrs flag pass
hsIPNameFS :: HsIPName -> FastString
-- | Does this HsTyVarBndr come with an explicit kind annotation?
isHsKindedTyVar :: HsTyVarBndr flag pass -> Bool
hsMult :: HsScaled pass a -> HsArrow pass
hsScaledThing :: HsScaled pass a -> a
-- | An empty list that can be used to indicate that there are no type
-- arguments allowed in cases where HsConDetails is applied to Void.
noTypeArgs :: [Void]
hsConPatArgs :: UnXRec p => HsConPatDetails p -> [LPat p]
hsRecFields :: UnXRec p => HsRecFields p arg -> [XCFieldOcc p]
hsRecFieldsArgs :: UnXRec p => HsRecFields p arg -> [arg]
hsRecFieldSel :: UnXRec p => HsRecField p arg -> XCFieldOcc p
isFixityLSig :: UnXRec p => LSig p -> Bool
isTypeLSig :: UnXRec p => LSig p -> Bool
isSpecLSig :: UnXRec p => LSig p -> Bool
isSpecInstLSig :: UnXRec p => LSig p -> Bool
isPragLSig :: UnXRec p => LSig p -> Bool
isInlineLSig :: UnXRec p => LSig p -> Bool
isMinimalLSig :: UnXRec p => LSig p -> Bool
isSCCFunSig :: UnXRec p => LSig p -> Bool
isCompleteMatchSig :: UnXRec p => LSig p -> Bool
hsGroupInstDecls :: HsGroup id -> [LInstDecl id]
-- | True = argument is a data/newtype
-- declaration.
isDataDecl :: TyClDecl pass -> Bool
-- | type or type instance declaration
isSynDecl :: TyClDecl pass -> Bool
-- | type class
isClassDecl :: TyClDecl pass -> Bool
-- | type/data family declaration
isFamilyDecl :: TyClDecl pass -> Bool
-- | type family declaration
isTypeFamilyDecl :: TyClDecl pass -> Bool
-- | open type family info
isOpenTypeFamilyInfo :: FamilyInfo pass -> Bool
-- | closed type family info
isClosedTypeFamilyInfo :: FamilyInfo pass -> Bool
-- | data family declaration
isDataFamilyDecl :: TyClDecl pass -> Bool
tyClDeclTyVars :: TyClDecl pass -> LHsQTyVars pass
tyClGroupTyClDecls :: [TyClGroup pass] -> [LTyClDecl pass]
tyClGroupInstDecls :: [TyClGroup pass] -> [LInstDecl pass]
tyClGroupRoleDecls :: [TyClGroup pass] -> [LRoleAnnotDecl pass]
tyClGroupKindSigs :: [TyClGroup pass] -> [LStandaloneKindSig pass]
dataDefnConsNewOrData :: DataDefnCons a -> NewOrData
-- | Are the constructors within a type data declaration? See Note
-- [Type data declarations] in GHC.Rename.Module.
isTypeDataDefnCons :: DataDefnCons a -> Bool
collectRuleBndrSigTys :: [RuleBndr pass] -> [HsPatSigType pass]
docDeclDoc :: DocDecl pass -> LHsDoc pass
annProvenanceName_maybe :: UnXRec p => AnnProvenance p -> Maybe (IdP p)
isInfixMatch :: Match id body -> Bool
isPatSynCtxt :: HsMatchContext p -> Bool
qualifiedDoModuleName_maybe :: HsStmtContext p -> Maybe ModuleName
isComprehensionContext :: HsStmtContext id -> Bool
isDoComprehensionContext :: HsDoFlavour -> Bool
-- | Is this a monadic context?
isMonadStmtContext :: HsStmtContext id -> Bool
isMonadDoStmtContext :: HsDoFlavour -> Bool
isMonadCompContext :: HsStmtContext id -> Bool
isMonadDoCompContext :: HsDoFlavour -> Bool
pprFunBind :: forall (idR :: Pass). OutputableBndrId idR => MatchGroup (GhcPass idR) (LHsExpr (GhcPass idR)) -> SDoc
pprPatBind :: forall (bndr :: Pass) (p :: Pass). (OutputableBndrId bndr, OutputableBndrId p) => LPat (GhcPass bndr) -> GRHSs (GhcPass p) (LHsExpr (GhcPass p)) -> SDoc
pprUntypedSplice :: forall (p :: Pass). OutputableBndrId p => Bool -> Maybe SplicePointName -> HsUntypedSplice (GhcPass p) -> SDoc
pprTypedSplice :: forall (p :: Pass). OutputableBndrId p => Maybe SplicePointName -> LHsExpr (GhcPass p) -> SDoc
pprExpr :: forall (p :: Pass). OutputableBndrId p => HsExpr (GhcPass p) -> SDoc
pprLExpr :: forall (p :: Pass). OutputableBndrId p => LHsExpr (GhcPass p) -> SDoc
idUnique :: Id -> Unique
idType :: Id -> Kind
idMult :: Id -> Mult
idScaledType :: Id -> Scaled Type
scaleIdBy :: Mult -> Id -> Id
-- | Like scaleIdBy, but skips non-Ids. Useful for scaling a mixed
-- list of ids and tyvars.
scaleVarBy :: Mult -> Var -> Var
setIdName :: Id -> Name -> Id
setIdUnique :: Id -> Unique -> Id
-- | Not only does this set the Id Type, it also evaluates
-- the type to try and reduce space usage
setIdType :: Id -> Type -> Id
localiseId :: Id -> Id
setIdInfo :: Id -> IdInfo -> Id
modifyIdInfo :: HasDebugCallStack => (IdInfo -> IdInfo) -> Id -> Id
maybeModifyIdInfo :: Maybe IdInfo -> Id -> Id
-- | For an explanation of global vs. local Ids, see
-- GHC.Types.Var.Var#globalvslocal
mkGlobalId :: IdDetails -> Name -> Type -> IdInfo -> Id
-- | Make a global Id without any extra information at all
mkVanillaGlobal :: Name -> Type -> Id
-- | Make a global Id with no global information but some generic
-- IdInfo
mkVanillaGlobalWithInfo :: Name -> Type -> IdInfo -> Id
-- | For an explanation of global vs. local Ids, see
-- GHC.Types.Var#globalvslocal
mkLocalId :: HasDebugCallStack => Name -> Mult -> Type -> Id
-- | Make a local CoVar
mkLocalCoVar :: Name -> Type -> CoVar
-- | Like mkLocalId, but checks the type to see if it should make a
-- covar
mkLocalIdOrCoVar :: Name -> Mult -> Type -> Id
mkLocalIdWithInfo :: HasDebugCallStack => Name -> Mult -> Type -> IdInfo -> Id
-- | Create a local Id that is marked as exported. This prevents
-- things attached to it from being removed as dead code. See Note
-- [Exported LocalIds]
mkExportedLocalId :: IdDetails -> Name -> Type -> Id
mkExportedVanillaId :: Name -> Type -> Id
-- | Create a system local Id. These are local Ids (see
-- Var#globalvslocal) that are created by the compiler out of thin
-- air
mkSysLocal :: FastString -> Unique -> Mult -> Type -> Id
-- | Like mkSysLocal, but checks to see if we have a covar type
mkSysLocalOrCoVar :: FastString -> Unique -> Mult -> Type -> Id
mkSysLocalM :: MonadUnique m => FastString -> Mult -> Type -> m Id
mkSysLocalOrCoVarM :: MonadUnique m => FastString -> Mult -> Type -> m Id
-- | Create a user local Id. These are local Ids (see
-- GHC.Types.Var#globalvslocal) with a name and location that the
-- user might recognize
mkUserLocal :: OccName -> Unique -> Mult -> Type -> SrcSpan -> Id
-- | Like mkUserLocal, but checks if we have a coercion type
mkUserLocalOrCoVar :: OccName -> Unique -> Mult -> Type -> SrcSpan -> Id
-- | Workers get local names. CoreTidy will externalise these if
-- necessary
mkWorkerId :: Unique -> Id -> Type -> Id
-- | Create a template local: a family of system local Ids in
-- bijection with Ints, typically used in unfoldings
mkTemplateLocal :: Int -> Type -> Id
mkScaledTemplateLocal :: Int -> Scaled Type -> Id
-- | Create a template local for a series of types
mkTemplateLocals :: [Type] -> [Id]
-- | Create a template local for a series of type, but start from a
-- specified template local
mkTemplateLocalsNum :: Int -> [Type] -> [Id]
-- | If the Id is that for a record selector, extract the
-- sel_tycon. Panic otherwise.
recordSelectorTyCon :: Id -> RecSelParent
recordSelectorTyCon_maybe :: Id -> Maybe RecSelParent
isRecordSelector :: Id -> Bool
isDataConRecordSelector :: Id -> Bool
isPatSynRecordSelector :: Id -> Bool
isNaughtyRecordSelector :: Id -> Bool
isClassOpId :: Id -> Bool
isClassOpId_maybe :: Id -> Maybe Class
isPrimOpId :: Id -> Bool
isDFunId :: Id -> Bool
isPrimOpId_maybe :: Id -> Maybe PrimOp
isFCallId :: Id -> Bool
isFCallId_maybe :: Id -> Maybe ForeignCall
isDataConWorkId :: Id -> Bool
isDataConWorkId_maybe :: Id -> Maybe DataCon
isDataConWrapId :: Id -> Bool
isDataConWrapId_maybe :: Id -> Maybe DataCon
isDataConId_maybe :: Id -> Maybe DataCon
-- | An Id for which we might require all callers to pass strict arguments
-- properly tagged + evaluated.
--
-- See Note [CBV Function Ids]
isWorkerLikeId :: Id -> Bool
isJoinId :: Var -> Bool
-- | Doesn't return strictness marks
isJoinId_maybe :: Var -> Maybe JoinArity
-- | Get from either the worker or the wrapper Id to the
-- DataCon. Currently used only in the desugarer.
--
-- INVARIANT: idDataCon (dataConWrapId d) = d: remember,
-- dataConWrapId can return either the wrapper or the worker
idDataCon :: Id -> DataCon
-- | Returns True of an Id which may not have a binding,
-- even though it is defined in this module.
hasNoBinding :: Id -> Bool
-- | isImplicitId tells whether an Ids info is implied by
-- other declarations, so we don't need to put its signature in an
-- interface file, even if it's mentioned in some other interface
-- unfolding.
isImplicitId :: Id -> Bool
idIsFrom :: Module -> Id -> Bool
isDeadBinder :: Id -> Bool
idJoinArity :: JoinId -> JoinArity
asJoinId :: Id -> JoinArity -> JoinId
infixl 1 `asJoinId`
zapJoinId :: Id -> Id
asJoinId_maybe :: Id -> Maybe JoinArity -> Id
infixl 1 `asJoinId_maybe`
idArity :: Id -> Arity
setIdArity :: Id -> Arity -> Id
infixl 1 `setIdArity`
idCallArity :: Id -> Arity
setIdCallArity :: Id -> Arity -> Id
infixl 1 `setIdCallArity`
-- | This function counts all arguments post-unarisation, which includes
-- arguments with no runtime representation -- see Note [Unarisation and
-- arity]
idFunRepArity :: Id -> RepArity
-- | Returns true if an application to n args diverges or throws an
-- exception See Note [Dead ends] in GHC.Types.Demand.
isDeadEndId :: Var -> Bool
-- | Accesses the Id's dmdSigInfo.
idDmdSig :: Id -> DmdSig
setIdDmdSig :: Id -> DmdSig -> Id
infixl 1 `setIdDmdSig`
idCprSig :: Id -> CprSig
setIdCprSig :: Id -> CprSig -> Id
infixl 1 `setIdCprSig`
zapIdDmdSig :: Id -> Id
-- | isStrictId says whether either (a) the Id has a strict
-- demand placed on it or (b) definitely has a "strict type", such that
-- it can always be evaluated strictly (i.e an unlifted type) We need to
-- check (b) as well as (a), because when the demand for the given
-- id hasn't been computed yet but id has a strict type, we
-- still want `isStrictId id` to be True. Returns False if the
-- type is levity polymorphic; False is always safe.
isStrictId :: Id -> Bool
idTagSig_maybe :: Id -> Maybe TagSig
-- | Returns the Ids unfolding, but does not expose the unfolding of
-- a strong loop breaker. See unfoldingInfo.
--
-- If you really want the unfolding of a strong loopbreaker, call
-- realIdUnfolding.
idUnfolding :: IdUnfoldingFun
noUnfoldingFun :: IdUnfoldingFun
-- | Returns an unfolding only if (a) not a strong loop breaker and (b)
-- always active
alwaysActiveUnfoldingFun :: IdUnfoldingFun
-- | Returns an unfolding only if (a) not a strong loop breaker and (b)
-- active in according to is_active
whenActiveUnfoldingFun :: (Activation -> Bool) -> IdUnfoldingFun
-- | Expose the unfolding if there is one, including for loop breakers
realIdUnfolding :: Id -> Unfolding
setIdUnfolding :: Id -> Unfolding -> Id
infixl 1 `setIdUnfolding`
idDemandInfo :: Id -> Demand
setIdDemandInfo :: Id -> Demand -> Id
infixl 1 `setIdDemandInfo`
setIdTagSig :: Id -> TagSig -> Id
-- | If all marks are NotMarkedStrict we just set nothing.
setIdCbvMarks :: Id -> [CbvMark] -> Id
infixl 1 `setIdCbvMarks`
idCbvMarks_maybe :: Id -> Maybe [CbvMark]
idCbvMarkArity :: Id -> Arity
-- | Remove any cbv marks on arguments from a given Id.
asNonWorkerLikeId :: Id -> Id
-- | Turn this id into a WorkerLikeId if possible.
asWorkerLikeId :: Id -> Id
setCaseBndrEvald :: StrictnessMark -> Id -> Id
-- | Similar to trimUnfolding, but also removes evaldness info.
zapIdUnfolding :: Id -> Id
idSpecialisation :: Id -> RuleInfo
idCoreRules :: Id -> [CoreRule]
idHasRules :: Id -> Bool
setIdSpecialisation :: Id -> RuleInfo -> Id
infixl 1 `setIdSpecialisation`
idCafInfo :: Id -> CafInfo
infixl 1 `idCafInfo`
setIdCafInfo :: Id -> CafInfo -> Id
idLFInfo_maybe :: Id -> Maybe LambdaFormInfo
setIdLFInfo :: Id -> LambdaFormInfo -> Id
idOccInfo :: Id -> OccInfo
setIdOccInfo :: Id -> OccInfo -> Id
infixl 1 `setIdOccInfo`
zapIdOccInfo :: Id -> Id
idInlinePragma :: Id -> InlinePragma
setInlinePragma :: Id -> InlinePragma -> Id
infixl 1 `setInlinePragma`
modifyInlinePragma :: Id -> (InlinePragma -> InlinePragma) -> Id
idInlineActivation :: Id -> Activation
setInlineActivation :: Id -> Activation -> Id
infixl 1 `setInlineActivation`
idRuleMatchInfo :: Id -> RuleMatchInfo
isConLikeId :: Id -> Bool
idOneShotInfo :: Id -> OneShotInfo
setOneShotLambda :: Id -> Id
clearOneShotLambda :: Id -> Id
setIdOneShotInfo :: Id -> OneShotInfo -> Id
infixl 1 `setIdOneShotInfo`
updOneShotInfo :: Id -> OneShotInfo -> Id
zapLamIdInfo :: Id -> Id
zapFragileIdInfo :: Id -> Id
zapIdDemandInfo :: Id -> Id
zapIdUsageInfo :: Id -> Id
zapIdUsageEnvInfo :: Id -> Id
zapIdUsedOnceInfo :: Id -> Id
zapIdTailCallInfo :: Id -> Id
zapStableUnfolding :: Id -> Id
transferPolyIdInfo :: Id -> [Var] -> Id -> Id
wiredInTyCons :: [TyCon]
mkWiredInTyConName :: BuiltInSyntax -> Module -> FastString -> Unique -> TyCon -> Name
mkWiredInIdName :: Module -> FastString -> Unique -> Id -> Name
eqTyConName :: Name
eqTyCon_RDR :: RdrName
heqTyConName :: Name
coercibleTyConName :: Name
charTyConName :: Name
intTyConName :: Name
boolTyConName :: Name
listTyConName :: Name
nilDataConName :: Name
consDataConName :: Name
maybeTyConName :: Name
nothingDataConName :: Name
justDataConName :: Name
wordTyConName :: Name
floatTyConName :: Name
doubleTyConName :: Name
anyTyCon :: TyCon
anyTy :: Type
-- | Make a fake, recovery TyCon from an existing one. Used when
-- recovering from errors in type declarations
makeRecoveryTyCon :: TyCon -> TyCon
boolTyCon_RDR :: RdrName
false_RDR :: RdrName
true_RDR :: RdrName
intTyCon_RDR :: RdrName
charTyCon_RDR :: RdrName
stringTyCon_RDR :: RdrName
intDataCon_RDR :: RdrName
listTyCon_RDR :: RdrName
consDataCon_RDR :: RdrName
typeSymbolKindCon :: TyCon
-- | Built-in syntax isn't "in scope" so these OccNames map to wired-in
-- Names with BuiltInSyntax. However, this should only be necessary while
-- resolving names produced by Template Haskell splices since we take
-- care to encode built-in syntax names specially in interface files. See
-- Note [Symbol table representation of names].
--
-- Moreover, there is no need to include names of things that the user
-- can't write (e.g. type representation bindings like $tc(,,,)).
isBuiltInOcc_maybe :: OccName -> Maybe Name
isPunOcc_maybe :: Module -> OccName -> Maybe Name
mkTupleStr :: Boxity -> NameSpace -> Arity -> String
cTupleTyCon :: Arity -> TyCon
cTupleTyConNames :: [Name]
isCTupleTyConName :: Name -> Bool
-- | If the given name is that of a constraint tuple, return its arity.
cTupleTyConNameArity_maybe :: Name -> Maybe Arity
cTupleDataConNames :: [Name]
cTupleSelId :: ConTag -> Arity -> Id
mkPromotedPairTy :: Kind -> Kind -> Type -> Type -> Type
isPromotedPairType :: Type -> Maybe (Type, Type)
unitTyCon :: TyCon
unitTyConKey :: Unique
unitDataCon :: DataCon
unitDataConId :: Id
soloTyCon :: TyCon
pairTyCon :: TyCon
unboxedUnitTy :: Type
unboxedUnitTyCon :: TyCon
unboxedUnitDataCon :: DataCon
-- | Specialization of unboxedTupleSumKind for sums
unboxedSumKind :: [Type] -> Kind
eqTyCon :: TyCon
eqClass :: Class
eqDataCon :: DataCon
heqClass :: Class
heqDataCon :: DataCon
coercibleClass :: Class
coercibleDataCon :: DataCon
multiplicityTyConName :: Name
oneDataConName :: Name
manyDataConName :: Name
oneDataCon :: DataCon
manyDataCon :: DataCon
unrestrictedFunTyConName :: Name
constraintKindTyCon :: TyCon
typeToTypeKind :: Type
unliftedTypeKindTyConName :: Name
unliftedDataConTyCon :: TyCon
sumRepDataConTyCon :: TyCon
liftedRepTyConName :: Name
unliftedRepTyConName :: Name
charTyCon :: TyCon
charDataCon :: DataCon
stringTy :: Type
intTy :: Type
intTyCon :: TyCon
intDataCon :: DataCon
wordTy :: Type
wordTyCon :: TyCon
wordDataCon :: DataCon
word8Ty :: Type
word8TyCon :: TyCon
word8DataCon :: DataCon
floatTy :: Type
floatTyCon :: TyCon
floatDataCon :: DataCon
doubleTy :: Type
doubleTyCon :: TyCon
doubleDataCon :: DataCon
-- | Given a type ty, if ty is not of kind Type, return a
-- data constructor that will box it, and the type of the boxed thing,
-- which does now have kind Type. See Note [Boxing constructors]
boxingDataCon :: Type -> BoxingInfo b
boolTy :: Type
boolTyCon :: TyCon
falseDataCon :: DataCon
trueDataCon :: DataCon
falseDataConId :: Id
trueDataConId :: Id
orderingTyCon :: TyCon
ordLTDataCon :: DataCon
ordEQDataCon :: DataCon
ordGTDataCon :: DataCon
ordLTDataConId :: Id
ordEQDataConId :: Id
ordGTDataConId :: Id
mkListTy :: Type -> Type
nilDataCon :: DataCon
consDataCon :: DataCon
maybeTyCon :: TyCon
nothingDataCon :: DataCon
justDataCon :: DataCon
mkPromotedMaybeTy :: Kind -> Maybe Type -> Type
mkMaybeTy :: Type -> Kind
isPromotedMaybeTy :: Type -> Maybe (Maybe Type)
-- | Make a tuple type. The list of types should not include any
-- RuntimeRep specifications. Boxed 1-tuples are flattened. See Note
-- [One-tuples]
mkTupleTy :: Boxity -> [Type] -> Type
-- | Make a tuple type. The list of types should not include any
-- RuntimeRep specifications. Boxed 1-tuples are *not* flattened. See
-- Note [One-tuples] and Note [Don't flatten tuples from HsSyn] in
-- GHC.Core.Make
mkTupleTy1 :: Boxity -> [Type] -> Type
mkConstraintTupleTy :: [Type] -> Type
mkSumTy :: [Type] -> Type
promotedTrueDataCon :: TyCon
promotedFalseDataCon :: TyCon
promotedNothingDataCon :: TyCon
promotedJustDataCon :: TyCon
promotedLTDataCon :: TyCon
promotedEQDataCon :: TyCon
promotedGTDataCon :: TyCon
promotedConsDataCon :: TyCon
promotedNilDataCon :: TyCon
-- | Make a *promoted* list.
mkPromotedListTy :: Kind -> [Type] -> Type
integerTyConName :: Name
integerISDataConName :: Name
integerIPDataConName :: Name
integerINDataConName :: Name
integerTyCon :: TyCon
integerISDataCon :: DataCon
integerIPDataCon :: DataCon
integerINDataCon :: DataCon
naturalTyConName :: Name
naturalNSDataConName :: Name
naturalNBDataConName :: Name
naturalTyCon :: TyCon
naturalNSDataCon :: DataCon
naturalNBDataCon :: DataCon
-- | Replaces constraint tuple names with corresponding boxed ones.
filterCTuple :: RdrName -> RdrName
lookupOrigNameCache :: OrigNameCache -> Module -> OccName -> Maybe Name
pprParendExpr :: forall (p :: Pass). OutputableBndrId p => PprPrec -> HsExpr (GhcPass p) -> SDoc
orphNamesOfType :: Type -> NameSet
orphNamesOfTypes :: [Type] -> NameSet
orphNamesOfCo :: Coercion -> NameSet
orphNamesOfCoCon :: forall (br :: BranchFlag). CoAxiom br -> NameSet
-- | Pretty-prints a FamInst (type/data family instance) with its
-- defining location.
pprFamInst :: FamInst -> SDoc
mkSingleAltCase :: CoreExpr -> Id -> AltCon -> [Var] -> CoreExpr -> CoreExpr
-- | Sort the variables, putting type and covars first, in scoped order,
-- and then other Ids
--
-- It is a deterministic sort, meaning it doesn't look at the values of
-- Uniques. For explanation why it's important See Note [Unique
-- Determinism] in GHC.Types.Unique.
sortQuantVars :: [Var] -> [Var]
-- | Construct an expression which represents the application of one
-- expression to the other
mkCoreApp :: SDoc -> CoreExpr -> CoreExpr -> CoreExpr
infixl 4 `mkCoreApp`
mkWildEvBinder :: PredType -> EvVar
-- | Make a wildcard binder. This is typically used when you need a
-- binder that you expect to use only at a *binding* site. Do not use it
-- at occurrence sites because it has a single, fixed unique, and it's
-- very easy to get into difficulties with shadowing. That's why it is
-- used so little.
--
-- See Note [WildCard binders] in GHC.Core.Opt.Simplify.Env
mkWildValBinder :: Mult -> Type -> Id
-- | Make a case expression whose case binder is unused The alts and res_ty
-- should not have any occurrences of WildId
mkWildCase :: CoreExpr -> Scaled Type -> Type -> [CoreAlt] -> CoreExpr
mkIfThenElse :: CoreExpr -> CoreExpr -> CoreExpr -> CoreExpr
castBottomExpr :: CoreExpr -> Type -> CoreExpr
mkLitRubbish :: Type -> Maybe CoreExpr
-- | Create a CoreExpr which will evaluate to the given
-- Int. Don't check that the number is in the range of the
-- target platform Int
mkUncheckedIntExpr :: Integer -> CoreExpr
-- | Create a CoreExpr which will evaluate to the given Int
mkIntExprInt :: Platform -> Int -> CoreExpr
-- | Create a CoreExpr which will evaluate to the given
-- Integer
mkIntegerExpr :: Platform -> Integer -> CoreExpr
-- | Create a CoreExpr which will evaluate to the given
-- Natural
mkNaturalExpr :: Platform -> Integer -> CoreExpr
-- | Create a CoreExpr which will evaluate to a string morally
-- equivalent to the given FastString
mkStringExprFS :: MonadThings m => FastString -> m CoreExpr
getMkStringIds :: Applicative m => (Name -> m Id) -> m MkStringIds
mkStringExprFSWith :: MkStringIds -> FastString -> CoreExpr
-- | Build a small unboxed tuple holding the specified expressions. Do not
-- include the RuntimeRep specifiers; this function calculates them for
-- you. Does not flatten one-tuples; see Note [Flattening
-- one-tuples]
mkCoreUnboxedTuple :: [CoreExpr] -> CoreExpr
-- | Make a core tuple of the given boxity; don't flatten 1-tuples
mkCoreTupBoxity :: Boxity -> [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
-- | Build a small tuple holding the specified expressions One-tuples are
-- flattened; see Note [Flattening one-tuples]
mkCoreTup :: [CoreExpr] -> CoreExpr
-- | Build an unboxed sum.
--
-- Alternative number ("alt") starts from 1.
mkCoreUnboxedSum :: Int -> Int -> [Type] -> CoreExpr -> CoreExpr
mkBigCoreVarTupSolo :: [Id] -> CoreExpr
-- | Build a big tuple holding the specified variables One-tuples are
-- flattened; see Note [Flattening one-tuples] Arguments don't have to
-- have kind Type
mkBigCoreVarTup :: [Id] -> CoreExpr
-- | Build a "big" tuple holding the specified expressions One-tuples are
-- flattened; see Note [Flattening one-tuples] Arguments don't have to
-- have kind Type; ones that do not are boxed This function crashes (in
-- wrapBox) if given a non-Type argument that it doesn't know how to box.
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
-- | 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
-- | The unit expression
unitExpr :: CoreExpr
-- | Lifts a "small" constructor into a "big" constructor by recursive
-- decomposition
mkChunkified :: ([a] -> a) -> [a] -> a
-- | Split a list into lists that are small enough to have a corresponding
-- tuple arity. The sub-lists of the result all have length <=
-- mAX_TUPLE_SIZE But there may be more than mAX_TUPLE_SIZE
-- sub-lists
chunkify :: [a] -> [[a]]
-- | mkBigTupleSelectorSolo is like mkBigTupleSelector but
-- one-tuples are NOT flattened (see Note [Flattening one-tuples])
--
-- Builds a selector which scrutinises the given expression and extracts
-- the one name from the list given. If you want the no-shadowing rule to
-- apply, the caller is responsible for making sure that none of these
-- names are in scope.
--
-- If there is just one Id in the tuple, then the selector is just
-- the identity.
--
-- If necessary, we pattern match on a "big" tuple.
--
-- A tuple selector is not linear in its argument. Consequently, the case
-- expression built by mkBigTupleSelector must consume its
-- scrutinee Many times. And all the argument variables must
-- have multiplicity Many.
mkBigTupleSelector :: [Id] -> Id -> Id -> CoreExpr -> CoreExpr
-- | Builds a selector which scrutinises the given expression and extracts
-- the one name from the list given. If you want the no-shadowing rule to
-- apply, the caller is responsible for making sure that none of these
-- names are in scope.
--
-- If there is just one Id in the tuple, then the selector is just
-- the identity.
--
-- If necessary, we pattern match on a "big" tuple.
--
-- A tuple selector is not linear in its argument. Consequently, the case
-- expression built by mkBigTupleSelector must consume its
-- scrutinee Many times. And all the argument variables must
-- have multiplicity Many.
mkBigTupleSelectorSolo :: [Id] -> Id -> Id -> CoreExpr -> CoreExpr
-- | A generalization of mkBigTupleSelector, allowing the body of
-- the case to be an arbitrary expression.
--
-- To avoid shadowing, we use uniques to invent new variables.
--
-- If necessary we pattern match on a "big" tuple.
mkBigTupleCase :: UniqSupply -> [Id] -> CoreExpr -> CoreExpr -> CoreExpr
wrapFloat :: FloatBind -> CoreExpr -> CoreExpr
-- | Applies the floats from right to left. That is wrapFloats [b1, b2,
-- …, bn] u = let b1 in let b2 in … in let bn in u
wrapFloats :: [FloatBind] -> CoreExpr -> CoreExpr
floatBindings :: FloatBind -> [Var]
-- | Makes a list [] for lists of the specified type
mkNilExpr :: Type -> CoreExpr
-- | Makes a list (:) for lists of the specified type
mkConsExpr :: Type -> CoreExpr -> CoreExpr -> CoreExpr
-- | Make a list containing the given expressions, where the list has the
-- given type
mkListExpr :: Type -> [CoreExpr] -> CoreExpr
-- | Make a fully applied foldr expression
mkFoldrExpr :: MonadThings m => Type -> Type -> CoreExpr -> CoreExpr -> CoreExpr -> m CoreExpr
-- | Make a build expression applied to a locally-bound worker
-- function
mkBuildExpr :: (MonadFail m, MonadThings m, MonadUnique m) => Type -> ((Id, Type) -> (Id, Type) -> m CoreExpr) -> m CoreExpr
-- | Makes a Nothing for the specified type
mkNothingExpr :: Type -> CoreExpr
-- | Makes a Just from a value of the specified type
mkJustExpr :: Type -> CoreExpr -> CoreExpr
mkRuntimeErrorApp :: Id -> Type -> String -> CoreExpr
errorIds :: [Id]
rEC_SEL_ERROR_ID :: Id
rEC_CON_ERROR_ID :: Id
pAT_ERROR_ID :: Id
nO_METHOD_BINDING_ERROR_ID :: Id
nON_EXHAUSTIVE_GUARDS_ERROR_ID :: Id
tYPE_ERROR_ID :: Id
aBSENT_SUM_FIELD_ERROR_ID :: Id
mkImpossibleExpr :: Type -> String -> CoreExpr
mkAbsentErrorApp :: Type -> String -> CoreExpr
mkHsAppTy :: forall (p :: Pass). LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)
mkHsAppKindTy :: forall (p :: Pass). XAppKindTy (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)
-- | Make an ExpType suitable for checking.
mkCheckExpType :: TcType -> ExpType
-- | Like SynType but accepts a regular TcType
synKnownType :: TcType -> SyntaxOpType
-- | Like mkFunTys but for SyntaxOpType
mkSynFunTys :: [SyntaxOpType] -> ExpType -> SyntaxOpType
maxTcLevel :: TcLevel -> TcLevel -> TcLevel
topTcLevel :: TcLevel
isTopTcLevel :: TcLevel -> Bool
pushTcLevel :: TcLevel -> TcLevel
strictlyDeeperThan :: TcLevel -> TcLevel -> Bool
deeperThanOrSame :: TcLevel -> TcLevel -> Bool
sameDepthAs :: TcLevel -> TcLevel -> Bool
tcTyVarLevel :: TcTyVar -> TcLevel
tcTypeLevel :: TcType -> TcLevel
-- | Finds outermost type-family applications occurring in a type, after
-- expanding synonyms. In the list (F, tys) that is returned we guarantee
-- that tys matches F's arity. For example, given type family F a :: *
-- -> * (arity 1) calling tcTyFamInsts on (Maybe (F Int Bool) will
-- return (F, [Int]), not (F, [Int,Bool])
--
-- This is important for its use in deciding termination of type
-- instances (see #11581). E.g. type instance G [Int] = ...(F Int <big
-- type>)... we don't need to take <big type> into account when
-- asking if the calls on the RHS are smaller than the LHS
tcTyFamInsts :: Type -> [(TyCon, [Type])]
-- | Like tcTyFamInsts, except that the output records whether the
-- type family and its arguments occur as an invisible argument in
-- some type application. This information is useful because it helps GHC
-- know when to turn on -fprint-explicit-kinds during error
-- reporting so that users can actually see the type family being
-- mentioned.
--
-- As an example, consider:
--
--
-- class C a
-- data T (a :: k)
-- type family F a :: k
-- instance C (T @(F Int) (F Bool))
--
--
-- There are two occurrences of the type family F in that
-- C instance, so tcTyFamInstsAndVis (C (T @(F Int)
-- (F Bool))) will return:
--
--
-- [ (True, F, [Int])
-- , (False, F, [Bool]) ]
--
--
-- F Int is paired with True since it appears as an
-- invisible argument to C, whereas F Bool is
-- paired with False since it appears an a visible argument
-- to C.
--
-- See also Note [Kind arguments in error messages] in
-- GHC.Tc.Errors.
tcTyFamInstsAndVis :: Type -> [(Bool, TyCon, [Type])]
-- | In an application of a TyCon to some arguments, find the
-- outermost occurrences of type family applications within the
-- arguments. This function will not consider the TyCon itself
-- when checking for type family applications.
--
-- See tcTyFamInstsAndVis for more details on how this works (as
-- this function is called inside of tcTyFamInstsAndVis).
tcTyConAppTyFamInstsAndVis :: TyCon -> [Type] -> [(Bool, TyCon, [Type])]
-- | Check that a type does not contain any type family applications.
isTyFamFree :: Type -> Bool
anyRewritableTyVar :: EqRel -> (EqRel -> TcTyVar -> Bool) -> TcType -> Bool
anyRewritableTyFamApp :: EqRel -> (EqRel -> TyCon -> [TcType] -> Bool) -> TcType -> Bool
exactTyCoVarsOfType :: Type -> TyCoVarSet
exactTyCoVarsOfTypes :: [Type] -> TyCoVarSet
tcIsTcTyVar :: TcTyVar -> Bool
isPromotableMetaTyVar :: TcTyVar -> Bool
isTouchableMetaTyVar :: TcLevel -> TcTyVar -> Bool
isImmutableTyVar :: TyVar -> Bool
isSkolemTyVar :: TcTyVar -> Bool
skolemSkolInfo :: TcTyVar -> SkolemInfo
isOverlappableTyVar :: TcTyVar -> Bool
isAmbiguousTyVar :: TcTyVar -> Bool
isCycleBreakerTyVar :: TcTyVar -> Bool
-- | Is this type variable a concrete type variable, i.e. it is a
-- metavariable with ConcreteTv MetaInfo?
--
-- Returns the ConcreteTvOrigin stored in the type variable if so,
-- or Nothing otherwise.
isConcreteTyVar_maybe :: TcTyVar -> Maybe ConcreteTvOrigin
-- | Is this type concrete type variable, i.e. a metavariable with
-- ConcreteTv MetaInfo?
isConcreteTyVarTy :: TcType -> Bool
-- | Is this type a concrete type variable? If so, return the associated
-- TcTyVar and ConcreteTvOrigin.
isConcreteTyVarTy_maybe :: TcType -> Maybe (TcTyVar, ConcreteTvOrigin)
isMetaTyVarTy :: TcType -> Bool
metaTyVarInfo :: TcTyVar -> MetaInfo
metaTyVarTcLevel :: TcTyVar -> TcLevel
metaTyVarTcLevel_maybe :: TcTyVar -> Maybe TcLevel
metaTyVarRef :: TyVar -> IORef MetaDetails
setMetaTyVarTcLevel :: TcTyVar -> TcLevel -> TcTyVar
isTyVarTyVar :: Var -> Bool
isFlexi :: MetaDetails -> Bool
isIndirect :: MetaDetails -> Bool
isRuntimeUnkSkol :: TyVar -> Bool
mkTyVarNamePairs :: [TyVar] -> [(Name, TyVar)]
findDupTyVarTvs :: [(Name, TcTyVar)] -> [(Name, Name)]
-- | Returns the (kind, type) variables in a type that are as-yet-unknown:
-- metavariables and RuntimeUnks
ambigTkvsOfTy :: TcType -> ([Var], [Var])
-- | Make a sigma ty where all type variables are Inferred. That is,
-- they cannot be used with visible type application.
mkInfSigmaTy :: HasDebugCallStack => [TyCoVar] -> [PredType] -> Type -> Type
-- | Make a sigma ty where all type variables are "specified". That is,
-- they can be used with visible type application
mkSpecSigmaTy :: HasDebugCallStack => [TyVar] -> [PredType] -> Type -> Type
mkSigmaTy :: HasDebugCallStack => [ForAllTyBinder] -> [PredType] -> Type -> Type
tcMkDFunSigmaTy :: [TyVar] -> ThetaType -> Type -> Type
mkPhiTy :: HasDebugCallStack => [PredType] -> Type -> Type
tcMkPhiTy :: HasDebugCallStack => [PredType] -> Type -> Type
tcMkDFunPhiTy :: HasDebugCallStack => [PredType] -> Type -> Type
getDFunTyKey :: Type -> OccName
-- | Splits a forall type into a list of PiTyVarBinders and the
-- inner type. Always succeeds, even if it returns an empty list.
tcSplitPiTys :: Type -> ([PiTyVarBinder], Type)
-- | Splits a type into a PiTyVarBinder and a body, if possible.
tcSplitPiTy_maybe :: Type -> Maybe (PiTyVarBinder, Type)
tcSplitForAllTyVarBinder_maybe :: Type -> Maybe (TyVarBinder, Type)
-- | Like tcSplitPiTys, but splits off only named binders, returning
-- just the tyvars.
tcSplitForAllTyVars :: Type -> ([TyVar], Type)
-- | Like tcSplitForAllTyVars, but only splits ForAllTys with
-- Invisible type variable binders.
tcSplitForAllInvisTyVars :: Type -> ([TyVar], Type)
-- | Like tcSplitForAllTyVars, but only splits a ForAllTy if
-- argf_pred argf is True, where argf is the
-- visibility of the ForAllTy's binder and argf_pred is
-- a predicate over visibilities provided as an argument to this
-- function.
tcSplitSomeForAllTyVars :: (ForAllTyFlag -> Bool) -> Type -> ([TyVar], Type)
-- | Like tcSplitForAllTyVars, but only splits ForAllTys with
-- Required type variable binders. All split tyvars are annotated
-- with ().
tcSplitForAllReqTVBinders :: Type -> ([TcReqTVBinder], Type)
-- | Like tcSplitForAllTyVars, but only splits ForAllTys with
-- Invisible type variable binders. All split tyvars are annotated
-- with their Specificity.
tcSplitForAllInvisTVBinders :: Type -> ([TcInvisTVBinder], Type)
-- | Like tcSplitForAllTyVars, but splits off only named binders.
tcSplitForAllTyVarBinders :: Type -> ([TyVarBinder], Type)
tcSplitPredFunTy_maybe :: Type -> Maybe (PredType, Type)
tcSplitPhiTy :: Type -> (ThetaType, Type)
-- | Split a sigma type into its parts. This only splits invisible
-- type variable binders, as these are the only forms of binder that the
-- typechecker will implicitly instantiate.
tcSplitSigmaTy :: Type -> ([TyVar], ThetaType, Type)
-- | Split a sigma type into its parts, going underneath as many arrows and
-- foralls as possible. See Note [tcSplitNestedSigmaTys]
tcSplitNestedSigmaTys :: Type -> ([TyVar], ThetaType, Type)
tcTyConAppTyCon :: Type -> TyCon
-- | Like tcRepSplitTyConApp_maybe, but only returns the
-- TyCon.
tcTyConAppTyCon_maybe :: Type -> Maybe TyCon
tcTyConAppArgs :: Type -> [Type]
tcSplitFunTys :: Type -> ([Scaled Type], Type)
tcSplitFunTy_maybe :: Type -> Maybe (Scaled Type, Type)
-- | Split off exactly the specified number argument types Returns (Left m)
-- if there are m missing arrows in the type (Right (tys,res))
-- if the type looks like t1 -> ... -> tn -> res
tcSplitFunTysN :: Arity -> TcRhoType -> Either Arity ([Scaled TcSigmaType], TcSigmaType)
tcFunArgTy :: Type -> Scaled Type
tcFunResultTy :: Type -> Type
-- | Strips off n *visible* arguments and returns the resulting type
tcFunResultTyN :: HasDebugCallStack => Arity -> Type -> Type
tcSplitAppTy_maybe :: Type -> Maybe (Type, Type)
tcSplitAppTy :: Type -> (Type, Type)
tcSplitAppTys :: Type -> (Type, [Type])
tcIsTyVarTy :: Type -> Bool
tcSplitQuantPredTy :: Type -> ([TyVar], [Type], PredType)
tcSplitDFunTy :: Type -> ([TyVar], [Type], Class, [Type])
tcSplitDFunHead :: Type -> (Class, [Type])
tcSplitMethodTy :: Type -> ([TyVar], PredType, Type)
isTyVarClassPred :: PredType -> Bool
checkValidClsArgs :: Bool -> Class -> [KindOrType] -> Bool
hasTyVarHead :: Type -> Bool
evVarPred :: EvVar -> PredType
boxEqPred :: EqRel -> Type -> Type -> Maybe (Class, [Type])
pickCapturedPreds :: TyVarSet -> TcThetaType -> TcThetaType
mkMinimalBySCs :: (a -> PredType) -> [a] -> [a]
transSuperClasses :: PredType -> [PredType]
immSuperClasses :: Class -> [Type] -> [PredType]
isImprovementPred :: PredType -> Bool
isSigmaTy :: TcType -> Bool
isRhoTy :: TcType -> Bool
-- | Like isRhoTy, but also says True for Infer types
isRhoExpTy :: ExpType -> Bool
isOverloadedTy :: Type -> Bool
isFloatTy :: Type -> Bool
isDoubleTy :: Type -> Bool
isIntegerTy :: Type -> Bool
isNaturalTy :: Type -> Bool
isIntTy :: Type -> Bool
isWordTy :: Type -> Bool
isBoolTy :: Type -> Bool
isUnitTy :: Type -> Bool
isCharTy :: Type -> Bool
-- | Is the type inhabited by machine floating-point numbers?
--
-- Used to check that we don't use floating-point literal patterns in
-- Core.
--
-- See #9238 and Note [Rules for floating-point comparisons] in
-- GHC.Core.Opt.ConstantFold.
isFloatingPrimTy :: Type -> Bool
-- | Is a type String?
isStringTy :: Type -> Bool
isRigidTy :: TcType -> Bool
deNoteType :: Type -> Type
tcSplitIOType_maybe :: Type -> Maybe (TyCon, Type)
isFFIArgumentTy :: DynFlags -> Safety -> Type -> Validity' IllegalForeignTypeReason
isFFIExternalTy :: Type -> Validity' IllegalForeignTypeReason
isFFIImportResultTy :: DynFlags -> Type -> Validity' IllegalForeignTypeReason
isFFIExportResultTy :: Type -> Validity' IllegalForeignTypeReason
isFFIDynTy :: Type -> Type -> Validity' IllegalForeignTypeReason
isFFILabelTy :: Type -> Validity' IllegalForeignTypeReason
isFFIPrimArgumentTy :: DynFlags -> Type -> Validity' IllegalForeignTypeReason
isFFIPrimResultTy :: DynFlags -> Type -> Validity' IllegalForeignTypeReason
isFunPtrTy :: Type -> Bool
-- | For every arg a tycon can take, the returned list says True if the
-- argument is taken visibly, and False otherwise. Ends with an infinite
-- tail of Trues to allow for oversaturation.
tcTyConVisibilities :: TyCon -> [Bool]
-- | If the tycon is applied to the types, is the next argument visible?
isNextTyConArgVisible :: TyCon -> [Type] -> Bool
-- | Should this type be applied to a visible argument?
isNextArgVisible :: TcType -> Bool
pSizeZero :: PatersonSize
pSizeOne :: PatersonSize
-- | ltPatersonSize ps1 ps2 returns:
--
--
-- - Nothing iff ps1 is definitely strictly smaller
-- than ps2,
-- - Just ps_fail otherwise; ps_fail says what went
-- wrong.
--
ltPatersonSize :: PatersonSize -> PatersonSize -> Maybe PatersonSizeFailure
noMoreTyVars :: [TyVar] -> [TyVar] -> [TyVar]
pSizeType :: Type -> PatersonSize
pSizeTypes :: [Type] -> PatersonSize
pSizeTypeX :: VarSet -> Type -> PatersonSize
pSizeTyConApp :: TyCon -> [Type] -> PatersonSize
pSizeClassPred :: Class -> [Type] -> PatersonSize
pSizeClassPredX :: VarSet -> Class -> [Type] -> PatersonSize
isStuckTypeFamily :: TyCon -> Bool
-- | When this says True, ignore this class constraint during a
-- termination check See (PS1) in Note [The PatersonSize of a type]
isTerminatingClass :: Class -> Bool
allDistinctTyVars :: TyVarSet -> [KindOrType] -> Bool
sizeType :: Type -> TypeSize
sizeTypes :: [Type] -> TypeSize
lclEnvInGeneratedCode :: TcLclEnv -> Bool
getLclEnvLoc :: TcLclEnv -> RealSrcSpan
setLclEnvLoc :: TcLclEnv -> RealSrcSpan -> TcLclEnv
getLclEnvTcLevel :: TcLclEnv -> TcLevel
setLclEnvTcLevel :: TcLclEnv -> TcLevel -> TcLclEnv
-- | If a SwapFlag is IsSwapped, flip the orientation of a
-- coercion
maybeSymCo :: SwapFlag -> TcCoercion -> TcCoercion
-- | Smart constructor to create a WpFun HsWrapper.
--
-- PRECONDITION: the "from" type of the first wrapper must have a
-- syntactically fixed RuntimeRep (see Note [Fixed RuntimeRep] in
-- GHC.Tc.Utils.Concrete).
mkWpFun :: HsWrapper -> HsWrapper -> Scaled TcTypeFRR -> TcType -> HsWrapper
mkWpEta :: [Id] -> HsWrapper -> HsWrapper
mkWpCastR :: TcCoercionR -> HsWrapper
mkWpCastN :: TcCoercionN -> HsWrapper
mkWpTyApps :: [Type] -> HsWrapper
mkWpEvApps :: [EvTerm] -> HsWrapper
mkWpEvVarApps :: [EvVar] -> HsWrapper
mkWpTyLams :: [TyVar] -> HsWrapper
mkWpEvLams :: [Var] -> HsWrapper
mkWpLet :: TcEvBinds -> HsWrapper
idHsWrapper :: HsWrapper
isIdHsWrapper :: HsWrapper -> Bool
-- | Identifies the lambda-bound dictionaries of an
-- HsWrapper. This is used (only) to allow the pattern-match
-- overlap checker to know what Given dictionaries are in scope.
--
-- We specifically do not collect dictionaries bound in a WpLet.
-- These are either superclasses of lambda-bound ones, or (extremely
-- numerous) results of binding Wanted dictionaries. We definitely don't
-- want all those cluttering up the Given dictionaries for pattern-match
-- overlap checking!
hsWrapDictBinders :: HsWrapper -> Bag DictId
collectHsWrapBinders :: HsWrapper -> ([Var], HsWrapper)
isCoEvBindsVar :: EvBindsVar -> Bool
emptyEvBindMap :: EvBindMap
extendEvBinds :: EvBindMap -> EvBind -> EvBindMap
isEmptyEvBindMap :: EvBindMap -> Bool
lookupEvBind :: EvBindMap -> EvVar -> Maybe EvBind
evBindMapBinds :: EvBindMap -> Bag EvBind
foldEvBindMap :: (EvBind -> a -> a) -> a -> EvBindMap -> a
nonDetStrictFoldEvBindMap :: (EvBind -> a -> a) -> a -> EvBindMap -> a
filterEvBindMap :: (EvBind -> Bool) -> EvBindMap -> EvBindMap
evBindMapToVarSet :: EvBindMap -> VarSet
varSetMinusEvBindMap :: VarSet -> EvBindMap -> VarSet
evBindVar :: EvBind -> EvVar
mkWantedEvBind :: EvVar -> EvTerm -> EvBind
mkGivenEvBind :: EvVar -> EvTerm -> EvBind
-- | Any sort of evidence Id, including coercions
evId :: EvId -> EvExpr
evCoercion :: TcCoercion -> EvTerm
-- | d |> co
evCast :: EvExpr -> TcCoercion -> EvTerm
evDFunApp :: DFunId -> [Type] -> [EvExpr] -> EvTerm
evDataConApp :: DataCon -> [Type] -> [EvExpr] -> EvTerm
evSelector :: Id -> [Type] -> [EvExpr] -> EvExpr
evTypeable :: Type -> EvTypeable -> EvTerm
mkEvCast :: EvExpr -> TcCoercion -> EvTerm
mkEvScSelectors :: Class -> [TcType] -> [(TcPredType, EvExpr)]
emptyTcEvBinds :: TcEvBinds
isEmptyTcEvBinds :: TcEvBinds -> Bool
evTermCoercion_maybe :: EvTerm -> Maybe TcCoercion
evTermCoercion :: EvTerm -> TcCoercion
findNeededEvVars :: EvBindMap -> VarSet -> VarSet
evVarsOfTerm :: EvTerm -> VarSet
pprHsWrapper :: HsWrapper -> (Bool -> SDoc) -> SDoc
-- | Create a Coercion that unwraps an implicit-parameter dictionary
-- to expose the underlying value. We expect the Type to have the
-- form `IP sym ty`, and return a Coercion `co :: IP sym ty ~ ty`
unwrapIP :: Type -> CoercionR
-- | Create a Coercion that wraps a value in an implicit-parameter
-- dictionary. See unwrapIP.
wrapIP :: Type -> CoercionR
quoteWrapperTyVarTy :: QuoteWrapper -> Type
-- | Convert the QuoteWrapper into a normal HsWrapper which can be used to
-- apply its contents.
applyQuoteWrapper :: QuoteWrapper -> HsWrapper
-- | A fuzzy comparison function for class instances, intended for sorting
-- instances before displaying them to the user.
fuzzyClsInstCmp :: ClsInst -> ClsInst -> Ordering
isOverlappable :: ClsInst -> Bool
isOverlapping :: ClsInst -> Bool
isIncoherent :: ClsInst -> Bool
instanceDFunId :: ClsInst -> DFunId
updateClsInstDFun :: (DFunId -> DFunId) -> ClsInst -> ClsInst
updateClsInstDFuns :: (DFunId -> DFunId) -> InstEnv -> InstEnv
pprInstance :: ClsInst -> SDoc
pprInstanceHdr :: ClsInst -> SDoc
pprInstances :: [ClsInst] -> SDoc
instanceHead :: ClsInst -> ([TyVar], Class, [Type])
-- | Collects the names of concrete types and type constructors that make
-- up the head of a class instance. For instance, given `class Foo a b`:
--
-- `instance Foo (Either (Maybe Int) a) Bool` would yield [Either, Maybe,
-- Int, Bool]
--
-- Used in the implementation of ":info" in GHCi.
--
-- The tcSplitSigmaTy is because of instance Foo a => Baz T
-- where ... The decl is an orphan if Baz and T are both not locally
-- defined, even if Foo *is* locally defined
orphNamesOfClsInst :: ClsInst -> NameSet
instanceSig :: ClsInst -> ([TyVar], [Type], Class, [Type])
mkLocalInstance :: DFunId -> OverlapFlag -> [TyVar] -> Class -> [Type] -> ClsInst
mkImportedInstance :: Name -> [RoughMatchTc] -> Name -> DFunId -> OverlapFlag -> IsOrphan -> ClsInst
emptyInstEnv :: InstEnv
mkInstEnv :: [ClsInst] -> InstEnv
instEnvElts :: InstEnv -> [ClsInst]
instEnvClasses :: InstEnv -> UniqDSet Class
-- | Test if an instance is visible, by checking that its origin module is
-- in VisibleOrphanModules. See Note [Instance lookup and orphan
-- instances]
instIsVisible :: VisibleOrphanModules -> ClsInst -> Bool
classInstances :: InstEnvs -> Class -> [ClsInst]
classNameInstances :: InstEnvs -> Name -> [ClsInst]
-- | Checks for an exact match of ClsInst in the instance environment. We
-- use this when we do signature checking in GHC.Tc.Module
memberInstEnv :: InstEnv -> ClsInst -> Bool
-- | Makes no particular effort to detect conflicts.
unionInstEnv :: InstEnv -> InstEnv -> InstEnv
extendInstEnvList :: InstEnv -> [ClsInst] -> InstEnv
extendInstEnv :: InstEnv -> ClsInst -> InstEnv
filterInstEnv :: (ClsInst -> Bool) -> InstEnv -> InstEnv
anyInstEnv :: (ClsInst -> Bool) -> InstEnv -> Bool
mapInstEnv :: (ClsInst -> ClsInst) -> InstEnv -> InstEnv
deleteFromInstEnv :: InstEnv -> ClsInst -> InstEnv
deleteDFunFromInstEnv :: InstEnv -> DFunId -> InstEnv
-- | True when when the instance heads are the same e.g. both are Eq
-- [(a,b)] Used for overriding in GHCi Obviously should be insensitive to
-- alpha-renaming
identicalClsInstHead :: ClsInst -> ClsInst -> Bool
-- | Look up an instance in the given instance environment. The given class
-- application must match exactly one instance and the match may not
-- contain any flexi type variables. If the lookup is unsuccessful, yield
-- 'Left errorMessage'.
lookupUniqueInstEnv :: InstEnvs -> Class -> [Type] -> Either SDoc (ClsInst, [Type])
getPotentialUnifiers :: PotentialUnifiers -> [ClsInst]
nullUnifiers :: PotentialUnifiers -> Bool
-- | See Note [Rules for instance lookup] ^ See Note [Safe Haskell
-- Overlapping Instances] in GHC.Tc.Solver ^ See Note [Safe
-- Haskell Overlapping Instances Implementation] in GHC.Tc.Solver
lookupInstEnv :: Bool -> InstEnvs -> Class -> [Type] -> ClsInstLookupResult
instanceBindFun :: BindFun
failM :: IOEnv env a
failWithM :: String -> IOEnv env a
runIOEnv :: env -> IOEnv env a -> IO a
fixM :: (a -> IOEnv env a) -> IOEnv env a
tryM :: IOEnv env r -> IOEnv env (Either IOEnvFailure r)
tryAllM :: IOEnv env r -> IOEnv env (Either SomeException r)
tryMostM :: IOEnv env r -> IOEnv env (Either SomeException r)
unsafeInterleaveM :: IOEnv env a -> IOEnv env a
uninterruptibleMaskM_ :: IOEnv env a -> IOEnv env a
newMutVar :: a -> IOEnv env (IORef a)
writeMutVar :: IORef a -> a -> IOEnv env ()
readMutVar :: IORef a -> IOEnv env a
updMutVar :: IORef a -> (a -> a) -> IOEnv env ()
updMutVarM :: IORef a -> (a -> IOEnv env a) -> IOEnv env ()
-- | 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
-- | Strict variant of atomicUpdMutVar.
atomicUpdMutVar' :: IORef a -> (a -> (a, b)) -> IOEnv env b
-- | Perform a computation with an altered environment
updEnv :: (env -> env') -> IOEnv env' a -> IOEnv env a
pprLHsBinds :: forall (idL :: Pass) (idR :: Pass). (OutputableBndrId idL, OutputableBndrId idR) => LHsBindsLR (GhcPass idL) (GhcPass idR) -> SDoc
pprLHsBindsForUser :: forall (idL :: Pass) (idR :: Pass) (id2 :: Pass). (OutputableBndrId idL, OutputableBndrId idR, OutputableBndrId id2) => LHsBindsLR (GhcPass idL) (GhcPass idR) -> [LSig (GhcPass id2)] -> [SDoc]
pprDeclList :: [SDoc] -> SDoc
emptyLocalBinds :: forall (a :: Pass) (b :: Pass). HsLocalBindsLR (GhcPass a) (GhcPass b)
eqEmptyLocalBinds :: HsLocalBindsLR a b -> Bool
isEmptyValBinds :: forall (a :: Pass) (b :: Pass). HsValBindsLR (GhcPass a) (GhcPass b) -> Bool
emptyValBindsIn :: forall (a :: Pass) (b :: Pass). HsValBindsLR (GhcPass a) (GhcPass b)
emptyValBindsOut :: forall (a :: Pass) (b :: Pass). HsValBindsLR (GhcPass a) (GhcPass b)
emptyLHsBinds :: forall (idL :: Pass) idR. LHsBindsLR (GhcPass idL) idR
isEmptyLHsBinds :: forall (idL :: Pass) idR. LHsBindsLR (GhcPass idL) idR -> Bool
plusHsValBinds :: forall (a :: Pass). HsValBinds (GhcPass a) -> HsValBinds (GhcPass a) -> HsValBinds (GhcPass a)
ppr_monobind :: forall (idL :: Pass) (idR :: Pass). (OutputableBndrId idL, OutputableBndrId idR) => HsBindLR (GhcPass idL) (GhcPass idR) -> SDoc
pprTicks :: SDoc -> SDoc -> SDoc
isEmptyIPBindsPR :: forall (p :: Pass). HsIPBinds (GhcPass p) -> Bool
isEmptyIPBindsTc :: HsIPBinds GhcTc -> Bool
noSpecPrags :: TcSpecPrags
hasSpecPrags :: TcSpecPrags -> Bool
isDefaultMethod :: TcSpecPrags -> Bool
ppr_sig :: forall (p :: Pass). OutputableBndrId p => Sig (GhcPass p) -> SDoc
hsSigDoc :: forall (p :: Pass). IsPass p => Sig (GhcPass p) -> SDoc
-- | Extracts the name for a SPECIALIZE instance pragma. In
-- hsSigDoc, the src field of SpecInstSig signature
-- contains the SourceText for a SPECIALIZE instance pragma of the form:
-- "SourceText {-# SPECIALIZE"
--
-- Extraction ensures that all variants of the pragma name (with a
-- Z or an S) are output exactly as used in the pragma.
extractSpecPragName :: SourceText -> String
pragBrackets :: SDoc -> SDoc
-- | Using SourceText in case the pragma was spelled differently or used
-- mixed case
pragSrcBrackets :: SourceText -> String -> SDoc -> SDoc
pprVarSig :: OutputableBndr id => [id] -> SDoc -> SDoc
pprSpec :: OutputableBndr id => id -> SDoc -> InlinePragma -> SDoc
pprTcSpecPrags :: TcSpecPrags -> SDoc
pprMinimalSig :: OutputableBndr name => LBooleanFormula (GenLocated l name) -> SDoc
-- | 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)
noSyntaxExpr :: forall (p :: Pass). IsPass p => SyntaxExpr (GhcPass p)
-- | Make a 'SyntaxExpr GhcRn' from an expression Used only in
-- getMonadFailOp. See Note [Monad fail : Rebindable syntax, overloaded
-- strings] in GHC.Rename.Expr
mkSyntaxExpr :: HsExpr GhcRn -> SyntaxExprRn
-- | Make a SyntaxExpr from a Name (the "rn" is because this
-- is used in the renamer).
mkRnSyntaxExpr :: Name -> SyntaxExprRn
tupArgPresent :: forall (p :: Pass). HsTupArg (GhcPass p) -> Bool
isQuietHsExpr :: HsExpr id -> Bool
pprBinds :: forall (idL :: Pass) (idR :: Pass). (OutputableBndrId idL, OutputableBndrId idR) => HsLocalBindsLR (GhcPass idL) (GhcPass idR) -> SDoc
ppr_lexpr :: forall (p :: Pass). OutputableBndrId p => LHsExpr (GhcPass p) -> SDoc
ppr_expr :: forall (p :: Pass). OutputableBndrId p => HsExpr (GhcPass p) -> SDoc
ppr_infix_expr :: forall (p :: Pass). OutputableBndrId p => HsExpr (GhcPass p) -> Maybe SDoc
ppr_infix_expr_rn :: HsExpansion (HsExpr GhcRn) (HsExpr GhcRn) -> Maybe SDoc
ppr_infix_expr_tc :: XXExprGhcTc -> Maybe SDoc
ppr_apps :: forall (p :: Pass). OutputableBndrId p => HsExpr (GhcPass p) -> [Either (LHsExpr (GhcPass p)) (LHsWcType (NoGhcTc (GhcPass p)))] -> SDoc
pprDebugParendExpr :: forall (p :: Pass). OutputableBndrId p => PprPrec -> LHsExpr (GhcPass p) -> SDoc
pprParendLExpr :: forall (p :: Pass). OutputableBndrId p => PprPrec -> LHsExpr (GhcPass p) -> SDoc
-- | hsExprNeedsParens p e returns True if the
-- expression e needs parentheses under precedence p.
hsExprNeedsParens :: forall (p :: Pass). IsPass p => PprPrec -> HsExpr (GhcPass p) -> Bool
-- | Parenthesize an expression without token information
gHsPar :: forall (id :: Pass). LHsExpr (GhcPass id) -> HsExpr (GhcPass id)
-- | 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). IsPass p => PprPrec -> LHsExpr (GhcPass p) -> LHsExpr (GhcPass p)
stripParensLHsExpr :: forall (p :: Pass). LHsExpr (GhcPass p) -> LHsExpr (GhcPass p)
stripParensHsExpr :: forall (p :: Pass). HsExpr (GhcPass p) -> HsExpr (GhcPass p)
isAtomicHsExpr :: forall (p :: Pass). IsPass p => HsExpr (GhcPass p) -> Bool
pprLCmd :: forall (p :: Pass). OutputableBndrId p => LHsCmd (GhcPass p) -> SDoc
pprCmd :: forall (p :: Pass). OutputableBndrId p => HsCmd (GhcPass p) -> SDoc
isQuietHsCmd :: HsCmd id -> Bool
ppr_lcmd :: forall (p :: Pass). OutputableBndrId p => LHsCmd (GhcPass p) -> SDoc
ppr_cmd :: forall (p :: Pass). OutputableBndrId p => HsCmd (GhcPass p) -> SDoc
pprCmdArg :: forall (p :: Pass). OutputableBndrId p => HsCmdTop (GhcPass p) -> SDoc
isEmptyMatchGroup :: forall (p :: Pass) body. MatchGroup (GhcPass p) body -> Bool
-- | Is there only one RHS in this list of matches?
isSingletonMatchGroup :: forall (p :: Pass) body. [LMatch (GhcPass p) body] -> Bool
matchGroupArity :: forall (id :: Pass) body. MatchGroup (GhcPass id) body -> Arity
hsLMatchPats :: forall (id :: Pass) body. LMatch (GhcPass id) body -> [LPat (GhcPass id)]
pprMatches :: forall (idR :: Pass) body. (OutputableBndrId idR, Outputable body) => MatchGroup (GhcPass idR) body -> SDoc
pprMatch :: forall (idR :: Pass) body. (OutputableBndrId idR, Outputable body) => Match (GhcPass idR) body -> SDoc
pprGRHSs :: forall (idR :: Pass) body passL. (OutputableBndrId idR, Outputable body) => HsMatchContext passL -> GRHSs (GhcPass idR) body -> SDoc
pprGRHS :: forall (idR :: Pass) body passL. (OutputableBndrId idR, Outputable body) => HsMatchContext passL -> GRHS (GhcPass idR) body -> SDoc
pp_rhs :: Outputable body => HsMatchContext passL -> body -> SDoc
pprStmt :: forall (idL :: Pass) (idR :: Pass) body. (OutputableBndrId idL, OutputableBndrId idR, Anno (StmtLR (GhcPass idL) (GhcPass idR) body) ~ SrcSpanAnnA, Outputable body) => StmtLR (GhcPass idL) (GhcPass idR) body -> SDoc
pprBindStmt :: (Outputable pat, Outputable expr) => pat -> expr -> SDoc
pprArg :: forall (idL :: Pass). OutputableBndrId idL => ApplicativeArg (GhcPass idL) -> SDoc
pprTransformStmt :: forall (p :: Pass). OutputableBndrId p => [IdP (GhcPass p)] -> LHsExpr (GhcPass p) -> Maybe (LHsExpr (GhcPass p)) -> SDoc
pprTransStmt :: Outputable body => Maybe body -> body -> TransForm -> SDoc
pprBy :: Outputable body => Maybe body -> SDoc
pprDo :: forall (p :: Pass) body. (OutputableBndrId p, Outputable body, Anno (StmtLR (GhcPass p) (GhcPass p) body) ~ SrcSpanAnnA) => HsDoFlavour -> [LStmt (GhcPass p) body] -> SDoc
pprArrowExpr :: forall (p :: Pass) body. (OutputableBndrId p, Outputable body, Anno (StmtLR (GhcPass p) (GhcPass p) body) ~ SrcSpanAnnA) => [LStmt (GhcPass p) body] -> SDoc
ppr_module_name_prefix :: Maybe ModuleName -> SDoc
ppr_do_stmts :: forall (idL :: Pass) (idR :: Pass) body. (OutputableBndrId idL, OutputableBndrId idR, Anno (StmtLR (GhcPass idL) (GhcPass idR) body) ~ SrcSpanAnnA, Outputable body) => [LStmtLR (GhcPass idL) (GhcPass idR) body] -> SDoc
pprComp :: forall (p :: Pass) body. (OutputableBndrId p, Outputable body, Anno (StmtLR (GhcPass p) (GhcPass p) body) ~ SrcSpanAnnA) => [LStmt (GhcPass p) body] -> SDoc
pprQuals :: forall (p :: Pass) body. (OutputableBndrId p, Outputable body, Anno (StmtLR (GhcPass p) (GhcPass p) body) ~ SrcSpanAnnA) => [LStmt (GhcPass p) body] -> SDoc
pprPendingSplice :: forall (p :: Pass). OutputableBndrId p => SplicePointName -> LHsExpr (GhcPass p) -> SDoc
ppr_quasi :: OutputableBndr p => p -> FastString -> SDoc
ppr_splice :: forall (p :: Pass). OutputableBndrId p => SDoc -> Maybe SplicePointName -> LHsExpr (GhcPass p) -> SDoc
thBrackets :: SDoc -> SDoc -> SDoc
thTyBrackets :: SDoc -> SDoc
ppr_with_pending_tc_splices :: SDoc -> [PendingTcSplice] -> SDoc
pp_dotdot :: SDoc
lamCaseKeyword :: LamCaseVariant -> SDoc
pprExternalSrcLoc :: (StringLiteral, (Int, Int), (Int, Int)) -> SDoc
pprHsArrType :: HsArrAppType -> SDoc
matchContextErrString :: forall (p :: Pass). OutputableBndrId p => HsMatchContext (GhcPass p) -> SDoc
matchArrowContextErrString :: HsArrowMatchContext -> SDoc
matchDoContextErrString :: HsDoFlavour -> SDoc
pprMatchInCtxt :: forall (idR :: Pass) body. (OutputableBndrId idR, Outputable body) => Match (GhcPass idR) body -> SDoc
pprStmtInCtxt :: forall (idL :: Pass) (idR :: Pass) (ctx :: Pass) body. (OutputableBndrId idL, OutputableBndrId idR, OutputableBndrId ctx, Outputable body, Anno (StmtLR (GhcPass idL) (GhcPass idR) body) ~ SrcSpanAnnA) => HsStmtContext (GhcPass ctx) -> StmtLR (GhcPass idL) (GhcPass idR) body -> SDoc
matchSeparator :: HsMatchContext p -> SDoc
pprMatchContext :: (Outputable (IdP (NoGhcTc p)), UnXRec (NoGhcTc p)) => HsMatchContext p -> SDoc
pprMatchContextNoun :: (Outputable (IdP (NoGhcTc p)), UnXRec (NoGhcTc p)) => HsMatchContext p -> SDoc
pprMatchContextNouns :: (Outputable (IdP (NoGhcTc p)), UnXRec (NoGhcTc p)) => HsMatchContext p -> SDoc
pprArrowMatchContextNoun :: HsArrowMatchContext -> SDoc
pprArrowMatchContextNouns :: HsArrowMatchContext -> SDoc
pprAStmtContext :: (Outputable (IdP (NoGhcTc p)), UnXRec (NoGhcTc p)) => HsStmtContext p -> SDoc
pprStmtContext :: (Outputable (IdP (NoGhcTc p)), UnXRec (NoGhcTc p)) => HsStmtContext p -> SDoc
pprStmtCat :: forall (p :: Pass) body. Stmt (GhcPass p) body -> SDoc
pprAHsDoFlavour :: HsDoFlavour -> SDoc
pprHsDoFlavour :: HsDoFlavour -> SDoc
prependQualified :: Maybe ModuleName -> SDoc -> SDoc
pprFieldLabelStrings :: (UnXRec p, Outputable (XRec p FieldLabelString)) => FieldLabelStrings p -> SDoc
pprPrefixFastString :: FastString -> SDoc
-- |
-- e => (e)
--
mkHsPar :: forall (id :: Pass). LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
mkSimpleMatch :: forall (p :: Pass) body. (Anno (Match (GhcPass p) (LocatedA (body (GhcPass p)))) ~ SrcSpanAnnA, Anno (GRHS (GhcPass p) (LocatedA (body (GhcPass p)))) ~ SrcAnn NoEpAnns) => HsMatchContext (GhcPass p) -> [LPat (GhcPass p)] -> LocatedA (body (GhcPass p)) -> LMatch (GhcPass p) (LocatedA (body (GhcPass p)))
unguardedGRHSs :: forall (p :: Pass) body. Anno (GRHS (GhcPass p) (LocatedA (body (GhcPass p)))) ~ SrcAnn NoEpAnns => SrcSpan -> LocatedA (body (GhcPass p)) -> EpAnn GrhsAnn -> GRHSs (GhcPass p) (LocatedA (body (GhcPass p)))
unguardedRHS :: forall (p :: Pass) body. Anno (GRHS (GhcPass p) (LocatedA (body (GhcPass p)))) ~ SrcAnn NoEpAnns => EpAnn GrhsAnn -> SrcSpan -> LocatedA (body (GhcPass p)) -> [LGRHS (GhcPass p) (LocatedA (body (GhcPass p)))]
mkMatchGroup :: forall (p :: Pass) body. AnnoBody p body => Origin -> LocatedL [LocatedA (Match (GhcPass p) (LocatedA (body (GhcPass p))))] -> MatchGroup (GhcPass p) (LocatedA (body (GhcPass p)))
mkLamCaseMatchGroup :: forall (p :: Pass) body. AnnoBody p body => Origin -> LamCaseVariant -> LocatedL [LocatedA (Match (GhcPass p) (LocatedA (body (GhcPass p))))] -> MatchGroup (GhcPass p) (LocatedA (body (GhcPass p)))
mkLocatedList :: Semigroup a => [GenLocated (SrcAnn a) e2] -> LocatedAn an [GenLocated (SrcAnn a) e2]
mkHsApp :: forall (id :: Pass). LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
mkHsAppWith :: forall (id :: Pass). (LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> HsExpr (GhcPass id) -> LHsExpr (GhcPass id)) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
mkHsApps :: forall (id :: Pass). LHsExpr (GhcPass id) -> [LHsExpr (GhcPass id)] -> LHsExpr (GhcPass id)
mkHsAppsWith :: forall (id :: Pass). (LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> HsExpr (GhcPass id) -> LHsExpr (GhcPass id)) -> LHsExpr (GhcPass id) -> [LHsExpr (GhcPass id)] -> LHsExpr (GhcPass id)
mkHsAppType :: LHsExpr GhcRn -> LHsWcType GhcRn -> LHsExpr GhcRn
mkHsAppTypes :: LHsExpr GhcRn -> [LHsWcType GhcRn] -> LHsExpr GhcRn
mkHsLam :: forall (p :: Pass). (IsPass p, XMG (GhcPass p) (LHsExpr (GhcPass p)) ~ Origin) => [LPat (GhcPass p)] -> LHsExpr (GhcPass p) -> LHsExpr (GhcPass p)
mkHsLams :: [TyVar] -> [EvVar] -> LHsExpr GhcTc -> LHsExpr GhcTc
-- | A simple case alternative with a single pattern, no binds, no guards;
-- pre-typechecking
mkHsCaseAlt :: forall (p :: Pass) body. (Anno (GRHS (GhcPass p) (LocatedA (body (GhcPass p)))) ~ SrcAnn NoEpAnns, Anno (Match (GhcPass p) (LocatedA (body (GhcPass p)))) ~ SrcSpanAnnA) => LPat (GhcPass p) -> LocatedA (body (GhcPass p)) -> LMatch (GhcPass p) (LocatedA (body (GhcPass p)))
nlHsTyApp :: Id -> [Type] -> LHsExpr GhcTc
nlHsTyApps :: Id -> [Type] -> [LHsExpr GhcTc] -> LHsExpr GhcTc
-- | Wrap in parens if hsExprNeedsParens appPrec says it
-- needs them So f x becomes (f x), but 3
-- stays as 3.
mkLHsPar :: forall (id :: Pass). IsPass id => LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
mkParPat :: forall (p :: Pass). IsPass p => LPat (GhcPass p) -> LPat (GhcPass p)
nlParPat :: forall (name :: Pass). LPat (GhcPass name) -> LPat (GhcPass name)
mkRecStmt :: forall (idL :: Pass) bodyR. Anno [GenLocated (Anno (StmtLR (GhcPass idL) GhcPs bodyR)) (StmtLR (GhcPass idL) GhcPs bodyR)] ~ SrcSpanAnnL => EpAnn AnnList -> LocatedL [LStmtLR (GhcPass idL) GhcPs bodyR] -> StmtLR (GhcPass idL) GhcPs bodyR
mkHsIntegral :: IntegralLit -> HsOverLit GhcPs
mkHsFractional :: FractionalLit -> HsOverLit GhcPs
mkHsIsString :: SourceText -> FastString -> HsOverLit GhcPs
mkHsDo :: HsDoFlavour -> LocatedL [ExprLStmt GhcPs] -> HsExpr GhcPs
mkHsDoAnns :: HsDoFlavour -> LocatedL [ExprLStmt GhcPs] -> EpAnn AnnList -> HsExpr GhcPs
mkHsComp :: HsDoFlavour -> [ExprLStmt GhcPs] -> LHsExpr GhcPs -> HsExpr GhcPs
mkHsCompAnns :: HsDoFlavour -> [ExprLStmt GhcPs] -> LHsExpr GhcPs -> EpAnn AnnList -> HsExpr GhcPs
mkHsIf :: LHsExpr GhcPs -> LHsExpr GhcPs -> LHsExpr GhcPs -> EpAnn AnnsIf -> HsExpr GhcPs
mkHsCmdIf :: LHsExpr GhcPs -> LHsCmd GhcPs -> LHsCmd GhcPs -> EpAnn AnnsIf -> HsCmd GhcPs
mkNPat :: LocatedAn NoEpAnns (HsOverLit GhcPs) -> Maybe (SyntaxExpr GhcPs) -> EpAnn [AddEpAnn] -> Pat GhcPs
mkNPlusKPat :: LocatedN RdrName -> LocatedAn NoEpAnns (HsOverLit GhcPs) -> EpAnn EpaLocation -> Pat GhcPs
emptyTransStmt :: EpAnn [AddEpAnn] -> StmtLR GhcPs GhcPs (LHsExpr GhcPs)
mkTransformStmt :: EpAnn [AddEpAnn] -> [ExprLStmt GhcPs] -> LHsExpr GhcPs -> StmtLR GhcPs GhcPs (LHsExpr GhcPs)
mkTransformByStmt :: EpAnn [AddEpAnn] -> [ExprLStmt GhcPs] -> LHsExpr GhcPs -> LHsExpr GhcPs -> StmtLR GhcPs GhcPs (LHsExpr GhcPs)
mkGroupUsingStmt :: EpAnn [AddEpAnn] -> [ExprLStmt GhcPs] -> LHsExpr GhcPs -> StmtLR GhcPs GhcPs (LHsExpr GhcPs)
mkGroupByUsingStmt :: EpAnn [AddEpAnn] -> [ExprLStmt GhcPs] -> LHsExpr GhcPs -> LHsExpr GhcPs -> StmtLR GhcPs GhcPs (LHsExpr GhcPs)
mkLastStmt :: forall (idR :: Pass) bodyR (idL :: Pass). IsPass idR => LocatedA (bodyR (GhcPass idR)) -> StmtLR (GhcPass idL) (GhcPass idR) (LocatedA (bodyR (GhcPass idR)))
mkBodyStmt :: forall bodyR (idL :: Pass). LocatedA (bodyR GhcPs) -> StmtLR (GhcPass idL) GhcPs (LocatedA (bodyR GhcPs))
mkPsBindStmt :: EpAnn [AddEpAnn] -> LPat GhcPs -> LocatedA (bodyR GhcPs) -> StmtLR GhcPs GhcPs (LocatedA (bodyR GhcPs))
mkRnBindStmt :: LPat GhcRn -> LocatedA (bodyR GhcRn) -> StmtLR GhcRn GhcRn (LocatedA (bodyR GhcRn))
mkTcBindStmt :: LPat GhcTc -> LocatedA (bodyR GhcTc) -> StmtLR GhcTc GhcTc (LocatedA (bodyR GhcTc))
unitRecStmtTc :: RecStmtTc
emptyRecStmt :: forall (idL :: Pass) bodyR. Anno [GenLocated (Anno (StmtLR (GhcPass idL) GhcPs bodyR)) (StmtLR (GhcPass idL) GhcPs bodyR)] ~ SrcSpanAnnL => StmtLR (GhcPass idL) GhcPs bodyR
emptyRecStmtName :: Anno [GenLocated (Anno (StmtLR GhcRn GhcRn bodyR)) (StmtLR GhcRn GhcRn bodyR)] ~ SrcSpanAnnL => StmtLR GhcRn GhcRn bodyR
emptyRecStmtId :: Stmt GhcTc (LocatedA (HsCmd GhcTc))
mkLetStmt :: EpAnn [AddEpAnn] -> HsLocalBinds GhcPs -> StmtLR GhcPs GhcPs (LocatedA b)
-- | A useful function for building OpApps. The operator is always
-- a variable, and we don't know the fixity yet.
mkHsOpApp :: LHsExpr GhcPs -> IdP GhcPs -> LHsExpr GhcPs -> HsExpr GhcPs
mkHsString :: forall (p :: Pass). String -> HsLit (GhcPass p)
mkHsStringFS :: forall (p :: Pass). FastString -> HsLit (GhcPass p)
mkHsStringPrimLit :: forall (p :: Pass). FastString -> HsLit (GhcPass p)
mkHsCharPrimLit :: forall (p :: Pass). Char -> HsLit (GhcPass p)
mkConLikeTc :: ConLike -> HsExpr GhcTc
nlHsVar :: forall (p :: Pass) a. IsSrcSpanAnn p a => IdP (GhcPass p) -> LHsExpr (GhcPass p)
nl_HsVar :: forall (p :: Pass) a. IsSrcSpanAnn p a => IdP (GhcPass p) -> HsExpr (GhcPass p)
-- | NB: Only for LHsExpr Id.
nlHsDataCon :: DataCon -> LHsExpr GhcTc
nlHsLit :: forall (p :: Pass). HsLit (GhcPass p) -> LHsExpr (GhcPass p)
nlHsIntLit :: forall (p :: Pass). Integer -> LHsExpr (GhcPass p)
nlVarPat :: forall (p :: Pass) a. IsSrcSpanAnn p a => IdP (GhcPass p) -> LPat (GhcPass p)
nlLitPat :: HsLit GhcPs -> LPat GhcPs
nlHsApp :: forall (id :: Pass). IsPass id => LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
nlHsSyntaxApps :: SyntaxExprTc -> [LHsExpr GhcTc] -> LHsExpr GhcTc
nlHsApps :: forall (p :: Pass) a. IsSrcSpanAnn p a => IdP (GhcPass p) -> [LHsExpr (GhcPass p)] -> LHsExpr (GhcPass p)
nlHsVarApps :: forall (p :: Pass) a. IsSrcSpanAnn p a => IdP (GhcPass p) -> [IdP (GhcPass p)] -> LHsExpr (GhcPass p)
nlConVarPat :: RdrName -> [RdrName] -> LPat GhcPs
nlConVarPatName :: Name -> [Name] -> LPat GhcRn
nlInfixConPat :: RdrName -> LPat GhcPs -> LPat GhcPs -> LPat GhcPs
nlConPat :: RdrName -> [LPat GhcPs] -> LPat GhcPs
nlConPatName :: Name -> [LPat GhcRn] -> LPat GhcRn
nlNullaryConPat :: RdrName -> LPat GhcPs
nlWildConPat :: DataCon -> LPat GhcPs
-- | Wildcard pattern - after parsing
nlWildPat :: LPat GhcPs
-- | Wildcard pattern - after renaming
nlWildPatName :: LPat GhcRn
nlHsDo :: HsDoFlavour -> [LStmt GhcPs (LHsExpr GhcPs)] -> LHsExpr GhcPs
nlHsOpApp :: LHsExpr GhcPs -> IdP GhcPs -> LHsExpr GhcPs -> LHsExpr GhcPs
nlHsLam :: LMatch GhcPs (LHsExpr GhcPs) -> LHsExpr GhcPs
nlHsPar :: forall (id :: Pass). LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
nlHsIf :: LHsExpr GhcPs -> LHsExpr GhcPs -> LHsExpr GhcPs -> LHsExpr GhcPs
nlHsCase :: LHsExpr GhcPs -> [LMatch GhcPs (LHsExpr GhcPs)] -> LHsExpr GhcPs
nlList :: [LHsExpr GhcPs] -> LHsExpr GhcPs
nlHsAppTy :: forall (p :: Pass). LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)
nlHsTyVar :: forall (p :: Pass) a. IsSrcSpanAnn p a => PromotionFlag -> IdP (GhcPass p) -> LHsType (GhcPass p)
nlHsFunTy :: forall (p :: Pass). LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)
nlHsParTy :: forall (p :: Pass). LHsType (GhcPass p) -> LHsType (GhcPass p)
nlHsTyConApp :: forall (p :: Pass) a. IsSrcSpanAnn p a => PromotionFlag -> LexicalFixity -> IdP (GhcPass p) -> [LHsTypeArg (GhcPass p)] -> LHsType (GhcPass p)
nlHsAppKindTy :: forall (p :: Pass). LHsType (GhcPass p) -> LHsKind (GhcPass p) -> LHsType (GhcPass p)
mkLHsTupleExpr :: forall (p :: Pass). [LHsExpr (GhcPass p)] -> XExplicitTuple (GhcPass p) -> LHsExpr (GhcPass p)
mkLHsVarTuple :: forall (p :: Pass) a. IsSrcSpanAnn p a => [IdP (GhcPass p)] -> XExplicitTuple (GhcPass p) -> LHsExpr (GhcPass p)
nlTuplePat :: [LPat GhcPs] -> Boxity -> LPat GhcPs
missingTupArg :: EpAnn EpaLocation -> HsTupArg GhcPs
-- | The Big equivalents for the source tuple expressions
mkBigLHsVarTup :: forall (p :: Pass) a. IsSrcSpanAnn p a => [IdP (GhcPass p)] -> XExplicitTuple (GhcPass p) -> LHsExpr (GhcPass p)
mkBigLHsTup :: forall (id :: Pass). [LHsExpr (GhcPass id)] -> XExplicitTuple (GhcPass id) -> LHsExpr (GhcPass id)
-- | The Big equivalents for the source tuple patterns
mkBigLHsVarPatTup :: [IdP GhcRn] -> LPat GhcRn
mkBigLHsPatTup :: [LPat GhcRn] -> LPat GhcRn
-- | Convert an LHsType to an LHsSigType.
hsTypeToHsSigType :: LHsType GhcPs -> LHsSigType GhcPs
-- | Convert an LHsType to an LHsSigWcType.
hsTypeToHsSigWcType :: LHsType GhcPs -> LHsSigWcType GhcPs
mkHsSigEnv :: (LSig GhcRn -> Maybe ([LocatedN Name], a)) -> [LSig GhcRn] -> NameEnv a
-- | Convert TypeSig to ClassOpSig. The former is what is
-- parsed, but the latter is what we need in class/instance declarations
mkClassOpSigs :: [LSig GhcPs] -> [LSig GhcPs]
mkLHsWrap :: HsWrapper -> LHsExpr GhcTc -> LHsExpr GhcTc
mkHsWrap :: HsWrapper -> HsExpr GhcTc -> HsExpr GhcTc
mkHsWrapCo :: TcCoercionN -> HsExpr GhcTc -> HsExpr GhcTc
mkHsWrapCoR :: TcCoercionR -> HsExpr GhcTc -> HsExpr GhcTc
mkLHsWrapCo :: TcCoercionN -> LHsExpr GhcTc -> LHsExpr GhcTc
mkHsCmdWrap :: HsWrapper -> HsCmd GhcTc -> HsCmd GhcTc
mkLHsCmdWrap :: HsWrapper -> LHsCmd GhcTc -> LHsCmd GhcTc
mkHsWrapPat :: HsWrapper -> Pat GhcTc -> Type -> Pat GhcTc
mkHsWrapPatCo :: TcCoercionN -> Pat GhcTc -> Type -> Pat GhcTc
mkHsDictLet :: TcEvBinds -> LHsExpr GhcTc -> LHsExpr GhcTc
-- | Not infix, with place holders for coercion and free vars
mkFunBind :: Origin -> LocatedN RdrName -> [LMatch GhcPs (LHsExpr GhcPs)] -> HsBind GhcPs
-- | In Name-land, with empty bind_fvs
mkTopFunBind :: Origin -> LocatedN Name -> [LMatch GhcRn (LHsExpr GhcRn)] -> HsBind GhcRn
mkHsVarBind :: SrcSpan -> RdrName -> LHsExpr GhcPs -> LHsBind GhcPs
mkVarBind :: forall (p :: Pass). IdP (GhcPass p) -> LHsExpr (GhcPass p) -> LHsBind (GhcPass p)
mkPatSynBind :: LocatedN RdrName -> HsPatSynDetails GhcPs -> LPat GhcPs -> HsPatSynDir GhcPs -> EpAnn [AddEpAnn] -> HsBind GhcPs
-- | If any of the matches in the FunBind are infix, the
-- FunBind is considered infix.
isInfixFunBind :: forall id1 id2. UnXRec id2 => HsBindLR id1 id2 -> Bool
-- | Return the SrcSpan encompassing the contents of any enclosed
-- binds
spanHsLocaLBinds :: forall (p :: Pass). HsLocalBinds (GhcPass p) -> SrcSpan
-- | Convenience function using mkFunBind. This is for generated
-- bindings only, do not use for user-written code.
mkSimpleGeneratedFunBind :: SrcSpan -> RdrName -> [LPat GhcPs] -> LHsExpr GhcPs -> LHsBind GhcPs
-- | Make a prefix, non-strict function HsMatchContext
mkPrefixFunRhs :: LIdP (NoGhcTc p) -> HsMatchContext p
mkMatch :: forall (p :: Pass). IsPass p => HsMatchContext (GhcPass p) -> [LPat (GhcPass p)] -> LHsExpr (GhcPass p) -> HsLocalBinds (GhcPass p) -> LMatch (GhcPass p) (LHsExpr (GhcPass p))
-- | Should we treat this as an unlifted bind? This will be true for any
-- bind that binds an unlifted variable, but we must be careful around
-- AbsBinds. See Note [Unlifted id check in isUnliftedHsBind]. For usage
-- information, see Note [Strict binds checks] is GHC.HsToCore.Binds.
isUnliftedHsBind :: HsBind GhcTc -> Bool
-- | Is a binding a strict variable or pattern bind (e.g. !x =
-- ...)?
isBangedHsBind :: HsBind GhcTc -> Bool
collectLocalBinders :: forall (idL :: Pass) (idR :: Pass). CollectPass (GhcPass idL) => CollectFlag (GhcPass idL) -> HsLocalBindsLR (GhcPass idL) (GhcPass idR) -> [IdP (GhcPass idL)]
-- | Collect Id binders only, or Ids + pattern synonyms,
-- respectively
collectHsIdBinders :: forall (idL :: Pass) (idR :: Pass). CollectPass (GhcPass idL) => CollectFlag (GhcPass idL) -> HsValBindsLR (GhcPass idL) (GhcPass idR) -> [IdP (GhcPass idL)]
collectHsValBinders :: forall (idL :: Pass) idR. CollectPass (GhcPass idL) => CollectFlag (GhcPass idL) -> HsValBindsLR (GhcPass idL) idR -> [IdP (GhcPass idL)]
-- | Collect both Ids and pattern-synonym binders
collectHsBindBinders :: CollectPass p => CollectFlag p -> HsBindLR p idR -> [IdP p]
collectHsBindsBinders :: CollectPass p => CollectFlag p -> LHsBindsLR p idR -> [IdP p]
-- | Same as collectHsBindsBinders, but works over a list of
-- bindings
collectHsBindListBinders :: CollectPass p => CollectFlag p -> [LHsBindLR p idR] -> [IdP p]
-- | Used exclusively for the bindings of an instance decl which are all
-- FunBinds
collectMethodBinders :: UnXRec idL => LHsBindsLR idL idR -> [LIdP idL]
collectLStmtsBinders :: forall (idL :: Pass) (idR :: Pass) body. CollectPass (GhcPass idL) => CollectFlag (GhcPass idL) -> [LStmtLR (GhcPass idL) (GhcPass idR) body] -> [IdP (GhcPass idL)]
collectStmtsBinders :: forall (idL :: Pass) (idR :: Pass) body. CollectPass (GhcPass idL) => CollectFlag (GhcPass idL) -> [StmtLR (GhcPass idL) (GhcPass idR) body] -> [IdP (GhcPass idL)]
collectLStmtBinders :: forall (idL :: Pass) (idR :: Pass) body. CollectPass (GhcPass idL) => CollectFlag (GhcPass idL) -> LStmtLR (GhcPass idL) (GhcPass idR) body -> [IdP (GhcPass idL)]
collectStmtBinders :: forall (idL :: Pass) (idR :: Pass) body. CollectPass (GhcPass idL) => CollectFlag (GhcPass idL) -> StmtLR (GhcPass idL) (GhcPass idR) body -> [IdP (GhcPass idL)]
collectPatBinders :: CollectPass p => CollectFlag p -> LPat p -> [IdP p]
collectPatsBinders :: CollectPass p => CollectFlag p -> [LPat p] -> [IdP p]
hsGroupBinders :: HsGroup GhcRn -> [Name]
hsTyClForeignBinders :: [TyClGroup GhcRn] -> [LForeignDecl GhcRn] -> [Name]
-- | Returns all the binding names of the decl. The first one is
-- guaranteed to be the name of the decl. The first component represents
-- all binding names except record fields; the second represents field
-- occurrences. For record fields mentioned in multiple constructors, the
-- SrcLoc will be from the first occurrence.
--
-- Each returned (Located name) has a SrcSpan for the whole
-- declaration. See Note [SrcSpan for binders]
hsLTyClDeclBinders :: forall (p :: Pass). IsPass p => LocatedA (TyClDecl (GhcPass p)) -> ([LocatedA (IdP (GhcPass p))], [LFieldOcc (GhcPass p)])
-- | See Note [SrcSpan for binders]
hsForeignDeclsBinders :: forall (p :: Pass) a. (UnXRec (GhcPass p), IsSrcSpanAnn p a) => [LForeignDecl (GhcPass p)] -> [LIdP (GhcPass p)]
-- | Collects record pattern-synonym selectors only; the pattern synonym
-- names are collected by collectHsValBinders.
hsPatSynSelectors :: forall (p :: Pass). IsPass p => HsValBinds (GhcPass p) -> [FieldOcc (GhcPass p)]
getPatSynBinds :: UnXRec id => [(RecFlag, LHsBinds id)] -> [PatSynBind id id]
-- | the SrcLoc returned are for the whole declarations, not just
-- the names
hsDataFamInstBinders :: forall (p :: Pass). IsPass p => DataFamInstDecl (GhcPass p) -> ([LocatedA (IdP (GhcPass p))], [LFieldOcc (GhcPass p)])
lStmtsImplicits :: forall (idR :: Pass) (body :: Type -> Type). [LStmtLR GhcRn (GhcPass idR) (LocatedA (body (GhcPass idR)))] -> [(SrcSpan, [Name])]
hsValBindsImplicits :: forall (idR :: Pass). HsValBindsLR GhcRn (GhcPass idR) -> [(SrcSpan, [Name])]
lPatImplicits :: LPat GhcRn -> [(SrcSpan, [Name])]
reportRedundantConstraints :: ReportRedundantConstraints -> Bool
redundantConstraintsSpan :: UserTypeCtxt -> SrcSpan
pprUserTypeCtxt :: UserTypeCtxt -> SDoc
isSigMaybe :: UserTypeCtxt -> Maybe Name
unkSkolAnon :: HasCallStack => SkolemInfoAnon
-- | Wrap up the origin of a skolem type variable with a new Unique,
-- so that we can common up skolem type variables whose SkolemInfo
-- shares a certain Unique.
mkSkolemInfo :: MonadIO m => SkolemInfoAnon -> m SkolemInfo
getSkolemInfo :: SkolemInfo -> SkolemInfoAnon
mkClsInstSkol :: Class -> [Type] -> SkolemInfoAnon
pprSkolInfo :: SkolemInfoAnon -> SDoc
pprSigSkolInfo :: UserTypeCtxt -> TcType -> SDoc
isVisibleOrigin :: CtOrigin -> Bool
toInvisibleOrigin :: CtOrigin -> CtOrigin
isGivenOrigin :: CtOrigin -> Bool
isWantedWantedFunDepOrigin :: CtOrigin -> Bool
-- | Did a constraint arise from expanding a Wanted constraint to look at
-- superclasses?
isWantedSuperclassOrigin :: CtOrigin -> Bool
-- | Extract a suitable CtOrigin from a HsExpr
lexprCtOrigin :: LHsExpr GhcRn -> CtOrigin
exprCtOrigin :: HsExpr GhcRn -> CtOrigin
-- | Extract a suitable CtOrigin from a MatchGroup
matchesCtOrigin :: MatchGroup GhcRn (LHsExpr GhcRn) -> CtOrigin
-- | Extract a suitable CtOrigin from guarded RHSs
grhssCtOrigin :: GRHSs GhcRn (LHsExpr GhcRn) -> CtOrigin
pprCtOrigin :: CtOrigin -> SDoc
isPushCallStackOrigin :: CtOrigin -> Bool
callStackOriginFS :: CtOrigin -> FastString
-- | Print the context for a FixedRuntimeRep
-- representation-polymorphism check.
--
-- Note that this function does not include the specific
-- RuntimeRep which is not fixed. That information is stored in
-- FixedRuntimeRepOrigin and is reported separately.
pprFixedRuntimeRepContext :: FixedRuntimeRepContext -> SDoc
pprFRRArrowContext :: FRRArrowContext -> SDoc
pprExpectedFunTyOrigin :: ExpectedFunTyOrigin -> Int -> SDoc
pprExpectedFunTyHerald :: ExpectedFunTyOrigin -> SDoc
-- | Are we sure that more solving will never solve this constraint?
isInsolubleReason :: CtIrredReason -> Bool
-- | No problems in checking the validity of a type equality.
cteOK :: CheckTyEqResult
-- | Check whether a CheckTyEqResult is marked successful.
cterHasNoProblem :: CheckTyEqResult -> Bool
cteImpredicative :: CheckTyEqProblem
cteTypeFamily :: CheckTyEqProblem
cteInsolubleOccurs :: CheckTyEqProblem
cteSolubleOccurs :: CheckTyEqProblem
cteProblem :: CheckTyEqProblem -> CheckTyEqResult
-- | Check whether a CheckTyEqResult has a CheckTyEqProblem
cterHasProblem :: CheckTyEqResult -> CheckTyEqProblem -> Bool
-- | Check whether a CheckTyEqResult has one CheckTyEqProblem
-- and no other
cterHasOnlyProblem :: CheckTyEqResult -> CheckTyEqProblem -> Bool
cterRemoveProblem :: CheckTyEqResult -> CheckTyEqProblem -> CheckTyEqResult
cterHasOccursCheck :: CheckTyEqResult -> Bool
cterClearOccursCheck :: CheckTyEqResult -> CheckTyEqResult
-- | Mark a CheckTyEqResult as not having an insoluble occurs-check:
-- any occurs check under a type family or in a representation equality
-- is soluble.
cterSetOccursCheckSoluble :: CheckTyEqResult -> CheckTyEqResult
-- | Retain only information about occurs-check failures, because only that
-- matters after recurring into a kind.
cterFromKind :: CheckTyEqResult -> CheckTyEqResult
mkNonCanonical :: CtEvidence -> Ct
mkNonCanonicalCt :: Ct -> Ct
mkIrredCt :: CtIrredReason -> CtEvidence -> Ct
mkGivens :: CtLoc -> [EvId] -> [Ct]
ctEvidence :: Ct -> CtEvidence
ctLoc :: Ct -> CtLoc
ctOrigin :: Ct -> CtOrigin
ctPred :: Ct -> PredType
ctRewriters :: Ct -> RewriterSet
ctEvId :: HasDebugCallStack => Ct -> EvVar
-- | Returns the evidence Id for the argument Ct when this
-- Ct is a Wanted.
--
-- Returns Nothing otherwise.
wantedEvId_maybe :: Ct -> Maybe EvVar
-- | Makes a new equality predicate with the same role as the given
-- evidence.
mkTcEqPredLikeEv :: CtEvidence -> TcType -> TcType -> TcType
-- | Get the flavour of the given Ct
ctFlavour :: Ct -> CtFlavour
-- | Get the equality relation for the given Ct
ctEqRel :: Ct -> EqRel
-- | Is a type a canonical LHS? That is, is it a tyvar or an
-- exactly-saturated type family application? Does not look through type
-- synonyms.
canEqLHS_maybe :: Xi -> Maybe CanEqLHS
-- | Convert a CanEqLHS back into a Type
canEqLHSType :: CanEqLHS -> TcType
-- | Retrieve the kind of a CanEqLHS
canEqLHSKind :: CanEqLHS -> TcKind
-- | Are two CanEqLHSs equal?
eqCanEqLHS :: CanEqLHS -> CanEqLHS -> Bool
-- | Returns free variables of constraints as a non-deterministic set
tyCoVarsOfCt :: Ct -> TcTyCoVarSet
-- | Returns free variables of constraints as a non-deterministic set
tyCoVarsOfCtEv :: CtEvidence -> TcTyCoVarSet
-- | Returns free variables of constraints as a deterministically ordered
-- list. See Note [Deterministic FV] in GHC.Utils.FV.
tyCoVarsOfCtList :: Ct -> [TcTyCoVar]
-- | Returns free variables of constraints as a deterministically ordered
-- list. See Note [Deterministic FV] in GHC.Utils.FV.
tyCoVarsOfCtEvList :: CtEvidence -> [TcTyCoVar]
-- | Returns free variables of a bag of constraints as a non-deterministic
-- set. See Note [Deterministic FV] in GHC.Utils.FV.
tyCoVarsOfCts :: Cts -> TcTyCoVarSet
-- | Returns free variables of a bag of constraints as a deterministically
-- ordered list. See Note [Deterministic FV] in GHC.Utils.FV.
tyCoVarsOfCtsList :: Cts -> [TcTyCoVar]
-- | Returns free variables of a bag of constraints as a deterministically
-- ordered list. See Note [Deterministic FV] in GHC.Utils.FV.
tyCoVarsOfCtEvsList :: [CtEvidence] -> [TcTyCoVar]
-- | Returns free variables of WantedConstraints as a non-deterministic
-- set. See Note [Deterministic FV] in GHC.Utils.FV.
tyCoVarsOfWC :: WantedConstraints -> TyCoVarSet
-- | Returns free variables of WantedConstraints as a deterministically
-- ordered list. See Note [Deterministic FV] in GHC.Utils.FV.
tyCoVarsOfWCList :: WantedConstraints -> [TyCoVar]
isGivenLoc :: CtLoc -> Bool
isWantedCt :: Ct -> Bool
isGivenCt :: Ct -> Bool
-- | A constraint is considered to be a custom type error, if it contains
-- custom type errors anywhere in it. See Note [Custom type errors in
-- constraints]
getUserTypeErrorMsg :: PredType -> Maybe Type
isUserTypeError :: PredType -> Bool
isPendingScDict :: Ct -> Bool
pendingScDict_maybe :: Ct -> Maybe Ct
pendingScInst_maybe :: QCInst -> Maybe QCInst
-- | True if taking superclasses of givens, or of wanteds (to perhaps
-- expose more equalities or functional dependencies) might help to solve
-- this constraint. See Note [When superclasses help]
superClassesMightHelp :: WantedConstraints -> Bool
getPendingWantedScs :: Cts -> ([Ct], Cts)
singleCt :: Ct -> Cts
andCts :: Cts -> Cts -> Cts
listToCts :: [Ct] -> Cts
ctsElts :: Cts -> [Ct]
consCts :: Ct -> Cts -> Cts
snocCts :: Cts -> Ct -> Cts
extendCtsList :: Cts -> [Ct] -> Cts
andManyCts :: [Cts] -> Cts
emptyCts :: Cts
isEmptyCts :: Cts -> Bool
pprCts :: Cts -> SDoc
emptyWC :: WantedConstraints
mkSimpleWC :: [CtEvidence] -> WantedConstraints
mkImplicWC :: Bag Implication -> WantedConstraints
isEmptyWC :: WantedConstraints -> Bool
-- | Checks whether a the given wanted constraints are solved, i.e. that
-- there are no simple constraints left and all the implications are
-- solved.
isSolvedWC :: WantedConstraints -> Bool
andWC :: WantedConstraints -> WantedConstraints -> WantedConstraints
unionsWC :: [WantedConstraints] -> WantedConstraints
addSimples :: WantedConstraints -> Bag Ct -> WantedConstraints
addImplics :: WantedConstraints -> Bag Implication -> WantedConstraints
addInsols :: WantedConstraints -> Bag Ct -> WantedConstraints
addHoles :: WantedConstraints -> Bag Hole -> WantedConstraints
addNotConcreteError :: WantedConstraints -> NotConcreteError -> WantedConstraints
addDelayedErrors :: WantedConstraints -> Bag DelayedError -> WantedConstraints
dropMisleading :: WantedConstraints -> WantedConstraints
isSolvedStatus :: ImplicStatus -> Bool
isInsolubleStatus :: ImplicStatus -> Bool
insolubleImplic :: Implication -> Bool
-- | Gather all the type variables from WantedConstraints that it
-- would be unhelpful to default. For the moment, these are only
-- ConcreteTv metavariables participating in a nominal equality
-- whose other side is not concrete; it's usually better to report those
-- as errors instead of defaulting.
nonDefaultableTyVarsOfWC :: WantedConstraints -> TyCoVarSet
insolubleWC :: WantedConstraints -> Bool
insolubleWantedCt :: Ct -> Bool
insolubleEqCt :: Ct -> Bool
-- | Returns True of equality constraints that are definitely insoluble, as
-- well as TypeError constraints. Can return True for Given
-- constraints, unlike insolubleWantedCt.
--
-- This function is critical for accurate pattern-match overlap warnings.
-- See Note [Pattern match warnings with insoluble Givens] in
-- GHC.Tc.Solver
--
-- Note that this does not traverse through the constraint to find nested
-- custom type errors: it only detects TypeError msg ::
-- Constraint, and not e.g. Eq (TypeError msg).
insolubleCt :: Ct -> Bool
-- | Does this hole represent an "out of scope" error? See Note [Insoluble
-- holes]
isOutOfScopeHole :: Hole -> Bool
implicationPrototype :: Implication
getUserGivensFromImplics :: [Implication] -> [UserGiven]
checkTelescopeSkol :: SkolemInfoAnon -> Bool
checkImplicationInvariants :: (HasCallStack, Applicative m) => Implication -> m ()
pprEvVars :: [EvVar] -> SDoc
pprEvVarTheta :: [EvVar] -> SDoc
pprEvVarWithType :: EvVar -> SDoc
wrapType :: Type -> [TyVar] -> [PredType] -> Type
ctEvPred :: CtEvidence -> TcPredType
ctEvLoc :: CtEvidence -> CtLoc
ctEvOrigin :: CtEvidence -> CtOrigin
-- | Get the equality relation relevant for a CtEvidence
ctEvEqRel :: CtEvidence -> EqRel
-- | Get the role relevant for a CtEvidence
ctEvRole :: CtEvidence -> Role
ctEvTerm :: CtEvidence -> EvTerm
-- | Extract the set of rewriters from a CtEvidence See Note
-- [Wanteds rewrite Wanteds] If the provided CtEvidence is not for a
-- Wanted, just return an empty set.
ctEvRewriters :: CtEvidence -> RewriterSet
ctEvExpr :: HasDebugCallStack => CtEvidence -> EvExpr
ctEvCoercion :: HasDebugCallStack => CtEvidence -> TcCoercion
ctEvEvId :: CtEvidence -> EvVar
ctEvUnique :: CtEvidence -> Unique
tcEvDestUnique :: TcEvDest -> Unique
setCtEvLoc :: CtEvidence -> CtLoc -> CtEvidence
arisesFromGivens :: Ct -> Bool
-- | Set the type of CtEvidence.
--
-- This function ensures that the invariants on CtEvidence hold,
-- by updating the evidence and the ctev_pred in sync with each other.
-- See Note [CtEvidence invariants].
setCtEvPredType :: HasDebugCallStack => CtEvidence -> Type -> CtEvidence
isWanted :: CtEvidence -> Bool
isGiven :: CtEvidence -> Bool
emptyRewriterSet :: RewriterSet
isEmptyRewriterSet :: RewriterSet -> Bool
addRewriterSet :: RewriterSet -> CoercionHole -> RewriterSet
-- | Makes a RewriterSet from all the coercion holes that occur in
-- the given coercion.
rewriterSetFromCo :: Coercion -> RewriterSet
-- | Makes a RewriterSet from all the coercion holes that occur in
-- the given type.
rewriterSetFromType :: Type -> RewriterSet
-- | Makes a RewriterSet from all the coercion holes that occur in
-- the given types.
rewriterSetFromTypes :: [Type] -> RewriterSet
ctEvFlavour :: CtEvidence -> CtFlavour
-- | Extract the flavour, role, and boxity from a CtEvidence
ctEvFlavourRole :: CtEvidence -> CtFlavourRole
-- | Extract the flavour and role from a Ct
ctFlavourRole :: Ct -> CtFlavourRole
eqCanRewrite :: EqRel -> EqRel -> Bool
eqCanRewriteFR :: CtFlavourRole -> CtFlavourRole -> Bool
initialSubGoalDepth :: SubGoalDepth
bumpSubGoalDepth :: SubGoalDepth -> SubGoalDepth
maxSubGoalDepth :: SubGoalDepth -> SubGoalDepth -> SubGoalDepth
subGoalDepthExceeded :: DynFlags -> SubGoalDepth -> Bool
mkKindLoc :: TcType -> TcType -> CtLoc -> CtLoc
-- | Take a CtLoc and moves it to the kind level
toKindLoc :: CtLoc -> CtLoc
mkGivenLoc :: TcLevel -> SkolemInfoAnon -> TcLclEnv -> CtLoc
ctLocEnv :: CtLoc -> TcLclEnv
ctLocLevel :: CtLoc -> TcLevel
ctLocDepth :: CtLoc -> SubGoalDepth
ctLocOrigin :: CtLoc -> CtOrigin
ctLocSpan :: CtLoc -> RealSrcSpan
ctLocTypeOrKind_maybe :: CtLoc -> Maybe TypeOrKind
setCtLocSpan :: CtLoc -> RealSrcSpan -> CtLoc
bumpCtLocDepth :: CtLoc -> CtLoc
setCtLocOrigin :: CtLoc -> CtOrigin -> CtLoc
updateCtLocOrigin :: CtLoc -> (CtOrigin -> CtOrigin) -> CtLoc
setCtLocEnv :: CtLoc -> TcLclEnv -> CtLoc
pprCtLoc :: CtLoc -> SDoc
pprPECategory :: PromotionErr -> SDoc
peCategory :: PromotionErr -> String
getNamePprCtx :: TcRn NamePprCtx
getSrcSpanM :: TcRn SrcSpan
-- | Initialize plugin, when entering type-checker.
dePluginInit :: DefaultingPlugin -> TcPluginM s
-- | Default some types
dePluginRun :: DefaultingPlugin -> s -> FillDefaulting
-- | Clean up after the plugin, when exiting the type-checker.
dePluginStop :: DefaultingPlugin -> s -> TcPluginM ()
tcVisibleOrphanMods :: TcGblEnv -> ModuleSet
bootExports :: SelfBootInfo -> NameSet
pushErrCtxt :: CtOrigin -> ErrCtxt -> CtLoc -> CtLoc
pushErrCtxtSameOrigin :: ErrCtxt -> CtLoc -> CtLoc
removeBindingShadowing :: HasOccName a => [a] -> [a]
-- | Get target platform
getPlatform :: TcRnIf a b Platform
topStage :: ThStage
topAnnStage :: ThStage
topSpliceStage :: ThStage
impLevel :: ThLevel
outerLevel :: ThLevel
thLevel :: ThStage -> ThLevel
-- | Matches on either a global TyCon or a TcTyCon.
tcTyThingTyCon_maybe :: TcTyThing -> Maybe TyCon
pprTcTyThingCategory :: TcTyThing -> SDoc
tcTyThingCategory :: TcTyThing -> String
mkModDeps :: Set (UnitId, ModuleNameWithIsBoot) -> InstalledModuleEnv ModuleNameWithIsBoot
emptyImportAvails :: ImportAvails
-- | Union two ImportAvails
--
-- This function is a key part of Import handling, basically for each
-- import we create a separate ImportAvails structure and then union them
-- all together with this function.
plusImportAvails :: ImportAvails -> ImportAvails -> ImportAvails
isPartialSig :: TcIdSigInst -> Bool
-- | No signature or a partial signature
hasCompleteSig :: TcSigFun -> Name -> Bool
-- | 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
mkRoleAnnotEnv :: [LRoleAnnotDecl GhcRn] -> RoleAnnotEnv
emptyRoleAnnotEnv :: RoleAnnotEnv
lookupRoleAnnot :: RoleAnnotEnv -> Name -> Maybe (LRoleAnnotDecl GhcRn)
getRoleAnnots :: [Name] -> RoleAnnotEnv -> [LRoleAnnotDecl GhcRn]
-- | Check the TcGblEnv for consistency. Currently, only checks
-- axioms, but should check other aspects, too.
lintGblEnv :: Logger -> DynFlags -> TcGblEnv -> TcM ()
lpModuleName :: LoadedPlugin -> ModuleName
pluginRecompile' :: PluginWithArgs -> IO PluginRecompile
purePlugin :: [CommandLineOption] -> IO PluginRecompile
impurePlugin :: [CommandLineOption] -> IO PluginRecompile
flagRecompile :: [CommandLineOption] -> IO PluginRecompile
-- | Default plugin: does nothing at all, except for marking that safe
-- inference has failed unless -fplugin-trustworthy is passed.
-- For compatibility reason you should base all your plugin definitions
-- on this default value.
defaultPlugin :: Plugin
-- | A renamer plugin which mades the renamed source available in a
-- typechecker plugin.
keepRenamedSource :: [CommandLineOption] -> TcGblEnv -> HsGroup GhcRn -> TcM (TcGblEnv, HsGroup GhcRn)
pluginsWithArgs :: Plugins -> [PluginWithArgs]
-- | Perform an operation by using all of the plugins in turn.
withPlugins :: Monad m => Plugins -> PluginOperation m a -> a -> m a
mapPlugins :: Plugins -> (Plugin -> [CommandLineOption] -> a) -> [a]
-- | Perform a constant operation by using all of the plugins in turn.
withPlugins_ :: Monad m => Plugins -> ConstPluginOperation m a -> a -> m ()
defaultFrontendPlugin :: FrontendPlugin
-- | Load external plugins
loadExternalPlugins :: [ExternalPluginSpec] -> IO [ExternalPlugin]
initFinderCache :: IO FinderCache
flushFinderCaches :: FinderCache -> UnitEnv -> IO ()
lookupFileCache :: FinderCache -> FilePath -> IO Fingerprint
-- | 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 -> PkgQual -> IO FindResult
-- | Locate a plugin module requested by the user, for a compiler plugin.
-- This consults the same set of exposed packages as
-- findImportedModule, unless -hide-all-plugin-packages
-- or -plugin-package are specified.
findPluginModule :: FinderCache -> FinderOpts -> UnitState -> Maybe HomeUnit -> ModuleName -> IO FindResult
-- | Locate a specific GenModule. The purpose of this function is to
-- create a ModLocation for a given GenModule, that is to
-- find out where the files associated with this module live. It is used
-- when reading the interface for a module mentioned by another
-- interface, for example (a "system import").
findExactModule :: FinderCache -> FinderOpts -> UnitEnvGraph FinderOpts -> UnitState -> Maybe HomeUnit -> InstalledModule -> IO InstalledFindResult
findExposedPackageModule :: FinderCache -> FinderOpts -> UnitState -> ModuleName -> PkgQual -> IO FindResult
addModuleToFinder :: FinderCache -> Module -> ModLocation -> IO ()
addHomeModuleToFinder :: FinderCache -> HomeUnit -> ModuleName -> ModLocation -> IO Module
uncacheModule :: FinderCache -> HomeUnit -> ModuleName -> IO ()
findHomeModule :: FinderCache -> FinderOpts -> HomeUnit -> ModuleName -> IO FindResult
mkHomeModLocation :: FinderOpts -> ModuleName -> FilePath -> ModLocation
mkHomeModLocation2 :: FinderOpts -> ModuleName -> FilePath -> String -> ModLocation
mkHiOnlyModLocation :: FinderOpts -> Suffix -> Suffix -> FilePath -> String -> ModLocation
-- | Constructs the filename of a .o file for a given source file. Does
-- not check whether the .o file exists
mkObjPath :: FinderOpts -> FilePath -> String -> FilePath
-- | Constructs the filename of a .hi file for a given source file. Does
-- not check whether the .hi file exists
mkHiPath :: FinderOpts -> FilePath -> String -> FilePath
mkStubPaths :: FinderOpts -> ModuleName -> ModLocation -> FilePath
findObjectLinkableMaybe :: Module -> ModLocation -> IO (Maybe Linkable)
findObjectLinkable :: Module -> FilePath -> UTCTime -> IO Linkable
getImports :: TcRn ImportAvails
-- | Setup the initial typechecking environment
initTc :: HscEnv -> HscSource -> Bool -> Module -> RealSrcSpan -> TcM r -> IO (Messages TcRnMessage, Maybe r)
-- | Run a TcM action in the context of an existing GblEnv.
initTcWithGbl :: HscEnv -> TcGblEnv -> RealSrcSpan -> TcM r -> IO (Messages TcRnMessage, Maybe r)
initTcInteractive :: HscEnv -> TcM a -> IO (Messages TcRnMessage, Maybe a)
initTcRnIf :: Char -> HscEnv -> gbl -> lcl -> TcRnIf gbl lcl a -> IO a
discardResult :: TcM a -> TcM ()
getTopEnv :: TcRnIf gbl lcl HscEnv
updTopEnv :: (HscEnv -> HscEnv) -> TcRnIf gbl lcl a -> TcRnIf gbl lcl a
getGblEnv :: TcRnIf gbl lcl gbl
updGblEnv :: (gbl -> gbl) -> TcRnIf gbl lcl a -> TcRnIf gbl lcl a
setGblEnv :: gbl' -> TcRnIf gbl' lcl a -> TcRnIf gbl lcl a
getLclEnv :: TcRnIf gbl lcl lcl
updLclEnv :: (lcl -> lcl) -> TcRnIf gbl lcl a -> TcRnIf gbl lcl a
setLclEnv :: lcl' -> TcRnIf gbl lcl' a -> TcRnIf gbl lcl a
restoreLclEnv :: TcLclEnv -> TcRnIf gbl TcLclEnv a -> TcRnIf gbl TcLclEnv a
getEnvs :: TcRnIf gbl lcl (gbl, lcl)
setEnvs :: (gbl', lcl') -> TcRnIf gbl' lcl' a -> TcRnIf gbl lcl a
updEnvs :: ((gbl, lcl) -> (gbl, lcl)) -> TcRnIf gbl lcl a -> TcRnIf gbl lcl a
restoreEnvs :: (TcGblEnv, TcLclEnv) -> TcRn a -> TcRn a
xoptM :: Extension -> TcRnIf gbl lcl Bool
doptM :: DumpFlag -> TcRnIf gbl lcl Bool
goptM :: GeneralFlag -> TcRnIf gbl lcl Bool
woptM :: WarningFlag -> TcRnIf gbl lcl Bool
setXOptM :: Extension -> TcRnIf gbl lcl a -> TcRnIf gbl lcl a
unsetXOptM :: Extension -> TcRnIf gbl lcl a -> TcRnIf gbl lcl a
unsetGOptM :: GeneralFlag -> TcRnIf gbl lcl a -> TcRnIf gbl lcl a
unsetWOptM :: WarningFlag -> TcRnIf gbl lcl a -> TcRnIf gbl lcl a
-- | Do it flag is true
whenDOptM :: DumpFlag -> TcRnIf gbl lcl () -> TcRnIf gbl lcl ()
whenGOptM :: GeneralFlag -> TcRnIf gbl lcl () -> TcRnIf gbl lcl ()
whenWOptM :: WarningFlag -> TcRnIf gbl lcl () -> TcRnIf gbl lcl ()
whenXOptM :: Extension -> TcRnIf gbl lcl () -> TcRnIf gbl lcl ()
unlessXOptM :: Extension -> TcRnIf gbl lcl () -> TcRnIf gbl lcl ()
getGhcMode :: TcRnIf gbl lcl GhcMode
withoutDynamicNow :: TcRnIf gbl lcl a -> TcRnIf gbl lcl a
updTopFlags :: (DynFlags -> DynFlags) -> TcRnIf gbl lcl a -> TcRnIf gbl lcl a
getEpsVar :: TcRnIf gbl lcl (TcRef ExternalPackageState)
getEps :: TcRnIf gbl lcl ExternalPackageState
-- | 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
-- | 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 ()
getHpt :: TcRnIf gbl lcl HomePackageTable
getEpsAndHug :: TcRnIf gbl lcl (ExternalPackageState, HomeUnitGraph)
-- | A convenient wrapper for taking a MaybeErr SDoc a and
-- throwing an exception if it is an error.
withException :: MonadIO m => SDocContext -> m (MaybeErr SDoc a) -> m a
newArrowScope :: TcM a -> TcM a
escapeArrowScope :: TcM a -> TcM a
newUniqueSupply :: TcRnIf gbl lcl UniqSupply
cloneLocalName :: Name -> TcM Name
newName :: OccName -> TcM Name
newNameAt :: OccName -> SrcSpan -> TcM Name
newSysName :: OccName -> TcRnIf gbl lcl Name
newSysLocalId :: FastString -> Mult -> TcType -> TcRnIf gbl lcl TcId
newSysLocalIds :: FastString -> [Scaled TcType] -> TcRnIf gbl lcl [TcId]
newTcRef :: a -> TcRnIf gbl lcl (TcRef a)
readTcRef :: TcRef a -> TcRnIf gbl lcl a
writeTcRef :: TcRef a -> a -> TcRnIf gbl lcl ()
updTcRef :: TcRef a -> (a -> a) -> TcRnIf gbl lcl ()
traceTc :: String -> SDoc -> TcRn ()
traceRn :: String -> SDoc -> TcRn ()
traceOptTcRn :: DumpFlag -> SDoc -> TcRn ()
-- | Dump if the given DumpFlag is set.
dumpOptTcRn :: DumpFlag -> String -> DumpFormat -> SDoc -> TcRn ()
-- | Unconditionally dump some trace output
--
-- Certain tests (T3017, Roles3, T12763 etc.) expect part of the output
-- generated by `-ddump-types` to be in PprUser style. However,
-- generally we want all other debugging output to use PprDump
-- style. We PprUser style if useUserStyle is True.
dumpTcRn :: Bool -> DumpFlag -> String -> DumpFormat -> SDoc -> TcRn ()
-- | Like logInfoTcRn, but for user consumption
printForUserTcRn :: SDoc -> TcRn ()
traceIf :: SDoc -> TcRnIf m n ()
traceOptIf :: DumpFlag -> SDoc -> TcRnIf m n ()
getIsGHCi :: TcRn Bool
getGHCiMonad :: TcRn Name
getInteractivePrintName :: TcRn Name
tcIsHsBootOrSig :: TcRn Bool
tcIsHsig :: TcRn Bool
tcSelfBootInfo :: TcRn SelfBootInfo
getGlobalRdrEnv :: TcRn GlobalRdrEnv
getRdrEnvs :: TcRn (GlobalRdrEnv, LocalRdrEnv)
getFixityEnv :: TcRn FixityEnv
extendFixityEnv :: [(Name, FixItem)] -> RnM a -> RnM a
getRecFieldEnv :: TcRn RecFieldEnv
getDeclaredDefaultTys :: TcRn (Maybe [Type])
addDependentFiles :: [FilePath] -> TcRn ()
inGeneratedCode :: TcRn Bool
setSrcSpan :: SrcSpan -> TcRn a -> TcRn a
setSrcSpanA :: SrcSpanAnn' ann -> TcRn a -> TcRn a
addLocM :: (a -> TcM b) -> Located a -> TcM b
addLocMA :: (a -> TcM b) -> GenLocated (SrcSpanAnn' ann) a -> TcM b
wrapLocM :: (a -> TcM b) -> Located a -> TcM (Located b)
wrapLocAM :: (a -> TcM b) -> LocatedAn an a -> TcM (Located b)
wrapLocMA :: (a -> TcM b) -> GenLocated (SrcSpanAnn' ann) a -> TcRn (GenLocated (SrcSpanAnn' ann) b)
wrapLocFstM :: (a -> TcM (b, c)) -> Located a -> TcM (Located b, c)
wrapLocFstMA :: (a -> TcM (b, c)) -> GenLocated (SrcSpanAnn' ann) a -> TcM (GenLocated (SrcSpanAnn' ann) b, c)
wrapLocSndM :: (a -> TcM (b, c)) -> Located a -> TcM (b, Located c)
wrapLocSndMA :: (a -> TcM (b, c)) -> GenLocated (SrcSpanAnn' ann) a -> TcM (b, GenLocated (SrcSpanAnn' ann) c)
wrapLocM_ :: (a -> TcM ()) -> Located a -> TcM ()
wrapLocMA_ :: (a -> TcM ()) -> LocatedA a -> TcM ()
getErrsVar :: TcRn (TcRef (Messages TcRnMessage))
setErrsVar :: TcRef (Messages TcRnMessage) -> TcRn a -> TcRn a
failWith :: TcRnMessage -> TcRn a
failAt :: SrcSpan -> TcRnMessage -> TcRn a
addErrAt :: SrcSpan -> TcRnMessage -> TcRn ()
mkDetailedMessage :: ErrInfo -> TcRnMessage -> TcRnMessageDetailed
addErrs :: [(SrcSpan, TcRnMessage)] -> TcRn ()
checkErr :: Bool -> TcRnMessage -> TcRn ()
addMessages :: Messages TcRnMessage -> TcRn ()
discardWarnings :: TcRn a -> TcRn a
mkTcRnMessage :: SrcSpan -> TcRnMessage -> TcRn (MsgEnvelope TcRnMessage)
reportDiagnostics :: [MsgEnvelope TcRnMessage] -> TcM ()
reportDiagnostic :: MsgEnvelope TcRnMessage -> TcRn ()
checkNoErrs :: TcM r -> TcM r
whenNoErrs :: TcM () -> TcM ()
ifErrsM :: TcRn r -> TcRn r -> TcRn r
failIfErrsM :: TcRn ()
getErrCtxt :: TcM [ErrCtxt]
setErrCtxt :: [ErrCtxt] -> TcM a -> TcM a
-- | Add a fixed message to the error context. This message should not do
-- any tidying.
addErrCtxt :: SDoc -> TcM a -> TcM a
-- | Add a message to the error context. This message may do tidying.
addErrCtxtM :: (TidyEnv -> TcM (TidyEnv, SDoc)) -> 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 :: SDoc -> TcM a -> TcM a
-- | Variant of addLandmarkErrCtxt that allows for monadic
-- operations and tidying.
addLandmarkErrCtxtM :: (TidyEnv -> TcM (TidyEnv, SDoc)) -> TcM a -> TcM a
popErrCtxt :: TcM a -> TcM a
getCtLocM :: CtOrigin -> Maybe TypeOrKind -> TcM CtLoc
setCtLocM :: CtLoc -> TcM a -> TcM a
askNoErrs :: TcRn a -> TcRn (a, Bool)
tryCaptureConstraints :: TcM a -> TcM (Maybe a, WantedConstraints)
captureConstraints :: TcM a -> TcM (a, WantedConstraints)
-- | tcCollectingUsage thing_inside runs thing_inside and
-- returns the usage information which was collected as part of the
-- execution of thing_inside. Careful: tcCollectingUsage
-- thing_inside itself does not report any usage information, it's
-- up to the caller to incorporate the returned usage information into
-- the larger context appropriately.
tcCollectingUsage :: TcM a -> TcM (UsageEnv, a)
-- | tcScalingUsage mult thing_inside runs thing_inside
-- and scales all the usage information by mult.
tcScalingUsage :: Mult -> TcM a -> TcM a
tcEmitBindingUsage :: UsageEnv -> TcM ()
attemptM :: TcRn r -> TcRn (Maybe r)
recoverM :: TcRn r -> TcRn r -> TcRn r
-- | 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]
-- | Apply the function to all elements on the input list If all succeed,
-- return the list of results Otherwise fail, propagating all errors
mapAndReportM :: (a -> TcRn b) -> [a] -> TcRn [b]
-- | The accumulator is not updated if the action fails
foldAndRecoverM :: (b -> a -> TcRn b) -> b -> [a] -> TcRn b
tryTc :: TcRn a -> TcRn (Maybe a, Messages TcRnMessage)
discardErrs :: TcRn a -> TcRn a
tryTcDiscardingErrs :: TcM r -> TcM r -> TcM r
addErrTc :: TcRnMessage -> TcM ()
addErrTcM :: (TidyEnv, TcRnMessage) -> TcM ()
failWithTc :: TcRnMessage -> TcM a
failWithTcM :: (TidyEnv, TcRnMessage) -> TcM a
checkTc :: Bool -> TcRnMessage -> TcM ()
checkTcM :: Bool -> (TidyEnv, TcRnMessage) -> TcM ()
failIfTc :: Bool -> TcRnMessage -> TcM ()
failIfTcM :: Bool -> (TidyEnv, TcRnMessage) -> TcM ()
-- | Display a warning if a condition is met.
warnIf :: Bool -> TcRnMessage -> TcRn ()
-- | Display a warning if a condition is met.
diagnosticTc :: Bool -> TcRnMessage -> TcM ()
-- | Display a diagnostic if a condition is met.
diagnosticTcM :: Bool -> (TidyEnv, TcRnMessage) -> TcM ()
-- | Display a diagnostic in the current context.
addDiagnosticTc :: TcRnMessage -> TcM ()
-- | Display a diagnostic in a given context.
addDiagnosticTcM :: (TidyEnv, TcRnMessage) -> TcM ()
-- | A variation of addDiagnostic that takes a function to produce a
-- TcRnDsMessage given some additional context about the
-- diagnostic.
addDetailedDiagnostic :: (ErrInfo -> TcRnMessage) -> TcM ()
addTcRnDiagnostic :: TcRnMessage -> TcM ()
-- | Display a diagnostic for the current source location, taken from the
-- TcRn monad.
addDiagnostic :: TcRnMessage -> TcRn ()
-- | Display a diagnostic for a given source location.
addDiagnosticAt :: SrcSpan -> TcRnMessage -> TcRn ()
mkErrInfo :: TidyEnv -> [ErrCtxt] -> TcM SDoc
debugTc :: TcM () -> TcM ()
addTopEvBinds :: Bag EvBind -> TcM a -> TcM a
newTcEvBinds :: TcM EvBindsVar
-- | Creates an EvBindsVar incapable of holding any bindings. It still
-- tracks covar usages (see comments on ebv_tcvs in
-- GHC.Tc.Types.Evidence), thus must be made monadically
newNoTcEvBinds :: TcM EvBindsVar
cloneEvBindsVar :: EvBindsVar -> TcM EvBindsVar
getTcEvTyCoVars :: EvBindsVar -> TcM TyCoVarSet
getTcEvBindsMap :: EvBindsVar -> TcM EvBindMap
setTcEvBindsMap :: EvBindsVar -> EvBindMap -> TcM ()
addTcEvBind :: EvBindsVar -> EvBind -> TcM ()
chooseUniqueOccTc :: (OccSet -> OccName) -> TcM OccName
getConstraintVar :: TcM (TcRef WantedConstraints)
setConstraintVar :: TcRef WantedConstraints -> TcM a -> TcM a
emitStaticConstraints :: WantedConstraints -> TcM ()
emitConstraints :: WantedConstraints -> TcM ()
emitSimple :: Ct -> TcM ()
emitSimples :: Cts -> TcM ()
emitImplication :: Implication -> TcM ()
emitImplications :: Bag Implication -> TcM ()
emitInsoluble :: Ct -> TcM ()
emitDelayedErrors :: Bag DelayedError -> TcM ()
emitHole :: Hole -> TcM ()
emitHoles :: Bag Hole -> TcM ()
emitNotConcreteError :: NotConcreteError -> TcM ()
-- | Throw out any constraints emitted by the thing_inside
discardConstraints :: TcM a -> TcM a
-- | The name says it all. The returned TcLevel is the *inner* TcLevel.
pushLevelAndCaptureConstraints :: TcM a -> TcM (TcLevel, WantedConstraints, a)
pushTcLevelM_ :: TcM a -> TcM a
pushTcLevelM :: TcM a -> TcM (TcLevel, a)
getTcLevel :: TcM TcLevel
setTcLevel :: TcLevel -> TcM a -> TcM a
isTouchableTcM :: TcTyVar -> TcM Bool
getLclTypeEnv :: TcM TcTypeEnv
setLclTypeEnv :: TcLclEnv -> TcM a -> TcM a
traceTcConstraints :: String -> TcM ()
emitAnonTypeHole :: IsExtraConstraint -> TcTyVar -> TcM ()
emitNamedTypeHole :: (Name, TcTyVar) -> TcM ()
recordThUse :: TcM ()
recordThSpliceUse :: TcM ()
recordThNeededRuntimeDeps :: [Linkable] -> PkgsLoaded -> TcM ()
keepAlive :: Name -> TcRn ()
getStage :: TcM ThStage
getStageAndBindLevel :: Name -> TcRn (Maybe (TopLevelFlag, ThLevel, ThStage))
setStage :: ThStage -> TcM a -> TcRn a
-- | Adds the given modFinalizers to the global environment and set them to
-- use the current local environment.
addModFinalizersWithLclEnv :: ThModFinalizers -> TcM ()
-- | Mark that safe inference has failed See Note [Safe Haskell Overlapping
-- Instances Implementation] although this is used for more than just
-- that failure case.
recordUnsafeInfer :: Messages TcRnMessage -> TcM ()
-- | Figure out the final correct safe haskell mode
finalSafeMode :: DynFlags -> TcGblEnv -> IO SafeHaskellMode
-- | Switch instances to safe instances if we're in Safe mode.
fixSafeInstances :: SafeHaskellMode -> [ClsInst] -> [ClsInst]
getLocalRdrEnv :: RnM LocalRdrEnv
setLocalRdrEnv :: LocalRdrEnv -> RnM a -> RnM a
mkIfLclEnv :: Module -> SDoc -> IsBootInterface -> IfLclEnv
-- | 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
-- | initIfaceLoad can be used when there's no chance that the
-- action will call typecheckIface when inside a module loop and
-- hence tcIfaceGlobal.
initIfaceLoad :: HscEnv -> IfG a -> IO a
-- | This is used when we are doing to call typecheckModule on an
-- ModIface, if it's part of a loop with some other modules then
-- we need to use their IORef TypeEnv vars when typechecking but
-- crucially not our own.
initIfaceLoadModule :: HscEnv -> Module -> IfG a -> IO a
initIfaceCheck :: SDoc -> HscEnv -> IfG a -> IO a
initIfaceLcl :: Module -> SDoc -> IsBootInterface -> IfL a -> IfM lcl a
-- | Initialize interface typechecking, but with a NameShape to
-- apply when typechecking top-level OccNames (see
-- lookupIfaceTop)
initIfaceLclWithSubst :: Module -> SDoc -> IsBootInterface -> NameShape -> IfL a -> IfM lcl a
getIfModule :: IfL Module
failIfM :: SDoc -> IfL a
-- | Run thing_inside in an interleaved thread. It shares everything with
-- the parent thread, so this is DANGEROUS.
--
-- It throws an error if the computation fails
--
-- It's used for lazily type-checking interface signatures, which is
-- pretty benign.
--
-- See Note [Masking exceptions in forkM]
forkM :: SDoc -> IfL a -> IfL a
setImplicitEnvM :: TypeEnv -> IfL a -> IfL a
-- | Get the next cost centre index associated with a given name.
getCCIndexM :: (gbl -> TcRef CostCentreState) -> FastString -> TcRnIf gbl lcl CostCentreIndex
-- | See getCCIndexM.
getCCIndexTcM :: FastString -> TcM CostCentreIndex
newGlobalBinder :: Module -> OccName -> SrcSpan -> TcRnIf a b Name
newInteractiveBinder :: HscEnv -> OccName -> SrcSpan -> IO Name
allocateGlobalBinder :: NameCache -> Module -> OccName -> SrcSpan -> IO Name
ifaceExportNames :: [IfaceExport] -> TcRnIf gbl lcl [AvailInfo]
-- | Look up the Name for a given GenModule and
-- OccName. Consider alternatively using lookupIfaceTop if
-- you're in the IfL monad and GenModule is simply that of
-- the ModIface you are typechecking.
lookupOrig :: Module -> OccName -> TcRnIf a b Name
lookupNameCache :: NameCache -> Module -> OccName -> IO Name
externaliseName :: Module -> Name -> TcRnIf m n Name
-- | Set the GenModule of a Name.
setNameModule :: Maybe Module -> Name -> TcRnIf m n Name
tcIfaceLclId :: FastString -> IfL Id
extendIfaceIdEnv :: [Id] -> IfL a -> IfL a
tcIfaceTyVar :: FastString -> IfL TyVar
lookupIfaceTyVar :: IfaceTvBndr -> IfL (Maybe TyVar)
lookupIfaceVar :: IfaceBndr -> IfL (Maybe TyCoVar)
extendIfaceTyVarEnv :: [TyVar] -> IfL a -> IfL a
extendIfaceEnvs :: [TyCoVar] -> IfL a -> IfL a
-- | Look up a top-level name from the current Iface module
lookupIfaceTop :: OccName -> IfL Name
newIfaceName :: OccName -> IfL Name
newIfaceNames :: [OccName] -> IfL [Name]
trace_if :: Logger -> SDoc -> IO ()
trace_hi_diffs :: Logger -> SDoc -> IO ()
-- | Pretty-prints a TyThing with its defining location.
pprTyThingLoc :: TyThing -> SDoc
-- | Pretty-prints the TyThing header. For functions and data
-- constructors the function is equivalent to pprTyThing but for
-- type constructors and classes it prints only the header part of the
-- declaration.
pprTyThingHdr :: TyThing -> SDoc
-- | Pretty-prints a TyThing in context: that is, if the entity is a
-- data constructor, record selector, or class method, then the entity's
-- parent declaration is pretty-printed with irrelevant parts omitted.
pprTyThingInContext :: ShowSub -> TyThing -> SDoc
-- | Like pprTyThingInContext, but adds the defining location.
pprTyThingInContextLoc :: TyThing -> SDoc
-- | Pretty-prints a TyThing.
pprTyThing :: ShowSub -> TyThing -> SDoc
liftedRepName :: Name
mkLexicalFastString :: FastString -> LexicalFastString
fromLexicalFastString :: LexicalFastString -> FastString
collectHsBindBinders' :: HsBindLR GhcRn idR -> [Name]
collectPatBinders' :: LPat GhcRn -> [Name]
mkWildValBinder' :: Type -> Id
pprTypeForUser' :: Type -> SDoc
showSDocOneLine' :: SDoc -> String
findImportedModule' :: ModuleName -> TcPluginM Module
findPluginModule' :: ModuleName -> TcM FindResult
pattern HsLet' :: XLet GhcRn -> LetToken -> HsLocalBinds GhcRn -> InToken -> LHsExpr GhcRn -> HsExpr GhcRn
pattern OverLit' :: OverLitVal -> HsOverLit GhcRn
pattern CDictCan' :: CtEvidence -> Class -> [Xi] -> Ct
module Debug.Breakpoint.TimerManager
-- | has the effect of suspending timeouts while an action is occurring.
-- This is only used for GHC >= 9.2 because the semantics are too
-- strange without the ability to freeze the runtime.
suspendTimeouts :: IO a -> IO a
module Debug.Breakpoint
plugin :: Plugin
-- | Sets a breakpoint in pure code
breakpoint :: a -> a
-- | Sets a breakpoint in an arbitrary Applicative. Uses
-- unsafePerformIO which means that laziness and common
-- sub-expression elimination can result in the breakpoint not being hit
-- as expected. For this reason, you should prefer breakpointIO if
-- a MonadIO instance is available.
breakpointM :: Applicative m => m ()
-- | Sets a breakpoint in an IO based Monad. You should favor
-- this over breakpointM if the monad can perform IO.
breakpointIO :: MonadIO m => m ()
-- | When evaluated, displays the names of variables visible from the
-- callsite and starts a prompt where entering a variable will display
-- its value. You may want to use this instead of breakpoint if
-- there are value which should stay unevaluated or you are only
-- interested in certain values. Only the current thread is blocked while
-- the prompt is active. To resume execution, press enter with a blank
-- prompt.
queryVars :: a -> a
-- | Similar to queryVars but for use in an arbitrary
-- Applicative context. This uses unsafePerformIO which
-- means that laziness and common sub-expression elimination can result
-- in unexpected behavior. For this reason you should prefer
-- queryVarsIO if a MonadIO instance is available.
queryVarsM :: Applicative m => m ()
-- | Similar to queryVars but specialized to an IO context.
-- You should favor this over queryVarsM if a MonadIO
-- instance is available.
queryVarsIO :: MonadIO m => m ()
-- | Excludes the given variable names from appearing in the output of any
-- breakpoints occurring in the given expression.
excludeVars :: [String] -> a -> a
-- | Constructs a lazy Map from the names of all visible variables
-- at the call site to a string representation of their value. Does not
-- include any variables whose definitions contain it. Be careful not to
-- assign multiple variables to captureVars in the same scope as
-- this will result in an infinite recursion.
captureVars :: Map String String
showLev :: ShowLev rep a => a -> String
fromAscList :: Ord k => [(k, v)] -> Map k v
printAndWait :: String -> Map String String -> a -> a
printAndWaitM :: Applicative m => String -> Map String String -> m ()
printAndWaitIO :: MonadIO m => String -> Map String String -> m ()
runPrompt :: String -> Map String String -> a -> a
runPromptM :: Applicative m => String -> Map String String -> m ()
runPromptIO :: forall m. MonadIO m => String -> Map String String -> m ()
-- | Pretty prints the source code location of its call site
getSrcLoc :: String
instance GHC.Show.Show a => Debug.Breakpoint.Succeed a
instance Debug.Breakpoint.ShowLev GHC.Types.LiftedRep a => GHC.Show.Show (Debug.Breakpoint.ShowWrapper a)
instance Debug.Breakpoint.ShowLev 'GHC.Types.IntRep GHC.Prim.Int#
instance Debug.Breakpoint.ShowLev 'GHC.Types.Int8Rep GHC.Prim.Int8#
instance Debug.Breakpoint.ShowLev 'GHC.Types.Int16Rep GHC.Prim.Int16#
instance Debug.Breakpoint.ShowLev 'GHC.Types.Int32Rep GHC.Prim.Int32#
instance Debug.Breakpoint.ShowLev 'GHC.Types.Int64Rep GHC.Prim.Int64#
instance Debug.Breakpoint.ShowLev 'GHC.Types.WordRep GHC.Prim.Word#
instance Debug.Breakpoint.ShowLev 'GHC.Types.Word8Rep GHC.Prim.Word8#
instance Debug.Breakpoint.ShowLev 'GHC.Types.Word16Rep GHC.Prim.Word16#
instance Debug.Breakpoint.ShowLev 'GHC.Types.Word32Rep GHC.Prim.Word32#
instance Debug.Breakpoint.ShowLev 'GHC.Types.Word64Rep GHC.Prim.Word64#
instance Debug.Breakpoint.ShowLev 'GHC.Types.FloatRep GHC.Prim.Float#
instance Debug.Breakpoint.ShowLev 'GHC.Types.DoubleRep GHC.Prim.Double#