[Oz] Loading modules in OPI
Peter Van Roy
pvr at info.ucl.ac.be
Fri May 5 13:29:18 CEST 2000
>
> I'm trying to load a module i downloaded from MOGUL (expat) into my
> interactive session in Emacs, but i can't seem to figure out the
> proper way to do it. evaluating a "functor" statement gives syntax
> errors, and Module.link seems the only other way to load modules but
> it doesn't work either. what am I missing?
>
> --
> Allen Short, CS Geek
There are two basic ways.
1. If you want to import a functor in another one, then do the
following:
functor
import QTk at 'http://www.info.ucl.ac.be/people/ned/qtk/QTk.ozf'
...
end
That is, the 'at URL' clause can have a URL or file name containing
the compiled functor. If you omit the 'at' clause then the system
looks in standard places.
2. If you want direct access to a module from within the Oz Emacs interface
(also known as OPI -- Oz Programming Interface) then do the following:
declare
[QTk]={Module.link ["http://www.info.ucl.ac.be/people/ned/qtk/QTk.ozf"]}
This loads the functor and installs it locally, giving access to a module.
List brackets are needed because you can load many modules in one statement.
The above examples are taken from the QTk home page at
http://www.info.ucl.ac.be/people/ned/qtk/index.html
Sincerely,
Peter
--
Peter Van Roy
Département d'Ingénierie Informatique
(Department of Computing Science and Engineering)
Université catholique de Louvain
B-1348 Louvain-la-Neuve, Belgium
Email: pvr at info.ucl.ac.be
Tel: (+32) (10) 47.83.74
Web: http://www.info.ucl.ac.be/~pvr/
Mozart: http://www.mozart-oz.org
-
Please send submissions to users at mozart-oz.org
and administriva mail to users-request at mozart-oz.org.
The Mozart Oz web site is at http://www.mozart-oz.org/.
More information about the mozart-users
mailing list