Comment

Comment by edwintorok

That can be indeed very confusing when you initially learn the language. However there are 3 things that can help:

* An auto-formatter (ocamlformat integration in your editor, or ocaml-top) that shows how the actual nesting looks like

* You can add ;; at the end of a top-level function to get a syntax error at a better location

* Use the LSP integration of your editor which will show you where the error is as you type, so you catch the problem early

parent edwintorok 1 year ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton