hydra icon indicating copy to clipboard operation
hydra copied to clipboard

Eliminate annotation classes

Open joshsh opened this issue 2 years ago • 1 comments

Previously, most of Hydra's core types were parameterized by an "annotation" type, which allowed different forms of annotation to be used in different contexts. As this greatly complicated the code base for little benefit, the annotation type parameters have been removed (in #103, still in progress). Instead, key/value maps of strings to Terms are used everywhere. Now, also remove the legacy AnnotationClass typeclass and simplify the code accordingly.

joshsh avatar Nov 16 '23 19:11 joshsh

Additionally, get rid of the Kv type. Hydra uses a type called Kv ("key/value", chosen for brevity because it used to appear everywhere in type signatures) for attaching annotations to terms and types. This type was created at a time when annotations were parameterized, and other types could also be used. Now, the type is superfluous. The "Annotated" type should just contain a key/value map. Additionally, consider unifying that key/value map with the 'let' binding map.

joshsh avatar Nov 26 '23 15:11 joshsh