HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

ModuleCabal-syntax-3.12.1.0Haskell2010

Distribution.License

Package descriptions contain fields for specifying the name of a software license and the name of the file containing the text of that license. While package authors may choose any license they like, Cabal provides an enumeration of a small set of common free and open source software licenses. This is done so that Hackage can recognise licenses, so that tools can detect licensing conflicts, and to deter license proliferation.

It is recommended that all package authors use the license-file or license-files fields in their package descriptions. Further information about these fields can be found in the Cabal users guide.

Additional resources

The following websites provide information about free and open source software licenses:

Disclaimer

The descriptions of software licenses provided by this documentation are intended for informational purposes only and in no way constitute legal advice. Please read the text of the licenses and consult a lawyer for any advice regarding software licensing.

  • 1 type
  • 3 values
datadata License
#

Indicates the license under which a package's source code is released. Versions of the licenses not listed here will be rejected by Hackage and cause cabal check to issue a warning.

Constructors

Instances14Eq, Data, Ord, Read, Show, Generic, …

Convert License to License,

This is lossy conversion. We try our best.

Example1 expression
licenseFromSPDX . licenseToSPDX $ BSD3BSD3
Example1 expression
licenseFromSPDX . licenseToSPDX $ GPL (Just (mkVersion [3]))GPL (Just (mkVersion [3]))
Example1 expression
licenseFromSPDX . licenseToSPDX $ PublicDomainUnknownLicense "LicenseRefPublicDomain"
Example1 expression
licenseFromSPDX $ SPDX.License $ SPDX.simpleLicenseExpression SPDX.EUPL_1_1UnknownLicense "EUPL-1.1"
Example1 expression
licenseFromSPDX . licenseToSPDX $ AllRightsReservedAllRightsReserved
Example1 expression
licenseFromSPDX <$> simpleParsec "BSD-3-Clause OR GPL-3.0-only"Just (UnknownLicense "BSD3ClauseORGPL30only")