melt-umn / silver

An attribute grammar-based programming language for composable language extensions
http://melt.cs.umn.edu/silver/
GNU Lesser General Public License v3.0
59 stars 7 forks source link

Deriving mechanism for Eq/Ord #774

Closed krame505 closed 1 year ago

krame505 commented 1 year ago

Changes

Add support for deriving for Eq and Ord. This is needed for #556 since datatypes don't have inh attributes, so equality/ordering attributes are no longer an option. Also this handles polymorphic nonterminals like Maybe or Pair, where additional constraints are needed on the generated instance, where equality/ordering attributes were not an option.

Documentation

https://github.com/melt-umn/melt-website/pull/51, also added tests.