[m-dev.] proposed breakup of std_util.m
Ian MacLarty
maclarty at cs.mu.OZ.AU
Thu Mar 23 06:01:27 AEDT 2006
On 3/22/06, Julien Fischer <juliensf at cs.mu.oz.au> wrote:
>
> This is a call for opinions on:
>
> (a) if std_util should be broken up at all
> (b) if the scheme outlined below is acceptable
> (c) how we should manage the transitition the new modules
>
> Julien.
>
> Here is a proposed breakup of the module std_util (as discussed in person a
> week or so ago in the Mercury office).
>
> * Move solutions/2 and friends into a new module, solutions.m.
> We can leave (obsolete) forwarding predicates in place in std_util for
> the 0.13 release and delete them later that.
>
> * Move semidet_succeed/0, semidet_fail/0, cc_multi_equal/2 and dynamic_cast/2
> into builtin.m. They're arguably more useful there than in std_util.m.
>
> These first two changes can be made with minimal impact on backwards
> compatibility, so I would argue for including them in the 0.13 release.
>
> * Move the univ type and supporting procedures to univ.m.
> * Move the maybe type and supporting procedures to maybe.m.
> * Move the pair type and supporting procedures to pair.m.
>
> I don't think there's a nice way of moving to these versions. Leaving
> forwarding types and predicates in std_util would result in an excessive
> module qualification in modules that imported both std_util and the new
> module.
>
> That leaves std_util.m with:
>
> * the unit type.
> * generic higher-order operations like compose and converse.
If this is all that's left then perhaps 'misc' would be a better name
than 'std_util' :-) Perhaps these predicates should also be moved to
their own modules?
I'm not opposed to the proposed changes, but I do feel we should,
where possible, first pragma obsolete predicates we intend to remove
for one numbered release and then remove them in the following
release, not just suddenly remove them.
If you move what's left in std_util to new modules too then you can
leave (pragma obsoleted) forwarding predicates in std_util and users
won't have ambiguity problems as long as they either use std_util or
the new modules.
Ian.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list