Haskell Platform Proposal: HLint

Duncan Coutts duncan.coutts at googlemail.com
Fri Nov 12 07:12:59 EST 2010


On 12 November 2010 11:14, Simon Marlow <marlowsd at gmail.com> wrote:

> Right, my main objection has always been that since GHC makes it impractical
> to do the modify/relink that the LGPL requires, LGPL Haskell code isn't
> really complying with the spirit of the LGPL here.

Right, the letter but not the spirit. Of course the technical
situation with ABIs and GHC may improve in future as you've often
talked about.

> I get the impression that people who use the LGPL for Haskell don't care
> deeply about this - they're using the LGPL because they want modifications
> contributed back.  In which case, wouldn't it make sense to add an exception
> for the modify/relink too?  Are there Haskell authors out there using the
> LGPL who really do care about modify/relink?

Two points:

Firstly, supposing for the sake of argument we switched tomorrow to
using shared libs by default, would people consider the problem to
have gone away? We have exactly the same ABI issues with shared libs
as with static ones. Do we still need an exception to apologise that
our shared lib implementation is not really a "suitable shared library
mechanism":

Quoth the LGPL-2.1
    A suitable mechanism is one that (1) uses at run time a copy of
the library already present on the user's computer system, rather than
copying library functions into the executable, and (2) will operate
properly with a modified version of the library, if the user installs
one, as long as the modified version is interface-compatible with the
version that the work was made with.

Again, we comply with the letter but not the spirit of the license,
because it's pretty clear this has to mean ABI compatible (even in C).

Secondly, yes I agree that people tend not to care too deeply about
this. To play devil's advocate, if people don't really care then
instead of saying that means we must have an exception, perhaps that
means that we're ok to comply with the letter of the law but not the
spirit. It is a big hassle to work out wording for an exception and
get all license holders of each project to agree (I did it once with
Gtk2Hs and LGPL-2.0->2.1). If people do not actually care, why bother?

And again about ABIs, other compilers do have stable ABIs (e.g. nhc)
and there's the future possibility to do the same with GHC (for people
who care to define a stable ABI and follow the rules) and in this case
it should work just as well with shared libs as with static relinking.

Duncan


More information about the Libraries mailing list