package
0.2.0
Repository: https://github.com/google/mangle.git
Documentation: pkg.go.dev

# Functions

BoolType returns a type named in honor of George Boole.
CheckAndDesugar rewrites a complete set of decls so that bound declarations contain only type bounds and unary predicate references are added to inclusion constraints.
CheckFunTypeExpression checks a function type expression.
CreateListType applies given type to a list.
FunTypeArgs returns function arguments of function type.
FunTypeResult returns result type of function type.
GetTypeContext returns type context containing all type vars, with /any bound.
IsBaseTypeExpression returns true if c is a base type expression.
IsFunTypeExpression returns true if tpe is a UnionType.
IsListTypeExpression returns true if tpe is a ListType.
IsMapTypeExpression returns true if tpe is a MapType.
IsOptional returns true if an argument of fn:Struct is an optional field.
IsRelTypeExpression returns true if tpe is a RelType.
IsStructTypeExpression returns true if tpe is a StructType.
IsUnionTypeExpression returns true if tpe is a UnionType.
ListTypeArg returns the type argument of a ListType.
LowerBound returns a lower bound of set expressions.
MapTypeArgs returns the type arguments of a MapType.
NewBoundHandle constructs a TypeHandle for a bound (may contain type variables).
NewFunType returns a new function type.
NewListType returns a new ListType.
NewMapType returns a new MapType.
NewNameTrie constructs a new NameTrie (representing empty prefix).
NewOpt wraps a label-type pair inside a StructType.
NewOptionType returns a new ListType.
NewPairType returns a new PairType.
NewRelType returns a new relation type.
NewSetHandle constructs a TypeHandle for a (simple) monotype.
NewSingletonType returns a new SingletonType.
NewStructType returns a new StructType.
NewTupleType returns a new TupleType.
NewTypeHandle constructs a TypeHandle.
NewUnionType returns a new UnionType.
RelTypeAlternatives converts a relation type expression to a list of alternatives relTypes.
RelTypeArgs returns type arguments of a RelType.
RelTypeExprFromDecl converts bounds to relation type expression.
RelTypeFromAlternatives converts list of rel types bounds to union of relation types.
RemoveFromUnionType given T, removes S from a union type {..., S, ...} if S<:T.
SetConforms returns true if |- left <: right for set expression.
StructTypeField returns field type for given field.
StructTypeOptionaArgs returns type arguments of a StructType.
StructTypeRequiredArgs returns type arguments of a StructType.
TypeConforms returns true if ctx |- left <: right.
UnionTypeArgs returns type arguments of a UnionType.
UpperBound returns upper bound of set expressions.
WellformedBound returns an error if expr is not a valid bound expression.
WellformedType returns an error if expr is not a well-formed type-in-context.

# Variables

Append appends a element to a list.
BuiltinRelations maps each builtin predicate to its argument range list.
Collect turns a collection { tuple_1,...tuple_n } into a list [tuple_1, ..., tuple_n].
CollectDistinct turns a collection { tuple_1,...tuple_n } into a list with distinct elements [tuple_1, ..., tuple_n].
Cons constructs a pair.
Contains matches string constants that contain the given string.
Count reduces a set { x_1,...x_n } to { n }.
Div is a family of functions mapping integer division: X,Y1,.
EmptyType is a type without members.
EndsWith matches string constants that have a given suffix.
Filter is turning a boolean function into a predicate.
Float64ToString converts from ast.Float64Type to ast.StringType.
FloatDiv is a family of functions mapping division: X,Y1,.
FloatMax reduces a set of float64 { x_1,...x_n } to { x_i } that is maximal.
FloatMin reduces a set of float64 { x_1,...x_n } to { x_i } that is minimal.
FloatSum reduces a set of float64 { x_1,...x_n } to { x_1 + ..
FunType is a constructor for a function type.
Ge is the greater-than-or-equal relation on numbers.
GroupBy groups all tuples by the values of key variables, e.g.
Gt is the greater-than relation on numbers.
Le is the less-than-or-equal relation on numbers.
Len returns length of a list.
List constructs a list.
ListContains is a function (List, Member) which returns /true if Member is contained in list.
ListGet is a function (List, Number) which returns element at index 'Number'.
ListMember mode(+, -) either checks membership or binds var to every element.
ListType is a constructor for a list type.
Lt is the less-than relation on numbers.
Map constructs a map.
MapGet is a function (Map, Key) which returns element at key.
MapType is a constructor for a map type.
MatchCons mode(+, -, -) matches a list to head and tail.
MatchEntry mode(+, +, -) matches an entry in a map.
MatchField mode(+, +, -) matches a field in a struct.
MatchNil matches the empty list.
MatchPair mode(+, -, -) matches a pair to its elements.
MatchPrefix matches name constants that have a given prefix.
Max reduces a set { x_1,...x_n } to { x_i } that is maximal.
Min reduces a set { x_1,...x_n } to { x_i } that is minimal.
Minus is a family of functions mapping X,Y1,.
Mult is a family of functions mapping X,Y1,.
NameToString converts from ast.NameType to ast.StringType.
NumberToString converts from ast.NumberType to ast.StringType.
Optional may appear inside StructType to indicate optional fields.
OptionType is a constructor for an option type.
Package is an improper symbol, used to represent package declaration.
Pair constructs a pair.
PairType is a constructor for a pair type.
PickAny reduces a set { x_1,...x_n } to a single { x_i },.
Plus is a family of functions mapping X,Y1,.
RelType is a constructor for a relation type.
SingletonType is a constructor for a singleton type.
Some constructs an element of an option type.
StartsWith matches string constants that have a given prefix.
StringConcatenate concatenates the arguments into a single string constant.
Struct constructs a struct.
StructGet is a function (Struct, Field) which returns specified field.
StructType is a constructor for a struct type.
Sum reduces a set { x_1,...x_n } to { x_1 + ..
Tuple acts either as identity (one argument), pair (two arguments) or nested pair (more).
TupleType is a type-level function that returns a tuple type out of pair types.
TypeConstructors is a list of function symbols used in structured type expressions.
UnionType is a constructor for a union type.
Use is an improper symbol, used to represent use declaration.
WithinDistance is a relation on numbers X, Y, Z satisfying |X - Y| < Z.

# Structs

NameTrieNode is a node in NameTrie.
TypeHandle provides functionality related to type expression.