Skip to content

Commit

Permalink
newtype 0.2.2.0 revision 3: allow base >= 4.17 (GHC 9.4)
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasabel committed May 25, 2022
1 parent 2525641 commit 2229a7a
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 15 deletions.
46 changes: 35 additions & 11 deletions .github/workflows/haskell-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,22 @@
#
# For more information, see https://github.com/haskell-CI/haskell-ci
#
# version: 0.14.1
# version: 0.15.20220525
#
# REGENDATA ("0.14.1",["github","newtype.cabal"])
# REGENDATA ("0.15.20220525",["github","newtype.cabal"])
#
name: Haskell-CI
on:
- push
- pull_request
push:
branches:
- master
pull_request:
branches:
- master
jobs:
linux:
name: Haskell-CI - Linux - ${{ matrix.compiler }}
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
timeout-minutes:
60
container:
Expand All @@ -28,9 +32,14 @@ jobs:
strategy:
matrix:
include:
- compiler: ghc-9.2.1
- compiler: ghc-9.4.0.20220501
compilerKind: ghc
compilerVersion: 9.2.1
compilerVersion: 9.4.0.20220501
setup-method: ghcup
allow-failure: true
- compiler: ghc-9.2.2
compilerKind: ghc
compilerVersion: 9.2.2
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.0.2
Expand Down Expand Up @@ -101,16 +110,17 @@ jobs:
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
if [ "${{ matrix.setup-method }}" = ghcup ]; then
mkdir -p "$HOME/.ghcup/bin"
curl -sL https://downloads.haskell.org/ghcup/0.1.17.3/x86_64-linux-ghcup-0.1.17.3 > "$HOME/.ghcup/bin/ghcup"
curl -sL https://downloads.haskell.org/ghcup/0.1.17.8/x86_64-linux-ghcup-0.1.17.8 > "$HOME/.ghcup/bin/ghcup"
chmod a+x "$HOME/.ghcup/bin/ghcup"
if $HEADHACKAGE; then "$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml; fi
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER"
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0
else
apt-add-repository -y 'ppa:hvr/ghc'
apt-get update
apt-get install -y "$HCNAME"
mkdir -p "$HOME/.ghcup/bin"
curl -sL https://downloads.haskell.org/ghcup/0.1.17.3/x86_64-linux-ghcup-0.1.17.3 > "$HOME/.ghcup/bin/ghcup"
curl -sL https://downloads.haskell.org/ghcup/0.1.17.8/x86_64-linux-ghcup-0.1.17.8 > "$HOME/.ghcup/bin/ghcup"
chmod a+x "$HOME/.ghcup/bin/ghcup"
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0
fi
Expand Down Expand Up @@ -143,7 +153,7 @@ jobs:
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo "HEADHACKAGE=true" >> "$GITHUB_ENV" ; else echo "HEADHACKAGE=false" >> "$GITHUB_ENV" ; fi
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
env:
Expand Down Expand Up @@ -172,6 +182,17 @@ jobs:
repository hackage.haskell.org
url: http://hackage.haskell.org/
EOF
if $HEADHACKAGE; then
cat >> $CABAL_CONFIG <<EOF
repository head.hackage.ghc.haskell.org
url: https://ghc.gitlab.haskell.org/head.hackage/
secure: True
root-keys: 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d
26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329
f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89
key-threshold: 3
EOF
fi
cat >> $CABAL_CONFIG <<EOF
program-default-options
ghc-options: $GHCJOBS +RTS -M3G -RTS
Expand Down Expand Up @@ -223,6 +244,9 @@ jobs:
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
cat >> cabal.project <<EOF
EOF
if $HEADHACKAGE; then
echo "allow-newer: $($HCPKG list --simple-output | sed -E 's/([a-zA-Z-]+)-[0-9.]+/*:\1,/g')" >> cabal.project
fi
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(newtype)$/; }' >> cabal.project.local
cat cabal.project
cat cabal.project.local
Expand Down Expand Up @@ -252,7 +276,7 @@ jobs:
${CABAL} -vnormal check
- name: haddock
run: |
$CABAL v2-haddock $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
$CABAL v2-haddock --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
- name: unconstrained build
run: |
rm -f cabal.project.local
Expand Down
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
See also https://pvp.haskell.org/faq

## 0.2.2.0

- Provide safe coerceible based default-methods for pack/unpack

## 0.2.1.0 *(minor)*

- Added `Newtype` instances for
Expand Down
1 change: 1 addition & 0 deletions cabal.haskell-ci
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
branches: master
10 changes: 6 additions & 4 deletions newtype.cabal
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
cabal-version: 1.12
build-type: Simple
name: newtype
version: 0.2.1.0
version: 0.2.2.0
x-revision: 3

license: BSD3
license-file: LICENSE
author: Herbert Valerio Riedel, Darius Jahandarie, Conor McBride
maintainer: hvr@gnu.org
maintainer: Andreas Abel
category: Control
bug-reports: https://github.com/hvr/newtype/issues

synopsis: A typeclass and set of functions for working with newtypes.
description: Per Conor McBride, the 'Newtype' typeclass represents the packing and unpacking of a @newtype@, and allows you to operate under that @newtype@ with functions such as 'ala'. See "Control.Newtype" for documentation and examples.

tested-with:
GHC == 9.2.1
GHC == 9.4.1
GHC == 9.2.2
GHC == 9.0.2
GHC == 8.10.7
GHC == 8.8.4
Expand All @@ -37,7 +39,7 @@ source-repository head
library
exposed-modules: Control.Newtype

build-depends: base >= 4.3 && < 4.17
build-depends: base >= 4.3 && < 5
if !impl(ghc >= 8.0)
build-depends: transformers >= 0.2.2.0 && < 0.6

Expand Down

0 comments on commit 2229a7a

Please sign in to comment.