ghc-lib-parser-9.10.1.20250103: 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
- isSwapped :: SwapFlag -> Bool
- 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 #

Constructors

CLeft |
CRight |

#### Instances

Instances details

Data LeftOrRight # |

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 #

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

toConstr :: LeftOrRight -> Constr #

dataTypeOf :: LeftOrRight -> DataType #

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

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

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

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

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

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

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

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

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

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

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

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

type ConTag = Int #

A *one-index* constructor tag

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

type ConTagZ = Int #

A *zero-indexed* constructor tag

fIRST_TAG :: ConTag #

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

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

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

type RepArity = 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 JoinArity = 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 FullArgCount = 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!

data JoinPointHood #

Constructors

JoinPoint !Int |
NotJoinPoint |

#### Instances

Instances details

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

isJoinPoint :: JoinPointHood -> Bool #

data Alignment #

A power-of-two alignment

#### Instances

Instances details

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

mkAlignment :: Int -> Alignment #

alignmentOf :: Int -> Alignment #

alignmentBytes :: Alignment -> Int #

data PromotionFlag #

Constructors

NotPromoted |
IsPromoted |

#### Instances

Instances details

Data PromotionFlag # |

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 #

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

toConstr :: PromotionFlag -> Constr #

dataTypeOf :: PromotionFlag -> DataType #

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

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

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

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

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

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

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

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

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

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

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

isPromoted :: PromotionFlag -> Bool #

data FunctionOrData #

Constructors

IsFunction |
IsData |

#### Instances

Instances details

Data FunctionOrData # |

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 #

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

toConstr :: FunctionOrData -> Constr #

dataTypeOf :: FunctionOrData -> DataType #

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

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

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

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

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

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

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

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

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

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

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

Instance details

Defined in GHC.Types.Basic

Methods

compare :: FunctionOrData -> FunctionOrData -> Ordering #

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

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

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

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

max :: FunctionOrData -> FunctionOrData -> FunctionOrData #

min :: FunctionOrData -> FunctionOrData -> FunctionOrData #

data RecFlag #

Recursivity Flag

Constructors

Recursive |
NonRecursive |

#### Instances

Instances details

Data RecFlag # |

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 #

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

toConstr :: RecFlag -> Constr #

dataTypeOf :: RecFlag -> DataType #

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

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

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

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

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

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

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

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

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

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

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

isRec :: RecFlag -> Bool #

isNonRec :: RecFlag -> Bool #

boolToRecFlag :: Bool -> RecFlag #

data Origin #

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

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 #

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

toConstr :: Origin -> Constr #

dataTypeOf :: Origin -> DataType #

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

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

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

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

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

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

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

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

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

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

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

isGenerated :: Origin -> Bool #

data DoPmc #

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

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 #

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

toConstr :: DoPmc -> Constr #

dataTypeOf :: DoPmc -> DataType #

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

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

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

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

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

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

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

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

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

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

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

requiresPMC :: Origin -> Bool #

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 #

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

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 #

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

toConstr :: GenReason -> Constr #

dataTypeOf :: GenReason -> DataType #

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

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

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

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

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

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

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

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

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

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

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

isDoExpansionGenerated :: Origin -> Bool #

doExpansionFlavour :: Origin -> Maybe HsDoFlavour #

doExpansionOrigin :: HsDoFlavour -> Origin #

type RuleName = FastString #

pprRuleName :: RuleName -> SDoc #

data TopLevelFlag #

Constructors

TopLevel |
NotTopLevel |

#### Instances

Instances details

Data TopLevelFlag # |

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 #

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

toConstr :: TopLevelFlag -> Constr #

dataTypeOf :: TopLevelFlag -> DataType #

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

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

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

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

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

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

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

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

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

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

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

isTopLevel :: TopLevelFlag -> Bool #

isNotTopLevel :: TopLevelFlag -> Bool #

data OverlapFlag #

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.

- `AnnKeywordId` : `AnnOpen` `'{-# OVERLAPPABLE'` or `'{-# OVERLAPPING'` or `'{-# OVERLAPS'` or `'{-# INCOHERENT'`, `AnnClose` ``#-}``,

Constructors

OverlapFlag |

Fields

- overlapMode :: OverlapMode
- isSafeOverlap :: Bool

#### Instances

Instances details

Data OverlapFlag # |

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 #

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

toConstr :: OverlapFlag -> Constr #

dataTypeOf :: OverlapFlag -> DataType #

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

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

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

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

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

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

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

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

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

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

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

data OverlapMode #

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

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 #

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

toConstr :: OverlapMode -> Constr #

dataTypeOf :: OverlapMode -> DataType #

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

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

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

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

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

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

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

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

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

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

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

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

hasOverlappingFlag :: OverlapMode -> Bool #

hasOverlappableFlag :: OverlapMode -> Bool #

hasIncoherentFlag :: OverlapMode -> Bool #

hasNonCanonicalFlag :: OverlapMode -> Bool #

data Boxity #

Constructors

Boxed |
Unboxed |

#### Instances

Instances details

Data Boxity # |

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 #

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

toConstr :: Boxity -> Constr #

dataTypeOf :: Boxity -> DataType #

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

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

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

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

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

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

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

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

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

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

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

isBoxed :: Boxity -> Bool #

data CbvMark #

Should an argument be passed evaluated *and* tagged.

Constructors

MarkedCbv |
NotMarkedCbv |

#### Instances

Instances details

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

isMarkedCbv :: CbvMark -> Bool #

newtype PprPrec #

A general-purpose pretty-printing precedence type.

Constructors

PprPrec Int |

#### Instances

Instances details

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

topPrec :: PprPrec #

sigPrec :: PprPrec #

opPrec :: PprPrec #

funPrec :: PprPrec #

starPrec :: PprPrec #

appPrec :: PprPrec #

maxPrec :: PprPrec #

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

data TupleSort #

Constructors

BoxedTuple |
UnboxedTuple |
ConstraintTuple |

#### Instances

Instances details

Data TupleSort # |

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 #

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

toConstr :: TupleSort -> Constr #

dataTypeOf :: TupleSort -> DataType #

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

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

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

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

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

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

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

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

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

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

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

tupleSortBoxity :: TupleSort -> Boxity #

boxityTupleSort :: Boxity -> TupleSort #

tupleParens :: TupleSort -> SDoc -> SDoc #

data UnboxedTupleOrSum #

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 # |
Instance details Defined in GHC.Types.Basic Methods ppr :: UnboxedTupleOrSum -> SDoc #
Eq UnboxedTupleOrSum # |
Instance details Defined in GHC.Types.Basic Methods (==) :: UnboxedTupleOrSum -> UnboxedTupleOrSum -> Bool # (/=) :: UnboxedTupleOrSum -> UnboxedTupleOrSum -> Bool #

unboxedTupleOrSumExtension :: UnboxedTupleOrSum -> Extension #

sumParens :: SDoc -> SDoc #

pprAlternative #

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 #

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 # |
Instance details Defined in GHC.Types.Basic Methods ppr :: OneShotInfo -> SDoc #
Eq OneShotInfo # |
Instance details Defined in GHC.Types.Basic Methods (==) :: OneShotInfo -> OneShotInfo -> Bool # (/=) :: OneShotInfo -> OneShotInfo -> Bool #

noOneShotInfo :: OneShotInfo #

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

hasNoOneShotInfo :: OneShotInfo -> Bool #

isOneShotInfo :: OneShotInfo -> Bool #

bestOneShot :: OneShotInfo -> OneShotInfo -> OneShotInfo #

worstOneShot :: OneShotInfo -> OneShotInfo -> OneShotInfo #

data OccInfo #

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 # |
Instance details Defined in GHC.Types.Basic Methods ppr :: OccInfo -> SDoc #
Eq OccInfo # |
Instance details Defined in GHC.Types.Basic Methods (==) :: OccInfo -> OccInfo -> Bool # (/=) :: OccInfo -> OccInfo -> Bool #

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 #

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 # |
Instance details Defined in GHC.Types.Basic Methods mempty :: InsideLam # mappend :: InsideLam -> InsideLam -> InsideLam # mconcat :: [InsideLam] -> InsideLam #
Semigroup InsideLam # | 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 # sconcat :: NonEmpty InsideLam -> InsideLam # stimes :: Integral b => b -> InsideLam -> InsideLam #
Eq InsideLam # |
Instance details Defined in GHC.Types.Basic Methods (==) :: InsideLam -> InsideLam -> Bool # (/=) :: InsideLam -> InsideLam -> Bool #

type BranchCount = Int #

oneBranch :: BranchCount #

data InterestingCxt #

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 # |
Instance details Defined in GHC.Types.Basic Methods mempty :: InterestingCxt # mappend :: InterestingCxt -> InterestingCxt -> InterestingCxt # mconcat :: [InterestingCxt] -> InterestingCxt #
Semigroup InterestingCxt # | 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 # sconcat :: NonEmpty InterestingCxt -> InterestingCxt # stimes :: Integral b => b -> InterestingCxt -> InterestingCxt #
Eq InterestingCxt # |
Instance details Defined in GHC.Types.Basic Methods (==) :: InterestingCxt -> InterestingCxt -> Bool # (/=) :: InterestingCxt -> InterestingCxt -> Bool #

data TailCallInfo #

Constructors

AlwaysTailCalled !JoinArity |
NoTailCallInfo |

#### Instances

Instances details

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

tailCallInfo :: OccInfo -> TailCallInfo #

zapOccTailCallInfo :: OccInfo -> OccInfo #

isAlwaysTailCalled :: OccInfo -> Bool #

data EP a #

Embedding Projection pair

Constructors

EP |

Fields

- fromEP :: a
- toEP :: a

data DefMethSpec ty #

Default Method Specification

Constructors

VanillaDM |
GenericDM ty |

#### Instances

Instances details

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

data SwapFlag #

Constructors

NotSwapped |
IsSwapped |

#### Instances

Instances details

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

flipSwap :: SwapFlag -> SwapFlag #

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

isSwapped :: SwapFlag -> Bool #

data CompilerPhase #

Constructors

InitialPhase |
Phase PhaseNum |
FinalPhase |

#### Instances

Instances details

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

type PhaseNum = Int #

Phase Number

beginPhase :: Activation -> CompilerPhase #

nextPhase :: CompilerPhase -> CompilerPhase #

laterPhase :: CompilerPhase -> CompilerPhase -> CompilerPhase #

data Activation #

Constructors

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

#### Instances

Instances details

Data Activation # |

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 #

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

toConstr :: Activation -> Constr #

dataTypeOf :: Activation -> DataType #

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

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

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

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

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

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

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

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

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

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

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

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 #

Rule Match Information

Constructors

ConLike |
FunLike |

#### Instances

Instances details

Data RuleMatchInfo # |

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 #

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

toConstr :: RuleMatchInfo -> Constr #

dataTypeOf :: RuleMatchInfo -> DataType #

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

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

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

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

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

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

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

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

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

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

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

isConLike :: RuleMatchInfo -> Bool #

isFunLike :: RuleMatchInfo -> Bool #

data InlineSpec #

Inline Specification

Constructors

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

#### Instances

Instances details

Data InlineSpec # |

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 #

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

toConstr :: InlineSpec -> Constr #

dataTypeOf :: InlineSpec -> DataType #

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

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

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

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

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

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

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

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

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

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

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

noUserInlineSpec :: InlineSpec -> Bool #

data InlinePragma #

Constructors

InlinePragma |

Fields

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

#### Instances

Instances details

Data InlinePragma # |

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 #

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

toConstr :: InlinePragma -> Constr #

dataTypeOf :: InlinePragma -> DataType #

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

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

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

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

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

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

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

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

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

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

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

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 #

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 #

inlinePragmaSpec :: InlinePragma -> InlineSpec #

inlinePragmaSat :: InlinePragma -> Maybe Arity #

inlinePragmaActivation :: InlinePragma -> Activation #

inlinePragmaRuleMatchInfo :: InlinePragma -> RuleMatchInfo #

setInlinePragmaActivation :: InlinePragma -> Activation -> InlinePragma #

setInlinePragmaRuleMatchInfo :: InlinePragma -> RuleMatchInfo -> InlinePragma #

pprInline :: InlinePragma -> SDoc #

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

pprInlineDebug :: InlinePragma -> SDoc #

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

data UnfoldingSource #

Constructors

VanillaSrc |
StableUserSrc |
StableSystemSrc |
CompulsorySrc |

#### Instances

Instances details

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

isStableSource :: UnfoldingSource -> Bool #

isStableUserSource :: UnfoldingSource -> Bool #

isStableSystemSource :: UnfoldingSource -> Bool #

isCompulsorySource :: UnfoldingSource -> Bool #

data SuccessFlag #

Constructors

Succeeded |
Failed |

#### Instances

Instances details

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

succeeded :: SuccessFlag -> Bool #

failed :: SuccessFlag -> Bool #

successIf :: Bool -> SuccessFlag #

data IntWithInf #

An integer or infinity

#### Instances

Instances details

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

infinity :: IntWithInf #

A representation of infinity

treatZeroAsInf :: Int -> IntWithInf #

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

subWithInf :: IntWithInf -> Int -> IntWithInf #

Subtract an `Int` from an `IntWithInf`

mkIntWithInf :: Int -> IntWithInf #

Inject any integer into an `IntWithInf`

intGtLimit :: Int -> IntWithInf -> Bool #

data TypeOrKind #

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

Constructors

TypeLevel |
KindLevel |

#### Instances

Instances details

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

isTypeLevel :: TypeOrKind -> Bool #

isKindLevel :: TypeOrKind -> Bool #

data Levity #

Constructors

Lifted |
Unlifted |

#### Instances

Instances details

Data Levity # |

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 #

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

toConstr :: Levity -> Constr #

dataTypeOf :: Levity -> DataType #

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

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

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

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

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

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

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

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

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

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

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

mightBeLifted :: Maybe Levity -> Bool #

mightBeUnlifted :: Maybe Levity -> Bool #

data TypeOrConstraint #

Constructors

TypeLike |
ConstraintLike |

#### Instances

Instances details

Data TypeOrConstraint # |

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 #

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

toConstr :: TypeOrConstraint -> Constr #

dataTypeOf :: TypeOrConstraint -> DataType #

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

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

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

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

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

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

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

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

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

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

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

Instance details

Defined in GHC.Types.Basic

Methods

compare :: TypeOrConstraint -> TypeOrConstraint -> Ordering #

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

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

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

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

max :: TypeOrConstraint -> TypeOrConstraint -> TypeOrConstraint #

min :: TypeOrConstraint -> TypeOrConstraint -> TypeOrConstraint #

data TyConFlavour tc #

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

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

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

toConstr :: TyConFlavour tc -> Constr #

dataTypeOf :: TyConFlavour tc -> DataType #

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

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

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

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

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

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

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

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

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

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

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

data TypeOrData #

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

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 #

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

toConstr :: TypeOrData -> Constr #

dataTypeOf :: TypeOrData -> DataType #

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

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

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

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

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

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

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

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

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

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

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

tyConFlavourAssoc_maybe :: TyConFlavour tc -> Maybe tc #

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

data NonStandardDefaultingStrategy #

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 # |
Instance details Defined in GHC.Types.Basic Methods ppr :: NonStandardDefaultingStrategy -> SDoc #

data DefaultingStrategy #

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 # |
Instance details Defined in GHC.Types.Basic Methods ppr :: DefaultingStrategy -> SDoc #

defaultNonStandardTyVars :: DefaultingStrategy -> Bool #

data ForeignSrcLang #

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 # |
Instance details Defined in GHC.ForeignSrcLang Methods put :: ForeignSrcLang -> Put # get :: Get ForeignSrcLang # putList :: [ForeignSrcLang] -> Put #
Generic ForeignSrcLang # |

Instance details

Defined in GHC.ForeignSrcLang.Type

Associated Types

type Rep ForeignSrcLang |

Instance details

Defined in GHC.ForeignSrcLang.Type

type Rep ForeignSrcLang = D1 ('MetaData "ForeignSrcLang" "GHC.ForeignSrcLang.Type" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" '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 #

to :: Rep ForeignSrcLang x -> ForeignSrcLang #

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

Instance details

Defined in GHC.ForeignSrcLang.Type

type Rep ForeignSrcLang = D1 ('MetaData "ForeignSrcLang" "GHC.ForeignSrcLang.Type" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" '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 # |
Instance details Methods put_ :: BinHandle -> Boxity -> IO () # put :: BinHandle -> Boxity -> IO (Bin Boxity) # get :: BinHandle -> IO Boxity #
Binary PromotionFlag # |
Instance details Methods put_ :: BinHandle -> PromotionFlag -> IO () # put :: BinHandle -> PromotionFlag -> IO (Bin PromotionFlag) # get :: BinHandle -> IO PromotionFlag #
Outputable Boxity # |
Instance details Methods ppr :: Boxity -> SDoc #
Outputable PromotionFlag # |
Instance details Methods ppr :: PromotionFlag -> SDoc #