[m-rev.] For review: ensure proper initialisation of pretty_printer
Ralph Becket
rafe at csse.unimelb.edu.au
Tue Apr 27 10:39:25 AEST 2010
Julien Fischer, Friday, 23 April 2010:
>
> On Fri, 23 Apr 2010, Ralph Becket wrote:
>> @@ -901,8 +903,13 @@
>> %
>> :- pragma foreign_decl("C",
>> "
>> - static MR_Bool pretty_printer_is_initialised = MR_FALSE;
>> - static MR_Word pretty_printer_default_formatter_map = NULL;
>> + extern MR_Bool pretty_printer_is_initialised;
>> + extern MR_Word pretty_printer_default_formatter_map;
>> +").
>> +:- pragma foreign_code("C",
>> +"
>> + MR_Bool pretty_printer_is_initialised = MR_FALSE;
>> + MR_Word pretty_printer_default_formatter_map = NULL;
>> ").
>
> You will also need to provide Erlang and Java implementations (or at the
> very least add Mercury definitions for the new foriegn_procs you have
> added, so that the java and erlang grades still compile.)
Hmm, the formatter_map type is
map(string, map(int, func(univ, list(type_desc)) = doc))
which, according to the reference manual corresponds to the Java type
Tree234<string, Tree234<int, ???>>
Alas the reference manual doesn't appear to specify how higher order
types are described in Java (at least, I can't find any mention of it).
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to: mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions: mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the reviews
mailing list