[ moved to glasgow-haskell-users from haskell ... ]
Simon Marlow:
> > [...] What you're really saying is: "if the libraries that you
> > compiled your program against change, you have to recompile your
> > program." Not doing this is dodgy at best, even for C.
Sven Panne:
> Huh? Doing this perfectly fine, see Giuliano's mail.
Let me elaborate: you can't link your program against a different version of
the libraries than the ones it was originally compiled against, and expect
it to work. That's why shared library major/minor versions exist, for one
thing. A minor version change is supposed to be backwards compatible, but
not a major version change.
In GHC, we simply don't do this kind of versioning, although we could. It
should be the case that, for a new version of a library:
- if new version of the library only adds types and functions
w.r.t. the old library interface, *and*
- the locations of the exported functions/types remained the same
(i.e. the module names in the library didn't change, and
functions/types weren't moved from module to module), *and*
- your program and the library were compiled with the same
compiler, *and*
- your program (or the library) was compiled without optimisation,
then it should be possible to interchange library versions. The third
restriction is necessary because of ghc's cross-module inlining and
strictness analysis etc.
Cheers,
Simon