I note that #require
, which is pretty important when you’re using the top level, is undocumented in ocaml and utop’s internal help. Is this intentional?
That’s probably because it is not provided by the toplevel itself, but by ocamlfind. You have to do #use "topfind"
to get it.
utop
doesn’t require that. (I have to confess I’ve never used the “real” ocaml top level, only utop
, since it has such nice features.) Regardless, though, a user is unlikely to know about how to use this facility without documentation regardless of where it originates. I’m not sure what the right answer is, though.
Then I think in the case of utop
it would make sense to document it, yes. Send a PR etc etc you know the drill :).
I have commit access, I could just add the documentation, but unfortunately as it stands utop
just points the user at the ocaml
toplevel documentation. That said, it would probably be a good idea for it to get its own.
What do users of the “normal” toplevel do to learn about things like this btw? (Or are there so few that it doesn’t matter?)
I’ve added this issue to track documenting utop
better: https://github.com/ocaml-community/utop/issues/260