on master help sign in
Merge pull request #83 from haskell-hvr/noble-a

Support GHC-9.6.5...9.10.1 (uuid-types)

commite88c53c6bbad94cccb1eacf532f92c740ec75f66 authorOleg Grenrus <oleg.grenrus@iki.fi> dateThu 16 May 2024, 19:15 (2 years ago) parent0160729d1fbad4
9 files changed+97−297
.github/workflows/haskell-ci-bench.yml+25−67 .github/workflows/haskell-ci.yml+42−99 cabal.haskell-ci−4 uuid-bench/uuid-bench.cabal+8−11 uuid-types/src/Data/UUID/Types.hs−4 uuid-types/src/Data/UUID/Types/Internal.hs+1−72 uuid-types/src/Data/UUID/Types/Internal/Builder.hs−3 uuid-types/uuid-types.cabal+12−18 uuid/uuid.cabal+9−19
.github/workflows/haskell-ci-bench.yml+25−67
@@ -8,9 +8,9 @@
88#
99# For more information, see https://github.com/haskell-CI/haskell-ci
1010#
11−# version: 0.19.20240402
11+# version: 0.19.20240514
1212#
13−# REGENDATA ("0.19.20240402",["github","--project","cabal.bench.project","-o",".github/workflows/haskell-ci-bench.yml","--github-action-name","Benchmarks"])
13+# REGENDATA ("0.19.20240514",["github","--project","cabal.bench.project","-o",".github/workflows/haskell-ci-bench.yml","--github-action-name","Benchmarks"])
1414#
1515name: Benchmarks
1616on:
@@ -27,7 +27,7 @@ jobs:
2727 timeout-minutes:
2828 60
2929 container:
30− image: buildpack-deps:bionic
30+ image: buildpack-deps:jammy
3131 continue-on-error: ${{ matrix.allow-failure }}
3232 strategy:
3333 matrix:
@@ -65,27 +65,12 @@ jobs:
6565 - compiler: ghc-8.8.4
6666 compilerKind: ghc
6767 compilerVersion: 8.8.4
68− setup-method: hvr-ppa
69− allow-failure: false
70− - compiler: ghc-8.6.4
71− compilerKind: ghc
72− compilerVersion: 8.6.4
73− setup-method: hvr-ppa
74− allow-failure: false
75− - compiler: ghc-8.4.4
76− compilerKind: ghc
77− compilerVersion: 8.4.4
78− setup-method: hvr-ppa
79− allow-failure: false
80− - compiler: ghc-8.2.2
81− compilerKind: ghc
82− compilerVersion: 8.2.2
83− setup-method: hvr-ppa
68+ setup-method: ghcup
8469 allow-failure: false
85− - compiler: ghc-8.0.2
70+ - compiler: ghc-8.6.5
8671 compilerKind: ghc
87− compilerVersion: 8.0.2
88− setup-method: hvr-ppa
72+ compilerVersion: 8.6.5
73+ setup-method: ghcup
8974 allow-failure: false
9075 fail-fast: false
9176 steps:
@@ -93,23 +78,11 @@ jobs:
9378 run: |
9479 apt-get update
9580 apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
96− if [ "${{ matrix.setup-method }}" = ghcup ]; then
97− mkdir -p "$HOME/.ghcup/bin"
98− curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
99− chmod a+x "$HOME/.ghcup/bin/ghcup"
100− "$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml;
101− "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
102− "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
103− else
104− apt-add-repository -y 'ppa:hvr/ghc'
105− apt-get update
106− apt-get install -y "$HCNAME"
107− mkdir -p "$HOME/.ghcup/bin"
108− curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
109− chmod a+x "$HOME/.ghcup/bin/ghcup"
110− "$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml;
111− "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
112− fi
81+ mkdir -p "$HOME/.ghcup/bin"
82+ curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
83+ chmod a+x "$HOME/.ghcup/bin/ghcup"
84+ "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
85+ "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
11386 env:
11487 HCKIND: ${{ matrix.compilerKind }}
11588 HCNAME: ${{ matrix.compiler }}
@@ -121,22 +94,13 @@ jobs:
12194 echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
12295 echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
12396 HCDIR=/opt/$HCKIND/$HCVER
124− if [ "${{ matrix.setup-method }}" = ghcup ]; then
125− HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
126− HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
127− HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
128− echo "HC=$HC" >> "$GITHUB_ENV"
129− echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
130− echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
131− echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
132− else
133− HC=$HCDIR/bin/$HCKIND
134− echo "HC=$HC" >> "$GITHUB_ENV"
135− echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
136− echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
137− echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
138− fi
139−
97+ HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
98+ HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
99+ HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
100+ echo "HC=$HC" >> "$GITHUB_ENV"
101+ echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
102+ echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
103+ echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
140104 HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
141105 echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
142106 echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
@@ -193,7 +157,7 @@ jobs:
193157 chmod a+x $HOME/.cabal/bin/cabal-plan
194158 cabal-plan --version
195159 - name: checkout
196− uses: actions/checkout@v3
160+ uses: actions/checkout@v4
197161 with:
198162 path: source
199163 - name: initial cabal.project for sdist
@@ -217,11 +181,11 @@ jobs:
217181 touch cabal.project
218182 touch cabal.project.local
219183 echo "packages: ${PKGDIR_uuid_bench}" >> cabal.project
220− if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package uuid-bench" >> cabal.project ; fi
221− if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
184+ echo "package uuid-bench" >> cabal.project
185+ echo " ghc-options: -Werror=missing-methods" >> cabal.project
222186 cat >> cabal.project <<EOF
223187 EOF
224− $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(uuid-bench)$/; }' >> cabal.project.local
188+ $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(uuid-bench)$/; }' >> cabal.project.local
225189 cat cabal.project
226190 cat cabal.project.local
227191 - name: dump install plan
@@ -229,7 +193,7 @@ jobs:
229193 $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
230194 cabal-plan
231195 - name: restore cache
232− uses: actions/cache/restore@v3
196+ uses: actions/cache/restore@v4
233197 with:
234198 key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
235199 path: ~/.cabal/store
@@ -264,14 +228,8 @@ jobs:
264228 cabal-plan topo | sort
265229 $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.2.*' --dependencies-only -j2 all
266230 $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.2.*' all
267− - name: constraint set random-1.1
268− run: |
269− if [ $((HCNUMVER < 90800)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.1.*' all --dry-run ; fi
270− if [ $((HCNUMVER < 90800)) -ne 0 ] ; then cabal-plan topo | sort ; fi
271− if [ $((HCNUMVER < 90800)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.1.*' --dependencies-only -j2 all ; fi
272− if [ $((HCNUMVER < 90800)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.1.*' all ; fi
273231 - name: save cache
274− uses: actions/cache/save@v3
232+ uses: actions/cache/save@v4
275233 if: always()
276234 with:
277235 key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
.github/workflows/haskell-ci.yml+42−99
@@ -8,9 +8,9 @@
88#
99# For more information, see https://github.com/haskell-CI/haskell-ci
1010#
11−# version: 0.19.20240402
11+# version: 0.19.20240514
1212#
13−# REGENDATA ("0.19.20240402",["github","cabal.project"])
13+# REGENDATA ("0.19.20240514",["github","cabal.project"])
1414#
1515name: Haskell-CI
1616on:
@@ -27,19 +27,24 @@ jobs:
2727 timeout-minutes:
2828 60
2929 container:
30− image: buildpack-deps:bionic
30+ image: buildpack-deps:jammy
3131 continue-on-error: ${{ matrix.allow-failure }}
3232 strategy:
3333 matrix:
3434 include:
35+ - compiler: ghc-9.10.1
36+ compilerKind: ghc
37+ compilerVersion: 9.10.1
38+ setup-method: ghcup
39+ allow-failure: false
3540 - compiler: ghc-9.8.2
3641 compilerKind: ghc
3742 compilerVersion: 9.8.2
3843 setup-method: ghcup
3944 allow-failure: false
40− - compiler: ghc-9.6.4
45+ - compiler: ghc-9.6.5
4146 compilerKind: ghc
42− compilerVersion: 9.6.4
47+ compilerVersion: 9.6.5
4348 setup-method: ghcup
4449 allow-failure: false
4550 - compiler: ghc-9.4.8
@@ -65,47 +70,12 @@ jobs:
6570 - compiler: ghc-8.8.4
6671 compilerKind: ghc
6772 compilerVersion: 8.8.4
68− setup-method: hvr-ppa
69− allow-failure: false
70− - compiler: ghc-8.6.4
71− compilerKind: ghc
72− compilerVersion: 8.6.4
73− setup-method: hvr-ppa
74− allow-failure: false
75− - compiler: ghc-8.4.4
76− compilerKind: ghc
77− compilerVersion: 8.4.4
78− setup-method: hvr-ppa
79− allow-failure: false
80− - compiler: ghc-8.2.2
81− compilerKind: ghc
82− compilerVersion: 8.2.2
83− setup-method: hvr-ppa
84− allow-failure: false
85− - compiler: ghc-8.0.2
86− compilerKind: ghc
87− compilerVersion: 8.0.2
88− setup-method: hvr-ppa
89− allow-failure: false
90− - compiler: ghc-7.10.3
91− compilerKind: ghc
92− compilerVersion: 7.10.3
93− setup-method: hvr-ppa
94− allow-failure: false
95− - compiler: ghc-7.8.4
96− compilerKind: ghc
97− compilerVersion: 7.8.4
98− setup-method: hvr-ppa
99− allow-failure: false
100− - compiler: ghc-7.6.3
101− compilerKind: ghc
102− compilerVersion: 7.6.3
103− setup-method: hvr-ppa
73+ setup-method: ghcup
10474 allow-failure: false
105− - compiler: ghc-7.4.2
75+ - compiler: ghc-8.6.5
10676 compilerKind: ghc
107− compilerVersion: 7.4.2
108− setup-method: hvr-ppa
77+ compilerVersion: 8.6.5
78+ setup-method: ghcup
10979 allow-failure: false
11080 fail-fast: false
11181 steps:
@@ -113,23 +83,11 @@ jobs:
11383 run: |
11484 apt-get update
11585 apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
116− if [ "${{ matrix.setup-method }}" = ghcup ]; then
117− mkdir -p "$HOME/.ghcup/bin"
118− curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
119− chmod a+x "$HOME/.ghcup/bin/ghcup"
120− "$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml;
121− "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
122− "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
123− else
124− apt-add-repository -y 'ppa:hvr/ghc'
125− apt-get update
126− apt-get install -y "$HCNAME"
127− mkdir -p "$HOME/.ghcup/bin"
128− curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
129− chmod a+x "$HOME/.ghcup/bin/ghcup"
130− "$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml;
131− "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
132− fi
86+ mkdir -p "$HOME/.ghcup/bin"
87+ curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
88+ chmod a+x "$HOME/.ghcup/bin/ghcup"
89+ "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
90+ "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
13391 env:
13492 HCKIND: ${{ matrix.compilerKind }}
13593 HCNAME: ${{ matrix.compiler }}
@@ -141,22 +99,13 @@ jobs:
14199 echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
142100 echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
143101 HCDIR=/opt/$HCKIND/$HCVER
144− if [ "${{ matrix.setup-method }}" = ghcup ]; then
145− HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
146− HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
147− HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
148− echo "HC=$HC" >> "$GITHUB_ENV"
149− echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
150− echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
151− echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
152− else
153− HC=$HCDIR/bin/$HCKIND
154− echo "HC=$HC" >> "$GITHUB_ENV"
155− echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
156− echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
157− echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
158− fi
159−
102+ HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
103+ HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
104+ HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
105+ echo "HC=$HC" >> "$GITHUB_ENV"
106+ echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
107+ echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
108+ echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
160109 HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
161110 echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
162111 echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
@@ -213,14 +162,14 @@ jobs:
213162 chmod a+x $HOME/.cabal/bin/cabal-plan
214163 cabal-plan --version
215164 - name: checkout
216− uses: actions/checkout@v3
165+ uses: actions/checkout@v4
217166 with:
218167 path: source
219168 - name: initial cabal.project for sdist
220169 run: |
221170 touch cabal.project
222171 echo "packages: $GITHUB_WORKSPACE/source/uuid-types" >> cabal.project
223− echo "packages: $GITHUB_WORKSPACE/source/uuid" >> cabal.project
172+ if [ $((HCNUMVER < 91000)) -ne 0 ] ; then echo "packages: $GITHUB_WORKSPACE/source/uuid" >> cabal.project ; fi
224173 cat cabal.project
225174 - name: sdist
226175 run: |
@@ -240,14 +189,14 @@ jobs:
240189 touch cabal.project
241190 touch cabal.project.local
242191 echo "packages: ${PKGDIR_uuid_types}" >> cabal.project
243− echo "packages: ${PKGDIR_uuid}" >> cabal.project
244− if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package uuid-types" >> cabal.project ; fi
245− if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
246− if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package uuid" >> cabal.project ; fi
247− if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
192+ if [ $((HCNUMVER < 91000)) -ne 0 ] ; then echo "packages: ${PKGDIR_uuid}" >> cabal.project ; fi
193+ echo "package uuid-types" >> cabal.project
194+ echo " ghc-options: -Werror=missing-methods" >> cabal.project
195+ if [ $((HCNUMVER < 91000)) -ne 0 ] ; then echo "package uuid" >> cabal.project ; fi
196+ if [ $((HCNUMVER < 91000)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
248197 cat >> cabal.project <<EOF
249198 EOF
250− $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(uuid|uuid-types)$/; }' >> cabal.project.local
199+ $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(uuid|uuid-types)$/; }' >> cabal.project.local
251200 cat cabal.project
252201 cat cabal.project.local
253202 - name: dump install plan
@@ -255,7 +204,7 @@ jobs:
255204 $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
256205 cabal-plan
257206 - name: restore cache
258− uses: actions/cache/restore@v3
207+ uses: actions/cache/restore@v4
259208 with:
260209 key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
261210 path: ~/.cabal/store
@@ -277,8 +226,8 @@ jobs:
277226 run: |
278227 cd ${PKGDIR_uuid_types} || false
279228 ${CABAL} -vnormal check
280− cd ${PKGDIR_uuid} || false
281− ${CABAL} -vnormal check
229+ if [ $((HCNUMVER < 91000)) -ne 0 ] ; then cd ${PKGDIR_uuid} || false ; fi
230+ if [ $((HCNUMVER < 91000)) -ne 0 ] ; then ${CABAL} -vnormal check ; fi
282231 - name: haddock
283232 run: |
284233 $CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
@@ -291,18 +240,12 @@ jobs:
291240 rm -f cabal.project.local
292241 - name: constraint set random-1.2
293242 run: |
294− if [ $((HCNUMVER >= 71000)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.2.*' all --dry-run ; fi
295− if [ $((HCNUMVER >= 71000)) -ne 0 ] ; then cabal-plan topo | sort ; fi
296− if [ $((HCNUMVER >= 71000)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.2.*' --dependencies-only -j2 all ; fi
297− if [ $((HCNUMVER >= 71000)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.2.*' all ; fi
298− - name: constraint set random-1.1
299− run: |
300− if [ $((HCNUMVER < 90800)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.1.*' all --dry-run ; fi
301− if [ $((HCNUMVER < 90800)) -ne 0 ] ; then cabal-plan topo | sort ; fi
302− if [ $((HCNUMVER < 90800)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.1.*' --dependencies-only -j2 all ; fi
303− if [ $((HCNUMVER < 90800)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.1.*' all ; fi
243+ $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.2.*' all --dry-run
244+ cabal-plan topo | sort
245+ $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.2.*' --dependencies-only -j2 all
246+ $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.2.*' all
304247 - name: save cache
305− uses: actions/cache/save@v3
248+ uses: actions/cache/save@v4
306249 if: always()
307250 with:
308251 key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
cabal.haskell-ci−4
@@ -2,10 +2,6 @@ branches: master
22jobs-selection: any
33head-hackage: False
44
5−constraint-set random-1.1
6− ghc: <9.7
7− constraints: random==1.1.*
8−
95constraint-set random-1.2
106 ghc: >=7.10
117 constraints: random==1.2.*
uuid-bench/uuid-bench.cabal+8−11
@@ -14,10 +14,7 @@ build-type: Simple
1414
1515-- Benchmarking with older GHCs is not meaningful
1616tested-with:
17− GHC ==8.0.2
18− || ==8.2.2
19− || ==8.4.4
20− || ==8.6.4
17+ GHC ==8.6.5
2118 || ==8.8.4
2219 || ==8.10.7
2320 || ==9.0.2
@@ -42,17 +39,17 @@ source-repository head
4239
4340library
4441 build-depends:
45− base >=4.9 && <5
46− , binary >=0.5.1.0 && <0.9
47− , bytestring >=0.9.2.1 && <0.13
42+ base >=4.12.0.0 && <5
43+ , binary >=0.8.6.0 && <0.9
44+ , bytestring >=0.10.8.2 && <0.13
4845 , cryptohash-md5 >=0.11.100 && <0.12
4946 , cryptohash-sha1 >=0.11.100 && <0.12
50− , deepseq >=1.3.0.0 && <1.6
47+ , deepseq >=1.4.4.0 && <1.6
5148 , entropy >=0.3.7 && <0.5
52− , hashable >=1.2.7.0 && <1.5
49+ , hashable >=1.4.4.0 && <1.5
5350 , network-info >=0.2 && <0.3
54− , random >=1.1 && <1.3
55− , template-haskell >=2.7.0.0 && <2.22
51+ , random >=1.2.1.2 && <1.3
52+ , template-haskell >=2.14.0.0 && <2.22
5653 , text >=1.2.3.0 && <1.3 || >=2.0 && <2.2
5754 , time >=1.4 && <1.13
5855
uuid-types/src/Data/UUID/Types.hs−4
@@ -1,8 +1,4 @@
1−{-# LANGUAGE CPP #-}
2−
3−#if __GLASGOW_HASKELL__ >= 702
41{-# LANGUAGE Trustworthy #-}
5−#endif
62
73{- |
84Module : Data.UUID.Types
uuid-types/src/Data/UUID/Types/Internal.hs+1−72
@@ -2,14 +2,9 @@
22{-# LANGUAGE DeriveDataTypeable #-}
33{-# LANGUAGE TypeFamilies #-}
44{-# LANGUAGE ViewPatterns #-}
5−#if __GLASGOW_HASKELL__ >= 704
65{-# LANGUAGE Unsafe #-}
7−#endif
8−#if __GLASGOW_HASKELL__ >=800
96{-# LANGUAGE DeriveLift #-}
107{-# LANGUAGE StandaloneDeriving #-}
11−#endif
12−
138{-# OPTIONS_HADDOCK hide #-}
149
1510-- |
@@ -76,19 +71,10 @@ import qualified Data.Text.Encoding as T
7671
7772import Data.UUID.Types.Internal.Builder
7873
79−#if MIN_VERSION_random(1,2,0)
8074import System.Random (Random (..), uniform)
8175import System.Random.Stateful (Uniform (..), uniformWord64)
82−#else
83−import System.Random (Random (..), next)
84−#endif
8576
86−#if __GLASGOW_HASKELL__ >=800
8777import Language.Haskell.TH.Syntax (Lift)
88−#else
89−import Language.Haskell.TH (appE, varE)
90−import Language.Haskell.TH.Syntax (Lift (..), mkNameG_v, Lit (IntegerL), Exp (LitE))
91−#endif
9278
9379-- | Type representing <https://en.wikipedia.org/wiki/UUID Universally Unique Identifiers (UUID)> as specified in
9480-- <http://tools.ietf.org/html/rfc4122 RFC 4122>.
@@ -471,23 +457,13 @@ fromASCIIBytes bs = do
471457-- | Similar to `toASCIIBytes` except we produce a lazy `BL.ByteString`.
472458toLazyASCIIBytes :: UUID -> BL.ByteString
473459toLazyASCIIBytes =
474−#if MIN_VERSION_bytestring(0,10,0)
475460 BL.fromStrict
476−#else
477− BL.fromChunks . return
478−#endif
479461 . toASCIIBytes
480462
481463-- | Similar to `fromASCIIBytes` except parses from a lazy `BL.ByteString`.
482464fromLazyASCIIBytes :: BL.ByteString -> Maybe UUID
483465fromLazyASCIIBytes bs =
484− if BL.length bs == 36 then fromASCIIBytes (
485−#if MIN_VERSION_bytestring(0,10,0)
486− BL.toStrict bs
487−#else
488− B.concat $ BL.toChunks bs
489−#endif
490− ) else Nothing
466+ if BL.length bs == 36 then fromASCIIBytes (BL.toStrict bs) else Nothing
491467
492468--
493469-- Class Instances
@@ -495,7 +471,6 @@ fromLazyASCIIBytes bs =
495471
496472-- | This 'Random' instance produces __insecure__ version 4 UUIDs as
497473-- specified in <http://tools.ietf.org/html/rfc4122 RFC 4122>.
498−#if MIN_VERSION_random(1,2,0)
499474instance Random UUID where
500475 random = uniform
501476 randomR _ = random -- range is ignored
@@ -506,29 +481,6 @@ instance Uniform UUID where
506481 w0 <- uniformWord64 gen
507482 w1 <- uniformWord64 gen
508483 pure $ buildFromBytes 4 /-/ w0 /-/ w1
509−#else
510−instance Random UUID where
511− random g = (fromGenNext w0 w1 w2 w3 w4, g4)
512− where (w0, g0) = next g
513− (w1, g1) = next g0
514− (w2, g2) = next g1
515− (w3, g3) = next g2
516− (w4, g4) = next g3
517− randomR _ = random -- range is ignored
518−
519−-- |Build a UUID from the results of five calls to next on a StdGen.
520−-- While next on StdGet returns an Int, it doesn't provide 32 bits of
521−-- randomness. This code relies on at last 28 bits of randomness in the
522−-- and optimizes its use so as to make only five random values, not six.
523−fromGenNext :: Int -> Int -> Int -> Int -> Int -> UUID
524−fromGenNext w0 w1 w2 w3 w4 =
525− buildFromBytes 4 /-/ (ThreeByte w0)
526− /-/ (ThreeByte w1)
527− /-/ w2 -- use all 4 bytes because we know the version
528− -- field will "cover" the upper, non-random bits
529− /-/ (ThreeByte w3)
530− /-/ (ThreeByte w4)
531−#endif
532484
533485-- |A ByteSource to extract only three bytes from an Int, since next on StdGet
534486-- only returns 31 bits of randomness.
@@ -622,27 +574,4 @@ instance Data UUID where
622574uuidType :: DataType
623575uuidType = mkNoRepType "Data.UUID.Types.UUID"
624576
625−#if !MIN_VERSION_base(4,5,0)
626−unsafeShiftR, unsafeShiftL :: Bits w => w -> Int -> w
627−{-# INLINE unsafeShiftR #-}
628−unsafeShiftR = shiftR
629−{-# INLINE unsafeShiftL #-}
630−unsafeShiftL = shiftL
631−#endif
632−
633−#if __GLASGOW_HASKELL__ >=800
634577deriving instance Lift UUID
635−#else
636−instance Lift UUID where
637− lift (UUID w1 w2) = varE fromWords64Name `appE` liftW64 w1 `appE` liftW64 w2
638− where
639− fromWords64Name = mkNameG_v currentPackageKey "Data.UUID.Types.Internal" "fromWords64"
640− liftW64 x = return (LitE (IntegerL (fromIntegral x)))
641−
642−currentPackageKey :: String
643−#ifdef CURRENT_PACKAGE_KEY
644−currentPackageKey = CURRENT_PACKAGE_KEY
645−#else
646−currentPackageKey = "uuid-types-1.0.5"
647−#endif
648−#endif
uuid-types/src/Data/UUID/Types/Internal/Builder.hs−3
@@ -1,8 +1,5 @@
1−{-# LANGUAGE CPP #-}
21{-# LANGUAGE TypeFamilies #-}
3−#if __GLASGOW_HASKELL__ >= 704
42{-# LANGUAGE Unsafe #-}
5−#endif
63
74{-# OPTIONS_HADDOCK hide #-}
85
uuid-types/uuid-types.cabal+12−18
@@ -1,6 +1,6 @@
11cabal-version: 1.12
22name: uuid-types
3−version: 1.0.5.1
3+version: 1.0.6
44copyright:
55 (c) 2017-2018 Herbert Valerio Riedel
66 (c) 2008-2014 Antoine Latter
@@ -12,21 +12,15 @@ license-file: LICENSE
1212category: Data
1313build-type: Simple
1414tested-with:
15− GHC ==7.4.2
16− || ==7.6.3
17− || ==7.8.4
18− || ==7.10.3
19− || ==8.0.2
20− || ==8.2.2
21− || ==8.4.4
22− || ==8.6.4
15+ GHC ==8.6.5
2316 || ==8.8.4
2417 || ==8.10.7
2518 || ==9.0.2
2619 || ==9.2.8
2720 || ==9.4.8
28− || ==9.6.4
21+ || ==9.6.5
2922 || ==9.8.2
23+ || ==9.10.1
3024
3125synopsis: Type definitions for Universally Unique Identifiers
3226description:
@@ -50,14 +44,14 @@ source-repository head
5044
5145library
5246 build-depends:
53− base >=4.5 && <5
54− , binary >=0.5.1.0 && <0.9
55− , bytestring >=0.9.2.1 && <0.13
56− , deepseq >=1.3.0.0 && <1.6
57− , hashable >=1.2.7.0 && <1.5
58− , random >=1.1 && <1.3
59− , template-haskell >=2.7.0.0 && <2.22
60− , text >=1.2.3.0 && <1.3 || >=2.0 && <2.2
47+ base >=4.12.0.0 && <5
48+ , binary >=0.8.6.0 && <0.9
49+ , bytestring >=0.10.8.2 && <0.13
50+ , deepseq >=1.4.4.0 && <1.6
51+ , hashable >=1.4.4.0 && <1.5
52+ , random >=1.2.1.2 && <1.3
53+ , template-haskell >=2.14.0.0 && <2.23
54+ , text >=1.2.3.0 && <1.3 || >=2.0 && <2.2
6155
6256 exposed-modules: Data.UUID.Types
6357
uuid/uuid.cabal+9−19
@@ -1,7 +1,6 @@
11cabal-version: 1.12
22name: uuid
3−version: 1.3.15
4−x-revision: 3
3+version: 1.3.16
54copyright: (c) 2008-2014 Antoine Latter
65author: Antoine Latter
76maintainer: Oleg Grenrus <oleg.grenrus@iki.fi>
@@ -10,20 +9,13 @@ license-file: LICENSE
109category: Data
1110build-type: Simple
1211tested-with:
13− GHC ==7.4.2
14− || ==7.6.3
15− || ==7.8.4
16− || ==7.10.3
17− || ==8.0.2
18− || ==8.2.2
19− || ==8.4.4
20− || ==8.6.4
12+ GHC ==8.6.5
2113 || ==8.8.4
2214 || ==8.10.7
2315 || ==9.0.2
2416 || ==9.2.8
2517 || ==9.4.8
26− || ==9.6.4
18+ || ==9.6.5
2719 || ==9.8.2
2820
2921synopsis:
@@ -46,22 +38,20 @@ source-repository head
4638
4739library
4840 build-depends:
49− base >=4.5 && <5
50− , binary >=0.5.1.0 && <0.9
51− , bytestring >=0.9.2.1 && <0.13
41+ base >=4.12 && <5
42+ , binary >=0.8.6.0 && <0.9
43+ , bytestring >=0.10.8.2 && <0.13
5244 , cryptohash-md5 >=0.11.100 && <0.12
5345 , cryptohash-sha1 >=0.11.100 && <0.12
5446 , entropy >=0.3.7 && <0.5
5547 , network-info >=0.2 && <0.3
56− , random >=1.1 && <1.3
57− , text >=1.2.3.0 && <1.3 || >=2.0 && <2.2
48+ , random >=1.2.1.2 && <1.3
49+ , text >=1.2.3.0 && <1.3 || >=2.0 && <2.2
5850 , time >=1.4 && <1.13
5951
6052 -- strict dependency on uuid-types,
6153 -- as we re-rexport datatype, thus leak instances etc.
62− build-depends:
63− uuid-types >=1.0.5 && <1.0.6
64−
54+ build-depends: uuid-types >=1.0.6 && <1.0.7
6555 exposed-modules:
6656 Data.UUID
6757 Data.UUID.Util