New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Finish the EncodeTCM
instance for DisplayInfo
#4183
Comments
Reference: f9915d9 |
* [ revert ] Revert * [ #4183 ] Apply exiting json branch * [ #4183 ] Pretty print abstract expressions * [ #4183 ] Pretty print compute-mode, add instances * [ #4183 ] Pretty print goal-type aux * [ #4183 ] Pretty print contexts * [ #4183 ] Pretty print rewrites * [ #4183 ] Pretty print commandState
Hope that this will be useful https://github.com/banacorn/agda/blob/json/src/full/Agda/Interaction/JSONTop.hs#L80 Here's the serialization of all of the concrete syntax tree: https://github.com/banacorn/agda/tree/json/src/full/Agda/Interaction/JSON/Syntax |
Wow look at that. Is this thing ready or there's something missing? |
I've pushed a modified version of this into the current master Agda |
I've built a prototype last year (with agda-mode on Atom as the frontend). |
Cool, but you don't have access to the TCM do you? And does that mean you don't have contextual information? |
I have access to the TCM, and in fact most of the serialization would need to be done in the TCM. Edit: relevant PR #3192 |
It would be nice if we can serialize stuff without the TCM, but that's a lot of work. |
I tend to include (and keep it even after the entire AST serialization is implemented) a pretty-printed term because this interface can be used in many places and we shouldn't need to always impl full AST deserialization. |
We can add some flags for different "depths" of serialization, but then there will be the problem of "where to draw the line". |
I'd say it's not necessary, we can simply include all the info. I believe modern deserializers will allow ignoring unknown fields :). |
@ice1000 what's the status on this issue? |
I'm not sure, there's a lot of thins can be made, but speaking of |
Probably not, I just saw some |
ToJSON
instance for DisplayInfo
EncodeTCM
instance for DisplayInfo
Will be closed by #4213 |
agda/src/full/Agda/Interaction/JSONTop.hs
Lines 44 to 110 in ed526b5
And I need this for a toy I'm working on. Probably taking this myself.
The text was updated successfully, but these errors were encountered: