In an org-mode file:

#+BEGIN_SRC haskell
let x = "test"
putStrLn x


executing Haskell code block...
if: ‘org-babel-script-escape’ expects a string
  • My guess would be: a mismatch between Haskell mode and Org mode versions. So, I'd try experimenting with different versions of both.
    – wvxvw
    Sep 24, 2017 at 4:59
  • You don't want let in a Haskell babel code block. let is for the feeding lines into the REPL one-by-one.
    – 147pm
    Mar 22, 2020 at 16:56

2 Answers 2


I've solved it writing the header argument :results output after the declaration of the language in the head of the block source.

#+BEGIN_SRC haskell :results output


I didn't manage to comprehend the source code inducing the error, but...

I have same error with #+BEGIN_SRC haskell.

However, #+BEGIN_SRC haskell :results value :eval (inferior-haskell-start-process) works for some reason.

I have

haskell-mode       20180601.143  installed
org                9.1.13        installed

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.