Previously, since the functions were not concrete
but stubs replaced at compilation time, we had to
special the module definition to not actually include
the specs, which would become compilation errors.
Now we provide a concrete implementation of the
functions and therefore the spec will be available
in the final source. Those implementations are not
actually invoked in practice, since they are still
transformed into erlang ones for performance reasons.
Previously, 58eea96fc2 was
attempting to solve the ambiguity of records and defmodule result.
This solves the problem completely by tagging defmodule results with
the :module atom and it brings the module name back into the tuple
We avoid returning { module, binary, result } because
it can be mistakenly confused as a record named module.
Before this patch, defrecord Foo, bar: nil, baz: nil
in IEx was returning:
Foo[bar: <<binary>>, baz: nil]