> Perhaps the Hugs authors can introduce a "foreign function
> binary interface version number" that changes if and only if the binary
> interface changes (like the soname of a shared library does); then we
> could use this version to handle incompatible .so's in the perl manner.

[I love these easy to answer requests.]

The Hugs FFI already has a version number and it was indeed bumped the
last time the binary interface changed.  If you look inside files
generated by GreenCard, you'll find a line that looks something like:

  __Hugs_needs_blah 2

which tells Hugs to go looking for a dynamic library (.so, .dll,
whatever) in the same directory as the Haskell code.  The number is
the version number of the binary interface and is used to select which
vtabe is handed to the dynamic library (and possibly how to call the
initialisation function - I forget the details).

[Your message also talks about putting version numbers in directory
names.  There's some kind of overlap there with how we typically
install multiple versions of Hugs -by loading Hugs via a shell script
which sets the search path appropriately- but I think I'm missing
something (like a good strong cup of coffee to get my brain working).]


Alastair Reid

Reply via email to