You can search for identifiers within the package.
in-package search v0.2.0
val get_libname : string -> string option
Looks up a 'dune' file in the dirname of the given file, and attempts to extract the name of the (wrapped) library the module belongs to.