我在跑:
- GNU Emacs 24.4.1
- 堆栈版本 1.3.3
- 组织模式
- 哈斯克尔模式
我浏览过:
- Emacs 组织模式和读写 Haskell
- https://gist.github.com/reetinder/4022989
- https://wiki.haskell.org/Emacs/Literate_programming
- https://wiki.haskell.org/Literate_programming
- https://github.com/haskell/haskell-mode/issues/1429
虽然上面的要点看起来很有希望,但我还没有找到任何看起来是让 org-haskell 运行的权威方法(例如,melpa 上什么都没有),当然也没有任何东西专门针对运行堆栈环境而不是使用我的全球 ghc 将需要。
当我尝试:
#+BEGIN_SRC haskell
let x = "test"
putStrLn x
#+END_SRC
我明白了
执行 Haskell 代码块
...永远挂起。当我 Cg 时,我看到:
GHCi, version 7.6.3: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Some flags have not been recognized: prompt2, ghci |
ghci λ> let x = "TESTING!"
putStrLn x
"org-babel-haskell-eoe"
Prelude|
<interactive>:4:1: parse error on input `putStrLn'
ghci λ> "org-babel-haskell-eoe"
当我切换到 haskell 缓冲区时,我看到它已经真正评估了我发送的内容,它只是有这个 org-babel-haskell-eoe 错误并且永远不会将控制权返回给我的 org 会话。
这是因为我有一个自定义提示吗?使用 lambda 而不是 Prelude> ?