Skip to content
This repository has been archived by the owner on Oct 7, 2022. It is now read-only.

Commit

Permalink
Merge pull request #123 from codecrafters-io/rohitpaulk/upgrade-haske…
Browse files Browse the repository at this point in the history
…ll-compiler

Add new haskell compiler version
  • Loading branch information
rohitpaulk committed May 26, 2022
2 parents f5d2644 + e131821 commit 9dc6911
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 15 deletions.
4 changes: 2 additions & 2 deletions compiled_starters/redis-starter-haskell/codecrafters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ debug: false
# Use this to change the Haskell version used to run your code
# on Codecrafters.
#
# Available versions: haskell-8.8
language_pack: haskell-8.8
# Available versions: haskell-9.0
language_pack: haskell-9.0
2 changes: 1 addition & 1 deletion compiled_starters/redis-starter-haskell/stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# failures.
#
# DON'T EDIT THIS!
resolver: lts-16.0
resolver: lts-19.8

packages:
- .
8 changes: 4 additions & 4 deletions compiled_starters/redis-starter-haskell/stack.yaml.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
packages: []
snapshots:
- completed:
size: 531237
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/16/0.yaml
sha256: 210e15b7043e2783115afe16b0d54914b1611cdaa73f3ca3ca7f8e0847ff54e5
original: lts-16.0
size: 618506
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/19/8.yaml
sha256: f1c4aca9b9b81afbb9db55571acb0690cdc01ac97a178234de281f9dc075e95e
original: lts-19.8
2 changes: 1 addition & 1 deletion dockerfiles/redis/haskell-8.8.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ RUN mkdir /app/app
RUN echo 'main :: IO ()' >> /app/app/Main.hs
RUN echo 'main = putStrLn "Hello, World!"' >> /app/app/Main.hs

RUN stack build
RUN stack build
21 changes: 21 additions & 0 deletions dockerfiles/redis/haskell-9.0.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM haskell:9.0.2-buster

WORKDIR /app

RUN mkdir -p /etc/stack

# Absence of this causes `stack run` to raise a permissions error
RUN echo "allow-different-user: true" >> /etc/stack/config.yaml

# Force usage of the system GHC installation
RUN echo "install-ghc: false" >> /etc/stack/config.yaml
RUN echo "system-ghc: true" >> /etc/stack/config.yaml

COPY stack.yaml package.yaml stack.yaml.lock /app/

# Dummy static content to circumvent the /app doesn't exist warning
RUN mkdir /app/app
RUN echo 'main :: IO ()' >> /app/app/Main.hs
RUN echo 'main = putStrLn "Hello, World!"' >> /app/app/Main.hs

RUN stack build
4 changes: 2 additions & 2 deletions starter_templates/codecrafters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ language_pack: ruby-2.7
language_pack: rust-1.54
{{/ language_is_rust }}
{{# language_is_haskell }}
# Available versions: haskell-8.8
language_pack: haskell-8.8
# Available versions: haskell-9.0
language_pack: haskell-9.0
{{/ language_is_haskell }}
{{# language_is_elixir}}
# Available versions: elixir-1.10
Expand Down
2 changes: 1 addition & 1 deletion starter_templates/redis/haskell/stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# failures.
#
# DON'T EDIT THIS!
resolver: lts-16.0
resolver: lts-19.8

packages:
- .
8 changes: 4 additions & 4 deletions starter_templates/redis/haskell/stack.yaml.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
packages: []
snapshots:
- completed:
size: 531237
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/16/0.yaml
sha256: 210e15b7043e2783115afe16b0d54914b1611cdaa73f3ca3ca7f8e0847ff54e5
original: lts-16.0
size: 618506
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/19/8.yaml
sha256: f1c4aca9b9b81afbb9db55571acb0690cdc01ac97a178234de281f9dc075e95e
original: lts-19.8
Empty file modified tests/init.sh
100644 → 100755
Empty file.
1 change: 1 addition & 0 deletions tests/test_course.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

DOCKERFILE_PATHS_TO_SKIP = [
"dockerfiles/sqlite/rust-1.43.Dockerfile", # Newer dependencies aren't compatible
"dockerfiles/redis/haskell-8.8.Dockerfile", # Newer dependencies aren't compatible
]

course_filter = ARGV[0]
Expand Down

0 comments on commit 9dc6911

Please sign in to comment.