Using mercury_tcltk is not all that different to using Tcl/Tk itself,
except that all operations are done in Mercury instead of Tcl.
See the samples for example code, and the interfaces of
`mtk.m' and `mtcltk.m'. Note that we don't consider these modules
fully documented in any way, but if you know Tcl/Tk, you shouldn't
have any problems.

You may need to add some information to your Mmakefile to tell mmake where
the mercury_tcltk library is, and to link with the mercury_tcltk, tcl,
tk and X libraries.

The following is an example. You may need to change the `tk8.0' and
`tcl8.0' if you are using a different version of Tcl/Tk, and don't
forget to change `some/directory' to the directory where this package
is installed.

	TCLTK_MLLIBS  = -ltk8.0 -ltcl8.0 -L/usr/X11R6/lib -lX11 -lXmu \
				-lXext -lm -ldl

	# Specify the location of the `mercury_tcltk' package.
	MERCURY_TCLTK_DIR  = some/directory/mercury_tcltk

	# Tell mmake to use the `mercury_tcltk' library.
	VPATH           = $(MERCURY_TCLTK_DIR):$(MMAKE_VPATH)
	MCFLAGS         = -I$(MERCURY_TCLTK_DIR) $(EXTRA_MCFLAGS)
	MLFLAGS         = -R$(MERCURY_TCLTK_DIR) $(EXTRA_MLFLAGS) \
			  -L$(MERCURY_TCLTK_DIR) 
	MLLIBS          = -lmercury_tcltk $(TCLTK_MLLIBS) $(EXTRA_MLLIBS)
	C2INITFLAGS     = $(MERCURY_TCLTK_DIR)/mercury_tcltk.init 

You can then use EXTRA_MCFLAGS, EXTRA_MLFLAGS, etc to set any other
options you need.

../samples/calc contains an example program.

The Mercury Tcl/Tk binding will work only with a version of the garbage
collector which has recognition of interior pointers enabled.  This is the
default.  If you compiled the garbage collector without interior pointer
recognition, then you must set the GC_ALL_INTERIOR_POINTERS environment
variable before running your program.  If you have not changed any of the
garbage collectors default settings then you should not have to do anything.
