How would LGPL or MPL work in a Dhall config file?

I doubt we have any lawyers here but:

If I release a Dhall library Foo under LGPL or MPL and you import and consume it from a URI under your own pick-your-nonfree-license config file Bar, does this count as “dynamic linking” to satisfy a LGPL or MPL license? What would be considered “static linking”? Is Bar required to disclose its use of Foo?

1 Like

I’m not a lawyer, but my understanding is that:

  • if file A imports file B and you distribute file A without pre-resolving the import then that’s analogous to file A being “dynamically linked” against file B
  • if you pre-resolve file or interpret file A then the result of doing so is statically linked against B

As a concrete example, suppose that the files are:

-- ./A.dhall

./B.dhall
-- ./B.dhall

{-
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-}

1

Then if you distribute ./A.dhall as it is then that code is treated as dynamically linked against ./B.dhall.

But if you were to interpret ./A.dhall:

$ dhall --file ./A.dhall > ./C.dhall

… and then distribute the result of interpretation (./C.dhall), then ./C.dhall would be statically-linked against ./B.dhall.

In fact, in Morte (the predecessor of Dhall), I even literally called this dynamic and static linking. You can see this terminology in this post, for example:

The and we defined is “dynamically linked”, meaning that the file we saved has not yet resolved all imports: …

Alternatively, we can “statically link” the and function by resolving all imports using the morte compiler

1 Like