Haskero失败,并显示“不是有效的Unicode代码点!"; [英] Haskero fails with "Not a valid Unicode code point!"

查看:72
本文介绍了Haskero失败,并显示“不是有效的Unicode代码点!";的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试运行Haskero使用VSCode进行Haskell编辑.但是,它在初始化时失败,并显示以下错误:

I'm trying to run Haskero to do Haskell editing with VSCode. However, it's failing on initialization, with the following error:

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.

当我从控制台中的错误运行命令时,出现以下错误:

When I run the command from the error in the console, I get the following error:

$ 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版本有关,但我还没有找到确定的任何内容.

Google searching seems to indicate that this might be related to GHC versions, but I haven't found anything definitive.

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

Is this a known issue? Is there a configuration to change that would fix this? Might this be related to a locale error?

推荐答案

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

I think the problem was that my system wide Intero was compiled with a different GHC version than my project was using.

在我的项目目录中运行 stack install intero 可以解决此问题.

Running stack install intero in my project directory fixed the problem.

这篇关于Haskero失败,并显示“不是有效的Unicode代码点!";的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆