Open mrkgnao opened 6 years ago
Can you, please, provide a little more detail on this?
Thanks!
@adicirstei done (check the first comment in this thread).
Note that, if you're looking for issues to fix, https://github.com/owickstrom/idris-vimscript/issues/7 is probably an even better first issue than this.
Thanks, @mrkgnao ! I'll have a look.
Cheers!
Currently, the code generator outputs Vim functions with horribly long names, leading to code like
It would be nice if a
LineComment
could be inserted before every function declaration annotating it with the original, un-mangled name that the Idris elaborator gives us. For instance, something likewould be great.
This would entail either passing around the original names in addition to the mangled names produced by the
vimName
function, or decoding the mangled names after code generation.The former is technically better and easier to extend (with, e.g. source locations) later, but will (as far as I can tell) involve a fair amount of refactoring to do the "passing around" of source information.
The latter is simpler, and should be easy to achieve. The decoding algorithm can be found here:
https://hackage.haskell.org/package/zenc-0.1.1/docs/src/Text-Encoding-Z.html
(That's where I copied the code in
IRTS.CodegenVim.Internal.ZEncoding
from.)