Haskell在这里有关于"putStrLn"的文档...
https://www.haskell.org/hoogle/?q=putStrLn
但是当我使用IntelliJ IDE(默认的Haskell插件)时,我没有获得文档。自动完成可以用于“putStrLn”,并且在自动完成菜单中显示“String -> IO()”,但是当我按下Ctr-Q或Ctr-Space时,它会显示“未找到文档”。如何在IntelliJ中获得Haskell的弹出式文档?
尝试使用替代的“HaskForce”插件。无法弄清楚如何做基本的“hello world”。 * Haskforce更新 * -- 从获取基本的Haskell内容开始:
https://eschulte.github.io/emacs24-starter-kit/starter-kit-haskell.html
-- 然后获取Haskforce(并卸载IntelliJ的Haskell插件)
-- 然后在“设置”中设置工具
-- 设置编译器设置我打开了“安装Cabal依赖项”,因为当它关闭时,在运行时我会收到这个讨厌的消息:
Information:cabal: Install dependencies
Information:cabal: cabal: Could not resolve dependencies:
Information:cabal: next goal: base (dependency of HaskforceProject-0.1.0.0)
Information:cabal: base>=4.7 && <5)
Information:cabal: 4.6.0.0, 4.5.1.0, 4.5.0.0, 4.4.1.0, 4.4.0.0, 4.3.1.0, 4.3.0.0, 4.2.0.2,
Information:cabal: requires installed instance)
Information:cabal: null
Information:2/8/16 1:23 PM - Compilation completed with 1 error and 0 warnings in 1s 650ms
Error:cabal: install dependencies failed.
设置运行配置(在单击运行箭头之前必须进行“运行>编辑配置”):
当我点击箭头运行时,我收到以下消息:ghc-modi error
Unable to parse problems from ghc-modi: cabal: At least the following dependencies are missing: base >=4.7 && 5 ghc-mod: readProcess: cabal "configure" "--with-ghc=ghc" "--flags" "" (exit 1): failed
请注意,这些屏幕截图来自于在Ubuntu 14.04上进行的全新安装,并且已经通过Ubuntu apt-get包管理器安装了Haskell essentials和Leskah。
通过在.cabal文件中将“base>=4.7 && 5”更改为“base>=4.6 && 5”,使得Haskforce能够正常工作,但仍然没有弹出式文档。
* 更新 *
仍然没有弹出式文档,但我已经为IntelliJ获得了HoogleIt插件,并为Atom获得了一个Hoogle插件,用于在Hoogle(Haskell Google)中搜索函数。
.cabal
文件中有base >=4.7 && <5
的依赖项,但是根据错误信息,你的编译器只支持到4.6
。你应该更新.cabal
文件,将依赖项更改为base >=4.6 && <5
。看起来你可能最初是作为一个stack项目开始的,然后切换到cabal而没有更新你的依赖项。 - pyrospade