Haskero fails with “Not a valid Unicode code point!”

浪子不回头ぞ 提交于 2021-02-07 21:29:09

问题


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 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?


回答1:


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

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




回答2:


Probably not a locale issue, but it's conceivable, if that's the case then it's a GHC bug.

One thing to try is rm -r .stack/programs/x86_64-linux/ghc-8.2.2. Stack keeps around the tarball, so it shouldn't need to redownload, will just re-unpack.

If that doesn't work, then it might also be worthwhile to delete the tarball, and try redownloading. That really shouldn't be necessary, though, because it checks the hash after download.



来源:https://stackoverflow.com/questions/50537331/haskero-fails-with-not-a-valid-unicode-code-point

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!