Closed florentc closed 2 years ago
Closing this to avoid stale PR since we eventually decided not to implement this for the moment. Given that the feature would require non trivial redesign and changes (it needs to be able to know about features of the concrete language at the abstract systemF level where there is no reason to carry the info: e.g. about whether a function is represented by an infix operator in the concrete language we target) while having the feature itself is a low priority.
This addresses #126. Right now, declarations (types and terms) are pretty-printed to a format that is not the Pirouette surface language. This PR provides a pretty-printer that produces declarations following the concrete syntax of the surface language.
For now, datatype declarations are handled. Printing of function declarations remains to be implemented.
==
) in the concrete example language is not available at the level of the very generic printer for systemf applicationApp
Eventually, maybe this should be provided as an additionnal pretty-printer besides the existing one (instead of replacing it) because there is additional info (e.g. De Bruijn indexes, destructors) that do not appear in the concrete syntax of the surface language which may come in handy when debugging.