ocaml / ocaml/dune

Interface modules by Convention

Open
#6,741 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

build enhancement
Dominant language
OCaml
Stars
1.9k
Forks
500
Avg merge
15h 21m
Merged PRs (30d)
277

Description

This discussion spurred a bunch of interest in an alternative way to specify interface files for libraries and (include_subdirs qualifeid). Rather than naming the interface module after the library name or the directory it's inside, use a standard naming convention such as _module_.ml. The advantages are:

  • No confusion between Foo and Foo.Foo.
  • The ability to rename libraries and module groups without touching dune files or renaming both files and directories
  • More familiar to people coming from other languages such as python or rust.

Possible disvantage:

  • It could complicate life for merlin.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked discussion and the existing (include_subdirs qualified) behavior in Dune. Investigate how interface modules are currently named and how Merlin handles them, then determine the design needed for a convention such as _module_.ml. Done means the convention, its interaction with library and module-group renaming, and Merlin compatibility are specified and implemented.

Written by the indexing model from the issue text.

Assessment

Tech stack
ocaml
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.