Skip to content

First cut at some Typed Racket refactorings #13

Open

Description

@jessealama

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.

Activity

  1. jackfirth commented on Jan 12, 2021

    @jackfirth
    Owner

    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.

  2. added
    new lintIssues suggesting new lints or pull requests implementing new lints
    and removed
    enhancementNew feature or request
    on Apr 17, 2021
  3. jackfirth commented on Oct 3, 2024

    @jackfirth
    Owner

    There's been a little progress here: it is now possible to define third-party refactoring rules using the resyntax/base API. So making some Typed Racket refactoring rules is something anyone can do. I haven't attempted yet, however.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    new lintIssues suggesting new lints or pull requests implementing new lints

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions