Haskero 失败 "Not a valid Unicode code point!"

Haskero fails with "Not a valid Unicode code point!"

我正在尝试 运行 Haskero 使用 VSCode 进行 Haskell 编辑。但是,初始化失败,出现以下错误:

Initializing Haskero...
Spawning process 'stack' with command 'stack ghci --with-ghc intero "--ghci-options=-ignore-dot-ghci -Wall" --no-build --no-load'
(node:3726) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: reason.indexOf is not a function
(node:3726) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

当我运行从控制台错误的命令,我得到以下错误:

$ stack ghci --with-ghc intero "--ghci-options=-ignore-dot-ghci -Wall" --no-build --no-load
The following GHC options are incompatible with GHCi and have not been passed to it: -O2
Configuring GHCi with the following packages: lambda-pi-plus
Intero 0.1.23 (GHC 8.0.2)
Type :intro and press enter for an introduction of the standard commands.

/home/joey/.stack/programs/x86_64-linux/ghc-8.2.2/lib/ghc-8.2.2/package.conf.d/package.cache: GHC.PackageDb.readPackageDb: inappropriate type (Not a valid Unicode code point!)

Google 搜索似乎表明这可能与 GHC 版本有关,但我还没有找到任何确定的东西。

这是一个已知问题吗?是否有可以更改的配置来解决此问题?这可能与语言环境错误有关吗?

可能不是语言环境问题,但可以想象,如果是这种情况,那就是 GHC 错误。

要尝试的一件事是 rm -r .stack/programs/x86_64-linux/ghc-8.2.2。 Stack 保存在 tarball 周围,因此不需要重新下载,只需重新解压即可。

如果这不起作用,那么删除 tarball 并尝试重新下载也可能是值得的。不过,真的 应该不是必需的,因为它会在下载后检查哈希值。

我认为问题在于我的系统范围内的 Intero 是使用与我的项目使用的不同的 GHC 版本编译的。

运行 stack install intero 在我的项目目录中修复了问题。