ihaskell

How to install custom libraries, and use them?


I have been trying to install some libraries, csv and hs-gchart. I know that IHaskell has alternatives for charting but I just wanted to try to install something.

I'm using Gibianski's docker image.

I already tried to do a cabal install in the docker container, but results that docker is not installed so I ssh'd into the container and installed it. Still cannot import any of these libraries.

Then I tried to install with stack build csv hs-gchart, still no luck.

What would be the straightforward/correct way to install a library and use it from an IHaskell notebook?


Solution

  • After talking to Andrew Gibiansky on IHaskell's Gitter, he recommended me to fork/clone the repo, add stack install <library> in the Dockerfile, and then do a docker build -t my-ihaskell /path/to/the/IHaskell/repo. After that just docker run my-ihaskell.

    Now the libraries work as expected. (hs-gchart fails, but thats another story)