Skip to content

Commit f8c3145

Browse files
committed
v0.96.0.2: Drop support for GHC 7, make Prelude imports explicit
1 parent b6d11d4 commit f8c3145

File tree

12 files changed

+100
-51
lines changed

12 files changed

+100
-51
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,7 @@
22
/dist-newstyle/
33
/cabal.project.local
44
/.ghc.environment.*
5+
/.stack-work/
6+
/stack*.yaml.lock
7+
*~
8+

ChangeLog.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
For versioning policy, see: http://pvp.haskell.org/faq
1+
## 0.96.0.2 (2025-03-02)
2+
3+
- Drop support for GHC 7
4+
- Make `Prelude` imports explicit, add `LANGUAGE NoImplicitPrelude`
5+
- Make upper bounds of dependencies major-major (all are shipped with GHC)
6+
- Tested with GHC 8.0 - 9.12.1
27

38
## 0.96.0.1 Revision 3 (2023-09-28)
49

LICENSE

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
This modile is under this "3 clause" BSD license:
2-
31
Copyright (c) 2007, Christopher Kuklewicz
42
All rights reserved.
53

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[![Hackage version](https://img.shields.io/hackage/v/regex-posix.svg?label=Hackage&color=informational)](http://hackage.haskell.org/package/regex-posix)
2+
[![Stackage Nightly](http://stackage.org/package/regex-posix/badge/nightly)](http://stackage.org/nightly/package/regex-posix)
3+
[![Stackage LTS](http://stackage.org/package/regex-posix/badge/lts)](http://stackage.org/lts/package/regex-posix)
4+
[![Haskell-CI](https://github.com/haskell-hvr/regex-posix/actions/workflows/haskell-ci.yml/badge.svg?branch=master&event=push)](https://github.com/haskell-hvr/regex-posix/actions/workflows/haskell-ci.yml)
5+
[![License](https://img.shields.io/badge/License-BSD_3--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
6+
regex-posix
7+
===========
8+
9+
[Documentation](https://hackage.haskell.org/package/regex-posix/docs/Text-Regex-Posix.html) on hackage.

Setup.hs

Lines changed: 0 additions & 2 deletions
This file was deleted.

regex-posix.cabal

Lines changed: 17 additions & 22 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-posix
3-
version: 0.96.0.1
4-
x-revision: 3
3+
version: 0.96.0.2
54

65
build-type: Simple
76
license: BSD3
@@ -19,8 +18,11 @@ description:
1918
.
2019
See also <https://wiki.haskell.org/Regular_expressions> for more information.
2120

22-
extra-source-files:
21+
extra-doc-files:
22+
README.md
2323
ChangeLog.md
24+
25+
extra-source-files:
2426
cbits/myfree.h
2527

2628
tested-with:
@@ -45,7 +47,7 @@ source-repository head
4547
source-repository this
4648
type: git
4749
location: https://github.com/haskell-hvr/regex-base.git
48-
tag: v0.96.0.1-r3
50+
tag: v0.96.0.2
4951

5052
flag _regex-posix-clib
5153
manual: False
@@ -73,32 +75,25 @@ library
7375
-- Otherwise, use POSIX.2 regex implementation from @libc@.
7476
-- However, Windows/msys2 doesn't provide a POSIX.2 regex impl in its @libc@.
7577

76-
default-language: Haskell2010
78+
default-language:
79+
Haskell2010
7780
default-extensions:
81+
NoImplicitPrelude
7882
MultiParamTypeClasses
7983
FunctionalDependencies
8084
ForeignFunctionInterface
8185
GeneralizedNewtypeDeriving
8286
FlexibleContexts
83-
TypeSynonymInstances
84-
-- ^ for ghc 7.0, subsumed under FlexibleInstances later
8587
FlexibleInstances
8688

87-
build-depends: regex-base == 0.94.*
88-
, base >= 4.3 && < 5
89-
, containers >= 0.4 && < 0.8
90-
, bytestring >= 0.9 && < 0.13
91-
, array >= 0.3 && < 0.6
92-
93-
if impl(ghc < 8)
94-
build-depends: fail == 4.9.*
95-
96-
-- Warnings
89+
build-depends:
90+
regex-base == 0.94.*
91+
, base >= 4.9 && < 5
92+
, containers >= 0.5 && < 1
93+
, bytestring >= 0.10 && < 1
94+
, array >= 0.5 && < 1
9795

9896
ghc-options:
9997
-Wall
100-
-fno-warn-unused-imports
101-
102-
if impl(ghc >= 8)
103-
ghc-options:
10498
-Wcompat
99+
-Wno-orphans

src/Text/Regex/Posix.hs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
-- Copyright : (c) Chris Kuklewicz 2006
66
-- License : BSD-3-Clause
77
--
8-
-- Maintainer : [email protected], Andreas Abel
8+
-- Maintainer : Andreas Abel
99
-- Stability : stable
1010
-- Portability : non-portable (regex-base needs MPTC+FD)
1111
--
@@ -55,8 +55,7 @@ module Text.Regex.Posix(getVersion_Text_Regex_Posix
5555
-- ** Wrap, for '=~' and '=~~', types and constants
5656
,module Text.Regex.Posix.Wrap) where
5757

58-
import Prelude hiding (fail)
59-
import Control.Monad.Fail (MonadFail)
58+
import Prelude ()
6059

6160
import Text.Regex.Posix.Wrap(Regex, CompOption(CompOption),
6261
ExecOption(ExecOption), (=~), (=~~),
@@ -67,7 +66,7 @@ import Text.Regex.Posix.String()
6766
import Text.Regex.Posix.Sequence()
6867
import Text.Regex.Posix.ByteString()
6968
import Text.Regex.Posix.ByteString.Lazy()
70-
import Data.Version(Version(..))
69+
import Data.Version(Version)
7170
import Text.Regex.Base
7271
import qualified Paths_regex_posix
7372

src/Text/Regex/Posix/ByteString.hs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
{-# OPTIONS_GHC -fno-warn-orphans #-}
21
-----------------------------------------------------------------------------
32
-- |
43
-- Module : Text.Regex.Posix.ByteString
54
-- Copyright : (c) Chris Kuklewicz 2006
65
-- License : BSD-3-Clause
76
--
8-
-- Maintainer : [email protected], Andreas Abel
7+
-- Maintainer : Andreas Abel
98
-- Stability : stable
109
-- Portability : non-portable (regex-base needs MPTC+FD)
1110
--
@@ -51,7 +50,15 @@ module Text.Regex.Posix.ByteString(
5150
execNotEOL -- not at end of line
5251
) where
5352

54-
import Prelude hiding (fail)
53+
import Prelude
54+
( Int, Integral, Num, (-), fromIntegral, pred
55+
, Either(Left, Right), either
56+
, Show(show)
57+
, IO, (>>=), return
58+
, Maybe(Nothing, Just)
59+
, ($), (.), (==), (&&), otherwise, not
60+
, (++), length, map
61+
)
5562
import Control.Monad.Fail (MonadFail(fail))
5663

5764
import Data.Array(Array,listArray)

src/Text/Regex/Posix/ByteString/Lazy.hs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
{-# OPTIONS_GHC -fno-warn-orphans #-}
21
-----------------------------------------------------------------------------
32
-- |
43
-- Module : Text.Regex.Posix.ByteString.Lazy
54
-- Copyright : (c) Chris Kuklewicz 2007
65
-- License : BSD-3-Clause
76
--
8-
-- Maintainer : [email protected], Andreas Abel
7+
-- Maintainer : Andreas Abel
98
-- Stability : stable
109
-- Portability : non-portable (regex-base needs MPTC+FD)
1110
--
@@ -52,7 +51,16 @@ module Text.Regex.Posix.ByteString.Lazy(
5251
execNotEOL -- not at end of line
5352
) where
5453

55-
import Prelude hiding (fail)
54+
import Prelude
55+
( Int, fromIntegral
56+
, Either(Left, Right), either
57+
, Show(show)
58+
, IO, (>>=), return
59+
, Maybe(Nothing, Just)
60+
, (.), ($), (==)
61+
, (&&), not
62+
, (++), map
63+
)
5664
import Control.Monad.Fail (MonadFail(fail))
5765

5866
import Data.Array(Array)

src/Text/Regex/Posix/Sequence.hs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
{-# OPTIONS_GHC -fno-warn-orphans #-}
21
-----------------------------------------------------------------------------
32
-- |
43
-- Module : Text.Regex.Posix.Sequence
54
-- Copyright : (c) Chris Kuklewicz 2006
65
-- License : BSD-3-Clause
76
--
8-
-- Maintainer : [email protected], Andreas Abel
7+
-- Maintainer : Andreas Abel
98
-- Stability : stable
109
-- Portability : non-portable (regex-base needs MPTC+FD)
1110
--
@@ -48,7 +47,16 @@ module Text.Regex.Posix.Sequence(
4847
execNotEOL -- not at end of line
4948
) where
5049

51-
import Prelude hiding (fail)
50+
import Prelude
51+
( Char
52+
, Int, (-), fromEnum, fromIntegral, pred
53+
, Show(show)
54+
, Either(Left, Right), either
55+
, IO, (>>), (>>=), return
56+
, Maybe(Nothing, Just)
57+
, ($), (.), (==), otherwise
58+
, (++), length, map
59+
)
5260
import Control.Monad.Fail (MonadFail(fail))
5361

5462
import Data.Array(listArray, Array)

0 commit comments

Comments
 (0)