[m-rev.] for review: allow foreign types to be Java numeric primitive types

Peter Wang novalazy at gmail.com
Tue Apr 12 13:30:40 AEST 2016


On Tue, 12 Apr 2016 11:35:07 +1000 (AEST), Julien Fischer <jfischer at opturion.com> wrote:
> 
> For review by anyone.
> 
> Question: the remaining Java primitive types (bool and char) are not 
> supported by this change and I can't really see a need for them.  In
> the interests of completness should was also support them?

Might as well.  array.m already handles boolean and char.

> +:- pred java_primitive_foreign_language_type(foreign_language_type::in, string::out,
> +    string::out, string::out) is semidet.
> +
> +java_primitive_foreign_language_type(ForeignLangType, PrimitiveType,
> +        BoxedType, UnboxMethod) :-
> +    require_complete_switch [ForeignLangType] (
> +        ForeignLangType = java(java_type(JavaForeignType))

Write ( on a new line.

The rest looks fine.

Peter


More information about the reviews mailing list