[Haskell-cafe] GPL License of H-Matrix and prelude numeric

John Millikin jmillikin at gmail.com
Wed Jan 26 08:03:07 CET 2011

On Tue, Jan 25, 2011 at 22:52, Chris Smith <cdsmith at gmail.com> wrote:
> On Tue, 2011-01-25 at 22:34 -0800, John Millikin wrote:
>> The specific claim I'm refuting is that if some library or application
>> depends on GPL'd code, that library/application must itself be
>> GPL-licensed. This claim is simply not true. The GPL only applies to
>> derived works, such as binaries or copied code.
> Well, binaries (among other things) are pretty much exactly what's at
> issue here.  I don't think anyone disputes that you can copy and paste
> sections of BSD3 licensed source code into a new project, but that
> wasn't the point brought up.  If you actually install the thing from
> Hackage, you build a binary, which links in code from the GPLed library,
> and distributing the result is covered by the terms of the GPL.

It's not possible for a .cabal file to specify which license the final
binaries will use -- it depends on what libraries are locally
installed, what flags the build uses, and what the executables
themselves link. The best Cabal could do is, after finishing "cabal
build" on an executable, printing out which licenses apply:

$ cabal build some-pkg --flags=enable-some-exc
Executable 'some-exc' has licenses: BSD3 GPL3 PublicDomain
Executable 'some-other-exc' has licenses: BSD3 GPL3
  ** Note: 'some-other-exc' links against external system libraries. Additional
     libraries may apply.
Executable 'another-exc' has licenses: MIT PublicDomain

Since it's impossible for Cabal/Hackage to work as you describe, it's
only sensible to interpret the "license" field as applying to the
source code archive.

More information about the Haskell-Cafe mailing list