Should assertions, annotations and opaque, and top level be primitives?
umazalakain opened this issue · comments
TypeAssertion
, TypeAnnotation
, Opaque
and TopLevel
are the only primitives that contain expressions. They often need to be treated especially by traversals (e.g. if you want to define alpha equivalence on expressions with annotations you better step into the annotations too). Would it be sensible to make them first class members of the AST? If #134 goes through we could potentially only ever have them in the untyped fragment of the language.
I think that it makes sense for assertions, annotations and opaques to be proper language constructs because they can contain other language constructs: they are not leaf nodes like primitives should be in my opinion. Thoughts @michel-steuwer @fedepiz ?