gpt4 book ai didi

haskell - 如何让 Haskell 文档出现在 IntelliJ 中?

转载 作者:行者123 更新时间:2023-12-02 10:49:10 24 4
gpt4 key购买 nike

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(并卸载 Haskell Plugin for IntelliJ)

Haskforce Plugin

-- 然后在“设置”中设置工具

Haskforce Tools

-- 设置编译器设置

Haskforce compiler settings

^ 我打开了“安装 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.

设置运行配置(“运行 > 编辑配置”必须在单击“运行”箭头之前完成):

Run Configuration

当我单击箭头运行时,我收到以下消息:

Not Working

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) 中搜索函数。

最佳答案

解决方案是使用 Hoogle 插件。 IntelliJ 有一个 HoogleIt 插件 (Ctr-Shift-H),可以在 Hoogle 中搜索 Haskell 函数。 Atom 文本编辑器有类似的插件。

IDE 中的 Haskell 不提供 Javadoc 样式文档。

关于haskell - 如何让 Haskell 文档出现在 IntelliJ 中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35259912/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com