Commit 9e4ff654 authored by Stephane Glondu's avatar Stephane Glondu
Browse files

Port to Eliom 4.2 stack

parent 40c11088
...@@ -86,13 +86,13 @@ echo "=-=-= Initialization of OPAM root =-=-=" ...@@ -86,13 +86,13 @@ echo "=-=-= Initialization of OPAM root =-=-="
echo echo
opam init --no-setup opam init --no-setup
eval `opam config env` eval `opam config env`
opam switch 4.01.0 opam switch 4.02.3
eval `opam config env` eval `opam config env`
echo echo
echo "=-=-= Installation of Belenios build-dependencies =-=-=" echo "=-=-= Installation of Belenios build-dependencies =-=-="
echo echo
opam install --yes atdgen=1.3.1 zarith=1.3 cryptokit=1.10 uuidm=0.9.5 calendar cmdliner=0.9.7 eliom=4.0.0 csv=1.3.3 opam install --yes atdgen zarith cryptokit uuidm calendar cmdliner sqlite3 eliom=4.2.0 csv
echo echo
echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=" echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-="
......
...@@ -122,7 +122,7 @@ lwt () = ...@@ -122,7 +122,7 @@ lwt () =
Lwt_list.iter_s (fun f -> Lwt_list.iter_s (fun f ->
match_lwt Web_site.import_election f with match_lwt Web_site.import_election f with
| None -> | None ->
Ocsigen_messages.debug (fun () -> Ocsigen_messages.console (fun () ->
Printf.sprintf "Ignored: %s" f.f_election Printf.sprintf "Ignored: %s" f.f_election
); return () ); return ()
| Some w -> | Some w ->
......
...@@ -37,9 +37,9 @@ module type AUTH_LINKS = sig ...@@ -37,9 +37,9 @@ module type AUTH_LINKS = sig
val login : val login :
string option -> string option ->
(unit, unit, (unit, unit,
[> `Attached of [< Eliom_service.service_method > `Get ],
([> `Internal of [> `Service ] ], [> `Get ]) [< Eliom_service.attached > `Attached ],
Eliom_service.a_s ], [< Eliom_service.service_kind > `Service ],
[ `WithoutSuffix ], unit, unit, [ `WithoutSuffix ], unit, unit,
[< Eliom_service.registrable > `Unregistrable ], [< Eliom_service.registrable > `Unregistrable ],
[> Eliom_service.http_service ]) [> Eliom_service.http_service ])
...@@ -47,9 +47,9 @@ module type AUTH_LINKS = sig ...@@ -47,9 +47,9 @@ module type AUTH_LINKS = sig
val logout : val logout :
(unit, unit, (unit, unit,
[> `Attached of [< Eliom_service.service_method > `Get ],
([> `Internal of [> `Service ] ], [> `Get ]) [< Eliom_service.attached > `Attached ],
Eliom_service.a_s ], [< Eliom_service.service_kind > `Service ],
[ `WithoutSuffix ], unit, unit, [ `WithoutSuffix ], unit, unit,
[< Eliom_service.registrable > `Unregistrable ], [< Eliom_service.registrable > `Unregistrable ],
[> Eliom_service.http_service ]) [> Eliom_service.http_service ])
......
...@@ -218,7 +218,7 @@ let import_election f = ...@@ -218,7 +218,7 @@ let import_election f =
Web_persist.set_auth_config uuid auth_config Web_persist.set_auth_config uuid auth_config
in in
let () = let () =
Ocsigen_messages.debug (fun () -> Ocsigen_messages.console (fun () ->
Printf.sprintf "Injecting credentials for %s" uuid Printf.sprintf "Injecting credentials for %s" uuid
) )
in in
......
...@@ -45,7 +45,7 @@ let configure x = ...@@ -45,7 +45,7 @@ let configure x =
(match auth_config with (match auth_config with
| [] -> () | [] -> ()
| ["db", file] -> | ["db", file] ->
Ocsigen_messages.debug (fun () -> Ocsigen_messages.console (fun () ->
Printf.sprintf "Loading passwords from file %s" file Printf.sprintf "Loading passwords from file %s" file
); );
let db = Csv.load file in let db = Csv.load file in
......
...@@ -637,8 +637,7 @@ let election_setup_voters uuid se () = ...@@ -637,8 +637,7 @@ let election_setup_voters uuid se () =
[th [pcdata "Identity"]] @ [th [pcdata "Identity"]] @
(if has_passwords then [th [pcdata "Password"]] else []) @ (if has_passwords then [th [pcdata "Password"]] else []) @
[th [pcdata "Remove"]] [th [pcdata "Remove"]]
)) ) :: voters)
voters
in in
let back = div [ let back = div [
a ~service:Web_services.election_setup [pcdata "Return to setup page"] uuid; a ~service:Web_services.election_setup [pcdata "Return to setup page"] uuid;
...@@ -917,7 +916,7 @@ let election_home w state () = ...@@ -917,7 +916,7 @@ let election_home w state () =
let answers = let answers =
match answers with match answers with
| [] -> pcdata "" | [] -> pcdata ""
| x :: xs -> table x xs | x :: xs -> table (x :: xs)
in in
li [ li [
pcdata x.q_question; pcdata x.q_question;
...@@ -1034,8 +1033,7 @@ let election_admin w state () = ...@@ -1034,8 +1033,7 @@ let election_admin w state () =
(tr [ (tr [
td [pcdata "Trustee link"]; td [pcdata "Trustee link"];
td [pcdata "Done?"]; td [pcdata "Done?"];
]) ] :: trustees)
trustees
]; ];
release_form; release_form;
] ]
......
...@@ -54,6 +54,7 @@ val already_logged_in : ...@@ -54,6 +54,7 @@ val already_logged_in :
val login_choose : val login_choose :
string list -> string list ->
(string -> (unit, unit, [< Eliom_service.get_service_kind ], (string -> (unit, unit, [< Eliom_service.get_service_kind ],
[< Eliom_service.attached ], [< Eliom_service.service_kind ],
[< Eliom_service.suff ], 'a, unit, [< Eliom_service.suff ], 'a, unit,
[< Eliom_service.registrable ], [< Eliom_service.registrable ],
[< Eliom_service.non_ocaml_service ]) [< Eliom_service.non_ocaml_service ])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment