generated from jackfirth/racket-package-template
-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Labels
autopilot-candidateThe Copilot Agent should attempt this during a scheduled Autopilot runThe Copilot Agent should attempt this during a scheduled Autopilot runnew lintIssues suggesting new lints or pull requests implementing new lintsIssues suggesting new lints or pull requests implementing new lints
Description
It should be possible to tell Resyntax to keep specific collections in sorted order. This could be done with a keep-sorted macro by making a Resyntax rule that looks for a syntax property added by the macro. The first form in the list should be ignored so that this works with any collection, like (list ...), (set ...), or (vector ...). The comparator used could also be customizable by the keep-sorted macro, but it has to be something that operates on the syntax objects contained, not their values.
#lang resyntax/test
test: "unsorted marked list should be resorted"
--------------------
#lang racket
(keep-sorted (list apple orange banana))
--------------------
--------------------
#lang racket
(keep-sorted (list apple banana orange))
--------------------It should be a macro so that other macros can expand to it. I want this so that define-refactoring-suite can specify that the list of refactoring rules should always be written in sorted order.
Copilot
Metadata
Metadata
Assignees
Labels
autopilot-candidateThe Copilot Agent should attempt this during a scheduled Autopilot runThe Copilot Agent should attempt this during a scheduled Autopilot runnew lintIssues suggesting new lints or pull requests implementing new lintsIssues suggesting new lints or pull requests implementing new lints