[m-rev.] for review: remove most non-core preds from hlds_goal.m
Julien Fischer
jfischer at opturion.com
Thu Aug 21 11:58:54 AEST 2014
On Thu, 21 Aug 2014, Paul Bone wrote:
> On Wed, Aug 20, 2014 at 07:21:09PM +0200, Zoltan Somogyi wrote:
>> The idea is to two-fold: improve module cohesion, and reduce the need
>> to recompile everything that depends on hlds_goal.m (which IS almost
>> everything) when the definition of the goal type isn't what is being changed.
>>
>> Since this change just moves things around, the diff itself does not need review.
>> What I could use feedback on is (a) whether people think this is a good
>> idea, and (b) whether I should move the remaining non-core predicates,
>> such as goal_to_conj_list, to other modules, leaving JUST the definitions
>> of the types involved in goals, and the access predicates for the abstract
>> goal info type.
>>
>
> a) This seems like a good idea to me. I prefer smaller more cohesive
> modules (Yes this is hypercritical as I've not always done this myself).
> I also agree with the choices you've made of where to move code to.
>
> b) I'm mostly-indifferent about predicates such as goal_to_conj_list.
> If these predicates are seldom used then moving them makes sense.
> goal_util.m is probably a reasonable place to put these predicates.
goal_to_conj_list isn't a seldom used predicate, pretty much every
HLDS->HLDS transformation uses it.
Cheers,
Julien.
More information about the reviews
mailing list