[Pkg-haskell-commits] [tools] 06/07: Use generic regex code
Joachim Breitner
nomeata at moszumanska.debian.org
Mon Sep 8 07:29:41 UTC 2014
This is an automated email from the git hooks/post-receive script.
nomeata pushed a commit to branch master
in repository tools.
commit 0a17b1c5f67e4d689394241ab55e3632a9b686d0
Author: Joachim Breitner <mail at joachim-breitner.de>
Date: Thu Aug 28 12:30:23 2014 -0700
Use generic regex code
---
binNMUs.hs | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/binNMUs.hs b/binNMUs.hs
index d9a079c..3e27b37 100644
--- a/binNMUs.hs
+++ b/binNMUs.hs
@@ -14,8 +14,7 @@ import Debian.Control.ByteString
import Debian.Relation.Common
import Debian.Relation.ByteString
import Control.Monad
-import Text.Regex
-import Text.Regex.Base
+import Text.Regex.PCRE
import System.IO
import Control.Arrow
import qualified Data.ByteString.Char8 as B
@@ -227,8 +226,8 @@ needsRebuild available b
-- Parsing virtual package names
parseVirtPackage :: Conf -> String -> Maybe VirtPackage
-parseVirtPackage conf p = case matchRegex (regex conf) p of
- Just [a,b] -> Just (VirtPackage p a b)
+parseVirtPackage conf p = case match (regex conf) p of
+ [[_,a,b]] -> Just (VirtPackage p a b)
_ -> Nothing
-- Reading wannabuild dumps
@@ -451,7 +450,7 @@ data Conf = Conf
mkConf :: [Arch] -> String -> Bool -> Bool -> Bool -> Conf
mkConf a r b1 b2 b3 =
- Conf a (mkRegex ("^"++r++"$")) (mkRegex r) r b1 b2 b3
+ Conf a (makeRegex ("^"++r++"$")) (makeRegex r) r b1 b2 b3
parseArches :: String -> ReadM [Arch]
parseArches s =
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-haskell/tools.git
More information about the Pkg-haskell-commits
mailing list