packages feed

graph-rewriting-gl 0.5 → 0.5.1

raw patch · 4 files changed

+18/−5 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

GraphRewriting/GL/Canvas.hs view
@@ -14,8 +14,9 @@ import GraphRewriting.Layout.Position import GraphRewriting.Layout.PortSpec import qualified Data.Set as Set-import Control.Monad (liftM)+import Control.Monad (liftM, zipWithM_, replicateM_) import Data.Maybe (catMaybes, listToMaybe)+import Data.List ((\\))   setupCanvas ∷ (View [Port] n, Render n, View Position n, PortSpec n, View Rotation n)@@ -49,8 +50,17 @@ 		pause globalVars 		rule ← liftM selectedRule $ readIORef globalVars 		node ← nodeAt pos-		let applyRuleOn n = execGraph (apply $ nextIs n rule)-		modifyGraph (maybe id applyRuleOn node) globalVars+		case node of+			Nothing → return ()+			Just n  → do+				(newNodes, g) ← liftM (runGraph $ apply $ nextIs n rule) (readGraph globalVars)+				let fixNew = do+					oldNodes ← liftM (\\ newNodes) readNodeList+					oldPositions ← mapM (examineNode position) oldNodes+					origLayoutStep+					zipWithM_ updateNode (map Position oldPositions) oldNodes+				writeGraph (execGraph (replicateM_ 5 fixNew) g) globalVars+ 	inputCallback (GL.MouseButton GL.RightButton) GL.Up mod (GL.Position x y) = resume globalVars  	inputCallback (GL.MouseButton GL.LeftButton) GL.Up mod pos = do
GraphRewriting/GL/Global.hs view
@@ -21,6 +21,9 @@ redisplay ∷ Window → IO () redisplay = postRedisplay . Just +readGraph = liftM graph . readIORef+writeGraph g = modifyGraph (const g)+ modifyGraph f globalVars = do 	modifyIORef globalVars $ \v → v {graph = f $ graph v} 	highlight globalVars
LICENSE view
@@ -5,6 +5,6 @@  * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.-* Neither the name of the <ORGANIZATION> nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.+* Neither the name of the University of Utrecht nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
graph-rewriting-gl.cabal view
@@ -1,5 +1,5 @@ Name:           graph-rewriting-gl-Version:        0.5+Version:        0.5.1 Copyright:      (c) 2010, Jan Rochel License:        BSD3 License-File:   LICENSE