gloss-banana 0.1.0.0 → 0.1.0.3
raw patch · 2 files changed
+13/−9 lines, 2 filesdep ~basedep ~reactive-banana
Dependency ranges changed: base, reactive-banana
Files
Graphics/Gloss/Interface/FRP/ReactiveBanana.hs view
@@ -29,18 +29,22 @@ pictureref ← newIORef blank (tickHandler, tick) ← newAddHandler (eventHandler, event) ← newAddHandler- compile (makeNetwork tickHandler eventHandler $ change pictureref) >>= actuate+ compile (makeNetwork tickHandler eventHandler $ writeIORef pictureref) >>= actuate playIO display colour frequency () (\ _ → readIORef pictureref) (\ ev _ → () <$ event ev) (\ time _ → () <$ tick time) where- change ∷ IORef Picture → Picture → IO ()- change pictureref picture = do- writeIORef pictureref picture makeNetwork tickHandler eventHandler change = do eTick ← fromAddHandler tickHandler eEvent ← fromAddHandler eventHandler- bPicture ← mPicture eTick eEvent- changes bPicture >>= reactimate . fmap change+ bRawPicture ← mPicture eTick eEvent+ + -- make sure the Behavior doesn't leak memory if mPicture ignores+ -- one or both kind of events+ let bPicture = bRawPicture+ <* stepper undefined eTick+ <* stepper undefined eEvent+ + changes bPicture >>= reactimate' . fmap (fmap change) initial bPicture >>= liftIO . change
gloss-banana.cabal view
@@ -7,7 +7,7 @@ -- PVP summary: +-+------- breaking API changes -- | | +----- non-breaking API additions -- | | | +--- code changes with no API change-version: 0.1.0.0+version: 0.1.0.3 -- A short (one-line) description of the package. synopsis: An Interface for gloss in terms of a reactive-banana Behavior.@@ -62,9 +62,9 @@ default-extensions: UnicodeSyntax, ScopedTypeVariables, RankNTypes -- Other library packages from which modules are imported.- build-depends: base >=4.6 && <4.7,+ build-depends: base >=4.6 && <4.8, gloss >=1.8 && <1.9,- reactive-banana >=0.7 && <0.8+ reactive-banana >=0.8 && <0.9 -- Directories containing source files. -- hs-source-dirs: