And just to note, it should be possible to add support for multi-line GHCi
evaluation in emacs — you just need to wrap the lines being sent in :{ and
:} (you can use those commands in ghci to write and run multiline code).

I have this in my SublimeGHCi plugin for Sublime Text
https://github.com/lukexi/SublimeGHCi/blob/master/interpret_haskell.py
but beware it's an alpha that I haven't played with in a while;
incidentally I /also/ wrote it for playing with hsc3 :D

Best
Luke


On Fri, Jan 4, 2013 at 9:35 AM, Henning Thielemann <
[email protected]> wrote:

>
> 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
>
>
_______________________________________________
haskell-art mailing list
[email protected]
http://lists.lurk.org/mailman/listinfo/haskell-art

Reply via email to