[m-dev.] proposed breakup of std_util.m

Julien Fischer juliensf at cs.mu.OZ.AU
Wed Mar 22 17:50:05 AEDT 2006


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.
--------------------------------------------------------------------------
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