[m-dev.] Patch: Tcl/Tk interface without '%' prompt

Jörg Roman Rudnick joerg.rudnick at t-online.de
Thu Jan 18 10:32:49 AEDT 2007


>
> The usual technique is to create a package, say mercury_tcltk, and
> the overall library will named that.  By wrapper libraries above
> you are presumably referring to the actual module names?
Creating libraries is fortunately understood, if you don not count 
finesses...

A question I am currenty busy with are configurations, especially cget: 
At the moment I did not make too many changes at the config 
representation, and I wish to find a way to get this done at state of 
art of the mode system.

As the type mtk.config representats a key by the functor name and the 
value by the contents of the functor, I would like to ask, whether a 
mode arrangement is possible which can do a request with a single 
mtk.config variable, e.g.,


:- type conf --->
    height(int);
    width(int);
    title(string).

:-inst measure --->
    height(ground);
    width(ground).

%%  one arg query:
:-pred isHeight(int::out) is nondet.
isHeight(H) :-
	isMeasure(height(H)).

:-pred isHeight(int::out) is nondet.
isMeasure(Conf) :-
	Conf = height(10).
isMeasure(Conf) :-
	Conf = width(4).


Such simple examples work fine - is it possible to achieve this with I/O 
predicates, `det' determinism, i.e. everything required for Tk 
configuration management, too? Or would you rather advise me to save my 
time and begin coding straightforwardly? Maybe you even have a different 
proposal?


Seeing forward to settling this issue and beginning to put all together,

          Nick



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurylang.org/archives/developers/attachments/20070118/54192373/attachment.html>


More information about the developers mailing list