-
Notifications
You must be signed in to change notification settings - Fork 180
Open
Description
The documentation of Language::discriminant says the following:
Type representing the cases of this language.
Used for short-circuiting the search for equivalent nodes.
Return the
Discriminantof this node.
What properties must this discriminant uphold?
From a quick look at the code, I am inferring that it must:
- Be compatible with
Language::matches: ifa.matches(b)thena.discriminant() == b.discriminant()(and not necessarily the reciprocal) - Be compatible with
Ord: ifa.discriminant() == c.discriminant() && a < b && b < cthena.discriminant() == b.discriminant()
Are there other requirements?
Metadata
Metadata
Assignees
Labels
No labels