diff --git a/doc/10.x/manual/menu.wiki b/doc/10.x/manual/menu.wiki index 43bbcb69d6..4b8bebd9e7 100644 --- a/doc/10.x/manual/menu.wiki +++ b/doc/10.x/manual/menu.wiki @@ -13,6 +13,7 @@ ==Client-server programming ===[[clientserver-applications|Eliom applications]] +===[[ppx-syntax|Multi-tier programming]] ===[[clientserver-html|Generating HTML]] ===[[clientserver-communication|Communication]] ===[[clientserver-services|Client-side services]] @@ -26,8 +27,3 @@ ===[[workflow-compilation|Compilation]] ===[[workflow-configuration|Configuration & running]] ===[[scalability|Scalability]] - -==Syntax -===[[ppx-syntax|PPX-based syntax]] -===[[clientserver-language|Camlp4-based syntax]] -===[[ppx-migration|Migration to PPX]] diff --git a/doc/10.x/manual/ppx-syntax.wiki b/doc/10.x/manual/ppx-syntax.wiki index d98b6767d0..c485362d2c 100644 --- a/doc/10.x/manual/ppx-syntax.wiki +++ b/doc/10.x/manual/ppx-syntax.wiki @@ -2,11 +2,8 @@ The eliom syntax extension allows to write, in one file, both the client and server part of your application. The extension is -automatically enabled by the {{{eliomc}}} and {{{js_of_eliom}}} -compilers on {{{.eliom}}} and {{{.eliomi}}} files. - -For the Camlp4 syntax extension, see -<>. +automatically enabled by the default build system on +{{{.eliom}}} and {{{.eliomi}}} files. The extensions presented here are also available with the {{{eliom.}}} prefix. @@ -17,22 +14,24 @@ The location of code execution is specified by section annotations. We can specify that a declaration is performed on the server, or on the client: -<> +<> +Or, alternatively: +<> +<> -Some constructions have a shortcut: - -<> - Finally, it's also possible to start a section for the rest of the file: <> This is equivalent to duplicating the code in a client and a server section. -==Fragments +==Client fragments A client-side expression can be included inside a server section, and the server can thereafter refer to it: an expression placed inside @@ -64,7 +66,7 @@ the server can thereafter refer to it: an expression placed inside page; but the eventual client-side value of the expression can be manipulated as a black box on the server. -<> @@ -73,7 +75,8 @@ client, but it’s possible to refer server-side to the future value of this expression (for example, put it in a list). The value of a client fragment cannot be accessed on the server. -In this case, {{{x}}} has type {{{int fragment}}}. Eliom can't always +In this case, {{{x}}} has type {{{int Eliom_client_value.t}}}. +Eliom can't always infer the type of fragments. In this case, you may annotate the type: {{{[%client ( ... : ) ]}}}. @@ -82,8 +85,8 @@ Client fragments cannot be nested. ===Shared fragments It is also possible to use shared fragments. -<> It will produce values of type