ghc-lib-parser-9.12.2.20250421: The GHC API, decoupled from GHC versions

Safe Haskell | Ignore
Language | GHC2021

GHC.Types.Basic

Contents

- The OneShotInfo type
- Orphan instances

Synopsis

- data LeftOrRight
  - = CLeft
  - | CRight
- pickLR :: LeftOrRight -> (a, a) -> a
- type ConTag = Int
- type ConTagZ = Int
- fIRST_TAG :: ConTag
- type Arity = Int
- type VisArity = Int
- type RepArity = Int
- type JoinArity = Int
- type FullArgCount = Int
- data JoinPointHood
  - = JoinPoint !Int
  - | NotJoinPoint
- isJoinPoint :: JoinPointHood -> Bool
- data Alignment
- mkAlignment :: Int -> Alignment
- alignmentOf :: Int -> Alignment
- alignmentBytes :: Alignment -> Int
- data PromotionFlag
  - = NotPromoted
  - | IsPromoted
- isPromoted :: PromotionFlag -> Bool
- data FunctionOrData
  - = IsFunction
  - | IsData
- data RecFlag
  - = Recursive
  - | NonRecursive
- isRec :: RecFlag -> Bool
- isNonRec :: RecFlag -> Bool
- boolToRecFlag :: Bool -> RecFlag
- data Origin
  - = FromSource
  - | Generated GenReason DoPmc
- isGenerated :: Origin -> Bool
- data DoPmc
  - = SkipPmc
  - | DoPmc
- requiresPMC :: Origin -> Bool
- data GenReason
  - = DoExpansion HsDoFlavour
  - | OtherExpansion
- isDoExpansionGenerated :: Origin -> Bool
- doExpansionFlavour :: Origin -> Maybe HsDoFlavour
- doExpansionOrigin :: HsDoFlavour -> Origin
- type RuleName = FastString
- pprRuleName :: RuleName -> SDoc
- data TopLevelFlag
  - = TopLevel
  - | NotTopLevel
- isTopLevel :: TopLevelFlag -> Bool
- isNotTopLevel :: TopLevelFlag -> Bool
- data OverlapFlag = OverlapFlag {
  - overlapMode :: OverlapMode
  - isSafeOverlap :: Bool
  }
- data OverlapMode
  - = NoOverlap SourceText
  - | Overlappable SourceText
  - | Overlapping SourceText
  - | Overlaps SourceText
  - | Incoherent SourceText
  - | NonCanonical SourceText
- setOverlapModeMaybe :: OverlapFlag -> Maybe OverlapMode -> OverlapFlag
- hasOverlappingFlag :: OverlapMode -> Bool
- hasOverlappableFlag :: OverlapMode -> Bool
- hasIncoherentFlag :: OverlapMode -> Bool
- hasNonCanonicalFlag :: OverlapMode -> Bool
- data Boxity
  - = Boxed
  - | Unboxed
- isBoxed :: Boxity -> Bool
- data CbvMark
  - = MarkedCbv
  - | NotMarkedCbv
- isMarkedCbv :: CbvMark -> Bool
- newtype PprPrec = PprPrec Int
- topPrec :: PprPrec
- sigPrec :: PprPrec
- opPrec :: PprPrec
- funPrec :: PprPrec
- starPrec :: PprPrec
- appPrec :: PprPrec
- maxPrec :: PprPrec
- maybeParen :: PprPrec -> PprPrec -> SDoc -> SDoc
- data TupleSort
  - = BoxedTuple
  - | UnboxedTuple
  - | ConstraintTuple
- tupleSortBoxity :: TupleSort -> Boxity
- boxityTupleSort :: Boxity -> TupleSort
- tupleParens :: TupleSort -> SDoc -> SDoc
- data UnboxedTupleOrSum
  - = UnboxedTupleType
  - | UnboxedSumType
- unboxedTupleOrSumExtension :: UnboxedTupleOrSum -> Extension
- sumParens :: SDoc -> SDoc
- pprAlternative :: (a -> SDoc) -> a -> ConTag -> Arity -> SDoc
- data OneShotInfo
  - = NoOneShotInfo
  - | OneShotLam
- noOneShotInfo :: OneShotInfo
- hasNoOneShotInfo :: OneShotInfo -> Bool
- isOneShotInfo :: OneShotInfo -> Bool
- bestOneShot :: OneShotInfo -> OneShotInfo -> OneShotInfo
- worstOneShot :: OneShotInfo -> OneShotInfo -> OneShotInfo
- data OccInfo
  - = ManyOccs {
    - occ_tail :: !TailCallInfo
    }
  - | IAmDead
  - | OneOcc {
    - occ_in_lam :: !InsideLam
    - occ_n_br :: !BranchCount
    - occ_int_cxt :: !InterestingCxt
    - occ_tail :: !TailCallInfo
    }
  - | IAmALoopBreaker {
    - occ_rules_only :: !RulesOnly
    - occ_tail :: !TailCallInfo
    }
- noOccInfo :: OccInfo
- seqOccInfo :: OccInfo -> ()
- zapFragileOcc :: OccInfo -> OccInfo
- isOneOcc :: OccInfo -> Bool
- isDeadOcc :: OccInfo -> Bool
- isStrongLoopBreaker :: OccInfo -> Bool
- isWeakLoopBreaker :: OccInfo -> Bool
- isManyOccs :: OccInfo -> Bool
- isNoOccInfo :: OccInfo -> Bool
- strongLoopBreaker :: OccInfo
- weakLoopBreaker :: OccInfo
- data InsideLam
  - = IsInsideLam
  - | NotInsideLam
- type BranchCount = Int
- oneBranch :: BranchCount
- data InterestingCxt
  - = IsInteresting
  - | NotInteresting
- data TailCallInfo
  - = AlwaysTailCalled !JoinArity
  - | NoTailCallInfo
- tailCallInfo :: OccInfo -> TailCallInfo
- zapOccTailCallInfo :: OccInfo -> OccInfo
- isAlwaysTailCalled :: OccInfo -> Bool
- data EP a = EP {
  - fromEP :: a
  - toEP :: a
  }
- data DefMethSpec ty
  - = VanillaDM
  - | GenericDM ty
- data SwapFlag
  - = NotSwapped
  - | IsSwapped
- flipSwap :: SwapFlag -> SwapFlag
- unSwap :: SwapFlag -> (a -> a -> b) -> a -> a -> b
- notSwapped :: SwapFlag -> Bool
- isSwapped :: SwapFlag -> Bool
- pickSwap :: SwapFlag -> a -> a -> a
- data CompilerPhase
  - = InitialPhase
  - | Phase PhaseNum
  - | FinalPhase
- type PhaseNum = Int
- beginPhase :: Activation -> CompilerPhase
- nextPhase :: CompilerPhase -> CompilerPhase
- laterPhase :: CompilerPhase -> CompilerPhase -> CompilerPhase
- data Activation
  - = AlwaysActive
  - | ActiveBefore SourceText PhaseNum
  - | ActiveAfter SourceText PhaseNum
  - | FinalActive
  - | NeverActive
- isActive :: CompilerPhase -> Activation -> Bool
- competesWith :: Activation -> Activation -> Bool
- isNeverActive :: Activation -> Bool
- isAlwaysActive :: Activation -> Bool
- activeInFinalPhase :: Activation -> Bool
- activateAfterInitial :: Activation
- activateDuringFinal :: Activation
- activeAfter :: CompilerPhase -> Activation
- data RuleMatchInfo
  - = ConLike
  - | FunLike
- isConLike :: RuleMatchInfo -> Bool
- isFunLike :: RuleMatchInfo -> Bool
- data InlineSpec
  - = Inline SourceText
  - | Inlinable SourceText
  - | NoInline SourceText
  - | Opaque SourceText
  - | NoUserInlinePrag
- noUserInlineSpec :: InlineSpec -> Bool
- data InlinePragma = InlinePragma {
  - inl_src :: SourceText
  - inl_inline :: InlineSpec
  - inl_sat :: Maybe Arity
  - inl_act :: Activation
  - inl_rule :: RuleMatchInfo
  }
- defaultInlinePragma :: InlinePragma
- alwaysInlinePragma :: InlinePragma
- neverInlinePragma :: InlinePragma
- dfunInlinePragma :: InlinePragma
- isDefaultInlinePragma :: InlinePragma -> Bool
- isInlinePragma :: InlinePragma -> Bool
- isInlinablePragma :: InlinePragma -> Bool
- isNoInlinePragma :: InlinePragma -> Bool
- isOpaquePragma :: InlinePragma -> Bool
- isAnyInlinePragma :: InlinePragma -> Bool
- alwaysInlineConLikePragma :: InlinePragma
- inlinePragmaSource :: InlinePragma -> SourceText
- inlinePragmaName :: InlineSpec -> SDoc
- inlineSpecSource :: InlineSpec -> SourceText
- inlinePragmaSpec :: InlinePragma -> InlineSpec
- inlinePragmaSat :: InlinePragma -> Maybe Arity
- inlinePragmaActivation :: InlinePragma -> Activation
- inlinePragmaRuleMatchInfo :: InlinePragma -> RuleMatchInfo
- setInlinePragmaActivation :: InlinePragma -> Activation -> InlinePragma
- setInlinePragmaRuleMatchInfo :: InlinePragma -> RuleMatchInfo -> InlinePragma
- pprInline :: InlinePragma -> SDoc
- pprInlineDebug :: InlinePragma -> SDoc
- data UnfoldingSource
  - = VanillaSrc
  - | StableUserSrc
  - | StableSystemSrc
  - | CompulsorySrc
- isStableSource :: UnfoldingSource -> Bool
- isStableUserSource :: UnfoldingSource -> Bool
- isStableSystemSource :: UnfoldingSource -> Bool
- isCompulsorySource :: UnfoldingSource -> Bool
- data SuccessFlag
  - = Succeeded
  - | Failed
- succeeded :: SuccessFlag -> Bool
- failed :: SuccessFlag -> Bool
- successIf :: Bool -> SuccessFlag
- data IntWithInf
- infinity :: IntWithInf
- treatZeroAsInf :: Int -> IntWithInf
- subWithInf :: IntWithInf -> Int -> IntWithInf
- mkIntWithInf :: Int -> IntWithInf
- intGtLimit :: Int -> IntWithInf -> Bool
- data TypeOrKind
  - = TypeLevel
  - | KindLevel
- isTypeLevel :: TypeOrKind -> Bool
- isKindLevel :: TypeOrKind -> Bool
- data Levity
  - = Lifted
  - | Unlifted
- mightBeLifted :: Maybe Levity -> Bool
- mightBeUnlifted :: Maybe Levity -> Bool
- data TypeOrConstraint
  - = TypeLike
  - | ConstraintLike
- data TyConFlavour tc
  - = ClassFlavour
  - | TupleFlavour Boxity
  - | SumFlavour
  - | DataTypeFlavour
  - | NewtypeFlavour
  - | AbstractTypeFlavour
  - | OpenFamilyFlavour TypeOrData (Maybe tc)
  - | ClosedTypeFamilyFlavour
  - | TypeSynonymFlavour
  - | BuiltInTypeFlavour
  - | PromotedDataConFlavour
- data TypeOrData
  - = IAmData
  - | IAmType
- tyConFlavourAssoc_maybe :: TyConFlavour tc -> Maybe tc
- data NonStandardDefaultingStrategy
  - = DefaultNonStandardTyVars
  - | TryNotToDefaultNonStandardTyVars
- data DefaultingStrategy
  - = DefaultKindVars
  - | NonStandardDefaulting NonStandardDefaultingStrategy
- defaultNonStandardTyVars :: DefaultingStrategy -> Bool
- data ForeignSrcLang
  - = LangC
  - | LangCxx
  - | LangObjc
  - | LangObjcxx
  - | LangAsm
  - | LangJs
  - | RawObject

# Documentation

data LeftOrRight Source #

Constructors

CLeft |
CRight |

#### Instances

Instances details

Data LeftOrRight Source # |

Instance details

Defined in GHC.Types.Basic

Methods

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

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

toConstr :: LeftOrRight -> Constr Source #

dataTypeOf :: LeftOrRight -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Binary LeftOrRight Source # |
Instance details Defined in GHC.Types.Basic Methods put_ :: WriteBinHandle -> LeftOrRight -> IO () Source # put :: WriteBinHandle -> LeftOrRight -> IO (Bin LeftOrRight) Source # get :: ReadBinHandle -> IO LeftOrRight Source #
Outputable LeftOrRight Source # |
Instance details Defined in GHC.Types.Basic Methods ppr :: LeftOrRight -> SDoc Source #
Eq LeftOrRight Source # |
Instance details Defined in GHC.Types.Basic Methods (==) :: LeftOrRight -> LeftOrRight -> Bool Source # (/=) :: LeftOrRight -> LeftOrRight -> Bool Source #
Ord LeftOrRight Source # |

Instance details

Defined in GHC.Types.Basic

Methods

compare :: LeftOrRight -> LeftOrRight -> Ordering Source #

(<) :: LeftOrRight -> LeftOrRight -> Bool Source #

(<=) :: LeftOrRight -> LeftOrRight -> Bool Source #

(>) :: LeftOrRight -> LeftOrRight -> Bool Source #

(>=) :: LeftOrRight -> LeftOrRight -> Bool Source #

max :: LeftOrRight -> LeftOrRight -> LeftOrRight Source #

min :: LeftOrRight -> LeftOrRight -> LeftOrRight Source #

pickLR :: LeftOrRight -> (a, a) -> a Source #

type ConTag = Int Source #

A *one-index* constructor tag

Type of the tags associated with each constructor possibility or superclass selector

type ConTagZ = Int Source #

A *zero-indexed* constructor tag

fIRST_TAG :: ConTag Source #

Tags are allocated from here for real constructors or for superclass selectors

type Arity = Int Source #

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 VisArity = Int Source #

Syntactic (visibility) arity, i.e. the number of visible arguments. See Note [Visibility and arity]

type RepArity = Int Source #

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 JoinArity = Int Source #

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 FullArgCount = Int Source #

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!

data JoinPointHood Source #

Constructors

JoinPoint !Int |
NotJoinPoint |

#### Instances

Instances details

NFData JoinPointHood Source # |
Instance details Defined in GHC.Utils.Outputable Methods rnf :: JoinPointHood -> () Source #
Binary JoinPointHood Source # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> JoinPointHood -> IO () Source # put :: WriteBinHandle -> JoinPointHood -> IO (Bin JoinPointHood) Source # get :: ReadBinHandle -> IO JoinPointHood Source #
Outputable JoinPointHood Source # |
Instance details Defined in GHC.Utils.Outputable Methods ppr :: JoinPointHood -> SDoc Source #
Eq JoinPointHood Source # |
Instance details Defined in GHC.Utils.Outputable Methods (==) :: JoinPointHood -> JoinPointHood -> Bool Source # (/=) :: JoinPointHood -> JoinPointHood -> Bool Source #

isJoinPoint :: JoinPointHood -> Bool Source #

data Alignment Source #

A power-of-two alignment

#### Instances

Instances details

Outputable Alignment Source # |
Instance details Defined in GHC.Types.Basic Methods ppr :: Alignment -> SDoc Source #
Eq Alignment Source # |
Instance details Defined in GHC.Types.Basic Methods (==) :: Alignment -> Alignment -> Bool Source # (/=) :: Alignment -> Alignment -> Bool Source #
Ord Alignment Source # |
Instance details Defined in GHC.Types.Basic Methods compare :: Alignment -> Alignment -> Ordering Source # (<) :: Alignment -> Alignment -> Bool Source # (<=) :: Alignment -> Alignment -> Bool Source # (>) :: Alignment -> Alignment -> Bool Source # (>=) :: Alignment -> Alignment -> Bool Source # max :: Alignment -> Alignment -> Alignment Source # min :: Alignment -> Alignment -> Alignment Source #
OutputableP env Alignment Source # |
Instance details Defined in GHC.Types.Basic Methods pdoc :: env -> Alignment -> SDoc Source #

mkAlignment :: Int -> Alignment Source #

alignmentOf :: Int -> Alignment Source #

alignmentBytes :: Alignment -> Int Source #

data PromotionFlag Source #

Constructors

NotPromoted |
IsPromoted |

#### Instances

Instances details

Data PromotionFlag Source # |

Instance details

Defined in Language.Haskell.Syntax.Type

Methods

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

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

toConstr :: PromotionFlag -> Constr Source #

dataTypeOf :: PromotionFlag -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Binary PromotionFlag Source # |
Instance details Defined in GHC.Types.Basic Methods put_ :: WriteBinHandle -> PromotionFlag -> IO () Source # put :: WriteBinHandle -> PromotionFlag -> IO (Bin PromotionFlag) Source # get :: ReadBinHandle -> IO PromotionFlag Source #
Outputable PromotionFlag Source # |
Instance details Defined in GHC.Types.Basic Methods ppr :: PromotionFlag -> SDoc Source #
Eq PromotionFlag Source # |
Instance details Defined in Language.Haskell.Syntax.Type Methods (==) :: PromotionFlag -> PromotionFlag -> Bool Source # (/=) :: PromotionFlag -> PromotionFlag -> Bool Source #
Ord PromotionFlag Source # |

Instance details

Defined in Language.Haskell.Syntax.Type

Methods

compare :: PromotionFlag -> PromotionFlag -> Ordering Source #

(<) :: PromotionFlag -> PromotionFlag -> Bool Source #

(<=) :: PromotionFlag -> PromotionFlag -> Bool Source #

(>) :: PromotionFlag -> PromotionFlag -> Bool Source #

(>=) :: PromotionFlag -> PromotionFlag -> Bool Source #

max :: PromotionFlag -> PromotionFlag -> PromotionFlag Source #

min :: PromotionFlag -> PromotionFlag -> PromotionFlag Source #

isPromoted :: PromotionFlag -> Bool Source #

data FunctionOrData Source #

Constructors

IsFunction |
IsData |

#### Instances

Instances details

Data FunctionOrData Source # |

Instance details

Defined in GHC.Types.Basic

Methods

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

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

toConstr :: FunctionOrData -> Constr Source #

dataTypeOf :: FunctionOrData -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Binary FunctionOrData Source # |
Instance details Defined in GHC.Types.Basic Methods put_ :: WriteBinHandle -> FunctionOrData -> IO () Source # put :: WriteBinHandle -> FunctionOrData -> IO (Bin FunctionOrData) Source # get :: ReadBinHandle -> IO FunctionOrData Source #
Outputable FunctionOrData Source # |
Instance details Defined in GHC.Types.Basic Methods ppr :: FunctionOrData -> SDoc Source #
Eq FunctionOrData Source # |
Instance details Defined in GHC.Types.Basic Methods (==) :: FunctionOrData -> FunctionOrData -> Bool Source # (/=) :: FunctionOrData -> FunctionOrData -> Bool Source #
Ord FunctionOrData Source # |

Instance details

Defined in GHC.Types.Basic

Methods

compare :: FunctionOrData -> FunctionOrData -> Ordering Source #

(<) :: FunctionOrData -> FunctionOrData -> Bool Source #

(<=) :: FunctionOrData -> FunctionOrData -> Bool Source #

(>) :: FunctionOrData -> FunctionOrData -> Bool Source #

(>=) :: FunctionOrData -> FunctionOrData -> Bool Source #

max :: FunctionOrData -> FunctionOrData -> FunctionOrData Source #

min :: FunctionOrData -> FunctionOrData -> FunctionOrData Source #

data RecFlag Source #

Recursivity Flag

Constructors

Recursive |
NonRecursive |

#### Instances

Instances details

Data RecFlag Source # |

Instance details

Defined in GHC.Types.Basic

Methods

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

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

toConstr :: RecFlag -> Constr Source #

dataTypeOf :: RecFlag -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Binary RecFlag Source # |
Instance details Defined in GHC.Types.Basic Methods put_ :: WriteBinHandle -> RecFlag -> IO () Source # put :: WriteBinHandle -> RecFlag -> IO (Bin RecFlag) Source # get :: ReadBinHandle -> IO RecFlag Source #
Outputable RecFlag Source # |
Instance details Defined in GHC.Types.Basic Methods ppr :: RecFlag -> SDoc Source #
Eq RecFlag Source # |
Instance details Defined in GHC.Types.Basic Methods (==) :: RecFlag -> RecFlag -> Bool Source # (/=) :: RecFlag -> RecFlag -> Bool Source #

isRec :: RecFlag -> Bool Source #

isNonRec :: RecFlag -> Bool Source #

boolToRecFlag :: Bool -> RecFlag Source #

data Origin Source #

Was this piece of code user-written or generated by the compiler?

See Note [Generated code and pattern-match checking].

Constructors

FromSource |
Generated GenReason DoPmc |

#### Instances

Instances details

Data Origin Source # |

Instance details

Defined in GHC.Types.Basic

Methods

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

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

toConstr :: Origin -> Constr Source #

dataTypeOf :: Origin -> DataType Source #

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

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

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

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

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

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

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

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

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

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

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

isGenerated :: Origin -> Bool Source #

data DoPmc Source #

Whether to run pattern-match checks in generated code.

See Note [Generated code and pattern-match checking].

Constructors

SkipPmc |
DoPmc |

#### Instances

Instances details

Data DoPmc Source # |

Instance details

Defined in GHC.Types.Basic

Methods

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

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

toConstr :: DoPmc -> Constr Source #

dataTypeOf :: DoPmc -> DataType Source #

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

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

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

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

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

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

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

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

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

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

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

requiresPMC :: Origin -> Bool Source #

Does this `Origin` require us to run pattern-match checking, or should we skip these checks?

See Note [Generated code and pattern-match checking].

data GenReason Source #

This metadata stores the information as to why was the piece of code generated It is useful for generating the right error context See Part 3 in Note [Expanding HsDo with XXExprGhcRn] in `Do`

Constructors

DoExpansion HsDoFlavour |
OtherExpansion |

#### Instances

Instances details

Data GenReason Source # |

Instance details

Defined in GHC.Types.Basic

Methods

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

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

toConstr :: GenReason -> Constr Source #

dataTypeOf :: GenReason -> DataType Source #

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

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

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

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

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

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

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

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

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

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

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

isDoExpansionGenerated :: Origin -> Bool Source #

doExpansionFlavour :: Origin -> Maybe HsDoFlavour Source #

doExpansionOrigin :: HsDoFlavour -> Origin Source #

type RuleName = FastString Source #

pprRuleName :: RuleName -> SDoc Source #

data TopLevelFlag Source #

Constructors

TopLevel |
NotTopLevel |

#### Instances

Instances details

Data TopLevelFlag Source # |

Instance details

Defined in GHC.Types.Basic

Methods

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

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

toConstr :: TopLevelFlag -> Constr Source #

dataTypeOf :: TopLevelFlag -> DataType Source #

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

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

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

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

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

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

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

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

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

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

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

isTopLevel :: TopLevelFlag -> Bool Source #

isNotTopLevel :: TopLevelFlag -> Bool Source #

data OverlapFlag Source #

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.

Constructors

OverlapFlag |

Fields

- overlapMode :: OverlapMode
- isSafeOverlap :: Bool

#### Instances

Instances details

Data OverlapFlag Source # |

Instance details

Defined in GHC.Types.Basic

Methods

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

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

toConstr :: OverlapFlag -> Constr Source #

dataTypeOf :: OverlapFlag -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Binary OverlapFlag Source # |
Instance details Defined in GHC.Types.Basic Methods put_ :: WriteBinHandle -> OverlapFlag -> IO () Source # put :: WriteBinHandle -> OverlapFlag -> IO (Bin OverlapFlag) Source # get :: ReadBinHandle -> IO OverlapFlag Source #
Outputable OverlapFlag Source # |
Instance details Defined in GHC.Types.Basic Methods ppr :: OverlapFlag -> SDoc Source #
Eq OverlapFlag Source # |
Instance details Defined in GHC.Types.Basic Methods (==) :: OverlapFlag -> OverlapFlag -> Bool Source # (/=) :: OverlapFlag -> OverlapFlag -> Bool Source #

data OverlapMode Source #

Constructors

NoOverlap SourceText | This instance must not overlap another `NoOverlap` instance. However, it may be overlapped by `Overlapping` instances, and it may overlap `Overlappable` instances.
Overlappable SourceText | Silently ignore this instance if you find a more specific one that matches the constraint you are trying to resolve Example: constraint (Foo [Int]) instance Foo [Int] instance {-# OVERLAPPABLE #-} Foo [a] Since the second instance has the Overlappable flag, the first instance will be chosen (otherwise its ambiguous which to choose)
Overlapping SourceText | Silently ignore any more general instances that may be used to solve the constraint. Example: constraint (Foo [Int]) instance {-# 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)
Overlaps SourceText | Equivalent to having both `Overlapping` and `Overlappable` flags.

Incoherent SourceText

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

NonCanonical SourceText

Behave like Incoherent, but the instance choice is observable by the program behaviour. See Note [Coherence and specialisation: overview].

We don't have surface syntax for the distinction between Incoherent and NonCanonical instances; instead, the flag `-f{no-}specialise-incoherents` (on by default) controls whether `INCOHERENT` instances are regarded as Incoherent or NonCanonical.

#### Instances

Instances details

Data OverlapMode Source # |

Instance details

Defined in GHC.Types.Basic

Methods

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

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

toConstr :: OverlapMode -> Constr Source #

dataTypeOf :: OverlapMode -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Binary OverlapMode Source # |
Instance details Defined in GHC.Types.Basic Methods put_ :: WriteBinHandle -> OverlapMode -> IO () Source # put :: WriteBinHandle -> OverlapMode -> IO (Bin OverlapMode) Source # get :: ReadBinHandle -> IO OverlapMode Source #
Outputable OverlapMode Source # |
Instance details Defined in GHC.Types.Basic Methods ppr :: OverlapMode -> SDoc Source #
Eq OverlapMode Source # |
Instance details Defined in GHC.Types.Basic Methods (==) :: OverlapMode -> OverlapMode -> Bool Source # (/=) :: OverlapMode -> OverlapMode -> Bool Source #
type Anno OverlapMode Source # |
Instance details Defined in GHC.Hs.Decls type Anno OverlapMode = SrcSpanAnnP

setOverlapModeMaybe :: OverlapFlag -> Maybe OverlapMode -> OverlapFlag Source #

hasOverlappingFlag :: OverlapMode -> Bool Source #

hasOverlappableFlag :: OverlapMode -> Bool Source #

hasIncoherentFlag :: OverlapMode -> Bool Source #

hasNonCanonicalFlag :: OverlapMode -> Bool Source #

data Boxity Source #

Constructors

Boxed |
Unboxed |

#### Instances

Instances details

Data Boxity Source # |

Instance details

Defined in Language.Haskell.Syntax.Basic

Methods

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

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

toConstr :: Boxity -> Constr Source #

dataTypeOf :: Boxity -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Binary Boxity Source # |
Instance details Defined in GHC.Types.Basic Methods put_ :: WriteBinHandle -> Boxity -> IO () Source # put :: WriteBinHandle -> Boxity -> IO (Bin Boxity) Source # get :: ReadBinHandle -> IO Boxity Source #
Outputable Boxity Source # |
Instance details Defined in GHC.Types.Basic Methods ppr :: Boxity -> SDoc Source #
Eq Boxity Source # |
Instance details Defined in Language.Haskell.Syntax.Basic Methods (==) :: Boxity -> Boxity -> Bool Source # (/=) :: Boxity -> Boxity -> Bool Source #

isBoxed :: Boxity -> Bool Source #

data CbvMark Source #

Should an argument be passed evaluated *and* tagged.

Constructors

MarkedCbv |
NotMarkedCbv |

#### Instances

Instances details

Binary CbvMark Source # |
Instance details Defined in GHC.Types.Basic Methods put_ :: WriteBinHandle -> CbvMark -> IO () Source # put :: WriteBinHandle -> CbvMark -> IO (Bin CbvMark) Source # get :: ReadBinHandle -> IO CbvMark Source #
Outputable CbvMark Source # |
Instance details Defined in GHC.Types.Basic Methods ppr :: CbvMark -> SDoc Source #
Eq CbvMark Source # |
Instance details Defined in GHC.Types.Basic Methods (==) :: CbvMark -> CbvMark -> Bool Source # (/=) :: CbvMark -> CbvMark -> Bool Source #

isMarkedCbv :: CbvMark -> Bool Source #

newtype PprPrec Source #

A general-purpose pretty-printing precedence type.

Constructors

PprPrec Int |

#### Instances

Instances details

Show PprPrec Source # |
Instance details Defined in GHC.Types.Basic Methods showsPrec :: Int -> PprPrec -> ShowS Source # show :: PprPrec -> String Source # showList :: [PprPrec] -> ShowS Source #
Eq PprPrec Source # |
Instance details Defined in GHC.Types.Basic Methods (==) :: PprPrec -> PprPrec -> Bool Source # (/=) :: PprPrec -> PprPrec -> Bool Source #
Ord PprPrec Source # |
Instance details Defined in GHC.Types.Basic Methods compare :: PprPrec -> PprPrec -> Ordering Source # (<) :: PprPrec -> PprPrec -> Bool Source # (<=) :: PprPrec -> PprPrec -> Bool Source # (>) :: PprPrec -> PprPrec -> Bool Source # (>=) :: PprPrec -> PprPrec -> Bool Source # max :: PprPrec -> PprPrec -> PprPrec Source # min :: PprPrec -> PprPrec -> PprPrec Source #

topPrec :: PprPrec Source #

sigPrec :: PprPrec Source #

opPrec :: PprPrec Source #

funPrec :: PprPrec Source #

starPrec :: PprPrec Source #

appPrec :: PprPrec Source #

maxPrec :: PprPrec Source #

maybeParen :: PprPrec -> PprPrec -> SDoc -> SDoc Source #

data TupleSort Source #

Constructors

BoxedTuple |
UnboxedTuple |
ConstraintTuple |

#### Instances

Instances details

Data TupleSort Source # |

Instance details

Defined in GHC.Types.Basic

Methods

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

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

toConstr :: TupleSort -> Constr Source #

dataTypeOf :: TupleSort -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Binary TupleSort Source # |
Instance details Defined in GHC.Types.Basic Methods put_ :: WriteBinHandle -> TupleSort -> IO () Source # put :: WriteBinHandle -> TupleSort -> IO (Bin TupleSort) Source # get :: ReadBinHandle -> IO TupleSort Source #
Outputable TupleSort Source # |
Instance details Defined in GHC.Types.Basic Methods ppr :: TupleSort -> SDoc Source #
Eq TupleSort Source # |
Instance details Defined in GHC.Types.Basic Methods (==) :: TupleSort -> TupleSort -> Bool Source # (/=) :: TupleSort -> TupleSort -> Bool Source #
Ord TupleSort Source # |
Instance details Defined in GHC.Types.Basic Methods compare :: TupleSort -> TupleSort -> Ordering Source # (<) :: TupleSort -> TupleSort -> Bool Source # (<=) :: TupleSort -> TupleSort -> Bool Source # (>) :: TupleSort -> TupleSort -> Bool Source # (>=) :: TupleSort -> TupleSort -> Bool Source # max :: TupleSort -> TupleSort -> TupleSort Source # min :: TupleSort -> TupleSort -> TupleSort Source #

tupleSortBoxity :: TupleSort -> Boxity Source #

boxityTupleSort :: Boxity -> TupleSort Source #

tupleParens :: TupleSort -> SDoc -> SDoc Source #

data UnboxedTupleOrSum Source #

Are we dealing with an unboxed tuple or an unboxed sum?

Used when validity checking, see `check_ubx_tuple_or_sum`.

Constructors

UnboxedTupleType |
UnboxedSumType |

#### Instances

Instances details

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

unboxedTupleOrSumExtension :: UnboxedTupleOrSum -> Extension Source #

sumParens :: SDoc -> SDoc Source #

pprAlternative Source #

Arguments

:: (a -> SDoc) | The pretty printing function to use
-> a | The things to be pretty printed
-> ConTag | Alternative (one-based)
-> Arity | Arity
-> SDoc | `SDoc` where the alternative havs been pretty printed and finally packed into a paragraph.

Pretty print an alternative in an unboxed sum e.g. "| a | |".

## The OneShotInfo type

data OneShotInfo Source #

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.

Constructors

NoOneShotInfo | No information
OneShotLam | The lambda is applied at most once.

#### Instances

Instances details

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

noOneShotInfo :: OneShotInfo Source #

It is always safe to assume that an `Id` has no lambda-bound variable information

hasNoOneShotInfo :: OneShotInfo -> Bool Source #

isOneShotInfo :: OneShotInfo -> Bool Source #

bestOneShot :: OneShotInfo -> OneShotInfo -> OneShotInfo Source #

worstOneShot :: OneShotInfo -> OneShotInfo -> OneShotInfo Source #

data OccInfo Source #

identifier Occurrence Information

Constructors

ManyOccs | There are many occurrences, or unknown occurrences

Fields

- occ_tail :: !TailCallInfo

IAmDead | Marks unused variables. Sometimes useful for lambda and case-bound variables.
OneOcc | Occurs exactly once (per branch), not inside a rule

Fields

- occ_in_lam :: !InsideLam
- occ_n_br :: !BranchCount
- occ_int_cxt :: !InterestingCxt
- occ_tail :: !TailCallInfo

IAmALoopBreaker | This identifier breaks a loop of mutually recursive functions. The field marks whether it is only a loop breaker due to a reference in a rule

Fields

- occ_rules_only :: !RulesOnly
- occ_tail :: !TailCallInfo

#### Instances

Instances details

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

noOccInfo :: OccInfo Source #

seqOccInfo :: OccInfo -> () Source #

zapFragileOcc :: OccInfo -> OccInfo Source #

isOneOcc :: OccInfo -> Bool Source #

isDeadOcc :: OccInfo -> Bool Source #

isStrongLoopBreaker :: OccInfo -> Bool Source #

isWeakLoopBreaker :: OccInfo -> Bool Source #

isManyOccs :: OccInfo -> Bool Source #

isNoOccInfo :: OccInfo -> Bool Source #

strongLoopBreaker :: OccInfo Source #

weakLoopBreaker :: OccInfo Source #

data InsideLam Source #

Inside Lambda

Constructors

IsInsideLam | Occurs inside a non-linear lambda Substituting a redex for this occurrence is dangerous because it might duplicate work.
NotInsideLam |

#### Instances

Instances details

Monoid InsideLam Source # |
Instance details Defined in GHC.Types.Basic Methods mempty :: InsideLam Source # mappend :: InsideLam -> InsideLam -> InsideLam Source # mconcat :: [InsideLam] -> InsideLam Source #
Semigroup InsideLam Source # | If any occurrence of an identifier is inside a lambda, then the occurrence info of that identifier marks it as occurring inside a lambda
Instance details Defined in GHC.Types.Basic Methods (<>) :: InsideLam -> InsideLam -> InsideLam Source # sconcat :: NonEmpty InsideLam -> InsideLam Source # stimes :: Integral b => b -> InsideLam -> InsideLam Source #
Eq InsideLam Source # |
Instance details Defined in GHC.Types.Basic Methods (==) :: InsideLam -> InsideLam -> Bool Source # (/=) :: InsideLam -> InsideLam -> Bool Source #

type BranchCount = Int Source #

oneBranch :: BranchCount Source #

data InterestingCxt Source #

Interesting Context

Constructors

IsInteresting | Function: is applied Data value: scrutinised by a case with at least one non-DEFAULT branch
NotInteresting |

#### Instances

Instances details

Monoid InterestingCxt Source # |
Instance details Defined in GHC.Types.Basic Methods mempty :: InterestingCxt Source # mappend :: InterestingCxt -> InterestingCxt -> InterestingCxt Source # mconcat :: [InterestingCxt] -> InterestingCxt Source #
Semigroup InterestingCxt Source # | If there is any `interesting` identifier occurrence, then the aggregated occurrence info of that identifier is considered interesting.
Instance details Defined in GHC.Types.Basic Methods (<>) :: InterestingCxt -> InterestingCxt -> InterestingCxt Source # sconcat :: NonEmpty InterestingCxt -> InterestingCxt Source # stimes :: Integral b => b -> InterestingCxt -> InterestingCxt Source #
Eq InterestingCxt Source # |
Instance details Defined in GHC.Types.Basic Methods (==) :: InterestingCxt -> InterestingCxt -> Bool Source # (/=) :: InterestingCxt -> InterestingCxt -> Bool Source #

data TailCallInfo Source #

Constructors

AlwaysTailCalled !JoinArity |
NoTailCallInfo |

#### Instances

Instances details

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

tailCallInfo :: OccInfo -> TailCallInfo Source #

zapOccTailCallInfo :: OccInfo -> OccInfo Source #

isAlwaysTailCalled :: OccInfo -> Bool Source #

data EP a Source #

Embedding Projection pair

Constructors

EP |

Fields

- fromEP :: a
- toEP :: a

data DefMethSpec ty Source #

Default Method Specification

Constructors

VanillaDM |
GenericDM ty |

#### Instances

Instances details

Binary (DefMethSpec IfaceType) Source # |
Instance details Defined in GHC.Iface.Type Methods put_ :: WriteBinHandle -> DefMethSpec IfaceType -> IO () Source # put :: WriteBinHandle -> DefMethSpec IfaceType -> IO (Bin (DefMethSpec IfaceType)) Source # get :: ReadBinHandle -> IO (DefMethSpec IfaceType) Source #
Outputable (DefMethSpec ty) Source # |
Instance details Defined in GHC.Types.Basic Methods ppr :: DefMethSpec ty -> SDoc Source #

data SwapFlag Source #

Constructors

NotSwapped |
IsSwapped |

#### Instances

Instances details

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

flipSwap :: SwapFlag -> SwapFlag Source #

unSwap :: SwapFlag -> (a -> a -> b) -> a -> a -> b Source #

notSwapped :: SwapFlag -> Bool Source #

isSwapped :: SwapFlag -> Bool Source #

pickSwap :: SwapFlag -> a -> a -> a Source #

data CompilerPhase Source #

Constructors

InitialPhase |
Phase PhaseNum |
FinalPhase |

#### Instances

Instances details

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

type PhaseNum = Int Source #

Phase Number

beginPhase :: Activation -> CompilerPhase Source #

nextPhase :: CompilerPhase -> CompilerPhase Source #

laterPhase :: CompilerPhase -> CompilerPhase -> CompilerPhase Source #

data Activation Source #

Constructors

AlwaysActive |
ActiveBefore SourceText PhaseNum |
ActiveAfter SourceText PhaseNum |
FinalActive |
NeverActive |

#### Instances

Instances details

Data Activation Source # |

Instance details

Defined in GHC.Types.Basic

Methods

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

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

toConstr :: Activation -> Constr Source #

dataTypeOf :: Activation -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Binary Activation Source # |
Instance details Defined in GHC.Types.Basic Methods put_ :: WriteBinHandle -> Activation -> IO () Source # put :: WriteBinHandle -> Activation -> IO (Bin Activation) Source # get :: ReadBinHandle -> IO Activation Source #
Outputable Activation Source # |
Instance details Defined in GHC.Types.Basic Methods ppr :: Activation -> SDoc Source #
Eq Activation Source # |
Instance details Defined in GHC.Types.Basic Methods (==) :: Activation -> Activation -> Bool Source # (/=) :: Activation -> Activation -> Bool Source #

isActive :: CompilerPhase -> Activation -> Bool Source #

competesWith :: Activation -> Activation -> Bool Source #

isNeverActive :: Activation -> Bool Source #

isAlwaysActive :: Activation -> Bool Source #

activeInFinalPhase :: Activation -> Bool Source #

activateAfterInitial :: Activation Source #

activateDuringFinal :: Activation Source #

activeAfter :: CompilerPhase -> Activation Source #

data RuleMatchInfo Source #

Rule Match Information

Constructors

ConLike |
FunLike |

#### Instances

Instances details

Data RuleMatchInfo Source # |

Instance details

Defined in GHC.Types.Basic

Methods

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

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

toConstr :: RuleMatchInfo -> Constr Source #

dataTypeOf :: RuleMatchInfo -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Show RuleMatchInfo Source # |
Instance details Defined in GHC.Types.Basic Methods showsPrec :: Int -> RuleMatchInfo -> ShowS Source # show :: RuleMatchInfo -> String Source # showList :: [RuleMatchInfo] -> ShowS Source #
Binary RuleMatchInfo Source # |
Instance details Defined in GHC.Types.Basic Methods put_ :: WriteBinHandle -> RuleMatchInfo -> IO () Source # put :: WriteBinHandle -> RuleMatchInfo -> IO (Bin RuleMatchInfo) Source # get :: ReadBinHandle -> IO RuleMatchInfo Source #
Outputable RuleMatchInfo Source # |
Instance details Defined in GHC.Types.Basic Methods ppr :: RuleMatchInfo -> SDoc Source #
Eq RuleMatchInfo Source # |
Instance details Defined in GHC.Types.Basic Methods (==) :: RuleMatchInfo -> RuleMatchInfo -> Bool Source # (/=) :: RuleMatchInfo -> RuleMatchInfo -> Bool Source #

isConLike :: RuleMatchInfo -> Bool Source #

isFunLike :: RuleMatchInfo -> Bool Source #

data InlineSpec Source #

Inline Specification

Constructors

Inline SourceText |
Inlinable SourceText |
NoInline SourceText |
Opaque SourceText |
NoUserInlinePrag |

#### Instances

Instances details

Data InlineSpec Source # |

Instance details

Defined in GHC.Types.Basic

Methods

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

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

toConstr :: InlineSpec -> Constr Source #

dataTypeOf :: InlineSpec -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Show InlineSpec Source # |
Instance details Defined in GHC.Types.Basic Methods showsPrec :: Int -> InlineSpec -> ShowS Source # show :: InlineSpec -> String Source # showList :: [InlineSpec] -> ShowS Source #
Binary InlineSpec Source # |
Instance details Defined in GHC.Types.Basic Methods put_ :: WriteBinHandle -> InlineSpec -> IO () Source # put :: WriteBinHandle -> InlineSpec -> IO (Bin InlineSpec) Source # get :: ReadBinHandle -> IO InlineSpec Source #
Outputable InlineSpec Source # |
Instance details Defined in GHC.Types.Basic Methods ppr :: InlineSpec -> SDoc Source #
Eq InlineSpec Source # |
Instance details Defined in GHC.Types.Basic Methods (==) :: InlineSpec -> InlineSpec -> Bool Source # (/=) :: InlineSpec -> InlineSpec -> Bool Source #

noUserInlineSpec :: InlineSpec -> Bool Source #

data InlinePragma Source #

Constructors

InlinePragma |

Fields

- inl_src :: SourceText
- inl_inline :: InlineSpec
- inl_sat :: Maybe Arity
- inl_act :: Activation
- inl_rule :: RuleMatchInfo

#### Instances

Instances details

Data InlinePragma Source # |

Instance details

Defined in GHC.Types.Basic

Methods

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

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

toConstr :: InlinePragma -> Constr Source #

dataTypeOf :: InlinePragma -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Binary InlinePragma Source # |
Instance details Defined in GHC.Types.Basic Methods put_ :: WriteBinHandle -> InlinePragma -> IO () Source # put :: WriteBinHandle -> InlinePragma -> IO (Bin InlinePragma) Source # get :: ReadBinHandle -> IO InlinePragma Source #
Outputable InlinePragma Source # |
Instance details Defined in GHC.Types.Basic Methods ppr :: InlinePragma -> SDoc Source #
Eq InlinePragma Source # |
Instance details Defined in GHC.Types.Basic Methods (==) :: InlinePragma -> InlinePragma -> Bool Source # (/=) :: InlinePragma -> InlinePragma -> Bool Source #

defaultInlinePragma :: InlinePragma Source #

alwaysInlinePragma :: InlinePragma Source #

neverInlinePragma :: InlinePragma Source #

dfunInlinePragma :: InlinePragma Source #

isDefaultInlinePragma :: InlinePragma -> Bool Source #

isInlinePragma :: InlinePragma -> Bool Source #

isInlinablePragma :: InlinePragma -> Bool Source #

isNoInlinePragma :: InlinePragma -> Bool Source #

isOpaquePragma :: InlinePragma -> Bool Source #

isAnyInlinePragma :: InlinePragma -> Bool Source #

alwaysInlineConLikePragma :: InlinePragma Source #

inlinePragmaSource :: InlinePragma -> SourceText Source #

inlinePragmaName :: InlineSpec -> SDoc Source #

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.

inlineSpecSource :: InlineSpec -> SourceText Source #

inlinePragmaSpec :: InlinePragma -> InlineSpec Source #

inlinePragmaSat :: InlinePragma -> Maybe Arity Source #

inlinePragmaActivation :: InlinePragma -> Activation Source #

inlinePragmaRuleMatchInfo :: InlinePragma -> RuleMatchInfo Source #

setInlinePragmaActivation :: InlinePragma -> Activation -> InlinePragma Source #

setInlinePragmaRuleMatchInfo :: InlinePragma -> RuleMatchInfo -> InlinePragma Source #

pprInline :: InlinePragma -> SDoc Source #

Pretty-print without displaying the user-specified `InlineSpec`.

pprInlineDebug :: InlinePragma -> SDoc Source #

Pretty-print including the user-specified `InlineSpec`.

data UnfoldingSource Source #

Constructors

VanillaSrc |
StableUserSrc |
StableSystemSrc |
CompulsorySrc |

#### Instances

Instances details

Binary UnfoldingSource Source # |
Instance details Defined in GHC.Types.Basic Methods put_ :: WriteBinHandle -> UnfoldingSource -> IO () Source # put :: WriteBinHandle -> UnfoldingSource -> IO (Bin UnfoldingSource) Source # get :: ReadBinHandle -> IO UnfoldingSource Source #
Outputable UnfoldingSource Source # |
Instance details Defined in GHC.Types.Basic Methods ppr :: UnfoldingSource -> SDoc Source #

isStableSource :: UnfoldingSource -> Bool Source #

isStableUserSource :: UnfoldingSource -> Bool Source #

isStableSystemSource :: UnfoldingSource -> Bool Source #

isCompulsorySource :: UnfoldingSource -> Bool Source #

data SuccessFlag Source #

Constructors

Succeeded |
Failed |

#### Instances

Instances details

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

succeeded :: SuccessFlag -> Bool Source #

failed :: SuccessFlag -> Bool Source #

successIf :: Bool -> SuccessFlag Source #

data IntWithInf Source #

An integer or infinity

#### Instances

Instances details

Num IntWithInf Source # |
Instance details Defined in GHC.Types.Basic Methods (+) :: IntWithInf -> IntWithInf -> IntWithInf Source # (-) :: IntWithInf -> IntWithInf -> IntWithInf Source # (*) :: IntWithInf -> IntWithInf -> IntWithInf Source # negate :: IntWithInf -> IntWithInf Source # abs :: IntWithInf -> IntWithInf Source # signum :: IntWithInf -> IntWithInf Source # fromInteger :: Integer -> IntWithInf Source #
Outputable IntWithInf Source # |
Instance details Defined in GHC.Types.Basic Methods ppr :: IntWithInf -> SDoc Source #
Eq IntWithInf Source # |
Instance details Defined in GHC.Types.Basic Methods (==) :: IntWithInf -> IntWithInf -> Bool Source # (/=) :: IntWithInf -> IntWithInf -> Bool Source #
Ord IntWithInf Source # |

Instance details

Defined in GHC.Types.Basic

Methods

compare :: IntWithInf -> IntWithInf -> Ordering Source #

(<) :: IntWithInf -> IntWithInf -> Bool Source #

(<=) :: IntWithInf -> IntWithInf -> Bool Source #

(>) :: IntWithInf -> IntWithInf -> Bool Source #

(>=) :: IntWithInf -> IntWithInf -> Bool Source #

max :: IntWithInf -> IntWithInf -> IntWithInf Source #

min :: IntWithInf -> IntWithInf -> IntWithInf Source #

infinity :: IntWithInf Source #

A representation of infinity

treatZeroAsInf :: Int -> IntWithInf Source #

Turn a positive number into an `IntWithInf`, where 0 represents infinity

subWithInf :: IntWithInf -> Int -> IntWithInf Source #

Subtract an `Int` from an `IntWithInf`

mkIntWithInf :: Int -> IntWithInf Source #

Inject any integer into an `IntWithInf`

intGtLimit :: Int -> IntWithInf -> Bool Source #

data TypeOrKind Source #

Flag to see whether we're type-checking terms or kind-checking types

Constructors

TypeLevel |
KindLevel |

#### Instances

Instances details

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

isTypeLevel :: TypeOrKind -> Bool Source #

isKindLevel :: TypeOrKind -> Bool Source #

data Levity Source #

Constructors

Lifted |
Unlifted |

#### Instances

Instances details

Data Levity Source # |

Instance details

Defined in GHC.Types.Basic

Methods

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

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

toConstr :: Levity -> Constr Source #

dataTypeOf :: Levity -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Show Levity Source # |
Instance details Defined in GHC.Types.Basic Methods showsPrec :: Int -> Levity -> ShowS Source # show :: Levity -> String Source # showList :: [Levity] -> ShowS Source #
Binary Levity Source # |
Instance details Defined in GHC.Types.Basic Methods put_ :: WriteBinHandle -> Levity -> IO () Source # put :: WriteBinHandle -> Levity -> IO (Bin Levity) Source # get :: ReadBinHandle -> IO Levity Source #
Outputable Levity Source # |
Instance details Defined in GHC.Types.Basic Methods ppr :: Levity -> SDoc Source #
Eq Levity Source # |
Instance details Defined in GHC.Types.Basic Methods (==) :: Levity -> Levity -> Bool Source # (/=) :: Levity -> Levity -> Bool Source #
Ord Levity Source # |
Instance details Defined in GHC.Types.Basic Methods compare :: Levity -> Levity -> Ordering Source # (<) :: Levity -> Levity -> Bool Source # (<=) :: Levity -> Levity -> Bool Source # (>) :: Levity -> Levity -> Bool Source # (>=) :: Levity -> Levity -> Bool Source # max :: Levity -> Levity -> Levity Source # min :: Levity -> Levity -> Levity Source #

mightBeLifted :: Maybe Levity -> Bool Source #

mightBeUnlifted :: Maybe Levity -> Bool Source #

data TypeOrConstraint Source #

Constructors

TypeLike |
ConstraintLike |

#### Instances

Instances details

Data TypeOrConstraint Source # |

Instance details

Defined in GHC.Types.Basic

Methods

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

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

toConstr :: TypeOrConstraint -> Constr Source #

dataTypeOf :: TypeOrConstraint -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Eq TypeOrConstraint Source # |
Instance details Defined in GHC.Types.Basic Methods (==) :: TypeOrConstraint -> TypeOrConstraint -> Bool Source # (/=) :: TypeOrConstraint -> TypeOrConstraint -> Bool Source #
Ord TypeOrConstraint Source # |

Instance details

Defined in GHC.Types.Basic

Methods

compare :: TypeOrConstraint -> TypeOrConstraint -> Ordering Source #

(<) :: TypeOrConstraint -> TypeOrConstraint -> Bool Source #

(<=) :: TypeOrConstraint -> TypeOrConstraint -> Bool Source #

(>) :: TypeOrConstraint -> TypeOrConstraint -> Bool Source #

(>=) :: TypeOrConstraint -> TypeOrConstraint -> Bool Source #

max :: TypeOrConstraint -> TypeOrConstraint -> TypeOrConstraint Source #

min :: TypeOrConstraint -> TypeOrConstraint -> TypeOrConstraint Source #

data TyConFlavour tc Source #

Paints a picture of what a `TyCon` represents, in broad strokes. This is used towards more informative error messages.

Constructors

ClassFlavour |
TupleFlavour Boxity |
SumFlavour |
DataTypeFlavour |
NewtypeFlavour |
AbstractTypeFlavour |
OpenFamilyFlavour TypeOrData (Maybe tc) |
ClosedTypeFamilyFlavour |
TypeSynonymFlavour |
BuiltInTypeFlavour | e.g., the `(->)` `TyCon`.
PromotedDataConFlavour |

#### Instances

Instances details

Functor TyConFlavour Source # |
Instance details Defined in GHC.Types.Basic Methods fmap :: (a -> b) -> TyConFlavour a -> TyConFlavour b Source # (<$) :: a -> TyConFlavour b -> TyConFlavour a Source #
NFData tc => NFData (TyConFlavour tc) Source # |
Instance details Defined in GHC.Types.Basic Methods rnf :: TyConFlavour tc -> () Source #
Data tc => Data (TyConFlavour tc) Source # |

Instance details

Defined in GHC.Types.Basic

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TyConFlavour tc -> c (TyConFlavour tc) Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (TyConFlavour tc) Source #

toConstr :: TyConFlavour tc -> Constr Source #

dataTypeOf :: TyConFlavour tc -> DataType Source #

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

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

gmapT :: (forall b. Data b => b -> b) -> TyConFlavour tc -> TyConFlavour tc Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TyConFlavour tc -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TyConFlavour tc -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> TyConFlavour tc -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> TyConFlavour tc -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> TyConFlavour tc -> m (TyConFlavour tc) Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TyConFlavour tc -> m (TyConFlavour tc) Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TyConFlavour tc -> m (TyConFlavour tc) Source #

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

data TypeOrData Source #

Whether something is a type or a data declaration, e.g. a type family or a data family.

Constructors

IAmData |
IAmType |

#### Instances

Instances details

Data TypeOrData Source # |

Instance details

Defined in GHC.Types.Basic

Methods

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

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

toConstr :: TypeOrData -> Constr Source #

dataTypeOf :: TypeOrData -> DataType Source #

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

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

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

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

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

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

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

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

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

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

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

tyConFlavourAssoc_maybe :: TyConFlavour tc -> Maybe tc Source #

Get the enclosing class TyCon (if there is one) for the given TyConFlavour

data NonStandardDefaultingStrategy Source #

Specify whether to default type variables of kind `RuntimeRep` `Levity` `Multiplicity`.

Constructors

DefaultNonStandardTyVars

Default type variables of the given kinds:

- default `RuntimeRep` variables to `LiftedRep`
- default `Levity` variables to `Lifted`
- default `Multiplicity` variables to `Many`

TryNotToDefaultNonStandardTyVars | Try not to default type variables of the kinds `RuntimeRep` `Levity` `Multiplicity`. Note that these might get defaulted anyway, if they are kind variables and `-XNoPolyKinds` is enabled.

#### Instances

Instances details

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

data DefaultingStrategy Source #

Specify whether to default kind variables, and type variables of kind `RuntimeRep` `Levity` `Multiplicity`.

Constructors

DefaultKindVars

Default kind variables:

- default kind variables of kind `Type` to `Type`,
- default `RuntimeRep` `Levity` `Multiplicity` kind variables to `LiftedRep` `Lifted` `Many`, 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.

NonStandardDefaulting NonStandardDefaultingStrategy | Default (or don't default) non-standard variables, of kinds `RuntimeRep`, `Levity` and `Multiplicity`.

#### Instances

Instances details

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

defaultNonStandardTyVars :: DefaultingStrategy -> Bool Source #

data ForeignSrcLang Source #

Foreign formats supported by GHC via TH

Constructors

LangC | C
LangCxx | C++
LangObjc | Objective C
LangObjcxx | Objective C++
LangAsm | Assembly language (.s)
LangJs | JavaScript
RawObject | Object (.o)

#### Instances

Instances details

Binary ForeignSrcLang Source # |
Instance details Defined in GHC.ForeignSrcLang Methods put :: ForeignSrcLang -> Put Source # get :: Get ForeignSrcLang Source # putList :: [ForeignSrcLang] -> Put Source #
Generic ForeignSrcLang Source # |

Instance details

Defined in GHC.Internal.ForeignSrcLang

Associated Types

type Rep ForeignSrcLang |

Instance details

Defined in GHC.Internal.ForeignSrcLang

type Rep ForeignSrcLang = D1 ('MetaData "ForeignSrcLang" "GHC.Internal.ForeignSrcLang" "ghc-lib-parser-9.12.2.20250421-CLarrBnVGcX5rqdmHKZO6f" 'False) ((C1 ('MetaCons "LangC" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "LangCxx" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LangObjc" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "LangObjcxx" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LangAsm" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "LangJs" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "RawObject" 'PrefixI 'False) (U1 :: Type -> Type))))

Methods

from :: ForeignSrcLang -> Rep ForeignSrcLang x Source #

to :: Rep ForeignSrcLang x -> ForeignSrcLang Source #

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

Instance details

Defined in GHC.Internal.ForeignSrcLang

type Rep ForeignSrcLang = D1 ('MetaData "ForeignSrcLang" "GHC.Internal.ForeignSrcLang" "ghc-lib-parser-9.12.2.20250421-CLarrBnVGcX5rqdmHKZO6f" 'False) ((C1 ('MetaCons "LangC" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "LangCxx" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LangObjc" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "LangObjcxx" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LangAsm" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "LangJs" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "RawObject" 'PrefixI 'False) (U1 :: Type -> Type))))

# Orphan instances

Binary Boxity Source # |
Instance details Methods put_ :: WriteBinHandle -> Boxity -> IO () Source # put :: WriteBinHandle -> Boxity -> IO (Bin Boxity) Source # get :: ReadBinHandle -> IO Boxity Source #
Binary PromotionFlag Source # |
Instance details Methods put_ :: WriteBinHandle -> PromotionFlag -> IO () Source # put :: WriteBinHandle -> PromotionFlag -> IO (Bin PromotionFlag) Source # get :: ReadBinHandle -> IO PromotionFlag Source #
Outputable Boxity Source # |
Instance details Methods ppr :: Boxity -> SDoc Source #
Outputable PromotionFlag Source # |
Instance details Methods ppr :: PromotionFlag -> SDoc Source #