Documentation
¶
Index ¶
- func FormatType(t interface{}) string
- func PrintTypedProgram(prog *TypedProgram) string
- type TypedApp
- type TypedArray
- type TypedBinOp
- type TypedConstructorPattern
- type TypedExpr
- type TypedIf
- type TypedLambda
- type TypedLet
- type TypedLetRec
- type TypedList
- type TypedListPattern
- type TypedLit
- type TypedLitPattern
- type TypedMatch
- type TypedMatchArm
- type TypedNode
- type TypedPattern
- type TypedProgram
- type TypedRecBinding
- type TypedRecord
- type TypedRecordAccess
- type TypedRecordPattern
- type TypedTuple
- type TypedTuplePattern
- type TypedUnOp
- type TypedVar
- type TypedVarPattern
- type TypedWildcardPattern
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatType ¶
func FormatType(t interface{}) string
FormatType formats a type for display (interface{} version)
func PrintTypedProgram ¶
func PrintTypedProgram(prog *TypedProgram) string
PrintTypedProgram pretty-prints a typed program
Types ¶
type TypedArray ¶
TypedArray represents typed array construction
func (TypedArray) String ¶
func (t TypedArray) String() string
type TypedBinOp ¶
TypedBinOp represents typed binary operation
func (TypedBinOp) String ¶
func (t TypedBinOp) String() string
type TypedConstructorPattern ¶
type TypedConstructorPattern struct {
Name string
Args []TypedPattern
}
func (TypedConstructorPattern) String ¶
func (p TypedConstructorPattern) String() string
type TypedExpr ¶
type TypedExpr struct {
NodeID uint64
Span ast.Pos
Type interface{} // types.Type - Always monomorphic
EffectRow interface{} // *types.Row - Effect row with kind
Core core.CoreExpr // Underlying core expression
}
TypedExpr is the base for all typed expressions It carries monomorphic type and effect information
func (TypedExpr) GetEffectRow ¶
func (t TypedExpr) GetEffectRow() interface{}
type TypedLambda ¶
type TypedLambda struct {
TypedExpr
Params []string
ParamTypes []interface{} // []types.Type
Body TypedNode
}
TypedLambda represents a typed lambda
func (TypedLambda) String ¶
func (t TypedLambda) String() string
type TypedLet ¶
type TypedLet struct {
TypedExpr
Name string
Scheme interface{} // *types.Scheme - Generalized type (only here!)
Value TypedNode
Body TypedNode
}
TypedLet represents a typed let binding Only let bindings carry Schemes (generalized types)
type TypedLetRec ¶
type TypedLetRec struct {
TypedExpr
Bindings []TypedRecBinding
Body TypedNode
}
TypedLetRec represents typed recursive bindings
func (TypedLetRec) String ¶
func (t TypedLetRec) String() string
type TypedListPattern ¶
type TypedListPattern struct {
Elements []TypedPattern
Tail *TypedPattern // For spread patterns: [x, ...rest]
}
func (TypedListPattern) String ¶
func (p TypedListPattern) String() string
type TypedLitPattern ¶
type TypedLitPattern struct {
Value interface{}
}
func (TypedLitPattern) String ¶
func (p TypedLitPattern) String() string
type TypedMatch ¶
type TypedMatch struct {
TypedExpr
Scrutinee TypedNode
Arms []TypedMatchArm
Exhaustive bool
}
TypedMatch represents typed pattern matching
func (TypedMatch) String ¶
func (t TypedMatch) String() string
type TypedMatchArm ¶
type TypedMatchArm struct {
Pattern TypedPattern
Guard TypedNode // Optional
Body TypedNode
}
TypedMatchArm represents a typed match arm
type TypedNode ¶
type TypedNode interface {
GetNodeID() uint64
GetSpan() ast.Pos
GetType() interface{} // types.Type
GetEffectRow() interface{} // *types.Row
GetCore() core.CoreExpr
String() string
}
TypedNode is the interface for all typed nodes
type TypedPattern ¶
type TypedPattern interface {
String() string
// contains filtered or unexported methods
}
type TypedProgram ¶
type TypedProgram struct {
Decls []TypedNode
}
TypedProgram represents a typed program
type TypedRecBinding ¶
type TypedRecBinding struct {
Name string
Scheme interface{} // *types.Scheme - Generalized type for recursive binding
Value TypedNode
}
TypedRecBinding represents a recursive binding with scheme
type TypedRecord ¶
TypedRecord represents typed record construction
func (TypedRecord) String ¶
func (t TypedRecord) String() string
type TypedRecordAccess ¶
TypedRecordAccess represents typed field access
func (TypedRecordAccess) String ¶
func (t TypedRecordAccess) String() string
type TypedRecordPattern ¶
type TypedRecordPattern struct {
Fields map[string]TypedPattern
}
func (TypedRecordPattern) String ¶
func (p TypedRecordPattern) String() string
type TypedTuple ¶
TypedTuple represents typed tuple construction
func (TypedTuple) String ¶
func (t TypedTuple) String() string
type TypedTuplePattern ¶
type TypedTuplePattern struct {
Elements []TypedPattern
}
func (TypedTuplePattern) String ¶
func (p TypedTuplePattern) String() string
type TypedVarPattern ¶
type TypedVarPattern struct {
Name string
Type interface{} // types.Type
}
func (TypedVarPattern) String ¶
func (p TypedVarPattern) String() string
type TypedWildcardPattern ¶
type TypedWildcardPattern struct{}
func (TypedWildcardPattern) String ¶
func (p TypedWildcardPattern) String() string