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

Pattern matching against nat #5

Open
robsimmons opened this issue May 10, 2011 · 1 comment
Open

Pattern matching against nat #5

robsimmons opened this issue May 10, 2011 · 1 comment
Assignees
Labels

Comments

@robsimmons
Copy link
Owner

The following code errors in code production when I try to produce a pattern match against the constructor "_plus" corresponding to the built-in interpretation of "A + B".

w: world.

term: string -> t -> rel @ w.       // T
nonterm: t -> t -> t -> rel @ w.    // NT
parse: t -> nat -> nat -> rel @ w.  // PROD
tok: nat -> string -> rel @ w.      // IN

// Generic rules of parsing

term S T, tok I S -> parse T I I.
nonterm X Y Z, parse Y I J, parse Z (J+1) K -> parse X I K.
@ghost ghost assigned robsimmons May 10, 2011
robsimmons added a commit that referenced this issue Feb 14, 2012
…hard to pattern match against an addition, when such an addition is in an input position, we shouldn't be worried about not being able to pattern match against it!
@robsimmons
Copy link
Owner Author

This is like issue #8 but simpler, because here we already know what J is and so it shouldn't be an issue to add 1 to it.

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

No branches or pull requests

1 participant