如何为 Eclipse 安装和配置 EclipseFP Haskell 插件?

发布于 2024-10-09 03:31:39 字数 285 浏览 0 评论 0原文

有做过这件事的人可以告诉我具体该怎么做吗?缺乏文档,其中的内容不完整且不正确。

我已经安装了该插件,并告诉它使用我作为 Haskell 平台一部分的 GHC 安装,但运行方式.. 只显示运行 GHCi 会话。根据备忘单,我应该看到 Haskell 应用程序。

还缺少关于在哪里找到 Hugs 可执行文件的说明,以及 Haskell 首选项似乎建议我应该安装的 Cabal 安装。

谁能指出我错过了什么?

我是 Haskell 初学者,因此尝试设置 Eclipse,以便我可以使用它......

Can somone who has done this tell me exactly what to do? The documentation is lacking and what is there is incomplete and incorrect.

I've got the plugin installed, and told it to usethe GHC installation that I have as part of the Haskell Platform but Run As.. only shows me Run GHCi session. According to the cheat sheet, I should see Haskell Application.

Also missing are instructions for where to find the hugs executable, and the Cabal installation that the Haskell Preferences seems to suggest I should have.

Can anyone point out what I've missed?

I'm a Haskell beginner, hence trying to get Eclipse set up so I can play with it...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

薯片软お妹 2024-10-16 03:31:39

目前似乎没有办法创建非交互式启动配置
通过图形用户界面。但是,您可以通过手动编辑配置文件来做到这一点。以下说明适用于 Eclipse 3.5.2、EclipseFP 2.0.2:

  1. 确保存在 GHCI 配置。
  2. 关闭日食。
  3. 转到工作区根目录中的目录 .metadata/.plugins/org.eclipse.debug.core/launches 。
  4. 应该有一个名为“Main (project src).launch”之类的文件。将其复制到您想要的任何名称下,例如“Run Main.launch”
  5. 在文本编辑器中打开复制的文件,并将选项 --interactive 替换为 -e main
  6. 保存文件并启动 eclipse。您应该看到新的运行配置“Run Main”。当您运行它时,EclipseFP 会执行您的 Main.hs 文件,将输入和输出重定向到控制台视图。

另外,看来你还没有配置 cabal。您首先需要安装它(从您的发行版存储库,或者如果您使用的是此处)视窗)。然后转到 Scion 和 Cabal 首选项,并将它们指向您的 cabal 可执行文件。单击“确定”后,Scion 的编译应该开始。如果出现错误,请阅读缺少哪些软件包并通过cabal install pkg-name安装它们。 (我必须安装 happy with --global 标志,对于 QuickCheck,我必须手动设置 2.* 版本)。要重新运行 Scion 编译,请重新启动 Eclipse。

It seems that currently there is no way to create a non-interactive launch configuration
via GUI. However, you can do that by manually editing config files. The following instructions work with Eclipse 3.5.2, EclipseFP 2.0.2:

  1. Make sure there exists a GHCI configuration.
  2. Close Eclipse.
  3. Go to directory .metadata/.plugins/org.eclipse.debug.core/launches in the root of your workspace.
  4. There should be a file named something like "Main (project src).launch". Copy it under whatever name you wish, for instance "Run Main.launch"
  5. Open your copied file in a text editor and replace the option --interactive with -e main.
  6. Save the file and start eclipse. You should see the new run configuration "Run Main". When you run it, EclipseFP executes your Main.hs file, redirecting both input and output to the console view.

Also, it seems that you haven't configured cabal yet. You first need to install it (from your distribution repositories, or here if you're using Windows). Then go to Scion and Cabal preferences and point them to your cabal executable. After you click OK the compilation of Scion should start. If it gives you errors, read what packages are missing and install them via cabal install pkg-name. (I had to install happy with --global flag, and for QuickCheck I had to manually set the 2.* version). To rerun Scion compilation, restart Eclipse.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文