Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data RuleInfo = RuleInfo {}
- cLPat :: LPat (GhcPass p) -> LPat (GhcPass p)
- dLPat :: LPat (GhcPass p) -> Maybe (LPat (GhcPass p))
- dLPatUnsafe :: LPat (GhcPass p) -> LPat (GhcPass p)
- rdrFS :: RdrName -> FastString
- fsDot :: FastString
- varRdrName :: HsExpr p -> Maybe (LIdP p)
- tyvarRdrName :: HsType p -> Maybe (LIdP p)
- fixityDecls :: HsModule -> [(LocatedN RdrName, Fixity)]
- ruleInfo :: RuleDecl GhcPs -> [RuleInfo]
- ruleBindersToQs :: [LRuleBndr GhcPs] -> [RdrName]
- tyBindersToLocatedRdrNames :: [LHsTyVarBndr s GhcPs] -> [LocatedN RdrName]
- overlaps :: SrcSpan -> SrcSpan -> Bool
- within :: (Int, Int) -> RealSrcSpan -> Bool
- lineCount :: [SrcSpan] -> Int
- showRdrs :: [RdrName] -> String
- uniqBag :: Uniquable a => [(a, b)] -> UniqFM a [b]
- getRealLoc :: SrcLoc -> Maybe RealSrcLoc
- getRealSpan :: SrcSpan -> Maybe RealSrcSpan
- module GHC.Data.Bag
- module GHC.Data.FastString
- module GHC.Data.FastString.Env
- module GHC.Driver.Errors
- module GHC.Hs
- module GHC.Hs.Expr
- module GHC.Parser.Annotation
- module GHC.Parser.Errors.Ppr
- showSDoc :: DynFlags -> SDoc -> String
- data TypeOrKind
- data TupleSort
- data TopLevelFlag
- data TailCallInfo
- data SwapFlag
- data SuccessFlag
- data SpliceExplicitFlag
- type RuleName = FastString
- data RuleMatchInfo
- type RepArity = Int
- data RecFlag
- data PromotionFlag
- newtype PprPrec = PprPrec Int
- type PhaseNum = Int
- data OverlapMode
- data OverlapFlag = OverlapFlag {}
- data Origin
- data OneShotInfo
- data OccInfo
- = ManyOccs {
- occ_tail :: !TailCallInfo
- | IAmDead
- | OneOcc { }
- | IAmALoopBreaker {
- occ_rules_only :: !RulesOnly
- occ_tail :: !TailCallInfo
- = ManyOccs {
- data LeftOrRight
- type JoinArity = Int
- data InterestingCxt
- data IntWithInf
- data InsideLam
- data InlineSpec
- data InlinePragma = InlinePragma {}
- data FunctionOrData
- = IsFunction
- | IsData
- type FullArgCount = Int
- fromEP :: EP a -> a
- toEP :: EP a -> a
- data DefMethSpec ty
- type ConTagZ = Int
- type ConTag = Int
- data CompilerPhase
- type BranchCount = Int
- data Boxity
- type Arity = Int
- data Alignment
- data Activation
- zapOccTailCallInfo :: OccInfo -> OccInfo
- zapFragileOcc :: OccInfo -> OccInfo
- worstOneShot :: OneShotInfo -> OneShotInfo -> OneShotInfo
- weakLoopBreaker :: OccInfo
- unSwap :: SwapFlag -> (a -> a -> b) -> a -> a -> b
- tupleSortBoxity :: TupleSort -> Boxity
- tupleParens :: TupleSort -> SDoc -> SDoc
- treatZeroAsInf :: Int -> IntWithInf
- topPrec :: PprPrec
- tailCallInfo :: OccInfo -> TailCallInfo
- sumParens :: SDoc -> SDoc
- successIf :: Bool -> SuccessFlag
- succeeded :: SuccessFlag -> Bool
- strongLoopBreaker :: OccInfo
- starPrec :: PprPrec
- sigPrec :: PprPrec
- setOverlapModeMaybe :: OverlapFlag -> Maybe OverlapMode -> OverlapFlag
- setInlinePragmaRuleMatchInfo :: InlinePragma -> RuleMatchInfo -> InlinePragma
- setInlinePragmaActivation :: InlinePragma -> Activation -> InlinePragma
- seqOccInfo :: OccInfo -> ()
- pprRuleName :: RuleName -> SDoc
- pprInlineDebug :: InlinePragma -> SDoc
- pprInline :: InlinePragma -> SDoc
- pprAlternative :: (a -> SDoc) -> a -> ConTag -> Arity -> SDoc
- pickLR :: LeftOrRight -> (a, a) -> a
- opPrec :: PprPrec
- oneBranch :: BranchCount
- noUserInlineSpec :: InlineSpec -> Bool
- noOneShotInfo :: OneShotInfo
- noOccInfo :: OccInfo
- neverInlinePragma :: InlinePragma
- mkIntWithInf :: Int -> IntWithInf
- mkAlignment :: Int -> Alignment
- maybeParen :: PprPrec -> PprPrec -> SDoc -> SDoc
- isWeakLoopBreaker :: OccInfo -> Bool
- isTypeLevel :: TypeOrKind -> Bool
- isTopLevel :: TopLevelFlag -> Bool
- isSwapped :: SwapFlag -> Bool
- isStrongLoopBreaker :: OccInfo -> Bool
- isRec :: RecFlag -> Bool
- isPromoted :: PromotionFlag -> Bool
- isOneShotInfo :: OneShotInfo -> Bool
- isOneOcc :: OccInfo -> Bool
- isNotTopLevel :: TopLevelFlag -> Bool
- isNonRec :: RecFlag -> Bool
- isNoOccInfo :: OccInfo -> Bool
- isNeverActive :: Activation -> Bool
- isManyOccs :: OccInfo -> Bool
- isKindLevel :: TypeOrKind -> Bool
- isInlinePragma :: InlinePragma -> Bool
- isInlinablePragma :: InlinePragma -> Bool
- isGenerated :: Origin -> Bool
- isFunLike :: RuleMatchInfo -> Bool
- isDefaultInlinePragma :: InlinePragma -> Bool
- isDeadOcc :: OccInfo -> Bool
- isConLike :: RuleMatchInfo -> Bool
- isBoxed :: Boxity -> Bool
- isAnyInlinePragma :: InlinePragma -> Bool
- isAlwaysTailCalled :: OccInfo -> Bool
- isAlwaysActive :: Activation -> Bool
- isActive :: CompilerPhase -> Activation -> Bool
- intGtLimit :: Int -> IntWithInf -> Bool
- inlinePragmaSpec :: InlinePragma -> InlineSpec
- inlinePragmaSat :: InlinePragma -> Maybe Arity
- inlinePragmaRuleMatchInfo :: InlinePragma -> RuleMatchInfo
- inlinePragmaActivation :: InlinePragma -> Activation
- infinity :: IntWithInf
- hasOverlappingFlag :: OverlapMode -> Bool
- hasOverlappableFlag :: OverlapMode -> Bool
- hasNoOneShotInfo :: OneShotInfo -> Bool
- hasIncoherentFlag :: OverlapMode -> Bool
- funPrec :: PprPrec
- flipSwap :: SwapFlag -> SwapFlag
- failed :: SuccessFlag -> Bool
- fIRST_TAG :: ConTag
- dfunInlinePragma :: InlinePragma
- defaultInlinePragma :: InlinePragma
- competesWith :: Activation -> Activation -> Bool
- boxityTupleSort :: Boxity -> TupleSort
- boolToRecFlag :: Bool -> RecFlag
- bestOneShot :: OneShotInfo -> OneShotInfo -> OneShotInfo
- appPrec :: PprPrec
- alwaysInlinePragma :: InlinePragma
- alignmentOf :: Int -> Alignment
- activeInFinalPhase :: Activation -> Bool
- activateDuringFinal :: Activation
- activateAfterInitial :: Activation
- data ForeignSrcLang
- module GHC.Types.Error
- module GHC.Types.Fixity
- module GHC.Types.Name
- module GHC.Types.Name.Occurrence
- module GHC.Types.Name.Reader
- module GHC.Types.SourceText
- module GHC.Types.SrcLoc
- module GHC.Types.Unique
- module GHC.Types.Unique.FM
- module GHC.Types.Unique.Set
- module GHC.Unit.Module.Name
- class Outputable a where
Documentation
dLPat :: LPat (GhcPass p) -> Maybe (LPat (GhcPass p)) Source #
Only returns located pat if there is a genuine location available.
dLPatUnsafe :: LPat (GhcPass p) -> LPat (GhcPass p) Source #
Will always give a location, but it may be noSrcSpan.
rdrFS :: RdrName -> FastString Source #
fsDot :: FastString Source #
tyBindersToLocatedRdrNames :: [LHsTyVarBndr s GhcPs] -> [LocatedN RdrName] Source #
getRealLoc :: SrcLoc -> Maybe RealSrcLoc Source #
getRealSpan :: SrcSpan -> Maybe RealSrcSpan Source #
module GHC.Data.Bag
module GHC.Data.FastString
module GHC.Data.FastString.Env
module GHC.Driver.Errors
module GHC.Hs
module GHC.Hs.Expr
module GHC.Parser.Annotation
module GHC.Parser.Errors.Ppr
data TypeOrKind #
Flag to see whether we're type-checking terms or kind-checking types
Instances
Outputable TypeOrKind | |
Defined in GHC.Types.Basic ppr :: TypeOrKind -> SDoc # | |
Eq TypeOrKind | |
Defined in GHC.Types.Basic (==) :: TypeOrKind -> TypeOrKind -> Bool # (/=) :: TypeOrKind -> TypeOrKind -> Bool # |
Instances
Data TupleSort | |
Defined in GHC.Types.Basic 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 | |
Outputable TupleSort | |
Defined in GHC.Types.Basic | |
Eq TupleSort | |
data TopLevelFlag #
Instances
Data TopLevelFlag | |
Defined in GHC.Types.Basic 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 | |
Defined in GHC.Types.Basic ppr :: TopLevelFlag -> SDoc # |
data TailCallInfo #
Instances
Outputable TailCallInfo | |
Defined in GHC.Types.Basic ppr :: TailCallInfo -> SDoc # | |
Eq TailCallInfo | |
Defined in GHC.Types.Basic (==) :: TailCallInfo -> TailCallInfo -> Bool # (/=) :: TailCallInfo -> TailCallInfo -> Bool # |
Instances
Outputable SwapFlag | |
Defined in GHC.Types.Basic |
data SuccessFlag #
Instances
Outputable SuccessFlag | |
Defined in GHC.Types.Basic ppr :: SuccessFlag -> SDoc # |
data SpliceExplicitFlag #
ExplicitSplice | = $(f x y) |
ImplicitSplice | = f x y, i.e. a naked top level expression |
Instances
Data SpliceExplicitFlag | |
Defined in GHC.Types.Basic gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SpliceExplicitFlag -> c SpliceExplicitFlag # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SpliceExplicitFlag # toConstr :: SpliceExplicitFlag -> Constr # dataTypeOf :: SpliceExplicitFlag -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SpliceExplicitFlag) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SpliceExplicitFlag) # gmapT :: (forall b. Data b => b -> b) -> SpliceExplicitFlag -> SpliceExplicitFlag # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SpliceExplicitFlag -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SpliceExplicitFlag -> r # gmapQ :: (forall d. Data d => d -> u) -> SpliceExplicitFlag -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> SpliceExplicitFlag -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> SpliceExplicitFlag -> m SpliceExplicitFlag # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SpliceExplicitFlag -> m SpliceExplicitFlag # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SpliceExplicitFlag -> m SpliceExplicitFlag # |
type RuleName = FastString #
data RuleMatchInfo #
Rule Match Information
Instances
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
Recursivity Flag
Instances
Data RecFlag | |
Defined in GHC.Types.Basic 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 | |
Outputable RecFlag | |
Defined in GHC.Types.Basic | |
Eq RecFlag | |
data PromotionFlag #
Is a TyCon a promoted data constructor or just a normal type constructor?
Instances
Data PromotionFlag | |
Defined in GHC.Types.Basic 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 | |
Defined in GHC.Types.Basic put_ :: BinHandle -> PromotionFlag -> IO () # put :: BinHandle -> PromotionFlag -> IO (Bin PromotionFlag) # get :: BinHandle -> IO PromotionFlag # | |
Outputable PromotionFlag | |
Defined in GHC.Types.Basic ppr :: PromotionFlag -> SDoc # | |
Eq PromotionFlag | |
Defined in GHC.Types.Basic (==) :: PromotionFlag -> PromotionFlag -> Bool # (/=) :: PromotionFlag -> PromotionFlag -> Bool # |
data OverlapMode #
NoOverlap SourceText | This instance must not overlap another |
Overlappable SourceText | Silently ignore this instance if you find a more specific one that matches the constraint you are trying to resolve Example: constraint (Foo [Int]) instance Foo [Int] instance {-# 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 |
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 |
Instances
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
`#-}`
,
Instances
Data OverlapFlag | |
Defined in GHC.Types.Basic 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 | |
Defined in GHC.Types.Basic put_ :: BinHandle -> OverlapFlag -> IO () # put :: BinHandle -> OverlapFlag -> IO (Bin OverlapFlag) # get :: BinHandle -> IO OverlapFlag # | |
Outputable OverlapFlag | |
Defined in GHC.Types.Basic ppr :: OverlapFlag -> SDoc # | |
Eq OverlapFlag | |
Defined in GHC.Types.Basic (==) :: OverlapFlag -> OverlapFlag -> Bool # (/=) :: OverlapFlag -> OverlapFlag -> Bool # |
Instances
Data Origin | |
Defined in GHC.Types.Basic 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 | |
Defined in GHC.Types.Basic | |
Eq Origin | |
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.
NoOneShotInfo | No information |
OneShotLam | The lambda is applied at most once. |
Instances
Outputable OneShotInfo | |
Defined in GHC.Types.Basic ppr :: OneShotInfo -> SDoc # | |
Eq OneShotInfo | |
Defined in GHC.Types.Basic (==) :: OneShotInfo -> OneShotInfo -> Bool # (/=) :: OneShotInfo -> OneShotInfo -> Bool # |
identifier Occurrence Information
ManyOccs | There are many occurrences, or unknown occurrences |
| |
IAmDead | Marks unused variables. Sometimes useful for lambda and case-bound variables. |
OneOcc | Occurs exactly once (per branch), not inside a rule |
| |
IAmALoopBreaker | This identifier breaks a loop of mutually recursive functions. The field marks whether it is only a loop breaker due to a reference in a rule |
|
data LeftOrRight #
Instances
Data LeftOrRight | |
Defined in GHC.Types.Basic 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 | |
Defined in GHC.Types.Basic put_ :: BinHandle -> LeftOrRight -> IO () # put :: BinHandle -> LeftOrRight -> IO (Bin LeftOrRight) # get :: BinHandle -> IO LeftOrRight # | |
Outputable LeftOrRight | |
Defined in GHC.Types.Basic ppr :: LeftOrRight -> SDoc # | |
Eq LeftOrRight | |
Defined in GHC.Types.Basic (==) :: LeftOrRight -> LeftOrRight -> Bool # (/=) :: LeftOrRight -> LeftOrRight -> Bool # |
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.
data InterestingCxt #
Interesting Context
IsInteresting | Function: is applied Data value: scrutinised by a case with at least one non-DEFAULT branch |
NotInteresting |
Instances
Monoid InterestingCxt | |
Defined in GHC.Types.Basic mappend :: InterestingCxt -> InterestingCxt -> InterestingCxt # mconcat :: [InterestingCxt] -> InterestingCxt # | |
Semigroup InterestingCxt | If there is any |
Defined in GHC.Types.Basic (<>) :: InterestingCxt -> InterestingCxt -> InterestingCxt # sconcat :: NonEmpty InterestingCxt -> InterestingCxt # stimes :: Integral b => b -> InterestingCxt -> InterestingCxt # | |
Eq InterestingCxt | |
Defined in GHC.Types.Basic (==) :: InterestingCxt -> InterestingCxt -> Bool # (/=) :: InterestingCxt -> InterestingCxt -> Bool # |
data IntWithInf #
An integer or infinity
Instances
Num IntWithInf | |
Defined in GHC.Types.Basic (+) :: IntWithInf -> IntWithInf -> IntWithInf # (-) :: IntWithInf -> IntWithInf -> IntWithInf # (*) :: IntWithInf -> IntWithInf -> IntWithInf # negate :: IntWithInf -> IntWithInf # abs :: IntWithInf -> IntWithInf # signum :: IntWithInf -> IntWithInf # fromInteger :: Integer -> IntWithInf # | |
Outputable IntWithInf | |
Defined in GHC.Types.Basic ppr :: IntWithInf -> SDoc # | |
Eq IntWithInf | |
Defined in GHC.Types.Basic (==) :: IntWithInf -> IntWithInf -> Bool # (/=) :: IntWithInf -> IntWithInf -> Bool # | |
Ord IntWithInf | |
Defined in GHC.Types.Basic compare :: IntWithInf -> IntWithInf -> Ordering # (<) :: IntWithInf -> IntWithInf -> Bool # (<=) :: IntWithInf -> IntWithInf -> Bool # (>) :: IntWithInf -> IntWithInf -> Bool # (>=) :: IntWithInf -> IntWithInf -> Bool # max :: IntWithInf -> IntWithInf -> IntWithInf # min :: IntWithInf -> IntWithInf -> IntWithInf # |
Inside Lambda
IsInsideLam | Occurs inside a non-linear lambda Substituting a redex for this occurrence is dangerous because it might duplicate work. |
NotInsideLam |
data InlineSpec #
Inline Specification
Instances
Data InlineSpec | |
Defined in GHC.Types.Basic gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> InlineSpec -> c InlineSpec # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c InlineSpec # toConstr :: InlineSpec -> Constr # dataTypeOf :: InlineSpec -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c InlineSpec) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c InlineSpec) # gmapT :: (forall b. Data b => b -> b) -> InlineSpec -> InlineSpec # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> InlineSpec -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> InlineSpec -> r # gmapQ :: (forall d. Data d => d -> u) -> InlineSpec -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> InlineSpec -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> InlineSpec -> m InlineSpec # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> InlineSpec -> m InlineSpec # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> InlineSpec -> m InlineSpec # | |
Show InlineSpec | |
Defined in GHC.Types.Basic showsPrec :: Int -> InlineSpec -> ShowS # show :: InlineSpec -> String # showList :: [InlineSpec] -> ShowS # | |
Binary InlineSpec | |
Defined in GHC.Types.Basic put_ :: BinHandle -> InlineSpec -> IO () # put :: BinHandle -> InlineSpec -> IO (Bin InlineSpec) # get :: BinHandle -> IO InlineSpec # | |
Outputable InlineSpec | |
Defined in GHC.Types.Basic ppr :: InlineSpec -> SDoc # | |
Eq InlineSpec | |
Defined in GHC.Types.Basic (==) :: InlineSpec -> InlineSpec -> Bool # (/=) :: InlineSpec -> InlineSpec -> Bool # |
data InlinePragma #
InlinePragma | |
|
Instances
Data InlinePragma | |
Defined in GHC.Types.Basic 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 | |
Defined in GHC.Types.Basic put_ :: BinHandle -> InlinePragma -> IO () # put :: BinHandle -> InlinePragma -> IO (Bin InlinePragma) # get :: BinHandle -> IO InlinePragma # | |
Outputable InlinePragma | |
Defined in GHC.Types.Basic ppr :: InlinePragma -> SDoc # | |
Eq InlinePragma | |
Defined in GHC.Types.Basic (==) :: InlinePragma -> InlinePragma -> Bool # (/=) :: InlinePragma -> InlinePragma -> Bool # |
data FunctionOrData #
Instances
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 DefMethSpec ty #
Default Method Specification
Instances
Outputable (DefMethSpec ty) | |
Defined in GHC.Types.Basic ppr :: DefMethSpec ty -> SDoc # |
A *one-index* constructor tag
Type of the tags associated with each constructor possibility or superclass selector
data CompilerPhase #
Instances
Outputable CompilerPhase | |
Defined in GHC.Types.Basic ppr :: CompilerPhase -> SDoc # | |
Eq CompilerPhase | |
Defined in GHC.Types.Basic (==) :: CompilerPhase -> CompilerPhase -> Bool # (/=) :: CompilerPhase -> CompilerPhase -> Bool # |
type BranchCount = Int #
Instances
Data Boxity | |
Defined in GHC.Types.Basic gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Boxity -> c Boxity # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Boxity # toConstr :: Boxity -> Constr # dataTypeOf :: Boxity -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Boxity) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Boxity) # gmapT :: (forall b. Data b => b -> b) -> Boxity -> Boxity # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Boxity -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Boxity -> r # gmapQ :: (forall d. Data d => d -> u) -> Boxity -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Boxity -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Boxity -> m Boxity # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Boxity -> m Boxity # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Boxity -> m Boxity # | |
Outputable Boxity | |
Defined in GHC.Types.Basic | |
Eq Boxity | |
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
A power-of-two alignment
Instances
Outputable Alignment | |
Defined in GHC.Types.Basic | |
Eq Alignment | |
Ord Alignment | |
Defined in GHC.Types.Basic | |
OutputableP env Alignment | |
Defined in GHC.Types.Basic |
data Activation #
AlwaysActive | |
ActiveBefore SourceText PhaseNum | |
ActiveAfter SourceText PhaseNum | |
FinalActive | |
NeverActive |
Instances
Data Activation | |
Defined in GHC.Types.Basic 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 | |
Defined in GHC.Types.Basic put_ :: BinHandle -> Activation -> IO () # put :: BinHandle -> Activation -> IO (Bin Activation) # get :: BinHandle -> IO Activation # | |
Outputable Activation | |
Defined in GHC.Types.Basic ppr :: Activation -> SDoc # | |
Eq Activation | |
Defined in GHC.Types.Basic (==) :: Activation -> Activation -> Bool # (/=) :: Activation -> Activation -> Bool # |
zapOccTailCallInfo :: OccInfo -> OccInfo #
zapFragileOcc :: OccInfo -> OccInfo #
worstOneShot :: OneShotInfo -> OneShotInfo -> OneShotInfo #
tupleSortBoxity :: TupleSort -> Boxity #
tupleParens :: TupleSort -> SDoc -> SDoc #
treatZeroAsInf :: Int -> IntWithInf #
Turn a positive number into an IntWithInf
, where 0 represents infinity
tailCallInfo :: OccInfo -> TailCallInfo #
successIf :: Bool -> SuccessFlag #
succeeded :: SuccessFlag -> Bool #
seqOccInfo :: OccInfo -> () #
pprRuleName :: RuleName -> SDoc #
pprInlineDebug :: InlinePragma -> SDoc #
pprInline :: InlinePragma -> SDoc #
:: (a -> SDoc) | The pretty printing function to use |
-> a | The things to be pretty printed |
-> ConTag | Alternative (one-based) |
-> Arity | Arity |
-> SDoc |
|
Pretty print an alternative in an unboxed sum e.g. "| a | |".
pickLR :: LeftOrRight -> (a, a) -> a #
noUserInlineSpec :: InlineSpec -> Bool #
noOneShotInfo :: OneShotInfo #
It is always safe to assume that an Id
has no lambda-bound variable information
mkIntWithInf :: Int -> IntWithInf #
Inject any integer into an IntWithInf
mkAlignment :: Int -> Alignment #
isWeakLoopBreaker :: OccInfo -> Bool #
isTypeLevel :: TypeOrKind -> Bool #
isTopLevel :: TopLevelFlag -> Bool #
isStrongLoopBreaker :: OccInfo -> Bool #
isPromoted :: PromotionFlag -> Bool #
isOneShotInfo :: OneShotInfo -> Bool #
isNotTopLevel :: TopLevelFlag -> Bool #
isNoOccInfo :: OccInfo -> Bool #
isNeverActive :: Activation -> Bool #
isManyOccs :: OccInfo -> Bool #
isKindLevel :: TypeOrKind -> Bool #
isInlinePragma :: InlinePragma -> Bool #
isInlinablePragma :: InlinePragma -> Bool #
isGenerated :: Origin -> Bool #
isFunLike :: RuleMatchInfo -> Bool #
isConLike :: RuleMatchInfo -> Bool #
isAnyInlinePragma :: InlinePragma -> Bool #
isAlwaysTailCalled :: OccInfo -> Bool #
isAlwaysActive :: Activation -> Bool #
isActive :: CompilerPhase -> Activation -> Bool #
intGtLimit :: Int -> IntWithInf -> Bool #
inlinePragmaSat :: InlinePragma -> Maybe Arity #
infinity :: IntWithInf #
A representation of infinity
hasOverlappingFlag :: OverlapMode -> Bool #
hasOverlappableFlag :: OverlapMode -> Bool #
hasNoOneShotInfo :: OneShotInfo -> Bool #
hasIncoherentFlag :: OverlapMode -> Bool #
failed :: SuccessFlag -> Bool #
competesWith :: Activation -> Activation -> Bool #
boxityTupleSort :: Boxity -> TupleSort #
boolToRecFlag :: Bool -> RecFlag #
bestOneShot :: OneShotInfo -> OneShotInfo -> OneShotInfo #
alignmentOf :: Int -> Alignment #
activeInFinalPhase :: Activation -> Bool #
data ForeignSrcLang #
Foreign formats supported by GHC via TH
LangC | C |
LangCxx | C++ |
LangObjc | Objective C |
LangObjcxx | Objective C++ |
LangAsm | Assembly language (.s) |
RawObject | Object (.o) |
Instances
module GHC.Types.Error
module GHC.Types.Fixity
module GHC.Types.Name
module GHC.Types.Name.Occurrence
module GHC.Types.Name.Reader
module GHC.Types.SourceText
module GHC.Types.SrcLoc
module GHC.Types.Unique
module GHC.Types.Unique.FM
module GHC.Types.Unique.Set
module GHC.Unit.Module.Name
class Outputable a where #
Class designating that some type has an SDoc
representation