packages feed

FastPush 0.1.0.1 → 0.1.0.2

raw patch · 3 files changed

+5/−12 lines, 3 filesdep −mtldep −transformersdep ~vectorPVP ok

version bump matches the API change (PVP)

Dependencies removed: mtl, transformers

Dependency ranges changed: vector

API changes (from Hackage documentation)

Files

FastPush.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/  name:                FastPush-version:             0.1.0.1+version:             0.1.0.2 synopsis:            A monad and monad transformer for pushing things onto a stack very fast. description:         This library gives you a monad that lets you push things onto a stack very quickly.                       You get things off the stack when you run the monad. Under the hood, this uses mutable@@ -22,7 +22,7 @@   exposed-modules:     Control.Monad.Push.Example, Control.Monad.Push, Control.Monad.Push.Class, Control.Monad.Trans.Push   -- other-modules:          other-extensions:    FlexibleContexts, ScopedTypeVariables, TypeApplications, RankNTypes, MultiParamTypeClasses, GeneralizedNewtypeDeriving, DeriveFunctor, FlexibleInstances, StandaloneDeriving, UnboxedTuples-  build-depends:       base >=4.9 && <4.10, vector >=0.12 && <0.13, transformers >=0.5 && <0.6, STMonadTrans >=0.3 && <0.4, mtl >=2.2 && <2.3+  build-depends:       base >=4.9 && <4.10, vector >=0.11 && <0.13, STMonadTrans >=0.3 && <0.4   hs-source-dirs:      src   default-language:    Haskell2010-  ghc-options:         -O2+  ghc-options:         -O2 -W
src/Control/Monad/Push.hs view
@@ -10,12 +10,9 @@ import qualified Data.Vector as V import qualified Data.Vector.Storable as VS import qualified Data.Vector.Unboxed as VU-import qualified Control.Monad.Trans.Class as Trans import qualified Data.Vector.Generic         as VG import qualified Data.Vector.Generic.Mutable as VGM import Data.STRef.Strict (STRef, readSTRef, writeSTRef, newSTRef)-import qualified Data.STRef.Strict as Ref-import qualified Data.Foldable as Foldable import Control.Monad.Push.Class (MonadPush, push)  -- | The internal return type of a push action.@@ -28,7 +25,7 @@  instance Applicative (Push v p) where     {-# INLINE pure #-}-    pure a = Push $ \u v -> (return (Res u a))+    pure a = Push $ \u _ -> (return (Res u a))     {-# INLINE (<*>) #-}     (Push f) <*> (Push g) = Push $ \u v -> f u v >>= (\(Res u' o1) -> g u' v >>= (\(Res u'' o2) -> return (Res u'' (o1 o2)))) 
src/Control/Monad/Trans/Push.hs view
@@ -11,15 +11,11 @@ import Control.Monad.ST.Trans (runST, STRef, readSTRef, writeSTRef, newSTRef) import Control.Monad.ST.Trans.Internal (STT(STT), STTRet(STTRet)) import GHC.ST (ST(ST))-import Control.Monad.Identity (Identity, runIdentity) import qualified Data.Vector as V import qualified Data.Vector.Storable as VS import qualified Data.Vector.Unboxed as VU-import qualified Control.Monad.Trans.Class as Trans import qualified Data.Vector.Generic         as VG import qualified Data.Vector.Generic.Mutable as VGM-import qualified Data.STRef.Strict as Ref-import qualified Data.Foldable as Foldable import Control.Monad.Push.Class (MonadPush, push)  -- | The internal return type of a push action.@@ -35,7 +31,7 @@  instance Monad m => Applicative (PushT v p m) where     {-# INLINE pure #-}-    pure a = PushT $ \u v -> (return (Res u a))+    pure a = PushT $ \u _ -> (return (Res u a))     {-# INLINE (<*>) #-}     (PushT f) <*> (PushT g) = PushT $ \u v -> f u v >>= (\(Res u' o1) -> g u' v >>= (\(Res u'' o2) -> return (Res u'' (o1 o2))))