Acessing functions/values from a module in ocsigen/eliom

Stuck with modules in eliom file

In main eliom/ocsigen directory file demo_nce.eliom has


(* This file was generated by Ocsigen Start.
   Feel free to use it, modify it, and redistribute it as you wish. *)
(* Os_current_user demo *)
 open Eliom_content.Html.F ]

[%%server open Xtra.Xstring ]

where Xtra module is present in “comp” directory that is referred in dune as per following fragment


(dirs tools client assets comp)
(executables
    (names newocs)
    (modes (byte plugin) (native plugin))
    (libraries eliom.server ocsigen-start.server ocsipersist.pgsql xtra)
    (preprocess

The file comp/xstring.ml looks like this


let hidden = "String value in module"

module Xstring : sig
  val hidden : string
end = struct
  let hidden = hidden
end

My requirement is to display the value of “hidden” on my page (demo_nce.eliom)


let%server hidden_text = function 
  | _ ->     let hid_t = Xstring.hidden in
             code [em [txt ( hid_t ) ]]

I get errors like unbound module or value with all combinations I could think of like

Xtra.Xstring.hidden
hidden
XString.hidden

What is the way to get this to show up on a page written in eliom

Splitting the app into libraries is also something I’ve struggled with in the past. Can you post the link to your code ?