HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

ModuleCabal-syntax-3.12.1.0Haskell2010

Distribution.SPDX.LicenseExpression

  • 2 types
  • 1 value
datadata LicenseExpression
#

SPDX License Expression.

idstring              = 1*(ALPHA / DIGIT / "-" / "." )
license id            = <short form license identifier inAppendix I.1>
license exception id  = <short form license exception identifier inAppendix I.2>
license ref           = ["DocumentRef-"1*(idstring)":"]"LicenseRef-"1*(idstring)

simple expression     = license id / license id"+" / license ref

compound expression   = 1*1(simple expression /
                        simple expression "WITH" license exception id /
                        compound expression "AND" compound expression /
                        compound expression "OR" compound expression ) /
                        "(" compound expression ")" )

license expression    = 1*1(simple expression / compound expression)
Instances12Eq, Data, Ord, Read, Show, Generic, …

Simple License Expressions.

Constructors

  • ELicenseId LicenseId

    An SPDX License List Short Form Identifier. For example: GPL-2.0-only

  • ELicenseIdPlus LicenseId

    An SPDX License List Short Form Identifier with a unary"+" operator suffix to represent the current version of the license or any later version. For example: GPL-2.0+

  • ELicenseRef LicenseRef

    A SPDX user defined license reference: For example: LicenseRef-23, LicenseRef-MIT-Style-1, or DocumentRef-spdx-tool-1.2:LicenseRef-MIT-Style-2

Instances12Eq, Data, Ord, Read, Show, Generic, …