hspec / sensei

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Repl inside sensei?

fisx opened this issue · comments

This is a feature request. If you agree to the idea, there is a small chance that I'll come back with an implementation.

My work flow is often to load the module I am working on into ghci (with -fdefer-type-errors and everything), evaluate expressions and commands in the repl, and copy code back from there into the module. It would be nice if sensei would allow me to do that on top of running the test suite for me.

Options I could think of:

  1. read one line of input from the socket, eval it, and send the output back over the socket. I could operate this using nc as a client.
  2. add a second http endpoint that takes a string body with one or more lines, and evaluates those in the given order.
  3. (on top of either of the above) add a --repl flag to seito and expose a repl with readline support.

From (2), one could build a little web app using ghcjs that allows to browse the history of test suites, and has a little repl pane somewhere.

Sorry that I am making so much noise today. (-:

What I do is having both sensei and a ghci session running separately at the same time.

Except for resource usage, what do you think are the advantages of sensei taking over both parts?

If there is no strong case for it, I would follow the Unix philosophy here.

You're right. My idea is slightly more convenient at the surface, but over-complicates things.

thanks-