[eclipse-users] passing predicate names

From: Malcolm Ryan <malcolmr_at_...25...>
Date: Wed, 12 Sep 2007 18:34:05 +1000
In many places in my code I have lines that look like:

(ground(Var) ->
	true
;
	suspend(Pred, Priority, Var->Event, Susp)
)

I'd like to factor this out into a new predicate:

suspend_if_var(Pred, Priority, Var, Event, Susp).

but If I put this in a different module (a library of utilites I  
share across my modules) then there are problems with knowing what  
module 'Pred' comes from. Is there any easy way to make sure that  
Pred contains the appropriate module information *without* having to  
write it in of every call? So I can do:

suspend_if_var(predicate, ...)

and not

suspend_if_var(current_module:predicate, ...)

Malcolm
	
--
      "The act of defending any of the cardinal virtues has today all
       the exhilaration of a vice."
                                     - G.K.Chesterton A Defense of  
Humility
Received on Wed Sep 12 2007 - 09:35:44 CEST

This archive was generated by hypermail 2.3.0 : Wed Sep 25 2024 - 15:13:20 CEST