First cut at some Typed Racket refactorings
Here are some ideas for using resyntax on Typed Racket code. These are quite superficial and don't depend on any knowledge of the types.
-
Singleton union types: rewrite the type
(U t)to justt. -
Replace
define-type-aliaswithdefine-type. -
Replace
define-typed-structanddefine-typed-struct:(with a colon at the end) withstruct. -
Replace
UnwithU.
This is just a sampler of legacy forms taken from here.
Typed Racket ones are tricky because I need to figure out where the rules should live. If they go in resyntax, then resyntax needs a dependency on TR. If they go in TR, or some sort of resyntax-for-TR addon, then I need to figure out a way for resyntax to discover the rules. Maybe for now I just shove them into resyntax and see how that goes.