identity

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package identity defines canonical semantic declaration identities shared by resolution, checking, typed IR, and backend analysis.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Qualify

func Qualify(owner, name string) string

Types

type Declaration

type Declaration struct {
	Module string
	Name   string
	Kind   Kind
}

Declaration identifies one semantic declaration independently from the spelling used at a source reference and from any backend-generated name. Module is the canonical compiler module path. Name is qualified with :: for declarations nested in source modules.

func (Declaration) Empty

func (d Declaration) Empty() bool

func (Declaration) Key

func (d Declaration) Key() string

func (Declaration) LeafName

func (d Declaration) LeafName() string

type Dispatch

type Dispatch struct {
	Owner Declaration
	Name  string
	Class bool
}

Dispatch identifies a source member independently from target-language mangling. Class distinguishes class and instance namespaces.

func (Dispatch) Empty

func (d Dispatch) Empty() bool

type Kind

type Kind string
const (
	Class     Kind = "class"
	Record    Kind = "record"
	Enum      Kind = "enum"
	TypeAlias Kind = "type_alias"
	Newtype   Kind = "newtype"
	Module    Kind = "module"
	Interface Kind = "interface"
	Function  Kind = "function"
	Value     Kind = "value"
)

func (Kind) IsType

func (k Kind) IsType() bool

Jump to

Keyboard shortcuts

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