We are also allowed to write lib interface files at each level.
  $ dune build
  defined in lib interface file
  hello from baz

  $ find _build -iname "*.cmi" | sort
  _build/default/exe/.test.eobjs/byte/dune__exe__Test.cmi
  _build/default/lib/.foolib.objs/byte/foolib.cmi
  _build/default/lib/.foolib.objs/byte/foolib__.cmi
  _build/default/lib/.foolib.objs/byte/foolib__Bar.cmi
  _build/default/lib/.foolib.objs/byte/foolib__Bar__.cmi
  _build/default/lib/.foolib.objs/byte/foolib__Bar__Baz.cmi
  _build/default/lib/.foolib.objs/byte/foolib__Private.cmi

  $ find _build -iname "*.ml-gen" | sort | while read file; do echo "contents of $file"; cat $file; echo "--------"; done;
  contents of _build/default/lib/foolib__.ml-gen
  (* generated by dune *)
  
  (** @canonical Foolib.Bar *)
  module Bar = Foolib__Bar
  
  (** @canonical Foolib.Private *)
  module Private = Foolib__Private
  
  module Foolib__ = struct end
  [@@deprecated "this module is shadowed"]
  --------
  contents of _build/default/lib/foolib__Bar__.ml-gen
  (* generated by dune *)
  
  (** @canonical Foolib.Bar.Baz *)
  module Baz = Foolib__Bar__Baz
  
  module Foolib__Bar__ = struct end
  [@@deprecated "this module is shadowed"]
  --------
