适用于 Windows 的 Haskell IDE?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/734309/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 06:15:35  来源:igfitidea点击:

Haskell IDE for Windows?

windowshaskellide

提问by Peter

I really searched on this one. (E/TextMate is the closest I found in this topic, but it doesn't seem to be that big of deal)

我真的搜索了这个。(E/TextMate 是我在本主题中找到的最接近的,但似乎没什么大不了的)

I tried emacs, but I don't seem to find a Haskell Mode for Windows.. VisualHaskell doesn't seem to follow the new VisualStudio updates...

我试过 emacs,但我似乎没有找到适用于 Windows 的 Haskell 模式.. VisualHaskell 似乎没有遵循新的 VisualStudio 更新......

I could try VIM, but does the Haskell Mode works for Windows there?

我可以尝试 VIM,但是 Haskell 模式在那里适用于 Windows 吗?

Sigh... All the time the 'close but no cigare' feeling.

叹息... 一直有“接近但没有香烟”的感觉。

Is there actually so out there programming Haskell under Windows?

在 Windows 下真的有编程 Haskell 吗?

采纳答案by Don Stewart

I think the main IDE-ish options for Windows are, in order:

我认为 Windows 的主要 IDE-ish 选项按顺序是:

  1. Using Eclipse as your Haskell IDE
  2. Leksah, an integrated IDE for Haskell written in Haskell.
  3. Visual Haskell(unknown recent status)
  4. Vim + Haskell
  5. Emacs + Haskell
  1. 使用 Eclipse 作为你的 Haskell IDE
  2. Leksah,一个用 Haskell 编写的 Haskell 集成 IDE。
  3. Visual Haskell(最近状态未知)
  4. Vim + Haskell
  5. Emacs + Haskell

I use option 4.

我使用选项 4。

回答by kros

Tip for Emacs on Windows:

Windows 上的 Emacs 提示:

  • Download ntemacsand extract ntemacs24-bin-xxxxxxxx.7z in your favourite location e.g. D:\
  • Create desktop shortcut for D:\ntemacs24\bin\runemacs.exeand run Emacs
  • Go to C:\Users\UserName\AppData\Roaming\.emacs.d\
  • Create a directory haskell-modeand put in it files: haskell-mode.el, haskell-font-lock.el, haskell-doc.elfrom Haskell mode for Emacs
  • In ..\emacs.d\create a file init.el
  • 下载ntemacs并将 ntemacs24-bin-xxxxxxxx.7z压缩到您喜欢的位置,例如D:\
  • D:\ntemacs24\bin\runemacs.exeEmacs创建桌面快捷方式并运行
  • C:\Users\UserName\AppData\Roaming\.emacs.d\
  • 创建一个目录haskell-mode并放入文件:haskell-mode.el, haskell-font-lock.el, haskell-doc.elfrom Haskell mode for Emacs
  • ..\emacs.d\创建文件init.el

First 8 lines are optional and depend on the preferences.

前 8 行是可选的,取决于偏好。

(tool-bar-mode -1)
(scroll-bar-mode -1)
(setq-default truncate-lines t)

(setq line-number-mode t)
(setq column-number-mode t)

(set-keyboard-coding-system 'cp1250)
(prefer-coding-system 'windows-1250)

(set-face-attribute 'default nil :font "Consolas-11")

(setq-default indent-tabs-mode nil)
(setq default-tab-width 4)

(load "~/.emacs.d/haskell-mode/haskell-mode")

(add-to-list 'auto-mode-alist '("\.hs\'" . haskell-mode))
(add-to-list 'auto-mode-alist '("\.lhs\'" . literate-haskell-mode))
(add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)

That's it!

就是这样!

Ps Komodo Edithas syntax support for Haskell.

Ps Komodo Edit对 Haskell 有语法支持。

回答by Michael Powell

Another option is Sublime Text, which is easily the best general-purpose code editor I've encountered. It generally fills the same niche as Vi/Vim or EMACS, but generally follows modern interface standards, and has some really useful features that I haven't seen in any other editors, such as the minimap and multi-selection (hit ctrl-d with some text selected, and it will select the next instance of the same text, while still keeping the old selection intact, essentially putting your input cursor in two places, so you can edit them both in tandem).

另一种选择是Sublime Text,它很容易成为我遇到的最好的通用代码编辑器。它通常与 Vi/Vim 或 EMACS 相同,但通常遵循现代界面标准,并且具有一些我在任何其他编辑器中从未见过的非常有用的功能,例如小地图和多选(按 ctrl-d选择一些文本,它将选择相同文本的下一个实例,同时仍然保持旧的选择不变,基本上将输入光标放在两个位置,因此您可以同时编辑它们)。

The standard download comes with basic Haskell syntax highlighting. If you want more functionality, there is a plug-in called SublimeHaskell that adds Cabal support for much smarter auto-completion and limited linting. To install that, you first want to install Sublime Package Control(very easy to do, just copy a string from their Installation section into Sublime's internal command-line), restart Sublime, and use the package control to install SublimeHaskell (hit ctrl-shift-p, type "package", select "Package Control: Install Package", then type "haskell" and select "SublimeHaskell", then restart Sublime).

标准下载带有基本的 Haskell 语法突出显示。如果您想要更多功能,有一个名为 SublimeHaskell 的插件,它为更智能的自动完成和有限的 linting 添加了 Cabal 支持。要安装它,你首先要安装Sublime Package Control(很容易做到,只需从他们的安装部分复制一个字符串到 Sublime 的内部命令行),重新启动 Sublime,然后使用包控制安装 SublimeHaskell(点击 ctrl-shift -p,输入“package”,选择“Package Control: Install Package”,然后输入“haskell”并选择“SublimeHaskell”,然后重启Sublime)。

It even has the ability to build from within the editor (Tools -> Build, or ctrl-b). This feature only supports a limited set of languages, but fortunately Haskell is one of them.

它甚至可以在编辑器中进行构建(工具 -> 构建,或 ctrl-b)。此功能仅支持有限的语言集,但幸运的是 Haskell 是其中之一。

回答by Nikita Volkov

SublimeText

崇高文本

Sublime Textis a very stylish and comforting editor. It's not an IDE but it can build your project, work with it as a project and is highly customizable. In difference to IDEs it's very lightweight and the "Distraction free" feature is just mindblowing. It is also cross-platform, seamlessly supporting all three major OSs.

Sublime Text是一个非常时尚和舒适的编辑器。它不是一个 IDE,但它可以构建您的项目,将其作为一个项目使用,并且是高度可定制的。与 IDE 不同的是,它非常轻巧,“无干扰”功能令人兴奋。它也是跨平台的,无缝支持所有三个主要操作系统。

After installation of Soda Themeit becomes even more pleasant for the eye.

安装Soda 主题后,它变得更加赏心悦目。

SublimeHaskell plugin

SublimeHaskell 插件

There is also a third party plugin SublimeHaskell, which enables the editor with in depth support for cabal, linting, autocompletion and stuff like that.

还有一个第三方插件SublimeHaskell,它使编辑器能够深入支持 cabal、linting、自动完成等类似的东西。

The only thing the SublimeText solution cannot do yet is refactoring, but then again none of the competing solutions can.

SublimeText 解决方案还不能做的唯一一件事是重构,但再一次,没有一个竞争解决方案可以。

回答by Rayne

Emacs works fine on Windows. I used it when I worked with Haskell on Windows. So, that's my recommendation.

Emacs 在 Windows 上运行良好。我在 Windows 上使用 Haskell 时使用过它。所以,这就是我的建议。

回答by Murat

Leksah is not bad, install haskell platform, then download the latest Leksah, you're all set. it's not as robust as VS, but it has other qualities which make me enjoy using it, including ease of creating cabal packages, syntax highlighting, auto-completion of function names (they should extend this to syntax as well), function search, etc.

Leksah还不错,安装haskell平台,然后下载最新的Leksah,大功告成。它不如 VS 健壮,但它具有其他让我喜欢使用它的品质,包括易于创建 cabal 包、语法突出显示、函数名称的自动完成(它们也应该将其扩展到语法)、函数搜索等.

回答by strider

Leksah looks very much like a Linux application, you will see it more when you try to open a file. It does not look like a windows native app. Otherwise, its OK. Eclipse is always good but they say on their website that they have Haskell as their foremost thing right now (2/26/2011). I should look at other options too, so far I have also used Notepad++.

Leksah 看起来非常像 Linux 应用程序,当您尝试打开文件时,您会看到更多。它看起来不像 Windows 本机应用程序。否则,它确定。Eclipse 总是很好,但他们在他们的网站上说他们现在最重要的是 Haskell (2/26/2011)。我也应该看看其他选项,到目前为止我也使用过 Notepad++。

回答by Evgeny Lazin

Visual Haskell works fine for me.

Visual Haskell 对我来说很好用。

回答by uriDium

I did some Haskell back at varsity and I must admit that I used notepad. There wasn't an IDE back then.

我在大学期间做了一些 Haskell,我必须承认我使用了记事本。那时还没有 IDE。

回答by Macker

haskellmode-vim works just fine on Windows -- I use it there. It's my preferred Haskell IDE.

haskellmode-vim 在 Windows 上工作得很好——我在那里使用它。这是我首选的 Haskell IDE。

See http://projects.haskell.org/haskellmode-vim/

http://projects.haskell.org/haskellmode-vim/