mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 23:36:17 +01:00
haskell-regex-tdfa: update to version 1.2.0
This commit is contained in:
parent
35b0a53ad3
commit
0ee4218f41
2 changed files with 2 additions and 123 deletions
|
@ -2,10 +2,9 @@
|
|||
|
||||
cabal.mkDerivation (self: {
|
||||
pname = "regex-tdfa";
|
||||
version = "1.1.8";
|
||||
sha256 = "1m75xh5bwmmgg5f757dc126kv47yfqqnz9fzj1hc80p6jpzs573x";
|
||||
version = "1.2.0";
|
||||
sha256 = "00gl9sx3hzd83lp38jlcj7wvzrda8kww7njwlm1way73m8aar0pw";
|
||||
buildDepends = [ mtl parsec regexBase ];
|
||||
patches = [ ./fix-build-with-array5.patch ];
|
||||
meta = {
|
||||
homepage = "http://hackage.haskell.org/package/regex-tdfa";
|
||||
description = "Replaces/Enhances Text.Regex";
|
||||
|
|
|
@ -1,120 +0,0 @@
|
|||
diff -uwr regex-tdfa-1.1.8-orig/Text/Regex/TDFA/NewDFA/Engine_FA.hs regex-tdfa-1.1.8-patched/Text/Regex/TDFA/NewDFA/Engine_FA.hs
|
||||
--- regex-tdfa-1.1.8-orig/Text/Regex/TDFA/NewDFA/Engine_FA.hs 2011-03-12 00:46:39.000000000 +0100
|
||||
+++ regex-tdfa-1.1.8-patched/Text/Regex/TDFA/NewDFA/Engine_FA.hs 2013-12-19 12:42:27.048813869 +0100
|
||||
@@ -1,3 +1,4 @@
|
||||
+{-# LANGUAGE CPP #-}
|
||||
-- | This is the code for the main engine. This captures the posix
|
||||
-- subexpressions. There is also a non-capturing engine, and a
|
||||
-- testing engine.
|
||||
@@ -20,7 +21,12 @@
|
||||
|
||||
import Prelude hiding ((!!))
|
||||
import Control.Monad(when,unless,forM,forM_,liftM2,foldM)
|
||||
+#if MIN_VERSION_array(0,4,0)
|
||||
+import Data.Array.MArray(MArray(..))
|
||||
+import Data.Array.Unsafe(unsafeFreeze)
|
||||
+#else
|
||||
import Data.Array.MArray(MArray(..),unsafeFreeze)
|
||||
+#endif
|
||||
import Data.Array.IArray(Array,bounds,assocs,Ix(range))
|
||||
import qualified Data.IntMap.CharMap2 as CMap(findWithDefault)
|
||||
import Data.IntMap(IntMap)
|
||||
@@ -574,7 +580,7 @@
|
||||
case unsafeCoerce# memcpy mdest msource n# s1# of { (# s2#, () #) ->
|
||||
(# s2#, () #) }}
|
||||
{-
|
||||
-#else /* !__GLASGOW_HASKELL__ */
|
||||
+-- #else /* !__GLASGOW_HASKELL__ */
|
||||
|
||||
copySTU :: (MArray (STUArray s) e (S.ST s))=> STUArray s Tag e -> STUArray s Tag e -> S.ST s (STUArray s i e)
|
||||
copySTU source destination = do
|
||||
@@ -585,5 +591,5 @@
|
||||
forM_ (range b) $ \index ->
|
||||
set destination index =<< source !! index
|
||||
return destination
|
||||
-#endif /* !__GLASGOW_HASKELL__ */
|
||||
+-- #endif /* !__GLASGOW_HASKELL__ */
|
||||
-}
|
||||
diff -uwr regex-tdfa-1.1.8-orig/Text/Regex/TDFA/NewDFA/Engine.hs regex-tdfa-1.1.8-patched/Text/Regex/TDFA/NewDFA/Engine.hs
|
||||
--- regex-tdfa-1.1.8-orig/Text/Regex/TDFA/NewDFA/Engine.hs 2011-03-12 00:46:39.000000000 +0100
|
||||
+++ regex-tdfa-1.1.8-patched/Text/Regex/TDFA/NewDFA/Engine.hs 2013-12-19 12:42:27.049813918 +0100
|
||||
@@ -1,3 +1,4 @@
|
||||
+{-# LANGUAGE CPP #-}
|
||||
-- | This is the code for the main engine. This captures the posix subexpressions. This 'execMatch'
|
||||
-- also dispatches to "Engine_NC", "Engine_FA", and "Engine_FC_NA"
|
||||
--
|
||||
@@ -19,7 +20,12 @@
|
||||
-}
|
||||
import Prelude hiding ((!!))
|
||||
|
||||
+#if MIN_VERSION_array(0,4,0)
|
||||
+import Data.Array.MArray(MArray(..))
|
||||
+import Data.Array.Unsafe(unsafeFreeze)
|
||||
+#else
|
||||
import Data.Array.MArray(MArray(..),unsafeFreeze)
|
||||
+#endif
|
||||
import Data.Array.IArray(Array,bounds,assocs,Ix(rangeSize,range))
|
||||
import qualified Data.IntMap.CharMap2 as CMap(findWithDefault)
|
||||
import Data.IntMap(IntMap)
|
||||
@@ -716,7 +722,7 @@
|
||||
case unsafeCoerce# memcpy mdest msource n# s1# of { (# s2#, () #) ->
|
||||
(# s2#, () #) }}
|
||||
{-
|
||||
-#else /* !__GLASGOW_HASKELL__ */
|
||||
+-- #else /* !__GLASGOW_HASKELL__ */
|
||||
|
||||
copySTU :: (MArray (STUArray s) e (S.ST s))=> STUArray s Tag e -> STUArray s Tag e -> S.ST s (STUArray s i e)
|
||||
copySTU source destination = do
|
||||
@@ -727,5 +733,5 @@
|
||||
forM_ (range b) $ \index ->
|
||||
set destination index =<< source !! index
|
||||
return destination
|
||||
-#endif /* !__GLASGOW_HASKELL__ */
|
||||
+-- #endif /* !__GLASGOW_HASKELL__ */
|
||||
-}
|
||||
diff -uwr regex-tdfa-1.1.8-orig/Text/Regex/TDFA/NewDFA/Engine_NC_FA.hs regex-tdfa-1.1.8-patched/Text/Regex/TDFA/NewDFA/Engine_NC_FA.hs
|
||||
--- regex-tdfa-1.1.8-orig/Text/Regex/TDFA/NewDFA/Engine_NC_FA.hs 2011-03-12 00:46:39.000000000 +0100
|
||||
+++ regex-tdfa-1.1.8-patched/Text/Regex/TDFA/NewDFA/Engine_NC_FA.hs 2013-12-19 12:42:27.048813869 +0100
|
||||
@@ -1,10 +1,16 @@
|
||||
+{-# LANGUAGE CPP #-}
|
||||
-- | This is the non-capturing form of Text.Regex.TDFA.NewDFA.String
|
||||
module Text.Regex.TDFA.NewDFA.Engine_NC_FA(execMatch) where
|
||||
|
||||
import Control.Monad(unless)
|
||||
import Prelude hiding ((!!))
|
||||
|
||||
+#if MIN_VERSION_array(0,4,0)
|
||||
+import Data.Array.MArray(MArray(newArray))
|
||||
+import Data.Array.Unsafe(unsafeFreeze)
|
||||
+#else
|
||||
import Data.Array.MArray(MArray(newArray),unsafeFreeze)
|
||||
+#endif
|
||||
import Data.Array.ST(STArray)
|
||||
import qualified Data.IntMap.CharMap2 as CMap(findWithDefault)
|
||||
import qualified Data.IntMap as IMap(null)
|
||||
diff -uwr regex-tdfa-1.1.8-orig/Text/Regex/TDFA/NewDFA/Engine_NC.hs regex-tdfa-1.1.8-patched/Text/Regex/TDFA/NewDFA/Engine_NC.hs
|
||||
--- regex-tdfa-1.1.8-orig/Text/Regex/TDFA/NewDFA/Engine_NC.hs 2011-03-12 00:46:39.000000000 +0100
|
||||
+++ regex-tdfa-1.1.8-patched/Text/Regex/TDFA/NewDFA/Engine_NC.hs 2013-12-19 12:42:27.048813869 +0100
|
||||
@@ -1,3 +1,4 @@
|
||||
+{-# LANGUAGE CPP #-}
|
||||
-- | This is the non-capturing form of Text.Regex.TDFA.NewDFA.String
|
||||
module Text.Regex.TDFA.NewDFA.Engine_NC(execMatch) where
|
||||
|
||||
@@ -5,7 +6,12 @@
|
||||
import Data.Array.Base(unsafeRead,unsafeWrite)
|
||||
import Prelude hiding ((!!))
|
||||
|
||||
+#if MIN_VERSION_array(0,4,0)
|
||||
+import Data.Array.MArray(MArray(..))
|
||||
+import Data.Array.Unsafe(unsafeFreeze)
|
||||
+#else
|
||||
import Data.Array.MArray(MArray(..),unsafeFreeze)
|
||||
+#endif
|
||||
import Data.Array.IArray(Ix)
|
||||
import Data.Array.ST(STArray,STUArray)
|
||||
import qualified Data.IntMap.CharMap2 as CMap(findWithDefault)
|
||||
@@ -248,4 +254,3 @@
|
||||
wsToGroup (WScratch start stop) = do
|
||||
ma <- newArray (0,0) (start,stop-start) :: S.ST s (STArray s Int (MatchOffset,MatchLength))
|
||||
unsafeFreeze ma
|
||||
-
|
Loading…
Reference in a new issue