ctx

package
v1.5.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 7, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Binding

type Binding struct {
	Name string
	Ty   ast.Term
}

Binding represents a binding in the context.

type Ctx

type Ctx struct {
	Tele []Binding
}

Ctx represents the typing context.

func (Ctx) Drop

func (c Ctx) Drop() Ctx

Drop removes the most recent binding from the context.

func (*Ctx) Extend

func (c *Ctx) Extend(name string, ty ast.Term)

Extend adds a new binding to the context.

func (Ctx) Len

func (c Ctx) Len() int

Len returns the length of the context.

func (Ctx) LookupVar

func (c Ctx) LookupVar(ix int) (ast.Term, bool)

LookupVar looks up the type of a de Bruijn variable. ix=0 is the most recent binding.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL