| ghc-6.10.4: The GHC API | Contents | Index

BasicTypes

Synopsis

type Version = Int
bumpVersion :: Version -> Version
initialVersion :: Version
type Arity = Int

data FunctionOrData

= IsFunction
| IsData

data WarningTxt

= WarningTxt FastString
| DeprecatedTxt FastString

data Fixity = Fixity Int FixityDirection

data FixityDirection

= InfixL
| InfixR
| InfixN

defaultFixity :: Fixity
maxPrecedence :: Int
negateFixity :: Fixity
funTyFixity :: Fixity
compareFixity :: Fixity -> Fixity -> (Bool, Bool)
newtype IPName name = IPName name
ipNameName :: IPName name -> name
mapIPName :: (a -> b) -> IPName a -> IPName b

data RecFlag

= Recursive
| NonRecursive

isRec :: RecFlag -> Bool
isNonRec :: RecFlag -> Bool
boolToRecFlag :: Bool -> RecFlag
type RuleName = FastString

data TopLevelFlag

= TopLevel
| NotTopLevel

isTopLevel :: TopLevelFlag -> Bool
isNotTopLevel :: TopLevelFlag -> Bool

data OverlapFlag

= NoOverlap
| OverlapOk
| Incoherent

data Boxity

= Boxed
| Unboxed

isBoxed :: Boxity -> Bool
data TupCon = TupCon Boxity Arity
tupleParens :: Boxity -> SDoc -> SDoc

data OccInfo

= NoOccInfo
| IAmDead
| OneOcc !InsideLam !OneBranch !InterestingCxt
| IAmALoopBreaker !RulesOnly

seqOccInfo :: OccInfo -> ()
isFragileOcc :: OccInfo -> Bool
isOneOcc :: OccInfo -> Bool
isDeadOcc :: OccInfo -> Bool
isLoopBreaker :: OccInfo -> Bool
isNonRuleLoopBreaker :: OccInfo -> Bool
isNoOcc :: OccInfo -> Bool
type InsideLam = Bool
insideLam :: InsideLam
notInsideLam :: InsideLam
type OneBranch = Bool
oneBranch :: OneBranch
notOneBranch :: OneBranch
type InterestingCxt = Bool

data EP a = EP {

fromEP :: a
toEP :: a

}

data StrictnessMark

= MarkedStrict
| MarkedUnboxed
| NotMarkedStrict

isMarkedUnboxed :: StrictnessMark -> Bool
isMarkedStrict :: StrictnessMark -> Bool
type CompilerPhase = Int

data Activation

= NeverActive
| AlwaysActive
| ActiveBefore CompilerPhase
| ActiveAfter CompilerPhase

isActive :: CompilerPhase -> Activation -> Bool
isNeverActive :: Activation -> Bool
isAlwaysActive :: Activation -> Bool
data InlineSpec = Inline Activation Bool
defaultInlineSpec :: InlineSpec
alwaysInlineSpec :: InlineSpec
neverInlineSpec :: InlineSpec

data SuccessFlag

= Succeeded
| Failed

succeeded :: SuccessFlag -> Bool
failed :: SuccessFlag -> Bool
successIf :: Bool -> SuccessFlag

Documentation
type Version = Int
bumpVersion :: Version -> Version
initialVersion :: Version
type Arity = Int
data FunctionOrData

Constructors

IsFunction |
IsData |

Instances

Eq FunctionOrData
Ord FunctionOrData
Outputable FunctionOrData
Binary FunctionOrData

data WarningTxt

Constructors

WarningTxt FastString |
DeprecatedTxt FastString |

Instances

Eq WarningTxt
Outputable WarningTxt
Binary WarningTxt

data Fixity

Constructors

Fixity Int FixityDirection |

Instances

Eq Fixity
Outputable Fixity
Binary Fixity

data FixityDirection

Constructors

InfixL |
InfixR |
InfixN |

Instances

Eq FixityDirection
Outputable FixityDirection
Binary FixityDirection

defaultFixity :: Fixity
maxPrecedence :: Int
negateFixity :: Fixity
funTyFixity :: Fixity
compareFixity :: Fixity -> Fixity -> (Bool, Bool)
newtype IPName name

Constructors

IPName name |

Instances

Eq name => Eq (IPName name)
Ord name => Ord (IPName name)
Outputable name => OutputableBndr (IPName name)
Outputable name => Outputable (IPName name)
Binary name => Binary (IPName name)

ipNameName :: IPName name -> name
mapIPName :: (a -> b) -> IPName a -> IPName b
data RecFlag

Constructors

Recursive |
NonRecursive |

Instances

Eq RecFlag
Outputable RecFlag
Binary RecFlag

isRec :: RecFlag -> Bool
isNonRec :: RecFlag -> Bool
boolToRecFlag :: Bool -> RecFlag
type RuleName = FastString
data TopLevelFlag

Constructors

TopLevel |
NotTopLevel |

Instances

Outputable TopLevelFlag

isTopLevel :: TopLevelFlag -> Bool
isNotTopLevel :: TopLevelFlag -> Bool
data OverlapFlag

Constructors

NoOverlap |
OverlapOk |
Incoherent |

Instances

Eq OverlapFlag
Outputable OverlapFlag
Binary OverlapFlag

data Boxity

Constructors

Boxed |
Unboxed |

Instances

Eq Boxity
Binary Boxity

isBoxed :: Boxity -> Bool
data TupCon

Constructors

TupCon Boxity Arity |

Instances

Eq TupCon
Binary TupCon

tupleParens :: Boxity -> SDoc -> SDoc
data OccInfo

Identifier occurrence information
Constructors

NoOccInfo | There are many occurrences, or unknown occurences
IAmDead | Marks unused variables. Sometimes useful for lambda and case-bound variables.
OneOcc !InsideLam !OneBranch !InterestingCxt | Occurs exactly once, not inside a rule
IAmALoopBreaker !RulesOnly | 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

Instances

Show OccInfo
Outputable OccInfo

seqOccInfo :: OccInfo -> ()
isFragileOcc :: OccInfo -> Bool
isOneOcc :: OccInfo -> Bool
isDeadOcc :: OccInfo -> Bool
isLoopBreaker :: OccInfo -> Bool
isNonRuleLoopBreaker :: OccInfo -> Bool
isNoOcc :: OccInfo -> Bool
type InsideLam = Bool
insideLam :: InsideLam
notInsideLam :: InsideLam
type OneBranch = Bool
oneBranch :: OneBranch
notOneBranch :: OneBranch
type InterestingCxt = Bool
data EP a

Constructors

EP |

fromEP :: a |
toEP :: a |

data StrictnessMark

Constructors

MarkedStrict |
MarkedUnboxed |
NotMarkedStrict |

Instances

Eq StrictnessMark
Outputable StrictnessMark
Binary StrictnessMark

isMarkedUnboxed :: StrictnessMark -> Bool
isMarkedStrict :: StrictnessMark -> Bool
type CompilerPhase = Int
data Activation

Constructors

NeverActive |
AlwaysActive |
ActiveBefore CompilerPhase |
ActiveAfter CompilerPhase |

Instances

Eq Activation
Outputable Activation
Binary Activation

isActive :: CompilerPhase -> Activation -> Bool
isNeverActive :: Activation -> Bool
isAlwaysActive :: Activation -> Bool
data InlineSpec

Constructors

Inline Activation Bool |

Instances

Eq InlineSpec
Outputable InlineSpec

defaultInlineSpec :: InlineSpec
alwaysInlineSpec :: InlineSpec
neverInlineSpec :: InlineSpec
data SuccessFlag

Constructors

Succeeded |
Failed |

Instances

Outputable SuccessFlag

succeeded :: SuccessFlag -> Bool
failed :: SuccessFlag -> Bool
successIf :: Bool -> SuccessFlag
Produced by Haddock version 2.4.2