diff options
Diffstat (limited to 'lib/dispatch.ml')
| -rw-r--r-- | lib/dispatch.ml | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/dispatch.ml b/lib/dispatch.ml new file mode 100644 index 0000000..c38afe2 --- /dev/null +++ b/lib/dispatch.ml @@ -0,0 +1,6 @@ +module Make(H : S.Handler) : S.Dispatch = struct + let dispatch ~ev contents = + print_endline (Yojson.Safe.prettify contents); + Event.event_of_string ~contents ev + |> H.handle_event +end
\ No newline at end of file |