resyntax icon indicating copy to clipboard operation
resyntax copied to clipboard

First cut at some Typed Racket refactorings

Open jessealama opened this issue 5 years ago • 2 comments

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 just t.

  • Replace define-type-alias with define-type.

  • Replace define-typed-struct and define-typed-struct: (with a colon at the end) with struct.

  • Replace Un with U.

This is just a sampler of legacy forms taken from here.

jessealama avatar Jan 12 '21 19:01 jessealama

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.

jackfirth avatar Jan 12 '21 21:01 jackfirth