[m-dev.] IL standard library problems

Jonathan Morgan jonmmorgan at gmail.com
Wed Nov 7 17:18:32 AEDT 2007


On Nov 7, 2007 4:42 PM, Julien Fischer <juliensf at csse.unimelb.edu.au> wrote:
> On Wed, 7 Nov 2007, Jonathan Morgan wrote:
> > I have been trying to build the standard library in the IL grade
> > again.  A few problems that I found:
> >
> > 1. There was a warning that variables weren't referenced for io.do_make_temp/3.
>
> A warning from what?  mmc, gcc ...?

Sorry, that wasn't clear at all.  It was due to variables not being
used in the foreign code, as the error below shows.  Easy to fix, but
does halt the compilation of the standard library.

io.m:9915: In the C# code for predicate `io.do_make_temp'/8:
io.m:9915:   warning: variables `Dir, Prefix' do not occur in the C# code.

> > 2. Building the new pretty printer fails, because IL does not support
> > mutable variables.  Is it necessary to support the new pretty printer
> > for anything?
>
> The debugger uses it, but that doesn't work with the IL backend anyway.

Should it be not included at all for grades without mutables, or
should I just ignore this and fix the mutable problem when I have
time?

> > 3. There is no foreign type for region_builtin.region/0.  I would have
> > thought that this should not be a problem, since region_builtin should
> > never be imported unless RBMM is in use (I suppose the library module
> > may have to be compiled anyway).
>
> The module needs to compile.  It should be sufficient to add a Mercury
> definition for the non-C backends though, e.g. :- type region ---> region.

Yes.  I'll look at how the other such modules do it and replicate.

Jon
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at csse.unimelb.edu.au
Administrative Queries: owner-mercury-developers at csse.unimelb.edu.au
Subscriptions:          mercury-developers-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the developers mailing list