X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.scl.compiler%2Ftests%2Forg%2Fsimantics%2Fscl%2Fcompiler%2Ftests%2Fscl%2FGraphPrelude.scl;fp=bundles%2Forg.simantics.scl.compiler%2Ftests%2Forg%2Fsimantics%2Fscl%2Fcompiler%2Ftests%2Fscl%2FGraphPrelude.scl;h=0000000000000000000000000000000000000000;hb=a8758de5bc19e5adb3f618d3038743a164f09912;hp=ddb2d58befb710ac72b5bc3df60b3701db6ac1a7;hpb=12d9af17384d960b75d58c3935d2b7b46d93e87b;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/GraphPrelude.scl b/bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/GraphPrelude.scl deleted file mode 100644 index ddb2d58be..000000000 --- a/bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/GraphPrelude.scl +++ /dev/null @@ -1,41 +0,0 @@ - -/** - * Databoard - */ -data Binding // Private -class Serializable a where - getBinding :: Binding - -/** - * Reading graph - */ -data Resource -data ReadGraph // Private -class ReadTransaction where - getGraph :: ReadGraph - -resource :: ReadTransaction => String -> Resource -(#) :: ReadTransaction => Resource -> Resource -> [Resource] -valueOf :: ReadTransaction => Serializable a => Resource -> a - -/** - * Writing graph - */ -data WriteGraph // Private -data Graph a = Graph (WriteGraph -> a) - -instance Monad Graph where - return x = Graph (\_ -> x) - Graph g >>= f = \wg -> f (g wg) wg - map f (Graph g) = Graph (f . g) - -newResource :: Graph Resource -newResource = Graph __WriteGraph_newResource -newLiteral :: Serializable a => a -> Graph Resource -newLiteral = Graph (\wg -> - literal = __WriteGraph_newResource wg - _ = __WriteGraph_claimValue wg literal a getBinding - literal -) -statement :: Resource -> Resource -> Resource -> Graph () -statement s p o = Graph (\wg -> __WriteGraph_claim wg s p o) \ No newline at end of file