Sorry, I didn't read carefully. That's exactly what Luke was explaining... On Sat, Jan 5, 2013 at 9:37 AM, Renick Bell <[email protected]> wrote: > You can do multiline evaluation in ghci with regular indentation > (without internal braces) by preceding and following up your code like > this: > > Prelude> :{ > Prelude| do putStrLn "first line" > Prelude| putStrLn "second line" > Prelude| :} > first line > second line > Prelude> > > I use the tslime plugin in vim and this in my .vimrc to do it all in > one keystroke, but I imagine you could also get emacs to add the > braces for you: > > map <F11> :call Send_to_Tmux(":{\n")<CR>vip:normal @g<CR>:call > Send_to_Tmux(":}\n")<CR>k > > Best, > > Renick > > On Sat, Jan 5, 2013 at 9:20 AM, Miguel Negrao > <[email protected]> wrote: >> >> A 04/01/2013, às 17:35, Henning Thielemann escreveu: >>> >>> 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. >> >> Yes, I know that I can evaluate line by line, but that can get boring pretty >> fast. When doing interactive evaluation sometimes one wants to evaluate a >> group of statements and do multiple bindings, so yeah, I guess I have to do >> it that way then. >> >> A 04/01/2013, às 23:38, Luke Iannini escreveu: >> >>> 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). >> >> >> The hsc3 mode in emacs also has multiline evaluation, that was not the >> issue, the issue was evaluating expressions that use the indentation rules >> (so no { } in do blocks, etc ). >> >> best, >> Miguel >> http://www.friendlyvirus.org/miguelnegrao/ >> >> >> >> >> >> _______________________________________________ >> haskell-art mailing list >> [email protected] >> http://lists.lurk.org/mailman/listinfo/haskell-art > > > > -- > Renick Bell > - http://renickbell.net > - http://twitter.com/renick > - http://the3rd2nd.com
-- Renick Bell - http://renickbell.net - http://twitter.com/renick - http://the3rd2nd.com _______________________________________________ haskell-art mailing list [email protected] http://lists.lurk.org/mailman/listinfo/haskell-art
