A concept for editing Haskell as an AST rather than text
Uploader Comments (ChristopherDone)
All Comments (12)
-
How would you do copy & paste of code segments? Nice idea btw.
-
this looks like it would be useful for writing haskell on touch-based devices
-
@whiteh12 What ideas did you come up with?
-
@mwbuksas This concept editor is just a bit of JS on Chrome. Having the DOM makes it trivial to experiment with. I thought if there was some interest I could put it online, and people could try it trivially. But yeah, the intention would be to make the real (for me) implementation in Emacs with overlays and widgets. I did something similar recently for expanding Show instances (other vids), I think it's quite feasible (albeit perhaps not so fast).
-
I like the idea of working directly with ASTs and Haskell seems like a good choice. What is your editor implemented in? It looks like it could be in emacs, using the configuration mode widgets.
Looks intresting, could you put it online (or even on github) so that I could play with it? (Maybe try adding some vi-like keybinding to it ;)
pawelmurias 2 months ago
@pawelmurias github.com/chrisdone/structural
ChristopherDone 2 months ago
That's exactly what I want. Do you have public code for this?
Inh2l 2 months ago
@Inh2l github.com/chrisdone/structural
ChristopherDone 2 months ago
You can build this with Xopus. You need to create an XML Schema to describe the AST and an XSLT to display the AST. We don't have an example like this, the closest is the recipe demo.
sjoerdvisscher 2 months ago
@sjoerdvisscher Looks like a nice product from the videos and the demos. But this is just a concept, in a file of JS I whipped up this evening, so that I can let people try it online, to be ported to Emacs later, not something I'm willing to pay €900 for. Not that I don't love writing XML schemas and XSLT. :-)
ChristopherDone 2 months ago