Estimated hours taken: 1
Fix a bug in the writing of .opt files.
The problem occurs when you have a pragma inline declaration for an
exported function. The declaration:
:- func addone(int) = int.
:- pragma inline(addone/1).
addone(I) = I + 1.
gets written to the .opt file as:
:- pragma inline((foo:addone)/2).
That is, the arity of the _predicate_ version is written rather than
the arity of the _function_.
compiler/intermod.m:
compiler/mercury_to_mercury.m:
Add a pred_or_func argument to mercury_output_pragma_decl,
and use that to determine the declared arity.
tests/valid/intermod_test.m:
tests/valid/intermod_test2.m:
Regression test.