Skip to content
This repository has been archived by the owner on Nov 18, 2021. It is now read-only.

Commit

Permalink
pkg/list: remove use of :: (Incompatible!!!)
Browse files Browse the repository at this point in the history
WARNING: this change causes a breaking change.

Change-Id: I379b5db972e30d0de81096c7ddac115064658d6d
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/6201
Reviewed-by: CUE cueckoo <cueckoo@gmail.com>
Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
  • Loading branch information
mpvl committed Jun 2, 2020
1 parent 083afe7 commit 1d213a3
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
12 changes: 6 additions & 6 deletions cue/builtins.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions pkg/list/sort.cue
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
package list

// A Comparer specifies whether one value is strictly less than another value.
Comparer :: {
T :: _
Comparer: {
T: _
x: T
y: T
less: bool // true if x < y
Expand All @@ -26,11 +26,11 @@ Comparer :: {
//
// Example:
// list.Sort(a, list.Ascending)
Ascending :: {
Ascending: {
Comparer
T :: number | string
x: T
y: T
T: number | string
x: T
y: T
// TODO: the following will be fixed when removing old-school templating.
less: true && (x < y)
}
Expand All @@ -39,9 +39,9 @@ Ascending :: {
//
// Example:
// list.Sort(a, list.Descending)
Descending :: {
Descending: {
Comparer
T :: number | string
T: number | string
x: T
y: T
less: (x > y)
Expand Down
2 changes: 1 addition & 1 deletion pkg/list/sort.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func (s *valueSorter) Less(i, j int) bool { panic("implemented in cue/builtinuti
// Sort sorts data. It does O(n*log(n)) comparisons.
// The sort is not guaranteed to be stable.
//
// cmp is a struct of the form {T :: _, x: T, y: T, less: bool}, where
// cmp is a struct of the form {T: _, x: T, y: T, less: bool}, where
// less should reflect x < y.
//
// Example:
Expand Down

0 comments on commit 1d213a3

Please sign in to comment.