Skip to content

Commit 2df8425

Browse files
committed
Manifest design of the Standard Library in its README
1 parent 272b273 commit 2df8425

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

lib/README.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,16 @@ reviewed rigorously rather than depend on the monitor.
2121
To compile a module as part of the standard library, add it to the list of files in the `lib`
2222
target of the *makefile*.
2323

24+
## Design Principles
25+
26+
- File names are written in `CamelCase`. This makes them conform to the Standard ML Basis Library.
27+
- Each module exports a single *record* with the same name as the file. This (1) makes it closer to
28+
the SML module system and (2) allows for name resolution, e.g. `HashMap.findOpt` and
29+
`ListPair.findOpt` can be used in the same file.
30+
- Each function that is exported has to be documented (`(** <text> *)`). In the long run, we will
31+
auto-generate documentation for the Standard Library.
32+
2433
## TODO
2534

26-
- To conform with the Standard ML Basis Library, we should have the files conform to a `CamelCase`
27-
style.
28-
- To fake namespaced import, e.g. `List.length`, the library should export a struct instead. Only
29-
certain functions should "pollute" the global namespace.
30-
- Quite a lot of the standard library is not documented in any way. What is the purpose of each
31-
function and each module? The [modules](#modules) above are the ones that have been updated and
32-
documented.
33-
- There are a lot of things in here - some of it dead. Can we merge/remove some things?
35+
The [modules](#modules) mentioned above already follow the [design principles](#design-principles).
36+
The remaining files either need to be updated or to be removed.

0 commit comments

Comments
 (0)