Documentation
¶
Index ¶
- Variables
- func Any[T any](p func(T) bool, xs []T) bool
- func AnyError[T any](p func(T) (bool, error), xs []T) (bool, error)
- func ConcatMap[I, O any](p func(I) []O, xs []I) []O
- func ConcatMapError[I, O any](p func(I) ([]O, error), xs []I) ([]O, error)
- func Filter[T any](p func(T) bool, xs []T) []T
- func Find[T any](p func(T) bool, xs []T) (T, bool)
- func FlatMap[I, O any](p func(I) []O, xs []I) []O
- func Fold[T, A any](p func(T, A) A, acc A, xs []T) A
- func ForError[I any](p func(I) error, xs []I) error
- func Keys[K comparable, V any](m map[K]V) []K
- func MakeDataOptionIdentifier(dataName ast.FullIdentifier, optionName ast.Identifier) ast.DataOptionIdentifier
- func MakeFullIdentifier(moduleName ast.QualifiedIdentifier, name ast.Identifier) ast.FullIdentifier
- func Map[I, O any](p func(I) O, xs []I) []O
- func MapError[I, O any](p func(I) (O, error), xs []I) ([]O, error)
- func MapIf[I, O any](p func(I) (O, bool), xs []I) []O
- func MapIfError[I, O any](p func(I) (O, bool, error), xs []I) ([]O, error)
- func MergeErrors(ex ...error) error
- func NewCompilerError(message string) error
- func NewErrorAt(loc ast.Location, msg string, params ...any) error
- func NewErrorOf(e WithLocation, msg string, params ...any) error
- func NewSystemError(err error) error
- func Range(min, max int) []int
- func Repeat[T any](x T, n int) []T
- func Values[K comparable, V any](m map[K]V) []V
- type Constraint
- type ErrorWithLocation
- type WithLocation
Constants ¶
This section is empty.
Variables ¶
View Source
var ( NarBaseBasicsName = ast.QualifiedIdentifier("Nar.Base.Basics") NarBaseMathName = ast.QualifiedIdentifier("Nar.Base.Math") NarTrueName = ast.Identifier("True") NarFalseName = ast.Identifier("False") NarNegName = ast.Identifier("neg") NarBaseCharChar = MakeFullIdentifier("Nar.Base.Char", "Char") NarBaseMathInt = MakeFullIdentifier(NarBaseMathName, "Int") NarBaseMathFloat = MakeFullIdentifier(NarBaseMathName, "Float") NarBaseBasicsUnit = MakeFullIdentifier(NarBaseBasicsName, "Unit") NarBaseStringString = MakeFullIdentifier("Nar.Base.String", "String") NarBaseListList = MakeFullIdentifier("Nar.Base.List", "List") NarBaseBasicsBool = MakeFullIdentifier(NarBaseBasicsName, "Bool") )
Functions ¶
func ConcatMapError ¶
func Keys ¶
func Keys[K comparable, V any](m map[K]V) []K
func MakeDataOptionIdentifier ¶
func MakeDataOptionIdentifier(dataName ast.FullIdentifier, optionName ast.Identifier) ast.DataOptionIdentifier
func MakeFullIdentifier ¶
func MakeFullIdentifier(moduleName ast.QualifiedIdentifier, name ast.Identifier) ast.FullIdentifier
func MergeErrors ¶
func NewCompilerError ¶
func NewErrorOf ¶
func NewErrorOf(e WithLocation, msg string, params ...any) error
func NewSystemError ¶
func Values ¶
func Values[K comparable, V any](m map[K]V) []V
Types ¶
type Constraint ¶
type Constraint ast.Identifier
const ( ConstraintNone Constraint = "" ConstraintNumber Constraint = "number" )
type ErrorWithLocation ¶
type ErrorWithLocation interface { error WithLocation Message() string }
type WithLocation ¶
Click to show internal directories.
Click to hide internal directories.