let module_name_of_pathname x =
  module_name_of_filename (Pathname.to_string (Pathname.basename x))