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
Parmatch: introduce a type for simplified pattern heads #8766
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Glad to see a bunch of assert false
go away.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the code. Nevertheless, I have some small minor nitpicking remarks. In particular, the code often uses names of the form d...
for pattern head variables. Could we use more mnemonic names? Like h..
as a shorthand for head
(which is also used) for instance?
; typ = Ctype.none | ||
; env = Env.empty | ||
; attributes = [] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor nitpicking: why not use make
at this point?
Note from a brief discussion with @trefis. In a future PR it might be worth adding a version of |
I have thought about extending the notion of head to or-patterns (which may have several heads). One property that we lose as soon as we leave the fragment of simple patterns is the equivalence between So I think that rather than extending |
@Octachron I updated as you suggested. I'll clean up the history and merge later today.
I believe that is what @lpw25 was suggesting. |
Ah, I realize I forgot to answer:
|
I pushed some minor renaming along these lines, but things were mostly OK IMO. |
The renamings look nice (in particular in |
I rebased and cleaned up the history. |
Parmatch: introduce a type for simplified pattern heads
This is a mostly mechanical change, that has been a long time coming.
I think @lpw25 is a good candidate to review this, given that he too had wanted to implement this (or a similar) idea for a long time.