ghc-8.2.2: The GHC API

Safe Haskell | None
Language | Haskell2010

BasicTypes

Contents

- The OneShotInfo type

Synopsis

- type Version = Int
- bumpVersion :: Version -> Version
- initialVersion :: Version
- data LeftOrRight
  - = CLeft
  - | CRight
- pickLR :: LeftOrRight -> (a, a) -> a
- type ConTag = Int
- type ConTagZ = Int
- fIRST_TAG :: ConTag
- type Arity = Int
- type RepArity = Int
- type JoinArity = Int
- type Alignment = Int
- data FunctionOrData
  - = IsFunction
  - | IsData
- data WarningTxt
  - = WarningTxt (Located SourceText) [Located StringLiteral]
  - | DeprecatedTxt (Located SourceText) [Located StringLiteral]
- pprWarningTxtForMsg :: WarningTxt -> SDoc
- data StringLiteral = StringLiteral {
  - sl_st :: SourceText
  - sl_fs :: FastString
  }
- data Fixity = Fixity SourceText Int FixityDirection
- data FixityDirection
  - = InfixL
  - | InfixR
  - | InfixN
- defaultFixity :: Fixity
- maxPrecedence :: Int
- minPrecedence :: Int
- negateFixity :: Fixity
- funTyFixity :: Fixity
- compareFixity :: Fixity -> Fixity -> (Bool, Bool)
- data LexicalFixity
  - = Prefix
  - | Infix
- data RecFlag
  - = Recursive
  - | NonRecursive
- isRec :: RecFlag -> Bool
- isNonRec :: RecFlag -> Bool
- boolToRecFlag :: Bool -> RecFlag
- data Origin
  - = FromSource
  - | Generated
- isGenerated :: Origin -> Bool
- type RuleName = FastString
- pprRuleName :: RuleName -> SDoc
- data TopLevelFlag
  - = TopLevel
  - | NotTopLevel
- isTopLevel :: TopLevelFlag -> Bool
- isNotTopLevel :: TopLevelFlag -> Bool
- data DerivStrategy
  - = StockStrategy
  - | AnyclassStrategy
  - | NewtypeStrategy
- data OverlapFlag = OverlapFlag {
  - overlapMode :: OverlapMode
  - isSafeOverlap :: Bool
  }
- data OverlapMode
  - = NoOverlap SourceText
  - | Overlappable SourceText
  - | Overlapping SourceText
  - | Overlaps SourceText
  - | Incoherent SourceText
- setOverlapModeMaybe :: OverlapFlag -> Maybe OverlapMode -> OverlapFlag
- hasOverlappingFlag :: OverlapMode -> Bool
- hasOverlappableFlag :: OverlapMode -> Bool
- hasIncoherentFlag :: OverlapMode -> Bool
- data Boxity
  - = Boxed
  - | Unboxed
- isBoxed :: Boxity -> Bool
- data TyPrec
  - = TopPrec
  - | FunPrec
  - | TyOpPrec
  - | TyConPrec
- maybeParen :: TyPrec -> TyPrec -> SDoc -> SDoc
- data TupleSort
  - = BoxedTuple
  - | UnboxedTuple
  - | ConstraintTuple
- tupleSortBoxity :: TupleSort -> Boxity
- boxityTupleSort :: Boxity -> TupleSort
- tupleParens :: TupleSort -> SDoc -> SDoc
- 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_one_br :: !OneBranch
    - 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
- strongLoopBreaker :: OccInfo
- weakLoopBreaker :: OccInfo
- type InsideLam = Bool
- insideLam :: InsideLam
- notInsideLam :: InsideLam
- type OneBranch = Bool
- oneBranch :: OneBranch
- notOneBranch :: OneBranch
- type InterestingCxt = Bool
- 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
  - = Phase PhaseNum
  - | InitialPhase
- type PhaseNum = Int
- data Activation
  - = NeverActive
  - | AlwaysActive
  - | ActiveBefore SourceText PhaseNum
  - | ActiveAfter SourceText PhaseNum
- isActive :: CompilerPhase -> Activation -> Bool
- isActiveIn :: PhaseNum -> Activation -> Bool
- competesWith :: Activation -> Activation -> Bool
- isNeverActive :: Activation -> Bool
- isAlwaysActive :: Activation -> Bool
- isEarlyActive :: Activation -> Bool
- data RuleMatchInfo
  - = ConLike
  - | FunLike
- isConLike :: RuleMatchInfo -> Bool
- isFunLike :: RuleMatchInfo -> Bool
- data InlineSpec
  - = Inline
  - | Inlinable
  - | NoInline
  - | EmptyInlineSpec
- isEmptyInlineSpec :: 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
- isAnyInlinePragma :: InlinePragma -> Bool
- 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 SuccessFlag
  - = Succeeded
  - | Failed
- succeeded :: SuccessFlag -> Bool
- failed :: SuccessFlag -> Bool
- successIf :: Bool -> SuccessFlag
- data FractionalLit = FL {
  - fl_text :: String
  - fl_value :: Rational
  }
- negateFractionalLit :: FractionalLit -> FractionalLit
- integralFractionalLit :: Integer -> FractionalLit
- data SourceText
  - = SourceText String
  - | NoSourceText
- pprWithSourceText :: SourceText -> SDoc -> SDoc
- data IntWithInf
- infinity :: IntWithInf
- treatZeroAsInf :: Int -> IntWithInf
- mkIntWithInf :: Int -> IntWithInf
- intGtLimit :: Int -> IntWithInf -> Bool
- data SpliceExplicitFlag
  - = ExplicitSplice
  - | ImplicitSplice

# Documentation

type Version = Int #

bumpVersion :: Version -> Version #

initialVersion :: Version #

data LeftOrRight #

Constructors

CLeft |
CRight |

Instances

Eq LeftOrRight # |
Methods (==) :: LeftOrRight -> LeftOrRight -> Bool # (/=) :: LeftOrRight -> LeftOrRight -> Bool #
Data LeftOrRight # |

Methods

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

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

toConstr :: LeftOrRight -> Constr Source #

dataTypeOf :: LeftOrRight -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Outputable LeftOrRight # |
Methods ppr :: LeftOrRight -> SDoc # pprPrec :: Rational -> LeftOrRight -> SDoc #
Binary LeftOrRight # |
Methods put_ :: BinHandle -> LeftOrRight -> IO () # put :: BinHandle -> LeftOrRight -> IO (Bin * LeftOrRight) # get :: BinHandle -> IO LeftOrRight #

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

type ConTag = Int #

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 CoreArity

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 () -> 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 Alignment = Int #

data FunctionOrData #

Constructors

IsFunction |
IsData |

Instances

Eq FunctionOrData # |
Methods (==) :: FunctionOrData -> FunctionOrData -> Bool # (/=) :: FunctionOrData -> FunctionOrData -> Bool #
Data FunctionOrData # |

Methods

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

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

toConstr :: FunctionOrData -> Constr Source #

dataTypeOf :: FunctionOrData -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Ord FunctionOrData # |
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 #
Outputable FunctionOrData # |
Methods ppr :: FunctionOrData -> SDoc # pprPrec :: Rational -> FunctionOrData -> SDoc #
Binary FunctionOrData # |
Methods put_ :: BinHandle -> FunctionOrData -> IO () # put :: BinHandle -> FunctionOrData -> IO (Bin * FunctionOrData) # get :: BinHandle -> IO FunctionOrData #

data WarningTxt #

Warning Text

reason/explanation from a WARNING or DEPRECATED pragma

Constructors

WarningTxt (Located SourceText) [Located StringLiteral] |
DeprecatedTxt (Located SourceText) [Located StringLiteral] |

Instances

Eq WarningTxt # |
Methods (==) :: WarningTxt -> WarningTxt -> Bool # (/=) :: WarningTxt -> WarningTxt -> Bool #
Data WarningTxt # |

Methods

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

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

toConstr :: WarningTxt -> Constr Source #

dataTypeOf :: WarningTxt -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Outputable WarningTxt # |
Methods ppr :: WarningTxt -> SDoc # pprPrec :: Rational -> WarningTxt -> SDoc #
Binary WarningTxt # |
Methods put_ :: BinHandle -> WarningTxt -> IO () # put :: BinHandle -> WarningTxt -> IO (Bin * WarningTxt) # get :: BinHandle -> IO WarningTxt #

pprWarningTxtForMsg :: WarningTxt -> SDoc #

data StringLiteral #

A String Literal in the source, including its original raw format for use by source to source manipulation tools.

Constructors

StringLiteral |

Fields

- sl_st :: SourceText
- sl_fs :: FastString

Instances

Eq StringLiteral # |
Methods (==) :: StringLiteral -> StringLiteral -> Bool # (/=) :: StringLiteral -> StringLiteral -> Bool #
Data StringLiteral # |

Methods

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

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

toConstr :: StringLiteral -> Constr Source #

dataTypeOf :: StringLiteral -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Outputable StringLiteral # |
Methods ppr :: StringLiteral -> SDoc # pprPrec :: Rational -> StringLiteral -> SDoc #
Binary StringLiteral # |
Methods put_ :: BinHandle -> StringLiteral -> IO () # put :: BinHandle -> StringLiteral -> IO (Bin * StringLiteral) # get :: BinHandle -> IO StringLiteral #

data Fixity #

Constructors

Fixity SourceText Int FixityDirection |

Instances

Eq Fixity # |
Methods (==) :: Fixity -> Fixity -> Bool # (/=) :: Fixity -> Fixity -> Bool #
Data Fixity # |

Methods

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

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

toConstr :: Fixity -> Constr Source #

dataTypeOf :: Fixity -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Outputable Fixity # |
Methods ppr :: Fixity -> SDoc # pprPrec :: Rational -> Fixity -> SDoc #
Binary Fixity # |
Methods put_ :: BinHandle -> Fixity -> IO () # put :: BinHandle -> Fixity -> IO (Bin * Fixity) # get :: BinHandle -> IO Fixity #

data FixityDirection #

Constructors

InfixL |
InfixR |
InfixN |

Instances

Eq FixityDirection # |
Methods (==) :: FixityDirection -> FixityDirection -> Bool # (/=) :: FixityDirection -> FixityDirection -> Bool #
Data FixityDirection # |

Methods

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

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

toConstr :: FixityDirection -> Constr Source #

dataTypeOf :: FixityDirection -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Outputable FixityDirection # |
Methods ppr :: FixityDirection -> SDoc # pprPrec :: Rational -> FixityDirection -> SDoc #
Binary FixityDirection # |
Methods put_ :: BinHandle -> FixityDirection -> IO () # put :: BinHandle -> FixityDirection -> IO (Bin * FixityDirection) # get :: BinHandle -> IO FixityDirection #

defaultFixity :: Fixity #

maxPrecedence :: Int #

minPrecedence :: Int #

negateFixity :: Fixity #

funTyFixity :: Fixity #

compareFixity :: Fixity -> Fixity -> (Bool, Bool) #

data LexicalFixity #

Captures the fixity of declarations as they are parsed. This is not necessarily the same as the fixity declaration, as the normal fixity may be overridden using parens or backticks.

Constructors

Prefix |
Infix |

Instances

Eq LexicalFixity # |
Methods (==) :: LexicalFixity -> LexicalFixity -> Bool # (/=) :: LexicalFixity -> LexicalFixity -> Bool #
Data LexicalFixity # |

Methods

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

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

toConstr :: LexicalFixity -> Constr Source #

dataTypeOf :: LexicalFixity -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Outputable LexicalFixity # |
Methods ppr :: LexicalFixity -> SDoc # pprPrec :: Rational -> LexicalFixity -> SDoc #

data RecFlag #

Recursivity Flag

Constructors

Recursive |
NonRecursive |

Instances

Eq RecFlag # |
Methods (==) :: RecFlag -> RecFlag -> Bool # (/=) :: RecFlag -> RecFlag -> Bool #
Data RecFlag # |

Methods

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

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

toConstr :: RecFlag -> Constr Source #

dataTypeOf :: RecFlag -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Outputable RecFlag # |
Methods ppr :: RecFlag -> SDoc # pprPrec :: Rational -> RecFlag -> SDoc #
Binary RecFlag # |
Methods put_ :: BinHandle -> RecFlag -> IO () # put :: BinHandle -> RecFlag -> IO (Bin * RecFlag) # get :: BinHandle -> IO RecFlag #

isRec :: RecFlag -> Bool #

isNonRec :: RecFlag -> Bool #

boolToRecFlag :: Bool -> RecFlag #

data Origin #

Constructors

FromSource |
Generated |

Instances

Eq Origin # |
Methods (==) :: Origin -> Origin -> Bool # (/=) :: Origin -> Origin -> Bool #
Data Origin # |

Methods

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

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

toConstr :: Origin -> Constr Source #

dataTypeOf :: Origin -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Outputable Origin # |
Methods ppr :: Origin -> SDoc # pprPrec :: Rational -> Origin -> SDoc #

isGenerated :: Origin -> Bool #

type RuleName = FastString #

pprRuleName :: RuleName -> SDoc #

data TopLevelFlag #

Constructors

TopLevel |
NotTopLevel |

Instances

Outputable TopLevelFlag # |
Methods ppr :: TopLevelFlag -> SDoc # pprPrec :: Rational -> TopLevelFlag -> SDoc #

isTopLevel :: TopLevelFlag -> Bool #

isNotTopLevel :: TopLevelFlag -> Bool #

data DerivStrategy #

Which technique the user explicitly requested when deriving an instance.

Constructors

StockStrategy | GHC's "standard" strategy, which is to implement a custom instance for the data type. This only works for certain types that GHC knows about (e.g., `Eq`, `Show`, `Functor` when `-XDeriveFunctor` is enabled, etc.)

AnyclassStrategy

    -XDeriveAnyClass

NewtypeStrategy

    -XGeneralizedNewtypeDeriving

Instances

Eq DerivStrategy # |
Methods (==) :: DerivStrategy -> DerivStrategy -> Bool # (/=) :: DerivStrategy -> DerivStrategy -> Bool #
Data DerivStrategy # |

Methods

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

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

toConstr :: DerivStrategy -> Constr Source #

dataTypeOf :: DerivStrategy -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Outputable DerivStrategy # |
Methods ppr :: DerivStrategy -> SDoc # pprPrec :: Rational -> DerivStrategy -> SDoc #

data OverlapFlag #

The semantics allowed for overlapping instances for a particular instance. See Note [Safe Haskell isSafeOverlap] (in `hs`) 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

Eq OverlapFlag # |
Methods (==) :: OverlapFlag -> OverlapFlag -> Bool # (/=) :: OverlapFlag -> OverlapFlag -> Bool #
Data OverlapFlag # |

Methods

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

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

toConstr :: OverlapFlag -> Constr Source #

dataTypeOf :: OverlapFlag -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Outputable OverlapFlag # |
Methods ppr :: OverlapFlag -> SDoc # pprPrec :: Rational -> OverlapFlag -> SDoc #
Binary OverlapFlag # |
Methods put_ :: BinHandle -> OverlapFlag -> IO () # put :: BinHandle -> OverlapFlag -> IO (Bin * OverlapFlag) # get :: BinHandle -> IO OverlapFlag #

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 {--} 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 {--} 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 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 InstEnv

Instances

Eq OverlapMode # |
Methods (==) :: OverlapMode -> OverlapMode -> Bool # (/=) :: OverlapMode -> OverlapMode -> Bool #
Data OverlapMode # |

Methods

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

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

toConstr :: OverlapMode -> Constr Source #

dataTypeOf :: OverlapMode -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Outputable OverlapMode # |
Methods ppr :: OverlapMode -> SDoc # pprPrec :: Rational -> OverlapMode -> SDoc #
Binary OverlapMode # |
Methods put_ :: BinHandle -> OverlapMode -> IO () # put :: BinHandle -> OverlapMode -> IO (Bin * OverlapMode) # get :: BinHandle -> IO OverlapMode #

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

hasOverlappingFlag :: OverlapMode -> Bool #

hasOverlappableFlag :: OverlapMode -> Bool #

hasIncoherentFlag :: OverlapMode -> Bool #

data Boxity #

Constructors

Boxed |
Unboxed |

Instances

Eq Boxity # |
Methods (==) :: Boxity -> Boxity -> Bool # (/=) :: Boxity -> Boxity -> Bool #
Data Boxity # |

Methods

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

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

toConstr :: Boxity -> Constr Source #

dataTypeOf :: Boxity -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Outputable Boxity # |
Methods ppr :: Boxity -> SDoc # pprPrec :: Rational -> Boxity -> SDoc #

isBoxed :: Boxity -> Bool #

data TyPrec #

Constructors

TopPrec |
FunPrec |
TyOpPrec |
TyConPrec |

Instances

Eq TyPrec # |
Methods (==) :: TyPrec -> TyPrec -> Bool # (/=) :: TyPrec -> TyPrec -> Bool #
Ord TyPrec # |
Methods compare :: TyPrec -> TyPrec -> Ordering # (<) :: TyPrec -> TyPrec -> Bool # (<=) :: TyPrec -> TyPrec -> Bool # (>) :: TyPrec -> TyPrec -> Bool # (>=) :: TyPrec -> TyPrec -> Bool # max :: TyPrec -> TyPrec -> TyPrec # min :: TyPrec -> TyPrec -> TyPrec #

maybeParen :: TyPrec -> TyPrec -> SDoc -> SDoc #

data TupleSort #

Constructors

BoxedTuple |
UnboxedTuple |
ConstraintTuple |

Instances

Eq TupleSort # |
Methods (==) :: TupleSort -> TupleSort -> Bool # (/=) :: TupleSort -> TupleSort -> Bool #
Data TupleSort # |

Methods

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

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

toConstr :: TupleSort -> Constr Source #

dataTypeOf :: TupleSort -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Binary TupleSort # |
Methods put_ :: BinHandle -> TupleSort -> IO () # put :: BinHandle -> TupleSort -> IO (Bin * TupleSort) # get :: BinHandle -> IO TupleSort #

tupleSortBoxity :: TupleSort -> Boxity #

boxityTupleSort :: Boxity -> TupleSort #

tupleParens :: TupleSort -> SDoc -> SDoc #

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.

Constructors

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

Instances

Eq OneShotInfo # |
Methods (==) :: OneShotInfo -> OneShotInfo -> Bool # (/=) :: OneShotInfo -> OneShotInfo -> Bool #
Outputable OneShotInfo # |
Methods ppr :: OneShotInfo -> SDoc # pprPrec :: Rational -> OneShotInfo -> SDoc #

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_one_br :: !OneBranch
- 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

Eq OccInfo # |
Methods (==) :: OccInfo -> OccInfo -> Bool # (/=) :: OccInfo -> OccInfo -> Bool #
Outputable OccInfo # |
Methods ppr :: OccInfo -> SDoc # pprPrec :: Rational -> OccInfo -> SDoc #

noOccInfo :: OccInfo #

seqOccInfo :: OccInfo -> () #

zapFragileOcc :: OccInfo -> OccInfo #

isOneOcc :: OccInfo -> Bool #

isDeadOcc :: OccInfo -> Bool #

isStrongLoopBreaker :: OccInfo -> Bool #

isWeakLoopBreaker :: OccInfo -> Bool #

isManyOccs :: OccInfo -> Bool #

strongLoopBreaker :: OccInfo #

weakLoopBreaker :: OccInfo #

type InsideLam = Bool #

Inside Lambda

insideLam :: InsideLam #

notInsideLam :: InsideLam #

type OneBranch = Bool #

oneBranch :: OneBranch #

notOneBranch :: OneBranch #

type InterestingCxt = Bool #

Interesting Context

data TailCallInfo #

Constructors

AlwaysTailCalled JoinArity |
NoTailCallInfo |

Instances

Eq TailCallInfo # |
Methods (==) :: TailCallInfo -> TailCallInfo -> Bool # (/=) :: TailCallInfo -> TailCallInfo -> Bool #
Outputable TailCallInfo # |
Methods ppr :: TailCallInfo -> SDoc # pprPrec :: Rational -> TailCallInfo -> SDoc #

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

Outputable (DefMethSpec ty) # |
Methods ppr :: DefMethSpec ty -> SDoc # pprPrec :: Rational -> DefMethSpec ty -> SDoc #
Binary (DefMethSpec IfaceType) # |
Methods put_ :: BinHandle -> DefMethSpec IfaceType -> IO () # put :: BinHandle -> DefMethSpec IfaceType -> IO (Bin * (DefMethSpec IfaceType)) # get :: BinHandle -> IO (DefMethSpec IfaceType) #

data SwapFlag #

Constructors

NotSwapped |
IsSwapped |

Instances

Outputable SwapFlag # |
Methods ppr :: SwapFlag -> SDoc # pprPrec :: Rational -> SwapFlag -> SDoc #

flipSwap :: SwapFlag -> SwapFlag #

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

isSwapped :: SwapFlag -> Bool #

data CompilerPhase #

Constructors

Phase PhaseNum |
InitialPhase |

Instances

Outputable CompilerPhase # |
Methods ppr :: CompilerPhase -> SDoc # pprPrec :: Rational -> CompilerPhase -> SDoc #

type PhaseNum = Int #

Phase Number

data Activation #

Constructors

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

Instances

Eq Activation # |
Methods (==) :: Activation -> Activation -> Bool # (/=) :: Activation -> Activation -> Bool #
Data Activation # |

Methods

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

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

toConstr :: Activation -> Constr Source #

dataTypeOf :: Activation -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Outputable Activation # |
Methods ppr :: Activation -> SDoc # pprPrec :: Rational -> Activation -> SDoc #
Binary Activation # |
Methods put_ :: BinHandle -> Activation -> IO () # put :: BinHandle -> Activation -> IO (Bin * Activation) # get :: BinHandle -> IO Activation #

isActive :: CompilerPhase -> Activation -> Bool #

isActiveIn :: PhaseNum -> Activation -> Bool #

competesWith :: Activation -> Activation -> Bool #

isNeverActive :: Activation -> Bool #

isAlwaysActive :: Activation -> Bool #

isEarlyActive :: Activation -> Bool #

data RuleMatchInfo #

Rule Match Information

Constructors

ConLike |
FunLike |

Instances

Eq RuleMatchInfo # |
Methods (==) :: RuleMatchInfo -> RuleMatchInfo -> Bool # (/=) :: RuleMatchInfo -> RuleMatchInfo -> Bool #
Data RuleMatchInfo # |

Methods

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

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

toConstr :: RuleMatchInfo -> Constr Source #

dataTypeOf :: RuleMatchInfo -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Show RuleMatchInfo # |
Methods showsPrec :: Int -> RuleMatchInfo -> ShowS Source # show :: RuleMatchInfo -> String Source # showList :: [RuleMatchInfo] -> ShowS Source #
Outputable RuleMatchInfo # |
Methods ppr :: RuleMatchInfo -> SDoc # pprPrec :: Rational -> RuleMatchInfo -> SDoc #
Binary RuleMatchInfo # |
Methods put_ :: BinHandle -> RuleMatchInfo -> IO () # put :: BinHandle -> RuleMatchInfo -> IO (Bin * RuleMatchInfo) # get :: BinHandle -> IO RuleMatchInfo #

isConLike :: RuleMatchInfo -> Bool #

isFunLike :: RuleMatchInfo -> Bool #

data InlineSpec #

Inline Specification

Constructors

Inline |
Inlinable |
NoInline |
EmptyInlineSpec |

Instances

Eq InlineSpec # |
Methods (==) :: InlineSpec -> InlineSpec -> Bool # (/=) :: InlineSpec -> InlineSpec -> Bool #
Data InlineSpec # |

Methods

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

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

toConstr :: InlineSpec -> Constr Source #

dataTypeOf :: InlineSpec -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Show InlineSpec # |
Methods showsPrec :: Int -> InlineSpec -> ShowS Source # show :: InlineSpec -> String Source # showList :: [InlineSpec] -> ShowS Source #
Outputable InlineSpec # |
Methods ppr :: InlineSpec -> SDoc # pprPrec :: Rational -> InlineSpec -> SDoc #
Binary InlineSpec # |
Methods put_ :: BinHandle -> InlineSpec -> IO () # put :: BinHandle -> InlineSpec -> IO (Bin * InlineSpec) # get :: BinHandle -> IO InlineSpec #

isEmptyInlineSpec :: InlineSpec -> Bool #

data InlinePragma #

Constructors

InlinePragma |

Fields

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

Instances

Eq InlinePragma # |
Methods (==) :: InlinePragma -> InlinePragma -> Bool # (/=) :: InlinePragma -> InlinePragma -> Bool #
Data InlinePragma # |

Methods

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

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

toConstr :: InlinePragma -> Constr Source #

dataTypeOf :: InlinePragma -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Outputable InlinePragma # |
Methods ppr :: InlinePragma -> SDoc # pprPrec :: Rational -> InlinePragma -> SDoc #
Binary InlinePragma # |
Methods put_ :: BinHandle -> InlinePragma -> IO () # put :: BinHandle -> InlinePragma -> IO (Bin * InlinePragma) # get :: BinHandle -> IO InlinePragma #

defaultInlinePragma :: InlinePragma #

alwaysInlinePragma :: InlinePragma #

neverInlinePragma :: InlinePragma #

dfunInlinePragma :: InlinePragma #

isDefaultInlinePragma :: InlinePragma -> Bool #

isInlinePragma :: InlinePragma -> Bool #

isInlinablePragma :: InlinePragma -> Bool #

isAnyInlinePragma :: InlinePragma -> Bool #

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

Constructors

Succeeded |
Failed |

Instances

Outputable SuccessFlag # |
Methods ppr :: SuccessFlag -> SDoc # pprPrec :: Rational -> SuccessFlag -> SDoc #

succeeded :: SuccessFlag -> Bool #

failed :: SuccessFlag -> Bool #

successIf :: Bool -> SuccessFlag #

data FractionalLit #

Fractional Literal

Used (instead of Rational) to represent exactly the floating point literal that we encountered in the user's source program. This allows us to pretty-print exactly what the user wrote, which is important e.g. for floating point numbers that can't represented as Doubles (we used to via Double for pretty-printing). See also #2245.

Constructors

FL |

Fields

- fl_text :: String
- fl_value :: Rational

Instances

Eq FractionalLit # |
Methods (==) :: FractionalLit -> FractionalLit -> Bool # (/=) :: FractionalLit -> FractionalLit -> Bool #
Data FractionalLit # |

Methods

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

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

toConstr :: FractionalLit -> Constr Source #

dataTypeOf :: FractionalLit -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Ord FractionalLit # |
Methods compare :: FractionalLit -> FractionalLit -> Ordering # (<) :: FractionalLit -> FractionalLit -> Bool # (<=) :: FractionalLit -> FractionalLit -> Bool # (>) :: FractionalLit -> FractionalLit -> Bool # (>=) :: FractionalLit -> FractionalLit -> Bool # max :: FractionalLit -> FractionalLit -> FractionalLit # min :: FractionalLit -> FractionalLit -> FractionalLit #
Show FractionalLit # |
Methods showsPrec :: Int -> FractionalLit -> ShowS Source # show :: FractionalLit -> String Source # showList :: [FractionalLit] -> ShowS Source #
Outputable FractionalLit # |
Methods ppr :: FractionalLit -> SDoc # pprPrec :: Rational -> FractionalLit -> SDoc #

negateFractionalLit :: FractionalLit -> FractionalLit #

integralFractionalLit :: Integer -> FractionalLit #

data SourceText #

Constructors

SourceText String |
NoSourceText | For when code is generated, e.g. TH, deriving. The pretty printer will then make its own representation of the item.

Instances

Eq SourceText # |
Methods (==) :: SourceText -> SourceText -> Bool # (/=) :: SourceText -> SourceText -> Bool #
Data SourceText # |

Methods

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

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

toConstr :: SourceText -> Constr Source #

dataTypeOf :: SourceText -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Show SourceText # |
Methods showsPrec :: Int -> SourceText -> ShowS Source # show :: SourceText -> String Source # showList :: [SourceText] -> ShowS Source #
Outputable SourceText # |
Methods ppr :: SourceText -> SDoc # pprPrec :: Rational -> SourceText -> SDoc #
Binary SourceText # |
Methods put_ :: BinHandle -> SourceText -> IO () # put :: BinHandle -> SourceText -> IO (Bin * SourceText) # get :: BinHandle -> IO SourceText #

pprWithSourceText :: SourceText -> SDoc -> SDoc #

Special combinator for showing string literals.

data IntWithInf #

An integer or infinity

Instances

Eq IntWithInf # |
Methods (==) :: IntWithInf -> IntWithInf -> Bool # (/=) :: IntWithInf -> IntWithInf -> Bool #
Num IntWithInf # |
Methods (+) :: IntWithInf -> IntWithInf -> IntWithInf Source # (-) :: IntWithInf -> IntWithInf -> IntWithInf Source # (*) :: IntWithInf -> IntWithInf -> IntWithInf Source # negate :: IntWithInf -> IntWithInf Source # abs :: IntWithInf -> IntWithInf Source # signum :: IntWithInf -> IntWithInf Source # fromInteger :: Integer -> IntWithInf Source #
Ord IntWithInf # |
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 #
Outputable IntWithInf # |
Methods ppr :: IntWithInf -> SDoc # pprPrec :: Rational -> IntWithInf -> SDoc #

infinity :: IntWithInf #

A representation of infinity

treatZeroAsInf :: Int -> IntWithInf #

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

mkIntWithInf :: Int -> IntWithInf #

Inject any integer into an `IntWithInf`

intGtLimit :: Int -> IntWithInf -> Bool #

data SpliceExplicitFlag #

Constructors

ExplicitSplice | = $(f x y)
ImplicitSplice | = f x y, i.e. a naked top level expression

Instances

Data SpliceExplicitFlag # |

Methods

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

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

toConstr :: SpliceExplicitFlag -> Constr Source #

dataTypeOf :: SpliceExplicitFlag -> DataType Source #

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

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

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

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

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

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

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

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

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

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