Skip to content

Haskell LTS & Build #22

@starcraftman

Description

@starcraftman

Snipped from #19 , to track this separate issue. I think it clearly desirable to be using latest Haskell for speed improvements, out of the ideas I suppose we'll either add a build script as I described or perhaps just use docker. Dependencies either way really, I'll try out both and see I guess.


Snippet 1: Docker

I suggest one of the following options:

  • Downgrade back to LTS 5.0 (the master version).
  • Add to the README.md: Stack 1.6.1 or higher required for Haskell executable. Upgrade possible with stack upgrade or https://docs.haskellstack.org/en/stable/README/#how-to-install. That could be considered as common practice e.g. https://github.com/ghcjs/ghcjs#requirements specifies minimum versions.
  • (optional) Add a Dockerfile for the build, then we could use the official haskell images, see example below and additionally offer a compiled docker image on docker hub, so that people doesn't even need to bother with haskell libs/ghc/stack and compilation on their system.

Example:

FROM haskell:8.4.3
RUN mkdir -p /app
COPY . /app
WORKDIR /app
RUN stack setup && stack build

Snippet 2: Build script

Alternatively, the Haskell project maintains simple fetch script (https://get.haskellstack.org/) it takes a destination flag optionally. It verifies dependencies and downloads right binary. We can use that in the script to fetch latest stack to PROJECT_ROOT/.stack, use this stack during setup/build/install (ignoring local stack), then simply delete this stack folder at end. The total download about 60 MB. The only con to this plan is uses bandwidth each time script invoked, not a big inconvenience. I think programmers would prefer not having the extra stack lying around.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions