[m-users.] Key not found bug: resolution, my bad....again. Meh.
Sean Charles (emacstheviking)
objitsu at gmail.com
Sun Dec 19 20:44:22 AEDT 2021
Thanks to Zoltan for tracing it…it seems I have a penchant for naming my modules with the same names as the core set without noticing.
I had recently created a module called pprint, having failed to notice it in the list when doing
mmc-doc —list-modules
The pretty_printer one I noticed but why oh why I failed to spot `pprint` a mere two lines above in the monochrome terminal noise, heavens only know.
Ironically I had shied away from using the pretty_printer months and months ago as it ‘looked complicated’ but my Mercury experience has grown a lot since then, so in light of this recent fiasco of my making, I decided to give it a go and well, talk about pleasantly surprised!
I had written my own ANSII coloured pretty printer specifically for viewing parse trees but I am now at the syntax and structure checking phase, and I tried the stock PP on the output of my pre-render phase, I love it!
I have many phases as this project is intended to be industrial grade bullet proof when done (if ever) which is why I eventually decided to use mercury for it, despite only finding evidence of one commercial product having been written in it, the Prolog and Haskell junkie in me knew it was the way forward, and so far, despite the odd hiccup and huge learning curves here and there, I remain very happy with my choice of implementation language.
I enclose a small screen-grab of my REPL in colour mode, it shows the coloured output from the lex command and the tree buld command, and the stock pretty printer showing the structured output that is a series of rendering instructions to the final stage, after any macro expansion (way in the future but planned) has taken place etc. The REPL is intended to be a playground / sandbox for new users to get the feel of how it all works, it has an edit facility (shells out to FELT_EDITOR), and help pages for all the instructions taken from http://felt-lang.com <http://felt-lang.com/> etc etc. It’s a mountain of work left to do but C code generation is close to being viable, it just needs some tweaking to the the type management at render time and also some porting of the SWI prolog code I have to generate a print() format string based on the argument types to my EMIT instruction.
https://pasteboard.co/Oi2FEXuR9KYC.png <https://pasteboard.co/Oi2FEXuR9KYC.png>
Thank you again Zoltan and everybody else who has nudged me away from the rocks, great stuff!
Sean
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurylang.org/archives/users/attachments/20211219/91cbe2eb/attachment.html>
More information about the users
mailing list