Documentation
¶
Index ¶
- func DebugValue(v Value) string
- func EvalNBE(t ast.Term) ast.Term
- func NeutralEqual(n1, n2 Neutral) bool
- func Normalize(t ast.Term) ast.Term
- func NormalizeNBE(t ast.Term) string
- func PrettyNeutral(n Neutral) string
- func PrettyValue(v Value) string
- func Reify(v Value) ast.Term
- func SprintNeutral(n Neutral) string
- func SprintValue(v Value) string
- func ValueEqual(v1, v2 Value) bool
- type Closure
- type Env
- type Head
- type Neutral
- type VGlobal
- type VLam
- type VNeutral
- type VPair
- type VPi
- type VSigma
- type VSort
- type Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DebugValue ¶ added in v1.2.0
DebugValue provides detailed debug information about a Value.
func EvalNBE ¶ added in v1.2.0
EvalNBE is a convenience function that evaluates and reifies a term using NbE.
func NeutralEqual ¶ added in v1.2.0
NeutralEqual compares two Neutrals for structural equality.
func Normalize ¶
Normalize reduces a term to weak head normal form using beta-reduction and projections.
func NormalizeNBE ¶ added in v1.2.0
NormalizeNBE normalizes a term using NbE and returns its string representation. This function provides compatibility with existing test expectations.
func PrettyNeutral ¶ added in v1.2.0
PrettyNeutral converts a Neutral to a stable string representation for testing.
func PrettyValue ¶ added in v1.2.0
PrettyValue converts a Value to a stable string representation for testing. This ensures deterministic output for golden tests.
func SprintNeutral ¶ added in v1.2.0
SprintNeutral returns a string representation of a Neutral for debugging and testing.
func SprintValue ¶ added in v1.2.0
SprintValue returns a string representation of a Value for debugging and testing.
func ValueEqual ¶ added in v1.2.0
ValueEqual compares two Values for structural equality (useful for testing).
Types ¶
type Env ¶ added in v1.2.0
type Env struct {
Bindings []Value
}
Env represents an evaluation environment mapping de Bruijn indices to Values.
type VGlobal ¶ added in v1.2.0
type VGlobal struct{ Name string }
VGlobal represents global constants.
type VNeutral ¶ added in v1.2.0
type VNeutral struct{ N Neutral }
VNeutral represents neutral terms (stuck computations).
type Value ¶ added in v1.2.0
type Value interface {
// contains filtered or unexported methods
}
Value is the semantic domain for NbE.