Browse Source

add haskell docs

Peter Salvatore 11 years ago
parent
commit
53e03448d5
6 changed files with 177 additions and 0 deletions
  1. 1 0
      haskell/README-short.txt
  2. 96 0
      haskell/README.md
  3. 74 0
      haskell/content.md
  4. 5 0
      haskell/license.md
  5. BIN
      haskell/logo.png
  6. 1 0
      haskell/user-feedback.md

+ 1 - 0
haskell/README-short.txt

@@ -0,0 +1 @@
+Haskell is an advanced purely-functional programming language.  This image contains a minimal Haskell (GHC) toolchain consisting of alex, cabal, ghc, and happy.

+ 96 - 0
haskell/README.md

@@ -0,0 +1,96 @@
+# Supported tags and respective `Dockerfile` links
+
+- [`latest`, `7.8` (*7.8/Dockerfile*)](https://github.com/darinmorrison/docker-haskell/blob/399ec9abffb3c86d6747d7ab5dc40556d6de9e4b/7.8/Dockerfile)
+
+For more information about this image and its history, please see the [relevant
+manifest file
+(`library/haskell`)](https://github.com/docker-library/official-images/blob/master/library/haskell)
+in the [`docker-library/official-images` GitHub
+repo](https://github.com/docker-library/official-images).
+
+# What is Haskell?
+
+[Haskell](http://www.haskell.org) is a [lazy](http://en.wikibooks.org/wiki/Haskell/Laziness), functional, statically-typed programming language with advanced type system features such as higher-rank, higher-kinded parametric [polymorphism](http://en.wikibooks.org/wiki/Haskell/Polymorphism), monadic [effects](http://en.wikibooks.org/wiki/Haskell/Understanding_monads/IO), generalized algebraic data types ([GADT](http://en.wikibooks.org/wiki/Haskell/GADT)s), flexible [type classes](http://en.wikibooks.org/wiki/Haskell/Advanced_type_classes), associated [type families](http://en.wikipedia.org/wiki/Type_family), and more.
+
+Haskell's [`ghc`](http://www.haskell.org/ghc) is a [portable](https://ghc.haskell.org/trac/ghc/wiki/Platforms), [optimizing](http://benchmarksgame.alioth.debian.org/u64q/haskell.php) compiler  with a foreign-function interface ([FFI](http://en.wikibooks.org/wiki/Haskell/FFI)), an [LLVM backend](https://www.haskell.org/ghc/docs/7.8.3/html/users_guide/code-generators.html), and sophisticated runtime support for [concurrency](http://en.wikibooks.org/wiki/Haskell/Concurrency), explicit/implicit [parallelism](http://community.haskell.org/~simonmar/pcph/), runtime [profiling](http://www.haskell.org/haskellwiki/ThreadScope), etc. Other Haskell tools like [`criterion`](http://www.serpentine.com/criterion/tutorial.html), [`quickcheck`](https://www.fpcomplete.com/user/pbv/an-introduction-to-quickcheck-testing), [`hpc`](http://www.haskell.org/haskellwiki/Haskell_program_coverage#Examples), and [`haddock`](http://en.wikipedia.org/wiki/Haddock_(software)) provide advanced benchmarking, property-based testing, code coverage, and documentation generation.
+
+A large number of production-quality Haskell libraries are available from [Hackage](https://hackage.haskell.org). The [`cabal`](https://www.fpcomplete.com/user/simonmichael/how-to-cabal-install) tool fetches packages and builds projects using the Hackage ecosystem.
+
+![logo](https://raw.githubusercontent.com/docker-library/docs/master/haskell/logo.png)
+
+## Contents
+
+This image ships a minimal Haskell toolchain with the following packages:
+
+| package         | version    |
+|-----------------|------------|
+| `alex`          | `3.1.3`    |
+| `cabal-install` | `1.20.0.3` |
+| `happy`         | `1.19.4`   |
+| `ghc`           | `7.8.3`    |
+
+
+## Usage
+
+* Start an interactive interpreter session with `ghci`:
+
+```
+    $ docker run -it --rm haskell:7.8
+    GHCi, version 7.8.3: http://www.haskell.org/ghc/  :? for help
+    Loading package ghc-prim ... linking ... done.
+    Loading package integer-gmp ... linking ... done.
+    Loading package base ... linking ... done.
+    Prelude>
+```
+
+* Dockerize a [Hackage](http://hackage.haskell.org) app with a Dockerfile inheriting from the base image:
+
+```
+    FROM haskell:7.8
+    RUN cabal update && cabal install MazesOfMonad
+    VOLUME /root/.MazesOfMonad
+    ENTRYPOINT ["/root/.cabal/bin/mazesofmonad"]
+```
+
+* Iteratively develop then ship a Haskell app with a Dockerfile utilizing the
+build cache:
+
+```
+    FROM haskell:7.8
+
+    RUN cabal update
+
+    # Add .cabal file
+    ADD ./server/snap-example.cabal /opt/server/snap-example.cabal
+
+    # Docker will cache this command as a layer, freeing us up to
+    # modify source code without re-installing dependencies
+    RUN cd /opt/server && cabal install --only-dependencies -j4
+
+    # Add and Install Application Code
+    ADD ./server /opt/server
+    RUN cd /opt/server && cabal install
+
+    # Add installed cabal executables to PATH
+    ENV PATH /root/.cabal/bin:$PATH
+
+    # Default Command for Container
+    WORKDIR /opt/server
+    CMD ["snap-example"]
+```
+
+## Examples
+
+See the application snippet above in more detail in the [example snap application](https://github.com/darinmorrison/docker-haskell/tree/master/examples/7.8.3/snap).
+
+# License
+
+This image is licensed under the MIT License (see
+[LICENSE](https://github.com/darinmorrison/docker-haskell/blob/master/LICENSE)),
+and includes software licensed under the
+[Glasgow haskell Compiler License](https://www.haskell.org/ghc/license)
+(BSD-style).
+
+# User Feedback
+
+Please report issues on the [GitHub project](https://github.com/darinmorrison/docker-haskell)

+ 74 - 0
haskell/content.md

@@ -0,0 +1,74 @@
+# What is Haskell?
+
+[Haskell](http://www.haskell.org) is a [lazy](http://en.wikibooks.org/wiki/Haskell/Laziness), functional, statically-typed programming language with advanced type system features such as higher-rank, higher-kinded parametric [polymorphism](http://en.wikibooks.org/wiki/Haskell/Polymorphism), monadic [effects](http://en.wikibooks.org/wiki/Haskell/Understanding_monads/IO), generalized algebraic data types ([GADT](http://en.wikibooks.org/wiki/Haskell/GADT)s), flexible [type classes](http://en.wikibooks.org/wiki/Haskell/Advanced_type_classes), associated [type families](http://en.wikipedia.org/wiki/Type_family), and more.
+
+Haskell's [`ghc`](http://www.haskell.org/ghc) is a [portable](https://ghc.haskell.org/trac/ghc/wiki/Platforms), [optimizing](http://benchmarksgame.alioth.debian.org/u64q/haskell.php) compiler  with a foreign-function interface ([FFI](http://en.wikibooks.org/wiki/Haskell/FFI)), an [LLVM backend](https://www.haskell.org/ghc/docs/7.8.3/html/users_guide/code-generators.html), and sophisticated runtime support for [concurrency](http://en.wikibooks.org/wiki/Haskell/Concurrency), explicit/implicit [parallelism](http://community.haskell.org/~simonmar/pcph/), runtime [profiling](http://www.haskell.org/haskellwiki/ThreadScope), etc. Other Haskell tools like [`criterion`](http://www.serpentine.com/criterion/tutorial.html), [`quickcheck`](https://www.fpcomplete.com/user/pbv/an-introduction-to-quickcheck-testing), [`hpc`](http://www.haskell.org/haskellwiki/Haskell_program_coverage#Examples), and [`haddock`](http://en.wikipedia.org/wiki/Haddock_(software)) provide advanced benchmarking, property-based testing, code coverage, and documentation generation.
+
+A large number of production-quality Haskell libraries are available from [Hackage](https://hackage.haskell.org). The [`cabal`](https://www.fpcomplete.com/user/simonmichael/how-to-cabal-install) tool fetches packages and builds projects using the Hackage ecosystem.
+
+%%LOGO%%
+
+## Contents
+
+This image ships a minimal Haskell toolchain with the following packages:
+
+| package         | version    |
+|-----------------|------------|
+| `alex`          | `3.1.3`    |
+| `cabal-install` | `1.20.0.3` |
+| `happy`         | `1.19.4`   |
+| `ghc`           | `7.8.3`    |
+
+
+## Usage
+
+* Start an interactive interpreter session with `ghci`:
+
+```
+    $ docker run -it --rm haskell:7.8
+    GHCi, version 7.8.3: http://www.haskell.org/ghc/  :? for help
+    Loading package ghc-prim ... linking ... done.
+    Loading package integer-gmp ... linking ... done.
+    Loading package base ... linking ... done.
+    Prelude>
+```
+
+* Dockerize a [Hackage](http://hackage.haskell.org) app with a Dockerfile inheriting from the base image:
+
+```
+    FROM haskell:7.8
+    RUN cabal update && cabal install MazesOfMonad
+    VOLUME /root/.MazesOfMonad
+    ENTRYPOINT ["/root/.cabal/bin/mazesofmonad"]
+```
+
+* Iteratively develop then ship a Haskell app with a Dockerfile utilizing the
+build cache:
+
+```
+    FROM haskell:7.8
+
+    RUN cabal update
+
+    # Add .cabal file
+    ADD ./server/snap-example.cabal /opt/server/snap-example.cabal
+
+    # Docker will cache this command as a layer, freeing us up to
+    # modify source code without re-installing dependencies
+    RUN cd /opt/server && cabal install --only-dependencies -j4
+
+    # Add and Install Application Code
+    ADD ./server /opt/server
+    RUN cd /opt/server && cabal install
+
+    # Add installed cabal executables to PATH
+    ENV PATH /root/.cabal/bin:$PATH
+
+    # Default Command for Container
+    WORKDIR /opt/server
+    CMD ["snap-example"]
+```
+
+## Examples
+
+See the application snippet above in more detail in the [example snap application](https://github.com/darinmorrison/docker-haskell/tree/master/examples/7.8.3/snap).

+ 5 - 0
haskell/license.md

@@ -0,0 +1,5 @@
+This image is licensed under the MIT License (see
+[LICENSE](https://github.com/darinmorrison/docker-haskell/blob/master/LICENSE)),
+and includes software licensed under the
+[Glasgow haskell Compiler License](https://www.haskell.org/ghc/license)
+(BSD-style).

BIN
haskell/logo.png


+ 1 - 0
haskell/user-feedback.md

@@ -0,0 +1 @@
+Please report issues on the [GitHub project](https://github.com/darinmorrison/docker-haskell)