[m-rev.] for review: improvements to relation.m
Julien Fischer
juliensf at csse.unimelb.edu.au
Wed Sep 5 04:10:29 AEST 2007
On Wed, 5 Sep 2007, Mark Brown wrote:
> On 05-Sep-2007, Julien Fischer <juliensf at csse.unimelb.edu.au> wrote:
>>
>> On Wed, 5 Sep 2007, Mark Brown wrote:
>>
>>> Estimated hours taken: 2
>>> Branches: main
>>>
>>> Improvements to the relation module.
>>>
>>> library/relation.m:
>>> Change the type relation_key/0 to relation_key/1. The argument is
>>> a phantom type which provides some extra type safety.
>>>
>>> Document this module using more consistent terminology. In
>>> particular, for relation(T) an "element" refers to a value of
>>> type T, a "key" is of type relation_key(T), and an "edge" is an
>>> ordered pair of keys.
>>>
>>> s/remove/delete/g, for consistency with other library modules.
>>>
>>> Export a version of relation.reduced which also returns the map
>>> from relation keys to clique keys. (This is needed by G12.)
>>>
>>> Change the stability of this module to "medium", on the grounds
>>> that it's been used reasonably widely now.
>>>
>>> library/svrelation.m:
>>> compiler/dependency_graph.m:
>>> compiler/hlds_module.m:
>>> compiler/modules.m:
>>> compiler/prog_event.m:
>>> compiler/stratify.m:
>>> profiler/propagate.m:
>>> Update to make use of the new types.
>>>
>>
>> I wonder if this might not be an opportunity to swap the argument
>> orderings in relation.m around so they match those in svrelation.m.
>> (We could then delete svrelation.m.)
>
> I thought about that, but decided it was too backwards incompatible, even
> for a module that probably isn't used much and was "low" stability.
>
> I also considered changing "key" to "vertex", "element" to "value", and
> changing the module name to directed_graph or dgraph (I prefer the latter).
I prefer the name digraph.
> Then we could just leave relation.m and svrelation.m in for a release,
> and then remove them.
>
> Perhaps I should do this instead?
That's fine with me.
Julien.
--------------------------------------------------------------------------
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