packages feed

trifecta 1.2.1.1 → 1.4

raw patch · 5 files changed

+20/−20 lines, 5 filesdep ~basedep ~blaze-htmldep ~charset

Dependency ranges changed: base, blaze-html, charset, comonad, fingertree, hashable, lens, parsers, reducers

Files

src/Text/Trifecta/Result.hs view
@@ -99,22 +99,22 @@   deriving (Show,Functor,Foldable,Traversable)  -- | A 'Prism' that lets you embed or retrieve a 'Result' in a potentially larger type.-class AsResult p f s t a b | s -> a, t -> b, s b -> t, t a -> s where-  _Result :: Overloaded p f s t (Result a) (Result b)+class AsResult s t a b | s -> a, t -> b, s b -> t, t a -> s where+  _Result :: Prism s t (Result a) (Result b) -instance AsResult p f (Result a) (Result b) a b where+instance AsResult (Result a) (Result b) a b where   _Result = id   {-# INLINE _Result #-}  -- | The 'Prism' for the 'Success' constructor of 'Result'-_Success :: (AsResult p f s t a b, Choice p, Applicative f) => Overloaded p f s t a b+_Success :: AsResult s t a b => Prism s t a b _Success = _Result . dimap seta (either id id) . right' . rmap (fmap Success) where   seta (Success a) = Right a   seta (Failure d) = Left (pure (Failure d)) {-# INLINE _Success #-}  -- | The 'Prism' for the 'Failure' constructor of 'Result'-_Failure :: (AsResult p f s s a a, Choice p, Applicative f) => Overloaded' p f s Doc+_Failure :: AsResult s s a a => Prism' s Doc _Failure = _Result . dimap seta (either id id) . right' . rmap (fmap Failure) where   seta (Failure d) = Right d   seta (Success a) = Left (pure (Success a))
src/Text/Trifecta/Rope.hs view
@@ -68,7 +68,7 @@ grabRest i t kf ks = trim (delta l) (bytes i - bytes l) (toList r) where   trim j 0 (Strand h _ : xs) = go j h xs   trim _ k (Strand h _ : xs) = go i (Strict.drop (fromIntegral k) h) xs-  trim j k (p          : xs) = trim (j <> delta p) k xs +  trim j k (p          : xs) = trim (j <> delta p) k xs   trim _ _ []                = kf   go j h s = ks j $ Lazy.fromChunks $ h : [ a | Strand a _ <- s ]   (l, r) = FingerTree.split (\b -> bytes b > bytes i) $ strands t
src/Text/Trifecta/Util/Array.hs view
@@ -187,7 +187,7 @@ {-# INLINE indexM_ #-}  unsafeFreeze :: MArray s a -> ST s (Array a)-unsafeFreeze mary = +unsafeFreeze mary =   ST $ \s -> case unsafeFreezeArray# (unMArray mary) s of     (# s', ary #) -> (# s', array ary (lengthM mary) #) {-# INLINE unsafeFreeze #-}@@ -238,7 +238,7 @@   copy_loop sidx didx 0 where   copy_loop !i !j !c     | c >= n = return ()-    | otherwise = do +    | otherwise = do       b <- indexM_ src i       write dst j b       copy_loop (i+1) (j+1) (c+1)@@ -254,7 +254,7 @@     copy ary 0 mary 0 idx     write mary idx b     copy ary idx mary (idx+1) (count-idx)-    return mary +    return mary   where !count = length ary {-# INLINE insert #-} 
src/Text/Trifecta/Util/Combinators.hs view
@@ -36,7 +36,7 @@  fromLazy :: Lazy.ByteString -> Strict.ByteString fromLazy = Strict.concat . Lazy.toChunks-     + toLazy :: Strict.ByteString -> Lazy.ByteString toLazy = Lazy.fromChunks . return @@ -48,5 +48,5 @@ infixl 4 <$!> (<$!>) :: Monad m => (a -> b) -> m a -> m b f <$!> m = do-  a <- m +  a <- m   return $! f a
trifecta.cabal view
@@ -1,6 +1,6 @@ name:          trifecta category:      Text, Parsing, Diagnostics, Pretty Printer, Logging-version:       1.2.1.1+version:       1.4 license:       BSD3 cabal-version: >= 1.10 license-file:  LICENSE@@ -46,20 +46,20 @@     array                >= 0.3.0.2 && < 0.6,     base                 >= 4.4     && < 5,     blaze-builder        >= 0.3.0.1 && < 0.4,-    blaze-html           >= 0.5     && < 0.6,+    blaze-html           >= 0.5     && < 0.7,     blaze-markup         >= 0.5     && < 0.6,     bytestring           >= 0.9.1   && < 0.11,-    charset              >= 0.3.2.1 && < 1,-    comonad              >= 3       && < 4,+    charset              >= 0.3.5.1 && < 1,+    comonad              >= 4       && < 5,     containers           >= 0.3     && < 0.6,     deepseq              >= 1.2.0.1 && < 1.4,-    fingertree           >= 0.0.1   && < 0.1,+    fingertree           >= 0.1     && < 0.2,     ghc-prim,-    hashable             >= 1.2     && < 1.3,-    lens                 >= 3.8.2   && < 4,+    hashable             >= 1.2.1   && < 1.3,+    lens                 >= 3.10    && < 5,     mtl                  >= 2.0.1   && < 2.2,-    parsers              >= 0.5     && < 1,-    reducers             >= 3       && < 4,+    parsers              >= 0.10    && < 1,+    reducers             >= 3.10    && < 4,     semigroups           >= 0.8.3.1 && < 1,     transformers         >= 0.2     && < 0.4,     unordered-containers >= 0.2.1   && < 0.3,