Emacs org-mode code block problem

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Emacs org-mode code block problem

Lawrence Bottorff-2
I've got this in an Emacs org-mode code block:

#+begin_src haskell :results output
doubleSmallNumber4 x =
  if x > 0
    then x
    else x * 2
#+end_src

but when I try to run it (with C-c C-c) I get

...
Prelude> doubleSmallNumber4 x =
  if x > 0
    then x
    else x * 2
"org-babel-haskell-eoe"

<interactive>:19:23: error:
    parse error (possibly incorrect indentation or mismatched brackets)
Prelude>
<interactive>:20:11: error:
    parse error (possibly incorrect indentation or mismatched brackets)
Prelude>
<interactive>:21:5-8: error: parse error on input ‘then’
Prelude>
<interactive>:22:5-8: error: parse error on input ‘else’
Prelude> "org-babel-haskell-eoe"
...

I can run

#+begin_src haskell
tripleMe x = x + x + x
#+end_src

just fine though -- which means I've done something right with my Emacs init. The REPL started is 8.6.3 stack-ghci. I've formatted with the org-mode C-c '

LB





_______________________________________________
Beginners mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners