Skip to content

Use Haskell on any machine. Well, provided you have Docker installed.

Notifications You must be signed in to change notification settings

iarekk/haskell-anywhere

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

haskell anywhere

This project is aimed at people who don't want to waste time installing the haskell development environment locally but to delegate everything to docker.

base image

I am going to use the haskell image, version 8.6.3 in this repository.

ghci

To simply play with GHCI, run the following:

  • ghci.bat - windows (I used .bat and not .sh extension to avoid problems with the -it flag of docker run). Powershell recommended.
  • ghci.sh - *nix.

examples

GHCI container with a shared volume:

C:\Users\piotr_justyna\Documents\github\haskell-anywhere\ghci\ghci.bat C:\Users\piotr_justyna\Documents\github\programming-in-haskell

GHCI container with no shared volume:

C:\Users\piotr_justyna\Documents\github\haskell-anywhere\ghci\ghci.bat

stack

To compile bigger projects, use stack scripts:

  • stack.sh - platform-independent

This time there is no difference between the two as there is no interactive mode required. One script will do. What happens here is we're building an image containing a fully functional installation of stack. Your code gets copied into the image and built during the image build process. While it works very quite neatly, it is very slow. Good for PoC's, but not for much else.

To use, simply drop:

  • docker.sh
  • Dockerfile

into your project directory and adapt the dockerfile as needed - the only required change is the executable name, everything else is optional.

examples

In your project directory:

./docker.sh

About

Use Haskell on any machine. Well, provided you have Docker installed.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 59.7%
  • Batchfile 27.7%
  • Dockerfile 12.6%