0

Pressing C-c C-l (for a simple "Hello, world!" script) in interactive-haskell-mode gives me the error message

Format specifier doesn't match argument type

whereas I would have expected the file being executed in a new buffer (resulting in the output `Hello, world!").

The script consists fo the single line

main = putStrLn "Hello, world!"

I cannot make much sense of the error message. Does anyone has an idea which additional diagnostics I could run in order to pin down the problem?

There is a loosely related (open) issue on GitHub https://github.com/haskell/haskell-mode/issues/1429 resulting in the same error message for Haskell snippets in org-mode.

I'm using Emacs 25.2.2 from the official package on 64-bit Ubuntu 18.0.4 and also the haskell-mode package from the official repositories.

4
  • Can you show the code you use? You have an error message from using a script, apparently, but you don't show the code of that script. – Drew Nov 28 '20 at 16:19
  • Thanks for your hint. I added the content of the script. I hadn't put it in the first place because I think the message is an error message from Emacs (and not from the Haskell interpreter). – NicolasBourbaki Nov 28 '20 at 16:54
  • C-c C-l is bound to haskell-process-load-file. The Format specifier doesn't match argument type is an elisp error message as far as I see. The Haskell script runs without problems in the Haskell interpreter (and can also be compiled without problems. – NicolasBourbaki Nov 29 '20 at 20:24
  • There is a related issue on GitHub <github.com/haskell/haskell-mode/issues/1480> describing how to set up interactive-haskell-mode. – NicolasBourbaki Dec 25 '20 at 16:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.