1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
module Class = struct
type t =
| Touchpad
| Mouse
let to_string = function
| Touchpad -> "touchpad"
| Mouse -> "mouse"
;;
end
module Role = struct
type t =
| Keyboard [@name "keyboard"]
| Mouse [@name "mouse"]
| Touchpad [@name "touchpad"]
| Touch [@name "touch"]
| Tablet [@name "tablet"]
[@@deriving yojson]
let to_string = function
| Keyboard -> "keyboard"
| Mouse -> "mouse"
| Touchpad -> "touchpad"
| Touch -> "touch"
| Tablet -> "tablet"
;;
end