graph-rewriting-gl 0.6.2 → 0.6.3
raw patch · 4 files changed
+39/−37 lines, 4 filesdep ~AC-Vectordep ~basedep ~containersPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: AC-Vector, base, containers, graph-rewriting
API changes (from Hackage documentation)
- GraphRewriting.GL.Render: render :: (Render a) => a -> IO ()
+ GraphRewriting.GL.Render: render :: Render a => a -> IO ()
- GraphRewriting.GL.UI: run :: (View [Port] n, Render n, View Position n, PortSpec n, View Rotation n) => Int -> (Graph n -> Graph n) -> (Node -> Rewrite n a) -> Graph n -> LabeledTree (Rule n) -> IO ()
+ GraphRewriting.GL.UI: run :: (View Position n, Render n', View Position n', View Rotation n', PortSpec n', View [Port] n') => Int -> (Graph n -> Graph n') -> (Node -> Rewrite n a) -> Graph n -> LabeledTree (Rule n) -> IO ()
Files
- GraphRewriting/GL/Canvas.hs +5/−3
- GraphRewriting/GL/Render.hs +1/−1
- GraphRewriting/GL/UI.hs +2/−3
- graph-rewriting-gl.cabal +31/−30
GraphRewriting/GL/Canvas.hs view
@@ -12,14 +12,16 @@ import Data.IORef import GraphRewriting.Layout.Rotation import GraphRewriting.Layout.Position-import GraphRewriting.Layout.PortSpec import qualified Data.Set as Set import Control.Monad (liftM) import Data.Maybe (catMaybes, listToMaybe)+import Data.Vector.Class +--setupCanvas :: (View Rotation n', View Position n', Render n', View Position n) ⇒ (Graph n -> Graph n') -> (Edge -> [n'] -> [(Vector2, Vector2)]) -> IORef (GlobalVars n) -> IO GL.Window -setupCanvas ∷ (View [Port] n, Render n, View Position n, PortSpec n, View Rotation n)- ⇒ (Graph n → Graph n) → (Edge → [n] → [(Vector2, Vector2)]) → IORef (GlobalVars n) → IO GL.Window++setupCanvas ∷ (View Position n, Render n', View Rotation n', View Position n')+ ⇒ (Graph n → Graph n') → (Edge → [n'] → [(Vector2, Vector2)]) → IORef (GlobalVars n) → IO GL.Window setupCanvas project hyperEdgeToLines globalVars = do canvas ← GL.createWindow "Graph" GL.clearColor $= (GL.Color4 1 1 1 0 ∷ GL.Color4 GL.GLclampf)
GraphRewriting/GL/Render.hs view
@@ -1,6 +1,6 @@ module GraphRewriting.GL.Render where -import Data.Vector+import Data.Vector.V2 import Graphics.Rendering.OpenGL (GLdouble) import qualified Graphics.Rendering.OpenGL as GL import Unsafe.Coerce
GraphRewriting/GL/UI.hs view
@@ -38,10 +38,9 @@ initialise ∷ IO (String, [String]) initialise = GL.getArgsAndInitialize --- | After initialisation 'run' can be used to start the GUI-run ∷ (View [Port] n, Render n, View Position n, PortSpec n, View Rotation n)+run ∷ (View Position n, Render n', View Position n', View Rotation n', PortSpec n', View [Port] n') ⇒ Int -- ^ The number of layout steps to apply before displaying the graph- → (Graph n → Graph n) -- ^ A projection function that is applied just before displaying the graph+ → (Graph n → Graph n') -- ^ A projection function that is applied just before displaying the graph → (Node → Rewrite n a) -- ^ The monadic graph transformation code for a layout step → Graph n → LabeledTree (Rule n) -- ^ The rule menu given as a tree of named rules
graph-rewriting-gl.cabal view
@@ -1,41 +1,42 @@ Name: graph-rewriting-gl-Version: 0.6.2+Version: 0.6.3 Copyright: (c) 2010, Jan Rochel License: BSD3 License-File: LICENSE Author: Jan Rochel Maintainer: jan@rochel.info Stability: beta-Build-Type: Simple+Build-Type: Simple Synopsis: OpenGL interface for interactive hypergraph rewriting Description:- Once a graph rewriting system has been specified using the graph-rewriting library this package can be- used to create an application that allows to experiment with this system by interactively applying the- rewrite rules manually on the graph.+ Once a graph rewriting system has been specified using the graph-rewriting library this package can be+ used to create an application that allows to experiment with this system by interactively applying the+ rewrite rules manually on the graph. Category: Graphs, Graphics-Extensions: UnicodeSyntax Cabal-Version: >= 1.6-Build-Depends:- base >= 4 && < 4.3,- base-unicode-symbols >= 0.2 && < 0.3,- graph-rewriting >= 0.4.6 && < 0.5,- graph-rewriting-layout >= 0.4 && < 0.5,- GLUT >= 2.2 && < 2.3,- OpenGL >= 2.4 && < 2.5,- containers >= 0.3 && < 0.4,- AC-Vector >= 1.2 && < 1.3-Exposed-Modules:- GraphRewriting.GL.UI- GraphRewriting.GL.Render-Other-Modules:- GraphRewriting.GL.Global- GraphRewriting.GL.Menu- GraphRewriting.GL.Canvas- GraphRewriting.GL.HyperEdge-Extensions:- UnicodeSyntax- FlexibleInstances- FlexibleContexts- MultiParamTypeClasses- TypeSynonymInstances-GHC-Options: -fno-warn-duplicate-exports -fwarn-unused-imports++Library+ Build-Depends:+ base >= 4 && < 4.4,+ base-unicode-symbols >= 0.2 && < 0.3,+ graph-rewriting >= 0.4.6 && < 0.6,+ graph-rewriting-layout >= 0.4 && < 0.5,+ GLUT >= 2.2 && < 2.3,+ OpenGL >= 2.4 && < 2.5,+ containers >= 0.3 && < 0.5,+ AC-Vector >= 2.3 && < 2.4+ Exposed-Modules:+ GraphRewriting.GL.UI+ GraphRewriting.GL.Render+ Other-Modules:+ GraphRewriting.GL.Global+ GraphRewriting.GL.Menu+ GraphRewriting.GL.Canvas+ GraphRewriting.GL.HyperEdge+ Extensions:+ UnicodeSyntax+ FlexibleInstances+ FlexibleContexts+ MultiParamTypeClasses+ TypeSynonymInstances+ GHC-Options: -fno-warn-duplicate-exports -fwarn-unused-imports