dbuenzli / down

An OCaml toplevel (REPL) upgrade
http://erratique.ch/software/down
ISC License
81 stars 3 forks source link

Library provided sessions #9

Open dbuenzli opened 5 years ago

dbuenzli commented 5 years ago

Session.of_file already allows to create a session from an arbitrary file.

We could however define a convention for library provided sessions. This could be a way for packages to provide easy access to steppable tutorials.

E.g. $(opam var share)/PKG/ocaml-session/NAME.ml would define a PKG.NAME session -- and we forbid dotted names in ~/.config/ocaml/session/ to avoid ambiguities.

These should however not interfere with the user's personal sessions. So either we should add another function to list them or an optional argument to Session.list.

dbuenzli commented 5 years ago

(editing them should also likely result in copying them to ~/.config/ocaml/session/ rather than edit the original).