on main help sign in
Update ghc version and travis config
commitf78299e09b4fd4f61ef20eeaf3ba38c8dd1addd4 authorvrom911 <veronika@holmusk.com> dateSun 1 Jul 2018, 16:40 (8 years ago) parent267e4c5
7 files changed+98−46
.gitignore+2 .travis.yml+83−26 benchmark/Map.hs+3−3 benchmark/OptimalVector.hs+2−2 benchmark/Vector.hs+2−2 stack.yaml+1−11 typerep-map.cabal+5−2
.gitignore+2
@@ -20,6 +20,8 @@ cabal.sandbox.config
2020cabal.config
2121cabal.project.local
2222.HTF/
23+.ghc.environment.*
24+
2325# Stack
2426.stack-work/
2527
.travis.yml+83−26
@@ -1,28 +1,85 @@
1−# Use new container infrastructure to enable caching
2−sudo: false
3−
4−# Choose a lightweight base image; we provide our own build tools.
5−language: c
6−
7−# GHC depends on GMP. You can add other dependencies here as well.
8−addons:
9− apt:
10− packages:
11− - libgmp-dev
12−
13−before_install:
14−# Download and unpack the stack executable
15−- mkdir -p ~/.local/bin
16−- export PATH=$HOME/.local/bin:$PATH
17−- travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
18−
19−# This line does all of the work: installs GHC if necessary, builds the
20−# library, executables, and test suites, and runs the test suites.
21−# `--no-terminal works` around some quirks in Travis's terminal implementation.
22−script: stack --no-terminal --install-ghc test
23−
24−# Caching so the next build will be fast too.
1+sudo: true
2+language: generic
3+
4+git:
5+ depth: 5
6+
257cache:
268 directories:
27− - $HOME/.stack
28− - $HOME/build/vrom911/typerep-map/.stack-work
9+ - "$HOME/.cabal"
10+ - "$HOME/.ghc"
11+ - "$HOME/.stack"
12+ - ".stack-work"
13+
14+matrix:
15+
16+ include:
17+
18+ - ghc: 8.0.2
19+ env: GHCVER='8.0.2' CABALVER='head'
20+ os: linux
21+ addons:
22+ apt:
23+ sources:
24+ - hvr-ghc
25+ packages:
26+ - ghc-8.0.2
27+ - cabal-install-head
28+
29+ - ghc: 8.2.2
30+ env: GHCVER='8.2.2' CABALVER='head'
31+ os: linux
32+ addons:
33+ apt:
34+ sources:
35+ - hvr-ghc
36+ packages:
37+ - ghc-8.2.2
38+ - cabal-install-head
39+
40+ - ghc: 8.4.3
41+ env: GHCVER='8.4.3' CABALVER='head'
42+ os: linux
43+ addons:
44+ apt:
45+ sources:
46+ - hvr-ghc
47+ packages:
48+ - ghc-8.4.3
49+ - cabal-install-head
50+
51+ - ghc: 8.4.3
52+ env: STACK_YAML="$HOME/build/vrom911/typerep-map/stack.yaml"
53+ os: linux
54+ addons:
55+ apt:
56+ packages:
57+ - libgmp-dev
58+
59+install:
60+ - |
61+ if [ -z "$STACK_YAML" ]; then
62+ export PATH="/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH"
63+ echo $PATH
64+ cabal new-update
65+ cabal new-build --enable-tests --enable-benchmarks
66+ else
67+ mkdir -p ~/.local/bin
68+ export PATH="$HOME/.local/bin:$PATH"
69+ travis_retry curl -L 'https://www.stackage.org/stack/linux-x86_64' | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
70+ stack --version
71+ stack setup --no-terminal --install-cabal 2.0.1.0
72+ stack ghc -- --version
73+ stack build --only-dependencies --no-terminal
74+ fi
75+
76+script:
77+ - |
78+ if [ -z "$STACK_YAML" ]; then
79+ cabal new-test
80+ else
81+ stack build --test --bench --no-terminal
82+ fi
83+
84+notifications:
85+ email: false
benchmark/Map.hs+3−3
@@ -19,14 +19,14 @@ import Criterion.Main (Benchmark, bench, bgroup, nf)
1919
2020import Prelude hiding (lookup)
2121
22−import Control.Exception
2322import Control.DeepSeq (rnf)
23+import Control.Exception
2424import Data.Maybe (fromJust)
2525import Data.Proxy (Proxy (..))
2626import Data.Typeable (Typeable)
2727import GHC.TypeLits
2828
29−import Data.TypeRep.Map (TypeRepMap (..), empty, insert, lookup, keys)
29+import Data.TypeRep.Map (TypeRepMap (..), empty, insert, keys, lookup)
3030
3131benchMap :: Benchmark
3232benchMap = bgroup "map"
@@ -48,7 +48,7 @@ tenLookups tmap = (lp, lp, lp, lp, lp, lp, lp, lp)
4848bigMap :: TypeRepMap (Proxy :: Nat -> *)
4949bigMap = buildBigMap 10000 (Proxy :: Proxy 0) empty
5050
51−buildBigMap :: forall a . (Typeable a, KnownNat a) => Int -> Proxy (a :: Nat) -> TypeRepMap (Proxy :: Nat -> *) -> TypeRepMap (Proxy :: Nat -> *)
51+buildBigMap :: forall a . (KnownNat a) => Int -> Proxy (a :: Nat) -> TypeRepMap (Proxy :: Nat -> *) -> TypeRepMap (Proxy :: Nat -> *)
5252buildBigMap 1 x = insert x
5353buildBigMap n x = insert x . buildBigMap (n - 1) (Proxy :: Proxy (a + 1))
5454
benchmark/OptimalVector.hs+2−2
@@ -18,8 +18,8 @@ import Criterion.Main (Benchmark, bench, bgroup, nf)
1818
1919import Prelude hiding (lookup)
2020
21−import Control.Exception
2221import Control.DeepSeq (rnf)
22+import Control.Exception
2323import Data.Maybe (fromJust)
2424import Data.Proxy (Proxy (..))
2525import Data.Typeable (Typeable)
@@ -47,7 +47,7 @@ tenLookups tmap = (lp, lp, lp, lp, lp, lp, lp, lp)
4747bigMap :: TypeRepVector (Proxy :: Nat -> *)
4848bigMap = fromList $ buildBigMap 10000 (Proxy :: Proxy 0) []
4949
50−buildBigMap :: forall a . (Typeable a, KnownNat a) => Int -> Proxy (a :: Nat) -> [TF (Proxy :: Nat -> *)] -> [TF (Proxy :: Nat -> *)]
50+buildBigMap :: forall a . (KnownNat a) => Int -> Proxy (a :: Nat) -> [TF (Proxy :: Nat -> *)] -> [TF (Proxy :: Nat -> *)]
5151buildBigMap 1 x = (TF x :)
5252buildBigMap n x = (TF x :) . buildBigMap (n - 1) (Proxy :: Proxy (a + 1))
5353
benchmark/Vector.hs+2−2
@@ -18,8 +18,8 @@ import Criterion.Main (Benchmark, bench, bgroup, nf)
1818
1919import Prelude hiding (lookup)
2020
21−import Control.Exception
2221import Control.DeepSeq (rnf)
22+import Control.Exception
2323import Data.Maybe (fromJust)
2424import Data.Proxy (Proxy (..))
2525import Data.Typeable (Typeable)
@@ -47,7 +47,7 @@ tenLookups tmap = (lp, lp, lp, lp, lp, lp, lp, lp)
4747bigMap :: TypeRepVector (Proxy :: Nat -> *)
4848bigMap = fromList $ buildBigMap 10000 (Proxy :: Proxy 0) []
4949
50−buildBigMap :: forall a . (Typeable a, KnownNat a) => Int -> Proxy (a :: Nat) -> [TF (Proxy :: Nat -> *)] -> [TF (Proxy :: Nat -> *)]
50+buildBigMap :: forall a . (KnownNat a) => Int -> Proxy (a :: Nat) -> [TF (Proxy :: Nat -> *)] -> [TF (Proxy :: Nat -> *)]
5151buildBigMap 1 x = (TF x :)
5252buildBigMap n x = (TF x :) . buildBigMap (n - 1) (Proxy :: Proxy (a + 1))
5353
stack.yaml+1−11
@@ -1,11 +1 @@
1−resolver: lts-9.18
2−
3−packages:
4−- .
5−
6−extra-deps:
7−- tasty-discover-4.1.1
8−
9−flags: {}
10−
11−extra-package-dbs: []
1+resolver: lts-11.15
typerep-map.cabal+5−2
@@ -11,8 +11,10 @@ copyright: 2017 Veronika Romashkina
1111category: Data Structures
1212build-type: Simple
1313extra-source-files: README.md
14−cabal-version: >=1.10
15−tested-with: GHC == 8.0.1
14+cabal-version: 2.0
15+tested-with: GHC == 8.0.2
16+ , GHC == 8.2.2
17+ , GHC == 8.4.3
1618
1719library
1820 hs-source-dirs: src
@@ -38,6 +40,7 @@ test-suite typerep-map-test
3840 , tasty
3941 , tasty-discover >= 4.1.1
4042 , tasty-hspec
43+ build-tool-depends: tasty-discover:tasty-discover
4144 ghc-options: -Wall -Werror -threaded -rtsopts -with-rtsopts=-N
4245 default-language: Haskell2010
4346