[m-dev.] Tabling [1/3]

Andrew Bromage bromage at cs.mu.OZ.AU
Tue Mar 10 15:55:24 AEDT 1998


G'day.

Oliver Hutchison wrote:

> > > compiler/modes.m:
> > > 	Make sure that all procedures with non normal evaluation have 
> > > 	no unique/partially instantiated modes. Produce error messages 
> > > 	if they do.

[...]

> Does it make sense to memo a predicate with unique modes?

It could make sense to memo a predicate with a 'ui' mode.

<<
:- pred array_rtc(array(T) :: array_ui, T :: in, T :: out) is multi.

array_rtc(Array, From, From).
array_rtc(Array, From, To) :-
	array__semidet_lookup(Array, From, Mid),
	array_rtc(Array, Mid, To).
>>

Cheers,
Andrew Bromage



More information about the developers mailing list