generics

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package generics provides functions to handle generics with the GX IR.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Infer

func Infer(fetcher ir.Fetcher, fExpr *ir.FuncValExpr, args []ir.AssignableExpr) (*ir.FuncValExpr, bool)

Infer the type parameters of a function given a list of argument expressions.

func Instantiate

func Instantiate(fetcher ir.Fetcher, fExpr *ir.FuncValExpr) (*ir.FuncValExpr, bool)

Instantiate replaces data types either specified or inferred.

func Specialise

func Specialise(fetcher ir.Fetcher, expr ir.Expr, fun *ir.FuncValExpr, typs []*ir.TypeValExpr) (*ir.SpecialisedFunc, bool)

Specialise a function signature for a given type.

Types

This section is empty.

Jump to

Keyboard shortcuts

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