From 0f9bc13a34b729d9ae9db31276feb2a66785d06b Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sun, 14 Aug 2022 21:02:22 -0400 Subject: Documentation changes for v0.7.0 --- .../the_lux_programming_language/chapter_18.md | 51 +++++++++++----------- 1 file changed, 26 insertions(+), 25 deletions(-) (limited to 'documentation/book/the_lux_programming_language/chapter_18.md') diff --git a/documentation/book/the_lux_programming_language/chapter_18.md b/documentation/book/the_lux_programming_language/chapter_18.md index 83a87f1ae..bf1ad9108 100644 --- a/documentation/book/the_lux_programming_language/chapter_18.md +++ b/documentation/book/the_lux_programming_language/chapter_18.md @@ -87,14 +87,8 @@ The first type of extension we'll see is the `Analysis` extension: ```clojure (.require [library - [lux "*" - [extension {"+" [analysis: synthesis: generation:]}] - ["@" target - ["[0]" jvm] - ["[0]" js] - ["[0]" python] - ["[0]" lua] - ["[0]" ruby]] + [lux (.only) + [extension (.only analysis synthesis generation)] [abstract ["[0]" monad {"+" [do]}]] [control @@ -105,19 +99,26 @@ The first type of extension we'll see is the `Analysis` extension: [data [collection ["[0]" sequence]]] - [tool - [compiler - ["[0]" phase] - [language - [lux - ["[0]" analysis] - ["[0]" synthesis] - ["[0]" directive] - [phase - [analysis - ["[0]" type]]]]]]]]]) - -(analysis: ("my triple" self phase archive [elementC .any]) + [meta + ["@" target + ["[0]" jvm] + ["[0]" js] + ["[0]" python] + ["[0]" lua] + ["[0]" ruby]] + [tool + [compiler + ["[0]" phase] + [language + [lux + ["[0]" analysis] + ["[0]" synthesis] + ["[0]" directive] + [phase + [analysis + ["[0]" type]]]]]]]]]]) + +(analysis ("my triple" self phase archive [elementC .any]) (do phase.monad [[type elementA] (type.with_inference (phase archive elementC)) @@ -165,14 +166,14 @@ Also, you might have noticed that, besides the input code we're parsing, our ext --- ```clojure -(analysis: ("my quadruple" self phase archive [elementC .any]) +(analysis ("my quadruple" self phase archive [elementC .any]) (do phase.monad [[type elementA] (type.with_inference (phase archive elementC)) _ (type.infer (.Tuple type type type type))] (in {analysis.#Extension self (list elementA)}))) -(synthesis: ("my quadruple" self phase archive [elementA .any]) +(synthesis ("my quadruple" self phase archive [elementA .any]) (do phase.monad [elementS (phase archive elementA)] (in (synthesis.tuple (list elementS elementS elementS elementS))))) @@ -187,14 +188,14 @@ Currently, the optimization infrastructure Lux provides is not very sophisticate --- ```clojure -(analysis: ("my quintuple" self phase archive [elementC .any]) +(analysis ("my quintuple" self phase archive [elementC .any]) (do phase.monad [[type elementA] (type.with_inference (phase archive elementC)) _ (type.infer (.Tuple type type type type type))] (in {analysis.#Extension self (list elementA)}))) -(generation: ("my quintuple" self phase archive [elementS .any]) +(generation ("my quintuple" self phase archive [elementS .any]) (do phase.monad [elementG (phase archive elementS)] (in (for {@.jvm (row.row (#jvm.Embedded elementG) -- cgit v1.2.3