Eliom error: {client {}}

I ran into an error that I don't know how to solve. I have the following code (from the Eliom Graffiti tutorial) which I am trying to test using 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!"
}}

      

Mistake:

$ 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 it {client{

appears

+3


source to share


2 answers


graffiti.ml

should be called graffiti.eliom

, AFAIK.



+2


source


~path[""]

seems to be missing :

no less



(I figured it out by just pasting the code into Emacs, the syntax highlighting showed it.)

+1


source







All Articles