]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.runtime/scl/Charset.scl
java.nio.file.Files and Charset SCL API with <Exception> effect
[simantics/platform.git] / bundles / org.simantics.scl.runtime / scl / Charset.scl
diff --git a/bundles/org.simantics.scl.runtime/scl/Charset.scl b/bundles/org.simantics.scl.runtime/scl/Charset.scl
new file mode 100644 (file)
index 0000000..fd881ac
--- /dev/null
@@ -0,0 +1,14 @@
+import "Prelude"
+
+importJava "java.nio.charset.Charset" where
+    data Charset
+
+    forName :: String -> Charset
+
+    name :: Charset -> String
+
+instance Show Charset where
+    show charset = name charset
+
+importJava "java.nio.charset.StandardCharsets" where
+    UTF_8 :: Charset
\ No newline at end of file