Haskell Platform Proposal: HLint
duncan.coutts at googlemail.com
Thu Nov 11 15:29:56 EST 2010
On 11 November 2010 14:50, Simon Marlow <marlowsd at gmail.com> wrote:
> But I vote against allowing LGPL libs in. For a start, wouldn't it have to
> be LGPL + static linking exception anyway?
In principle no static linking exception is required. It is possible
to ship code in a relinkable form.
What you do is to compile your app to .o files, link them together
into one big app.o file, then link this statically with the dependent
packages to make your app.exe. Then you ship the app.exe and the app.o
(or a promise to provide it). Any user can then relink the app.o to
get the app.exe.
I have done this and automated it with Cabal. It would probably be
useful to other people to add this feature to Cabal directly (I
implemented it in a Setup.hs).
Obviously it is rather tricky to generate a modified library that has
the same ABI but the LGPL makes allowance for that. The LGPL-2.1
states: "It is understood that the user who changes the contents of
definitions files in the Library will not necessarily be able to
recompile the application to use the modified definitions.". Current
GHC does put us at the rather extreme end of that interpretation. Of
course there is the same ABI issue with shared libs.
More information about the Libraries