FStarLang / FStarLang/FStar

Strengthen restrictions on module names

Open
#588 1 comment 0 reactions 0 assignees View on GitHub
component/extraction kind/discussion
Dominant language
F*
Stars
3.1k
Forks
266
Avg merge
21h 1m
Merged PRs (30d)
54

Description

https://github.com/FStarLang/FStar/issues/587#issuecomment-233537253 suggested to use `_` in module names.
However this potentially leads to conflicts with the OCaml extraction since the dot `.` turns into `_` in the OCaml module names.
If I have 2 modules "Module.Module.fst" and "Module_Module.fst" that are extracted together, one will overwrite the other.
Should the underscore be banned ?
Another solution would be to allow underscores before numbers and small caps only, but it may be a lot of trouble for not much.

Contributor guide

Open the contributing guide

Research direction

Start by examining the module-name validation and OCaml extraction behavior described in this issue, focusing on how dots and underscores are translated. Reproduce the collision between Module.Module.fst and Module_Module.fst, then determine whether the accepted naming rules prevent it and add coverage for the chosen restriction.

Written by the indexing model from the issue text.

Assessment

Tech stack
ocaml
Domain
compilers
Issue type
Bug
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.