I am running into an error that I do not know how to resolve. I have the following code (from the Eliom Graffiti tutorial) which I am trying to test with make test.byte.
open Eliom_content.Html5.D
module My_app =
Eliom_registration.App (struct
let application_name = "graffiti"
end)
let main_service =
Eliom_registration.Html5.register_service
~path:[""]
~get_params:Eliom_parameter.unit
(fun () () ->
Lwt.return
(html
(head (title (pcdata "Graffiti")) [])
(body [h1 [pcdata "Graffiti"]])))
{client{
let _ = Eliom_lib.alert "Hello!"
}}
Error:
$ make test.byte
eliomc -c graffiti.ml
File "graffiti.ml", line 18, characters 0-1:
Parse error: [label_expr_list] or [expr level .] expected after "{" (in [expr])
Error while running external preprocessor
line 18 is where {client{ appears
The graffiti.ml should be named graffiti.eliom, AFAIK.
~path[""] seems to be missing a : at least
(I caught this by just pasting your code into Emacs; the syntax highlighting showed it.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With