Hi Ihor, Sorry for the delay. Bruno Barbier writes: > Ihor Radchenko writes: > >> Bruno Barbier writes: >> >>> Note that I've changed the tests about errors; I'm now expecting >>> ob-haskell to raise errors. I'm not sure what we should expect to be >>> consistent with other org babel backends. >> >> Errors are usually displayed separately, using >> `org-babel-eval-error-notify'. > > I'll see what can be done with GHCi and use this if possible. Unfortunately, no progress on this. And I don't really have time to work on this. >>> +;; To increase the chances of failure when running tests, you can use this command line: >>> +;; .. >>> +;; | ghci | 9.0.2 | >> >> You can probably remove this. > > Definitely. I'll do. Thanks. Done. >>> + (when (and session-name (string= session-name "none")) >>> + (setq session-name nil)) >>> + (unless session-name >>> + ;; As haskell-mode is using the buffer name "*haskell*", we stay >>> + ;; away from it. >>> + (setq session-name (generate-new-buffer-name "*ob-haskell*"))) >> >> This will make ob-haskell spawn a separate ghci process buffer every >> single time a user runs non-session src block. And the buffer is not >> closed after getting the result. > Very good point! > > I will update this to use the same buffer named "*ob-haskell*" when the > user doesn't set the session name. I guess it's consistent with other > org-babel backends. I've changed the way session works. 'ob-haskell' should now destroy temporary sessions. Thanks again for spotting that mistake. Let me know if you see further improvement before pushing this. Thanks, Bruno