Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eliom_content.Html.F, error with example project #807

Open
jteg68 opened this issue Nov 19, 2024 · 0 comments
Open

Eliom_content.Html.F, error with example project #807

jteg68 opened this issue Nov 19, 2024 · 0 comments

Comments

@jteg68
Copy link

jteg68 commented Nov 19, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant