This function checks all the forms in a module for errors.
It returns:

{ok,Warnings}

There were no errors in the module.

{error,Errors,Warnings}

There were errors in the module.

Since this module is of interest only to the maintainers of
the compiler, and to avoid having the same description in
two places to avoid the usual maintenance nightmare, the
elements of Options that control the warnings are
only described in compile(3).

The AbsForms of a module which comes from a file
that is read through epp, the Erlang pre-processor,
can come from many files. This means that any references to
errors must include the file name (see epp(3), or parser erl_parse(3)).
The warnings and errors returned have the following format:

[{FileName2,[ErrorInfo]}]

The errors and warnings are listed in the order in which
they are encountered in the forms. This means that the
errors from one file may be split into different entries in
the list of errors.