]> gerrit.simantics Code Review - simantics/platform.git/blob - tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/ImportRef.scl
Automatic execution of SCL tests in Maven
[simantics/platform.git] / tests / org.simantics.scl.compiler.tests / src / org / simantics / scl / compiler / tests / scl / ImportRef.scl
1 importJava "org.simantics.scl.runtime.procedure.Ref" where\r
2     data Ref a\r
3     \r
4     @JavaName "<init>"\r
5     ref :: a -> <Proc> (Ref a)\r
6     \r
7     @JavaName "value"\r
8     getRef :: Ref a -> <Proc> a\r
9     \r
10     @JavaName "<set>value"\r
11     (:=) :: Ref a -> a -> <Proc> ()\r
12 \r
13 main = do\r
14     r = ref (13 :: Integer)\r
15     r := (14 :: Integer)\r
16     getRef r\r
17 --\r
18 14