]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/Serialization.scl
Added info on backup location to documentation backup.
[simantics/platform.git] / bundles / org.simantics.scl.compiler / tests / org / simantics / scl / compiler / tests / scl / Serialization.scl
1 import "Prelude"
2
3 rt :: Serializable a => a -> a
4 rt v = deserialize (serialize v)
5
6 main :: String
7 main = show (
8   (rt "Hello", rt ()),
9   (rt 1.2 :: Double, rt 1.2 :: Float, 3 :: Integer, 4 :: Long),
10   rt (Just (1 :: Integer)),
11   (rt [1::Integer,2,3], rt [[1::Integer,2],[3,4]], fromDoubleArray (rt (toDoubleArray [3::Double,2,1])))
12   )
13 --
14 (("Hello", ()), (1.2, 1.2, 3, 4), Just 1, ([1, 2, 3], [[1, 2], [3, 4]], [3.0, 2.0, 1.0]))