通过 JupyterLab 使用 IHaskell 时,似乎只有部分支持新型 cabal 项目。
在 cabal 项目的目录中创建工作簿时,IHaskell 会选择该.ghc.environment
文件。所以内核看到的包版本与 cabal 使用的完全相同。好的!
但是,其他一些事情不太顺利:
模块路径:无法导入来自同一个cabal 包的模块,大概是因为 IHaskell 不知道 cabal 将编译后的模块文件保存在哪里。
语言扩展:我的 cabal 文件
ViewPatterns
在language-extensions
IHaskell 会话中未自动启用。虽然只安装了一个 ihaskell 包,但 JupyterLab 控制台上会显示此消息:
Disabling IHaskell widget support due to an encountered error:
The installed IHaskell support libraries do not match the instance of IHaskell you are running.
This *may* cause problems with functioning of widgets or rich media displays.
This is most often caused by multiple copies of IHaskell being installed simultaneously in your environment.
To resolve this issue, clear out your environment and reinstall IHaskell.
If you are installing support libraries, make sure you only do so once:
# Run this without first running `stack install ihaskell`
stack install ihaskell-diagrams
If you continue to have problems, please file an issue on Github.
这些问题是否有任何已知的解决方法?