Skip to content

Commit ceed18f

Browse files
chshershvrom911
authored andcommitted
Support latest GHCs, update maintenance info (#6)
* Support latest GHCs, update maintenance info * Update .cabal version
1 parent 8acfb22 commit ceed18f

File tree

13 files changed

+713
-245
lines changed

13 files changed

+713
-245
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @chshersh @vrom911

.gitignore

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
### Haskell
12
dist
3+
dist-*
24
cabal-dev
35
*.o
46
*.hi
@@ -9,14 +11,48 @@ cabal-dev
911
*.prof
1012
*.aux
1113
*.hp
14+
*.eventlog
1215
.virtualenv
1316
.hsenv
1417
.hpc
15-
.stack-work/
1618
.cabal-sandbox/
1719
cabal.sandbox.config
1820
cabal.config
19-
TAGS
20-
.DS_Store
21+
cabal.project.local
22+
.HTF/
23+
.ghc.environment*
24+
25+
# Stack
26+
.stack-work/
27+
stack.yaml.lock
28+
29+
# Nix
30+
result
31+
32+
### IDE/support
33+
# Vim
34+
[._]*.s[a-v][a-z]
35+
[._]*.sw[a-p]
36+
[._]s[a-v][a-z]
37+
[._]sw[a-p]
2138
*~
39+
tags
40+
41+
# IntellijIDEA
42+
.idea/
43+
.ideaHaskellLib/
44+
*.iml
45+
46+
# Atom
47+
.haskell-ghc-mod.json
48+
49+
# VS
50+
.vscode/
51+
52+
# Emacs
2253
*#
54+
.dir-locals.el
55+
TAGS
56+
57+
# other
58+
.DS_Store

.stylish-haskell.yaml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
steps:
2+
- simple_align:
3+
cases: true
4+
top_level_patterns: true
5+
records: true
6+
7+
# Import cleanup
8+
- imports:
9+
align: none
10+
list_align: after_alias
11+
pad_module_names: false
12+
long_list_align: inline
13+
empty_list_align: inherit
14+
list_padding: 4
15+
separate_lists: true
16+
space_surround: false
17+
18+
- language_pragmas:
19+
style: vertical
20+
remove_redundant: true
21+
22+
# Remove trailing whitespace
23+
- trailing_whitespace: {}
24+
25+
columns: 100
26+
27+
newline: native
28+
29+
language_extensions:
30+
- BangPatterns
31+
- ConstraintKinds
32+
- DataKinds
33+
- DefaultSignatures
34+
- DeriveAnyClass
35+
- DeriveDataTypeable
36+
- DeriveGeneric
37+
- DerivingStrategies
38+
- DerivingVia
39+
- ExplicitNamespaces
40+
- FlexibleContexts
41+
- FlexibleInstances
42+
- FunctionalDependencies
43+
- GADTs
44+
- GeneralizedNewtypeDeriving
45+
- InstanceSigs
46+
- KindSignatures
47+
- LambdaCase
48+
- MultiParamTypeClasses
49+
- MultiWayIf
50+
- NamedFieldPuns
51+
- NoImplicitPrelude
52+
- OverloadedStrings
53+
- QuasiQuotes
54+
- RecordWildCards
55+
- ScopedTypeVariables
56+
- StandaloneDeriving
57+
- TemplateHaskell
58+
- TupleSections
59+
- TypeApplications
60+
- TypeFamilies
61+
- ViewPatterns

.travis.yml

Lines changed: 41 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -1,97 +1,52 @@
1-
# This file has been generated -- see https://github.com/hvr/multi-ghc-travis
2-
language: c
3-
sudo: false
1+
sudo: true
2+
language: haskell
3+
4+
git:
5+
depth: 5
6+
7+
cabal: "3.0"
48

59
cache:
610
directories:
7-
- $HOME/.cabsnap
8-
- $HOME/.cabal/packages
9-
10-
before_cache:
11-
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/build-reports.log
12-
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/00-index.tar
11+
- "$HOME/.cabal/store"
12+
- "$HOME/.stack"
13+
- "$TRAVIS_BUILD_DIR/.stack-work"
1314

1415
matrix:
1516
include:
16-
- env: CABALVER=1.16 GHCVER=7.4.2
17-
compiler: ": #GHC 7.4.2"
18-
addons: {apt: {packages: [cabal-install-1.16,ghc-7.4.2], sources: [hvr-ghc]}}
19-
- env: CABALVER=1.16 GHCVER=7.6.3
20-
compiler: ": #GHC 7.6.3"
21-
addons: {apt: {packages: [cabal-install-1.16,ghc-7.6.3], sources: [hvr-ghc]}}
22-
- env: CABALVER=1.18 GHCVER=7.8.4
23-
compiler: ": #GHC 7.8.4"
24-
addons: {apt: {packages: [cabal-install-1.18,ghc-7.8.4], sources: [hvr-ghc]}}
25-
- env: CABALVER=1.22 GHCVER=7.10.3
26-
compiler: ": #GHC 7.10.3"
27-
addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.3], sources: [hvr-ghc]}}
28-
- env: CABALVER=1.24 GHCVER=8.0.1
29-
compiler: ": #GHC 8.0.1"
30-
addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.1], sources: [hvr-ghc]}}
17+
# Cabal
18+
- ghc: 8.2.2
19+
- ghc: 8.4.4
20+
- ghc: 8.6.5
21+
- ghc: 8.8.1
3122

32-
before_install:
33-
- unset CC
34-
- export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH
23+
# stack
24+
- ghc: 8.8.1
25+
env: STACK_YAML="$TRAVIS_BUILD_DIR/stack.yaml"
3526

3627
install:
37-
- cabal --version
38-
- echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
39-
- if [ -f $HOME/.cabal/packages/hackage.haskell.org/00-index.tar.gz ];
40-
then
41-
zcat $HOME/.cabal/packages/hackage.haskell.org/00-index.tar.gz >
42-
$HOME/.cabal/packages/hackage.haskell.org/00-index.tar;
43-
fi
44-
- travis_retry cabal update -v
45-
- sed -i 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config
46-
- if [ $GHCVER != 7.4.2 ] && [ $GHCVER != 7.6.3 ];
47-
then cabal install --only-dependencies --enable-tests --enable-benchmarks --dry -v > installplan.txt;
48-
else cabal install --only-dependencies --enable-tests --dry -v > installplan.txt;
49-
fi
50-
- sed -i -e '1,/^Resolving /d' installplan.txt; cat installplan.txt
51-
52-
# check whether current requested install-plan matches cached package-db snapshot
53-
- if diff -u installplan.txt $HOME/.cabsnap/installplan.txt;
54-
then
55-
echo "cabal build-cache HIT";
56-
rm -rfv .ghc;
57-
cp -a $HOME/.cabsnap/ghc $HOME/.ghc;
58-
cp -a $HOME/.cabsnap/lib $HOME/.cabsnap/share $HOME/.cabsnap/bin $HOME/.cabal/;
59-
else
60-
echo "cabal build-cache MISS";
61-
rm -rf $HOME/.cabsnap;
62-
mkdir -p $HOME/.ghc $HOME/.cabal/lib $HOME/.cabal/share $HOME/.cabal/bin;
63-
if [ $GHCVER != 7.4.2 ] && [ $GHCVER != 7.6.3 ];
64-
then cabal install --only-dependencies --enable-tests --enable-benchmarks;
65-
else cabal install --only-dependencies --enable-tests;
66-
fi
67-
fi
28+
- |
29+
if [ -z "$STACK_YAML" ]; then
30+
ghc --version
31+
cabal --version
32+
cabal update
33+
cabal build --enable-tests --enable-benchmarks
34+
else
35+
# install stack
36+
curl -sSL https://get.haskellstack.org/ | sh
37+
38+
# build project with stack
39+
stack --version
40+
stack build --system-ghc --test --no-run-tests --bench --no-run-benchmarks
41+
fi
6842
69-
# snapshot package-db on cache miss
70-
- if [ ! -d $HOME/.cabsnap ];
71-
then
72-
echo "snapshotting package-db to build-cache";
73-
mkdir $HOME/.cabsnap;
74-
cp -a $HOME/.ghc $HOME/.cabsnap/ghc;
75-
cp -a $HOME/.cabal/lib $HOME/.cabal/share $HOME/.cabal/bin installplan.txt $HOME/.cabsnap/;
76-
fi
77-
78-
# Here starts the actual work to be performed for the package under test;
79-
# any command which exits with a non-zero exit code causes the build to fail.
8043
script:
81-
- if [ -f configure.ac ]; then autoreconf -i; fi
82-
# building benchmarks fails on earlier GHCs for some reason
83-
- if [ $GHCVER != 7.4.2 ] && [ $GHCVER != 7.6.3 ];
84-
then cabal configure --enable-tests --enable-benchmarks;
85-
else cabal configure --enable-tests;
86-
fi
87-
- cabal build --ghc-options=-Werror
88-
- cabal test
89-
- cabal sdist # tests that a source-distribution can be generated
90-
91-
# Check that the resulting source distribution can be built & installed.
92-
# If there are no other `.tar.gz` files in `dist`, this can be even simpler:
93-
# `cabal install --force-reinstalls dist/*-*.tar.gz`
94-
- SRC_TGZ=$(cabal info . | awk '{print $2;exit}').tar.gz &&
95-
(cd dist && cabal install --force-reinstalls "$SRC_TGZ")
96-
97-
# EOF
44+
- |
45+
if [ -z "$STACK_YAML" ]; then
46+
cabal test --enable-tests
47+
else
48+
stack test --no-terminal --system-ghc
49+
fi
50+
51+
notifications:
52+
email: false

CHANGELOG.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,28 @@
1-
# 0.3.1.0
1+
# Changelog
2+
3+
`ilist` uses [PVP Versioning][1].
4+
The changelog is available [on GitHub][2].
5+
6+
## 0.4.0.0 — Dec 26, 2019
7+
8+
* Support GHC-8.8, GHC-8.6, GHC-8.4, GHC-8.2. Drop older GHC versions support.
9+
* Update maintenance info.
10+
11+
## 0.3.1.0
212

313
* Added `ireplicateM` and `ireplicateM_`.
414

5-
# 0.3.0.0
15+
## 0.3.0.0
616

717
* `ifind` now returns the index alongside with the value (same as in `lens`).
818

9-
# 0.2.0.0
19+
## 0.2.0.0
1020

1121
* `izipWithM` and `izipWithM_` have been generalised from `Monad` to `Applicative` (which mimics what was done in base-4.9).
1222

13-
# 0.1.0.0
23+
## 0.1.0.0
1424

1525
First release.
26+
27+
[1]: https://pvp.haskell.org
28+
[2]: https://github.com/kowainik/ilist/releases

0 commit comments

Comments
 (0)