On Fri, 4 Jan 2013, Miguel Negrao wrote:

I’m happy to report that I’ve found that leksah has a quite nice and working interactive ghci pane. It has a window for writing code (a scratch buffer), where one can use indentation based rules, and it has another pane with all the variables defined so far. To evaluate code one either selects a portion of code or puts the cursor on a line and hits ctrl-enter. It feels very interactive.

Thank you for this hint!


If I want to run multiple IO actions in ghci and bind the result to “variables” that I can use later, is this the best way ?

(engine,r,send) <- do
   engine <- MS.new withDefaultSynth
   let send a = MS.execute engine $ exec_ a
   r <- MS.execute engine rootNode
   return (engine, r, send)

In GHCi you could just write

Prelude> engine <- MS.new withDefaultSynth
Prelude> let send a = MS.execute engine $ exec_ a
Prelude> r <- MS.execute engine rootNode


But if you want to bundle all three actions, then your do-block is certainly the best way.
_______________________________________________
haskell-art mailing list
[email protected]
http://lists.lurk.org/mailman/listinfo/haskell-art

Reply via email to