-
-
Notifications
You must be signed in to change notification settings - Fork 102
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
Issue with match-define #1318
Comments
This version of it with (match-define (point #{a : Number} #{b : Number}) a) (Edit: and by "works" I mean that it typechecks. it errors at runtime with |
Renaming one of the 2 |
Ah, yes! Sorry, I forgot to add that the issue arises because |
The problem has nothing to do with match-define. It's just that circular definitions require type annotations to break dependencies. For example, the program below has the same error.
In the
|
Alternatively, you can use
|
Can you please clarify why any of these examples are "circular"? I am not really sure I understand the use of circular in this context. In my understanding, the pattern in the pattern-matching is introducing a new scope after the |
The program does not work like
you can see that the binding arrow from the RHS points to the LHS. |
What version of Racket are you using?
8.2
What program did you run?
yields a typing error.
What should have happened?
I would expect no typing error, but maybe I'm misunderstanding the semantics of scoping with a
match-define
. For instance, the following example yields no errors.Alternatively, if some error is to be triggered, the existing error message is misleading.
If you got an error message, please include it here.
The text was updated successfully, but these errors were encountered: