我目前正在评估Visual Studio Code中的Haskero作为替代 Haskell 编辑器,而不是Atom和Atom-Haskell。到目前为止,Haskero似乎很有希望,但我错过了通常从Atom-Haskell获得的编译器警告。
作为说明问题的一种方式,请考虑以下简单的再现:
重现步骤
- 打开已安装Haskero 的Visual Studio Code
- 添加一个新的 Haskell 文件:
Repro.hs
- 将以下内容添加到文件中
- 按保存
文件内容:
module Repro where
foo :: Maybe a -> a
foo (Just x) = x
预期行为
编辑应发出警告:
Pattern match(es) are non-exhaustive
In an equation for `foo': Patterns not matched: Nothing
Atom-Haskell就是这样做的。
实际行为
什么都没发生。问题视图只是指出:
到目前为止,尚未在工作区中检测到任何问题。
更多细节
上面的重现步骤是我能想到的最简单的步骤,但是当我创建一个完整的 Stack 项目并确保我已经stack build intero
在项目目录的根目录中运行时,我看到了相同的(缺少)行为。
我的环境是:
- Windows 10 专业版 x64
- 堆栈版本 1.6.3,Git 修订版 b27e629b8c4ce369e3b8273f04db193b060000db(5454 次提交)x86_64 hpack-0.20.0
- Visual Studio 代码版本 1.20.0
- Haskero 版本 1.3.1
- 原子版本 1.23.3 x64
- 语言-haskell版本 1.17.3