Skip to content
Snippets Groups Projects
Commit 52509dd2 authored by Valentin Perrelle's avatar Valentin Perrelle Committed by David Bühler
Browse files

[Server] Syncvalues and SyncStates hooks can now accept any argument

parent d84cc575
No related branches found
No related tags found
No related merge requests found
......@@ -37,7 +37,7 @@ let install signal hook = function
in Request.on_signal signal install
let install_emit signal add_hook =
install signal (fun () -> Request.emit signal) add_hook
install signal (fun _ -> Request.emit signal) add_hook
(* -------------------------------------------------------------------------- *)
(* --- Values --- *)
......@@ -45,7 +45,7 @@ let install_emit signal add_hook =
let register_value (type a) ~package ~name ~descr
~(output : a Request.output) ~get
?(add_hook : unit callback option) ()
?(add_hook : 'b callback option) ()
=
let open Markdown in
let href = link ~name () in
......@@ -68,7 +68,7 @@ let register_value (type a) ~package ~name ~descr
let register_state (type a) ~package ~name ~descr
~(data : a data) ~get ~set
?(add_hook : unit callback option) () =
?(add_hook : 'b callback option) () =
let open Markdown in
let module D = (val data) in
let href = link ~name () in
......
......@@ -44,7 +44,7 @@ val register_value :
descr:Markdown.text ->
output:'a Request.output ->
get:(unit -> 'a) ->
?add_hook:(unit callback) ->
?add_hook:('b callback) ->
unit -> Request.signal
(** Register a (projectified) state and generates the associated signal and
......@@ -67,7 +67,7 @@ val register_state :
data:'a Data.data ->
get:(unit -> 'a) ->
set:('a -> unit) ->
?add_hook:(unit callback) ->
?add_hook:('b callback) ->
unit -> Request.signal
type 'a model (** Columns array model *)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment