-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document exceptions #7
Comments
I agree re: documenting exceptions, it would be nice if someone took the time to go through and document these.
Re: Installation:
List of files installed by the opam package:
|
These are used by merlin for |
compile with -bin_annot to support merlin (fixes #7)
To come back on the result type VS exception debate, my reasons are simple: OCaml is not Haskell, and that's for the best. Monads and that kind of stuff may look cool, but they lead to a code that can be really hard to apprehend (for most people). Moreover, there is absolutely nothing wrong about using exceptions in exceptional situations! Especially in high-level libraries like imagelib. And as mentioned above, it is always possible to write wrapper functions if you prefer result type, but I'm not sure that we should include these in the library. For the documentation issue, I'll do my best to update the documentation, but I'm going to be very busy in the next few weeks. |
The exceptions that are raised should be documented, in particular what happens when an invalid image file is loaded and when
Image.read_rgb
is used with invalid bounds.result
-returning variants would also be nice.Also, the library should build and install
mli
,cmt
,cmti
andcmx
files, so that documentation can be viewed by tools like merlin, ocp-browser, odig, etc.The text was updated successfully, but these errors were encountered: