如何在 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 时(文件名中没有空格)。
关于haskell - 你如何在 Notepad++ 上编译和运行haskell,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14417327/