[m-dev.] foldl2 and recursive_fold2 in dir.m have the wrong result type

Julien Fischer jfischer at opturion.com
Wed May 12 21:58:50 AEST 2021


On Wed, 12 May 2021, Zoltan Somogyi wrote:

> 2021-05-12 21:36 GMT+10:00 "Julien Fischer" <jfischer at opturion.com>:
>> It doesn't.  For each program, the Mercury compiler knows what all of
>> the top-level class files will be called.  For each top-level class,
>> Foo, we know that any other classes related to that class (e.g. nested
>> classes etc) will have a class file name beginning with the prefix Foo$.
>> The Mercury compiler constructs the set of such prefixes and then includes
>> all files beginning with those prefixes in the JAR.
>
> So, basically what we want is NOT "the full list of files in this directory", but
> "the full list of files in this directory whose name starts with one of this list
> of prefixes".

Yes.

> That means that errors when opening files whose names do NOT start
> with such a prefix should NOT be considered errors.

I think that's correct.

Julien.


More information about the developers mailing list