haskell - 你如何在 Notepad++ 上编译和运行haskell

标签 haskell notepad++ ghc

如何在 notepad++ 上编译和运行 Haskell
我安装了插件 NppExec,然后按了 F6
我将 Haskell 文件保存到 C:\Users\Sam\Desktop\haskell files\new 3.hs
所以在我按下 之后的命令F6 我尝试输入一些不同的内容:

C:\Users\Sam\Desktop\haskell files\new 3.hs`
ghc.exe new 3.hs
haskell new

但我得到了这些回应:
C:\Users\Sam\Desktop\haskell files\new 3.hs
CreateProcess() failed with error code 2:
The system cannot find the file specified.

ghc.exe new 3.hs
Process started >>>
target `new' is not a module name or a source file
<<< Process finished.

haskell new 3
CreateProcess() failed with error code 2:
The system cannot find the file specified.

================ READY ================

在 Notepad++ 上的haskell文件中编译和执行的正确方法是什么?

最佳答案

你需要设置NppExec在当前目录下工作,所以在Plugins,NppExec,打勾Follow $(CURRENT_DIRECTORY) .

使用命令ghc new3.hs当您按 F6 时(文件名中没有空格)。

Follow current directory

关于haskell - 你如何在 Notepad++ 上编译和运行haskell,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14417327/

相关文章:

仅相差一个字符的字符串

function - 在 GHCi 中,为什么函数箭头 `:kind (->)` 的类型包含问号 `(->)::?? -> ? -> *` ?

haskell - 循环一元谓词

Notepad++:如何绑定(bind) Ctrl-e 到行尾

haskell - 监测 GHC 事件

haskell - 未找到堆栈初始化包

regex - 如何在 Notepad++ 中替换组的正则表达式

regex - PCRE 正则表达式替换双引号内的文本模式

haskell - Yesod 使用 GHCI 而不是 GHC 实时重载《哈姆雷特》?

pointers - 为什么带有多态 Ptr 的 `peek` 在与绑定(bind)一起使用时会返回 GHC.Prim.Any?