Code:
module Logon = struct
type t =
{ session_id: string;
time: Time_ns.t;
user: string;
credentials: string;
}
[@@deriving fields]
end;;
let f = Logon.user;; (* added by me *)
Link: Records - Real World OCaml
When I try to compile the above, I get an error of: “Unbound value Logon.user”
project/lib/dune looks like:
(library
(name my_web)
(modes byte)
(libraries
httpaf httpaf-lwt-unix lwt lwt.unix
ppx_jane re
ppx_fields_conv
core core_unix core_unix.sys_unix
stdio base ))
What am I doing wrong ?
I’m using ocaml 5.0.0