racket / racket/typed-racket

TR: inconsistent type errors, part 3

Open
#276 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Racket
Stars
575
Forks
106
Avg merge
2h 1m
Merged PRs (30d)
2

Description

Resubmission of PR15165 in github.

I'm happily using type-output-sexpr-tweaker in my class language,
which generally works fine. The one exception (bad pun warning) is type
errors, where types don't go through the tweaker. (Resulting in great
confusage in my class, since we're using infix arrows.)

It would be nice if it gets used there too.

Looking at the code, it seems like there's a bunch of places that print
types without going through pretty-format-type. One of them is
stringify-domain (in tc-app-helper.rkt) which is where the offending
-> from the second part I mentioned earlier is found. It also has
some hard-wired * and ... which my tweaker wants to tweak.

make-printable and cleanup-type are two more that seem like they
should use pretty-format-type.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting stringify-domain in tc-app-helper.rkt, then review make-printable and cleanup-type. Trace where these functions print types and compare those paths with pretty-format-type. Done means type errors consistently pass through the tweaker, including the hard-wired *, ..., and arrow output.

Written by the indexing model from the issue text.

Assessment

Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.