Does the GPL license apply to a Haskell DLL on Windows?


#1

A friend of mine uses Linux and is learning Haskell. He created a function for me. I use C, and I have to use Windows because that is what my customers are using.

I compiled his Haskell code into a DLL, but he says that since Haskell is using the gmp-integer library, he thinks there are some licensing issues that I have to deal with.

I am not using or modifying any of source code for Haskell, or the gmp-integer library, so do those licenses affect me? Do you know where I can get information about this?

The Wikipedia and the GNU site have a lot of information about these licenses, but I can’t figure out if it has anything to do with me since I’m not using the source code, and all I am doing is using “stack build” to make a DLL for Windows.


#2

“Since version 6, GMP is distributed under the dual licenses, GNU LGPL v3 and GNU GPL v2.” - https://gmplib.org/

If you choose GNU LGPL v3 (the first “L” in “LGPL” is important!), you can use the library in a non-free program:

“The choice of license makes a big difference: using the Lesser GPL permits use of the library in proprietary programs; using the ordinary GPL for a library makes it available only for free programs.” - https://www.gnu.org/licenses/why-not-lgpl.html

As far as I can see, that makes your use of GMP fine. I am not a solicitor, yada yada, and so on and so forth.

What licence did your friend put their code under?


#3

Please note that the answer to your general question “Does the GPL licence apply to a Haskell DLL on Windows?” is “It depends” (on what code you include in your Haskell program and what libraries you use, e.g.)


#4

I had noticed that there were two licenses for GMP, but I didn’t realize we could pick the one we wanted to use. I thought each of us had to figure out which of the two licenses applied to our particular software.

I realize you are not a lawyer, but thanks for your information. I will use the LGPL license.

My friend will give me whatever license I need to use his Haskell function. He is as confused as I am about the GPL licensing issues.

This is his first Haskell function because he is just now learning Haskell. He created it just for me, and to give himself some practice on a real Haskell function. He doesn’t yet regard his Haskell code as efficient or well-written.

In his cabal file, the build-depends says this:

build-depends:
, base >= 4.12.0.0
, deepseq
, tuples-homogenous-h98
, vector

default-language: Haskell2010


#5

Dual licensing means you get to pick.

The ideas of the GPL can be a little confusing at first, but it is quite interesting, and - in a way - elegant, I think.

The main point is the Free Software tenets:

GPL gives the person you distribute the software to the 4 freedoms: to use it for any purpose, to have access to the source code, to distribute the software to others under the same terms you received it, and to modify it in any way.

Note how if you don’t distribute the software, there aren’t any restrictions.

Also note that you can sell Free Software to your customers. The “catch” is that your customers are free to give it away (or sell it) to others as well, or work on it themselves, as they wish. If they do distribute it to others, they also must provide the 4 freedoms to the recipients. Depending on the nature of your customers, that might be fine for you and them!

When you get further into it, you’ll find that there are some who think that it is too restrictive to demand that people must share what they received (and maybe modified) - they usually phrase it as that restriction makes the software “less free” (because you’re not free to stop sharing when distributing) - that is roughly the difference between the CopyLeft licenses, such as the GPL, and the BSD and MIT licences.

And then there’s the whole naming thing - Free Software, Open Source etc.