这是indexloc提供的服务,不要输入任何密码
Skip to content

print more Error types as Error types #179

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

Merged
merged 1 commit into from
Aug 17, 2015

Conversation

AlexKnauth
Copy link
Member

A change like this probably would have saved me a lot of trouble debugging.

@stamourv
Copy link
Contributor

That sounds like a good idea. Do you have an example whose behavior would change?

[(? Rep-stx a)
(if (Error? a)
`(Error ,(syntax->datum (Rep-stx a)))
(syntax->datum (Rep-stx a)))]
Copy link
Member Author

Choose a reason for hiding this comment

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

Does this make it clearer?

Copy link
Contributor

Choose a reason for hiding this comment

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

The original code was fine, I'd just have moved it a line earlier. Just a nitpick anyway.

@AlexKnauth
Copy link
Member Author

Re: example: No, I don't have an example that this would change behavior for. This would have changed the printing of the types of constructors for define-new-subtype before f8cc9e8, but since that's fixed now, I don't have an example that would change.

@stamourv
Copy link
Contributor

I guess what I'm asking is: in which circumstances would such types arise?

@AlexKnauth
Copy link
Member Author

One way they appear that I know of: in env/type-alias-helper.rkt the function get-type-alias-info sets the given type-aliases all to Error, to be replaced later. But then if parse-type is called on one of those types, then it will return an Error type with the given identifier as the Rep-stx I think.

@stamourv
Copy link
Contributor

Ok, LGTM then.

@AlexKnauth AlexKnauth merged commit 30cdfd1 into racket:master Aug 17, 2015
@AlexKnauth AlexKnauth deleted the print-type-error branch August 17, 2015 21:51
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