diff --git a/src/page/Home.js b/src/page/Home.js index e4d5585..f893977 100644 --- a/src/page/Home.js +++ b/src/page/Home.js @@ -562,13 +562,16 @@ instance Coll[MutMap[k, v, r]] {

Associated Effects

- Associated effects allow the effects in trait members to depend on the instance type. - This makes it easy to create abstractions over both pure and effectful operations, + Associated effects allow the effects in trait members to depend on the instance + type. + This makes it easy to create abstractions over both pure and effectful + operations, and mutable and immutable data structures.

- The code on the left adds an associated effect Aef to the Coll trait, + The code on the left adds an associated effect Aef to + the Coll trait, which makes it possible to add instances for mutable collections.

@@ -643,6 +646,44 @@ def conn(u: String, p: String): Validation[Err, Connection] = + + + + +

Seamless Java Interoperability

+ +

+ Flix supports seamless Java interoperability, making it possible to reuse code + from the Java Standard Library and the Java ecosystem, e.g., via Maven. +

+

+ Java support includes object creation, method invocation, exceptions, and + class/interface extension. +

+
+
+
+ + + + {`import java.io.File +import java.io.FileWriter +import java.io.IOException + +def main(): Unit \\ IO = + let f = new File("foo.txt"); + try { + let w = new FileWriter(f); + w.append("Hello World\\n"); + w.close() + } catch { + case ex: IOException => + println("Unable to write file") + }`} + + +
+