Licensing of Haskell code

Alastair Reid alastair@reid-consulting-uk.ltd.uk
Tue, 20 May 2003 10:07:14 +0100


On Monday 19 May 2003 4:01 pm, Shae Matijs Erisson wrote:
> If you consider software a service rather than a product, GPL is the best
> license for both hats. This has been working for me for the last few years.

Please let us keep this discussion on the topic of tagging libraries with 
their different licenses, reasoning about combinations of licenses, etc.

We have had flame wars^H^H^H^H^H^H^H^H^H^H discussions about the right license 
to use for Haskell libraries before.  Agreement has not been reached and is 
unlikely to be reached because different licenses serve different goals.  I 
think there is little point in rehearsing the arguments.  Let us accept that 
we will have multiple licenses and move on to more fruitful subjects like how 
to handle multiple licenses.


One way of dealing with multiple licenses is described in section 6.5 of this 
document

   http://www.linuxhq.com/ldp/howto/Module-HOWTO/basekerncompat.html

This is about licenses used in linux kernel modules.  It mentions a way of 
enforcing the GPL's restrictions on linking: they built support for the GPL 
into the linux kernel linker.

I suspect that this is more than we need.  For our purposes, it would probably 
be sufficient to have a haddock-like tool gather all the licenses listed in 
module headers and present them to the user. 

[For those who don't know, haddockized modules typically contain a module 
header which includes information such as the author, stability of the API, 
portability and the license.  It would probably be trivial to modify Haddock 
to dump out this information in a form that could be processed by external 
tools.]

Details:
1) The default assumption (if no module header is present) should be somewhat 
pessimistic since it implies that we have no license to do anything at all 
with the code.

2) If we standardize the meaning of the license descriptions, we can add some 
simplification rules like:

   GPL + MIT = GPL      # I think this is true.
   BSD + MIT = BSD     # This may also be true
   x + x = x                     # This says that we can delete any duplicates

  All this does is allow a list of 50 (say) licenses to be boiled down to one 
or two licenses for the program author to ponder.  Since the tool returns a 
set of licenses, there's no need to provide rules for every possible 
combination of licenses.  This avoids the need to somehow force-fit all the 
licenses in the world into a single lattice.

3) It might be useful to allow module authors to add a second module header 
which says what license(s) they expect to govern their module.  A tool could 
report any mismatch.  Obviously, this would be useful for program authors who 
wish to check that their program can be released under a given license.  It 
would also be useful for library authors who want to release their code under 
a BSD-style license and want to check they don't accidentally rely on a GPL 
library.

--
Alastair Reid