Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TCAppL and TCAppR typechecking stack frames, and remove TCBind{L,R} #2220

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

byorgey
Copy link
Member

@byorgey byorgey commented Dec 13, 2024

Towards #1314.

  • It seems like it could be helpful to report that we were checking the left- or right-hand side of a function application when reporting type errors, to help give context.
  • On the other hand the "checking the LHS/RHS of a semicolon" never seemed very useful, since it would always come in a big chain and didn't really help localize the error, so I removed it.
  • I'm open to suggestions for other context we could provide. There is definitely a balance here between providing helpful context and providing too much. For example, should we add something that says "while checking the LHS/RHS of a pair"?

@byorgey byorgey requested review from xsebek and kostmo December 13, 2024 18:59
Copy link
Member

@xsebek xsebek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, the error message for a function argument looks better. 👍

What happens with id 3 3? Is that a RHS of LHS? 🤔

Comment on lines 901 to +902
-- Then check that the argument has the right type.
x' <- check x argTy
x' <- withFrame l (TCAppR f) $ check x argTy
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the comment here better then the LHS/RHS message, as "function argument" doesn't require remembering which side is which. 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants