eliom icon indicating copy to clipboard operation
eliom copied to clipboard

Eliom_content.Html.F, error with example project

Open jteg68 opened this issue 11 months ago • 0 comments

https://ocsigen.org/tuto/latest/manual/basics-server#h5o-5

The example Eliom: typing page parameters gets some error when implementing as in the page.

File "bin/main.ml", line 16, characters 59-60:

16 |                           (body [h1  [txt (s^string_of_int i)]]))
                                                                ^
Error: This expression has type
         ([< Html_types.i_attrib ] as 'a,
          [< Html_types.i_content_fun ] as 'b, [> Html_types.i ] as 'c)
         star = ?a:'a attrib list -> 'b elt list -> 'c elt
       but an expression was expected of type int

Moving the s^string_of_int i to a temporary variable the error goes away.

ocamlc 5.2.0 eliom 11.1.0 both recently installed via opam

jteg68 avatar Nov 19 '24 16:11 jteg68