packages feed

dynamic-graph 0.1.0.6 → 0.1.0.7

raw patch · 4 files changed

+45/−24 lines, 4 filesdep −bytestringdep −deepseqdep ~basePVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependencies removed: bytestring, deepseq

Dependency ranges changed: base

API changes (from Hackage documentation)

+ Graphics.DynamicGraph.Util: pipeify :: Monad m => (a -> m ()) -> Consumer a m ()
- Graphics.DynamicGraph.Util: checkVertexTextureUnits :: EitherT String IO ()
+ Graphics.DynamicGraph.Util: checkVertexTextureUnits :: IO Bool
- Graphics.DynamicGraph.Util: setupGLFW :: EitherT String IO ()
+ Graphics.DynamicGraph.Util: setupGLFW :: IO Bool

Files

Graphics/DynamicGraph/FillLine.hs view
@@ -7,6 +7,7 @@ > import Control.Monad > import Control.Monad.Trans.Either > import Control.Concurrent+> import Control.Applicative > import Pipes > import qualified Pipes.Prelude as P > import System.Random@@ -23,7 +24,7 @@ >  > main = eitherT putStrLn return $ do >     setupGLFW->     lineGraph  <- window 1024 480 $ fmap (for cat . (lift . )) $ renderFilledLine 1000 jet_mod+>     lineGraph  <- window 1024 480 $ pipeify <$> renderFilledLine 1000 jet_mod >  >     lift $ runEffect $ randomVect >-> lineGraph 
Graphics/DynamicGraph/Line.hs view
@@ -9,6 +9,7 @@ > import Control.Monad > import Control.Monad.Trans.Either > import Control.Concurrent+> import Control.Applicative > import Pipes > import qualified Pipes.Prelude as P > import System.Random@@ -25,7 +26,7 @@ >  > main = eitherT putStrLn return $ do >     setupGLFW->     lineGraph <- window 1024 480 $ fmap (for cat . (lift .)) $ renderLine 1000 1024+>     lineGraph <- window 1024 480 $ pipeify <$> renderLine 1000 1024 >  >     lift $ runEffect $ randomVect >-> lineGraph 
Graphics/DynamicGraph/Util.hs view
@@ -1,28 +1,32 @@ {-| Various utility functions -} module Graphics.DynamicGraph.Util (     setupGLFW,+    checkVertexTextureUnits,     replaceMVar,-    checkVertexTextureUnits+    pipeify     ) where  import Control.Monad import Control.Monad.Trans.Class import Control.Monad.Trans.Either import Control.Concurrent.MVar-import Control.DeepSeq+import Control.Applicative  import Graphics.Rendering.OpenGL import Graphics.UI.GLFW as G+import Pipes --- | Utility function to setup GLFW for graph drawing-setupGLFW :: EitherT String IO ()+-- | Utility function to setup GLFW for graph drawing. Returns True on success.+setupGLFW :: IO Bool setupGLFW = do-    lift $ setErrorCallback $ Just $ \error msg -> do+    setErrorCallback $ Just $ \error msg -> do         print error         putStrLn msg--    res <- lift $ G.init-    unless res (left "error initializing glfw")+    G.init+    +-- | Returns True if texture units are accessible from the vertex shader. Needed  by Graphics.DynamicGraph.Line.+checkVertexTextureUnits :: IO Bool+checkVertexTextureUnits = (> 0) <$> get maxVertexTextureImageUnits  -- | `tryTakeMVar` then `putMVar` replaceMVar :: MVar a -> a -> IO ()@@ -30,9 +34,6 @@     tryTakeMVar mv     putMVar mv val --- | Check if texture units are accessible from the vertex shader. Needed  by Graphics.DynamicGraph.Line.-checkVertexTextureUnits :: EitherT String IO ()-checkVertexTextureUnits = do-    mtu <- lift $ get maxVertexTextureImageUnits-    when (mtu <= 0) $ left "No texture units accessible from vertex shader"-+-- | Convert a function that performs a monadic action to a Consumer+pipeify :: Monad m => (a -> m ()) -> Consumer a m ()+pipeify = for cat . (lift .)
dynamic-graph.cabal view
@@ -1,5 +1,5 @@ name:                dynamic-graph-version:             0.1.0.6+version:             0.1.0.7 synopsis:            Draw and update graphs in real time with OpenGL description:              Draw and update graphs in real time with OpenGL. Suitable for displaying large amounts of frequently changing data. Line graphs and waterfall plots are supported, as well as axis drawing.@@ -25,10 +25,28 @@     location: https://github.com/adamwalker/dynamic-graph  library-  exposed-modules:     Graphics.DynamicGraph.Line, Graphics.DynamicGraph.Waterfall, Graphics.DynamicGraph.Util, Graphics.DynamicGraph.FillLine, Graphics.DynamicGraph.Axis, Graphics.DynamicGraph.RenderCairo, Graphics.DynamicGraph.ColorMaps, Graphics.DynamicGraph.Window-  -- other-modules:       -  -- other-extensions:    -  build-depends:       base >=4.6 && <4.8, GLFW-b >=1.4 && <1.5, OpenGL >=2.9 && <2.13, GLUtil >=0.7 && <0.9, transformers >=0.3 && <0.5, either >=4.1 && <4.4, pipes >=4.1 && <4.2, pango >=0.13 && <0.14, cairo >=0.13 && <0.14, colour >=2.3 && <2.4, bytestring >=0.10 && <0.11, deepseq >=1.3 && <1.5-  -- hs-source-dirs:      -  default-language:    Haskell2010-  other-modules:       Paths_dynamic_graph+    exposed-modules:     +        Graphics.DynamicGraph.Line, +        Graphics.DynamicGraph.Waterfall, +        Graphics.DynamicGraph.Util, +        Graphics.DynamicGraph.FillLine, +        Graphics.DynamicGraph.Axis, +        Graphics.DynamicGraph.RenderCairo, +        Graphics.DynamicGraph.ColorMaps, +        Graphics.DynamicGraph.Window+    -- other-modules:       +    -- other-extensions:    +    build-depends:       +        base         >=4.6  && <4.9, +        GLFW-b       >=1.4  && <1.5, +        OpenGL       >=2.9  && <2.13, +        GLUtil       >=0.7  && <0.9, +        transformers >=0.3  && <0.5, +        either       >=4.1  && <4.4, +        pipes        >=4.1  && <4.2, +        pango        >=0.13 && <0.14, +        cairo        >=0.13 && <0.14, +        colour       >=2.3  && <2.4+    -- hs-source-dirs:      +    default-language:    Haskell2010+    other-modules:       Paths_dynamic_graph