4
votes

What does @compile module attribute do? As in:

@compile {:inline, some_function: 2}

I tried to google something and find something but didn't find anything informative ...

1

1 Answers

6
votes

From the docs:

@compile

Defines options for module compilation that are passed to the Erlang compiler.

Accepts an atom, a tuple, or a list of atoms and tuples.

For the list of supported options, see Erlang’s :compile module.

Several uses of @compile will accumulate instead of overriding previous ones.