packages feed

monoid-subclasses 1.1.2 → 1.1.3

raw patch · 4 files changed

+20/−7 lines, 4 filesdep ~textdep ~vector

Dependency ranges changed: text, vector

Files

CHANGELOG.md view
@@ -1,3 +1,7 @@+Version 1.1.3+---------------+* Support for text-2.0 by Bodigrim+ Version 1.1.2 --------------- * CI tests
monoid-subclasses.cabal view
@@ -1,5 +1,5 @@ Name:                monoid-subclasses-Version:             1.1.2+Version:             1.1.3 Cabal-Version:       >= 1.10 Build-Type:          Simple Synopsis:            Subclasses of Monoid@@ -30,7 +30,7 @@                      Data.Monoid.Instances.Concat, Data.Monoid.Instances.Measured, Data.Monoid.Instances.Positioned,                      Data.Monoid.Instances.Stateful   Build-Depends:     base >= 4.9 && < 5,-                     bytestring >= 0.9 && < 1.0, containers >= 0.5.7.0 && < 0.7, text >= 0.11 && < 1.3,+                     bytestring >= 0.9 && < 1.0, containers >= 0.5.7.0 && < 0.7, text >= 0.11 && < 1.3 || >= 2.0 && < 2.1,                      primes == 0.2.*, vector >= 0.12 && < 0.13   GHC-options:       -Wall   default-language:  Haskell2010@@ -38,7 +38,7 @@ test-suite Main   Type:              exitcode-stdio-1.0   Build-Depends:     base >= 4.9 && < 5,-                     bytestring >= 0.9 && < 1.0, containers >= 0.5.7.0 && < 0.7, text >= 0.11 && < 1.3,+                     bytestring >= 0.9 && < 1.0, containers >= 0.5.7.0 && < 0.7, text >= 0.11 && < 1.3 || >= 2.0 && < 2.1,                      vector >= 0.12 && < 0.13, primes == 0.2.*,                      QuickCheck >= 2.9 && < 3, quickcheck-instances >= 0.3.12 && <0.4,                      tasty >= 0.7, tasty-quickcheck >= 0.7 && < 1.0,
src/Data/Monoid/GCD.hs view
@@ -36,7 +36,10 @@ import qualified Data.Text.Encoding as TextEncoding import qualified Data.Text.Internal as Internal import qualified Data.Text.Internal.Lazy as LazyInternal-import           Data.Text.Unsafe (lengthWord16, reverseIter)+import           Data.Text.Unsafe (reverseIter)+#if MIN_VERSION_text(2,0,0)+import           Data.Text.Unsafe (Iter(..))+#endif import qualified Data.Text.Lazy as LazyText import qualified Data.Text.Lazy.Encoding as LazyEncoding import qualified Data.IntMap as IntMap@@ -393,8 +396,13 @@                    | otherwise = (Internal.text xarr xoff (succ i),                                   Internal.text yarr yoff (succ j),                                   Internal.text xarr (xoff+i+1) (xlen-i-1))+#if MIN_VERSION_text(2,0,0)+               where Iter xc xd = reverseIter x i+                     Iter yc yd = reverseIter y j+#else                where (xc, xd) = reverseIter x i                      (yc, yd) = reverseIter y j+#endif #else   stripCommonSuffix x y =     let (xlist, ylist, slist) =@@ -421,7 +429,7 @@             x0len = lazyLengthWord16 x0             y0len = lazyLengthWord16 y0             lazyLengthWord16 = LazyText.foldlChunks addLength 0-            addLength n x = n + lengthWord16 x+            addLength n x = n + (\(Internal.Text _ _ l) -> l) x             splitWord16 xp 0 x = (xp, x)             splitWord16 xp n (LazyInternal.Chunk x@(Internal.Text arr off len) xs)                | n < len = (xp . LazyInternal.chunk (Internal.Text arr off n),
src/Data/Monoid/Instances/Positioned.hs view
@@ -18,7 +18,7 @@ -- >> Data.Monoid.Factorial.drop 13 p -- >Line 2, column 4: "l\nmnop\n" -{-# LANGUAGE Haskell2010 #-}+{-# LANGUAGE Haskell2010, DeriveDataTypeable #-}  module Data.Monoid.Instances.Positioned (    OffsetPositioned, LinePositioned, extract, position, line, column@@ -29,6 +29,7 @@ import qualified Data.List as List import Data.String (IsString(..)) +import Data.Data (Data, Typeable) import Data.Semigroup (Semigroup(..)) import Data.Monoid (Monoid(..), Endo(..)) import Data.Semigroup.Cancellative (LeftReductive(..), RightReductive(..))@@ -56,7 +57,7 @@                                        -- | the current line                                        line :: !Int,                                        lineStart :: !Int,-                                       extractLines :: m}+                                       extractLines :: m} deriving (Data, Typeable)  -- | the current column column :: LinePositioned m -> Int