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

Zoltan Somogyi zoltan.somogyi at runbox.com
Fri May 14 16:30:54 AEST 2021


2021-05-12 22:36 GMT+10:00 "Julien Fischer" <jfischer at opturion.com>:
>> On Wed, 12 May 2021, Zoltan Somogyi wrote:
>> 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 '$').

Actually, the question I intended to ask was "an a directory contain one
of the files we want if its own name does NOT start with one of the prefixes
we are looking for", but I think I got the info I needed from your answer anyway.

The attached diff makes module_cmds not abort if dir.m has an error on a file
that is not relevant to the question module_cmds.m is trying to answer. I expected
this to to reduce the number of test case failures in the java grade, but it does not do so.
Based on a few spot checks, test cases that used to fail due to unrelated files
not being found now fail due to the class loader not being able to find
.class files that (to my naive mind) it *should* be able to find :-(

Despite that, this diff should be a useful step forward. For review by Julien.

Zoltan.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Log.gf2
Type: application/octet-stream
Size: 1196 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/developers/attachments/20210514/3a910e23/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DIFF.gf2
Type: application/octet-stream
Size: 44197 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/developers/attachments/20210514/3a910e23/attachment-0003.obj>


More information about the developers mailing list