package subsume
import "cuelang.org/go/internal/core/subsume"
Package subsume defines various subsumption relations.
Index ¶
Variables ¶
API is subsumption used for APIs.
var CUE = Profile{}
Final checks subsumption interpreting the subsumed value as data.
FinalOpen exists as an artifact of the old API. One should probably not use this.
Functions ¶
func Value ¶
Value subsumes two values based on their logical (evaluated) values.
Types ¶
type Profile ¶
type Profile struct {
// Final indicates subsumption should only consider fields that are relevant
// to data mode, and ignore definitions, hidden fields, pattern constraints
// and additional constraints.
Final bool
// Defaults indicate that default values should be used for the subsumed
// value.
Defaults bool
// LeftDefaults indicates that the default value of the subsuming value
// needs to be taken. This is necessary for simplifications like trim
// and simplifying disjunctions.
LeftDefault bool
// Ignore optional fields.
IgnoreOptional bool
// IgnoreClosedness ignores closedness of structs and is used for comparing
// APIs.
IgnoreClosedness bool
}
Profile configures the type of subsumption. One should typically use one of the preconfigured profiles.
func (*Profile) Value ¶
Source Files ¶
structural.go subsume.go value.go vertex.go
- Version
- v0.15.1 (latest)
- Published
- Nov 21, 2025
- Platform
- linux/amd64
- Imports
- 5 packages
- Last checked
- 4 months ago –
Tools for package owners.