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

Julien Fischer jfischer at opturion.com
Wed May 12 22:36:50 AEST 2021



On Wed, 12 May 2021, Zoltan Somogyi wrote:

>
> 2021-05-12 21:58 GMT+10:00 "Julien Fischer" <jfischer at opturion.com>:
>>> 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.
>
> Ok, so then I think only one case remains in doubt in my mind.
> Can a directory contain one of the files we want if its own name does start
> with one of the prefixes we are looking for?

At the moment, no, the directory we are searching under is part of the
Mercury subdirectory hierarchy generated by the Mercury compiler itself.
In this case, specifically by the predicate get_class_dir_name/2.
Most of names of the components in that directory hierarchy are under
our control anyway (and none of them ends with '$').

Julien.


More information about the developers mailing list