Hi -
So it looks like OCaml/ReasonML won’t let your define records with duplicate field names. A workaround seems to be defining each record as part of a different module.
How do I then define a variant type with these records?
module Log_entry = {
type t = {
session_id: string,
important: bool,
message: string,
};
};
module Heartbeat = {
type t = {
session_id: string,
status_message: string,
};
};
module Logon = {
type t = {
session_id: string,
user: string,
credentials: string,
};
};
type x =
| Logon.t
| Heartbeat.t
| Logon.t;
type x
complains that statements must end with a semicolon.
Appreciate any response.
Thanks
Kesava