| Safe Haskell | Safe |
|---|---|
| Language | Haskell2010 |
Sutori.SymTable.Symbol
Description
- class SutSymbol a where
- class SutSymbol a => ParametricSymbol a where
- class SutSymbol a => TypedSymbol a where
- class SutSymbol a => ASTSymbol a where
- class SutSymbol a => OffsetSymbol a where
- type Scope = Int
- data SutParam = SutParam {}
- data SymModule = SymModule SutID SutAST
- data SymFunction = SymFunction SutID SutTypeID [SutParam] SutAST (Maybe SutAST)
- data SymPerson = SymPerson SutID Scope
- data SymVariable = SymVariable SutID Scope SutTypeID Offset
- data SymType = SymType SutID Scope SutTypeID
- data SutSymbol'
- data SymbolCat
- isModule :: SymbolCat -> Bool
- isFunction :: SymbolCat -> Bool
- isPerson :: SymbolCat -> Bool
- isType :: SymbolCat -> Bool
- isVariable :: SymbolCat -> Bool
- paramByValue :: SutTypeID -> SutID -> SutParam
- paramByRef :: SutTypeID -> SutID -> SutParam
- unBoxFunction :: SutSymbol' -> SymFunction
- unBoxPerson :: SutSymbol' -> SymPerson
- unBoxVariable :: SutSymbol' -> SymVariable
- unBoxModule :: SutSymbol' -> SymModule
- unBoxType :: SutSymbol' -> SymType
Documentation
class SutSymbol a where Source #
Represents a basic symbol
class SutSymbol a => ParametricSymbol a where Source #
Represents a symbol which also has some parameters
Minimal complete definition
Instances
class SutSymbol a => TypedSymbol a where Source #
Represents a symbol with a type
Minimal complete definition
Instances
class SutSymbol a => ASTSymbol a where Source #
Represents a symbol that holds an AST
Minimal complete definition
class SutSymbol a => OffsetSymbol a where Source #
Represents a symbol that _may_ hold an offset
Minimal complete definition
Instances
A Scope is just a number uniquely representing a scope (NOT a level, but an ID)
A (top-level) module
data SymFunction Source #
A (top-level) function
A person who may do things in the story
A reference to a (now named) type
data SutSymbol' Source #
Boxed SutSymbols for the table to handle
Constructors
| SymModule' SymModule | |
| SymFunction' SymFunction | |
| SymPerson' SymPerson | |
| SymVariable' SymVariable | |
| SymType' SymType |
Instances
Constructors
| CatModule | |
| CatPerson | |
| CatType | |
| CatVariable | |
| CatFunction | |
| CatMember |
isFunction :: SymbolCat -> Bool Source #
isVariable :: SymbolCat -> Bool Source #
paramByValue :: SutTypeID -> SutID -> SutParam Source #
Helper to abstract the True/False isRef field
unBoxPerson :: SutSymbol' -> SymPerson Source #
unBoxModule :: SutSymbol' -> SymModule Source #
unBoxType :: SutSymbol' -> SymType Source #