Skip to content

Commit 69cc278

Browse files
committed
v0.94.0.3: Drop support for GHC 7, make Prelude imports explicit
1 parent 9f37c0d commit 69cc278

File tree

9 files changed

+119
-108
lines changed

9 files changed

+119
-108
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 38 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
#
77
# haskell-ci regenerate
88
#
9-
# For more information, see https://github.com/andreasabel/haskell-ci
9+
# For more information, see https://github.com/haskell-CI/haskell-ci
1010
#
11-
# version: 0.18.0.20240225
11+
# version: 0.19.20250216
1212
#
13-
# REGENDATA ("0.18.0.20240225",["github","regex-base.cabal"])
13+
# REGENDATA ("0.19.20250216",["github","regex-base.cabal"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -23,23 +23,33 @@ on:
2323
jobs:
2424
linux:
2525
name: Haskell-CI - Linux - ${{ matrix.compiler }}
26-
runs-on: ubuntu-20.04
26+
runs-on: ubuntu-24.04
2727
timeout-minutes:
2828
60
2929
container:
30-
image: buildpack-deps:focal
30+
image: buildpack-deps:jammy
3131
continue-on-error: ${{ matrix.allow-failure }}
3232
strategy:
3333
matrix:
3434
include:
35-
- compiler: ghc-9.8.2
35+
- compiler: ghc-9.12.1
3636
compilerKind: ghc
37-
compilerVersion: 9.8.2
37+
compilerVersion: 9.12.1
3838
setup-method: ghcup
3939
allow-failure: false
40-
- compiler: ghc-9.6.4
40+
- compiler: ghc-9.10.1
4141
compilerKind: ghc
42-
compilerVersion: 9.6.4
42+
compilerVersion: 9.10.1
43+
setup-method: ghcup
44+
allow-failure: false
45+
- compiler: ghc-9.8.4
46+
compilerKind: ghc
47+
compilerVersion: 9.8.4
48+
setup-method: ghcup
49+
allow-failure: false
50+
- compiler: ghc-9.6.6
51+
compilerKind: ghc
52+
compilerVersion: 9.6.6
4353
setup-method: ghcup
4454
allow-failure: false
4555
- compiler: ghc-9.4.8
@@ -89,15 +99,29 @@ jobs:
8999
allow-failure: false
90100
fail-fast: false
91101
steps:
92-
- name: apt
102+
- name: apt-get install
93103
run: |
94104
apt-get update
95105
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev
106+
- name: Install GHCup
107+
run: |
96108
mkdir -p "$HOME/.ghcup/bin"
97-
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
109+
curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup"
98110
chmod a+x "$HOME/.ghcup/bin/ghcup"
111+
- name: Install cabal-install
112+
run: |
113+
"$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
114+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
115+
- name: Install GHC (GHCup)
116+
if: matrix.setup-method == 'ghcup'
117+
run: |
99118
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
100-
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
119+
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
120+
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
121+
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
122+
echo "HC=$HC" >> "$GITHUB_ENV"
123+
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
124+
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
101125
env:
102126
HCKIND: ${{ matrix.compilerKind }}
103127
HCNAME: ${{ matrix.compiler }}
@@ -108,21 +132,12 @@ jobs:
108132
echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
109133
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
110134
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
111-
HCDIR=/opt/$HCKIND/$HCVER
112-
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
113-
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
114-
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
115-
echo "HC=$HC" >> "$GITHUB_ENV"
116-
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
117-
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
118-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
119135
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
120136
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
121137
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
122138
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
123139
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
124140
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
125-
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
126141
env:
127142
HCKIND: ${{ matrix.compilerKind }}
128143
HCNAME: ${{ matrix.compiler }}
@@ -200,7 +215,7 @@ jobs:
200215
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
201216
cat >> cabal.project <<EOF
202217
EOF
203-
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(regex-base)$/; }' >> cabal.project.local
218+
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(regex-base)$/; }' >> cabal.project.local
204219
cat cabal.project
205220
cat cabal.project.local
206221
- name: dump install plan
@@ -234,30 +249,9 @@ jobs:
234249
run: |
235250
rm -f cabal.project.local
236251
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
237-
- name: prepare for constraint sets
238-
run: |
239-
rm -f cabal.project.local
240-
- name: constraint set text-2.1
241-
run: |
242-
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='text ^>= 2.1' all --dry-run ; fi
243-
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then cabal-plan topo | sort ; fi
244-
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='text ^>= 2.1' --dependencies-only -j2 all ; fi
245-
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='text ^>= 2.1' all ; fi
246-
- name: constraint set containers-0.7
247-
run: |
248-
if [ $((HCNUMVER >= 80200 && HCNUMVER < 90800)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers ^>= 0.7' all --dry-run ; fi
249-
if [ $((HCNUMVER >= 80200 && HCNUMVER < 90800)) -ne 0 ] ; then cabal-plan topo | sort ; fi
250-
if [ $((HCNUMVER >= 80200 && HCNUMVER < 90800)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers ^>= 0.7' --dependencies-only -j2 all ; fi
251-
if [ $((HCNUMVER >= 80200 && HCNUMVER < 90800)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers ^>= 0.7' all ; fi
252-
- name: constraint set bytestring-0.12
253-
run: |
254-
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='bytestring ^>= 0.12' all --dry-run ; fi
255-
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then cabal-plan topo | sort ; fi
256-
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='bytestring ^>= 0.12' --dependencies-only -j2 all ; fi
257-
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='bytestring ^>= 0.12' all ; fi
258252
- name: save cache
259-
uses: actions/cache/save@v4
260253
if: always()
254+
uses: actions/cache/save@v4
261255
with:
262256
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
263257
path: ~/.cabal/store

ChangeLog.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
See also http://pvp.haskell.org/faq
22

3+
## 0.94.0.3
4+
5+
_2025-03-02 Andreas Abel_
6+
7+
- Drop support for GHC 7
8+
- Make `Prelude` imports explicit, add `LANGUAGE NoImplicitPrelude`
9+
- Make upper bounds of dependencies major-major (all are shipped with GHC)
10+
- Tested with GHC 8.0 - 9.12.1
11+
312
## 0.94.0.2 Revision 1
413

514
_2022-05-25 Andreas Abel_

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
regex-base
21
[![Hackage version](https://img.shields.io/hackage/v/regex-base.svg?label=Hackage&color=informational)](http://hackage.haskell.org/package/regex-base)
2+
[![Stackage Nightly](http://stackage.org/package/regex-base/badge/nightly)](http://stackage.org/nightly/package/regex-base)
3+
[![Stackage LTS](http://stackage.org/package/regex-base/badge/lts)](http://stackage.org/lts/package/regex-base)
34
[![Haskell-CI](https://github.com/haskell-hvr/regex-base/actions/workflows/haskell-ci.yml/badge.svg?branch=master&event=push)](https://github.com/haskell-hvr/regex-base/actions/workflows/haskell-ci.yml)
45
[![License](https://img.shields.io/badge/License-BSD_3--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
6+
regex-base
57
==========
68

79
Common interface to several Haskell implementations of regular expressions.

cabal.haskell-ci

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
branches: master
22

3-
constraint-set bytestring-0.12
4-
ghc: >= 8.2
5-
constraints: bytestring ^>= 0.12
6-
tests: True
7-
run-tests: True
3+
-- constraint-set bytestring-0.12
4+
-- ghc: >= 8.2
5+
-- constraints: bytestring ^>= 0.12
6+
-- tests: True
7+
-- run-tests: True
88

9-
constraint-set containers-0.7
10-
ghc: >= 8.2 && < 9.7
11-
constraints: containers ^>= 0.7
12-
tests: True
13-
run-tests: True
9+
-- constraint-set containers-0.7
10+
-- ghc: >= 8.2 && < 9.7
11+
-- constraints: containers ^>= 0.7
12+
-- tests: True
13+
-- run-tests: True
1414

15-
constraint-set text-2.1
16-
ghc: >= 8.2
17-
constraints: text ^>= 2.1
18-
tests: True
19-
run-tests: True
15+
-- constraint-set text-2.1
16+
-- ghc: >= 8.2
17+
-- constraints: text ^>= 2.1
18+
-- tests: True
19+
-- run-tests: True

regex-base.cabal

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
cabal-version: 1.12
1+
cabal-version: 1.24
22
name: regex-base
3-
version: 0.94.0.2
4-
x-revision: 4
3+
version: 0.94.0.3
54

65
build-type: Simple
76
license: BSD3
@@ -30,13 +29,15 @@ description:
3029
.
3130
See also <https://wiki.haskell.org/Regular_expressions> for more information.
3231

33-
extra-source-files:
32+
extra-doc-files:
3433
ChangeLog.md
3534
README.md
3635

3736
tested-with:
38-
GHC == 9.8.2
39-
GHC == 9.6.4
37+
GHC == 9.12.1
38+
GHC == 9.10.1
39+
GHC == 9.8.4
40+
GHC == 9.6.6
4041
GHC == 9.4.8
4142
GHC == 9.2.8
4243
GHC == 9.0.2
@@ -54,7 +55,7 @@ source-repository head
5455
source-repository this
5556
type: git
5657
location: https://github.com/haskell-hvr/regex-base.git
57-
tag: v0.94.0.2-r4
58+
tag: v0.94.0.3
5859

5960
library
6061
hs-source-dirs: src
@@ -68,28 +69,25 @@ library
6869
other-modules:
6970
Paths_regex_base
7071

71-
default-language: Haskell2010
72-
other-extensions:
72+
default-language:
73+
Haskell2010
74+
75+
default-extensions:
76+
NoImplicitPrelude
77+
Safe
7378
MultiParamTypeClasses
7479
FunctionalDependencies
7580
TypeSynonymInstances
7681
FlexibleInstances
7782
FlexibleContexts
7883

79-
if impl(ghc >= 7.4)
80-
default-extensions: Safe
81-
build-depends: containers >= 0.4.2.1
82-
, bytestring >= 0.9.2.1
83-
84-
build-depends: base >= 4.3 && < 5
85-
, containers >= 0.4 && < 0.8
86-
, bytestring >= 0.9 && < 0.13
87-
, array >= 0.3 && < 0.6
88-
, text >= 1.2.3 && < 1.3 || >=2.0 && <2.2
89-
90-
if !impl(ghc >= 8)
91-
build-depends: fail == 4.9.*
84+
build-depends:
85+
base >= 4.9 && < 5
86+
, containers >= 0.5 && < 1
87+
, bytestring >= 0.10 && < 1
88+
, array >= 0.5 && < 1
89+
, text >= 1.2.3 && < 1.3 || >= 2.0 && < 3
9290

93-
ghc-options: -Wall
94-
if impl(ghc >= 8)
95-
ghc-options: -Wcompat
91+
ghc-options:
92+
-Wall
93+
-Wcompat

src/Text/Regex/Base.hs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies #-}
21
-----------------------------------------------------------------------------
32
-- |
43
--
54
-- Module : Text.Regex.Base
65
-- Copyright : (c) Chris Kuklewicz 2006
76
-- SPDX-License-Identifier: BSD-3-Clause
87
--
9-
-- Maintainer : hvr@gnu.org, Andreas Abel
8+
-- Maintainer : Andreas Abel
109
-- Stability : stable
1110
-- Portability : non-portable (MPTC+FD)
1211
--
@@ -72,7 +71,7 @@ module Text.Regex.Base (getVersion_Text_Regex_Base
7271
-- | RegexLike defines classes and type, and 'Extract' instances
7372
,module Text.Regex.Base.RegexLike) where
7473

75-
import Data.Version(Version(..))
74+
import Data.Version(Version)
7675
import Text.Regex.Base.RegexLike
7776
import Text.Regex.Base.Context()
7877

src/Text/Regex/Base/Context.hs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,12 @@
1-
{-# LANGUAGE CPP #-}
2-
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, FlexibleContexts, TypeSynonymInstances #-}
3-
4-
{-# OPTIONS_GHC -fno-warn-orphans #-}
5-
#if __GLASGOW_HASKELL__ >= 702
6-
{-# OPTIONS_GHC -fno-warn-incomplete-uni-patterns #-}
7-
#endif
1+
{-# OPTIONS_GHC -Wno-orphans #-}
82

93
{-|
104
115
Module : Text.Regex.Base.Context
126
Copyright : (c) Chris Kuklewicz 2006
137
SPDX-License-Identifier: BSD-3-Clause
148
15-
Maintainer : hvr@gnu.org, Andreas Abel
9+
Maintainer : Andreas Abel
1610
Stability : stable
1711
Portability : non-portable (MPTC+FD)
1812
@@ -192,12 +186,18 @@ Unused matches are 'empty' (defined via 'Extract')
192186

193187
module Text.Regex.Base.Context() where
194188

195-
import Prelude hiding (fail)
196-
import Control.Monad.Fail (MonadFail(fail)) -- see 'regexFailed'
189+
import Prelude
190+
( Int
191+
, Bool(True,False)
192+
, (.), ($), fmap, fst, id, return
193+
, length, map
194+
, pred
195+
)
197196

197+
import Control.Monad.Fail (MonadFail(fail)) -- see 'regexFailed'
198198
import Control.Monad(liftM)
199199
import Data.Array(Array,(!),elems,listArray)
200-
-- import Data.Maybe(maybe)
200+
import Data.Maybe(Maybe(Nothing,Just), maybe)
201201
import Text.Regex.Base.RegexLike(RegexLike(..),RegexContext(..)
202202
,AllSubmatches(..),AllTextSubmatches(..),AllMatches(..),AllTextMatches(..)
203203
,MatchResult(..),Extract(empty),MatchOffset,MatchLength,MatchArray,MatchText)

src/Text/Regex/Base/Impl.hs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
-- Copyright : (c) Chris Kuklewicz 2006
55
-- SPDX-License-Identifier: BSD-3-Clause
66
--
7-
-- Maintainer : hvr@gnu.org, Andreas Abel
7+
-- Maintainer : Andreas Abel
88
-- Stability : stable
99
-- Portability : non-portable (Text.Regex.Base needs MPTC+FD)
1010
--
@@ -40,7 +40,11 @@
4040

4141
module Text.Regex.Base.Impl(polymatch,polymatchM) where
4242

43-
import Prelude hiding (fail)
43+
import Prelude
44+
( Maybe(Nothing,Just)
45+
, ($)
46+
, fst, return
47+
)
4448
import Control.Monad.Fail (MonadFail(fail))
4549

4650
import Text.Regex.Base

0 commit comments

Comments
 (0)