ghc-7.0.3: The GHC API

BasicTypes

Synopsis

Documentation

type Version = Int

type Arity = Int

data FunctionOrData

Constructors

IsFunction 
IsData 

data Fixity

Constructors

Fixity Int FixityDirection 

data FixityDirection

Constructors

InfixL 
InfixR 
InfixN 

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

newtype IPName name

Constructors

IPName name 

ipNameName :: IPName name -> name

mapIPName :: (a -> b) -> IPName a -> IPName b

data RecFlag

Constructors

Recursive 
NonRecursive 

isRec :: RecFlag -> Bool

isNonRec :: RecFlag -> Bool

data TopLevelFlag

Constructors

TopLevel 
NotTopLevel 

data Boxity

Constructors

Boxed 
Unboxed 

isBoxed :: Boxity -> Bool

data TupCon

Constructors

TupCon Boxity Arity 

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

isOneOcc :: OccInfo -> Bool

isDeadOcc :: OccInfo -> Bool

isNoOcc :: OccInfo -> Bool

type InsideLam = Bool

type OneBranch = Bool

type InterestingCxt = Bool

data EP a

Constructors

EP 

Fields

fromEP :: a
 
toEP :: a
 

isBanged :: HsBang -> Bool

data DefMethSpec

Constructors

NoDM 
VanillaDM 
GenericDM 

type PhaseNum = Int

data RuleMatchInfo

Constructors

ConLike 
FunLike 

data SuccessFlag

Constructors

Succeeded 
Failed 

failed :: SuccessFlag -> Bool