raulraja
11/04/2019, 9:58 PMval Meta.helloWorld: Plugin get() =
"Hello World" {
meta(
func({ name == "helloWorld" }) { c ->
Transform.replace(
replacing = c,
newDeclaration = """|fun helloWorld(): Unit =
| println("Hello ΛRROW Meta!")
|""".function.synthetic
)
}
)
}
https://github.com/arrow-kt/arrow-meta/blob/master/compiler-plugin/src/main/kotlin/arrow/meta/Meta.kt#L11
Arrow Meta will serve as the base of meta-programming for the Arrow framework to include features regarding the type system such as Union types, Higher Kinds and Type classes and others more related to ergonomics like for comprehensions or polyadic functions.
Both Arrow and Meta will eliminate any features that ever get popularity either as a KEEP and make it to the lang or Jetbrains decides to adopt. We strive to be a companion to the std lib with Arrow and to the Compiler with Meta. We hope you can find meta useful to prototype KEEPs and new awesome features for Kotlin or your libraries.
#arrow-meta
https://twitter.com/arrow_kt/status/1191464548974219264