lazyio 0.1.0.5 → 0.1.0.6
raw patch · 2 files changed
+9/−10 lines, 2 filesdep ~base
Dependency ranges changed: base
Files
- lazyio.cabal +3/−3
- src/System/IO/Lazy.hs +6/−7
lazyio.cabal view
@@ -1,5 +1,5 @@ Name: lazyio-Version: 0.1.0.5+Version: 0.1.0.6 License: BSD3 License-File: LICENSE Author: Henning Thielemann <haskell@henning-thielemann.de>@@ -41,13 +41,13 @@ Source-Repository this type: darcs location: http://code.haskell.org/~thielema/lazyio/- tag: 0.1.0.5+ tag: 0.1.0.6 Library Build-Depends: unsafe >=0.0 && <0.1, transformers >=0.2 && <0.7,- base >=2 && <5+ base >=4.8 && <5 Default-Language: Haskell98 GHC-Options: -Wall
src/System/IO/Lazy.hs view
@@ -60,18 +60,17 @@ data RunAll = RunAll deriving Show -instance Monad T where- return x = Cons $ return x- x >>= f = Cons $- mapStateT Unsafe.interleaveIO . decons . f =<<- mapStateT Unsafe.interleaveIO (decons x)- instance Functor T where fmap f = Cons . fmap f . decons instance Applicative T where- pure = return+ pure = Cons . pure (<*>) = ap++instance Monad T where+ x >>= f = Cons $+ mapStateT Unsafe.interleaveIO . decons . f =<<+ mapStateT Unsafe.interleaveIO (decons x) interleave :: IO a -> T a interleave m = Cons $ StateT $ \RunAll -> fmap (\x->(x,RunAll)) m