[Haskell-cafe] GPL License of H-Matrix and prelude numeric
John Millikin
jmillikin at gmail.com
Wed Jan 26 07:34:33 CET 2011
On Tue, Jan 25, 2011 at 22:20, Chris Smith <cdsmith at gmail.com> wrote:
> On Tue, 2011-01-25 at 21:48 -0800, John Millikin wrote:
>> Please cite where the FSF claims the GPL applies to unrelated works
>> just because they can compile against GPL'd code. Keep in mind that if
>> your claim is correct, then every significant Linux and BSD distro is
>> committing massive copyright infringement.
>
> I'm not sure what you're doing here. You yourself just wrote in another
> email: "If you create a derivative work of BSD3 and GPL code (eg, a
> binary), it's covered by both the BSD3 and GPL." In practice, since the
> BSD3 contains no terms that aren't also contained in the GPL, that means
> it's covered by the GPL.
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.
> If you're actually confused, I'd be happy to compose a longer response
> with more details. But since you've just said yourself the same thing I
> was saying, I feel rather as though running off to collect quotations
> from the FSF web site would be a wild goose chase and not much worth the
> time. What part of this do you think needs support? Is it the
> definition of "derived work" to include linking? Something else?
I think you're getting mixed up between a derived work and dependent
library/application. Using the following code as a guide, the library
"hmatrix" is BSD3, the dependent library "matrixTools" is X11, the
dependent application "matrixCalc" is BSD3, and the derived work
("binary") is all three.
Just because some of the packages depend on a GPL'd library, doesn't
mean *they* are GPL'd. They can be under whatever license the creator
wants them to be.
--------------------------------------------------------------------------------
import Data.List
data License = GPL | BSD3 | X11 | PublicDomain
deriving (Show, Eq)
data Library = Library String License [Library] -- name, license, deps
deriving (Show, Eq)
data Application = Application String License [Library] -- name, license, deps
deriving (Show, Eq)
data Binary = Binary String [License] -- name, licenses
deriving (Show, Eq)
compile :: Application -> Binary
compile (Application name license deps) = Binary ("bin-" ++ name) allLicenses
where
allLicenses = nub (license : concatMap libLicenses deps)
libLicenses (Library _ l libdeps) = l : concatMap libLicenses libdeps
main = do
let base = Library "base" BSD3 []
-- hmatrix depends on base
hmatrix = Library "hmatrix" GPL [base]
-- matrixTools depends on hmatrix
matrixTools = Library "matrix-tools" X11 [hmatrix]
-- matrixCalc depends on base, hmatrix, and matrixTools
matrixCalc = Application "matrix-calc" BSD3 [matrixTools,
hmatrix, base]
-- the compiled binary is a derived work of all four
binary = compile matrixCalc
print binary
--------------------------------------------------------------------------------
More information about the Haskell-Cafe
mailing list