Reason
Quick StartTryGuideAPICommunityBlogGitHub

Standard Library

Below is the API for the OCaml standard library. It's directly copied over from the OCaml Manual, formatted to the Reason syntax and styled accordingly. The API docs are work-in-progress; we'll be polishing these gradually!

If you're targeting JavaScript, the API docs for BuckleScript includes all of below, plus JS-specific APIs.

Index of exceptions


B
Bad [Arg]
Functions in spec or anon_fun can raise Arg.Bad with an error message to reject invalid arguments.
Break [Sys]
Exception raised on interactive interrupt if Sys.catch_break is on.

E
Empty [Stack]
Raised when Stack.pop or Stack.top is applied to an empty stack.
Empty [Queue]
Raised when Queue.take or Queue.peek is applied to an empty queue.
Error [Syntaxerr]
Error [Location]
Error [Lexer]
Error [Stream]
Raised by parsers when the first component of a stream pattern is accepted, but one of the following components is rejected.
Escape_error [Syntaxerr]
Exit [Pervasives]
The Exit exception is not raised by any library function.

F
Failure [Stream]
Raised by parsers when none of the first components of the stream patterns is accepted.

H
Help [Arg]
Raised by Arg.parse_argv when the user asks for help.

P
Parse_error [Parsing]
Raised when a parser encounters a syntax error.

S
Scan_failure [Scanf]
The exception that formatted input functions raise when the input cannot be read according to the given format.

U
Undefined [Lazy]
Undefined [CamlinternalLazy]
Unix_error [Unix]
Raised by the system calls below when an error is encountered.