Peter Amstutz wrote:
> [...] I've fooled around a bit in Haskell and was a bit
> disconcerted by it's lack of syntactic sugar to indicate structure
> (the lack of semicolons to end expressions for example :)

Strange, for me it was exactly the other way round when I first
used ML...   ;-)

> [...] I want to be able to dynamically link in C libraries to to
> intersting things from ML or Haskell just as easily as I could from
> C/C++.

I don't know exactly what you mean by "dynamically":

   * Loading a *.so/*.dll in the middle of the execution (e.g.
     Quake 2's ability to switch the renderer during runtime; well,
     Quake 2 is not written in Haskell, but that is probably only
     because John Carmack didn't know our beloved language then :-)

   * Tell the compiler to import things from libraries which are
     either statically linked into the executable or loaded at
     program load time.

GHC currently supports the latter, but I don't know about future plans
for the former.

> [...] The OpenGL wrapper for ghc to access Mesa with which a Quake
> model and bsp viewer was written is quite convincing that it works :)

That's exactly what it is intended for: The first "killer" application
of the FFI...  ;-)

> [...] I'm compiling on Linux/i586 2.2.9, GCC 2.8.1, libc5.4.44 with
> binary compatibility with libc6 (so I am able to run the ghc 4.02
> binary libc6 distribution, but the compiler I am building will end
> up linked against libc5)

We had a similar setup here temporarily and it was a *real* pain, not
only for GHC. Switching to a true libc6 system with libc5 backwards
compatibility should be the way to go nowadays.

> Here is the relevant error output: [...]

That was a typo in PprCore.lhs which has already been fixed.

I suggest that you use

   ftp://ftp.informatik.uni-muenchen.de/pub/local/pms/ghc-4.03-43.i386.rpm

and compile some simple programs with it first. Check them with ldd to
make sure that they *only* load libc.so.6 and not libc.so.5 in addition.
If things go wrong here, go straight to your sysadmin and tell him/her
to upgrade...   :-}

Cheers,
   Sven
-- 
Sven Panne                                        Tel.: +49/89/2178-2235
LMU, Institut fuer Informatik                     FAX : +49/89/2178-2211
LFE Programmier- und Modellierungssprachen              Oettingenstr. 67
mailto:[EMAIL PROTECTED]            D-80538 Muenchen
http://www.informatik.uni-muenchen.de/~Sven.Panne

Reply via email to