This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM fpco/stack-build:lts-14.20 as build | |
WORKDIR /app | |
COPY .init-stack.yaml stack.yaml | |
COPY .init-stack.yaml.lock stack.yaml.lock | |
COPY .init-package.yaml package.yaml | |
RUN stack build --only-dependencies | |
COPY . . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- in response to https://www.reddit.com/r/haskell/comments/e3mm0k/options_for_interactive_haskell/ | |
-- gloss can be used to interactively define animations, but you have to jump | |
-- through a number of hoops. Usually, interactively defining haskell programs | |
-- is easy: run @ghcid --test=main@ in a different terminal, and it will | |
-- re-compile and re-run (if there are no parse/type errors) your program | |
-- everytime you save the source file. Unfortunately, ghci and ghcid run their | |
-- expressions in a separate thread, but on some platforms such as macOS, gloss | |
-- can only run from the main thread! So we have to write a simple variant of | |
-- ghcid which runs gloss on the main thread and only reloads the portion of the |