Skip to content
This repository was archived by the owner on Oct 14, 2020. It is now read-only.

Commit 52c2c4a

Browse files
authored
Merge pull request #271 from wizzup/feature/haskell-7.10
feature/haskell 7.10
2 parents 1535205 + 6a12bba commit 52c2c4a

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

docker/haskell.docker

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# BUILD-USING: docker build -t codewars/runner-func .
2-
# TEST-USING: docker run --rm -i -t --name=test-runner-func --entrypoint=/bin/bash codewars/runner-haskell -s
3-
# RUN-USING: docker run --rm --name=runner-func codewars/runner-func --help
1+
# BUILD-USING: docker build -t codewars/runner-haskell .
2+
# TEST-USING: docker run --rm -i -t --name=test-runner-haskell --entrypoint=/bin/bash codewars/runner-haskell -s
3+
# RUN-USING: docker run --rm --name=runner-haskell codewars/runner-haskell --help
44

55
# Pull base image.
66
FROM codewars/base-runner
@@ -13,32 +13,32 @@ RUN add-apt-repository ppa:hvr/ghc
1313
RUN apt-get update
1414

1515
# Install Haskell System
16-
# lts-1.0 is minimum version that contain ifelse
17-
ENV LTS_VER=1.0 GHC_VER=7.8.4 CABAL_VER=1.18 HAPPY_VER=1.19.4
16+
ENV RESOLVER=lts-6.24 GHC_VER=7.10.3 CABAL_VER=1.22 HAPPY_VER=1.19.5
1817

1918
RUN apt-get install -y ghc-${GHC_VER} cabal-install-${CABAL_VER} happy-${HAPPY_VER}
2019

2120
USER codewarrior
2221
ENV HOME /home/codewarrior
2322
ENV PATH=${HOME}/.cabal/bin:/opt/ghc/${GHC_VER}/bin:/opt/cabal/${CABAL_VER}/bin:/opt/happy/${HAPPY_VER}/bin:${PATH}
2423
RUN mkdir ${HOME}/.cabal ${HOME}/.cabal/bin
25-
RUN echo "remote-repo: stackage_lts-${LTS_VER}:http://www.stackage.org/lts-${LTS_VER}" >> ${HOME}/.cabal/config
24+
RUN echo "remote-repo: stackage_${RESOLVER}:http://www.stackage.org/${RESOLVER}" >> ${HOME}/.cabal/config
2625
RUN echo "remote-repo-cache: /home/codewarrior/.cabal/packages" >> ${HOME}/.cabal/config
2726
RUN cabal update
2827
RUN cabal install cabal-install
2928

3029
# Install Haskell Packages
3130
# To install additional packages use "RUN cabal install <pkg-name>"
3231
RUN cabal install split ifelse
33-
RUN cabal install esqueleto persistent-sqlite persistent-template
32+
RUN cabal install persistent-sqlite persistent-template
3433
RUN cabal install haskell-src-exts lens
3534
RUN cabal install hspec hspec-core hspec-discover
3635

3736
# -------------------------------------------------------------------------
3837
# Haskell stuff end.
3938
# =========================================================================
4039

41-
# # add the package json first to a tmp directory and build, copy over so that we dont rebuild every time
40+
# Add the package json first to a tmp directory and build,
41+
# copy over so that we dont rebuild every time
4242
USER root
4343
ADD package.json /tmp/package.json
4444
RUN cd /tmp && npm install --production
@@ -51,6 +51,6 @@ WORKDIR /runner
5151
USER codewarrior
5252
RUN mocha -t 10000 test/runners/haskell_spec.js
5353

54-
# #timeout is a fallback in case an error with node
55-
# #prevents it from exiting properly
54+
# timeout is a fallback in case an error with node
55+
# prevents it from exiting properly
5656
ENTRYPOINT ["timeout", "15", "node"]

frameworks/haskell/Test/CodeWars/BlackList.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ unName (Symbol name) = name
9595

9696
-- | Check that an ImportSpec matches a symbol
9797
importSpecMatchesSymbol :: ImportSpec -> String -> Bool
98-
(IVar _ x) `importSpecMatchesSymbol` y = (unName x) == y
99-
(IAbs x) `importSpecMatchesSymbol` y = (unName x) == y
98+
(IVar x) `importSpecMatchesSymbol` y = (unName x) == y
99+
(IAbs _ x) `importSpecMatchesSymbol` y = (unName x) == y
100100
(IThingAll x) `importSpecMatchesSymbol` y = (unName x) == y
101101
(IThingWith x cnames) `importSpecMatchesSymbol` y =
102102
(unName x) == y || cnames `anyConstructorMatchesSymbol` y

frameworks/haskell/Test/Hspec.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ module Test.Hspec (
4848
, hidden
4949
) where
5050

51-
import "hspec" Test.Hspec hiding (hspec)
51+
import "hspec" Test.Hspec hiding (hspec, shouldNotBe)
5252
import Test.CodeWars.Runner (hspec)
5353
import Test.CodeWars.BlackList (Hidden (..), BlackList, hidden)
5454
import Test.QuickCheck hiding (reason)

0 commit comments

Comments
 (0)