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