From 64befd0cb3290310c1ea2659d9c7af59454f9987 Mon Sep 17 00:00:00 2001 From: obadz Date: Wed, 5 Aug 2015 20:54:43 +0100 Subject: [PATCH] haskell/regex-tdfa-text: add patch to fix build http://hub.darcs.net/shelarcy/regex-tdfa-text/issue/1 --- .../configuration-ghc-7.10.x.nix | 3 +++ .../patches/regex-tdfa-text.patch | 21 +++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 pkgs/development/haskell-modules/patches/regex-tdfa-text.patch diff --git a/pkgs/development/haskell-modules/configuration-ghc-7.10.x.nix b/pkgs/development/haskell-modules/configuration-ghc-7.10.x.nix index cd06bf0f2645..5ae71325a9f4 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-7.10.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-7.10.x.nix @@ -219,6 +219,9 @@ self: super: { seqid-streams_0_1_0 = markBroken super.seqid-streams_0_1_0; vector_0_10_9_3 = markBroken super.vector_0_10_9_3; + # http://hub.darcs.net/shelarcy/regex-tdfa-text/issue/1 -- upstream seems to be asleep + regex-tdfa-text = appendPatch super.regex-tdfa-text ./patches/regex-tdfa-text.patch; + # https://github.com/HugoDaniel/RFC3339/issues/14 timerep = dontCheck super.timerep; diff --git a/pkgs/development/haskell-modules/patches/regex-tdfa-text.patch b/pkgs/development/haskell-modules/patches/regex-tdfa-text.patch new file mode 100644 index 000000000000..ef349b1cb641 --- /dev/null +++ b/pkgs/development/haskell-modules/patches/regex-tdfa-text.patch @@ -0,0 +1,21 @@ +--- regex-tdfa-text-1.0.0.2/Text/Regex/TDFA/Text/Lazy.orig.hs 2015-08-05 20:30:01.228983428 +0100 ++++ regex-tdfa-text-1.0.0.2/Text/Regex/TDFA/Text/Lazy.hs 2015-08-05 20:39:25.682563005 +0100 +@@ -26,7 +26,7 @@ + import Data.Array.IArray((!),elems,amap) + import qualified Data.Text.Lazy as L(Text,empty,take,drop,uncons,unpack) + +-import Text.Regex.Base(MatchArray,RegexContext(..),Extract(..),RegexMaker(..),RegexLike(..)) ++import Text.Regex.Base(MatchText,MatchArray,RegexContext(..),Extract(..),RegexMaker(..),RegexLike(..)) + import Text.Regex.Base.Impl(polymatch,polymatchM) + import Text.Regex.TDFA.ReadRegex(parseRegex) + import Text.Regex.TDFA.String() -- piggyback on RegexMaker for String +@@ -74,7 +74,8 @@ + ,after (o+l) source)) + (matchOnce regex source) + matchAllText regex source = +- let go i _ _ | i `seq` False = undefined ++ let go :: Int -> L.Text -> [MatchArray] -> [MatchText L.Text] ++ go i _ _ | i `seq` False = undefined + go _i _t [] = [] + go i t (x:xs) = + let (off0,len0) = x!0