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

Way to debug expressions that don't typecheck #62

Open
jldodds opened this issue Jan 14, 2015 · 3 comments
Open

Way to debug expressions that don't typecheck #62

jldodds opened this issue Jan 14, 2015 · 3 comments

Comments

@jldodds
Copy link

jldodds commented Jan 14, 2015

It would be very useful if there was a function that took an expr and if that expr doesn't typecheck returns a (possibly) smaller expression along with the type it is expected to have

@jldodds
Copy link
Author

jldodds commented Jan 14, 2015

or just a smaller expression that fails to typecheck on its own

@gmalecha
Copy link
Owner

I think the easiest thing to do right now is to call [typeof_expr](in https://github.com/gmalecha/mirror-core/blob/master/theories/Lambda/ExprDI.v#L105). It returns [None] if the term is well-typed and otherwise it returns [Some].

@jldodds
Copy link
Author

jldodds commented Jan 14, 2015

Yep, I did that, but my term was huge. It would be nice if there was a function that found the part that didn't typecheck. I eventually found it my manually testing many parts of the term

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

No branches or pull requests

2 participants