Hugs on Mac with CW6 ? ... and Haskell Graphics Lib?

Hans Aberg haberg@matematik.su.se
Sat, 9 Dec 2000 12:22:56 +0100


At 11:54 -0700 0-12-08, Alastair Reid wrote:
>> By contrast DLL under MacOS X seems to be automatic -- one simply requests
>> the functions in the source code just as any statically linked function,
>> and the OS loads them "lazily" at need when required. So, by contrast,
>> anything that can be done with DLL seems to be recommended under MacOS X.
>
>This isn't quite what Hugs needs.
>Hugs needs functionality equivalent to dl_open on unix.
>>From memory and with some simplification:
>
>  handle dl_open(char*) loads a shared library file
>  dl_lookup(handle,char*) looks up a name in a loaded shared library
>  dl_close(handle) closes a shared library
>
>Loading has to be explicit because it is done in response to the Hugs user
>loading a Haskell file that requires a shared library.

The document
  http://developer.apple.com/techpubs/macosx/SystemOverview/SystemOverview.pdf
page 109-110 describes this automatic loading.

One might surmise that explicit loading of libraries & names is also
available, but it is not described there. -- I think that the calle them
"plug-ins", and can be loaded at any time, loc. cit. p. 22, even though it
is not described how that is done there. It is said on p 182 that MacOS X
has a dyld, dynamic link editor, a library manager for processes based on
Mach-O object files, so it should somehow be possible.


  Hans Aberg