Getting Started in OCaml Notes

Hi! I’ve been getting going in OCaml over the last couple weeks and wrote down my very basic notes, more about the ecosystem and learning resources than the language itself. It might seem obvious once you’re deep in OCaml, but it actually was kind of confusing figuring out even the simplest lay of the land. This is kind of a silly soft question, but any suggestions for other tools, libraries, learning resources, things that t would be nice to know about?


  • Phil
1 Like

Hi Phil

Have you found Ocamlverse? We’d also love to have contributions.

Oh wow. I was a little embarrassed to ask but now I’m glad I did. This is a great resource that I missed somehow. Thanks!

I would suggest against having multiple stanzas (executable, library etc) in your dune file, since then you need to maintain the module set (instead of dune just finding everything in the folder) and the fact that you can’t generate accurate .merlin files (since you can only have one per forlder, so should it include the libraries from main? lambda? Both?)

Also, I wonder if there is any case where you actually need to load topfind in utop? I haven’t had to do this ever in utop (in the toplevel, yes, in utop no).

Interesting, thanks. That sounds like good advice.

I’m not sure about the topfind thing. I do feel like I’ve been at the point where I’m thrashing around trying to get ocaml to find libraries a couple of times and it has come up in suggestions, but you are correct. When I bring up utop now I don’t need it.