Closed doyougnu closed 1 year ago
Hi! Thanks so much for the PR. I'm glad to see a Haskell contribution, I'm only an amateur but it's my favourite language I've used so far! (Though, I can tell that much of your code will be reusable for different input languages)
I'm a bit ashamed of the state of the repo. Frankly, I only used it for my own project too, namely an electronic lab book for my PhD work. I don't even have CI set up, and right now this PR fails my tests (which only test a trivial bit of Python code as of now.) I'm a tad busy now as my PhD defense is in a few days' time, but I'll look into it as soon as I can so that the PR can be merged. It shouldn't be a difficult fix.
Thanks again :smile:
Hey! No worries! I'll intern this in my own book because I want to keep developing the Haskell features. The next one on my list is to steal some code from docutils so I can have the book test the output of code blocks against the cached version. That way I can have CI for my own book.
But please don't feel pressured and absolutely put the PhD before this sort of work. I remember going through the final hoops of my PhD and I all the stress that entails. Best of luck!
Well, that's awkward; I squashed the last two commits and then promptly pushed the wrong thing to your fork (some aspects of git are clearly still beyond me). Now the PR is closed (sorry), but I merged it into master anyway so you are now a contributor. 😅
Thanks! And of course, please feel free to take any or all of the code and use as you wish!
Hi there,
In pursuit of #7
This PR:
runghc
, run arbritrary code withghci
(which means you can even get type signatures and load packages in the interactive process) and runscabal
andstack
targets.I've only tested this for my own project and haven't updated the README to explain the new directive options. Key to the new options are just to let the author of the book send commands to the extension. I think this a better and simpler design than trying to discover the right project directory or something like that. This also allows for a user to run
cabal repl
orstack repl
in a code block instead ofghci
but I didn't test it.Most of the changes should be fairly straightforward, but please do not hesitate if you have any questions.