If I simply put a type declaration into the GHCi (version 8.8.4), it complains:
Prelude> divides :: Integer -> Integer -> Bool
<interactive>:18:1-7: error:
Variable not in scope: divides :: Integer -> Integer -> Bool
I'm trying to use Emacs org-mode babel, and I have to wrap the code block to get it to work. For example:
#+begin_src haskell :results verbatim :exports both
:{
factorial :: Int -> Int
factorial 0 = 1
factorial n = n * factorial (n - 1)
:}
#+end_src
#+begin_src haskell :results verbatim :exports both
factorial 0
#+end_src
#+RESULTS:
: 1
I understand :set +m, but this doesn't help. Why won't a running Haskell REPL with set +m take a type declaration?
Lawrence Bottorff
Grand Marais, MN, USA