Reputation: 183
When using IHaskell via JupyterLab, there seems to be only partial support for new-style cabal projects.
When creating a workbook in a cabal project's directory, IHaskell picks up the .ghc.environment
file. So the kernel sees exactly the same package versions as used by cabal. Nice!
However, some other things work less smoothly:
Module paths: modules from the same cabal package cannot be imported, presumably because IHaskell doesn't know where cabal keeps compiled module files.
Language extensions: My cabal file has ViewPatterns
under language-extensions
which is not automatically enabled in the IHaskell session.
Although there is only one ihaskell package installed, this message appears on the JupyterLab console:
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.
Are there any known workarounds for these problems?
Upvotes: 1
Views: 133