From 750b013afaaae040a17a1f275742cd550edb7911 Mon Sep 17 00:00:00 2001 From: Andreas Abel Date: Fri, 16 Jul 2021 09:57:02 +0200 Subject: [PATCH 01/12] Haddock: switch package to stable At least at the moment, this is a maintenance-only package with no new features planned. Backwards-compatibility is top priority. --- src/Text/Regex/Posix.hs | 4 ++-- src/Text/Regex/Posix/ByteString.hs | 6 +++--- src/Text/Regex/Posix/ByteString/Lazy.hs | 6 +++--- src/Text/Regex/Posix/Sequence.hs | 6 +++--- src/Text/Regex/Posix/String.hs | 6 +++--- src/Text/Regex/Posix/Wrap.hsc | 4 ++-- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/Text/Regex/Posix.hs b/src/Text/Regex/Posix.hs index e53283f..fbe90d4 100644 --- a/src/Text/Regex/Posix.hs +++ b/src/Text/Regex/Posix.hs @@ -5,8 +5,8 @@ -- Copyright : (c) Chris Kuklewicz 2006 -- SPDX-License-Identifier: BSD-3-Clause -- --- Maintainer : hvr@gnu.org --- Stability : experimental +-- Maintainer : hvr@gnu.org, Andreas Abel +-- Stability : stable -- Portability : non-portable (regex-base needs MPTC+FD) -- -- Module that provides the Regex backend that wraps the diff --git a/src/Text/Regex/Posix/ByteString.hs b/src/Text/Regex/Posix/ByteString.hs index 65b93e4..2bb89a1 100644 --- a/src/Text/Regex/Posix/ByteString.hs +++ b/src/Text/Regex/Posix/ByteString.hs @@ -4,9 +4,9 @@ -- Module : Text.Regex.Posix.ByteString -- Copyright : (c) Chris Kuklewicz 2006 -- SPDX-License-Identifier: BSD-3-Clause --- --- Maintainer : hvr@gnu.org --- Stability : experimental +-- +-- Maintainer : hvr@gnu.org, Andreas Abel +-- Stability : stable -- Portability : non-portable (regex-base needs MPTC+FD) -- -- This provides 'ByteString' instances for RegexMaker and RegexLike diff --git a/src/Text/Regex/Posix/ByteString/Lazy.hs b/src/Text/Regex/Posix/ByteString/Lazy.hs index e1cc22a..13756d9 100644 --- a/src/Text/Regex/Posix/ByteString/Lazy.hs +++ b/src/Text/Regex/Posix/ByteString/Lazy.hs @@ -4,9 +4,9 @@ -- Module : Text.Regex.Posix.ByteString.Lazy -- Copyright : (c) Chris Kuklewicz 2007 -- SPDX-License-Identifier: BSD-3-Clause --- --- Maintainer : hvr@gnu.org --- Stability : experimental +-- +-- Maintainer : hvr@gnu.org, Andreas Abel +-- Stability : stable -- Portability : non-portable (regex-base needs MPTC+FD) -- -- This provides 'ByteString.Lazy' instances for RegexMaker and RegexLike diff --git a/src/Text/Regex/Posix/Sequence.hs b/src/Text/Regex/Posix/Sequence.hs index f64fcea..c8f2c68 100644 --- a/src/Text/Regex/Posix/Sequence.hs +++ b/src/Text/Regex/Posix/Sequence.hs @@ -4,9 +4,9 @@ -- Module : Text.Regex.Posix.Sequence -- Copyright : (c) Chris Kuklewicz 2006 -- SPDX-License-Identifier: BSD-3-Clause --- --- Maintainer : hvr@gnu.org --- Stability : experimental +-- +-- Maintainer : hvr@gnu.org, Andreas Abel +-- Stability : stable -- Portability : non-portable (regex-base needs MPTC+FD) -- -- This provides 'String' instances for 'RegexMaker' and 'RegexLike' based diff --git a/src/Text/Regex/Posix/String.hs b/src/Text/Regex/Posix/String.hs index 8420da3..1150d9f 100644 --- a/src/Text/Regex/Posix/String.hs +++ b/src/Text/Regex/Posix/String.hs @@ -4,9 +4,9 @@ -- Module : Text.Regex.Posix.String -- Copyright : (c) Chris Kuklewicz 2006 -- SPDX-License-Identifier: BSD-3-Clause --- --- Maintainer : hvr@gnu.org --- Stability : experimental +-- +-- Maintainer : hvr@gnu.org, Andreas Abel +-- Stability : stable -- Portability : non-portable (regex-base needs MPTC+FD) -- -- This provides 'String' instances for 'RegexMaker' and 'RegexLike' based diff --git a/src/Text/Regex/Posix/Wrap.hsc b/src/Text/Regex/Posix/Wrap.hsc index e98f64a..fd4bc6d 100644 --- a/src/Text/Regex/Posix/Wrap.hsc +++ b/src/Text/Regex/Posix/Wrap.hsc @@ -6,8 +6,8 @@ -- Copyright : (c) Chris Kuklewicz 2006,2007,2008 derived from (c) The University of Glasgow 2002 -- SPDX-License-Identifier: BSD-3-Clause -- --- Maintainer : hvr@gnu.org --- Stability : experimental +-- Maintainer : hvr@gnu.org, Andreas Abel +-- Stability : stable -- Portability : non-portable (regex-base needs MPTC+FD) -- -- WrapPosix.hsc exports a wrapped version of the ffi imports. To From a50bf9915a4ffacb98ded3c861c28f004be8d6e5 Mon Sep 17 00:00:00 2001 From: Andreas Abel Date: Fri, 16 Jul 2021 09:59:44 +0200 Subject: [PATCH 02/12] Whitespace Some trailing whitespace or tabs removed. --- src/Text/Regex/Posix/ByteString.hs | 6 +++--- src/Text/Regex/Posix/ByteString/Lazy.hs | 2 +- src/Text/Regex/Posix/Sequence.hs | 10 +++++----- src/Text/Regex/Posix/String.hs | 12 ++++++------ 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/Text/Regex/Posix/ByteString.hs b/src/Text/Regex/Posix/ByteString.hs index 2bb89a1..b75fb89 100644 --- a/src/Text/Regex/Posix/ByteString.hs +++ b/src/Text/Regex/Posix/ByteString.hs @@ -81,7 +81,7 @@ instance RegexMaker Regex CompOption ExecOption ByteString where instance RegexLike Regex ByteString where matchTest regex bs = unsafePerformIO $ asCString bs (wrapTest regex) >>= unwrap - matchOnce regex bs = unsafePerformIO $ + matchOnce regex bs = unsafePerformIO $ execute regex bs >>= unwrap matchAll regex bs = unsafePerformIO $ asCString bs (wrapMatchAll regex) >>= unwrap @@ -115,7 +115,7 @@ execute regex bs = do case maybeStartEnd of Right Nothing -> return (Right Nothing) -- Right (Just []) -> ... - Right (Just parts) -> + Right (Just parts) -> return . Right . Just . listArray (0,pred (length parts)) . map (\(s,e)->(fromIntegral s, fromIntegral (e-s))) $ parts Left err -> return (Left err) @@ -127,7 +127,7 @@ regexec regex bs = do let getSub (start,stop) | start == unusedRegOffset = B.empty | otherwise = B.take (fi (stop-start)) . B.drop (fi start) $ bs matchedParts [] = (B.empty,B.empty,bs,[]) -- no information - matchedParts (matchedStartStop@(start,stop):subStartStop) = + matchedParts (matchedStartStop@(start,stop):subStartStop) = (B.take (fi start) bs ,getSub matchedStartStop ,B.drop (fi stop) bs diff --git a/src/Text/Regex/Posix/ByteString/Lazy.hs b/src/Text/Regex/Posix/ByteString/Lazy.hs index 13756d9..fe9f88b 100644 --- a/src/Text/Regex/Posix/ByteString/Lazy.hs +++ b/src/Text/Regex/Posix/ByteString/Lazy.hs @@ -93,7 +93,7 @@ instance RegexMaker Regex CompOption ExecOption L.ByteString where instance RegexLike Regex L.ByteString where matchTest regex bs = unsafePerformIO $ asCString bs (wrapTest regex) >>= unwrap - matchOnce regex bs = unsafePerformIO $ + matchOnce regex bs = unsafePerformIO $ execute regex bs >>= unwrap matchAll regex bs = unsafePerformIO $ asCString bs (wrapMatchAll regex) >>= unwrap diff --git a/src/Text/Regex/Posix/Sequence.hs b/src/Text/Regex/Posix/Sequence.hs index c8f2c68..d7a6eb2 100644 --- a/src/Text/Regex/Posix/Sequence.hs +++ b/src/Text/Regex/Posix/Sequence.hs @@ -77,15 +77,15 @@ unwrap x = case x of Left err -> fail ("Text.Regex.Posix.Sequence died: "++ show instance RegexMaker Regex CompOption ExecOption (Seq Char) where makeRegexOpts c e pattern = unsafePerformIO $ (compile c e pattern >>= unwrap) - makeRegexOptsM c e pattern = either (fail.show) return $ unsafePerformIO $ + makeRegexOptsM c e pattern = either (fail.show) return $ unsafePerformIO $ (compile c e pattern) instance RegexLike Regex (Seq Char) where matchTest regex str = unsafePerformIO $ do withSeq str (wrapTest regex) >>= unwrap - matchOnce regex str = unsafePerformIO $ + matchOnce regex str = unsafePerformIO $ execute regex str >>= unwrap - matchAll regex str = unsafePerformIO $ + matchAll regex str = unsafePerformIO $ withSeq str (wrapMatchAll regex) >>= unwrap matchCount regex str = unsafePerformIO $ withSeq str (wrapCount regex) >>= unwrap @@ -116,7 +116,7 @@ execute regex str = do Right Nothing -> return (Right Nothing) -- Right (Just []) -> fail "got [] back!" -- return wierd array instead Right (Just parts) -> - return . Right . Just . listArray (0,pred (length parts)) + return . Right . Just . listArray (0,pred (length parts)) . map (\(s,e)->(fromIntegral s, fromIntegral (e-s))) $ parts Left err -> return (Left err) @@ -144,7 +144,7 @@ regexec regex str = do extract (fromEnum start,fromEnum $ stop-start) $ str matchedParts :: [(RegOffset,RegOffset)] -> ((Seq Char), (Seq Char), (Seq Char), [(Seq Char)]) matchedParts [] = (str,S.empty,S.empty,[]) -- no information - matchedParts (matchedStartStop@(start,stop):subStartStop) = + matchedParts (matchedStartStop@(start,stop):subStartStop) = (before (fromEnum start) str ,getSub matchedStartStop ,after (fromEnum stop) str diff --git a/src/Text/Regex/Posix/String.hs b/src/Text/Regex/Posix/String.hs index 1150d9f..e364e63 100644 --- a/src/Text/Regex/Posix/String.hs +++ b/src/Text/Regex/Posix/String.hs @@ -73,15 +73,15 @@ unwrap x = case x of Left err -> fail ("Text.Regex.Posix.String died: "++ show e instance RegexMaker Regex CompOption ExecOption String where makeRegexOpts c e pattern = unsafePerformIO $ (compile c e pattern >>= unwrap) - makeRegexOptsM c e pattern = either (fail.show) return $ unsafePerformIO $ + makeRegexOptsM c e pattern = either (fail.show) return $ unsafePerformIO $ (compile c e pattern) instance RegexLike Regex String where matchTest regex str = unsafePerformIO $ do withCAString str (wrapTest regex) >>= unwrap - matchOnce regex str = unsafePerformIO $ + matchOnce regex str = unsafePerformIO $ execute regex str >>= unwrap - matchAll regex str = unsafePerformIO $ + matchAll regex str = unsafePerformIO $ withCAString str (wrapMatchAll regex) >>= unwrap matchCount regex str = unsafePerformIO $ withCAString str (wrapCount regex) >>= unwrap @@ -112,7 +112,7 @@ execute regex str = do Right Nothing -> return (Right Nothing) -- Right (Just []) -> fail "got [] back!" -- return wierd array instead Right (Just parts) -> - return . Right . Just . listArray (0,pred (length parts)) + return . Right . Just . listArray (0,pred (length parts)) . map (\(s,e)->(fromIntegral s, fromIntegral (e-s))) $ parts Left err -> return (Left err) @@ -135,10 +135,10 @@ regexec :: Regex -- ^ Compiled regular expression -- @ regexec regex str = do let getSub (start,stop) | start == unusedRegOffset = "" - | otherwise = + | otherwise = genericTake (stop-start) . genericDrop start $ str matchedParts [] = (str,"","",[]) -- no information - matchedParts (matchedStartStop@(start,stop):subStartStop) = + matchedParts (matchedStartStop@(start,stop):subStartStop) = (genericTake start str ,getSub matchedStartStop ,genericDrop stop str From 9615c4966d996d45fe3d4bb072cd993251f144be Mon Sep 17 00:00:00 2001 From: Andreas Abel Date: Fri, 16 Jul 2021 10:00:28 +0200 Subject: [PATCH 03/12] Cosmetics: superfluous parens (Seq Char) removed --- src/Text/Regex/Posix/Sequence.hs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Text/Regex/Posix/Sequence.hs b/src/Text/Regex/Posix/Sequence.hs index d7a6eb2..849e374 100644 --- a/src/Text/Regex/Posix/Sequence.hs +++ b/src/Text/Regex/Posix/Sequence.hs @@ -93,7 +93,7 @@ instance RegexLike Regex (Seq Char) where -- compile compile :: CompOption -- ^ Flags (summed together) -> ExecOption -- ^ Flags (summed together) - -> (Seq Char) -- ^ The regular expression to compile (ASCII only, no null bytes) + -> Seq Char -- ^ The regular expression to compile (ASCII only, no null bytes) -> IO (Either WrapError Regex) -- ^ Returns: the compiled regular expression compile flags e pattern = withSeq pattern (wrapCompile flags e) @@ -102,7 +102,7 @@ compile flags e pattern = withSeq pattern (wrapCompile flags e) -- | Matches a regular expression against a string execute :: Regex -- ^ Compiled regular expression - -> (Seq Char) -- ^ (Seq Char) to match against + -> Seq Char -- ^ Text to match against -> IO (Either WrapError (Maybe (Array Int (MatchOffset,MatchLength)))) -- ^ Returns: 'Nothing' if the regex did not match the -- string, or: @@ -126,8 +126,8 @@ execute regex str = do -- | Matches a regular expression against a string regexec :: Regex -- ^ Compiled regular expression - -> (Seq Char) -- ^ (Seq Char) to match against - -> IO (Either WrapError (Maybe ((Seq Char), (Seq Char), (Seq Char), [(Seq Char)]))) + -> Seq Char -- ^ Text to match against + -> IO (Either WrapError (Maybe (Seq Char, Seq Char, Seq Char, [Seq Char]))) -- ^ Returns: 'Nothing' if the regex did not match the -- string, or: -- @@ -138,11 +138,11 @@ regexec :: Regex -- ^ Compiled regular expression -- subexpression matches) -- @ regexec regex str = do - let getSub :: (RegOffset,RegOffset) -> (Seq Char) + let getSub :: (RegOffset,RegOffset) -> Seq Char getSub (start,stop) | start == unusedRegOffset = S.empty - | otherwise = + | otherwise = extract (fromEnum start,fromEnum $ stop-start) $ str - matchedParts :: [(RegOffset,RegOffset)] -> ((Seq Char), (Seq Char), (Seq Char), [(Seq Char)]) + matchedParts :: [(RegOffset,RegOffset)] -> (Seq Char, Seq Char, Seq Char, [Seq Char]) matchedParts [] = (str,S.empty,S.empty,[]) -- no information matchedParts (matchedStartStop@(start,stop):subStartStop) = (before (fromEnum start) str From 48f6123a00681cf9e061b18d1fee5e3c8b4924f2 Mon Sep 17 00:00:00 2001 From: Andreas Abel Date: Fri, 16 Jul 2021 10:00:58 +0200 Subject: [PATCH 04/12] Haddock: small formatting fixes --- src/Text/Regex/Posix/Wrap.hsc | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/Text/Regex/Posix/Wrap.hsc b/src/Text/Regex/Posix/Wrap.hsc index fd4bc6d..5bcac3b 100644 --- a/src/Text/Regex/Posix/Wrap.hsc +++ b/src/Text/Regex/Posix/Wrap.hsc @@ -23,11 +23,11 @@ -- This module will fail or error only if allocation fails or a nullPtr -- is passed in. -- --- 2009-January : wrapMatchAll and wrapCount now adjust the execution --- option execNotBOL after the first result to take into account '\n' +-- 2009-January : 'wrapMatchAll' and 'wrapCount' now adjust the execution +-- option 'execNotBOL' after the first result to take into account '\n' -- in the text immediately before the next matches. (version 0.93.3) -- --- 2009-January : wrapMatchAll and wrapCount have been changed to +-- 2009-January : 'wrapMatchAll' and 'wrapCount' have been changed to -- return all non-overlapping matches, including empty matches even if -- they coincide with the end of the previous non-empty match. The -- change is that the first non-empty match no longer terminates the @@ -125,17 +125,17 @@ try = Control.Exception.try data CRegex -- pointer tag for regex_t C type --- | RegOffset is "typedef int regoff_t" on Linux and ultimately "typedef --- long long __int64_t" on Max OS X. So rather than saying +-- | 'RegOffset' is @typedef int regoff_t@ on Linux and ultimately @typedef +-- long long __int64_t@ on Max OS X. So rather than saying -- 2,147,483,647 is all the length you need, I'll take the larger: -- 9,223,372,036,854,775,807 should be enough bytes for anyone, no -- need for Integer. The alternative is to compile to different sizes --- in a platform dependent manner with "type RegOffset = (#type --- regoff_t)", which I do not want to do. +-- in a platform dependent manner with @type RegOffset = (#type +-- regoff_t)@, which I do not want to do. -- --- There is also a special value 'unusedRegOffset' :: 'RegOffset' which is +-- There is also a special value @'unusedRegOffset' :: 'RegOffset'@ which is -- (-1) and as a starting index means that the subgroup capture was --- unused. Otherwise the RegOffset indicates a character boundary that +-- unused. Otherwise the 'RegOffset' indicates a character boundary that -- is before the character at that index offset, with the first -- character at index offset 0. So starting at 1 and ending at 2 means -- to take only the second character. @@ -170,7 +170,7 @@ newtype CompOption = CompOption CInt deriving (Eq,Show,Num,Bits) -- regular expressions. Option values (and their man 3 regexec names) are -- -- * 'execBlank' which is a complete zero value for all the flags. This is --- the blankExecOpt value. +-- the @blankExecOpt@ value. -- -- * 'execNotBOL' (REG_NOTBOL) can be set to prevent ^ from matching at the -- start of the input. @@ -226,7 +226,7 @@ execBlank = ExecOption 0 unusedRegOffset :: RegOffset unusedRegOffset = (-1) --- | The return code will be retOk when it is the Haskell wrapper and +-- | The return code will be @retOk@ when it is the Haskell wrapper and -- not the underlying library generating the error message. type WrapError = (ReturnCode,String) @@ -238,13 +238,13 @@ wrapCompile :: CompOption -- ^ Flags (bitmapped) wrapTest :: Regex -> CString -> IO (Either WrapError Bool) --- | wrapMatch returns offsets for the begin and end of each capture. --- Unused captures have offsets of unusedRegOffset which is (-1) +-- | 'wrapMatch' returns offsets for the begin and end of each capture. +-- Unused captures have offsets of 'unusedRegOffset' which is (-1). wrapMatch :: Regex -> CString -> IO (Either WrapError (Maybe [(RegOffset,RegOffset)])) --- | wrapMatchAll returns the offset and length of each capture. --- Unused captures have an offset of unusedRegOffset which is (-1) and +-- | 'wrapMatchAll' returns the offset and length of each capture. +-- Unused captures have an offset of 'unusedRegOffset' which is (-1) and -- length of 0. wrapMatchAll :: Regex -> CString -> IO (Either WrapError [MatchArray]) From 0a235e85189b89dd192e44d2d54f37911d165024 Mon Sep 17 00:00:00 2001 From: Andreas Abel Date: Fri, 16 Jul 2021 10:15:55 +0200 Subject: [PATCH 05/12] cabal: document that TypeSynonymInstances is still needed for ghc 7.0 --- regex-posix.cabal | 1 + 1 file changed, 1 insertion(+) diff --git a/regex-posix.cabal b/regex-posix.cabal index 3b620e8..c84acc7 100644 --- a/regex-posix.cabal +++ b/regex-posix.cabal @@ -85,6 +85,7 @@ library GeneralizedNewtypeDeriving FlexibleContexts TypeSynonymInstances + -- ^ for ghc 7.0, subsumed under FlexibleInstances later FlexibleInstances build-depends: regex-base == 0.94.* From ebd58201c28ab4fc86398ecc9734550a339f3f34 Mon Sep 17 00:00:00 2001 From: Andreas Abel Date: Fri, 16 Jul 2021 10:03:03 +0200 Subject: [PATCH 06/12] Allow base-4.16 (anticipating GHC 9.2) --- regex-posix.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/regex-posix.cabal b/regex-posix.cabal index c84acc7..c4f52b2 100644 --- a/regex-posix.cabal +++ b/regex-posix.cabal @@ -89,7 +89,7 @@ library FlexibleInstances build-depends: regex-base == 0.94.* - , base >= 4.3 && < 4.16 + , base >= 4.3 && < 4.17 , containers >= 0.4 && < 0.7 , bytestring >= 0.9 && < 0.12 , array >= 0.3 && < 0.6 From 5b73a96a885bce785eab2f0f30fd4b948c895f8d Mon Sep 17 00:00:00 2001 From: Andreas Abel Date: Fri, 16 Jul 2021 10:03:42 +0200 Subject: [PATCH 07/12] cabal: express condition positively --- regex-posix.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/regex-posix.cabal b/regex-posix.cabal index c4f52b2..1e913b0 100644 --- a/regex-posix.cabal +++ b/regex-posix.cabal @@ -94,7 +94,7 @@ library , bytestring >= 0.9 && < 0.12 , array >= 0.3 && < 0.6 - if !impl(ghc >= 8) + if impl(ghc < 8) build-depends: fail == 4.9.* ghc-options: -O2 From 2b42f36465c41c0a956b70cb91f6449f5caf46dc Mon Sep 17 00:00:00 2001 From: Andreas Abel Date: Fri, 16 Jul 2021 10:03:58 +0200 Subject: [PATCH 08/12] cabal: remove -O2 (discouraged), add -Wcompat for GHC >= 8 --- regex-posix.cabal | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/regex-posix.cabal b/regex-posix.cabal index 1e913b0..07b5604 100644 --- a/regex-posix.cabal +++ b/regex-posix.cabal @@ -97,5 +97,12 @@ library if impl(ghc < 8) build-depends: fail == 4.9.* - ghc-options: -O2 - -Wall -fno-warn-unused-imports + -- Warnings + + ghc-options: + -Wall + -fno-warn-unused-imports + + if impl(ghc >= 8) + ghc-options: + -Wcompat From faccb2b2a9ce662795dacba8c55cf5dc1430bc5f Mon Sep 17 00:00:00 2001 From: Andreas Abel Date: Fri, 16 Jul 2021 10:05:35 +0200 Subject: [PATCH 09/12] Fix #4, fix #7: require regex-posix-clib under windows directly The current solution, to lead the absence of flag _regex-posix-clib under os(windows) to absurdity (base<0) is not handled correctly by stack. --- regex-posix.cabal | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/regex-posix.cabal b/regex-posix.cabal index 07b5604..43323c3 100644 --- a/regex-posix.cabal +++ b/regex-posix.cabal @@ -51,7 +51,7 @@ source-repository this flag _regex-posix-clib manual: False default: False - description: Use package + description: Use package (used by default on Windows) library hs-source-dirs: src @@ -69,13 +69,10 @@ library c-sources: cbits/myfree.c include-dirs: cbits - if flag(_regex-posix-clib) + if flag(_regex-posix-clib) || os(windows) build-depends: regex-posix-clib == 2.7.* - else - -- use POSIX.2 regex implementation from @libc@ - -- However, Windows/msys2 doesn't provide a POSIX.2 regex impl in its @libc@ - if os(windows) - build-depends: base<0 + -- Otherwise, use POSIX.2 regex implementation from @libc@. + -- However, Windows/msys2 doesn't provide a POSIX.2 regex impl in its @libc@. default-language: Haskell2010 default-extensions: From 3f0095004a5366bd9d97df3fbc88282754265a53 Mon Sep 17 00:00:00 2001 From: Andreas Abel Date: Fri, 16 Jul 2021 10:07:38 +0200 Subject: [PATCH 10/12] Bump to 0.96.0.1 and ChangeLog --- ChangeLog.md | 18 ++++++++++++------ regex-posix.cabal | 7 +++---- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index 2f95668..72dad9c 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,17 +1,23 @@ -See also http://pvp.haskell.org/faq +For versioning policy, see: http://pvp.haskell.org/faq -## 0.96.0.0 Revision 2 +## 0.96.0.1 + +- Compatibility with `base-4.15` (GHC 9.2) +- Fix stack installation problems on Windows around flag `_regex-posix-clib` + (issues + [#4](https://github.com/haskell-hvr/regex-posix/issues/4) and + [#7](https://github.com/haskell-hvr/regex-posix/issues/7)). + +## 0.96.0.0 Revision 2 (2021-02-20) - Compatibility with `base-4.15` (GHC 9.0) -## 0.96.0.0 Revision 1 +## 0.96.0.0 Revision 1 (2020-03-25) - Compatibility with `base-4.14` (GHC 8.10) -## 0.96.0.0 +## 0.96.0.0 (2019-09-30) - Update to `regex-base-0.94.0.0` API - Compatibility with `base-4.13.0` - Remove internal regex C implementation - ----- diff --git a/regex-posix.cabal b/regex-posix.cabal index 43323c3..5fbbdf6 100644 --- a/regex-posix.cabal +++ b/regex-posix.cabal @@ -1,14 +1,13 @@ cabal-version: 1.12 name: regex-posix -version: 0.96.0.0 -x-revision: 2 +version: 0.96.0.1 build-type: Simple license: BSD3 license-file: LICENSE copyright: Copyright (c) 2007-2010, Christopher Kuklewicz author: Christopher Kuklewicz -maintainer: hvr@gnu.org +maintainer: hvr@gnu.org, Andreas Abel bug-reports: https://github.com/hvr/regex-posix synopsis: POSIX Backend for "Text.Regex" (regex-base) category: Text @@ -46,7 +45,7 @@ source-repository head source-repository this type: git location: https://github.com/hvr/regex-base.git - tag: v0.96.0.0-r2 + tag: v0.96.0.1 flag _regex-posix-clib manual: False From ac204860223c376fd97fbff002a50e36434b9688 Mon Sep 17 00:00:00 2001 From: Andreas Abel Date: Mon, 19 Jul 2021 13:51:33 +0200 Subject: [PATCH 11/12] Changelog: release date for 0.96.0.1 --- ChangeLog.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index 72dad9c..cc92e13 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,8 +1,8 @@ For versioning policy, see: http://pvp.haskell.org/faq -## 0.96.0.1 +## 0.96.0.1 (2021-07-19) -- Compatibility with `base-4.15` (GHC 9.2) +- Compatibility with `base-4.16` (GHC 9.2) - Fix stack installation problems on Windows around flag `_regex-posix-clib` (issues [#4](https://github.com/haskell-hvr/regex-posix/issues/4) and From 50a21b99386fcccc398fbed1d861aedcb33454bc Mon Sep 17 00:00:00 2001 From: Andreas Abel Date: Mon, 19 Jul 2021 13:59:59 +0200 Subject: [PATCH 12/12] Fix haddock header (License field) --- src/Text/Regex/Posix.hs | 2 +- src/Text/Regex/Posix/ByteString.hs | 2 +- src/Text/Regex/Posix/ByteString/Lazy.hs | 2 +- src/Text/Regex/Posix/Sequence.hs | 2 +- src/Text/Regex/Posix/String.hs | 2 +- src/Text/Regex/Posix/Wrap.hsc | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Text/Regex/Posix.hs b/src/Text/Regex/Posix.hs index fbe90d4..b99d158 100644 --- a/src/Text/Regex/Posix.hs +++ b/src/Text/Regex/Posix.hs @@ -3,7 +3,7 @@ -- -- Module : Text.Regex.Posix -- Copyright : (c) Chris Kuklewicz 2006 --- SPDX-License-Identifier: BSD-3-Clause +-- License : BSD-3-Clause -- -- Maintainer : hvr@gnu.org, Andreas Abel -- Stability : stable diff --git a/src/Text/Regex/Posix/ByteString.hs b/src/Text/Regex/Posix/ByteString.hs index b75fb89..7184f5c 100644 --- a/src/Text/Regex/Posix/ByteString.hs +++ b/src/Text/Regex/Posix/ByteString.hs @@ -3,7 +3,7 @@ -- | -- Module : Text.Regex.Posix.ByteString -- Copyright : (c) Chris Kuklewicz 2006 --- SPDX-License-Identifier: BSD-3-Clause +-- License : BSD-3-Clause -- -- Maintainer : hvr@gnu.org, Andreas Abel -- Stability : stable diff --git a/src/Text/Regex/Posix/ByteString/Lazy.hs b/src/Text/Regex/Posix/ByteString/Lazy.hs index fe9f88b..45cbb24 100644 --- a/src/Text/Regex/Posix/ByteString/Lazy.hs +++ b/src/Text/Regex/Posix/ByteString/Lazy.hs @@ -3,7 +3,7 @@ -- | -- Module : Text.Regex.Posix.ByteString.Lazy -- Copyright : (c) Chris Kuklewicz 2007 --- SPDX-License-Identifier: BSD-3-Clause +-- License : BSD-3-Clause -- -- Maintainer : hvr@gnu.org, Andreas Abel -- Stability : stable diff --git a/src/Text/Regex/Posix/Sequence.hs b/src/Text/Regex/Posix/Sequence.hs index 849e374..c34e93b 100644 --- a/src/Text/Regex/Posix/Sequence.hs +++ b/src/Text/Regex/Posix/Sequence.hs @@ -3,7 +3,7 @@ -- | -- Module : Text.Regex.Posix.Sequence -- Copyright : (c) Chris Kuklewicz 2006 --- SPDX-License-Identifier: BSD-3-Clause +-- License : BSD-3-Clause -- -- Maintainer : hvr@gnu.org, Andreas Abel -- Stability : stable diff --git a/src/Text/Regex/Posix/String.hs b/src/Text/Regex/Posix/String.hs index e364e63..8f4dfaf 100644 --- a/src/Text/Regex/Posix/String.hs +++ b/src/Text/Regex/Posix/String.hs @@ -3,7 +3,7 @@ -- | -- Module : Text.Regex.Posix.String -- Copyright : (c) Chris Kuklewicz 2006 --- SPDX-License-Identifier: BSD-3-Clause +-- License : BSD-3-Clause -- -- Maintainer : hvr@gnu.org, Andreas Abel -- Stability : stable diff --git a/src/Text/Regex/Posix/Wrap.hsc b/src/Text/Regex/Posix/Wrap.hsc index 5bcac3b..06a5ee4 100644 --- a/src/Text/Regex/Posix/Wrap.hsc +++ b/src/Text/Regex/Posix/Wrap.hsc @@ -4,7 +4,7 @@ -- | -- Module : Text.Regex.Posix.Wrap -- Copyright : (c) Chris Kuklewicz 2006,2007,2008 derived from (c) The University of Glasgow 2002 --- SPDX-License-Identifier: BSD-3-Clause +-- Identifier : BSD-3-Clause -- -- Maintainer : hvr@gnu.org, Andreas Abel -- Stability : stable