]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.graphviz/scl/Visualization/GGraph.scl
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.graphviz / scl / Visualization / GGraph.scl
index 9c141aaf55a4669b7414d939f98802ec38fdcd68..58bdc41f240639b5117e8c8c2c18d63c5db96cb8 100644 (file)
@@ -1,32 +1,32 @@
-import "Visualization/Graphviz"\r
-import "MMap" as MMap\r
-include "Visualization/Graphviz/Property"\r
-\r
-data GGraph a e = GGraph Graph (MMap.T a Node) (a -> <e> [Property])\r
-\r
-newGGraph :: [Property] -> (a -> <e> [Property]) -> <Proc> GGraph a e\r
-newGGraph properties f = GGraph (newGraph properties) (MMap.create ()) f \r
-\r
-@private\r
-toNode :: GGraph a e -> a -> <e,Proc> Node\r
-toNode (GGraph graph nodeMap f) r =\r
-    match MMap.get nodeMap r with\r
-        Just n -> n\r
-        Nothing -> do\r
-            n = newNode graph (f r)\r
-            MMap.put nodeMap r n\r
-            n\r
-\r
-newGEdge :: GGraph a e -> a -> a -> [Property] -> <e,Proc> Edge\r
-newGEdge graph r1 r2 properties = edge\r
-  where\r
-    edge = newEdge (toNode graph r1) (toNode graph r2) properties\r
-\r
-newGNode :: GGraph a e -> a -> <e,Proc> Node\r
-newGNode = toNode\r
-\r
-showGGraph :: GGraph a e -> <Proc> ()\r
-showGGraph (GGraph graph _ _) = showGraph graph\r
-\r
-showGGraphWithAlgorithm :: String -> GGraph a e -> <Proc> ()\r
-showGGraphWithAlgorithm algorithm (GGraph graph _ _) = showGraphWithAlgorithm graph algorithm\r
+import "Visualization/Graphviz"
+import "MMap" as MMap
+include "Visualization/Graphviz/Property"
+
+data GGraph a e = GGraph Graph (MMap.T a Node) (a -> <e> [Property])
+
+newGGraph :: [Property] -> (a -> <e> [Property]) -> <Proc> GGraph a e
+newGGraph properties f = GGraph (newGraph properties) (MMap.create ()) f 
+
+@private
+toNode :: GGraph a e -> a -> <e,Proc> Node
+toNode (GGraph graph nodeMap f) r =
+    match MMap.get nodeMap r with
+        Just n -> n
+        Nothing -> do
+            n = newNode graph (f r)
+            MMap.put nodeMap r n
+            n
+
+newGEdge :: GGraph a e -> a -> a -> [Property] -> <e,Proc> Edge
+newGEdge graph r1 r2 properties = edge
+  where
+    edge = newEdge (toNode graph r1) (toNode graph r2) properties
+
+newGNode :: GGraph a e -> a -> <e,Proc> Node
+newGNode = toNode
+
+showGGraph :: GGraph a e -> <Proc> ()
+showGGraph (GGraph graph _ _) = showGraph graph
+
+showGGraphWithAlgorithm :: String -> GGraph a e -> <Proc> ()
+showGGraphWithAlgorithm algorithm (GGraph graph _ _) = showGraphWithAlgorithm graph algorithm