Improve Databoard's dynamically typed data capabilities.
[simantics/platform.git] / bundles / org.simantics.scl.runtime / scl / Prelude.scl
index 84f8b91b6ef97751ea1f0a00b053ece6e2e8be63..4c20c99b52dfe03528542ab582934a9fe7185ec3 100644 (file)
@@ -2294,6 +2294,9 @@ importJava "org.simantics.databoard.binding.mutable.Variant" where
     @JavaName getComponent
     variantComponent :: Variant -> ChildReference -> Variant
 
+variant :: Serializable a => a -> Variant
+variant v = variantOfWithBinding binding v
+
 variantValue :: Serializable a => Variant -> a
 variantValue v = variantValue_ v binding