cue
cue copied to clipboard
cmd/cue: add "hoist" command
Originally opened by @mpvl in https://github.com/cuelang/cue/issues/7
Implement cue hoist to extract templates from concrete data definitions. One could see this as cue trim in the opposite direction.
This can be implemented using the known anti-unification algorithm. It probably makes sense, though, to disregard disjunctions or to limit the number of elements.
Linking to https://github.com/cue-lang/cue/discussions/2231 because apparently GitHub does not create the linkage between issues and discussions.