-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/

-- | A library for working with .cabal files
--   
--   This library provides tools for reading and manipulating the .cabal
--   file format.
@package Cabal-syntax
@version 3.12.1.0

module Distribution.Compat.Binary
decodeOrFailIO :: Binary a => ByteString -> IO (Either String a)

-- | Lazily reconstruct a value previously written to a file.
decodeFileOrFail' :: Binary a => FilePath -> IO (Either String a)

module Distribution.Compat.Exception

-- | Catch IOException.
catchIO :: IO a -> (IOException -> IO a) -> IO a

-- | Catch ExitCode
catchExit :: IO a -> (ExitCode -> IO a) -> IO a

-- | Try IOException.
tryIO :: IO a -> IO (Either IOException a)
displayException :: Exception e => e -> String

-- | Compatibility layer for Control.Monad.Fail
module Distribution.Compat.MonadFail
class Monad m => MonadFail (m :: Type -> Type)
fail :: MonadFail m => String -> m a

-- | Per Conor McBride, the Newtype typeclass represents the packing
--   and unpacking of a newtype, and allows you to operate under that
--   newtype with functions such as ala.
module Distribution.Compat.Newtype

-- | The FunctionalDependencies version of Newtype
--   type-class.
--   
--   Since Cabal-3.0 class arguments are in a different order than in
--   newtype package. This change is to allow usage with
--   DeriveAnyClass (and DerivingStrategies, in GHC-8.2).
--   Unfortunately one has to repeat inner type.
--   
--   
--   newtype New = New Old
--     deriving anyclass (Newtype Old)
--   
--   
--   Another approach would be to use TypeFamilies (and possibly
--   compute inner type using GHC.Generics), but we think
--   FunctionalDependencies version gives cleaner type signatures.
class Newtype o n | n -> o
pack :: Newtype o n => o -> n
($dmpack) :: (Newtype o n, Coercible o n) => o -> n
unpack :: Newtype o n => n -> o
($dmunpack) :: (Newtype o n, Coercible n o) => n -> o

-- | 
--   >>> ala Sum foldMap [1, 2, 3, 4 :: Int]
--   10
--   
--   
--   Note: the user supplied function for the newtype is
--   ignored.
--   
--   
--   >>> ala (Sum . (+1)) foldMap [1, 2, 3, 4 :: Int]
--   10
--   
ala :: (Newtype o n, Newtype o' n') => (o -> n) -> ((o -> n) -> b -> n') -> b -> o'

-- | 
--   >>> alaf Sum foldMap length ["cabal", "install"]
--   12
--   
--   
--   Note: as with ala, the user supplied function for the
--   newtype is ignored.
alaf :: (Newtype o n, Newtype o' n') => (o -> n) -> ((a -> n) -> b -> n') -> (a -> o) -> b -> o'

-- | Variant of pack, which takes a phantom type.
pack' :: Newtype o n => (o -> n) -> o -> n

-- | Variant of unpack, which takes a phantom type.
unpack' :: Newtype o n => (o -> n) -> n -> o
instance Distribution.Compat.Newtype.Newtype (a -> a) (GHC.Internal.Data.Semigroup.Internal.Endo a)
instance Distribution.Compat.Newtype.Newtype a (GHC.Internal.Data.Functor.Identity.Identity a)
instance Distribution.Compat.Newtype.Newtype a (GHC.Internal.Data.Semigroup.Internal.Product a)
instance Distribution.Compat.Newtype.Newtype a (GHC.Internal.Data.Semigroup.Internal.Sum a)

module Distribution.Compat.Typeable
class Typeable (a :: k)
type TypeRep = SomeTypeRep
typeRep :: forall {k} proxy (a :: k). Typeable a => proxy a -> TypeRep

-- | Common utils used by modules under Distribution.PackageDescription.*.
module Distribution.PackageDescription.Utils
cabalBug :: String -> a
userBug :: String -> a

-- | Implementation of base-62 encoding, which we use when computing hashes
--   for fully instantiated unit ids.
module Distribution.Utils.Base62

-- | Hash a string using GHC's fingerprinting algorithm (a 128-bit MD5
--   hash) and then encode the resulting hash in base 62.
hashToBase62 :: String -> String

module Distribution.Utils.MD5
type MD5 = Fingerprint

-- | Show MD5 in human readable form
--   
--   
--   >>> showMD5 (Fingerprint 123 456)
--   "000000000000007b00000000000001c8"
--   
--   
--   
--   >>> showMD5 $ md5 $ BS.pack [0..127]
--   "37eff01866ba3f538421b30b7cbefcac"
--   
--   
--   @since 3.2.0.0
showMD5 :: MD5 -> String

-- | @since 3.2.0.0
md5 :: ByteString -> MD5

-- | 
--   >>> showMD5 $ md5FromInteger 0x37eff01866ba3f538421b30b7cbefcac
--   "37eff01866ba3f538421b30b7cbefcac"
--   
--   
--   Note: the input is truncated:
--   
--   
--   >>> showMD5 $ md5FromInteger 0x1230000037eff01866ba3f538421b30b7cbefcac
--   "37eff01866ba3f538421b30b7cbefcac"
--   
--   
--   Yet, negative numbers are not a problem...
--   
--   
--   >>> showMD5 $ md5FromInteger (-1)
--   "ffffffffffffffffffffffffffffffff"
--   
md5FromInteger :: Integer -> MD5

-- | @since 3.2.0.0
binaryPutMD5 :: MD5 -> Put

-- | @since 3.2.0.0
binaryGetMD5 :: Get MD5

module Distribution.Utils.String

-- | Decode String from UTF8-encoded octets.
--   
--   Invalid data in the UTF8 stream (this includes code-points
--   U+D800 through U+DFFF) will be decoded as the
--   replacement character (U+FFFD).
--   
--   See also encodeStringUtf8
decodeStringUtf8 :: [Word8] -> String

-- | Encode String to a list of UTF8-encoded octets
--   
--   Code-points in the U+D800-U+DFFF range will be
--   encoded as the replacement character (i.e. U+FFFD).
--   
--   See also decodeUtf8
encodeStringUtf8 :: String -> [Word8]
trim :: String -> String

-- | Structurally tag binary serialisation stream. Useful when most
--   Binary instances are Generic derived.
--   
--   Say you have a data type
--   
--   
--   data Record = Record
--     { _recordFields  :: HM.HashMap Text (Integer, ByteString)
--     , _recordEnabled :: Bool
--     }
--     deriving (Eq, Show, Generic)
--   
--   instance Binary Record
--   instance Structured Record
--   
--   
--   then you can serialise and deserialise Record values with a
--   structure tag by simply
--   
--   
--   structuredEncode record :: ByteString
--   structuredDecode lbs :: IO Record
--   
--   
--   If structure of Record changes in between, deserialisation
--   will fail early.
--   
--   Technically, Structured is not related to Binary, and
--   may be useful in other uses.
module Distribution.Utils.Structured

-- | Structured encode. Encode a value to using binary serialisation
--   to a lazy ByteString. Encoding starts with 16 byte large
--   structure hash.
structuredEncode :: (Binary a, Structured a) => a -> ByteString

-- | Lazily serialise a value to a file
structuredEncodeFile :: (Binary a, Structured a) => FilePath -> a -> IO ()

-- | Structured decode. Decode a value from a lazy
--   ByteString, reconstructing the original structure. Throws pure
--   exception on invalid inputs.
structuredDecode :: (Binary a, Structured a) => ByteString -> a
structuredDecodeOrFailIO :: (Binary a, Structured a) => ByteString -> IO (Either String a)

-- | Lazily reconstruct a value previously written to a file.
structuredDecodeFileOrFail :: (Binary a, Structured a) => FilePath -> IO (Either String a)

-- | Class of types with a known Structure.
--   
--   For regular data types Structured can be derived generically.
--   
--   
--   data Record = Record { a :: Int, b :: Bool, c :: [Char] } deriving (Generic)
--   instance Structured Record
--   
class Typeable a => Structured a
structure :: Structured a => Proxy a -> Structure
($dmstructure) :: (Structured a, Generic a, GStructured (Rep a)) => Proxy a -> Structure
type MD5 = Fingerprint

-- | Semantically hashStructure . structure.
structureHash :: Structured a => Proxy a -> MD5

-- | Flatten Structure into something we can calculate hash of.
--   
--   As Structure can be potentially infinite. For mutually
--   recursive types, we keep track of TypeReps, and put just
--   TypeRep name when it's occurred another time.
structureBuilder :: Structure -> Builder

-- | Derive structure generically.
genericStructure :: (Typeable a, Generic a, GStructured (Rep a)) => Proxy a -> Structure

-- | Used to implement genericStructure.
class GStructured (f :: Type -> Type)

-- | Use Typeable to infer name
nominalStructure :: forall {k} (a :: k). Typeable a => Proxy a -> Structure
containerStructure :: forall {k} (f :: Type -> k) a. (Typeable f, Structured a) => Proxy (f a) -> Structure

-- | Structure of a datatype.
--   
--   It can be infinite, as far as TypeReps involved are finite.
--   (e.g. polymorphic recursion might cause troubles).
data Structure

-- | nominal, yet can be parametrised by other structures.
Nominal :: !TypeRep -> !TypeVersion -> TypeName -> [Structure] -> Structure

-- | a newtype wrapper
Newtype :: !TypeRep -> !TypeVersion -> TypeName -> Structure -> Structure

-- | sum-of-products structure
Structure :: !TypeRep -> !TypeVersion -> TypeName -> SopStructure -> Structure
data Tag (a :: k)
Tag :: Tag (a :: k)
type TypeName = String
type ConstructorName = String

-- | A semantic version of a data type. Usually 0.
type TypeVersion = Word32
type SopStructure = [(ConstructorName, [Structure])]

-- | A MD5 hash digest of Structure.
hashStructure :: Structure -> MD5

-- | A van-Laarhoven lens into TypeVersion of Structure
--   
--   
--   typeVersion :: Lens' Structure TypeVersion
--   
typeVersion :: Functor f => (TypeVersion -> f TypeVersion) -> Structure -> f Structure

-- | A van-Laarhoven lens into TypeName of Structure
--   
--   
--   typeName :: Lens' Structure TypeName
--   
typeName :: Functor f => (TypeName -> f TypeName) -> Structure -> f Structure
instance Distribution.Utils.Structured.Structured a => Data.Binary.Class.Binary (Distribution.Utils.Structured.Tag a)
instance GHC.Classes.Eq Distribution.Utils.Structured.Structure
instance (i GHC.Types.~ GHC.Internal.Generics.D, GHC.Internal.Generics.Datatype c, Distribution.Utils.Structured.GStructuredSum f) => Distribution.Utils.Structured.GStructured (GHC.Internal.Generics.M1 i c f)
instance (Distribution.Utils.Structured.GStructuredProd f, Distribution.Utils.Structured.GStructuredProd g) => Distribution.Utils.Structured.GStructuredProd (f GHC.Internal.Generics.:*: g)
instance Distribution.Utils.Structured.Structured c => Distribution.Utils.Structured.GStructuredProd (GHC.Internal.Generics.K1 i c)
instance (i GHC.Types.~ GHC.Internal.Generics.S, Distribution.Utils.Structured.GStructuredProd f) => Distribution.Utils.Structured.GStructuredProd (GHC.Internal.Generics.M1 i c f)
instance Distribution.Utils.Structured.GStructuredProd GHC.Internal.Generics.U1
instance (Distribution.Utils.Structured.GStructuredSum f, Distribution.Utils.Structured.GStructuredSum g) => Distribution.Utils.Structured.GStructuredSum (f GHC.Internal.Generics.:+: g)
instance (i GHC.Types.~ GHC.Internal.Generics.C, GHC.Internal.Generics.Constructor c, Distribution.Utils.Structured.GStructuredProd f) => Distribution.Utils.Structured.GStructuredSum (GHC.Internal.Generics.M1 i c f)
instance Distribution.Utils.Structured.GStructuredSum GHC.Internal.Generics.V1
instance GHC.Internal.Generics.Generic Distribution.Utils.Structured.Structure
instance GHC.Classes.Ord Distribution.Utils.Structured.Structure
instance GHC.Internal.Show.Show Distribution.Utils.Structured.Structure
instance Distribution.Utils.Structured.Structured GHC.Types.Bool
instance Distribution.Utils.Structured.Structured Data.ByteString.Lazy.Internal.ByteString
instance Distribution.Utils.Structured.Structured Data.ByteString.Internal.Type.ByteString
instance Distribution.Utils.Structured.Structured GHC.Types.Char
instance Distribution.Utils.Structured.Structured Data.Time.Calendar.Days.Day
instance Distribution.Utils.Structured.Structured Data.Time.Clock.Internal.DiffTime.DiffTime
instance Distribution.Utils.Structured.Structured GHC.Types.Double
instance (Distribution.Utils.Structured.Structured a, Distribution.Utils.Structured.Structured b) => Distribution.Utils.Structured.Structured (GHC.Internal.Data.Either.Either a b)
instance Distribution.Utils.Structured.Structured GHC.Types.Float
instance Distribution.Utils.Structured.Structured GHC.Types.Int
instance Distribution.Utils.Structured.Structured GHC.Internal.Int.Int16
instance Distribution.Utils.Structured.Structured GHC.Internal.Int.Int32
instance Distribution.Utils.Structured.Structured GHC.Internal.Int.Int64
instance Distribution.Utils.Structured.Structured GHC.Internal.Int.Int8
instance Distribution.Utils.Structured.Structured v => Distribution.Utils.Structured.Structured (Data.IntMap.Internal.IntMap v)
instance Distribution.Utils.Structured.Structured Data.IntSet.Internal.IntSet
instance Distribution.Utils.Structured.Structured GHC.Num.Integer.Integer
instance Distribution.Utils.Structured.Structured a => Distribution.Utils.Structured.Structured [a]
instance Distribution.Utils.Structured.Structured Data.Time.LocalTime.Internal.LocalTime.LocalTime
instance (Distribution.Utils.Structured.Structured k, Distribution.Utils.Structured.Structured v) => Distribution.Utils.Structured.Structured (Data.Map.Internal.Map k v)
instance Distribution.Utils.Structured.Structured a => Distribution.Utils.Structured.Structured (GHC.Internal.Maybe.Maybe a)
instance Distribution.Utils.Structured.Structured Data.Time.Clock.Internal.NominalDiffTime.NominalDiffTime
instance Distribution.Utils.Structured.Structured a => Distribution.Utils.Structured.Structured (GHC.Internal.Base.NonEmpty a)
instance Distribution.Utils.Structured.Structured GHC.Types.Ordering
instance Distribution.Utils.Structured.Structured a => Distribution.Utils.Structured.Structured (GHC.Internal.Real.Ratio a)
instance Distribution.Utils.Structured.Structured v => Distribution.Utils.Structured.Structured (Data.Sequence.Internal.Seq v)
instance Distribution.Utils.Structured.Structured k => Distribution.Utils.Structured.Structured (Data.Set.Internal.Set k)
instance Distribution.Utils.Structured.Structured Data.Text.Internal.Lazy.Text
instance Distribution.Utils.Structured.Structured Data.Text.Internal.Text
instance Distribution.Utils.Structured.Structured Data.Time.LocalTime.Internal.TimeOfDay.TimeOfDay
instance Distribution.Utils.Structured.Structured Data.Time.LocalTime.Internal.TimeZone.TimeZone
instance (Distribution.Utils.Structured.Structured a1, Distribution.Utils.Structured.Structured a2) => Distribution.Utils.Structured.Structured (a1, a2)
instance (Distribution.Utils.Structured.Structured a1, Distribution.Utils.Structured.Structured a2, Distribution.Utils.Structured.Structured a3) => Distribution.Utils.Structured.Structured (a1, a2, a3)
instance (Distribution.Utils.Structured.Structured a1, Distribution.Utils.Structured.Structured a2, Distribution.Utils.Structured.Structured a3, Distribution.Utils.Structured.Structured a4) => Distribution.Utils.Structured.Structured (a1, a2, a3, a4)
instance (Distribution.Utils.Structured.Structured a1, Distribution.Utils.Structured.Structured a2, Distribution.Utils.Structured.Structured a3, Distribution.Utils.Structured.Structured a4, Distribution.Utils.Structured.Structured a5) => Distribution.Utils.Structured.Structured (a1, a2, a3, a4, a5)
instance (Distribution.Utils.Structured.Structured a1, Distribution.Utils.Structured.Structured a2, Distribution.Utils.Structured.Structured a3, Distribution.Utils.Structured.Structured a4, Distribution.Utils.Structured.Structured a5, Distribution.Utils.Structured.Structured a6) => Distribution.Utils.Structured.Structured (a1, a2, a3, a4, a5, a6)
instance (Distribution.Utils.Structured.Structured a1, Distribution.Utils.Structured.Structured a2, Distribution.Utils.Structured.Structured a3, Distribution.Utils.Structured.Structured a4, Distribution.Utils.Structured.Structured a5, Distribution.Utils.Structured.Structured a6, Distribution.Utils.Structured.Structured a7) => Distribution.Utils.Structured.Structured (a1, a2, a3, a4, a5, a6, a7)
instance Distribution.Utils.Structured.Structured Data.Time.Clock.Internal.UTCTime.UTCTime
instance Distribution.Utils.Structured.Structured ()
instance Distribution.Utils.Structured.Structured Data.Time.Clock.Internal.UniversalTime.UniversalTime
instance Distribution.Utils.Structured.Structured GHC.Types.Word
instance Distribution.Utils.Structured.Structured GHC.Internal.Word.Word16
instance Distribution.Utils.Structured.Structured GHC.Internal.Word.Word32
instance Distribution.Utils.Structured.Structured GHC.Internal.Word.Word64
instance Distribution.Utils.Structured.Structured GHC.Internal.Word.Word8

-- | Compatibility layer for Data.Semigroup
module Distribution.Compat.Semigroup
class Semigroup a
(<>) :: Semigroup a => a -> a -> a
class Semigroup a => Monoid a
mempty :: Monoid a => a
mappend :: Monoid a => a -> a -> a
mconcat :: Monoid a => [a] -> a
newtype All
All :: Bool -> All
[getAll] :: All -> Bool
newtype Any
Any :: Bool -> Any
[getAny] :: Any -> Bool

-- | A copy of First.
newtype First' a
First' :: a -> First' a
[getFirst'] :: First' a -> a

-- | A copy of Last.
newtype Last' a
Last' :: a -> Last' a
[getLast'] :: Last' a -> a

-- | A wrapper around Maybe, providing the Semigroup and
--   Monoid instances implemented for Maybe since
--   base-4.11.
newtype Option' a
Option' :: Maybe a -> Option' a
[getOption'] :: Option' a -> Maybe a

-- | Generically generate a Semigroup (<>) operation
--   for any type implementing Generic. This operation will append
--   two values by point-wise appending their component fields. It is only
--   defined for product types.
--   
--   
--   gmappend a (gmappend b c) = gmappend (gmappend a b) c
--   
gmappend :: (Generic a, GSemigroup (Rep a)) => a -> a -> a

-- | Generically generate a Monoid mempty for any
--   product-like type implementing Generic.
--   
--   It is only defined for product types.
--   
--   
--   gmappend gmempty a = a = gmappend a gmempty
--   
gmempty :: (Generic a, GMonoid (Rep a)) => a
instance Data.Binary.Class.Binary a => Data.Binary.Class.Binary (Distribution.Compat.Semigroup.Last' a)
instance Data.Binary.Class.Binary a => Data.Binary.Class.Binary (Distribution.Compat.Semigroup.Option' a)
instance GHC.Classes.Eq a => GHC.Classes.Eq (Distribution.Compat.Semigroup.First' a)
instance GHC.Classes.Eq a => GHC.Classes.Eq (Distribution.Compat.Semigroup.Last' a)
instance GHC.Classes.Eq a => GHC.Classes.Eq (Distribution.Compat.Semigroup.Option' a)
instance GHC.Internal.Base.Functor Distribution.Compat.Semigroup.Last'
instance GHC.Internal.Base.Functor Distribution.Compat.Semigroup.Option'
instance (Distribution.Compat.Semigroup.GMonoid f, Distribution.Compat.Semigroup.GMonoid g) => Distribution.Compat.Semigroup.GMonoid (f GHC.Internal.Generics.:*: g)
instance (GHC.Internal.Base.Semigroup a, GHC.Internal.Base.Monoid a) => Distribution.Compat.Semigroup.GMonoid (GHC.Internal.Generics.K1 i a)
instance Distribution.Compat.Semigroup.GMonoid f => Distribution.Compat.Semigroup.GMonoid (GHC.Internal.Generics.M1 i c f)
instance (Distribution.Compat.Semigroup.GSemigroup f, Distribution.Compat.Semigroup.GSemigroup g) => Distribution.Compat.Semigroup.GSemigroup (f GHC.Internal.Generics.:*: g)
instance GHC.Internal.Base.Semigroup a => Distribution.Compat.Semigroup.GSemigroup (GHC.Internal.Generics.K1 i a)
instance Distribution.Compat.Semigroup.GSemigroup f => Distribution.Compat.Semigroup.GSemigroup (GHC.Internal.Generics.M1 i c f)
instance GHC.Internal.Generics.Generic (Distribution.Compat.Semigroup.Last' a)
instance GHC.Internal.Generics.Generic (Distribution.Compat.Semigroup.Option' a)
instance GHC.Internal.Base.Semigroup a => GHC.Internal.Base.Monoid (Distribution.Compat.Semigroup.Option' a)
instance GHC.Classes.Ord a => GHC.Classes.Ord (Distribution.Compat.Semigroup.First' a)
instance GHC.Classes.Ord a => GHC.Classes.Ord (Distribution.Compat.Semigroup.Last' a)
instance GHC.Classes.Ord a => GHC.Classes.Ord (Distribution.Compat.Semigroup.Option' a)
instance GHC.Internal.Read.Read a => GHC.Internal.Read.Read (Distribution.Compat.Semigroup.Last' a)
instance GHC.Internal.Read.Read a => GHC.Internal.Read.Read (Distribution.Compat.Semigroup.Option' a)
instance GHC.Internal.Base.Semigroup (Distribution.Compat.Semigroup.First' a)
instance GHC.Internal.Base.Semigroup (Distribution.Compat.Semigroup.Last' a)
instance GHC.Internal.Base.Semigroup a => GHC.Internal.Base.Semigroup (Distribution.Compat.Semigroup.Option' a)
instance GHC.Internal.Show.Show a => GHC.Internal.Show.Show (Distribution.Compat.Semigroup.First' a)
instance GHC.Internal.Show.Show a => GHC.Internal.Show.Show (Distribution.Compat.Semigroup.Last' a)
instance GHC.Internal.Show.Show a => GHC.Internal.Show.Show (Distribution.Compat.Semigroup.Option' a)
instance Distribution.Utils.Structured.Structured a => Distribution.Utils.Structured.Structured (Distribution.Compat.Semigroup.Last' a)
instance Distribution.Utils.Structured.Structured a => Distribution.Utils.Structured.Structured (Distribution.Compat.Semigroup.Option' a)

module Distribution.Compat.NonEmptySet

data NonEmptySet a
singleton :: a -> NonEmptySet a
insert :: Ord a => a -> NonEmptySet a -> NonEmptySet a
delete :: Ord a => a -> NonEmptySet a -> Maybe (NonEmptySet a)
toNonEmpty :: NonEmptySet a -> NonEmpty a
fromNonEmpty :: Ord a => NonEmpty a -> NonEmptySet a
toList :: NonEmptySet a -> [a]
toSet :: NonEmptySet a -> Set a
member :: Ord a => a -> NonEmptySet a -> Bool
map :: Ord b => (a -> b) -> NonEmptySet a -> NonEmptySet b
instance Data.Binary.Class.Binary a => Data.Binary.Class.Binary (Distribution.Compat.NonEmptySet.NonEmptySet a)
instance (GHC.Internal.Data.Data.Data a, GHC.Classes.Ord a) => GHC.Internal.Data.Data.Data (Distribution.Compat.NonEmptySet.NonEmptySet a)
instance GHC.Classes.Eq a => GHC.Classes.Eq (Distribution.Compat.NonEmptySet.NonEmptySet a)
instance GHC.Internal.Data.Foldable.Foldable Distribution.Compat.NonEmptySet.NonEmptySet
instance Control.DeepSeq.NFData a => Control.DeepSeq.NFData (Distribution.Compat.NonEmptySet.NonEmptySet a)
instance GHC.Classes.Ord a => GHC.Classes.Ord (Distribution.Compat.NonEmptySet.NonEmptySet a)
instance (GHC.Internal.Read.Read a, GHC.Classes.Ord a) => GHC.Internal.Read.Read (Distribution.Compat.NonEmptySet.NonEmptySet a)
instance GHC.Classes.Ord a => GHC.Internal.Base.Semigroup (Distribution.Compat.NonEmptySet.NonEmptySet a)
instance GHC.Internal.Show.Show a => GHC.Internal.Show.Show (Distribution.Compat.NonEmptySet.NonEmptySet a)
instance Distribution.Utils.Structured.Structured a => Distribution.Utils.Structured.Structured (Distribution.Compat.NonEmptySet.NonEmptySet a)

-- | This module does two things:
--   
--   
--   
- Acts as a compatibility layer, like base-compat.
--   
- Provides commonly used imports.
--   
module Distribution.Compat.Prelude
data Int
data Float
data Char
data Maybe a
Nothing :: Maybe a
Just :: a -> Maybe a
data IO a
data Bool
False :: Bool
True :: Bool
data Double
data Ordering
LT :: Ordering
EQ :: Ordering
GT :: Ordering
class a ~# b => (a :: k) ~ (b :: k)
data Integer
cycle :: HasCallStack => [a] -> [a]
const :: a -> b -> a
(++) :: [a] -> [a] -> [a]
seq :: a -> b -> b
concat :: Foldable t => t [a] -> [a]
filter :: (a -> Bool) -> [a] -> [a]
zip :: [a] -> [b] -> [(a, b)]
print :: Show a => a -> IO ()
otherwise :: Bool
map :: (a -> b) -> [a] -> [b]
($) :: (a -> b) -> a -> b
class Num a
(+) :: Num a => a -> a -> a
(-) :: Num a => a -> a -> a
(*) :: Num a => a -> a -> a
negate :: Num a => a -> a
abs :: Num a => a -> a
signum :: Num a => a -> a
fromInteger :: Num a => Integer -> a
class Num a => Fractional a
(/) :: Fractional a => a -> a -> a
recip :: Fractional a => a -> a
fromRational :: Fractional a => Rational -> a
class Enum a
succ :: Enum a => a -> a
pred :: Enum a => a -> a
toEnum :: Enum a => Int -> a
fromEnum :: Enum a => a -> Int
enumFrom :: Enum a => a -> [a]
enumFromThen :: Enum a => a -> a -> [a]
enumFromTo :: Enum a => a -> a -> [a]
enumFromThenTo :: Enum a => a -> a -> a -> [a]
class Eq a
(==) :: Eq a => a -> a -> Bool
(/=) :: Eq a => a -> a -> Bool
class Eq a => Ord a
compare :: Ord a => a -> a -> Ordering
(<) :: Ord a => a -> a -> Bool
(<=) :: Ord a => a -> a -> Bool
(>) :: Ord a => a -> a -> Bool
(>=) :: Ord a => a -> a -> Bool
max :: Ord a => a -> a -> a
min :: Ord a => a -> a -> a
class Applicative m => Monad (m :: Type -> Type)
(>>=) :: Monad m => m a -> (a -> m b) -> m b
(>>) :: Monad m => m a -> m b -> m b
return :: Monad m => a -> m a
class Functor (f :: Type -> Type)
fmap :: Functor f => (a -> b) -> f a -> f b
(<$) :: Functor f => a -> f b -> f a
class Monad m => MonadFail (m :: Type -> Type)
fail :: MonadFail m => String -> m a
fromIntegral :: (Integral a, Num b) => a -> b
realToFrac :: (Real a, Fractional b) => a -> b
class (Real a, Enum a) => Integral a
quot :: Integral a => a -> a -> a
rem :: Integral a => a -> a -> a
div :: Integral a => a -> a -> a
mod :: Integral a => a -> a -> a
quotRem :: Integral a => a -> a -> (a, a)
divMod :: Integral a => a -> a -> (a, a)
toInteger :: Integral a => a -> Integer
class (Num a, Ord a) => Real a
toRational :: Real a => a -> Rational
class Semigroup a => Monoid a
mempty :: Monoid a => a
mappend :: Monoid a => a -> a -> a
mconcat :: Monoid a => [a] -> a
class Functor f => Applicative (f :: Type -> Type)
pure :: Applicative f => a -> f a
(<*>) :: Applicative f => f (a -> b) -> f a -> f b
liftA2 :: Applicative f => (a -> b -> c) -> f a -> f b -> f c
(*>) :: Applicative f => f a -> f b -> f b
(<*) :: Applicative f => f a -> f b -> f a
class Bounded a
minBound :: Bounded a => a
maxBound :: Bounded a => a
class Fractional a => Floating a
pi :: Floating a => a
exp :: Floating a => a -> a
log :: Floating a => a -> a
sqrt :: Floating a => a -> a
(**) :: Floating a => a -> a -> a
logBase :: Floating a => a -> a -> a
sin :: Floating a => a -> a
cos :: Floating a => a -> a
tan :: Floating a => a -> a
asin :: Floating a => a -> a
acos :: Floating a => a -> a
atan :: Floating a => a -> a
sinh :: Floating a => a -> a
cosh :: Floating a => a -> a
tanh :: Floating a => a -> a
asinh :: Floating a => a -> a
acosh :: Floating a => a -> a
atanh :: Floating a => a -> a
class Read a
readsPrec :: Read a => Int -> ReadS a
readList :: Read a => ReadS [a]
class (RealFrac a, Floating a) => RealFloat a
floatRadix :: RealFloat a => a -> Integer
floatDigits :: RealFloat a => a -> Int
floatRange :: RealFloat a => a -> (Int, Int)
decodeFloat :: RealFloat a => a -> (Integer, Int)
encodeFloat :: RealFloat a => Integer -> Int -> a
exponent :: RealFloat a => a -> Int
significand :: RealFloat a => a -> a
scaleFloat :: RealFloat a => Int -> a -> a
isNaN :: RealFloat a => a -> Bool
isInfinite :: RealFloat a => a -> Bool
isDenormalized :: RealFloat a => a -> Bool
isNegativeZero :: RealFloat a => a -> Bool
isIEEE :: RealFloat a => a -> Bool
atan2 :: RealFloat a => a -> a -> a
class (Real a, Fractional a) => RealFrac a
properFraction :: (RealFrac a, Integral b) => a -> (b, a)
truncate :: (RealFrac a, Integral b) => a -> b
round :: (RealFrac a, Integral b) => a -> b
ceiling :: (RealFrac a, Integral b) => a -> b
floor :: (RealFrac a, Integral b) => a -> b
class Show a
showsPrec :: Show a => Int -> a -> ShowS
show :: Show a => a -> String
showList :: Show a => [a] -> ShowS
type String = [Char]
type Rational = Ratio Integer
data Either a b
Left :: a -> Either a b
Right :: b -> Either a b
(^) :: (Num a, Integral b) => a -> b -> a
(&&) :: Bool -> Bool -> Bool
(||) :: Bool -> Bool -> Bool
not :: Bool -> Bool
fst :: (a, b) -> a
snd :: (a, b) -> b
curry :: ((a, b) -> c) -> a -> b -> c
uncurry :: (a -> b -> c) -> (a, b) -> c
error :: HasCallStack => [Char] -> a
errorWithoutStackTrace :: [Char] -> a
undefined :: HasCallStack => a
(=<<) :: Monad m => (a -> m b) -> m a -> m b
id :: a -> a
(.) :: (b -> c) -> (a -> b) -> a -> c
flip :: (a -> b -> c) -> b -> a -> c
($!) :: (a -> b) -> a -> b
until :: (a -> Bool) -> (a -> a) -> a -> a
asTypeOf :: a -> a -> a
subtract :: Num a => a -> a -> a
maybe :: b -> (a -> b) -> Maybe a -> b
foldl :: Foldable t => (b -> a -> b) -> b -> t a -> b
sum :: (Foldable t, Num a) => t a -> a
product :: (Foldable t, Num a) => t a -> a
maximum :: (Foldable t, Ord a) => t a -> a
minimum :: (Foldable t, Ord a) => t a -> a
elem :: (Foldable t, Eq a) => a -> t a -> Bool
scanl :: (b -> a -> b) -> b -> [a] -> [b]
scanl1 :: (a -> a -> a) -> [a] -> [a]
scanr :: (a -> b -> b) -> b -> [a] -> [b]
scanr1 :: (a -> a -> a) -> [a] -> [a]
iterate :: (a -> a) -> a -> [a]
repeat :: a -> [a]
replicate :: Int -> a -> [a]
takeWhile :: (a -> Bool) -> [a] -> [a]
dropWhile :: (a -> Bool) -> [a] -> [a]
take :: Int -> [a] -> [a]
drop :: Int -> [a] -> [a]
splitAt :: Int -> [a] -> ([a], [a])
span :: (a -> Bool) -> [a] -> ([a], [a])
break :: (a -> Bool) -> [a] -> ([a], [a])
reverse :: [a] -> [a]
and :: Foldable t => t Bool -> Bool
or :: Foldable t => t Bool -> Bool
notElem :: (Foldable t, Eq a) => a -> t a -> Bool
lookup :: Eq a => a -> [(a, b)] -> Maybe b
concatMap :: Foldable t => (a -> [b]) -> t a -> [b]
(!!) :: HasCallStack => [a] -> Int -> a
zip3 :: [a] -> [b] -> [c] -> [(a, b, c)]
zipWith :: (a -> b -> c) -> [a] -> [b] -> [c]
zipWith3 :: (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d]
unzip :: [(a, b)] -> ([a], [b])
unzip3 :: [(a, b, c)] -> ([a], [b], [c])
type ShowS = String -> String
shows :: Show a => a -> ShowS
showChar :: Char -> ShowS
showString :: String -> ShowS
showParen :: Bool -> ShowS -> ShowS
even :: Integral a => a -> Bool
odd :: Integral a => a -> Bool
(^^) :: (Fractional a, Integral b) => a -> b -> a
gcd :: Integral a => a -> a -> a
lcm :: Integral a => a -> a -> a
(<$>) :: Functor f => (a -> b) -> f a -> f b
type ReadS a = String -> [(a, String)]
lex :: ReadS String
readParen :: Bool -> ReadS a -> ReadS a
either :: (a -> c) -> (b -> c) -> Either a b -> c
reads :: Read a => ReadS a
sequence_ :: (Foldable t, Monad m) => t (m a) -> m ()
lines :: String -> [String]
unlines :: [String] -> String
words :: String -> [String]
unwords :: [String] -> String
type IOError = IOException
userError :: String -> IOError
type FilePath = String
ioError :: IOError -> IO a
putChar :: Char -> IO ()
putStr :: String -> IO ()
putStrLn :: String -> IO ()
getChar :: IO Char
getLine :: IO String
getContents :: IO String
interact :: (String -> String) -> IO ()
readFile :: FilePath -> IO String
writeFile :: FilePath -> String -> IO ()
appendFile :: FilePath -> String -> IO ()
readLn :: Read a => IO a
readIO :: Read a => String -> IO a
class Semigroup a
(<>) :: Semigroup a => a -> a -> a

-- | Generically generate a Semigroup (<>) operation
--   for any type implementing Generic. This operation will append
--   two values by point-wise appending their component fields. It is only
--   defined for product types.
--   
--   
--   gmappend a (gmappend b c) = gmappend (gmappend a b) c
--   
gmappend :: (Generic a, GSemigroup (Rep a)) => a -> a -> a

-- | Generically generate a Monoid mempty for any
--   product-like type implementing Generic.
--   
--   It is only defined for product types.
--   
--   
--   gmappend gmempty a = a = gmappend a gmempty
--   
gmempty :: (Generic a, GMonoid (Rep a)) => a
class Typeable (a :: k)
type TypeRep = SomeTypeRep
typeRep :: forall {k} proxy (a :: k). Typeable a => proxy a -> TypeRep
class Typeable a => Data a
class Generic a

-- | A class of types that can be fully evaluated.
class NFData a

-- | rnf should reduce its argument to normal form (that is, fully
--   evaluate all sub-components), and then return ().
--   
--   
Generic NFData deriving
--   
--   Starting with GHC 7.2, you can automatically derive instances for
--   types possessing a Generic instance.
--   
--   Note: Generic1 can be auto-derived starting with GHC 7.4
--   
--   
--   {-# LANGUAGE DeriveGeneric #-}
--   
--   import GHC.Generics (Generic, Generic1)
--   import Control.DeepSeq
--   
--   data Foo a = Foo a String
--                deriving (Eq, Generic, Generic1)
--   
--   instance NFData a => NFData (Foo a)
--   instance NFData1 Foo
--   
--   data Colour = Red | Green | Blue
--                 deriving Generic
--   
--   instance NFData Colour
--   
--   
--   Starting with GHC 7.10, the example above can be written more
--   concisely by enabling the new DeriveAnyClass extension:
--   
--   
--   {-# LANGUAGE DeriveGeneric, DeriveAnyClass #-}
--   
--   import GHC.Generics (Generic)
--   import Control.DeepSeq
--   
--   data Foo a = Foo a String
--                deriving (Eq, Generic, Generic1, NFData, NFData1)
--   
--   data Colour = Red | Green | Blue
--                 deriving (Generic, NFData)
--   
--   
--   
Compatibility with previous deepseq versions
--   
--   Prior to version 1.4.0.0, the default implementation of the rnf
--   method was defined as
--   
--   
--   rnf a = seq a ()
--   
--   
--   However, starting with deepseq-1.4.0.0, the default
--   implementation is based on DefaultSignatures allowing for
--   more accurate auto-derived NFData instances. If you need the
--   previously used exact default rnf method implementation
--   semantics, use
--   
--   
--   instance NFData Colour where rnf x = seq x ()
--   
--   
--   or alternatively
--   
--   
--   instance NFData Colour where rnf = rwhnf
--   
--   
--   or
--   
--   
--   {-# LANGUAGE BangPatterns #-}
--   instance NFData Colour where rnf !_ = ()
--   
rnf :: NFData a => a -> ()
($dmrnf) :: (NFData a, Generic a, GNFData Zero (Rep a)) => a -> ()

-- | GHC.Generics-based rnf implementation
--   
--   This is needed in order to support deepseq < 1.4 which
--   didn't have a Generic-based default rnf implementation
--   yet.
--   
--   In order to define instances, use e.g.
--   
--   
--   instance NFData MyType where rnf = genericRnf
--   
--   
--   The implementation has been taken from deepseq-1.4.2's
--   default rnf implementation.
genericRnf :: (Generic a, GNFData (Rep a)) => a -> ()

-- | The Binary class provides put and get, methods to
--   encode and decode a Haskell value to a lazy ByteString. It
--   mirrors the Read and Show classes for textual
--   representation of Haskell types, and is suitable for serialising
--   Haskell values to disk, over the network.
--   
--   For decoding and generating simple external binary formats (e.g. C
--   structures), Binary may be used, but in general is not suitable for
--   complex protocols. Instead use the Put and Get
--   primitives directly.
--   
--   Instances of Binary should satisfy the following property:
--   
--   
--   decode . encode == id
--   
--   
--   That is, the get and put methods should be the inverse
--   of each other. A range of instances are provided for basic Haskell
--   types.
class Binary t

-- | Encode a value in the Put monad.
put :: Binary t => t -> Put
($dmput) :: (Binary t, Generic t, GBinaryPut (Rep t)) => t -> Put

-- | Decode a value in the Get monad
get :: Binary t => Get t
($dmget) :: (Binary t, Generic t, GBinaryGet (Rep t)) => Get t

-- | Encode a list of values in the Put monad. The default implementation
--   may be overridden to be more efficient but must still have the same
--   encoding format.
putList :: Binary t => [t] -> Put

-- | Class of types with a known Structure.
--   
--   For regular data types Structured can be derived generically.
--   
--   
--   data Record = Record { a :: Int, b :: Bool, c :: [Char] } deriving (Generic)
--   instance Structured Record
--   
class Typeable a => Structured a
class Applicative f => Alternative (f :: Type -> Type)
empty :: Alternative f => f a
(<|>) :: Alternative f => f a -> f a -> f a
some :: Alternative f => f a -> f [a]
many :: Alternative f => f a -> f [a]
class (Alternative m, Monad m) => MonadPlus (m :: Type -> Type)
mzero :: MonadPlus m => m a
mplus :: MonadPlus m => m a -> m a -> m a
class IsString a
fromString :: IsString a => String -> a

-- | A Map from keys k to values a.
--   
--   The Semigroup operation for Map is union, which
--   prefers values from the left operand. If m1 maps a key
--   k to a value a1, and m2 maps the same key
--   to a different value a2, then their union m1 <>
--   m2 maps k to a1.
data Map k a

-- | A set of values a.
data Set a

data NonEmptySet a
newtype Identity a
Identity :: a -> Identity a
[runIdentity] :: Identity a -> a
data Proxy (t :: k)
Proxy :: Proxy (t :: k)
newtype Const a (b :: k)
Const :: a -> Const a (b :: k)
[getConst] :: Const a (b :: k) -> a
data Void
partitionEithers :: [Either a b] -> ([a], [b])
catMaybes :: [Maybe a] -> [a]
mapMaybe :: (a -> Maybe b) -> [a] -> [b]
fromMaybe :: a -> Maybe a -> a
maybeToList :: Maybe a -> [a]
listToMaybe :: [a] -> Maybe a
isNothing :: Maybe a -> Bool
isJust :: Maybe a -> Bool
unfoldr :: (b -> Maybe (a, b)) -> b -> [a]
isPrefixOf :: Eq a => [a] -> [a] -> Bool
isSuffixOf :: Eq a => [a] -> [a] -> Bool
intercalate :: [a] -> [[a]] -> [a]
intersperse :: a -> [a] -> [a]
sort :: Ord a => [a] -> [a]
sortBy :: (a -> a -> Ordering) -> [a] -> [a]
nub :: Eq a => [a] -> [a]
nubBy :: (a -> a -> Bool) -> [a] -> [a]
partition :: (a -> Bool) -> [a] -> ([a], [a])
dropWhileEnd :: (a -> Bool) -> [a] -> [a]
data NonEmpty a
(:|) :: a -> [a] -> NonEmpty a

-- | nonEmpty efficiently turns a normal list into a NonEmpty
--   stream, producing Nothing if the input is empty.
nonEmpty :: [a] -> Maybe (NonEmpty a)
foldl1 :: (a -> a -> a) -> NonEmpty a -> a
foldr1 :: (a -> a -> a) -> NonEmpty a -> a

-- | Extract the first element of the stream.
head :: NonEmpty a -> a

-- | Extract the possibly-empty tail of the stream.
tail :: NonEmpty a -> [a]

-- | Extract the last element of the stream.
last :: NonEmpty a -> a

-- | Extract everything except the last element of the stream.
init :: NonEmpty a -> [a]
class Foldable (t :: Type -> Type)
foldMap :: (Foldable t, Monoid m) => (a -> m) -> t a -> m
foldr :: Foldable t => (a -> b -> b) -> b -> t a -> b
null :: Foldable t => t a -> Bool
length :: Foldable t => t a -> Int
find :: Foldable t => (a -> Bool) -> t a -> Maybe a
foldl' :: Foldable t => (b -> a -> b) -> b -> t a -> b
traverse_ :: (Foldable t, Applicative f) => (a -> f b) -> t a -> f ()
for_ :: (Foldable t, Applicative f) => t a -> (a -> f b) -> f ()
any :: Foldable t => (a -> Bool) -> t a -> Bool
all :: Foldable t => (a -> Bool) -> t a -> Bool
toList :: Foldable t => t a -> [a]
class (Functor t, Foldable t) => Traversable (t :: Type -> Type)
traverse :: (Traversable t, Applicative f) => (a -> f b) -> t a -> f (t b)
sequenceA :: (Traversable t, Applicative f) => t (f a) -> f (t a)
for :: (Traversable t, Applicative f) => t a -> (a -> f b) -> f (t b)
on :: (b -> b -> c) -> (a -> b) -> a -> a -> c
comparing :: Ord a => (b -> a) -> b -> b -> Ordering
first :: Arrow a => a b c -> a (b, d) (c, d)
liftM :: Monad m => (a1 -> r) -> m a1 -> m r
liftM2 :: Monad m => (a1 -> a2 -> r) -> m a1 -> m a2 -> m r
unless :: Applicative f => Bool -> f () -> f ()
when :: Applicative f => Bool -> f () -> f ()
ap :: Monad m => m (a -> b) -> m a -> m b
void :: Functor f => f a -> f ()
foldM :: (Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m b
filterM :: Applicative m => (a -> m Bool) -> [a] -> m [a]
join :: Monad m => m (m a) -> m a
guard :: Alternative f => Bool -> f ()
catch :: Exception e => IO a -> (e -> IO a) -> IO a
throwIO :: (HasCallStack, Exception e) => e -> IO a
evaluate :: a -> IO a
class (Typeable e, Show e) => Exception e
toException :: Exception e => e -> SomeException
fromException :: Exception e => SomeException -> Maybe e
displayException :: Exception e => e -> String
backtraceDesired :: Exception e => e -> Bool
data IOException
data SomeException
SomeException :: e -> SomeException

-- | Try IOException.
tryIO :: IO a -> IO (Either IOException a)

-- | Catch IOException.
catchIO :: IO a -> (IOException -> IO a) -> IO a

-- | Catch ExitCode
catchExit :: IO a -> (ExitCode -> IO a) -> IO a

-- | deepseq: fully evaluates the first argument, before returning
--   the second.
--   
--   The name deepseq is used to illustrate the relationship to
--   seq: where seq is shallow in the sense that it only
--   evaluates the top level of its argument, deepseq traverses the
--   entire data structure evaluating it completely.
--   
--   deepseq can be useful for forcing pending exceptions,
--   eradicating space leaks, or forcing lazy I/O to happen. It is also
--   useful in conjunction with parallel Strategies (see the
--   parallel package).
--   
--   There is no guarantee about the ordering of evaluation. The
--   implementation may evaluate the components of the structure in any
--   order or in parallel. To impose an actual order on evaluation, use
--   pseq from Control.Parallel in the parallel
--   package.
deepseq :: NFData a => a -> b -> b
infixr 0 `deepseq`

-- | a variant of deepseq that is useful in some circumstances:
--   
--   
--   force x = x `deepseq` x
--   
--   
--   force x fully evaluates x, and then returns it. Note
--   that force x only performs evaluation when the value of
--   force x itself is demanded, so essentially it turns shallow
--   evaluation into deep evaluation.
--   
--   force can be conveniently used in combination with
--   ViewPatterns:
--   
--   
--   {-# LANGUAGE BangPatterns, ViewPatterns #-}
--   import Control.DeepSeq
--   
--   someFun :: ComplexData -> SomeResult
--   someFun (force -> !arg) = {- 'arg' will be fully evaluated -}
--   
--   
--   Another useful application is to combine force with
--   evaluate in order to force deep evaluation relative to other
--   IO operations:
--   
--   
--   import Control.Exception (evaluate)
--   import Control.DeepSeq
--   
--   main = do
--     result <- evaluate $ force $ pureComputation
--     {- 'result' will be fully evaluated at this point -}
--     return ()
--   
--   
--   Finally, here's an exception safe variant of the readFile'
--   example:
--   
--   
--   readFile' :: FilePath -> IO String
--   readFile' fn = bracket (openFile fn ReadMode) hClose $ \h ->
--                          evaluate . force =<< hGetContents h
--   
force :: NFData a => a -> a
isSpace :: Char -> Bool
isDigit :: Char -> Bool
isUpper :: Char -> Bool
isAlpha :: Char -> Bool
isAlphaNum :: Char -> Bool
chr :: Int -> Char
ord :: Char -> Int
toLower :: Char -> Char
toUpper :: Char -> Char
absurd :: Void -> a
vacuous :: Functor f => f Void -> f a
data Word
data Word8
data Word16
data Word32
data Word64
data Int8
data Int16
data Int32
data Int64

-- | New name for <>
(<<>>) :: Doc -> Doc -> Doc

-- | Beside, separated by space, unless one of the arguments is
--   empty. <+> is associative, with identity
--   empty.
(<+>) :: Doc -> Doc -> Doc
infixl 6 <+>
data ExitCode
ExitSuccess :: ExitCode
ExitFailure :: Int -> ExitCode
exitWith :: ExitCode -> IO a
exitSuccess :: IO a
exitFailure :: IO a
readMaybe :: Read a => String -> Maybe a

-- | Deprecated: Don't leave me in the code
trace :: String -> a -> a

-- | Deprecated: Don't leave me in the code
traceShow :: Show a => a -> b -> b

-- | Deprecated: Don't leave me in the code
traceShowId :: Show a => a -> a

-- | Deprecated: Don't leave me in the code
traceM :: Applicative f => String -> f ()

-- | Deprecated: Don't leave me in the code
traceShowM :: (Show a, Applicative f) => a -> f ()
instance (Distribution.Compat.Prelude.GNFData a, Distribution.Compat.Prelude.GNFData b) => Distribution.Compat.Prelude.GNFData (a GHC.Internal.Generics.:*: b)
instance (Distribution.Compat.Prelude.GNFData a, Distribution.Compat.Prelude.GNFData b) => Distribution.Compat.Prelude.GNFData (a GHC.Internal.Generics.:+: b)
instance Control.DeepSeq.NFData a => Distribution.Compat.Prelude.GNFData (GHC.Internal.Generics.K1 i a)
instance Distribution.Compat.Prelude.GNFData a => Distribution.Compat.Prelude.GNFData (GHC.Internal.Generics.M1 i c a)
instance Distribution.Compat.Prelude.GNFData GHC.Internal.Generics.U1
instance Distribution.Compat.Prelude.GNFData GHC.Internal.Generics.V1

-- | Compact representation of short Strings
--   
--   This module is designed to be import qualified
--   
--   
--   import Distribution.Utils.ShortText (ShortText)
--   import qualified Distribution.Utils.ShortText as ShortText
--   
module Distribution.Utils.ShortText

-- | Compact representation of short Strings
--   
--   The data is stored internally as UTF8 in an ShortByteString
--   when compiled against bytestring >= 0.10.4, and otherwise
--   the fallback is to use plain old non-compat '[Char]'.
--   
--   Note: This type is for internal uses (such as e.g.
--   PackageName) and shall not be exposed in Cabal's API
data ShortText

-- | Construct ShortText from String
toShortText :: String -> ShortText

-- | Convert ShortText to String
fromShortText :: ShortText -> String

-- | Convert from UTF-8 encoded strict ByteString.
unsafeFromUTF8BS :: ByteString -> ShortText

-- | Text whether ShortText is empty.
null :: ShortText -> Bool

-- | O(n). Length in characters. Slow as converts to string.
length :: ShortText -> Int

-- | Decode String from UTF8-encoded octets.
--   
--   Invalid data in the UTF8 stream (this includes code-points
--   U+D800 through U+DFFF) will be decoded as the
--   replacement character (U+FFFD).
--   
--   See also encodeStringUtf8
decodeStringUtf8 :: [Word8] -> String

-- | Encode String to a list of UTF8-encoded octets
--   
--   Code-points in the U+D800-U+DFFF range will be
--   encoded as the replacement character (i.e. U+FFFD).
--   
--   See also decodeUtf8
encodeStringUtf8 :: String -> [Word8]
instance Data.Binary.Class.Binary Distribution.Utils.ShortText.ShortText
instance GHC.Internal.Data.Data.Data Distribution.Utils.ShortText.ShortText
instance GHC.Classes.Eq Distribution.Utils.ShortText.ShortText
instance GHC.Internal.Generics.Generic Distribution.Utils.ShortText.ShortText
instance GHC.Internal.Data.String.IsString Distribution.Utils.ShortText.ShortText
instance GHC.Internal.Base.Monoid Distribution.Utils.ShortText.ShortText
instance Control.DeepSeq.NFData Distribution.Utils.ShortText.ShortText
instance GHC.Classes.Ord Distribution.Utils.ShortText.ShortText
instance GHC.Internal.Read.Read Distribution.Utils.ShortText.ShortText
instance GHC.Internal.Base.Semigroup Distribution.Utils.ShortText.ShortText
instance GHC.Internal.Show.Show Distribution.Utils.ShortText.ShortText
instance Distribution.Utils.Structured.Structured Distribution.Utils.ShortText.ShortText

-- | A large and somewhat miscellaneous collection of utility functions
--   used throughout the rest of the Cabal lib and in other tools that use
--   the Cabal lib like cabal-install. It has a very simple set of
--   logging actions. It has low level functions for running programs, a
--   bunch of wrappers for various directory and file functions that do
--   extra logging.
module Distribution.Utils.Generic

-- | Gets the contents of a file, but guarantee that it gets closed.
--   
--   The file is read lazily but if it is not fully consumed by the action
--   then the remaining input is truncated and the file is closed.
withFileContents :: FilePath -> (String -> IO a) -> IO a

-- | Writes a file atomically.
--   
--   The file is either written successfully or an IO exception is raised
--   and the original file is left unchanged.
--   
--   On windows it is not possible to delete a file that is open by a
--   process. This case will give an IO exception but the atomic property
--   is not affected.
writeFileAtomic :: FilePath -> ByteString -> IO ()

-- | Decode String from UTF8-encoded ByteString
--   
--   Invalid data in the UTF8 stream (this includes code-points
--   U+D800 through U+DFFF) will be decoded as the
--   replacement character (U+FFFD).
fromUTF8BS :: ByteString -> String

-- | Variant of fromUTF8BS for lazy ByteStrings
fromUTF8LBS :: ByteString -> String

-- | Encode String to UTF8-encoded ByteString
--   
--   Code-points in the U+D800-U+DFFF range will be
--   encoded as the replacement character (i.e. U+FFFD).
toUTF8BS :: String -> ByteString

-- | Variant of toUTF8BS for lazy ByteStrings
toUTF8LBS :: String -> ByteString

-- | Check that strict ByteString is valid UTF8. Returns 'Just
--   offset' if it's not.
validateUTF8 :: ByteString -> Maybe Int

-- | Reads a UTF8 encoded text file as a Unicode String
--   
--   Reads lazily using ordinary readFile.
readUTF8File :: FilePath -> IO String

-- | Reads a UTF8 encoded text file as a Unicode String
--   
--   Same behaviour as withFileContents.
withUTF8FileContents :: FilePath -> (String -> IO a) -> IO a

-- | Writes a Unicode String as a UTF8 encoded text file.
--   
--   Uses writeFileAtomic, so provides the same guarantees.
writeUTF8File :: FilePath -> String -> IO ()

-- | Ignore a Unicode byte order mark (BOM) at the beginning of the input
ignoreBOM :: String -> String

-- | Fix different systems silly line ending conventions
normaliseLineEndings :: String -> String

-- | dropWhileEndLE p is equivalent to reverse . dropWhile p .
--   reverse, but quite a bit faster. The difference between
--   "Data.List.dropWhileEnd" and this version is that the one in
--   Data.List is strict in elements, but spine-lazy, while this one
--   is spine-strict but lazy in elements. That's what LE stands
--   for - "lazy in elements".
--   
--   Example:
--   
--   
--   >>> safeTail $ Data.List.dropWhileEnd (<3) [undefined, 5, 4, 3, 2, 1]
--   *** Exception: Prelude.undefined
--   ...
--   
--   
--   
--   >>> safeTail $ dropWhileEndLE (<3) [undefined, 5, 4, 3, 2, 1]
--   [5,4,3]
--   
--   
--   
--   >>> take 3 $ Data.List.dropWhileEnd (<3) [5, 4, 3, 2, 1, undefined]
--   [5,4,3]
--   
--   
--   
--   >>> take 3 $ dropWhileEndLE (<3) [5, 4, 3, 2, 1, undefined]
--   *** Exception: Prelude.undefined
--   ...
--   
dropWhileEndLE :: (a -> Bool) -> [a] -> [a]

-- | takeWhileEndLE p is equivalent to reverse . takeWhile p .
--   reverse, but is usually faster (as well as being easier to read).
takeWhileEndLE :: (a -> Bool) -> [a] -> [a]
equating :: Eq a => (b -> a) -> b -> b -> Bool
comparing :: Ord a => (b -> a) -> b -> b -> Ordering
isInfixOf :: Eq a => [a] -> [a] -> Bool
intercalate :: [a] -> [[a]] -> [a]

-- | Lower case string
--   
--   
--   >>> lowercase "Foobar"
--   "foobar"
--   
lowercase :: String -> String

-- | Ascii characters
isAscii :: Char -> Bool

-- | Ascii letters.
isAsciiAlpha :: Char -> Bool

-- | Ascii letters and digits.
--   
--   
--   >>> isAsciiAlphaNum 'a'
--   True
--   
--   
--   
--   >>> isAsciiAlphaNum 'ä'
--   False
--   
isAsciiAlphaNum :: Char -> Bool

-- | Like "Data.List.union", but has O(n log n) complexity instead
--   of O(n^2).
listUnion :: Ord a => [a] -> [a] -> [a]

-- | A right-biased version of listUnion.
--   
--   Example:
--   
--   
--   >>> listUnion [1,2,3,4,3] [2,1,1]
--   [1,2,3,4,3]
--   
--   
--   
--   >>> listUnionRight [1,2,3,4,3] [2,1,1]
--   [4,3,2,1,1]
--   
listUnionRight :: Ord a => [a] -> [a] -> [a]

-- | Like nub, but has O(n log n) complexity instead of
--   O(n^2). Code for ordNub and listUnion taken
--   from Niklas Hambüchen's ordnub package.
ordNub :: Ord a => [a] -> [a]

-- | Like ordNub and nubBy. Selects a key for each element
--   and takes the nub based on that key.
ordNubBy :: Ord b => (a -> b) -> [a] -> [a]

-- | A right-biased version of ordNub.
--   
--   Example:
--   
--   
--   >>> ordNub [1,2,1] :: [Int]
--   [1,2]
--   
--   
--   
--   >>> ordNubRight [1,2,1] :: [Int]
--   [2,1]
--   
ordNubRight :: Ord a => [a] -> [a]

-- | A total variant of head.
safeHead :: [a] -> Maybe a

-- | A total variant of tail.
safeTail :: [a] -> [a]

-- | A total variant of last.
safeLast :: [a] -> Maybe a

-- | A total variant of init.
safeInit :: [a] -> [a]
unintersperse :: Char -> String -> [String]

-- | Wraps text to the default line width. Existing newlines are preserved.
wrapText :: String -> String

-- | Wraps a list of words to a list of lines of words of a particular
--   width.
wrapLine :: Int -> [String] -> [[String]]

-- | unfoldr with monadic action.
--   
--   
--   >>> take 5 $ unfoldrM (\b r -> Just (r + b, b + 1)) (1 :: Int) 2
--   [3,4,5,6,7]
--   
unfoldrM :: Monad m => (b -> m (Maybe (a, b))) -> b -> m [a]

-- | Like span but with Maybe predicate
--   
--   
--   >>> spanMaybe listToMaybe [[1,2],[3],[],[4,5],[6,7]]
--   ([1,3],[[],[4,5],[6,7]])
--   
--   
--   
--   >>> spanMaybe (readMaybe :: String -> Maybe Int) ["1", "2", "foo"]
--   ([1,2],["foo"])
--   
spanMaybe :: (a -> Maybe b) -> [a] -> ([b], [a])

-- | Like break, but with Maybe predicate
--   
--   
--   >>> breakMaybe (readMaybe :: String -> Maybe Int) ["foo", "bar", "1", "2", "quu"]
--   (["foo","bar"],Just (1,["2","quu"]))
--   
--   
--   
--   >>> breakMaybe (readMaybe :: String -> Maybe Int) ["foo", "bar"]
--   (["foo","bar"],Nothing)
--   
breakMaybe :: (a -> Maybe b) -> [a] -> ([a], Maybe (b, [a]))

-- | The opposite of snoc, which is the reverse of cons
--   
--   Example:
--   
--   
--   >>> unsnoc [1, 2, 3]
--   Just ([1,2],3)
--   
--   
--   
--   >>> unsnoc []
--   Nothing
--   
unsnoc :: [a] -> Maybe ([a], a)

-- | Like unsnoc, but for NonEmpty so without the
--   Maybe
--   
--   Example:
--   
--   
--   >>> unsnocNE (1 :| [2, 3])
--   ([1,2],3)
--   
--   
--   
--   >>> unsnocNE (1 :| [])
--   ([],1)
--   
unsnocNE :: NonEmpty a -> ([a], a)

fstOf3 :: (a, b, c) -> a

sndOf3 :: (a, b, c) -> b

trdOf3 :: (a, b, c) -> c

-- | isAbsoluteOnAnyPlatform and isRelativeOnAnyPlatform are
--   like isAbsolute and isRelative but have platform
--   independent heuristics. The System.FilePath exists in two versions,
--   Windows and Posix. The two versions don't agree on what is a relative
--   path and we don't know if we're given Windows or Posix paths. This
--   results in false positives when running on Posix and inspecting
--   Windows paths, like the hackage server does.
--   System.FilePath.Posix.isAbsolute "C:\hello" == False
--   System.FilePath.Windows.isAbsolute "/hello" == False This means that
--   we would treat paths that start with "/" to be absolute. On Posix they
--   are indeed absolute, while on Windows they are not.
--   
--   The portable versions should be used when we might deal with paths
--   that are from another OS than the host OS. For example, the Hackage
--   Server deals with both Windows and Posix paths while performing the
--   PackageDescription checks. In contrast, when we run 'cabal configure'
--   we do expect the paths to be correct for our OS and we should not have
--   to use the platform independent heuristics.
isAbsoluteOnAnyPlatform :: FilePath -> Bool

-- | 
--   isRelativeOnAnyPlatform = not . isAbsoluteOnAnyPlatform
--   
isRelativeOnAnyPlatform :: FilePath -> Bool

module Distribution.Types.Condition

-- | A boolean expression parameterized over the variable type used.
data Condition c
Var :: c -> Condition c
Lit :: Bool -> Condition c
CNot :: Condition c -> Condition c
COr :: Condition c -> Condition c -> Condition c
CAnd :: Condition c -> Condition c -> Condition c

-- | Boolean negation of a Condition value.
cNot :: Condition a -> Condition a

-- | Boolean AND of two Condition values.
cAnd :: Condition a -> Condition a -> Condition a

-- | Boolean OR of two Condition values.
cOr :: Eq v => Condition v -> Condition v -> Condition v

-- | Simplify the condition and return its free variables.
simplifyCondition :: Condition c -> (c -> Either d Bool) -> (Condition d, [d])
instance GHC.Internal.Base.Alternative Distribution.Types.Condition.Condition
instance GHC.Internal.Base.Applicative Distribution.Types.Condition.Condition
instance Data.Binary.Class.Binary c => Data.Binary.Class.Binary (Distribution.Types.Condition.Condition c)
instance GHC.Internal.Data.Data.Data c => GHC.Internal.Data.Data.Data (Distribution.Types.Condition.Condition c)
instance GHC.Classes.Eq c => GHC.Classes.Eq (Distribution.Types.Condition.Condition c)
instance GHC.Internal.Data.Foldable.Foldable Distribution.Types.Condition.Condition
instance GHC.Internal.Base.Functor Distribution.Types.Condition.Condition
instance GHC.Internal.Generics.Generic (Distribution.Types.Condition.Condition c)
instance GHC.Internal.Base.Monad Distribution.Types.Condition.Condition
instance GHC.Internal.Base.MonadPlus Distribution.Types.Condition.Condition
instance GHC.Internal.Base.Monoid (Distribution.Types.Condition.Condition a)
instance Control.DeepSeq.NFData c => Control.DeepSeq.NFData (Distribution.Types.Condition.Condition c)
instance GHC.Internal.Base.Semigroup (Distribution.Types.Condition.Condition a)
instance GHC.Internal.Show.Show c => GHC.Internal.Show.Show (Distribution.Types.Condition.Condition c)
instance Distribution.Utils.Structured.Structured c => Distribution.Utils.Structured.Structured (Distribution.Types.Condition.Condition c)
instance GHC.Internal.Data.Traversable.Traversable Distribution.Types.Condition.Condition

module Distribution.Parsec.Position

-- | 1-indexed row and column positions in a file.
data Position
Position :: {-# UNPACK #-} !Int -> {-# UNPACK #-} !Int -> Position

-- | Shift position by n columns to the right.
incPos :: Int -> Position -> Position

-- | Shift position to beginning of next row.
retPos :: Position -> Position
showPos :: Position -> String
zeroPos :: Position

positionCol :: Position -> Int

positionRow :: Position -> Int
instance Data.Binary.Class.Binary Distribution.Parsec.Position.Position
instance GHC.Classes.Eq Distribution.Parsec.Position.Position
instance GHC.Internal.Generics.Generic Distribution.Parsec.Position.Position
instance Control.DeepSeq.NFData Distribution.Parsec.Position.Position
instance GHC.Classes.Ord Distribution.Parsec.Position.Position
instance GHC.Internal.Show.Show Distribution.Parsec.Position.Position

module Distribution.Parsec.Warning

-- | Parser warning.
data PWarning
PWarning :: !PWarnType -> !Position -> String -> PWarning

-- | Type of parser warning. We do classify warnings.
--   
--   Different application may decide not to show some, or have fatal
--   behaviour on others
data PWarnType

-- | Unclassified warning
PWTOther :: PWarnType

-- | Invalid UTF encoding
PWTUTF :: PWarnType

-- | true or false, not True or False
PWTBoolCase :: PWarnType

-- | there are version with tags
PWTVersionTag :: PWarnType

-- | New syntax used, but no cabal-version: >= 1.2 specified
PWTNewSyntax :: PWarnType

-- | Old syntax used, and cabal-version >= 1.2 specified
PWTOldSyntax :: PWarnType
PWTDeprecatedField :: PWarnType
PWTInvalidSubsection :: PWarnType
PWTUnknownField :: PWarnType
PWTUnknownSection :: PWarnType
PWTTrailingFields :: PWarnType

-- | extra main-is field
PWTExtraMainIs :: PWarnType

-- | extra test-module field
PWTExtraTestModule :: PWarnType

-- | extra benchmark-module field
PWTExtraBenchmarkModule :: PWarnType
PWTLexNBSP :: PWarnType
PWTLexBOM :: PWarnType
PWTLexTab :: PWarnType

-- | legacy cabal file that we know how to patch
PWTQuirkyCabalFile :: PWarnType

-- | Double dash token, most likely it's a mistake - it's not a comment
PWTDoubleDash :: PWarnType

-- | e.g. name or version should be specified only once.
PWTMultipleSingularField :: PWarnType

-- | Workaround for derive-package having build-type: Default. See
--   https://github.com/haskell/cabal/issues/5020.
PWTBuildTypeDefault :: PWarnType

-- | Version operators used (without cabal-version: 1.8)
PWTVersionOperator :: PWarnType

-- | Version wildcard used (without cabal-version: 1.6)
PWTVersionWildcard :: PWarnType

-- | Warnings about cabal-version format.
PWTSpecVersion :: PWarnType

-- | Empty filepath, i.e. literally ""
PWTEmptyFilePath :: PWarnType

-- | sections contents (sections and fields) are indented inconsistently
PWTInconsistentIndentation :: PWarnType

-- | Experimental feature
PWTExperimental :: PWarnType
showPWarning :: FilePath -> PWarning -> String
instance Data.Binary.Class.Binary Distribution.Parsec.Warning.PWarnType
instance Data.Binary.Class.Binary Distribution.Parsec.Warning.PWarning
instance GHC.Internal.Enum.Bounded Distribution.Parsec.Warning.PWarnType
instance GHC.Internal.Enum.Enum Distribution.Parsec.Warning.PWarnType
instance GHC.Classes.Eq Distribution.Parsec.Warning.PWarnType
instance GHC.Classes.Eq Distribution.Parsec.Warning.PWarning
instance GHC.Internal.Generics.Generic Distribution.Parsec.Warning.PWarnType
instance GHC.Internal.Generics.Generic Distribution.Parsec.Warning.PWarning
instance Control.DeepSeq.NFData Distribution.Parsec.Warning.PWarnType
instance Control.DeepSeq.NFData Distribution.Parsec.Warning.PWarning
instance GHC.Classes.Ord Distribution.Parsec.Warning.PWarnType
instance GHC.Classes.Ord Distribution.Parsec.Warning.PWarning
instance GHC.Internal.Show.Show Distribution.Parsec.Warning.PWarnType
instance GHC.Internal.Show.Show Distribution.Parsec.Warning.PWarning

module Distribution.Parsec.FieldLineStream

-- | This is essentially a lazy bytestring, but chunks are glued with
--   newline '\n'.
data FieldLineStream
FLSLast :: !ByteString -> FieldLineStream
FLSCons :: {-# UNPACK #-} !ByteString -> FieldLineStream -> FieldLineStream

-- | Convert String to FieldLineStream.
--   
--   Note: inefficient!
fieldLineStreamFromString :: String -> FieldLineStream
fieldLineStreamFromBS :: ByteString -> FieldLineStream
fieldLineStreamEnd :: FieldLineStream
instance GHC.Internal.Show.Show Distribution.Parsec.FieldLineStream.FieldLineStream
instance GHC.Internal.Base.Monad m => Text.Parsec.Prim.Stream Distribution.Parsec.FieldLineStream.FieldLineStream m GHC.Types.Char

module Distribution.Parsec.Error

-- | Parser error.
data PError
PError :: Position -> String -> PError
showPError :: FilePath -> PError -> String
instance Data.Binary.Class.Binary Distribution.Parsec.Error.PError
instance GHC.Internal.Generics.Generic Distribution.Parsec.Error.PError
instance Control.DeepSeq.NFData Distribution.Parsec.Error.PError
instance GHC.Internal.Show.Show Distribution.Parsec.Error.PError

module Distribution.PackageDescription.Quirks

-- | Patch legacy .cabal file contents to allow parsec parser to
--   accept all of Hackage.
--   
--   Bool part of the result tells whether the output is modified.
patchQuirks :: ByteString -> (Bool, ByteString)

module Distribution.Fields.LexerMonad
type InputStream = ByteString
data LexState
LexState :: {-# UNPACK #-} !Position -> {-# UNPACK #-} !InputStream -> {-# UNPACK #-} !StartCode -> [LexWarning] -> LexState

-- | position at current input location
[curPos] :: LexState -> {-# UNPACK #-} !Position

-- | the current input
[curInput] :: LexState -> {-# UNPACK #-} !InputStream

-- | lexer code
[curCode] :: LexState -> {-# UNPACK #-} !StartCode
[warnings] :: LexState -> [LexWarning]
data LexResult a
LexResult :: {-# UNPACK #-} !LexState -> a -> LexResult a
newtype Lex a
Lex :: (LexState -> LexResult a) -> Lex a
[unLex] :: Lex a -> LexState -> LexResult a

-- | Execute the given lexer on the supplied input stream.
execLexer :: Lex a -> InputStream -> ([LexWarning], a)
getPos :: Lex Position
setPos :: Position -> Lex ()
adjustPos :: (Position -> Position) -> Lex ()
getInput :: Lex InputStream
setInput :: InputStream -> Lex ()
getStartCode :: Lex Int
setStartCode :: Int -> Lex ()
data LexWarning
LexWarning :: !LexWarningType -> {-# UNPACK #-} !Position -> LexWarning
data LexWarningType

-- | Encountered non breaking space
LexWarningNBSP :: LexWarningType

-- | BOM at the start of the cabal file
LexWarningBOM :: LexWarningType

-- | Leading tags
LexWarningTab :: LexWarningType

-- | indentation decreases
LexInconsistentIndentation :: LexWarningType

-- | Brace syntax used
LexBraces :: LexWarningType

-- | Add warning at the current position
addWarning :: LexWarningType -> Lex ()

-- | Add warning at specific position
addWarningAt :: Position -> LexWarningType -> Lex ()
toPWarnings :: [LexWarning] -> [PWarning]
instance GHC.Internal.Base.Applicative Distribution.Fields.LexerMonad.Lex
instance GHC.Classes.Eq Distribution.Fields.LexerMonad.LexWarningType
instance GHC.Internal.Base.Functor Distribution.Fields.LexerMonad.Lex
instance GHC.Internal.Base.Monad Distribution.Fields.LexerMonad.Lex
instance GHC.Classes.Ord Distribution.Fields.LexerMonad.LexWarningType
instance GHC.Internal.Show.Show Distribution.Fields.LexerMonad.LexWarning
instance GHC.Internal.Show.Show Distribution.Fields.LexerMonad.LexWarningType

-- | Lexer for the cabal files.
module Distribution.Fields.Lexer
ltest :: Int -> String -> IO ()
lexToken :: Lex LToken

-- | Tokens of outer cabal file structure. Field values are treated
--   opaquely.
data Token

-- | Haskell-like identifier, number or operator
TokSym :: !ByteString -> Token

-- | String in quotes
TokStr :: !ByteString -> Token

-- | Operators and parens
TokOther :: !ByteString -> Token

-- | Indentation token
Indent :: !Int -> Token

-- | Lines after :
TokFieldLine :: !ByteString -> Token
Colon :: Token
OpenBrace :: Token
CloseBrace :: Token
EOF :: Token
LexicalError :: InputStream -> Token
data LToken
L :: !Position -> !Token -> LToken
bol_section :: Int
in_section :: Int
in_field_layout :: Int
in_field_braces :: Int
mkLexState :: ByteString -> LexState
instance GHC.Internal.Show.Show Distribution.Fields.Lexer.LToken
instance GHC.Internal.Show.Show Distribution.Fields.Lexer.Token

-- | Alternative parser combinators.
--   
--   Originally in parsers package.
module Distribution.Compat.Parsing

-- | choice ps tries to apply the parsers in the list ps
--   in order, until one of them succeeds. Returns the value of the
--   succeeding parser.
choice :: Alternative m => [m a] -> m a

-- | option x p tries to apply parser p. If p
--   fails without consuming input, it returns the value x,
--   otherwise the value returned by p.
--   
--   
--   priority = option 0 (digitToInt <$> digit)
--   
option :: Alternative m => a -> m a -> m a

-- | One or none.
--   
--   It is useful for modelling any computation that is allowed to fail.
--   
--   
Examples
--   
--   Using the Alternative instance of Control.Monad.Except,
--   the following functions:
--   
--   
--   >>> import Control.Monad.Except
--   
--   
--   
--   >>> canFail = throwError "it failed" :: Except String Int
--   
--   >>> final = return 42                :: Except String Int
--   
--   
--   Can be combined by allowing the first function to fail:
--   
--   
--   >>> runExcept $ canFail *> final
--   Left "it failed"
--   
--   
--   
--   >>> runExcept $ optional canFail *> final
--   Right 42
--   
optional :: Alternative f => f a -> f (Maybe a)

-- | skipOptional p tries to apply parser p. It will
--   parse p or nothing. It only fails if p fails after
--   consuming input. It discards the result of p. (Plays the role
--   of parsec's optional, which conflicts with Applicative's optional)
skipOptional :: Alternative m => m a -> m ()

-- | between open close p parses open, followed by
--   p and close. Returns the value returned by
--   p.
--   
--   
--   braces  = between (symbol "{") (symbol "}")
--   
between :: Applicative m => m bra -> m ket -> m a -> m a
some :: Alternative f => f a -> f [a]
many :: Alternative f => f a -> f [a]

-- | sepBy p sep parses zero or more occurrences of
--   p, separated by sep. Returns a list of values
--   returned by p.
--   
--   
--   commaSep p  = p `sepBy` (symbol ",")
--   
sepBy :: Alternative m => m a -> m sep -> m [a]

-- | sepByNonEmpty p sep parses one or more occurrences of
--   p, separated by sep. Returns a non-empty list of
--   values returned by p.
sepByNonEmpty :: Alternative m => m a -> m sep -> m (NonEmpty a)

-- | sepEndByNonEmpty p sep parses one or more occurrences
--   of p, separated and optionally ended by sep. Returns
--   a non-empty list of values returned by p.
sepEndByNonEmpty :: Alternative m => m a -> m sep -> m (NonEmpty a)

-- | sepEndBy p sep parses zero or more occurrences of
--   p, separated and optionally ended by sep, ie.
--   haskell style statements. Returns a list of values returned by
--   p.
--   
--   
--   haskellStatements  = haskellStatement `sepEndBy` semi
--   
sepEndBy :: Alternative m => m a -> m sep -> m [a]

-- | endByNonEmpty p sep parses one or more occurrences of
--   p, separated and ended by sep. Returns a non-empty
--   list of values returned by p.
endByNonEmpty :: Alternative m => m a -> m sep -> m (NonEmpty a)

-- | endBy p sep parses zero or more occurrences of
--   p, separated and ended by sep. Returns a list of
--   values returned by p.
--   
--   
--   cStatements  = cStatement `endBy` semi
--   
endBy :: Alternative m => m a -> m sep -> m [a]

-- | count n p parses n occurrences of p. If
--   n is smaller or equal to zero, the parser equals to
--   return []. Returns a list of n values returned by
--   p.
count :: Applicative m => Int -> m a -> m [a]

-- | chainl p op x parses zero or more occurrences of
--   p, separated by op. Returns a value obtained by a
--   left associative application of all functions returned by
--   op to the values returned by p. If there are zero
--   occurrences of p, the value x is returned.
chainl :: Alternative m => m a -> m (a -> a -> a) -> a -> m a

-- | chainr p op x parses zero or more occurrences of
--   p, separated by op Returns a value obtained by a
--   right associative application of all functions returned by
--   op to the values returned by p. If there are no
--   occurrences of p, the value x is returned.
chainr :: Alternative m => m a -> m (a -> a -> a) -> a -> m a

-- | chainl1 p op x parses one or more occurrences of
--   p, separated by op Returns a value obtained by a
--   left associative application of all functions returned by
--   op to the values returned by p. . This parser can
--   for example be used to eliminate left recursion which typically occurs
--   in expression grammars.
--   
--   
--   expr   = term   `chainl1` addop
--   term   = factor `chainl1` mulop
--   factor = parens expr <|> integer
--   
--   mulop  = (*) <$ symbol "*"
--        <|> div <$ symbol "/"
--   
--   addop  = (+) <$ symbol "+"
--        <|> (-) <$ symbol "-"
--   
chainl1 :: Alternative m => m a -> m (a -> a -> a) -> m a

-- | chainr1 p op x parses one or more occurrences of
--   p, separated by op Returns a value obtained by a
--   right associative application of all functions returned by
--   op to the values returned by p.
chainr1 :: Alternative m => m a -> m (a -> a -> a) -> m a

-- | manyTill p end applies parser p zero or more
--   times until parser end succeeds. Returns the list of values
--   returned by p. This parser can be used to scan comments:
--   
--   
--   simpleComment   = do{ string "<!--"
--                       ; manyTill anyChar (try (string "-->"))
--                       }
--   
--   
--   Note the overlapping parsers anyChar and string
--   "-->", and therefore the use of the try combinator.
manyTill :: Alternative m => m a -> m end -> m [a]

-- | Additional functionality needed to describe parsers independent of
--   input type.
class Alternative m => Parsing (m :: Type -> Type)

-- | Take a parser that may consume input, and on failure, go back to where
--   we started and fail as if we didn't consume input.
try :: Parsing m => m a -> m a

-- | Give a parser a name
(<?>) :: Parsing m => m a -> String -> m a

-- | A version of many that discards its input. Specialized because it can
--   often be implemented more cheaply.
skipMany :: Parsing m => m a -> m ()

-- | skipSome p applies the parser p one or more
--   times, skipping its result. (aka skipMany1 in parsec)
skipSome :: Parsing m => m a -> m ()

-- | Used to emit an error on an unexpected token
unexpected :: Parsing m => String -> m a

-- | This parser only succeeds at the end of the input. This is not a
--   primitive parser but it is defined using notFollowedBy.
--   
--   
--   eof  = notFollowedBy anyChar <?> "end of input"
--   
eof :: Parsing m => m ()

-- | notFollowedBy p only succeeds when parser p fails.
--   This parser does not consume any input. This parser can be used to
--   implement the 'longest match' rule. For example, when recognizing
--   keywords (for example let), we want to make sure that a
--   keyword is not followed by a legal identifier character, in which case
--   the keyword is actually an identifier (for example lets). We
--   can program this behaviour as follows:
--   
--   
--   keywordLet  = try $ string "let" <* notFollowedBy alphaNum
--   
notFollowedBy :: (Parsing m, Show a) => m a -> m ()
infixr 0 <?>
instance (Distribution.Compat.Parsing.Parsing m, GHC.Internal.Base.Monad m) => Distribution.Compat.Parsing.Parsing (Control.Monad.Trans.Identity.IdentityT m)
instance (Text.Parsec.Prim.Stream s m t, GHC.Internal.Show.Show t) => Distribution.Compat.Parsing.Parsing (Text.Parsec.Prim.ParsecT s u m)
instance (Distribution.Compat.Parsing.Parsing m, GHC.Internal.Base.MonadPlus m, GHC.Internal.Base.Monoid w) => Distribution.Compat.Parsing.Parsing (Control.Monad.Trans.RWS.Strict.RWST r w s m)
instance (Distribution.Compat.Parsing.Parsing m, GHC.Internal.Base.MonadPlus m, GHC.Internal.Base.Monoid w) => Distribution.Compat.Parsing.Parsing (Control.Monad.Trans.RWS.Lazy.RWST r w s m)
instance (Distribution.Compat.Parsing.Parsing m, GHC.Internal.Base.MonadPlus m) => Distribution.Compat.Parsing.Parsing (Control.Monad.Trans.Reader.ReaderT e m)
instance (Distribution.Compat.Parsing.Parsing m, GHC.Internal.Base.MonadPlus m) => Distribution.Compat.Parsing.Parsing (Control.Monad.Trans.State.Strict.StateT s m)
instance (Distribution.Compat.Parsing.Parsing m, GHC.Internal.Base.MonadPlus m) => Distribution.Compat.Parsing.Parsing (Control.Monad.Trans.State.Lazy.StateT s m)
instance (Distribution.Compat.Parsing.Parsing m, GHC.Internal.Base.MonadPlus m, GHC.Internal.Base.Monoid w) => Distribution.Compat.Parsing.Parsing (Control.Monad.Trans.Writer.Lazy.WriterT w m)
instance (Distribution.Compat.Parsing.Parsing m, GHC.Internal.Base.MonadPlus m, GHC.Internal.Base.Monoid w) => Distribution.Compat.Parsing.Parsing (Control.Monad.Trans.Writer.Strict.WriterT w m)

-- | A very simple difference list.
module Distribution.Compat.DList

-- | Difference list.
data DList a
runDList :: DList a -> [a]

empty :: DList a

-- | Make DList containing single element.
singleton :: a -> DList a
fromList :: [a] -> DList a
toList :: DList a -> [a]
snoc :: DList a -> a -> DList a
instance GHC.Internal.Base.Monoid (Distribution.Compat.DList.DList a)
instance GHC.Internal.Base.Semigroup (Distribution.Compat.DList.DList a)

-- | This module provides very basic lens functionality, without extra
--   dependencies.
--   
--   For the documentation of the combinators see lens package. This
--   module uses the same vocabulary.
module Distribution.Compat.Lens
type Lens s t a b = forall (f :: Type -> Type). Functor f => LensLike f s t a b
type Lens' s a = Lens s s a a
type Traversal s t a b = forall (f :: Type -> Type). Applicative f => LensLike f s t a b
type Traversal' s a = Traversal s s a a
type LensLike (f :: Type -> Type) s t a b = a -> f b -> s -> f t
type LensLike' (f :: Type -> Type) s a = a -> f a -> s -> f s
type Getting r s a = LensLike Const r :: Type -> Type s s a a
type AGetter s a = LensLike Const a :: Type -> Type s s a a
type ASetter s t a b = LensLike Identity s t a b
type ALens s t a b = LensLike Pretext a b s t a b
type ALens' s a = ALens s s a a
view :: Getting a s a -> s -> a
use :: MonadState s m => Getting a s a -> m a

-- | 
--   >>> (3 :: Int) ^. getting (+2) . getting show
--   "5"
--   
getting :: (s -> a) -> Getting r s a
set :: ASetter s t a b -> b -> s -> t
over :: ASetter s t a b -> (a -> b) -> s -> t
toDListOf :: Getting (DList a) s a -> s -> DList a
toListOf :: Getting (DList a) s a -> s -> [a]
toSetOf :: Getting (Set a) s a -> s -> Set a
cloneLens :: Functor f => ALens s t a b -> LensLike f s t a b
aview :: ALens s t a b -> s -> a
_1 :: forall a c b f. Functor f => LensLike f (a, c) (b, c) a b
_2 :: forall c a b f. Functor f => LensLike f (c, a) (c, b) a b

-- | & is a reverse application operator
(&) :: a -> (a -> b) -> b
infixl 1 &
(^.) :: s -> Getting a s a -> a
infixl 8 ^.
(.~) :: ASetter s t a b -> b -> s -> t
infixr 4 .~
(?~) :: ASetter s t a (Maybe b) -> b -> s -> t
infixr 4 ?~
(%~) :: ASetter s t a b -> (a -> b) -> s -> t
infixr 4 %~
(.=) :: MonadState s m => ASetter s s a b -> b -> m ()
infixr 4 .=
(?=) :: MonadState s m => ASetter s s a (Maybe b) -> b -> m ()
infixr 4 ?=
(%=) :: MonadState s m => ASetter s s a b -> (a -> b) -> m ()
infixr 4 %=
(^#) :: s -> ALens s t a b -> a
infixl 8 ^#
(#~) :: ALens s t a b -> b -> s -> t
infixr 4 #~
(#%~) :: ALens s t a b -> (a -> b) -> s -> t
infixr 4 #%~

-- | lens variant is also parametrised by profunctor.
data Pretext a b t
Pretext :: (forall (f :: Type -> Type). Functor f => (a -> f b) -> f t) -> Pretext a b t
[runPretext] :: Pretext a b t -> forall (f :: Type -> Type). Functor f => (a -> f b) -> f t
instance GHC.Internal.Base.Functor (Distribution.Compat.Lens.Pretext a b)

module Distribution.Types.CondTree

-- | A CondTree is used to represent the conditional structure of a
--   Cabal file, reflecting a syntax element subject to constraints, and
--   then any number of sub-elements which may be enabled subject to some
--   condition. Both a and c are usually Monoids.
--   
--   To be more concrete, consider the following fragment of a
--   Cabal file:
--   
--   
--   build-depends: base >= 4.0
--   if flag(extra)
--       build-depends: base >= 4.2
--   
--   
--   One way to represent this is to have CondTree
--   ConfVar [Dependency] BuildInfo. Here,
--   condTreeData represents the actual fields which are not behind
--   any conditional, while condTreeComponents recursively records
--   any further fields which are behind a conditional.
--   condTreeConstraints records the constraints (in this case,
--   base >= 4.0) which would be applied if you use this
--   syntax; in general, this is derived off of targetBuildInfo
--   (perhaps a good refactoring would be to convert this into an opaque
--   type, with a smart constructor that pre-computes the dependencies.)
data CondTree v c a
CondNode :: a -> c -> [CondBranch v c a] -> CondTree v c a
[condTreeData] :: CondTree v c a -> a
[condTreeConstraints] :: CondTree v c a -> c
[condTreeComponents] :: CondTree v c a -> [CondBranch v c a]

-- | A CondBranch represents a conditional branch, e.g., if
--   flag(foo) on some syntax a. It also has an optional
--   false branch.
data CondBranch v c a
CondBranch :: Condition v -> CondTree v c a -> Maybe (CondTree v c a) -> CondBranch v c a
[condBranchCondition] :: CondBranch v c a -> Condition v
[condBranchIfTrue] :: CondBranch v c a -> CondTree v c a
[condBranchIfFalse] :: CondBranch v c a -> Maybe (CondTree v c a)
condIfThen :: Condition v -> CondTree v c a -> CondBranch v c a
condIfThenElse :: Condition v -> CondTree v c a -> CondTree v c a -> CondBranch v c a

-- | Flatten a CondTree. This will traverse the CondTree by taking all
--   possible paths into account, but merging inclusive when two paths may
--   co-exist, and exclusively when the paths are an if/else
foldCondTree :: b -> ((c, a) -> b) -> (b -> b -> b) -> (b -> b -> b) -> CondTree v c a -> b
mapCondTree :: (a -> b) -> (c -> d) -> (Condition v -> Condition w) -> CondTree v c a -> CondTree w d b
mapTreeConstrs :: (c -> d) -> CondTree v c a -> CondTree v d a
mapTreeConds :: (Condition v -> Condition w) -> CondTree v c a -> CondTree w c a
mapTreeData :: (a -> b) -> CondTree v c a -> CondTree v c b

-- | @Traversal@ for the variables
traverseCondTreeV :: forall v c a w f. Applicative f => LensLike f (CondTree v c a) (CondTree w c a) v w

-- | @Traversal@ for the variables
traverseCondBranchV :: forall v c a w f. Applicative f => LensLike f (CondBranch v c a) (CondBranch w c a) v w

-- | @Traversal@ for the aggregated constraints
traverseCondTreeC :: forall v c a d f. Applicative f => LensLike f (CondTree v c a) (CondTree v d a) c d

-- | @Traversal@ for the aggregated constraints
traverseCondBranchC :: forall v c a d f. Applicative f => LensLike f (CondBranch v c a) (CondBranch v d a) c d

-- | Extract the condition matched by the given predicate from a cond tree.
--   
--   We use this mainly for extracting buildable conditions (see the Note
--   in Distribution.PackageDescription.Configuration), but the function is
--   in fact more general.
extractCondition :: Eq v => (a -> Bool) -> CondTree v c a -> Condition v

-- | Flattens a CondTree using a partial flag assignment. When a condition
--   cannot be evaluated, both branches are ignored.
simplifyCondTree :: (Semigroup a, Semigroup d) => (v -> Either v Bool) -> CondTree v d a -> (d, a)

-- | Realizes a CondBranch using partial flag assignment. When a
--   condition cannot be evaluated, returns Nothing.
simplifyCondBranch :: (Semigroup a, Semigroup d) => (v -> Either v Bool) -> CondBranch v d a -> Maybe (d, a)

-- | Flatten a CondTree. This will resolve the CondTree by taking all
--   possible paths into account. Note that since branches represent
--   exclusive choices this may not result in a "sane" result.
ignoreConditions :: (Semigroup a, Semigroup c) => CondTree v c a -> (a, c)
instance (Data.Binary.Class.Binary v, Data.Binary.Class.Binary c, Data.Binary.Class.Binary a) => Data.Binary.Class.Binary (Distribution.Types.CondTree.CondBranch v c a)
instance (Data.Binary.Class.Binary v, Data.Binary.Class.Binary c, Data.Binary.Class.Binary a) => Data.Binary.Class.Binary (Distribution.Types.CondTree.CondTree v c a)
instance (GHC.Internal.Data.Data.Data v, GHC.Internal.Data.Data.Data c, GHC.Internal.Data.Data.Data a) => GHC.Internal.Data.Data.Data (Distribution.Types.CondTree.CondBranch v c a)
instance (GHC.Internal.Data.Data.Data v, GHC.Internal.Data.Data.Data a, GHC.Internal.Data.Data.Data c) => GHC.Internal.Data.Data.Data (Distribution.Types.CondTree.CondTree v c a)
instance (GHC.Classes.Eq v, GHC.Classes.Eq a, GHC.Classes.Eq c) => GHC.Classes.Eq (Distribution.Types.CondTree.CondBranch v c a)
instance (GHC.Classes.Eq a, GHC.Classes.Eq c, GHC.Classes.Eq v) => GHC.Classes.Eq (Distribution.Types.CondTree.CondTree v c a)
instance GHC.Internal.Data.Foldable.Foldable (Distribution.Types.CondTree.CondBranch v c)
instance GHC.Internal.Data.Foldable.Foldable (Distribution.Types.CondTree.CondTree v c)
instance GHC.Internal.Base.Functor (Distribution.Types.CondTree.CondBranch v c)
instance GHC.Internal.Base.Functor (Distribution.Types.CondTree.CondTree v c)
instance GHC.Internal.Generics.Generic (Distribution.Types.CondTree.CondBranch v c a)
instance GHC.Internal.Generics.Generic (Distribution.Types.CondTree.CondTree v c a)
instance (GHC.Internal.Base.Semigroup a, GHC.Internal.Base.Semigroup c, GHC.Internal.Base.Monoid a, GHC.Internal.Base.Monoid c) => GHC.Internal.Base.Monoid (Distribution.Types.CondTree.CondTree v c a)
instance (Control.DeepSeq.NFData v, Control.DeepSeq.NFData c, Control.DeepSeq.NFData a) => Control.DeepSeq.NFData (Distribution.Types.CondTree.CondBranch v c a)
instance (Control.DeepSeq.NFData v, Control.DeepSeq.NFData c, Control.DeepSeq.NFData a) => Control.DeepSeq.NFData (Distribution.Types.CondTree.CondTree v c a)
instance (GHC.Internal.Base.Semigroup a, GHC.Internal.Base.Semigroup c) => GHC.Internal.Base.Semigroup (Distribution.Types.CondTree.CondTree v c a)
instance (GHC.Internal.Show.Show v, GHC.Internal.Show.Show a, GHC.Internal.Show.Show c) => GHC.Internal.Show.Show (Distribution.Types.CondTree.CondBranch v c a)
instance (GHC.Internal.Show.Show a, GHC.Internal.Show.Show c, GHC.Internal.Show.Show v) => GHC.Internal.Show.Show (Distribution.Types.CondTree.CondTree v c a)
instance (Distribution.Utils.Structured.Structured v, Distribution.Utils.Structured.Structured c, Distribution.Utils.Structured.Structured a) => Distribution.Utils.Structured.Structured (Distribution.Types.CondTree.CondBranch v c a)
instance (Distribution.Utils.Structured.Structured v, Distribution.Utils.Structured.Structured c, Distribution.Utils.Structured.Structured a) => Distribution.Utils.Structured.Structured (Distribution.Types.CondTree.CondTree v c a)
instance GHC.Internal.Data.Traversable.Traversable (Distribution.Types.CondTree.CondBranch v c)
instance GHC.Internal.Data.Traversable.Traversable (Distribution.Types.CondTree.CondTree v c)

-- | Parsers for character streams
--   
--   Originally in parsers package.
module Distribution.Compat.CharParsing

-- | oneOf cs succeeds if the current character is in the supplied
--   list of characters cs. Returns the parsed character. See also
--   satisfy.
--   
--   
--   vowel  = oneOf "aeiou"
--   
oneOf :: CharParsing m => [Char] -> m Char

-- | As the dual of oneOf, noneOf cs succeeds if the
--   current character is not in the supplied list of characters
--   cs. Returns the parsed character.
--   
--   
--   consonant = noneOf "aeiou"
--   
noneOf :: CharParsing m => [Char] -> m Char

-- | Skips zero or more white space characters. See also
--   skipMany.
spaces :: CharParsing m => m ()

-- | Parses a white space character (any character which satisfies
--   isSpace) Returns the parsed character.
space :: CharParsing m => m Char

-- | Parses a newline character ('\n'). Returns a newline character.
newline :: CharParsing m => m Char

-- | Parses a tab character ('\t'). Returns a tab character.
tab :: CharParsing m => m Char

-- | Parses an upper case letter. Returns the parsed character.
upper :: CharParsing m => m Char

-- | Parses a lower case character. Returns the parsed character.
lower :: CharParsing m => m Char

-- | Parses a letter or digit. Returns the parsed character.
alphaNum :: CharParsing m => m Char

-- | Parses a letter (an upper case or lower case character). Returns the
--   parsed character.
letter :: CharParsing m => m Char

-- | Parses a digit. Returns the parsed character.
digit :: CharParsing m => m Char

-- | Parses a hexadecimal digit (a digit or a letter between 'a' and 'f' or
--   'A' and 'F'). Returns the parsed character.
hexDigit :: CharParsing m => m Char

-- | Parses an octal digit (a character between '0' and '7'). Returns the
--   parsed character.
octDigit :: CharParsing m => m Char
satisfyRange :: CharParsing m => Char -> Char -> m Char

-- | Additional functionality needed to parse character streams.
class Parsing m => CharParsing (m :: Type -> Type)

-- | Parse a single character of the input, with UTF-8 decoding
satisfy :: CharParsing m => (Char -> Bool) -> m Char

-- | char c parses a single character c. Returns the
--   parsed character (i.e. c).
--   
--   e.g.
--   
--   
--   semiColon = char ';'
--   
char :: CharParsing m => Char -> m Char

-- | notChar c parses any single character other than c.
--   Returns the parsed character.
notChar :: CharParsing m => Char -> m Char

-- | This parser succeeds for any character. Returns the parsed character.
anyChar :: CharParsing m => m Char

-- | string s parses a sequence of characters given by s.
--   Returns the parsed string (i.e. s).
--   
--   
--   divOrMod    =   string "div"
--               <|> string "mod"
--   
string :: CharParsing m => String -> m String

-- | text t parses a sequence of characters determined by the text
--   t Returns the parsed text fragment (i.e. t).
--   
--   Using OverloadedStrings:
--   
--   
--   divOrMod    =   text "div"
--               <|> text "mod"
--   
text :: CharParsing m => Text -> m Text
integral :: (CharParsing m, Integral a) => m a

-- | Accepts negative (starting with -) and positive (without
--   sign) integral numbers.
signedIntegral :: (CharParsing m, Integral a) => m a

-- | Greedily munch characters while predicate holds. Require at least one
--   character.
munch1 :: CharParsing m => (Char -> Bool) -> m String

-- | Greedily munch characters while predicate holds. Always succeeds.
munch :: CharParsing m => (Char -> Bool) -> m String
skipSpaces1 :: CharParsing m => m ()
instance (Distribution.Compat.CharParsing.CharParsing m, GHC.Internal.Base.MonadPlus m) => Distribution.Compat.CharParsing.CharParsing (Control.Monad.Trans.Identity.IdentityT m)
instance Text.Parsec.Prim.Stream s m GHC.Types.Char => Distribution.Compat.CharParsing.CharParsing (Text.Parsec.Prim.ParsecT s u m)
instance (Distribution.Compat.CharParsing.CharParsing m, GHC.Internal.Base.MonadPlus m, GHC.Internal.Base.Monoid w) => Distribution.Compat.CharParsing.CharParsing (Control.Monad.Trans.RWS.Strict.RWST r w s m)
instance (Distribution.Compat.CharParsing.CharParsing m, GHC.Internal.Base.MonadPlus m, GHC.Internal.Base.Monoid w) => Distribution.Compat.CharParsing.CharParsing (Control.Monad.Trans.RWS.Lazy.RWST r w s m)
instance (Distribution.Compat.CharParsing.CharParsing m, GHC.Internal.Base.MonadPlus m) => Distribution.Compat.CharParsing.CharParsing (Control.Monad.Trans.Reader.ReaderT e m)
instance (Distribution.Compat.CharParsing.CharParsing m, GHC.Internal.Base.MonadPlus m) => Distribution.Compat.CharParsing.CharParsing (Control.Monad.Trans.State.Strict.StateT s m)
instance (Distribution.Compat.CharParsing.CharParsing m, GHC.Internal.Base.MonadPlus m) => Distribution.Compat.CharParsing.CharParsing (Control.Monad.Trans.State.Lazy.StateT s m)
instance (Distribution.Compat.CharParsing.CharParsing m, GHC.Internal.Base.MonadPlus m, GHC.Internal.Base.Monoid w) => Distribution.Compat.CharParsing.CharParsing (Control.Monad.Trans.Writer.Lazy.WriterT w m)
instance (Distribution.Compat.CharParsing.CharParsing m, GHC.Internal.Base.MonadPlus m, GHC.Internal.Base.Monoid w) => Distribution.Compat.CharParsing.CharParsing (Control.Monad.Trans.Writer.Strict.WriterT w m)

module Distribution.CabalSpecVersion

-- | Different Cabal-the-spec versions.
--   
--   We branch based on this at least in the parser.
data CabalSpecVersion

-- | this is older than CabalSpecV1_2
CabalSpecV1_0 :: CabalSpecVersion

-- | new syntax (sections)
CabalSpecV1_2 :: CabalSpecVersion
CabalSpecV1_4 :: CabalSpecVersion
CabalSpecV1_6 :: CabalSpecVersion
CabalSpecV1_8 :: CabalSpecVersion
CabalSpecV1_10 :: CabalSpecVersion
CabalSpecV1_12 :: CabalSpecVersion
CabalSpecV1_18 :: CabalSpecVersion
CabalSpecV1_20 :: CabalSpecVersion
CabalSpecV1_22 :: CabalSpecVersion
CabalSpecV1_24 :: CabalSpecVersion
CabalSpecV2_0 :: CabalSpecVersion
CabalSpecV2_2 :: CabalSpecVersion
CabalSpecV2_4 :: CabalSpecVersion
CabalSpecV3_0 :: CabalSpecVersion
CabalSpecV3_4 :: CabalSpecVersion
CabalSpecV3_6 :: CabalSpecVersion
CabalSpecV3_8 :: CabalSpecVersion
CabalSpecV3_12 :: CabalSpecVersion

-- | Show cabal spec version, but not the way in the .cabal files
showCabalSpecVersion :: CabalSpecVersion -> String
cabalSpecLatest :: CabalSpecVersion

-- | Parse CabalSpecVersion from version digits.
--   
--   It may fail if for recent versions the version is not exact.
cabalSpecFromVersionDigits :: [Int] -> Maybe CabalSpecVersion

cabalSpecToVersionDigits :: CabalSpecVersion -> [Int]

-- | What is the minimum Cabal library version which knows how handle this
--   spec version.
--   
--   Note: this is a point where we could decouple cabal-spec and
--   Cabal versions, if we ever want that.
--   
--   
--   >>> cabalSpecMinimumLibraryVersion CabalSpecV3_0
--   [2,5]
--   
--   
--   
--   >>> cabalSpecMinimumLibraryVersion CabalSpecV2_4
--   [2,3]
--   
cabalSpecMinimumLibraryVersion :: CabalSpecVersion -> [Int]
specHasCommonStanzas :: CabalSpecVersion -> HasCommonStanzas
specHasElif :: CabalSpecVersion -> HasElif
data HasElif
HasElif :: HasElif
NoElif :: HasElif
data HasCommonStanzas
HasCommonStanzas :: HasCommonStanzas
NoCommonStanzas :: HasCommonStanzas
data HasGlobstar
HasGlobstar :: HasGlobstar
NoGlobstar :: HasGlobstar
instance Data.Binary.Class.Binary Distribution.CabalSpecVersion.CabalSpecVersion
instance GHC.Internal.Enum.Bounded Distribution.CabalSpecVersion.CabalSpecVersion
instance GHC.Internal.Data.Data.Data Distribution.CabalSpecVersion.CabalSpecVersion
instance GHC.Internal.Enum.Enum Distribution.CabalSpecVersion.CabalSpecVersion
instance GHC.Classes.Eq Distribution.CabalSpecVersion.CabalSpecVersion
instance GHC.Classes.Eq Distribution.CabalSpecVersion.HasCommonStanzas
instance GHC.Classes.Eq Distribution.CabalSpecVersion.HasElif
instance GHC.Internal.Generics.Generic Distribution.CabalSpecVersion.CabalSpecVersion
instance Control.DeepSeq.NFData Distribution.CabalSpecVersion.CabalSpecVersion
instance GHC.Classes.Ord Distribution.CabalSpecVersion.CabalSpecVersion
instance GHC.Internal.Read.Read Distribution.CabalSpecVersion.CabalSpecVersion
instance GHC.Internal.Show.Show Distribution.CabalSpecVersion.CabalSpecVersion
instance GHC.Internal.Show.Show Distribution.CabalSpecVersion.HasCommonStanzas
instance GHC.Internal.Show.Show Distribution.CabalSpecVersion.HasElif
instance Distribution.Utils.Structured.Structured Distribution.CabalSpecVersion.CabalSpecVersion

module Distribution.SPDX.LicenseListVersion

-- | SPDX License List version Cabal is aware of.
data LicenseListVersion
LicenseListVersion_3_0 :: LicenseListVersion
LicenseListVersion_3_2 :: LicenseListVersion
LicenseListVersion_3_6 :: LicenseListVersion
LicenseListVersion_3_9 :: LicenseListVersion
LicenseListVersion_3_10 :: LicenseListVersion
LicenseListVersion_3_16 :: LicenseListVersion
LicenseListVersion_3_23 :: LicenseListVersion
cabalSpecVersionToSPDXListVersion :: CabalSpecVersion -> LicenseListVersion
instance GHC.Internal.Enum.Bounded Distribution.SPDX.LicenseListVersion.LicenseListVersion
instance GHC.Internal.Enum.Enum Distribution.SPDX.LicenseListVersion.LicenseListVersion
instance GHC.Classes.Eq Distribution.SPDX.LicenseListVersion.LicenseListVersion
instance GHC.Classes.Ord Distribution.SPDX.LicenseListVersion.LicenseListVersion
instance GHC.Internal.Show.Show Distribution.SPDX.LicenseListVersion.LicenseListVersion

module Distribution.Pretty
class Pretty a
pretty :: Pretty a => a -> Doc
prettyVersioned :: Pretty a => CabalSpecVersion -> a -> Doc
prettyShow :: Pretty a => a -> String

-- | The default rendering style used in Cabal for console output. It has a
--   fixed page width and adds line breaks automatically.
defaultStyle :: Style

-- | A style for rendering all on one line.
flatStyle :: Style
showFilePath :: FilePath -> Doc
showToken :: String -> Doc
showTokenStr :: String -> String

-- | Pretty-print free-format text, ensuring that it is vertically aligned,
--   and with blank lines replaced by dots for correct re-parsing.
showFreeText :: String -> Doc

-- | Pretty-print free-format text. Since cabal-version: 3.0 we
--   don't replace blank lines with dots.
showFreeTextV3 :: String -> Doc
type Separator = [Doc] -> Doc
instance Distribution.Pretty.Pretty GHC.Types.Bool
instance Distribution.Pretty.Pretty Text.PrettyPrint.HughesPJ.Doc
instance Distribution.Pretty.Pretty a => Distribution.Pretty.Pretty (GHC.Internal.Data.Functor.Identity.Identity a)
instance Distribution.Pretty.Pretty GHC.Types.Int

-- | Cabal-like file AST types: Field, Section etc
--   
--   These types are parametrized by an annotation.
module Distribution.Fields.Field

-- | A Cabal-like file consists of a series of fields (foo: bar)
--   and sections (library ...).
data Field ann
Field :: !Name ann -> [FieldLine ann] -> Field ann
Section :: !Name ann -> [SectionArg ann] -> [Field ann] -> Field ann

-- | Section of field name
fieldName :: Field ann -> Name ann
fieldAnn :: Field ann -> ann

-- | All transitive descendants of Field, including itself.
--   
--   Note: the resulting list is never empty.
fieldUniverse :: Field ann -> [Field ann]

-- | A line of text representing the value of a field from a Cabal file. A
--   field may contain multiple lines.
--   
--   Invariant: ByteString has no newlines.
data FieldLine ann
FieldLine :: !ann -> !ByteString -> FieldLine ann

fieldLineAnn :: FieldLine ann -> ann

fieldLineBS :: FieldLine ann -> ByteString

-- | Section arguments, e.g. name of the library
data SectionArg ann

-- | identifier, or something which looks like number. Also many dot
--   numbers, i.e. "7.6.3"
SecArgName :: !ann -> !ByteString -> SectionArg ann

-- | quoted string
SecArgStr :: !ann -> !ByteString -> SectionArg ann

-- | everything else, mm. operators (e.g. in if-section conditionals)
SecArgOther :: !ann -> !ByteString -> SectionArg ann

-- | Extract annotation from SectionArg.
sectionArgAnn :: SectionArg ann -> ann
type FieldName = ByteString

-- | A field name.
--   
--   Invariant: ByteString is lower-case ASCII.
data Name ann
Name :: !ann -> !FieldName -> Name ann
mkName :: ann -> FieldName -> Name ann
getName :: Name ann -> FieldName
nameAnn :: Name ann -> ann

sectionArgsToString :: [SectionArg ann] -> String

-- | Convert [FieldLine] into String.
--   
--   Note: this doesn't preserve indentation or empty lines, as the
--   annotations (e.g. positions) are ignored.
fieldLinesToString :: [FieldLine ann] -> String
instance GHC.Classes.Eq ann => GHC.Classes.Eq (Distribution.Fields.Field.Field ann)
instance GHC.Classes.Eq ann => GHC.Classes.Eq (Distribution.Fields.Field.FieldLine ann)
instance GHC.Classes.Eq ann => GHC.Classes.Eq (Distribution.Fields.Field.Name ann)
instance GHC.Classes.Eq ann => GHC.Classes.Eq (Distribution.Fields.Field.SectionArg ann)
instance Data.Foldable1.Foldable1 Distribution.Fields.Field.Field
instance Data.Foldable1.Foldable1 Distribution.Fields.Field.FieldLine
instance Data.Foldable1.Foldable1 Distribution.Fields.Field.Name
instance Data.Foldable1.Foldable1 Distribution.Fields.Field.SectionArg
instance GHC.Internal.Data.Foldable.Foldable Distribution.Fields.Field.Field
instance GHC.Internal.Data.Foldable.Foldable Distribution.Fields.Field.FieldLine
instance GHC.Internal.Data.Foldable.Foldable Distribution.Fields.Field.Name
instance GHC.Internal.Data.Foldable.Foldable Distribution.Fields.Field.SectionArg
instance GHC.Internal.Base.Functor Distribution.Fields.Field.Field
instance GHC.Internal.Base.Functor Distribution.Fields.Field.FieldLine
instance GHC.Internal.Base.Functor Distribution.Fields.Field.Name
instance GHC.Internal.Base.Functor Distribution.Fields.Field.SectionArg
instance GHC.Classes.Ord ann => GHC.Classes.Ord (Distribution.Fields.Field.Field ann)
instance GHC.Classes.Ord ann => GHC.Classes.Ord (Distribution.Fields.Field.FieldLine ann)
instance GHC.Classes.Ord ann => GHC.Classes.Ord (Distribution.Fields.Field.Name ann)
instance GHC.Classes.Ord ann => GHC.Classes.Ord (Distribution.Fields.Field.SectionArg ann)
instance GHC.Internal.Show.Show ann => GHC.Internal.Show.Show (Distribution.Fields.Field.Field ann)
instance GHC.Internal.Show.Show ann => GHC.Internal.Show.Show (Distribution.Fields.Field.FieldLine ann)
instance GHC.Internal.Show.Show ann => GHC.Internal.Show.Show (Distribution.Fields.Field.Name ann)
instance GHC.Internal.Show.Show ann => GHC.Internal.Show.Show (Distribution.Fields.Field.SectionArg ann)
instance GHC.Internal.Data.Traversable.Traversable Distribution.Fields.Field.Field
instance GHC.Internal.Data.Traversable.Traversable Distribution.Fields.Field.FieldLine
instance GHC.Internal.Data.Traversable.Traversable Distribution.Fields.Field.Name
instance GHC.Internal.Data.Traversable.Traversable Distribution.Fields.Field.SectionArg

module Distribution.Fields.Parser

-- | A Cabal-like file consists of a series of fields (foo: bar)
--   and sections (library ...).
data Field ann
Field :: !Name ann -> [FieldLine ann] -> Field ann
Section :: !Name ann -> [SectionArg ann] -> [Field ann] -> Field ann

-- | A field name.
--   
--   Invariant: ByteString is lower-case ASCII.
data Name ann
Name :: !ann -> !FieldName -> Name ann

-- | A line of text representing the value of a field from a Cabal file. A
--   field may contain multiple lines.
--   
--   Invariant: ByteString has no newlines.
data FieldLine ann
FieldLine :: !ann -> !ByteString -> FieldLine ann

-- | Section arguments, e.g. name of the library
data SectionArg ann

-- | identifier, or something which looks like number. Also many dot
--   numbers, i.e. "7.6.3"
SecArgName :: !ann -> !ByteString -> SectionArg ann

-- | quoted string
SecArgStr :: !ann -> !ByteString -> SectionArg ann

-- | everything else, mm. operators (e.g. in if-section conditionals)
SecArgOther :: !ann -> !ByteString -> SectionArg ann

-- | Parse cabal style ByteString into list of Fields, i.e.
--   the cabal AST.
--   
--   readFields assumes that input ByteString is valid UTF8,
--   specifically it doesn't validate that file is valid UTF8. Therefore
--   bytestrings inside returned Field will be invalid as UTF8 if
--   the input were.
--   
--   
--   >>> readFields "foo: \223"
--   Right [Field (Name (Position 1 1) "foo") [FieldLine (Position 1 6) "\223"]]
--   
--   
--   readFields won't (necessarily) fail on invalid UTF8 data, but
--   the reported positions may be off.
--   
--   You may get weird errors on non-UTF8 input, for example
--   readFields will fail on latin1 encoded non-breaking space:
--   
--   
--   >>> isLeft (readFields "\xa0 foo: bar")
--   True
--   
--   
--   That is rejected because parser thinks \xa0 is a section
--   name, and section arguments may not contain colon. If there are just
--   latin1 non-breaking spaces, they become part of the name:
--   
--   
--   >>> readFields "\xa0\&foo: bar"
--   Right [Field (Name (Position 1 1) "\160foo") [FieldLine (Position 1 7) "bar"]]
--   
--   
--   The UTF8 non-breaking space is accepted as an indentation character
--   (but warned about by readFields').
--   
--   
--   >>> readFields' "\xc2\xa0 foo: bar"
--   Right ([Field (Name (Position 1 3) "foo") [FieldLine (Position 1 8) "bar"]],[LexWarning LexWarningNBSP (Position 1 1)])
--   
readFields :: ByteString -> Either ParseError [Field Position]

-- | Like readFields but also return lexer warnings.
readFields' :: ByteString -> Either ParseError ([Field Position], [LexWarning])
instance Text.Parsec.Prim.Stream Distribution.Fields.Parser.LexState' GHC.Internal.Data.Functor.Identity.Identity Distribution.Fields.Lexer.LToken

-- | Cabal-like file AST types: Field, Section etc,
--   
--   This (intermediate) data type is used for pretty-printing.
module Distribution.Fields.Pretty

-- | This type is used to discern when a comment block should go before or
--   after a cabal-like file field, otherwise it would be hardcoded to a
--   single position. It is often used in conjunction with
--   PrettyField.
data CommentPosition
CommentBefore :: [String] -> CommentPosition
CommentAfter :: [String] -> CommentPosition
NoComment :: CommentPosition
data PrettyField ann
PrettyField :: ann -> FieldName -> Doc -> PrettyField ann
PrettySection :: ann -> FieldName -> [Doc] -> [PrettyField ann] -> PrettyField ann
PrettyEmpty :: PrettyField ann

-- | Prettyprint a list of fields.
--   
--   Note: the first argument should return Strings without newlines
--   and properly prefixes (with --) to count as comments. This
--   unsafety is left in place so one could generate empty lines between
--   comment lines.
showFields :: (ann -> CommentPosition) -> [PrettyField ann] -> String

-- | showFields with user specified indentation.
showFields' :: (ann -> CommentPosition) -> (ann -> [String] -> [String]) -> Int -> [PrettyField ann] -> String

-- | Simple variant of genericFromParsecField
fromParsecFields :: [Field ann] -> [PrettyField ann]
genericFromParsecFields :: Applicative f => (FieldName -> [FieldLine ann] -> f Doc) -> (FieldName -> [SectionArg ann] -> f [Doc]) -> [Field ann] -> f [PrettyField ann]

-- | Used in fromParsecFields.
prettyFieldLines :: FieldName -> [FieldLine ann] -> Doc

-- | Used in fromParsecFields.
prettySectionArgs :: FieldName -> [SectionArg ann] -> [Doc]
instance GHC.Classes.Eq Distribution.Fields.Pretty.Margin
instance GHC.Internal.Data.Foldable.Foldable Distribution.Fields.Pretty.PrettyField
instance GHC.Internal.Base.Functor Distribution.Fields.Pretty.PrettyField
instance GHC.Internal.Base.Semigroup Distribution.Fields.Pretty.Margin
instance GHC.Internal.Data.Traversable.Traversable Distribution.Fields.Pretty.PrettyField

module Distribution.Parsec

-- | Class for parsing with parsec. Mainly used for
--   .cabal file fields.
--   
--   For parsing .cabal like file structure, see
--   Distribution.Fields.
class Parsec a
parsec :: (Parsec a, CabalParsing m) => m a
newtype ParsecParser a
PP :: (CabalSpecVersion -> Parsec FieldLineStream [PWarning] a) -> ParsecParser a
[unPP] :: ParsecParser a -> CabalSpecVersion -> Parsec FieldLineStream [PWarning] a

-- | Run ParsecParser with cabalSpecLatest.
runParsecParser :: ParsecParser a -> FilePath -> FieldLineStream -> Either ParseError a

-- | Like runParsecParser but lets specify CabalSpecVersion
--   used.
runParsecParser' :: CabalSpecVersion -> ParsecParser a -> FilePath -> FieldLineStream -> Either ParseError a

-- | Parse a String with lexemeParsec.
simpleParsec :: Parsec a => String -> Maybe a

-- | Like simpleParsec but for ByteString
simpleParsecBS :: Parsec a => ByteString -> Maybe a

-- | Parse a String with lexemeParsec using specific
--   CabalSpecVersion.
simpleParsec' :: Parsec a => CabalSpecVersion -> String -> Maybe a

-- | Parse a String with lexemeParsec using specific
--   CabalSpecVersion. Fail if there are any warnings.
simpleParsecW' :: Parsec a => CabalSpecVersion -> String -> Maybe a

-- | parsec could consume trailing spaces, this function
--   will consume.
lexemeParsec :: (CabalParsing m, Parsec a) => m a

-- | Parse a String with lexemeParsec.
eitherParsec :: Parsec a => String -> Either String a

-- | Parse a String with given ParsecParser. Trailing
--   whitespace is accepted.
explicitEitherParsec :: ParsecParser a -> String -> Either String a

-- | Parse a String with given ParsecParser and
--   CabalSpecVersion. Trailing whitespace is accepted. See
--   explicitEitherParsec.
explicitEitherParsec' :: CabalSpecVersion -> ParsecParser a -> String -> Either String a

-- | Parsing class which
--   
--   
--   
- can report Cabal parser warnings.
--   
- knows cabal-version we work with
--   
class (CharParsing m, MonadPlus m, MonadFail m) => CabalParsing (m :: Type -> Type)
parsecWarning :: CabalParsing m => PWarnType -> String -> m ()
parsecHaskellString :: CabalParsing m => m String
askCabalSpecVersion :: CabalParsing m => m CabalSpecVersion

-- | Type of parser warning. We do classify warnings.
--   
--   Different application may decide not to show some, or have fatal
--   behaviour on others
data PWarnType

-- | Unclassified warning
PWTOther :: PWarnType

-- | Invalid UTF encoding
PWTUTF :: PWarnType

-- | true or false, not True or False
PWTBoolCase :: PWarnType

-- | there are version with tags
PWTVersionTag :: PWarnType

-- | New syntax used, but no cabal-version: >= 1.2 specified
PWTNewSyntax :: PWarnType

-- | Old syntax used, and cabal-version >= 1.2 specified
PWTOldSyntax :: PWarnType
PWTDeprecatedField :: PWarnType
PWTInvalidSubsection :: PWarnType
PWTUnknownField :: PWarnType
PWTUnknownSection :: PWarnType
PWTTrailingFields :: PWarnType

-- | extra main-is field
PWTExtraMainIs :: PWarnType

-- | extra test-module field
PWTExtraTestModule :: PWarnType

-- | extra benchmark-module field
PWTExtraBenchmarkModule :: PWarnType
PWTLexNBSP :: PWarnType
PWTLexBOM :: PWarnType
PWTLexTab :: PWarnType

-- | legacy cabal file that we know how to patch
PWTQuirkyCabalFile :: PWarnType

-- | Double dash token, most likely it's a mistake - it's not a comment
PWTDoubleDash :: PWarnType

-- | e.g. name or version should be specified only once.
PWTMultipleSingularField :: PWarnType

-- | Workaround for derive-package having build-type: Default. See
--   https://github.com/haskell/cabal/issues/5020.
PWTBuildTypeDefault :: PWarnType

-- | Version operators used (without cabal-version: 1.8)
PWTVersionOperator :: PWarnType

-- | Version wildcard used (without cabal-version: 1.6)
PWTVersionWildcard :: PWarnType

-- | Warnings about cabal-version format.
PWTSpecVersion :: PWarnType

-- | Empty filepath, i.e. literally ""
PWTEmptyFilePath :: PWarnType

-- | sections contents (sections and fields) are indented inconsistently
PWTInconsistentIndentation :: PWarnType

-- | Experimental feature
PWTExperimental :: PWarnType

-- | Parser warning.
data PWarning
PWarning :: !PWarnType -> !Position -> String -> PWarning
showPWarning :: FilePath -> PWarning -> String

-- | Parser error.
data PError
PError :: Position -> String -> PError
showPError :: FilePath -> PError -> String

-- | 1-indexed row and column positions in a file.
data Position
Position :: {-# UNPACK #-} !Int -> {-# UNPACK #-} !Int -> Position

-- | Shift position by n columns to the right.
incPos :: Int -> Position -> Position

-- | Shift position to beginning of next row.
retPos :: Position -> Position
showPos :: Position -> String
zeroPos :: Position

-- | 
--   [^ ,]
--   
parsecToken :: CabalParsing m => m String

-- | 
--   [^ ]
--   
parsecToken' :: CabalParsing m => m String
parsecFilePath :: CabalParsing m => m FilePath

-- | Content isn't unquoted
parsecQuoted :: CabalParsing m => m a -> m a

-- | parsecMaybeQuoted p = parsecQuoted p | p.
parsecMaybeQuoted :: CabalParsing m => m a -> m a
parsecCommaList :: CabalParsing m => m a -> m [a]
parsecCommaNonEmpty :: CabalParsing m => m a -> m (NonEmpty a)

-- | Like parsecCommaList but accept leading or trailing comma.
--   
--   
--   p (comma p)*  -- p sepBy comma
--   (comma p)*    -- leading comma
--   (p comma)*    -- trailing comma
--   
parsecLeadingCommaList :: CabalParsing m => m a -> m [a]

parsecLeadingCommaNonEmpty :: CabalParsing m => m a -> m (NonEmpty a)
parsecOptCommaList :: CabalParsing m => m a -> m [a]

-- | Like parsecOptCommaList but
--   
--   
--   
- require all or none commas
--   
- accept leading or trailing comma.
--   
--   
--   
--   p (comma p)*  -- p sepBy comma
--   (comma p)*    -- leading comma
--   (p comma)*    -- trailing comma
--   p*            -- no commas: many p
--   
parsecLeadingOptCommaList :: CabalParsing m => m a -> m [a]

-- | Parse a benchmark/test-suite types.
parsecStandard :: (CabalParsing m, Parsec ver) => (ver -> String -> a) -> m a
parsecUnqualComponentName :: CabalParsing m => m String
instance GHC.Internal.Base.Alternative Distribution.Parsec.ParsecParser
instance GHC.Internal.Base.Applicative Distribution.Parsec.ParsecParser
instance Distribution.Parsec.CabalParsing Distribution.Parsec.ParsecParser
instance Distribution.Compat.CharParsing.CharParsing Distribution.Parsec.ParsecParser
instance GHC.Internal.Base.Functor Distribution.Parsec.ParsecParser
instance GHC.Internal.Control.Monad.Fail.MonadFail Distribution.Parsec.ParsecParser
instance GHC.Internal.Base.Monad Distribution.Parsec.ParsecParser
instance GHC.Internal.Base.MonadPlus Distribution.Parsec.ParsecParser
instance Distribution.Parsec.Parsec GHC.Types.Bool
instance Distribution.Parsec.Parsec a => Distribution.Parsec.Parsec (GHC.Internal.Data.Functor.Identity.Identity a)
instance Distribution.Compat.Parsing.Parsing Distribution.Parsec.ParsecParser

module Distribution.Utils.Path

-- | Symbolic paths.
--   
--   These paths are system independent and relative. They are *symbolic*
--   which means we cannot perform any IO until we interpret them.
data SymbolicPath from to

-- | Extract underlying FilePath.
--   
--   Avoid using this in new code.
getSymbolicPath :: SymbolicPath from to -> FilePath
sameDirectory :: (IsDir from, IsDir to) => SymbolicPath from to

-- | Make SymbolicPath without performing any checks.
unsafeMakeSymbolicPath :: FilePath -> SymbolicPath from to
data PackageDir
data SourceDir
data LicenseFile

-- | Class telling that index is for directories.
class IsDir dir
instance Data.Binary.Class.Binary (Distribution.Utils.Path.SymbolicPath from to)
instance GHC.Internal.Data.Data.Data Distribution.Utils.Path.LicenseFile
instance GHC.Internal.Data.Data.Data Distribution.Utils.Path.PackageDir
instance GHC.Internal.Data.Data.Data Distribution.Utils.Path.SourceDir
instance (GHC.Internal.Data.Data.Data from, GHC.Internal.Data.Data.Data to) => GHC.Internal.Data.Data.Data (Distribution.Utils.Path.SymbolicPath from to)
instance GHC.Classes.Eq (Distribution.Utils.Path.SymbolicPath from to)
instance GHC.Internal.Generics.Generic (Distribution.Utils.Path.SymbolicPath from to)
instance Distribution.Utils.Path.IsDir Distribution.Utils.Path.PackageDir
instance Distribution.Utils.Path.IsDir Distribution.Utils.Path.SourceDir
instance Control.DeepSeq.NFData (Distribution.Utils.Path.SymbolicPath from to)
instance GHC.Classes.Ord (Distribution.Utils.Path.SymbolicPath from to)
instance Distribution.Parsec.Parsec (Distribution.Utils.Path.SymbolicPath from to)
instance Distribution.Pretty.Pretty (Distribution.Utils.Path.SymbolicPath from to)
instance GHC.Internal.Read.Read (Distribution.Utils.Path.SymbolicPath from to)
instance GHC.Internal.Show.Show (Distribution.Utils.Path.SymbolicPath from to)
instance (GHC.Internal.Data.Typeable.Internal.Typeable from, GHC.Internal.Data.Typeable.Internal.Typeable to) => Distribution.Utils.Structured.Structured (Distribution.Utils.Path.SymbolicPath from to)

module Distribution.Types.Version

-- | A Version represents the version of a software entity.
--   
--   Instances of Eq and Ord are provided, which gives exact
--   equality and lexicographic ordering of the version number components
--   (i.e. 2.1 > 2.0, 1.2.3 > 1.2.2, etc.).
--   
--   This type is opaque and distinct from the Version type in
--   Data.Version since Cabal-2.0. The difference extends
--   to the Binary instance using a different (and more compact)
--   encoding.
data Version

-- | Construct Version from list of version number components.
--   
--   For instance, mkVersion [3,2,1] constructs a Version
--   representing the version 3.2.1.
--   
--   All version components must be non-negative. mkVersion []
--   currently represents the special null version; see also
--   nullVersion.
mkVersion :: [Int] -> Version

-- | Variant of mkVersion which converts a Data.Version
--   Version into Cabal's Version type.
mkVersion' :: Version -> Version

-- | Unpack Version into list of version number components.
--   
--   This is the inverse to mkVersion, so the following holds:
--   
--   
--   (versionNumbers . mkVersion) vs == vs
--   
versionNumbers :: Version -> [Int]

-- | Constant representing the special null Version
--   
--   The nullVersion compares (via Ord) as less than every
--   proper Version value.
nullVersion :: Version

-- | Apply function to list of version number components
--   
--   
--   alterVersion f == mkVersion . f . versionNumbers
--   
alterVersion :: ([Int] -> [Int]) -> Version -> Version

-- | Version 0. A lower bound of Version.
version0 :: Version
validVersion :: Version -> Bool

-- | An integral without leading zeroes.
versionDigitParser :: CabalParsing m => m Int
instance Data.Binary.Class.Binary Distribution.Types.Version.Version
instance GHC.Internal.Data.Data.Data Distribution.Types.Version.Version
instance GHC.Classes.Eq Distribution.Types.Version.Version
instance GHC.Internal.Generics.Generic Distribution.Types.Version.Version
instance Control.DeepSeq.NFData Distribution.Types.Version.Version
instance GHC.Classes.Ord Distribution.Types.Version.Version
instance Distribution.Parsec.Parsec Distribution.Types.Version.Version
instance Distribution.Pretty.Pretty Distribution.Types.Version.Version
instance GHC.Internal.Read.Read Distribution.Types.Version.Version
instance GHC.Internal.Show.Show Distribution.Types.Version.Version
instance Distribution.Utils.Structured.Structured Distribution.Types.Version.Version

-- | The only purpose of this module is to prevent the export of
--   VersionRange constructors from
--   Distribution.Types.VersionRange. To avoid creating orphan
--   instances, a lot of related code had to be moved here too.
module Distribution.Types.VersionRange.Internal
data VersionRange
ThisVersion :: Version -> VersionRange
LaterVersion :: Version -> VersionRange
OrLaterVersion :: Version -> VersionRange
EarlierVersion :: Version -> VersionRange
OrEarlierVersion :: Version -> VersionRange
MajorBoundVersion :: Version -> VersionRange
UnionVersionRanges :: VersionRange -> VersionRange -> VersionRange
IntersectVersionRanges :: VersionRange -> VersionRange -> VersionRange

-- | The version range -any. That is, a version range containing
--   all versions.
--   
--   
--   withinRange v anyVersion = True
--   
anyVersion :: VersionRange

-- | The empty version range -none, that is a version range
--   containing no versions.
--   
--   This can be constructed using any unsatisfiable version range
--   expression, for example < 0.
--   
--   
--   withinRange v noVersion = False
--   
noVersion :: VersionRange

-- | The version range == v.
--   
--   
--   withinRange v' (thisVersion v) = v' == v
--   
thisVersion :: Version -> VersionRange

-- | The version range /= v.
--   
--   
--   withinRange v' (notThisVersion v) = v' /= v
--   
notThisVersion :: Version -> VersionRange

-- | The version range > v.
--   
--   
--   withinRange v' (laterVersion v) = v' > v
--   
laterVersion :: Version -> VersionRange

-- | The version range < v.
--   
--   
--   withinRange v' (earlierVersion v) = v' < v
--   
earlierVersion :: Version -> VersionRange

-- | The version range >= v.
--   
--   
--   withinRange v' (orLaterVersion v) = v' >= v
--   
orLaterVersion :: Version -> VersionRange

-- | The version range <= v.
--   
--   
--   withinRange v' (orEarlierVersion v) = v' <= v
--   
orEarlierVersion :: Version -> VersionRange

-- | The version range vr1 || vr2.
--   
--   
--     withinRange v' (unionVersionRanges vr1 vr2)
--   = withinRange v' vr1 || withinRange v' vr2
--   
unionVersionRanges :: VersionRange -> VersionRange -> VersionRange

-- | The version range vr1 && vr2.
--   
--   
--     withinRange v' (intersectVersionRanges vr1 vr2)
--   = withinRange v' vr1 && withinRange v' vr2
--   
intersectVersionRanges :: VersionRange -> VersionRange -> VersionRange

-- | The version range == v.*.
--   
--   For example, for version 1.2, the version range ==
--   1.2.* is the same as >= 1.2 && < 1.3.
--   
--   
--   withinRange v' (withinVersion v) = v' >= v && v' < upper v
--     where
--       upper (Version lower t) = Version (init lower ++ [last lower + 1]) t
--   
withinVersion :: Version -> VersionRange

-- | The version range ^>= v.
--   
--   For example, for version 1.2.3.4, the version range
--   ^>= 1.2.3.4 is the same as >= 1.2.3.4 &&
--   < 1.3.
--   
--   Note that ^>= 1 is equivalent to >= 1 &&
--   < 1.1.
majorBoundVersion :: Version -> VersionRange

-- | F-Algebra of VersionRange. See cataVersionRange.
data VersionRangeF a

-- | == version.
ThisVersionF :: Version -> VersionRangeF a

-- | > version. NB: not >=
LaterVersionF :: Version -> VersionRangeF a

-- | >= version.
OrLaterVersionF :: Version -> VersionRangeF a

-- | < version.
EarlierVersionF :: Version -> VersionRangeF a

-- | <= version.
OrEarlierVersionF :: Version -> VersionRangeF a

-- | ^>= version, same as >= version && <
--   MAJ(version)+1.
MajorBoundVersionF :: Version -> VersionRangeF a

-- | ||.
UnionVersionRangesF :: a -> a -> VersionRangeF a

-- | &&.
IntersectVersionRangesF :: a -> a -> VersionRangeF a

-- | Generic destructor for VersionRange.
projectVersionRange :: VersionRange -> VersionRangeF VersionRange

-- | Generic constructor for VersionRange.
embedVersionRange :: VersionRangeF VersionRange -> VersionRange

-- | Fold VersionRange.
cataVersionRange :: (VersionRangeF a -> a) -> VersionRange -> a

-- | Unfold VersionRange.
anaVersionRange :: (a -> VersionRangeF a) -> a -> VersionRange

-- | Refold VersionRange.
hyloVersionRange :: (VersionRangeF VersionRange -> VersionRange) -> (VersionRange -> VersionRangeF VersionRange) -> VersionRange -> VersionRange

-- | VersionRange parser parametrised by version digit parser.
--   
--   
--   
- versionDigitParser is used for all
--   VersionRange.
--   
- integral is used for backward-compat
--   pkgconfig-depends versions,
--   PkgConfigVersionRange.
--   
versionRangeParser :: CabalParsing m => m Int -> CabalSpecVersion -> m VersionRange

-- | Compute next greater major version to be used as upper bound.
--   
--   Example: 0.4.1 produces the version 0.5 which then
--   can be used to construct a range >= 0.4.1 && <
--   0.5
majorUpperBound :: Version -> Version

-- | Increment the last version number.
--   
--   Example: For 1.2 this returns 1.3 so that it can be
--   used as upper bound when resolving == 1.2.*. For
--   0.4.1 it returns 0.4.2.
wildcardUpperBound :: Version -> Version
instance Data.Binary.Class.Binary Distribution.Types.VersionRange.Internal.VersionRange
instance GHC.Internal.Data.Data.Data Distribution.Types.VersionRange.Internal.VersionRange
instance GHC.Internal.Data.Data.Data a => GHC.Internal.Data.Data.Data (Distribution.Types.VersionRange.Internal.VersionRangeF a)
instance GHC.Classes.Eq Distribution.Types.VersionRange.Internal.VersionRange
instance GHC.Classes.Eq a => GHC.Classes.Eq (Distribution.Types.VersionRange.Internal.VersionRangeF a)
instance GHC.Internal.Data.Foldable.Foldable Distribution.Types.VersionRange.Internal.VersionRangeF
instance GHC.Internal.Base.Functor Distribution.Types.VersionRange.Internal.VersionRangeF
instance GHC.Internal.Generics.Generic Distribution.Types.VersionRange.Internal.VersionRange
instance GHC.Internal.Generics.Generic (Distribution.Types.VersionRange.Internal.VersionRangeF a)
instance Control.DeepSeq.NFData Distribution.Types.VersionRange.Internal.VersionRange
instance GHC.Classes.Ord Distribution.Types.VersionRange.Internal.VersionRange
instance Distribution.Parsec.Parsec Distribution.Types.VersionRange.Internal.VersionRange
instance Distribution.Pretty.Pretty Distribution.Types.VersionRange.Internal.VersionRange
instance GHC.Internal.Read.Read Distribution.Types.VersionRange.Internal.VersionRange
instance GHC.Internal.Read.Read a => GHC.Internal.Read.Read (Distribution.Types.VersionRange.Internal.VersionRangeF a)
instance GHC.Internal.Show.Show Distribution.Types.VersionRange.Internal.VersionRange
instance GHC.Internal.Show.Show a => GHC.Internal.Show.Show (Distribution.Types.VersionRange.Internal.VersionRangeF a)
instance Distribution.Utils.Structured.Structured Distribution.Types.VersionRange.Internal.VersionRange
instance GHC.Internal.Data.Traversable.Traversable Distribution.Types.VersionRange.Internal.VersionRangeF

-- | This module implements a view of a VersionRange as a finite
--   list of separated version intervals and provides the Boolean algebra
--   operations union, intersection, and complement.
--   
--   It interprets the caret operator ^>=x.y as simply
--   ==x.y.*. Until Cabal < 3.6, this module was
--   called Distribution.Types.VersionInterval. The current module
--   Distribution.Types.VersionInterval (refurbished since Cabal
--   >= 3.6) makes some effort to preserve the caret operator, but
--   so far does not expose the Boolean algebra structure.
module Distribution.Types.VersionInterval.Legacy

-- | A complementary representation of a VersionRange, using an
--   increasing sequence of separated (i.e., non-overlapping, non-touching)
--   non-empty intervals. The represented range is the union of these
--   intervals, meaning that the empty sequence denotes the empty range.
--   
--   As ranges form a Boolean algebra, we can compute union, intersection,
--   and complement. These operations are all linear in the size of the
--   input, thanks to the ordered representation.
--   
--   The interval-sequence representation gives a canonical representation
--   for the semantics of VersionRanges. This makes it easier to
--   check things like whether a version range is empty, covers all
--   versions, or requires a certain minimum or maximum version. It also
--   makes it easy to check equality (just ==) or containment. It
--   also makes it easier to identify 'simple' version predicates for
--   translation into foreign packaging systems that do not support complex
--   version range expressions.
data VersionIntervals

-- | Convert a VersionRange to a sequence of version intervals.
toVersionIntervals :: VersionRange -> VersionIntervals

-- | Convert a VersionIntervals value back into a
--   VersionRange expression representing the version intervals.
fromVersionIntervals :: VersionIntervals -> VersionRange

-- | Test if a version falls within the version intervals.
--   
--   It exists mostly for completeness and testing. It satisfies the
--   following properties:
--   
--   
--   withinIntervals v (toVersionIntervals vr) = withinRange v vr
--   withinIntervals v ivs = withinRange v (fromVersionIntervals ivs)
--   
withinIntervals :: Version -> VersionIntervals -> Bool

-- | Inspect the list of version intervals.
versionIntervals :: VersionIntervals -> [VersionInterval]

-- | Directly construct a VersionIntervals from a list of intervals.
mkVersionIntervals :: [VersionInterval] -> VersionIntervals

-- | Union two interval sequences, fusing intervals where necessary.
--   Computed <math> time, resulting in sequence of length
--   <math>.
unionVersionIntervals :: VersionIntervals -> VersionIntervals -> VersionIntervals

-- | The intersection <math> of two interval sequences <math>
--   and <math> of lengths <math> and <math>, resp.,
--   satisfies the specification <math>. Thanks to the ordered
--   representation of intervals it can be computed in <math> (rather
--   than the naive <math>.
--   
--   The length of <math> is <math>.
intersectVersionIntervals :: VersionIntervals -> VersionIntervals -> VersionIntervals

-- | Compute the complement. <math>.
invertVersionIntervals :: VersionIntervals -> VersionIntervals

-- | Remove the last upper bound, enlarging the range. But empty ranges
--   stay empty. <math>.
relaxLastInterval :: VersionIntervals -> VersionIntervals

-- | Remove the first lower bound (i.e, make it <math>. Empty ranges
--   stay empty. <math>.
relaxHeadInterval :: VersionIntervals -> VersionIntervals

-- | View a VersionRange as a sequence of separated intervals.
--   
--   This provides a canonical view of the semantics of a
--   VersionRange as opposed to the syntax of the expression used to
--   define it. For the syntactic view use foldVersionRange.
--   
--   Canonical means that two semantically equal ranges translate to
--   the same [VersionInterval], thus its Eq
--   instance can decide semantical equality of ranges.
--   
--   In the returned sequence, each interval is non-empty. The sequence is
--   in increasing order and the intervals are separated, i.e., they
--   neither overlap nor touch. Therefore only the first and last interval
--   can be unbounded. The sequence can be empty if the range is empty
--   (e.g. a range expression like > 2 && < 1).
--   
--   Other checks are trivial to implement using this view. For example:
--   
--   
--   isNoVersion vr | [] <- asVersionIntervals vr = True
--                  | otherwise                   = False
--   
--   
--   
--   isSpecificVersion vr
--      | [(LowerBound v  InclusiveBound
--         ,UpperBound v' InclusiveBound)] <- asVersionIntervals vr
--      , v == v'   = Just v
--      | otherwise = Nothing
--   
asVersionIntervals :: VersionRange -> [VersionInterval]

-- | Version intervals with exclusive or inclusive bounds, in all
--   combinations:
--   
--   
--   
- <math> meaning <math>.
--   
- <math> meaning <math>.
--   
- <math> meaning <math>.
--   
- <math> meaning <math>.
--   
--   
--   The upper bound can also be missing, meaning "<math>".
type VersionInterval = (LowerBound, UpperBound)
data LowerBound

-- | Either exclusive (v,.. or inclusive [v,...
LowerBound :: Version -> !Bound -> LowerBound
data UpperBound

-- | 
--   ..,∞)
--   
NoUpperBound :: UpperBound

-- | Either exclusive ..,v) or inclusive ..,v].
UpperBound :: Version -> !Bound -> UpperBound
data Bound

-- | (v,.. if used as lower bound, ..,v) if used as upper
--   bound.
ExclusiveBound :: Bound

-- | [v,.. if used as lower bound, ..,v] if used as upper
--   bound.
InclusiveBound :: Bound
instance GHC.Classes.Eq Distribution.Types.VersionInterval.Legacy.Bound
instance GHC.Classes.Eq Distribution.Types.VersionInterval.Legacy.LowerBound
instance GHC.Classes.Eq Distribution.Types.VersionInterval.Legacy.UpperBound
instance GHC.Classes.Eq Distribution.Types.VersionInterval.Legacy.VersionIntervals
instance GHC.Classes.Ord Distribution.Types.VersionInterval.Legacy.LowerBound
instance GHC.Classes.Ord Distribution.Types.VersionInterval.Legacy.UpperBound
instance GHC.Internal.Show.Show Distribution.Types.VersionInterval.Legacy.Bound
instance GHC.Internal.Show.Show Distribution.Types.VersionInterval.Legacy.LowerBound
instance GHC.Internal.Show.Show Distribution.Types.VersionInterval.Legacy.UpperBound
instance GHC.Internal.Show.Show Distribution.Types.VersionInterval.Legacy.VersionIntervals

-- | This module implements a view of a VersionRange as a finite
--   list of separated version intervals.
--   
--   In conversion from and to VersionRange it makes some effort to
--   preserve the caret operator ^>=x.y. This constraint a
--   priori specifies the same interval as ==x.y.*, but indicates
--   that newer versions could be acceptable (allow-newer: ^).
module Distribution.Types.VersionInterval

-- | A complementary representation of a VersionRange. Instead of a
--   boolean version predicate it uses an increasing sequence of
--   non-overlapping, non-empty intervals.
--   
--   The key point is that this representation gives a canonical
--   representation for the semantics of VersionRanges. This makes
--   it easier to check things like whether a version range is empty,
--   covers all versions, or requires a certain minimum or maximum version.
--   It also makes it easy to check equality or containment. It also makes
--   it easier to identify 'simple' version predicates for translation into
--   foreign packaging systems that do not support complex version range
--   expressions.
data VersionIntervals

-- | Inspect the list of version intervals.
unVersionIntervals :: VersionIntervals -> [VersionInterval]

-- | Directly construct a VersionIntervals from a list of intervals.
mkVersionIntervals :: [VersionInterval] -> Maybe VersionIntervals

-- | Convert a VersionRange to a sequence of version intervals.
toVersionIntervals :: VersionRange -> VersionIntervals

-- | Convert a VersionIntervals value back into a
--   VersionRange expression representing the version intervals.
fromVersionIntervals :: VersionIntervals -> VersionRange

-- | Since Cabal-3.6 this function.. TODO
normaliseVersionRange2 :: VersionRange -> VersionRange
relaxLastInterval :: VersionIntervals -> VersionIntervals
relaxHeadInterval :: VersionIntervals -> VersionIntervals

-- | View a VersionRange as a union of intervals.
--   
--   This provides a canonical view of the semantics of a
--   VersionRange as opposed to the syntax of the expression used to
--   define it. For the syntactic view use foldVersionRange.
--   
--   Each interval is non-empty. The sequence is in increasing order and no
--   intervals overlap or touch. Therefore only the first and last can be
--   unbounded. The sequence can be empty if the range is empty (e.g. a
--   range expression like && 2).
--   
--   Other checks are trivial to implement using this view. For example:
--   
--   
--   isNoVersion vr | [] <- asVersionIntervals vr = True
--                  | otherwise                   = False
--   
--   
--   
--   isSpecificVersion vr
--      | [(LowerBound v  InclusiveBound
--         ,UpperBound v' InclusiveBound)] <- asVersionIntervals vr
--      , v == v'   = Just v
--      | otherwise = Nothing
--   
asVersionIntervals :: VersionRange -> [VersionInterval]
data VersionInterval
VersionInterval :: !LowerBound -> !UpperBound -> VersionInterval
data LowerBound
LowerBound :: !Version -> !Bound -> LowerBound
data UpperBound
NoUpperBound :: UpperBound
UpperBound :: !Version -> !Bound -> UpperBound
data Bound
ExclusiveBound :: Bound
InclusiveBound :: Bound

-- | VersionIntervals invariant:
--   
--   
--   
- all intervals are valid (lower bound is less then upper bound,
--   i.e. non-empty)
--   
- intervals doesn't touch each other (distinct)
--   
invariantVersionIntervals :: VersionIntervals -> Bool
instance GHC.Classes.Eq Distribution.Types.VersionInterval.Bound
instance GHC.Classes.Eq Distribution.Types.VersionInterval.LowerBound
instance GHC.Classes.Eq Distribution.Types.VersionInterval.UpperBound
instance GHC.Classes.Eq Distribution.Types.VersionInterval.VersionInterval
instance GHC.Classes.Eq Distribution.Types.VersionInterval.VersionIntervals
instance GHC.Internal.Show.Show Distribution.Types.VersionInterval.Bound
instance GHC.Internal.Show.Show Distribution.Types.VersionInterval.LowerBound
instance GHC.Internal.Show.Show Distribution.Types.VersionInterval.UpperBound
instance GHC.Internal.Show.Show Distribution.Types.VersionInterval.VersionInterval
instance GHC.Internal.Show.Show Distribution.Types.VersionInterval.VersionIntervals

module Distribution.Types.VersionRange
data VersionRange

-- | The version range -any. That is, a version range containing
--   all versions.
--   
--   
--   withinRange v anyVersion = True
--   
anyVersion :: VersionRange

-- | The empty version range -none, that is a version range
--   containing no versions.
--   
--   This can be constructed using any unsatisfiable version range
--   expression, for example < 0.
--   
--   
--   withinRange v noVersion = False
--   
noVersion :: VersionRange

-- | The version range == v.
--   
--   
--   withinRange v' (thisVersion v) = v' == v
--   
thisVersion :: Version -> VersionRange

-- | The version range /= v.
--   
--   
--   withinRange v' (notThisVersion v) = v' /= v
--   
notThisVersion :: Version -> VersionRange

-- | The version range > v.
--   
--   
--   withinRange v' (laterVersion v) = v' > v
--   
laterVersion :: Version -> VersionRange

-- | The version range < v.
--   
--   
--   withinRange v' (earlierVersion v) = v' < v
--   
earlierVersion :: Version -> VersionRange

-- | The version range >= v.
--   
--   
--   withinRange v' (orLaterVersion v) = v' >= v
--   
orLaterVersion :: Version -> VersionRange

-- | The version range <= v.
--   
--   
--   withinRange v' (orEarlierVersion v) = v' <= v
--   
orEarlierVersion :: Version -> VersionRange

-- | The version range vr1 || vr2.
--   
--   
--     withinRange v' (unionVersionRanges vr1 vr2)
--   = withinRange v' vr1 || withinRange v' vr2
--   
unionVersionRanges :: VersionRange -> VersionRange -> VersionRange

-- | The version range vr1 && vr2.
--   
--   
--     withinRange v' (intersectVersionRanges vr1 vr2)
--   = withinRange v' vr1 && withinRange v' vr2
--   
intersectVersionRanges :: VersionRange -> VersionRange -> VersionRange

-- | The version range == v.*.
--   
--   For example, for version 1.2, the version range ==
--   1.2.* is the same as >= 1.2 && < 1.3.
--   
--   
--   withinRange v' (withinVersion v) = v' >= v && v' < upper v
--     where
--       upper (Version lower t) = Version (init lower ++ [last lower + 1]) t
--   
withinVersion :: Version -> VersionRange

-- | The version range ^>= v.
--   
--   For example, for version 1.2.3.4, the version range
--   ^>= 1.2.3.4 is the same as >= 1.2.3.4 &&
--   < 1.3.
--   
--   Note that ^>= 1 is equivalent to >= 1 &&
--   < 1.1.
majorBoundVersion :: Version -> VersionRange

-- | Does this version fall within the given range?
--   
--   This is the evaluation function for the VersionRange type.
withinRange :: Version -> VersionRange -> Bool

-- | Fold over the basic syntactic structure of a VersionRange.
--   
--   This provides a syntactic view of the expression defining the version
--   range. The syntactic sugar ">= v", "<= v" and
--   "== v.*" is presented in terms of the other basic syntax.
--   
--   For a semantic view use asVersionIntervals.
foldVersionRange :: a -> (Version -> a) -> (Version -> a) -> (Version -> a) -> (a -> a -> a) -> (a -> a -> a) -> VersionRange -> a

-- | Normalise VersionRange.
--   
--   In particular collapse (== v || > v) into >=
--   v, and so on.
normaliseVersionRange :: VersionRange -> VersionRange

-- | Remove VersionRangeParens constructors.
--   
--   Since version 3.4 this function is id, there aren't
--   VersionRangeParens constructor in VersionRange
--   anymore.
stripParensVersionRange :: VersionRange -> VersionRange

-- | Does the version range have an upper bound?
hasUpperBound :: VersionRange -> Bool

-- | Does the version range have an explicit lower bound?
--   
--   Note: this function only considers the user-specified lower bounds,
--   but not the implicit >=0 lower bound.
hasLowerBound :: VersionRange -> Bool

-- | F-Algebra of VersionRange. See cataVersionRange.
data VersionRangeF a

-- | == version.
ThisVersionF :: Version -> VersionRangeF a

-- | > version. NB: not >=
LaterVersionF :: Version -> VersionRangeF a

-- | >= version.
OrLaterVersionF :: Version -> VersionRangeF a

-- | < version.
EarlierVersionF :: Version -> VersionRangeF a

-- | <= version.
OrEarlierVersionF :: Version -> VersionRangeF a

-- | ^>= version, same as >= version && <
--   MAJ(version)+1.
MajorBoundVersionF :: Version -> VersionRangeF a

-- | ||.
UnionVersionRangesF :: a -> a -> VersionRangeF a

-- | &&.
IntersectVersionRangesF :: a -> a -> VersionRangeF a

-- | Fold VersionRange.
cataVersionRange :: (VersionRangeF a -> a) -> VersionRange -> a

-- | Unfold VersionRange.
anaVersionRange :: (a -> VersionRangeF a) -> a -> VersionRange

-- | Refold VersionRange.
hyloVersionRange :: (VersionRangeF VersionRange -> VersionRange) -> (VersionRange -> VersionRangeF VersionRange) -> VersionRange -> VersionRange

-- | Generic destructor for VersionRange.
projectVersionRange :: VersionRange -> VersionRangeF VersionRange

-- | Generic constructor for VersionRange.
embedVersionRange :: VersionRangeF VersionRange -> VersionRange

-- | Does this VersionRange place any restriction on the
--   Version or is it in fact equivalent to AnyVersion.
--   
--   Note this is a semantic check, not simply a syntactic check. So for
--   example the following is True (for all v).
--   
--   
--   isAnyVersion (EarlierVersion v `UnionVersionRanges` orLaterVersion v)
--   
isAnyVersion :: VersionRange -> Bool
isAnyVersionLight :: VersionRange -> Bool

-- | Increment the last version number.
--   
--   Example: For 1.2 this returns 1.3 so that it can be
--   used as upper bound when resolving == 1.2.*. For
--   0.4.1 it returns 0.4.2.
wildcardUpperBound :: Version -> Version

-- | Compute next greater major version to be used as upper bound.
--   
--   Example: 0.4.1 produces the version 0.5 which then
--   can be used to construct a range >= 0.4.1 && <
--   0.5
majorUpperBound :: Version -> Version
isWildcardRange :: Version -> Version -> Bool

-- | VersionRange parser parametrised by version digit parser.
--   
--   
--   
- versionDigitParser is used for all
--   VersionRange.
--   
- integral is used for backward-compat
--   pkgconfig-depends versions,
--   PkgConfigVersionRange.
--   
versionRangeParser :: CabalParsing m => m Int -> CabalSpecVersion -> m VersionRange

module Distribution.Types.SourceRepo

-- | Information about the source revision control system for a package.
--   
--   When specifying a repo it is useful to know the meaning or intention
--   of the information as doing so enables automation. There are two
--   obvious common purposes: one is to find the repo for the latest
--   development version, the other is to find the repo for this specific
--   release. The ReopKind specifies which one we mean (or another
--   custom one).
--   
--   A package can specify one or the other kind or both. Most will specify
--   just a head repo but some may want to specify a repo to reconstruct
--   the sources for this package release.
--   
--   The required information is the RepoType which tells us if it's
--   using Darcs, Git for example. The repoLocation
--   and other details are interpreted according to the repo type.
data SourceRepo
SourceRepo :: RepoKind -> Maybe RepoType -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> Maybe FilePath -> SourceRepo

-- | The kind of repo. This field is required.
[repoKind] :: SourceRepo -> RepoKind

-- | The type of the source repository system for this repo, eg
--   Darcs or Git. This field is required.
[repoType] :: SourceRepo -> Maybe RepoType

-- | The location of the repository. For most RepoTypes this is a
--   URL. This field is required.
[repoLocation] :: SourceRepo -> Maybe String

-- | CVS can put multiple "modules" on one server and requires a
--   module name in addition to the location to identify a particular repo.
--   Logically this is part of the location but unfortunately has to be
--   specified separately. This field is required for the CVS
--   RepoType and should not be given otherwise.
[repoModule] :: SourceRepo -> Maybe String

-- | The name or identifier of the branch, if any. Many source control
--   systems have the notion of multiple branches in a repo that exist in
--   the same location. For example Git and CVS use this
--   while systems like Darcs use different locations for different
--   branches. This field is optional but should be used if necessary to
--   identify the sources, especially for the RepoThis repo kind.
[repoBranch] :: SourceRepo -> Maybe String

-- | The tag identify a particular state of the repository. This should be
--   given for the RepoThis repo kind and not for RepoHead
--   kind.
[repoTag] :: SourceRepo -> Maybe String

-- | Some repositories contain multiple projects in different
--   subdirectories This field specifies the subdirectory where this
--   packages sources can be found, eg the subdirectory containing the
--   .cabal file. It is interpreted relative to the root of the
--   repository. This field is optional. If not given the default is "." ie
--   no subdirectory.
[repoSubdir] :: SourceRepo -> Maybe FilePath

-- | What this repo info is for, what it represents.
data RepoKind

-- | The repository for the "head" or development version of the project.
--   This repo is where we should track the latest development activity or
--   the usual repo people should get to contribute patches.
RepoHead :: RepoKind

-- | The repository containing the sources for this exact package version
--   or release. For this kind of repo a tag should be given to give enough
--   information to re-create the exact sources.
RepoThis :: RepoKind
RepoKindUnknown :: String -> RepoKind
data RepoType
KnownRepoType :: KnownRepoType -> RepoType
OtherRepoType :: String -> RepoType

-- | An enumeration of common source control systems. The fields used in
--   the SourceRepo depend on the type of repo. The tools and
--   methods used to obtain and track the repo depend on the repo type.
data KnownRepoType
Darcs :: KnownRepoType
Git :: KnownRepoType
SVN :: KnownRepoType
CVS :: KnownRepoType
Mercurial :: KnownRepoType
GnuArch :: KnownRepoType
Bazaar :: KnownRepoType
Monotone :: KnownRepoType

Pijul :: KnownRepoType
knownRepoTypes :: [KnownRepoType]
emptySourceRepo :: RepoKind -> SourceRepo
classifyRepoType :: String -> RepoType
classifyRepoKind :: String -> RepoKind
instance Data.Binary.Class.Binary Distribution.Types.SourceRepo.KnownRepoType
instance Data.Binary.Class.Binary Distribution.Types.SourceRepo.RepoKind
instance Data.Binary.Class.Binary Distribution.Types.SourceRepo.RepoType
instance Data.Binary.Class.Binary Distribution.Types.SourceRepo.SourceRepo
instance GHC.Internal.Enum.Bounded Distribution.Types.SourceRepo.KnownRepoType
instance GHC.Internal.Data.Data.Data Distribution.Types.SourceRepo.KnownRepoType
instance GHC.Internal.Data.Data.Data Distribution.Types.SourceRepo.RepoKind
instance GHC.Internal.Data.Data.Data Distribution.Types.SourceRepo.RepoType
instance GHC.Internal.Data.Data.Data Distribution.Types.SourceRepo.SourceRepo
instance GHC.Internal.Enum.Enum Distribution.Types.SourceRepo.KnownRepoType
instance GHC.Classes.Eq Distribution.Types.SourceRepo.KnownRepoType
instance GHC.Classes.Eq Distribution.Types.SourceRepo.RepoKind
instance GHC.Classes.Eq Distribution.Types.SourceRepo.RepoType
instance GHC.Classes.Eq Distribution.Types.SourceRepo.SourceRepo
instance GHC.Internal.Generics.Generic Distribution.Types.SourceRepo.KnownRepoType
instance GHC.Internal.Generics.Generic Distribution.Types.SourceRepo.RepoKind
instance GHC.Internal.Generics.Generic Distribution.Types.SourceRepo.RepoType
instance GHC.Internal.Generics.Generic Distribution.Types.SourceRepo.SourceRepo
instance Control.DeepSeq.NFData Distribution.Types.SourceRepo.KnownRepoType
instance Control.DeepSeq.NFData Distribution.Types.SourceRepo.RepoKind
instance Control.DeepSeq.NFData Distribution.Types.SourceRepo.RepoType
instance Control.DeepSeq.NFData Distribution.Types.SourceRepo.SourceRepo
instance GHC.Classes.Ord Distribution.Types.SourceRepo.KnownRepoType
instance GHC.Classes.Ord Distribution.Types.SourceRepo.RepoKind
instance GHC.Classes.Ord Distribution.Types.SourceRepo.RepoType
instance GHC.Classes.Ord Distribution.Types.SourceRepo.SourceRepo
instance Distribution.Parsec.Parsec Distribution.Types.SourceRepo.KnownRepoType
instance Distribution.Parsec.Parsec Distribution.Types.SourceRepo.RepoKind
instance Distribution.Parsec.Parsec Distribution.Types.SourceRepo.RepoType
instance Distribution.Pretty.Pretty Distribution.Types.SourceRepo.KnownRepoType
instance Distribution.Pretty.Pretty Distribution.Types.SourceRepo.RepoKind
instance Distribution.Pretty.Pretty Distribution.Types.SourceRepo.RepoType
instance GHC.Internal.Read.Read Distribution.Types.SourceRepo.KnownRepoType
instance GHC.Internal.Read.Read Distribution.Types.SourceRepo.RepoKind
instance GHC.Internal.Read.Read Distribution.Types.SourceRepo.RepoType
instance GHC.Internal.Read.Read Distribution.Types.SourceRepo.SourceRepo
instance GHC.Internal.Show.Show Distribution.Types.SourceRepo.KnownRepoType
instance GHC.Internal.Show.Show Distribution.Types.SourceRepo.RepoKind
instance GHC.Internal.Show.Show Distribution.Types.SourceRepo.RepoType
instance GHC.Internal.Show.Show Distribution.Types.SourceRepo.SourceRepo
instance Distribution.Utils.Structured.Structured Distribution.Types.SourceRepo.KnownRepoType
instance Distribution.Utils.Structured.Structured Distribution.Types.SourceRepo.RepoKind
instance Distribution.Utils.Structured.Structured Distribution.Types.SourceRepo.RepoType
instance Distribution.Utils.Structured.Structured Distribution.Types.SourceRepo.SourceRepo

module Distribution.Types.SourceRepo.Lens

-- | Information about the source revision control system for a package.
--   
--   When specifying a repo it is useful to know the meaning or intention
--   of the information as doing so enables automation. There are two
--   obvious common purposes: one is to find the repo for the latest
--   development version, the other is to find the repo for this specific
--   release. The ReopKind specifies which one we mean (or another
--   custom one).
--   
--   A package can specify one or the other kind or both. Most will specify
--   just a head repo but some may want to specify a repo to reconstruct
--   the sources for this package release.
--   
--   The required information is the RepoType which tells us if it's
--   using Darcs, Git for example. The repoLocation
--   and other details are interpreted according to the repo type.
data SourceRepo
repoKind :: Lens' SourceRepo RepoKind
repoType :: Lens' SourceRepo (Maybe RepoType)
repoLocation :: Lens' SourceRepo (Maybe String)
repoModule :: Lens' SourceRepo (Maybe String)
repoBranch :: Lens' SourceRepo (Maybe String)
repoTag :: Lens' SourceRepo (Maybe String)
repoSubdir :: Lens' SourceRepo (Maybe FilePath)

module Distribution.Types.PkgconfigVersion

-- | pkg-config versions.
--   
--   In fact, this can be arbitrary ByteString, but Parsec
--   instance is a little pickier.
newtype PkgconfigVersion
PkgconfigVersion :: ByteString -> PkgconfigVersion

-- | Compare two version strings as pkg-config would compare them.
rpmvercmp :: ByteString -> ByteString -> Ordering
instance Data.Binary.Class.Binary Distribution.Types.PkgconfigVersion.PkgconfigVersion
instance GHC.Internal.Data.Data.Data Distribution.Types.PkgconfigVersion.PkgconfigVersion
instance GHC.Classes.Eq Distribution.Types.PkgconfigVersion.PkgconfigVersion
instance GHC.Internal.Generics.Generic Distribution.Types.PkgconfigVersion.PkgconfigVersion
instance Control.DeepSeq.NFData Distribution.Types.PkgconfigVersion.PkgconfigVersion
instance GHC.Classes.Ord Distribution.Types.PkgconfigVersion.PkgconfigVersion
instance Distribution.Parsec.Parsec Distribution.Types.PkgconfigVersion.PkgconfigVersion
instance Distribution.Pretty.Pretty Distribution.Types.PkgconfigVersion.PkgconfigVersion
instance GHC.Internal.Read.Read Distribution.Types.PkgconfigVersion.PkgconfigVersion
instance GHC.Internal.Show.Show Distribution.Types.PkgconfigVersion.PkgconfigVersion
instance Distribution.Utils.Structured.Structured Distribution.Types.PkgconfigVersion.PkgconfigVersion

module Distribution.Types.PkgconfigVersionRange

data PkgconfigVersionRange
PcAnyVersion :: PkgconfigVersionRange
PcThisVersion :: PkgconfigVersion -> PkgconfigVersionRange
PcLaterVersion :: PkgconfigVersion -> PkgconfigVersionRange
PcEarlierVersion :: PkgconfigVersion -> PkgconfigVersionRange
PcOrLaterVersion :: PkgconfigVersion -> PkgconfigVersionRange
PcOrEarlierVersion :: PkgconfigVersion -> PkgconfigVersionRange
PcUnionVersionRanges :: PkgconfigVersionRange -> PkgconfigVersionRange -> PkgconfigVersionRange
PcIntersectVersionRanges :: PkgconfigVersionRange -> PkgconfigVersionRange -> PkgconfigVersionRange
anyPkgconfigVersion :: PkgconfigVersionRange

-- | TODO: this is not precise, but used only to prettify output.
isAnyPkgconfigVersion :: PkgconfigVersionRange -> Bool
withinPkgconfigVersionRange :: PkgconfigVersion -> PkgconfigVersionRange -> Bool
versionToPkgconfigVersion :: Version -> PkgconfigVersion
versionRangeToPkgconfigVersionRange :: VersionRange -> PkgconfigVersionRange
instance Data.Binary.Class.Binary Distribution.Types.PkgconfigVersionRange.PkgconfigVersionRange
instance GHC.Internal.Data.Data.Data Distribution.Types.PkgconfigVersionRange.PkgconfigVersionRange
instance GHC.Classes.Eq Distribution.Types.PkgconfigVersionRange.PkgconfigVersionRange
instance GHC.Internal.Generics.Generic Distribution.Types.PkgconfigVersionRange.PkgconfigVersionRange
instance Control.DeepSeq.NFData Distribution.Types.PkgconfigVersionRange.PkgconfigVersionRange
instance GHC.Classes.Ord Distribution.Types.PkgconfigVersionRange.PkgconfigVersionRange
instance Distribution.Parsec.Parsec Distribution.Types.PkgconfigVersionRange.PkgconfigVersionRange
instance Distribution.Pretty.Pretty Distribution.Types.PkgconfigVersionRange.PkgconfigVersionRange
instance GHC.Internal.Read.Read Distribution.Types.PkgconfigVersionRange.PkgconfigVersionRange
instance GHC.Internal.Show.Show Distribution.Types.PkgconfigVersionRange.PkgconfigVersionRange
instance Distribution.Utils.Structured.Structured Distribution.Types.PkgconfigVersionRange.PkgconfigVersionRange

module Distribution.Types.PkgconfigName

-- | A pkg-config library name
--   
--   This is parsed as any valid argument to the pkg-config utility.
data PkgconfigName

-- | Convert PkgconfigName to String
unPkgconfigName :: PkgconfigName -> String

-- | Construct a PkgconfigName from a String
--   
--   mkPkgconfigName is the inverse to unPkgconfigName
--   
--   Note: No validations are performed to ensure that the resulting
--   PkgconfigName is valid
mkPkgconfigName :: String -> PkgconfigName
instance Data.Binary.Class.Binary Distribution.Types.PkgconfigName.PkgconfigName
instance GHC.Internal.Data.Data.Data Distribution.Types.PkgconfigName.PkgconfigName
instance GHC.Classes.Eq Distribution.Types.PkgconfigName.PkgconfigName
instance GHC.Internal.Generics.Generic Distribution.Types.PkgconfigName.PkgconfigName
instance GHC.Internal.Data.String.IsString Distribution.Types.PkgconfigName.PkgconfigName
instance Control.DeepSeq.NFData Distribution.Types.PkgconfigName.PkgconfigName
instance GHC.Classes.Ord Distribution.Types.PkgconfigName.PkgconfigName
instance Distribution.Parsec.Parsec Distribution.Types.PkgconfigName.PkgconfigName
instance Distribution.Pretty.Pretty Distribution.Types.PkgconfigName.PkgconfigName
instance GHC.Internal.Read.Read Distribution.Types.PkgconfigName.PkgconfigName
instance GHC.Internal.Show.Show Distribution.Types.PkgconfigName.PkgconfigName
instance Distribution.Utils.Structured.Structured Distribution.Types.PkgconfigName.PkgconfigName

module Distribution.Types.PkgconfigDependency

-- | Describes a dependency on a pkg-config library
data PkgconfigDependency
PkgconfigDependency :: PkgconfigName -> PkgconfigVersionRange -> PkgconfigDependency
instance Data.Binary.Class.Binary Distribution.Types.PkgconfigDependency.PkgconfigDependency
instance GHC.Internal.Data.Data.Data Distribution.Types.PkgconfigDependency.PkgconfigDependency
instance GHC.Classes.Eq Distribution.Types.PkgconfigDependency.PkgconfigDependency
instance GHC.Internal.Generics.Generic Distribution.Types.PkgconfigDependency.PkgconfigDependency
instance Control.DeepSeq.NFData Distribution.Types.PkgconfigDependency.PkgconfigDependency
instance GHC.Classes.Ord Distribution.Types.PkgconfigDependency.PkgconfigDependency
instance Distribution.Parsec.Parsec Distribution.Types.PkgconfigDependency.PkgconfigDependency
instance Distribution.Pretty.Pretty Distribution.Types.PkgconfigDependency.PkgconfigDependency
instance GHC.Internal.Read.Read Distribution.Types.PkgconfigDependency.PkgconfigDependency
instance GHC.Internal.Show.Show Distribution.Types.PkgconfigDependency.PkgconfigDependency
instance Distribution.Utils.Structured.Structured Distribution.Types.PkgconfigDependency.PkgconfigDependency

module Distribution.Types.PackageName

-- | A package name.
--   
--   Use mkPackageName and unPackageName to convert from/to a
--   String.
--   
--   This type is opaque since Cabal-2.0
data PackageName

-- | Convert PackageName to String
unPackageName :: PackageName -> String

-- | Construct a PackageName from a String
--   
--   mkPackageName is the inverse to unPackageName
--   
--   Note: No validations are performed to ensure that the resulting
--   PackageName is valid
mkPackageName :: String -> PackageName

unPackageNameST :: PackageName -> ShortText

-- | Construct a PackageName from a ShortText
--   
--   Note: No validations are performed to ensure that the resulting
--   PackageName is valid
mkPackageNameST :: ShortText -> PackageName
instance Data.Binary.Class.Binary Distribution.Types.PackageName.PackageName
instance GHC.Internal.Data.Data.Data Distribution.Types.PackageName.PackageName
instance GHC.Classes.Eq Distribution.Types.PackageName.PackageName
instance GHC.Internal.Generics.Generic Distribution.Types.PackageName.PackageName
instance GHC.Internal.Data.String.IsString Distribution.Types.PackageName.PackageName
instance Control.DeepSeq.NFData Distribution.Types.PackageName.PackageName
instance GHC.Classes.Ord Distribution.Types.PackageName.PackageName
instance Distribution.Parsec.Parsec Distribution.Types.PackageName.PackageName
instance Distribution.Pretty.Pretty Distribution.Types.PackageName.PackageName
instance GHC.Internal.Read.Read Distribution.Types.PackageName.PackageName
instance GHC.Internal.Show.Show Distribution.Types.PackageName.PackageName
instance Distribution.Utils.Structured.Structured Distribution.Types.PackageName.PackageName

module Distribution.Types.UnqualComponentName

-- | An unqualified component name, for any kind of component.
--   
--   This is distinguished from a ComponentName and
--   ComponentId. The former also states which of a library,
--   executable, etc the name refers too. The later uniquely identifiers a
--   component and its closure.
data UnqualComponentName

-- | Convert UnqualComponentName to String
unUnqualComponentName :: UnqualComponentName -> String

unUnqualComponentNameST :: UnqualComponentName -> ShortText

-- | Construct a UnqualComponentName from a String
--   
--   mkUnqualComponentName is the inverse to
--   unUnqualComponentName
--   
--   Note: No validations are performed to ensure that the resulting
--   UnqualComponentName is valid
mkUnqualComponentName :: String -> UnqualComponentName

-- | Converts a package name to an unqualified component name
--   
--   Useful in legacy situations where a package name may refer to an
--   internal component, if one is defined with that name.
--   
--   2018-12-21: These "legacy" situations are not legacy. We can
--   build-depends on the internal library. However Now dependency
--   contains Set LibraryName, and we should use that.
packageNameToUnqualComponentName :: PackageName -> UnqualComponentName

-- | Converts an unqualified component name to a package name
--   
--   packageNameToUnqualComponentName is the inverse of
--   unqualComponentNameToPackageName.
--   
--   Useful in legacy situations where a package name may refer to an
--   internal component, if one is defined with that name.
unqualComponentNameToPackageName :: UnqualComponentName -> PackageName

-- | Combine names in targets if one name is empty or both names are equal
--   (partial function). Useful in Semigroup and similar instances.
combineNames :: (Monoid b, Eq b, Show b) => a -> a -> (a -> b) -> String -> b
instance Data.Binary.Class.Binary Distribution.Types.UnqualComponentName.UnqualComponentName
instance GHC.Internal.Data.Data.Data Distribution.Types.UnqualComponentName.UnqualComponentName
instance GHC.Classes.Eq Distribution.Types.UnqualComponentName.UnqualComponentName
instance GHC.Internal.Generics.Generic Distribution.Types.UnqualComponentName.UnqualComponentName
instance GHC.Internal.Data.String.IsString Distribution.Types.UnqualComponentName.UnqualComponentName
instance GHC.Internal.Base.Monoid Distribution.Types.UnqualComponentName.UnqualComponentName
instance Control.DeepSeq.NFData Distribution.Types.UnqualComponentName.UnqualComponentName
instance GHC.Classes.Ord Distribution.Types.UnqualComponentName.UnqualComponentName
instance Distribution.Parsec.Parsec Distribution.Types.UnqualComponentName.UnqualComponentName
instance Distribution.Pretty.Pretty Distribution.Types.UnqualComponentName.UnqualComponentName
instance GHC.Internal.Read.Read Distribution.Types.UnqualComponentName.UnqualComponentName
instance GHC.Internal.Base.Semigroup Distribution.Types.UnqualComponentName.UnqualComponentName
instance GHC.Internal.Show.Show Distribution.Types.UnqualComponentName.UnqualComponentName
instance Distribution.Utils.Structured.Structured Distribution.Types.UnqualComponentName.UnqualComponentName

module Distribution.Types.LibraryVisibility

-- | Multi-lib visibility
data LibraryVisibility

-- | Can be used as a dependency for other packages
LibraryVisibilityPublic :: LibraryVisibility

-- | Internal library, default
LibraryVisibilityPrivate :: LibraryVisibility
instance Data.Binary.Class.Binary Distribution.Types.LibraryVisibility.LibraryVisibility
instance GHC.Internal.Data.Data.Data Distribution.Types.LibraryVisibility.LibraryVisibility
instance GHC.Classes.Eq Distribution.Types.LibraryVisibility.LibraryVisibility
instance GHC.Internal.Generics.Generic Distribution.Types.LibraryVisibility.LibraryVisibility
instance GHC.Internal.Base.Monoid Distribution.Types.LibraryVisibility.LibraryVisibility
instance Control.DeepSeq.NFData Distribution.Types.LibraryVisibility.LibraryVisibility
instance GHC.Classes.Ord Distribution.Types.LibraryVisibility.LibraryVisibility
instance Distribution.Parsec.Parsec Distribution.Types.LibraryVisibility.LibraryVisibility
instance Distribution.Pretty.Pretty Distribution.Types.LibraryVisibility.LibraryVisibility
instance GHC.Internal.Read.Read Distribution.Types.LibraryVisibility.LibraryVisibility
instance GHC.Internal.Base.Semigroup Distribution.Types.LibraryVisibility.LibraryVisibility
instance GHC.Internal.Show.Show Distribution.Types.LibraryVisibility.LibraryVisibility
instance Distribution.Utils.Structured.Structured Distribution.Types.LibraryVisibility.LibraryVisibility

module Distribution.Types.LibraryName
data LibraryName
LMainLibName :: LibraryName
LSubLibName :: UnqualComponentName -> LibraryName
defaultLibName :: LibraryName

-- | Convert the UnqualComponentName of a library into a
--   LibraryName.
maybeToLibraryName :: Maybe UnqualComponentName -> LibraryName
showLibraryName :: LibraryName -> String
libraryNameStanza :: LibraryName -> String
libraryNameString :: LibraryName -> Maybe UnqualComponentName

-- | Pretty print LibraryName in build-target-ish syntax.
--   
--   Note: there are no Pretty or Parsec instances, as
--   there's other way to represent LibraryName, namely as bare
--   UnqualComponentName.
prettyLibraryNameComponent :: LibraryName -> Doc
parsecLibraryNameComponent :: CabalParsing m => m LibraryName
instance Data.Binary.Class.Binary Distribution.Types.LibraryName.LibraryName
instance GHC.Internal.Data.Data.Data Distribution.Types.LibraryName.LibraryName
instance GHC.Classes.Eq Distribution.Types.LibraryName.LibraryName
instance GHC.Internal.Generics.Generic Distribution.Types.LibraryName.LibraryName
instance Control.DeepSeq.NFData Distribution.Types.LibraryName.LibraryName
instance GHC.Classes.Ord Distribution.Types.LibraryName.LibraryName
instance GHC.Internal.Read.Read Distribution.Types.LibraryName.LibraryName
instance GHC.Internal.Show.Show Distribution.Types.LibraryName.LibraryName
instance Distribution.Utils.Structured.Structured Distribution.Types.LibraryName.LibraryName

module Distribution.Types.MungedPackageName

-- | A combination of a package and component name used in various legacy
--   interfaces, chiefly bundled with a version as
--   MungedPackageId. It's generally better to use a
--   UnitId to opaquely refer to some compilation/packing unit,
--   but that doesn't always work, e.g. where a "name" is needed, in which
--   case this can be used as a fallback.
--   
--   Use mkMungedPackageName and unMungedPackageName to
--   convert from/to a String.
--   
--   In 3.0.0.0 representation was changed from opaque (string) to
--   semantic representation.
data MungedPackageName
MungedPackageName :: !PackageName -> !LibraryName -> MungedPackageName

-- | Intended for internal use only
--   
--   
--   >>> decodeCompatPackageName "z-servant-z-lackey"
--   MungedPackageName (PackageName "servant") (LSubLibName (UnqualComponentName "lackey"))
--   
decodeCompatPackageName :: PackageName -> MungedPackageName

-- | Intended for internal use only
--   
--   
--   >>> encodeCompatPackageName $ MungedPackageName "servant" (LSubLibName "lackey")
--   PackageName "z-servant-z-lackey"
--   
--   
--   This is used in cabal-install in the Solver. May become
--   obsolete as solver moves to per-component solving.
encodeCompatPackageName :: MungedPackageName -> PackageName
instance Data.Binary.Class.Binary Distribution.Types.MungedPackageName.MungedPackageName
instance GHC.Internal.Data.Data.Data Distribution.Types.MungedPackageName.MungedPackageName
instance GHC.Classes.Eq Distribution.Types.MungedPackageName.MungedPackageName
instance GHC.Internal.Generics.Generic Distribution.Types.MungedPackageName.MungedPackageName
instance Control.DeepSeq.NFData Distribution.Types.MungedPackageName.MungedPackageName
instance GHC.Classes.Ord Distribution.Types.MungedPackageName.MungedPackageName
instance Distribution.Parsec.Parsec Distribution.Types.MungedPackageName.MungedPackageName
instance Distribution.Pretty.Pretty Distribution.Types.MungedPackageName.MungedPackageName
instance GHC.Internal.Read.Read Distribution.Types.MungedPackageName.MungedPackageName
instance GHC.Internal.Show.Show Distribution.Types.MungedPackageName.MungedPackageName
instance Distribution.Utils.Structured.Structured Distribution.Types.MungedPackageName.MungedPackageName

module Distribution.Types.ForeignLibType

-- | What kind of foreign library is to be built?
data ForeignLibType

-- | A native shared library (.so on Linux, .dylib on
--   OSX, or .dll on Windows).
ForeignLibNativeShared :: ForeignLibType

-- | A native static library (not currently supported.)
ForeignLibNativeStatic :: ForeignLibType
ForeignLibTypeUnknown :: ForeignLibType
knownForeignLibTypes :: [ForeignLibType]
foreignLibTypeIsShared :: ForeignLibType -> Bool
instance Data.Binary.Class.Binary Distribution.Types.ForeignLibType.ForeignLibType
instance GHC.Internal.Data.Data.Data Distribution.Types.ForeignLibType.ForeignLibType
instance GHC.Classes.Eq Distribution.Types.ForeignLibType.ForeignLibType
instance GHC.Internal.Generics.Generic Distribution.Types.ForeignLibType.ForeignLibType
instance GHC.Internal.Base.Monoid Distribution.Types.ForeignLibType.ForeignLibType
instance Control.DeepSeq.NFData Distribution.Types.ForeignLibType.ForeignLibType
instance GHC.Classes.Ord Distribution.Types.ForeignLibType.ForeignLibType
instance Distribution.Parsec.Parsec Distribution.Types.ForeignLibType.ForeignLibType
instance Distribution.Pretty.Pretty Distribution.Types.ForeignLibType.ForeignLibType
instance GHC.Internal.Read.Read Distribution.Types.ForeignLibType.ForeignLibType
instance GHC.Internal.Base.Semigroup Distribution.Types.ForeignLibType.ForeignLibType
instance GHC.Internal.Show.Show Distribution.Types.ForeignLibType.ForeignLibType
instance Distribution.Utils.Structured.Structured Distribution.Types.ForeignLibType.ForeignLibType

module Distribution.Types.ForeignLibOption
data ForeignLibOption

-- | Merge in all dependent libraries (i.e., use ghc -shared
--   -static rather than just record the dependencies, ala ghc
--   -shared -dynamic). This option is compulsory on Windows and
--   unsupported on other platforms.
ForeignLibStandalone :: ForeignLibOption
instance Data.Binary.Class.Binary Distribution.Types.ForeignLibOption.ForeignLibOption
instance GHC.Internal.Data.Data.Data Distribution.Types.ForeignLibOption.ForeignLibOption
instance GHC.Classes.Eq Distribution.Types.ForeignLibOption.ForeignLibOption
instance GHC.Internal.Generics.Generic Distribution.Types.ForeignLibOption.ForeignLibOption
instance Control.DeepSeq.NFData Distribution.Types.ForeignLibOption.ForeignLibOption
instance GHC.Classes.Ord Distribution.Types.ForeignLibOption.ForeignLibOption
instance Distribution.Parsec.Parsec Distribution.Types.ForeignLibOption.ForeignLibOption
instance Distribution.Pretty.Pretty Distribution.Types.ForeignLibOption.ForeignLibOption
instance GHC.Internal.Read.Read Distribution.Types.ForeignLibOption.ForeignLibOption
instance GHC.Internal.Show.Show Distribution.Types.ForeignLibOption.ForeignLibOption
instance Distribution.Utils.Structured.Structured Distribution.Types.ForeignLibOption.ForeignLibOption

module Distribution.Types.Flag

-- | A flag can represent a feature to be included, or a way of linking a
--   target against its dependencies, or in fact whatever you can think of.
data PackageFlag
MkPackageFlag :: FlagName -> String -> Bool -> Bool -> PackageFlag
[flagName] :: PackageFlag -> FlagName
[flagDescription] :: PackageFlag -> String
[flagDefault] :: PackageFlag -> Bool
[flagManual] :: PackageFlag -> Bool

-- | A PackageFlag initialized with default parameters.
emptyFlag :: FlagName -> PackageFlag

-- | A FlagName is the name of a user-defined configuration flag
--   
--   Use mkFlagName and unFlagName to convert from/to a
--   String.
--   
--   This type is opaque since Cabal-2.0
data FlagName

-- | Construct a FlagName from a String
--   
--   mkFlagName is the inverse to unFlagName
--   
--   Note: No validations are performed to ensure that the resulting
--   FlagName is valid
mkFlagName :: String -> FlagName

-- | Convert FlagName to String
unFlagName :: FlagName -> String

-- | A FlagAssignment is a total or partial mapping of
--   FlagNames to Bool flag values. It represents the flags
--   chosen by the user or discovered during configuration. For example
--   --flags=foo --flags=-bar becomes [("foo", True), ("bar",
--   False)]
--   
--   TODO: Why we record the multiplicity of the flag?
data FlagAssignment

-- | Construct a FlagAssignment from a list of flag/value pairs.
--   
--   If duplicate flags occur in the input list, the later entries in the
--   list will take precedence.
mkFlagAssignment :: [(FlagName, Bool)] -> FlagAssignment

-- | Deconstruct a FlagAssignment into a list of flag/value pairs.
--   
--   
--   null (findDuplicateFlagAssignments fa) ==> (mkFlagAssignment . unFlagAssignment) fa == fa
--   
unFlagAssignment :: FlagAssignment -> [(FlagName, Bool)]

-- | Lookup the value for a flag
--   
--   Returns Nothing if the flag isn't contained in the
--   FlagAssignment.
lookupFlagAssignment :: FlagName -> FlagAssignment -> Maybe Bool

-- | Insert or update the boolean value of a flag.
--   
--   If the flag is already present in the FlagAssignment, the value
--   will be updated and the fact that multiple values have been provided
--   for that flag will be recorded so that a warning can be generated
--   later on.
insertFlagAssignment :: FlagName -> Bool -> FlagAssignment -> FlagAssignment

-- | Remove all flag-assignments from the first FlagAssignment that
--   are contained in the second FlagAssignment
--   
--   NB/TODO: This currently only removes flag assignments which also match
--   the value assignment! We should review the code which uses this
--   operation to figure out if this it's not enough to only compare the
--   flagnames without the values.
diffFlagAssignment :: FlagAssignment -> FlagAssignment -> FlagAssignment

-- | Find the FlagNames that have been listed more than once.
findDuplicateFlagAssignments :: FlagAssignment -> [FlagName]

-- | Test whether FlagAssignment is empty.
nullFlagAssignment :: FlagAssignment -> Bool

-- | String representation of a flag-value pair.
showFlagValue :: (FlagName, Bool) -> String

-- | Pretty-prints a flag assignment.
dispFlagAssignment :: FlagAssignment -> Doc

-- | Show flag assignment.
showFlagAssignment :: FlagAssignment -> String

-- | Parses a flag assignment.
parsecFlagAssignment :: CabalParsing m => m FlagAssignment

-- | Parse a non-empty flag assignment
--   
--   The flags have to explicitly start with minus or plus.
parsecFlagAssignmentNonEmpty :: CabalParsing m => m FlagAssignment

-- | We need this as far as we support custom setups older than 2.2.0.0
legacyShowFlagAssignment :: FlagAssignment -> String

legacyShowFlagAssignment' :: FlagAssignment -> [String]

-- | We need this as far as we support custom setups older than 2.2.0.0
legacyParsecFlagAssignment :: CabalParsing m => m FlagAssignment
instance Data.Binary.Class.Binary Distribution.Types.Flag.FlagAssignment
instance Data.Binary.Class.Binary Distribution.Types.Flag.FlagName
instance Data.Binary.Class.Binary Distribution.Types.Flag.PackageFlag
instance GHC.Internal.Data.Data.Data Distribution.Types.Flag.FlagName
instance GHC.Internal.Data.Data.Data Distribution.Types.Flag.PackageFlag
instance GHC.Classes.Eq Distribution.Types.Flag.FlagAssignment
instance GHC.Classes.Eq Distribution.Types.Flag.FlagName
instance GHC.Classes.Eq Distribution.Types.Flag.PackageFlag
instance GHC.Internal.Generics.Generic Distribution.Types.Flag.FlagAssignment
instance GHC.Internal.Generics.Generic Distribution.Types.Flag.FlagName
instance GHC.Internal.Generics.Generic Distribution.Types.Flag.PackageFlag
instance GHC.Internal.Data.String.IsString Distribution.Types.Flag.FlagName
instance GHC.Internal.Base.Monoid Distribution.Types.Flag.FlagAssignment
instance Control.DeepSeq.NFData Distribution.Types.Flag.FlagAssignment
instance Control.DeepSeq.NFData Distribution.Types.Flag.FlagName
instance Control.DeepSeq.NFData Distribution.Types.Flag.PackageFlag
instance GHC.Classes.Ord Distribution.Types.Flag.FlagAssignment
instance GHC.Classes.Ord Distribution.Types.Flag.FlagName
instance Distribution.Parsec.Parsec Distribution.Types.Flag.FlagAssignment
instance Distribution.Parsec.Parsec Distribution.Types.Flag.FlagName
instance Distribution.Pretty.Pretty Distribution.Types.Flag.FlagAssignment
instance Distribution.Pretty.Pretty Distribution.Types.Flag.FlagName
instance GHC.Internal.Read.Read Distribution.Types.Flag.FlagAssignment
instance GHC.Internal.Read.Read Distribution.Types.Flag.FlagName
instance GHC.Internal.Base.Semigroup Distribution.Types.Flag.FlagAssignment
instance GHC.Internal.Show.Show Distribution.Types.Flag.FlagAssignment
instance GHC.Internal.Show.Show Distribution.Types.Flag.FlagName
instance GHC.Internal.Show.Show Distribution.Types.Flag.PackageFlag
instance Distribution.Utils.Structured.Structured Distribution.Types.Flag.FlagAssignment
instance Distribution.Utils.Structured.Structured Distribution.Types.Flag.FlagName
instance Distribution.Utils.Structured.Structured Distribution.Types.Flag.PackageFlag

module Distribution.Types.ExecutableScope
data ExecutableScope
ExecutablePublic :: ExecutableScope
ExecutablePrivate :: ExecutableScope
instance Data.Binary.Class.Binary Distribution.Types.ExecutableScope.ExecutableScope
instance GHC.Internal.Data.Data.Data Distribution.Types.ExecutableScope.ExecutableScope
instance GHC.Classes.Eq Distribution.Types.ExecutableScope.ExecutableScope
instance GHC.Internal.Generics.Generic Distribution.Types.ExecutableScope.ExecutableScope
instance GHC.Internal.Base.Monoid Distribution.Types.ExecutableScope.ExecutableScope
instance Control.DeepSeq.NFData Distribution.Types.ExecutableScope.ExecutableScope
instance GHC.Classes.Ord Distribution.Types.ExecutableScope.ExecutableScope
instance Distribution.Parsec.Parsec Distribution.Types.ExecutableScope.ExecutableScope
instance Distribution.Pretty.Pretty Distribution.Types.ExecutableScope.ExecutableScope
instance GHC.Internal.Read.Read Distribution.Types.ExecutableScope.ExecutableScope
instance GHC.Internal.Base.Semigroup Distribution.Types.ExecutableScope.ExecutableScope
instance GHC.Internal.Show.Show Distribution.Types.ExecutableScope.ExecutableScope
instance Distribution.Utils.Structured.Structured Distribution.Types.ExecutableScope.ExecutableScope

module Distribution.Types.ComponentName
data ComponentName
CLibName :: LibraryName -> ComponentName
CNotLibName :: NotLibComponentName -> ComponentName
pattern CFLibName :: UnqualComponentName -> ComponentName
pattern CExeName :: UnqualComponentName -> ComponentName
pattern CTestName :: UnqualComponentName -> ComponentName
pattern CBenchName :: UnqualComponentName -> ComponentName
showComponentName :: ComponentName -> String
componentNameRaw :: ComponentName -> String
componentNameStanza :: ComponentName -> String

-- | This gets the underlying unqualified component name. In fact, it is
--   guaranteed to uniquely identify a component, returning
--   Nothing if the ComponentName was for the public
--   library.
componentNameString :: ComponentName -> Maybe UnqualComponentName
instance Data.Binary.Class.Binary Distribution.Types.ComponentName.ComponentName
instance Data.Binary.Class.Binary Distribution.Types.ComponentName.NotLibComponentName
instance GHC.Classes.Eq Distribution.Types.ComponentName.ComponentName
instance GHC.Classes.Eq Distribution.Types.ComponentName.NotLibComponentName
instance GHC.Internal.Generics.Generic Distribution.Types.ComponentName.ComponentName
instance GHC.Internal.Generics.Generic Distribution.Types.ComponentName.NotLibComponentName
instance GHC.Classes.Ord Distribution.Types.ComponentName.ComponentName
instance GHC.Classes.Ord Distribution.Types.ComponentName.NotLibComponentName
instance Distribution.Parsec.Parsec Distribution.Types.ComponentName.ComponentName
instance Distribution.Pretty.Pretty Distribution.Types.ComponentName.ComponentName
instance GHC.Internal.Read.Read Distribution.Types.ComponentName.ComponentName
instance GHC.Internal.Read.Read Distribution.Types.ComponentName.NotLibComponentName
instance GHC.Internal.Show.Show Distribution.Types.ComponentName.ComponentName
instance GHC.Internal.Show.Show Distribution.Types.ComponentName.NotLibComponentName
instance Distribution.Utils.Structured.Structured Distribution.Types.ComponentName.ComponentName
instance Distribution.Utils.Structured.Structured Distribution.Types.ComponentName.NotLibComponentName

module Distribution.Types.ComponentId

-- | A ComponentId uniquely identifies the transitive source code
--   closure of a component (i.e. libraries, executables).
--   
--   For non-Backpack components, this corresponds one to one with the
--   UnitId, which serves as the basis for install paths, linker
--   symbols, etc.
--   
--   Use mkComponentId and unComponentId to convert from/to a
--   String.
--   
--   This type is opaque since Cabal-2.0
data ComponentId

-- | Convert ComponentId to String
unComponentId :: ComponentId -> String

-- | Construct a ComponentId from a String
--   
--   mkComponentId is the inverse to unComponentId
--   
--   Note: No validations are performed to ensure that the resulting
--   ComponentId is valid
mkComponentId :: String -> ComponentId
instance Data.Binary.Class.Binary Distribution.Types.ComponentId.ComponentId
instance GHC.Internal.Data.Data.Data Distribution.Types.ComponentId.ComponentId
instance GHC.Classes.Eq Distribution.Types.ComponentId.ComponentId
instance GHC.Internal.Generics.Generic Distribution.Types.ComponentId.ComponentId
instance GHC.Internal.Data.String.IsString Distribution.Types.ComponentId.ComponentId
instance Control.DeepSeq.NFData Distribution.Types.ComponentId.ComponentId
instance GHC.Classes.Ord Distribution.Types.ComponentId.ComponentId
instance Distribution.Parsec.Parsec Distribution.Types.ComponentId.ComponentId
instance Distribution.Pretty.Pretty Distribution.Types.ComponentId.ComponentId
instance GHC.Internal.Read.Read Distribution.Types.ComponentId.ComponentId
instance GHC.Internal.Show.Show Distribution.Types.ComponentId.ComponentId
instance Distribution.Utils.Structured.Structured Distribution.Types.ComponentId.ComponentId

module Distribution.Types.BuildType

-- | The type of build system used by this package.
data BuildType

-- | calls Distribution.Simple.defaultMain
Simple :: BuildType

-- | calls Distribution.Simple.defaultMainWithHooks
--   defaultUserHooks, which invokes configure to generate
--   additional build information used by later phases.
Configure :: BuildType

-- | calls Distribution.Make.defaultMain
Make :: BuildType

-- | uses user-supplied Setup.hs or Setup.lhs (default)
Custom :: BuildType
knownBuildTypes :: [BuildType]
instance Data.Binary.Class.Binary Distribution.Types.BuildType.BuildType
instance GHC.Internal.Data.Data.Data Distribution.Types.BuildType.BuildType
instance GHC.Classes.Eq Distribution.Types.BuildType.BuildType
instance GHC.Internal.Generics.Generic Distribution.Types.BuildType.BuildType
instance Control.DeepSeq.NFData Distribution.Types.BuildType.BuildType
instance GHC.Classes.Ord Distribution.Types.BuildType.BuildType
instance Distribution.Parsec.Parsec Distribution.Types.BuildType.BuildType
instance Distribution.Pretty.Pretty Distribution.Types.BuildType.BuildType
instance GHC.Internal.Read.Read Distribution.Types.BuildType.BuildType
instance GHC.Internal.Show.Show Distribution.Types.BuildType.BuildType
instance Distribution.Utils.Structured.Structured Distribution.Types.BuildType.BuildType

module Distribution.Types.AbiHash

-- | ABI Hashes
--   
--   Use mkAbiHash and unAbiHash to convert from/to a
--   String.
--   
--   This type is opaque since Cabal-2.0
data AbiHash

-- | Convert AbiHash to String
unAbiHash :: AbiHash -> String

-- | Construct a AbiHash from a String
--   
--   mkAbiHash is the inverse to unAbiHash
--   
--   Note: No validations are performed to ensure that the resulting
--   AbiHash is valid
mkAbiHash :: String -> AbiHash
instance Data.Binary.Class.Binary Distribution.Types.AbiHash.AbiHash
instance GHC.Classes.Eq Distribution.Types.AbiHash.AbiHash
instance GHC.Internal.Generics.Generic Distribution.Types.AbiHash.AbiHash
instance GHC.Internal.Data.String.IsString Distribution.Types.AbiHash.AbiHash
instance Control.DeepSeq.NFData Distribution.Types.AbiHash.AbiHash
instance Distribution.Parsec.Parsec Distribution.Types.AbiHash.AbiHash
instance Distribution.Pretty.Pretty Distribution.Types.AbiHash.AbiHash
instance GHC.Internal.Read.Read Distribution.Types.AbiHash.AbiHash
instance GHC.Internal.Show.Show Distribution.Types.AbiHash.AbiHash
instance Distribution.Utils.Structured.Structured Distribution.Types.AbiHash.AbiHash

module Distribution.Text
display :: Pretty a => a -> String
simpleParse :: Parsec a => String -> Maybe a

-- | Cabal often needs to do slightly different things on specific
--   platforms. You probably know about the os however using that is
--   very inconvenient because it is a string and different Haskell
--   implementations do not agree on using the same strings for the same
--   platforms! (In particular see the controversy over "windows" vs
--   "mingw32"). So to make it more consistent and easy to use we have an
--   OS enumeration.
module Distribution.System

-- | These are the known OS names: Linux, Windows, OSX ,FreeBSD, OpenBSD,
--   NetBSD, DragonFly ,Solaris, AIX, HPUX, IRIX ,HaLVM ,Hurd ,IOS,
--   Android, Ghcjs, Wasi
--   
--   The following aliases can also be used:, * Windows aliases: mingw32,
--   win32, cygwin32 * OSX alias: darwin * Hurd alias: gnu * FreeBSD alias:
--   kfreebsdgnu * Solaris alias: solaris2
data OS
Linux :: OS
Windows :: OS
OSX :: OS
FreeBSD :: OS
OpenBSD :: OS
NetBSD :: OS
DragonFly :: OS
Solaris :: OS
AIX :: OS
HPUX :: OS
IRIX :: OS
HaLVM :: OS
Hurd :: OS
IOS :: OS
Android :: OS
Ghcjs :: OS
Wasi :: OS
Haiku :: OS
OtherOS :: String -> OS
buildOS :: OS

-- | These are the known Arches: I386, X86_64, PPC, PPC64, PPC64LE, Sparc,
--   Sparc64, Arm, AArch64, Mips, SH, IA64, S390, S390X, Alpha, Hppa,
--   Rs6000, M68k, Vax, RISCV64, LoongArch64, JavaScript and Wasm32.
--   
--   The following aliases can also be used: * PPC alias: powerpc * PPC64
--   alias : powerpc64 * PPC64LE alias : powerpc64le * Mips aliases:
--   mipsel, mipseb * Arm aliases: armeb, armel * AArch64 aliases: arm64
data Arch
I386 :: Arch
X86_64 :: Arch
PPC :: Arch
PPC64 :: Arch
PPC64LE :: Arch
Sparc :: Arch
Sparc64 :: Arch
Arm :: Arch
AArch64 :: Arch
Mips :: Arch
SH :: Arch
IA64 :: Arch
S390 :: Arch
S390X :: Arch
Alpha :: Arch
Hppa :: Arch
Rs6000 :: Arch
M68k :: Arch
Vax :: Arch
RISCV64 :: Arch
LoongArch64 :: Arch
JavaScript :: Arch
Wasm32 :: Arch
OtherArch :: String -> Arch
buildArch :: Arch
data Platform
Platform :: Arch -> OS -> Platform

-- | The platform Cabal was compiled on. In most cases,
--   LocalBuildInfo.hostPlatform should be used instead (the
--   platform we're targeting).
buildPlatform :: Platform
platformFromTriple :: String -> Maybe Platform
knownOSs :: [OS]
knownArches :: [Arch]

-- | How strict to be when classifying strings into the OS and
--   Arch enums.
--   
--   The reason we have multiple ways to do the classification is because
--   there are two situations where we need to do it.
--   
--   For parsing OS and arch names in .cabal files we really want everyone
--   to be referring to the same or arch by the same name. Variety is not a
--   virtue in this case. We don't mind about case though.
--   
--   For the System.Info.os/arch different Haskell implementations use
--   different names for the same or/arch. Also they tend to distinguish
--   versions of an OS/arch which we just don't care about.
--   
--   The Compat classification allows us to recognise aliases that
--   are already in common use but it allows us to distinguish them from
--   the canonical name which enables us to warn about such deprecated
--   aliases.
data ClassificationStrictness
Permissive :: ClassificationStrictness
Compat :: ClassificationStrictness
Strict :: ClassificationStrictness
classifyOS :: ClassificationStrictness -> String -> OS
classifyArch :: ClassificationStrictness -> String -> Arch
instance Data.Binary.Class.Binary Distribution.System.Arch
instance Data.Binary.Class.Binary Distribution.System.OS
instance Data.Binary.Class.Binary Distribution.System.Platform
instance GHC.Internal.Data.Data.Data Distribution.System.Arch
instance GHC.Internal.Data.Data.Data Distribution.System.OS
instance GHC.Internal.Data.Data.Data Distribution.System.Platform
instance GHC.Classes.Eq Distribution.System.Arch
instance GHC.Classes.Eq Distribution.System.OS
instance GHC.Classes.Eq Distribution.System.Platform
instance GHC.Internal.Generics.Generic Distribution.System.Arch
instance GHC.Internal.Generics.Generic Distribution.System.OS
instance GHC.Internal.Generics.Generic Distribution.System.Platform
instance Control.DeepSeq.NFData Distribution.System.Arch
instance Control.DeepSeq.NFData Distribution.System.OS
instance Control.DeepSeq.NFData Distribution.System.Platform
instance GHC.Classes.Ord Distribution.System.Arch
instance GHC.Classes.Ord Distribution.System.OS
instance GHC.Classes.Ord Distribution.System.Platform
instance Distribution.Parsec.Parsec Distribution.System.Arch
instance Distribution.Parsec.Parsec Distribution.System.OS
instance Distribution.Parsec.Parsec Distribution.System.Platform
instance Distribution.Pretty.Pretty Distribution.System.Arch
instance Distribution.Pretty.Pretty Distribution.System.OS
instance Distribution.Pretty.Pretty Distribution.System.Platform
instance GHC.Internal.Read.Read Distribution.System.Arch
instance GHC.Internal.Read.Read Distribution.System.OS
instance GHC.Internal.Read.Read Distribution.System.Platform
instance GHC.Internal.Show.Show Distribution.System.Arch
instance GHC.Internal.Show.Show Distribution.System.OS
instance GHC.Internal.Show.Show Distribution.System.Platform
instance Distribution.Utils.Structured.Structured Distribution.System.Arch
instance Distribution.Utils.Structured.Structured Distribution.System.OS
instance Distribution.Utils.Structured.Structured Distribution.System.Platform

module Distribution.SPDX.LicenseReference

-- | A user defined license reference denoted by
--   LicenseRef-[idstring] (for a license not on the SPDX License
--   List);
data LicenseRef

-- | License reference.
licenseRef :: LicenseRef -> String

-- | Document reference.
licenseDocumentRef :: LicenseRef -> Maybe String

-- | Create LicenseRef from optional document ref and name.
mkLicenseRef :: Maybe String -> String -> Maybe LicenseRef

-- | Like mkLicenseRef but convert invalid characters into
--   -.
mkLicenseRef' :: Maybe String -> String -> LicenseRef
instance Data.Binary.Class.Binary Distribution.SPDX.LicenseReference.LicenseRef
instance GHC.Internal.Data.Data.Data Distribution.SPDX.LicenseReference.LicenseRef
instance GHC.Classes.Eq Distribution.SPDX.LicenseReference.LicenseRef
instance GHC.Internal.Generics.Generic Distribution.SPDX.LicenseReference.LicenseRef
instance Control.DeepSeq.NFData Distribution.SPDX.LicenseReference.LicenseRef
instance GHC.Classes.Ord Distribution.SPDX.LicenseReference.LicenseRef
instance Distribution.Parsec.Parsec Distribution.SPDX.LicenseReference.LicenseRef
instance Distribution.Pretty.Pretty Distribution.SPDX.LicenseReference.LicenseRef
instance GHC.Internal.Read.Read Distribution.SPDX.LicenseReference.LicenseRef
instance GHC.Internal.Show.Show Distribution.SPDX.LicenseReference.LicenseRef
instance Distribution.Utils.Structured.Structured Distribution.SPDX.LicenseReference.LicenseRef

module Distribution.SPDX.LicenseId

-- | SPDX License identifiers list v3.23
data LicenseId

-- | 0BSD, BSD Zero Clause License
NullBSD :: LicenseId

-- | AAL, Attribution Assurance License
AAL :: LicenseId

-- | Abstyles, Abstyles License
Abstyles :: LicenseId

-- | AdaCore-doc, AdaCore Doc License, SPDX License List 3.23
AdaCore_doc :: LicenseId

-- | Adobe-2006, Adobe Systems Incorporated Source Code License
--   Agreement
Adobe_2006 :: LicenseId

-- | Adobe-Display-PostScript, Adobe Display PostScript License,
--   SPDX License List 3.23
Adobe_Display_PostScript :: LicenseId

-- | Adobe-Glyph, Adobe Glyph List License
Adobe_Glyph :: LicenseId

-- | Adobe-Utopia, Adobe Utopia Font License, SPDX License List
--   3.23
Adobe_Utopia :: LicenseId

-- | ADSL, Amazon Digital Services License
ADSL :: LicenseId

-- | AFL-1.1, Academic Free License v1.1
AFL_1_1 :: LicenseId

-- | AFL-1.2, Academic Free License v1.2
AFL_1_2 :: LicenseId

-- | AFL-2.0, Academic Free License v2.0
AFL_2_0 :: LicenseId

-- | AFL-2.1, Academic Free License v2.1
AFL_2_1 :: LicenseId

-- | AFL-3.0, Academic Free License v3.0
AFL_3_0 :: LicenseId

-- | Afmparse, Afmparse License
Afmparse :: LicenseId

-- | AGPL-1.0, Affero General Public License v1.0, SPDX License
--   List 3.0
AGPL_1_0 :: LicenseId

-- | AGPL-1.0-only, Affero General Public License v1.0 only, SPDX
--   License List 3.2, SPDX License List 3.6, SPDX License List 3.9, SPDX
--   License List 3.10, SPDX License List 3.16, SPDX License List 3.23
AGPL_1_0_only :: LicenseId

-- | AGPL-1.0-or-later, Affero General Public License v1.0 or
--   later, SPDX License List 3.2, SPDX License List 3.6, SPDX License List
--   3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List
--   3.23
AGPL_1_0_or_later :: LicenseId

-- | AGPL-3.0-only, GNU Affero General Public License v3.0 only
AGPL_3_0_only :: LicenseId

-- | AGPL-3.0-or-later, GNU Affero General Public License v3.0 or
--   later
AGPL_3_0_or_later :: LicenseId

-- | Aladdin, Aladdin Free Public License
Aladdin :: LicenseId

-- | AMDPLPA, AMD's plpa_map.c License
AMDPLPA :: LicenseId

-- | AML-glslang, AML glslang variant License, SPDX License List
--   3.23
AML_glslang :: LicenseId

-- | AML, Apple MIT License
AML :: LicenseId

-- | AMPAS, Academy of Motion Picture Arts and Sciences BSD
AMPAS :: LicenseId

-- | ANTLR-PD-fallback, ANTLR Software Rights Notice with license
--   fallback, SPDX License List 3.16, SPDX License List 3.23
ANTLR_PD_fallback :: LicenseId

-- | ANTLR-PD, ANTLR Software Rights Notice
ANTLR_PD :: LicenseId

-- | Apache-1.0, Apache License 1.0
Apache_1_0 :: LicenseId

-- | Apache-1.1, Apache License 1.1
Apache_1_1 :: LicenseId

-- | Apache-2.0, Apache License 2.0
Apache_2_0 :: LicenseId

-- | APAFML, Adobe Postscript AFM License
APAFML :: LicenseId

-- | APL-1.0, Adaptive Public License 1.0
APL_1_0 :: LicenseId

-- | App-s2p, App::s2p License, SPDX License List 3.16, SPDX
--   License List 3.23
App_s2p :: LicenseId

-- | APSL-1.0, Apple Public Source License 1.0
APSL_1_0 :: LicenseId

-- | APSL-1.1, Apple Public Source License 1.1
APSL_1_1 :: LicenseId

-- | APSL-1.2, Apple Public Source License 1.2
APSL_1_2 :: LicenseId

-- | APSL-2.0, Apple Public Source License 2.0
APSL_2_0 :: LicenseId

-- | Arphic-1999, Arphic Public License, SPDX License List 3.23
Arphic_1999 :: LicenseId

-- | Artistic-1.0-cl8, Artistic License 1.0 w/clause 8
Artistic_1_0_cl8 :: LicenseId

-- | Artistic-1.0-Perl, Artistic License 1.0 (Perl)
Artistic_1_0_Perl :: LicenseId

-- | Artistic-1.0, Artistic License 1.0
Artistic_1_0 :: LicenseId

-- | Artistic-2.0, Artistic License 2.0
Artistic_2_0 :: LicenseId

-- | ASWF-Digital-Assets-1.0, ASWF Digital Assets License version
--   1.0, SPDX License List 3.23
ASWF_Digital_Assets_1_0 :: LicenseId

-- | ASWF-Digital-Assets-1.1, ASWF Digital Assets License 1.1,
--   SPDX License List 3.23
ASWF_Digital_Assets_1_1 :: LicenseId

-- | Baekmuk, Baekmuk License, SPDX License List 3.23
Baekmuk :: LicenseId

-- | Bahyph, Bahyph License
Bahyph :: LicenseId

-- | Barr, Barr License
Barr :: LicenseId

-- | bcrypt-Solar-Designer, bcrypt Solar Designer License, SPDX
--   License List 3.23
Bcrypt_Solar_Designer :: LicenseId

-- | Beerware, Beerware License
Beerware :: LicenseId

-- | Bitstream-Charter, Bitstream Charter Font License, SPDX
--   License List 3.23
Bitstream_Charter :: LicenseId

-- | Bitstream-Vera, Bitstream Vera Font License, SPDX License
--   List 3.23
Bitstream_Vera :: LicenseId

-- | BitTorrent-1.0, BitTorrent Open Source License v1.0
BitTorrent_1_0 :: LicenseId

-- | BitTorrent-1.1, BitTorrent Open Source License v1.1
BitTorrent_1_1 :: LicenseId

-- | blessing, SQLite Blessing, SPDX License List 3.6, SPDX
--   License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX
--   License List 3.23
Blessing :: LicenseId

-- | BlueOak-1.0.0, Blue Oak Model License 1.0.0, SPDX License
--   List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License
--   List 3.16, SPDX License List 3.23
BlueOak_1_0_0 :: LicenseId

-- | Boehm-GC, Boehm-Demers-Weiser GC License, SPDX License List
--   3.23
Boehm_GC :: LicenseId

-- | Borceux, Borceux license
Borceux :: LicenseId

-- | Brian-Gladman-2-Clause, Brian Gladman 2-Clause License, SPDX
--   License List 3.23
Brian_Gladman_2_Clause :: LicenseId

-- | Brian-Gladman-3-Clause, Brian Gladman 3-Clause License, SPDX
--   License List 3.23
Brian_Gladman_3_Clause :: LicenseId

-- | BSD-1-Clause, BSD 1-Clause License
BSD_1_Clause :: LicenseId

-- | BSD-2-Clause-FreeBSD, BSD 2-Clause FreeBSD License, SPDX
--   License List 3.0, SPDX License List 3.2, SPDX License List 3.6, SPDX
--   License List 3.9
BSD_2_Clause_FreeBSD :: LicenseId

-- | BSD-2-Clause-NetBSD, BSD 2-Clause NetBSD License, SPDX
--   License List 3.0, SPDX License List 3.2, SPDX License List 3.6
BSD_2_Clause_NetBSD :: LicenseId

-- | BSD-2-Clause-Darwin, BSD 2-Clause - Ian Darwin variant, SPDX
--   License List 3.23
BSD_2_Clause_Darwin :: LicenseId

-- | BSD-2-Clause-Patent, BSD-2-Clause Plus Patent License
BSD_2_Clause_Patent :: LicenseId

-- | BSD-2-Clause-Views, BSD 2-Clause with views sentence, SPDX
--   License List 3.10, SPDX License List 3.16, SPDX License List 3.23
BSD_2_Clause_Views :: LicenseId

-- | BSD-2-Clause, BSD 2-Clause Simplified License
BSD_2_Clause :: LicenseId

-- | BSD-3-Clause-acpica, BSD 3-Clause acpica variant, SPDX
--   License List 3.23
BSD_3_Clause_acpica :: LicenseId

-- | BSD-3-Clause-Attribution, BSD with attribution
BSD_3_Clause_Attribution :: LicenseId

-- | BSD-3-Clause-Clear, BSD 3-Clause Clear License
BSD_3_Clause_Clear :: LicenseId

-- | BSD-3-Clause-flex, BSD 3-Clause Flex variant, SPDX License
--   List 3.23
BSD_3_Clause_flex :: LicenseId

-- | BSD-3-Clause-HP, Hewlett-Packard BSD variant license, SPDX
--   License List 3.23
BSD_3_Clause_HP :: LicenseId

-- | BSD-3-Clause-LBNL, Lawrence Berkeley National Labs BSD
--   variant license
BSD_3_Clause_LBNL :: LicenseId

-- | BSD-3-Clause-Modification, BSD 3-Clause Modification, SPDX
--   License List 3.16, SPDX License List 3.23
BSD_3_Clause_Modification :: LicenseId

-- | BSD-3-Clause-No-Military-License, BSD 3-Clause No Military
--   License, SPDX License List 3.16, SPDX License List 3.23
BSD_3_Clause_No_Military_License :: LicenseId

-- | BSD-3-Clause-No-Nuclear-License-2014, BSD 3-Clause No Nuclear
--   License 2014
BSD_3_Clause_No_Nuclear_License_2014 :: LicenseId

-- | BSD-3-Clause-No-Nuclear-License, BSD 3-Clause No Nuclear
--   License
BSD_3_Clause_No_Nuclear_License :: LicenseId

-- | BSD-3-Clause-No-Nuclear-Warranty, BSD 3-Clause No Nuclear
--   Warranty
BSD_3_Clause_No_Nuclear_Warranty :: LicenseId

-- | BSD-3-Clause-Open-MPI, BSD 3-Clause Open MPI variant, SPDX
--   License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX
--   License List 3.16, SPDX License List 3.23
BSD_3_Clause_Open_MPI :: LicenseId

-- | BSD-3-Clause-Sun, BSD 3-Clause Sun Microsystems, SPDX License
--   List 3.23
BSD_3_Clause_Sun :: LicenseId

-- | BSD-3-Clause, BSD 3-Clause New or Revised
--   License
BSD_3_Clause :: LicenseId

-- | BSD-4-Clause-Shortened, BSD 4 Clause Shortened, SPDX License
--   List 3.16, SPDX License List 3.23
BSD_4_Clause_Shortened :: LicenseId

-- | BSD-4-Clause-UC, BSD-4-Clause (University of
--   California-Specific)
BSD_4_Clause_UC :: LicenseId

-- | BSD-4-Clause, BSD 4-Clause Original or Old
--   License
BSD_4_Clause :: LicenseId

-- | BSD-4.3RENO, BSD 4.3 RENO License, SPDX License List 3.23
BSD_4_3RENO :: LicenseId

-- | BSD-4.3TAHOE, BSD 4.3 TAHOE License, SPDX License List 3.23
BSD_4_3TAHOE :: LicenseId

-- | BSD-Advertising-Acknowledgement, BSD Advertising
--   Acknowledgement License, SPDX License List 3.23
BSD_Advertising_Acknowledgement :: LicenseId

-- | BSD-Attribution-HPND-disclaimer, BSD with Attribution and
--   HPND disclaimer, SPDX License List 3.23
BSD_Attribution_HPND_disclaimer :: LicenseId

-- | BSD-Inferno-Nettverk, BSD-Inferno-Nettverk, SPDX License List
--   3.23
BSD_Inferno_Nettverk :: LicenseId

-- | BSD-Protection, BSD Protection License
BSD_Protection :: LicenseId

-- | BSD-Source-beginning-file, BSD Source Code Attribution -
--   beginning of file variant, SPDX License List 3.23
BSD_Source_beginning_file :: LicenseId

-- | BSD-Source-Code, BSD Source Code Attribution
BSD_Source_Code :: LicenseId

-- | BSD-Systemics-W3Works, Systemics W3Works BSD variant license,
--   SPDX License List 3.23
BSD_Systemics_W3Works :: LicenseId

-- | BSD-Systemics, Systemics BSD variant license, SPDX License
--   List 3.23
BSD_Systemics :: LicenseId

-- | BSL-1.0, Boost Software License 1.0
BSL_1_0 :: LicenseId

-- | bzip2-1.0.5, bzip2 and libbzip2 License v1.0.5, SPDX License
--   List 3.0, SPDX License List 3.2, SPDX License List 3.6, SPDX License
--   List 3.9, SPDX License List 3.10
Bzip2_1_0_5 :: LicenseId

-- | BUSL-1.1, Business Source License 1.1, SPDX License List
--   3.16, SPDX License List 3.23
BUSL_1_1 :: LicenseId

-- | bzip2-1.0.6, bzip2 and libbzip2 License v1.0.6
Bzip2_1_0_6 :: LicenseId

-- | C-UDA-1.0, Computational Use of Data Agreement v1.0, SPDX
--   License List 3.16, SPDX License List 3.23
C_UDA_1_0 :: LicenseId

-- | CAL-1.0-Combined-Work-Exception, Cryptographic Autonomy
--   License 1.0 (Combined Work Exception), SPDX License List 3.9, SPDX
--   License List 3.10, SPDX License List 3.16, SPDX License List 3.23
CAL_1_0_Combined_Work_Exception :: LicenseId

-- | CAL-1.0, Cryptographic Autonomy License 1.0, SPDX License
--   List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License
--   List 3.23
CAL_1_0 :: LicenseId

-- | Caldera-no-preamble, Caldera License (without preamble), SPDX
--   License List 3.23
Caldera_no_preamble :: LicenseId

-- | Caldera, Caldera License
Caldera :: LicenseId

-- | CATOSL-1.1, Computer Associates Trusted Open Source License
--   1.1
CATOSL_1_1 :: LicenseId

-- | CC-BY-1.0, Creative Commons Attribution 1.0 Generic
CC_BY_1_0 :: LicenseId

-- | CC-BY-2.0, Creative Commons Attribution 2.0 Generic
CC_BY_2_0 :: LicenseId

-- | CC-BY-2.5-AU, Creative Commons Attribution 2.5 Australia,
--   SPDX License List 3.16, SPDX License List 3.23
CC_BY_2_5_AU :: LicenseId

-- | CC-BY-2.5, Creative Commons Attribution 2.5 Generic
CC_BY_2_5 :: LicenseId

-- | CC-BY-3.0-AT, Creative Commons Attribution 3.0 Austria, SPDX
--   License List 3.10, SPDX License List 3.16, SPDX License List 3.23
CC_BY_3_0_AT :: LicenseId

-- | CC-BY-3.0-AU, Creative Commons Attribution 3.0 Australia,
--   SPDX License List 3.23
CC_BY_3_0_AU :: LicenseId

-- | CC-BY-3.0-DE, Creative Commons Attribution 3.0 Germany, SPDX
--   License List 3.16, SPDX License List 3.23
CC_BY_3_0_DE :: LicenseId

-- | CC-BY-3.0-IGO, Creative Commons Attribution 3.0 IGO, SPDX
--   License List 3.23
CC_BY_3_0_IGO :: LicenseId

-- | CC-BY-3.0-NL, Creative Commons Attribution 3.0 Netherlands,
--   SPDX License List 3.16, SPDX License List 3.23
CC_BY_3_0_NL :: LicenseId

-- | CC-BY-3.0-US, Creative Commons Attribution 3.0 United States,
--   SPDX License List 3.16, SPDX License List 3.23
CC_BY_3_0_US :: LicenseId

-- | CC-BY-3.0, Creative Commons Attribution 3.0 Unported
CC_BY_3_0 :: LicenseId

-- | CC-BY-4.0, Creative Commons Attribution 4.0 International
CC_BY_4_0 :: LicenseId

-- | CC-BY-NC-1.0, Creative Commons Attribution Non Commercial 1.0
--   Generic
CC_BY_NC_1_0 :: LicenseId

-- | CC-BY-NC-2.0, Creative Commons Attribution Non Commercial 2.0
--   Generic
CC_BY_NC_2_0 :: LicenseId

-- | CC-BY-NC-2.5, Creative Commons Attribution Non Commercial 2.5
--   Generic
CC_BY_NC_2_5 :: LicenseId

-- | CC-BY-NC-3.0-DE, Creative Commons Attribution Non Commercial
--   3.0 Germany, SPDX License List 3.16, SPDX License List 3.23
CC_BY_NC_3_0_DE :: LicenseId

-- | CC-BY-NC-3.0, Creative Commons Attribution Non Commercial 3.0
--   Unported
CC_BY_NC_3_0 :: LicenseId

-- | CC-BY-NC-4.0, Creative Commons Attribution Non Commercial 4.0
--   International
CC_BY_NC_4_0 :: LicenseId

-- | CC-BY-NC-ND-1.0, Creative Commons Attribution Non Commercial
--   No Derivatives 1.0 Generic
CC_BY_NC_ND_1_0 :: LicenseId

-- | CC-BY-NC-ND-2.0, Creative Commons Attribution Non Commercial
--   No Derivatives 2.0 Generic
CC_BY_NC_ND_2_0 :: LicenseId

-- | CC-BY-NC-ND-2.5, Creative Commons Attribution Non Commercial
--   No Derivatives 2.5 Generic
CC_BY_NC_ND_2_5 :: LicenseId

-- | CC-BY-NC-ND-3.0-DE, Creative Commons Attribution Non
--   Commercial No Derivatives 3.0 Germany, SPDX License List 3.16, SPDX
--   License List 3.23
CC_BY_NC_ND_3_0_DE :: LicenseId

-- | CC-BY-NC-ND-3.0-IGO, Creative Commons Attribution Non
--   Commercial No Derivatives 3.0 IGO, SPDX License List 3.10, SPDX
--   License List 3.16, SPDX License List 3.23
CC_BY_NC_ND_3_0_IGO :: LicenseId

-- | CC-BY-NC-ND-3.0, Creative Commons Attribution Non Commercial
--   No Derivatives 3.0 Unported
CC_BY_NC_ND_3_0 :: LicenseId

-- | CC-BY-NC-ND-4.0, Creative Commons Attribution Non Commercial
--   No Derivatives 4.0 International
CC_BY_NC_ND_4_0 :: LicenseId

-- | CC-BY-NC-SA-1.0, Creative Commons Attribution Non Commercial
--   Share Alike 1.0 Generic
CC_BY_NC_SA_1_0 :: LicenseId

-- | CC-BY-NC-SA-2.0-DE, Creative Commons Attribution Non
--   Commercial Share Alike 2.0 Germany, SPDX License List 3.23
CC_BY_NC_SA_2_0_DE :: LicenseId

-- | CC-BY-NC-SA-2.0-FR, Creative Commons
--   Attribution-NonCommercial-ShareAlike 2.0 France, SPDX License List
--   3.16, SPDX License List 3.23
CC_BY_NC_SA_2_0_FR :: LicenseId

-- | CC-BY-NC-SA-2.0-UK, Creative Commons Attribution Non
--   Commercial Share Alike 2.0 England and Wales, SPDX License List 3.16,
--   SPDX License List 3.23
CC_BY_NC_SA_2_0_UK :: LicenseId

-- | CC-BY-NC-SA-2.0, Creative Commons Attribution Non Commercial
--   Share Alike 2.0 Generic
CC_BY_NC_SA_2_0 :: LicenseId

-- | CC-BY-NC-SA-2.5, Creative Commons Attribution Non Commercial
--   Share Alike 2.5 Generic
CC_BY_NC_SA_2_5 :: LicenseId

-- | CC-BY-NC-SA-3.0-DE, Creative Commons Attribution Non
--   Commercial Share Alike 3.0 Germany, SPDX License List 3.16, SPDX
--   License List 3.23
CC_BY_NC_SA_3_0_DE :: LicenseId

-- | CC-BY-NC-SA-3.0-IGO, Creative Commons Attribution Non
--   Commercial Share Alike 3.0 IGO, SPDX License List 3.16, SPDX License
--   List 3.23
CC_BY_NC_SA_3_0_IGO :: LicenseId

-- | CC-BY-NC-SA-3.0, Creative Commons Attribution Non Commercial
--   Share Alike 3.0 Unported
CC_BY_NC_SA_3_0 :: LicenseId

-- | CC-BY-NC-SA-4.0, Creative Commons Attribution Non Commercial
--   Share Alike 4.0 International
CC_BY_NC_SA_4_0 :: LicenseId

-- | CC-BY-ND-1.0, Creative Commons Attribution No Derivatives 1.0
--   Generic
CC_BY_ND_1_0 :: LicenseId

-- | CC-BY-ND-2.0, Creative Commons Attribution No Derivatives 2.0
--   Generic
CC_BY_ND_2_0 :: LicenseId

-- | CC-BY-ND-2.5, Creative Commons Attribution No Derivatives 2.5
--   Generic
CC_BY_ND_2_5 :: LicenseId

-- | CC-BY-ND-3.0-DE, Creative Commons Attribution No Derivatives
--   3.0 Germany, SPDX License List 3.16, SPDX License List 3.23
CC_BY_ND_3_0_DE :: LicenseId

-- | CC-BY-ND-3.0, Creative Commons Attribution No Derivatives 3.0
--   Unported
CC_BY_ND_3_0 :: LicenseId

-- | CC-BY-ND-4.0, Creative Commons Attribution No Derivatives 4.0
--   International
CC_BY_ND_4_0 :: LicenseId

-- | CC-BY-SA-1.0, Creative Commons Attribution Share Alike 1.0
--   Generic
CC_BY_SA_1_0 :: LicenseId

-- | CC-BY-SA-2.0-UK, Creative Commons Attribution Share Alike 2.0
--   England and Wales, SPDX License List 3.16, SPDX License List 3.23
CC_BY_SA_2_0_UK :: LicenseId

-- | CC-BY-SA-2.0, Creative Commons Attribution Share Alike 2.0
--   Generic
CC_BY_SA_2_0 :: LicenseId

-- | CC-BY-SA-2.1-JP, Creative Commons Attribution Share Alike 2.1
--   Japan, SPDX License List 3.16, SPDX License List 3.23
CC_BY_SA_2_1_JP :: LicenseId

-- | CC-BY-SA-2.5, Creative Commons Attribution Share Alike 2.5
--   Generic
CC_BY_SA_2_5 :: LicenseId

-- | CC-BY-SA-3.0-AT, Creative Commons Attribution Share Alike 3.0
--   Austria, SPDX License List 3.10, SPDX License List 3.16, SPDX License
--   List 3.23
CC_BY_SA_3_0_AT :: LicenseId

-- | CC-BY-SA-3.0-DE, Creative Commons Attribution Share Alike 3.0
--   Germany, SPDX License List 3.16, SPDX License List 3.23
CC_BY_SA_3_0_DE :: LicenseId

-- | CC-BY-SA-3.0-IGO, Creative Commons Attribution-ShareAlike 3.0
--   IGO, SPDX License List 3.23
CC_BY_SA_3_0_IGO :: LicenseId

-- | CC-BY-SA-3.0, Creative Commons Attribution Share Alike 3.0
--   Unported
CC_BY_SA_3_0 :: LicenseId

-- | CC-BY-SA-4.0, Creative Commons Attribution Share Alike 4.0
--   International
CC_BY_SA_4_0 :: LicenseId

-- | CC-PDDC, Creative Commons Public Domain Dedication and
--   Certification, SPDX License List 3.6, SPDX License List 3.9, SPDX
--   License List 3.10, SPDX License List 3.16, SPDX License List 3.23
CC_PDDC :: LicenseId

-- | CC0-1.0, Creative Commons Zero v1.0 Universal
CC0_1_0 :: LicenseId

-- | CDDL-1.0, Common Development and Distribution License 1.0
CDDL_1_0 :: LicenseId

-- | CDDL-1.1, Common Development and Distribution License 1.1
CDDL_1_1 :: LicenseId

-- | CDL-1.0, Common Documentation License 1.0, SPDX License List
--   3.16, SPDX License List 3.23
CDL_1_0 :: LicenseId

-- | CDLA-Permissive-1.0, Community Data License Agreement
--   Permissive 1.0
CDLA_Permissive_1_0 :: LicenseId

-- | CDLA-Permissive-2.0, Community Data License Agreement
--   Permissive 2.0, SPDX License List 3.16, SPDX License List 3.23
CDLA_Permissive_2_0 :: LicenseId

-- | CDLA-Sharing-1.0, Community Data License Agreement Sharing
--   1.0
CDLA_Sharing_1_0 :: LicenseId

-- | CECILL-1.0, CeCILL Free Software License Agreement v1.0
CECILL_1_0 :: LicenseId

-- | CECILL-1.1, CeCILL Free Software License Agreement v1.1
CECILL_1_1 :: LicenseId

-- | CECILL-2.0, CeCILL Free Software License Agreement v2.0
CECILL_2_0 :: LicenseId

-- | CECILL-2.1, CeCILL Free Software License Agreement v2.1
CECILL_2_1 :: LicenseId

-- | CECILL-B, CeCILL-B Free Software License Agreement
CECILL_B :: LicenseId

-- | CECILL-C, CeCILL-C Free Software License Agreement
CECILL_C :: LicenseId

-- | CERN-OHL-1.1, CERN Open Hardware Licence v1.1, SPDX License
--   List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License
--   List 3.16, SPDX License List 3.23
CERN_OHL_1_1 :: LicenseId

-- | CERN-OHL-1.2, CERN Open Hardware Licence v1.2, SPDX License
--   List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License
--   List 3.16, SPDX License List 3.23
CERN_OHL_1_2 :: LicenseId

-- | CERN-OHL-P-2.0, CERN Open Hardware Licence Version 2 -
--   Permissive, SPDX License List 3.9, SPDX License List 3.10, SPDX
--   License List 3.16, SPDX License List 3.23
CERN_OHL_P_2_0 :: LicenseId

-- | CERN-OHL-S-2.0, CERN Open Hardware Licence Version 2 -
--   Strongly Reciprocal, SPDX License List 3.9, SPDX License List 3.10,
--   SPDX License List 3.16, SPDX License List 3.23
CERN_OHL_S_2_0 :: LicenseId

-- | CERN-OHL-W-2.0, CERN Open Hardware Licence Version 2 - Weakly
--   Reciprocal, SPDX License List 3.9, SPDX License List 3.10, SPDX
--   License List 3.16, SPDX License List 3.23
CERN_OHL_W_2_0 :: LicenseId

-- | CFITSIO, CFITSIO License, SPDX License List 3.23
CFITSIO :: LicenseId

-- | check-cvs, check-cvs License, SPDX License List 3.23
Check_cvs :: LicenseId

-- | checkmk, Checkmk License, SPDX License List 3.23
Checkmk :: LicenseId

-- | ClArtistic, Clarified Artistic License
ClArtistic :: LicenseId

-- | Clips, Clips License, SPDX License List 3.23
Clips :: LicenseId

-- | CMU-Mach-nodoc, CMU Mach - no notices-in-documentation
--   variant, SPDX License List 3.23
CMU_Mach_nodoc :: LicenseId

-- | CMU-Mach, CMU Mach License, SPDX License List 3.23
CMU_Mach :: LicenseId

-- | CNRI-Jython, CNRI Jython License
CNRI_Jython :: LicenseId

-- | CNRI-Python-GPL-Compatible, CNRI Python Open Source GPL
--   Compatible License Agreement
CNRI_Python_GPL_Compatible :: LicenseId

-- | CNRI-Python, CNRI Python License
CNRI_Python :: LicenseId

-- | COIL-1.0, Copyfree Open Innovation License, SPDX License List
--   3.16, SPDX License List 3.23
COIL_1_0 :: LicenseId

-- | Community-Spec-1.0, Community Specification License 1.0, SPDX
--   License List 3.16, SPDX License List 3.23
Community_Spec_1_0 :: LicenseId

-- | Condor-1.1, Condor Public License v1.1
Condor_1_1 :: LicenseId

-- | copyleft-next-0.3.0, copyleft-next 0.3.0, SPDX License List
--   3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List
--   3.16, SPDX License List 3.23
Copyleft_next_0_3_0 :: LicenseId

-- | copyleft-next-0.3.1, copyleft-next 0.3.1, SPDX License List
--   3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List
--   3.16, SPDX License List 3.23
Copyleft_next_0_3_1 :: LicenseId

-- | Cornell-Lossless-JPEG, Cornell Lossless JPEG License, SPDX
--   License List 3.23
Cornell_Lossless_JPEG :: LicenseId

-- | CPAL-1.0, Common Public Attribution License 1.0
CPAL_1_0 :: LicenseId

-- | CPL-1.0, Common Public License 1.0
CPL_1_0 :: LicenseId

-- | CPOL-1.02, Code Project Open License 1.02
CPOL_1_02 :: LicenseId

-- | Cronyx, Cronyx License, SPDX License List 3.23
Cronyx :: LicenseId

-- | Crossword, Crossword License
Crossword :: LicenseId

-- | CrystalStacker, CrystalStacker License
CrystalStacker :: LicenseId

-- | CUA-OPL-1.0, CUA Office Public License v1.0
CUA_OPL_1_0 :: LicenseId

-- | Cube, Cube License
Cube :: LicenseId

-- | curl, curl License
Curl :: LicenseId

-- | D-FSL-1.0, Deutsche Freie Software Lizenz
D_FSL_1_0 :: LicenseId

-- | DEC-3-Clause, DEC 3-Clause License, SPDX License List 3.23
DEC_3_Clause :: LicenseId

-- | diffmark, diffmark license
Diffmark :: LicenseId

-- | DL-DE-BY-2.0, Data licence Germany – attribution – version
--   2.0, SPDX License List 3.16, SPDX License List 3.23
DL_DE_BY_2_0 :: LicenseId

-- | DL-DE-ZERO-2.0, Data licence Germany – zero – version 2.0,
--   SPDX License List 3.23
DL_DE_ZERO_2_0 :: LicenseId

-- | DOC, DOC License
DOC :: LicenseId

-- | Dotseqn, Dotseqn License
Dotseqn :: LicenseId

-- | DRL-1.0, Detection Rule License 1.0, SPDX License List 3.16,
--   SPDX License List 3.23
DRL_1_0 :: LicenseId

-- | DRL-1.1, Detection Rule License 1.1, SPDX License List 3.23
DRL_1_1 :: LicenseId

-- | DSDP, DSDP License
DSDP :: LicenseId

-- | dtoa, David M. Gay dtoa License, SPDX License List 3.23
Dtoa :: LicenseId

-- | dvipdfm, dvipdfm License
Dvipdfm :: LicenseId

-- | ECL-1.0, Educational Community License v1.0
ECL_1_0 :: LicenseId

-- | ECL-2.0, Educational Community License v2.0
ECL_2_0 :: LicenseId

-- | EFL-1.0, Eiffel Forum License v1.0
EFL_1_0 :: LicenseId

-- | EFL-2.0, Eiffel Forum License v2.0
EFL_2_0 :: LicenseId

-- | eGenix, eGenix.com Public License 1.1.0
EGenix :: LicenseId

-- | Elastic-2.0, Elastic License 2.0, SPDX License List 3.16,
--   SPDX License List 3.23
Elastic_2_0 :: LicenseId

-- | Entessa, Entessa Public License v1.0
Entessa :: LicenseId

-- | EPICS, EPICS Open License, SPDX License List 3.10, SPDX
--   License List 3.16, SPDX License List 3.23
EPICS :: LicenseId

-- | EPL-1.0, Eclipse Public License 1.0
EPL_1_0 :: LicenseId

-- | EPL-2.0, Eclipse Public License 2.0
EPL_2_0 :: LicenseId

-- | ErlPL-1.1, Erlang Public License v1.1
ErlPL_1_1 :: LicenseId

-- | etalab-2.0, Etalab Open License 2.0, SPDX License List 3.9,
--   SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.23
Etalab_2_0 :: LicenseId

-- | EUDatagrid, EU DataGrid Software License
EUDatagrid :: LicenseId

-- | EUPL-1.0, European Union Public License 1.0
EUPL_1_0 :: LicenseId

-- | EUPL-1.1, European Union Public License 1.1
EUPL_1_1 :: LicenseId

-- | EUPL-1.2, European Union Public License 1.2
EUPL_1_2 :: LicenseId

-- | Eurosym, Eurosym License
Eurosym :: LicenseId

-- | Fair, Fair License
Fair :: LicenseId

-- | FBM, Fuzzy Bitmap License, SPDX License List 3.23
FBM :: LicenseId

-- | FDK-AAC, Fraunhofer FDK AAC Codec Library, SPDX License List
--   3.16, SPDX License List 3.23
FDK_AAC :: LicenseId

-- | Ferguson-Twofish, Ferguson Twofish License, SPDX License List
--   3.23
Ferguson_Twofish :: LicenseId

-- | Frameworx-1.0, Frameworx Open License 1.0
Frameworx_1_0 :: LicenseId

-- | FreeBSD-DOC, FreeBSD Documentation License, SPDX License List
--   3.16, SPDX License List 3.23
FreeBSD_DOC :: LicenseId

-- | FreeImage, FreeImage Public License v1.0
FreeImage :: LicenseId

-- | FSFAP-no-warranty-disclaimer, FSF All Permissive License
--   (without Warranty), SPDX License List 3.23
FSFAP_no_warranty_disclaimer :: LicenseId

-- | FSFAP, FSF All Permissive License
FSFAP :: LicenseId

-- | FSFULLRWD, FSF Unlimited License (With License Retention and
--   Warranty Disclaimer), SPDX License List 3.23
FSFULLRWD :: LicenseId

-- | FSFULLR, FSF Unlimited License (with License Retention)
FSFULLR :: LicenseId

-- | FSFUL, FSF Unlimited License
FSFUL :: LicenseId

-- | FTL, Freetype Project License
FTL :: LicenseId

-- | Furuseth, Furuseth License, SPDX License List 3.23
Furuseth :: LicenseId

-- | fwlw, fwlw License, SPDX License List 3.23
Fwlw :: LicenseId

-- | GCR-docs, Gnome GCR Documentation License, SPDX License List
--   3.23
GCR_docs :: LicenseId

-- | GD, GD License, SPDX License List 3.16, SPDX License List
--   3.23
GD :: LicenseId

-- | GFDL-1.1-invariants-only, GNU Free Documentation License v1.1
--   only - invariants, SPDX License List 3.10, SPDX License List 3.16,
--   SPDX License List 3.23
GFDL_1_1_invariants_only :: LicenseId

-- | GFDL-1.1-invariants-or-later, GNU Free Documentation License
--   v1.1 or later - invariants, SPDX License List 3.10, SPDX License List
--   3.16, SPDX License List 3.23
GFDL_1_1_invariants_or_later :: LicenseId

-- | GFDL-1.1-no-invariants-only, GNU Free Documentation License
--   v1.1 only - no invariants, SPDX License List 3.10, SPDX License List
--   3.16, SPDX License List 3.23
GFDL_1_1_no_invariants_only :: LicenseId

-- | GFDL-1.1-no-invariants-or-later, GNU Free Documentation
--   License v1.1 or later - no invariants, SPDX License List 3.10, SPDX
--   License List 3.16, SPDX License List 3.23
GFDL_1_1_no_invariants_or_later :: LicenseId

-- | GFDL-1.1-only, GNU Free Documentation License v1.1 only
GFDL_1_1_only :: LicenseId

-- | GFDL-1.1-or-later, GNU Free Documentation License v1.1 or
--   later
GFDL_1_1_or_later :: LicenseId

-- | GFDL-1.2-invariants-only, GNU Free Documentation License v1.2
--   only - invariants, SPDX License List 3.10, SPDX License List 3.16,
--   SPDX License List 3.23
GFDL_1_2_invariants_only :: LicenseId

-- | GFDL-1.2-invariants-or-later, GNU Free Documentation License
--   v1.2 or later - invariants, SPDX License List 3.10, SPDX License List
--   3.16, SPDX License List 3.23
GFDL_1_2_invariants_or_later :: LicenseId

-- | GFDL-1.2-no-invariants-only, GNU Free Documentation License
--   v1.2 only - no invariants, SPDX License List 3.10, SPDX License List
--   3.16, SPDX License List 3.23
GFDL_1_2_no_invariants_only :: LicenseId

-- | GFDL-1.2-no-invariants-or-later, GNU Free Documentation
--   License v1.2 or later - no invariants, SPDX License List 3.10, SPDX
--   License List 3.16, SPDX License List 3.23
GFDL_1_2_no_invariants_or_later :: LicenseId

-- | GFDL-1.2-only, GNU Free Documentation License v1.2 only
GFDL_1_2_only :: LicenseId

-- | GFDL-1.2-or-later, GNU Free Documentation License v1.2 or
--   later
GFDL_1_2_or_later :: LicenseId

-- | GFDL-1.3-invariants-only, GNU Free Documentation License v1.3
--   only - invariants, SPDX License List 3.10, SPDX License List 3.16,
--   SPDX License List 3.23
GFDL_1_3_invariants_only :: LicenseId

-- | GFDL-1.3-invariants-or-later, GNU Free Documentation License
--   v1.3 or later - invariants, SPDX License List 3.10, SPDX License List
--   3.16, SPDX License List 3.23
GFDL_1_3_invariants_or_later :: LicenseId

-- | GFDL-1.3-no-invariants-only, GNU Free Documentation License
--   v1.3 only - no invariants, SPDX License List 3.10, SPDX License List
--   3.16, SPDX License List 3.23
GFDL_1_3_no_invariants_only :: LicenseId

-- | GFDL-1.3-no-invariants-or-later, GNU Free Documentation
--   License v1.3 or later - no invariants, SPDX License List 3.10, SPDX
--   License List 3.16, SPDX License List 3.23
GFDL_1_3_no_invariants_or_later :: LicenseId

-- | GFDL-1.3-only, GNU Free Documentation License v1.3 only
GFDL_1_3_only :: LicenseId

-- | GFDL-1.3-or-later, GNU Free Documentation License v1.3 or
--   later
GFDL_1_3_or_later :: LicenseId

-- | Giftware, Giftware License
Giftware :: LicenseId

-- | GL2PS, GL2PS License
GL2PS :: LicenseId

-- | Glide, 3dfx Glide License
Glide :: LicenseId

-- | Glulxe, Glulxe License
Glulxe :: LicenseId

-- | GLWTPL, Good Luck With That Public License, SPDX License List
--   3.10, SPDX License List 3.16, SPDX License List 3.23
GLWTPL :: LicenseId

-- | gnuplot, gnuplot License
Gnuplot :: LicenseId

-- | GPL-1.0-only, GNU General Public License v1.0 only
GPL_1_0_only :: LicenseId

-- | GPL-1.0-or-later, GNU General Public License v1.0 or later
GPL_1_0_or_later :: LicenseId

-- | GPL-2.0-only, GNU General Public License v2.0 only
GPL_2_0_only :: LicenseId

-- | GPL-2.0-or-later, GNU General Public License v2.0 or later
GPL_2_0_or_later :: LicenseId

-- | GPL-3.0-only, GNU General Public License v3.0 only
GPL_3_0_only :: LicenseId

-- | GPL-3.0-or-later, GNU General Public License v3.0 or later
GPL_3_0_or_later :: LicenseId

-- | Graphics-Gems, Graphics Gems License, SPDX License List 3.23
Graphics_Gems :: LicenseId

-- | gSOAP-1.3b, gSOAP Public License v1.3b
GSOAP_1_3b :: LicenseId

-- | gtkbook, gtkbook License, SPDX License List 3.23
Gtkbook :: LicenseId

-- | HaskellReport, Haskell Language Report License
HaskellReport :: LicenseId

-- | hdparm, hdparm License, SPDX License List 3.23
Hdparm :: LicenseId

-- | Hippocratic-2.1, Hippocratic License 2.1, SPDX License List
--   3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List
--   3.23
Hippocratic_2_1 :: LicenseId

-- | HP-1986, Hewlett-Packard 1986 License, SPDX License List 3.23
HP_1986 :: LicenseId

-- | HP-1989, Hewlett-Packard 1989 License, SPDX License List 3.23
HP_1989 :: LicenseId

-- | HPND-DEC, Historical Permission Notice and Disclaimer - DEC
--   variant, SPDX License List 3.23
HPND_DEC :: LicenseId

-- | HPND-doc-sell, Historical Permission Notice and Disclaimer -
--   documentation sell variant, SPDX License List 3.23
HPND_doc_sell :: LicenseId

-- | HPND-doc, Historical Permission Notice and Disclaimer -
--   documentation variant, SPDX License List 3.23
HPND_doc :: LicenseId

-- | HPND-export-US-modify, HPND with US Government export control
--   warning and modification rqmt, SPDX License List 3.23
HPND_export_US_modify :: LicenseId

-- | HPND-export-US, HPND with US Government export control
--   warning, SPDX License List 3.23
HPND_export_US :: LicenseId

-- | HPND-Fenneberg-Livingston, Historical Permission Notice and
--   Disclaimer - Fenneberg-Livingston variant, SPDX License List 3.23
HPND_Fenneberg_Livingston :: LicenseId

-- | HPND-INRIA-IMAG, Historical Permission Notice and Disclaimer
--   - INRIA-IMAG variant, SPDX License List 3.23
HPND_INRIA_IMAG :: LicenseId

-- | HPND-Kevlin-Henney, Historical Permission Notice and
--   Disclaimer - Kevlin Henney variant, SPDX License List 3.23
HPND_Kevlin_Henney :: LicenseId

-- | HPND-Markus-Kuhn, Historical Permission Notice and Disclaimer
--   - Markus Kuhn variant, SPDX License List 3.23
HPND_Markus_Kuhn :: LicenseId

-- | HPND-MIT-disclaimer, Historical Permission Notice and
--   Disclaimer with MIT disclaimer, SPDX License List 3.23
HPND_MIT_disclaimer :: LicenseId

-- | HPND-Pbmplus, Historical Permission Notice and Disclaimer -
--   Pbmplus variant, SPDX License List 3.23
HPND_Pbmplus :: LicenseId

-- | HPND-sell-MIT-disclaimer-xserver, Historical Permission
--   Notice and Disclaimer - sell xserver variant with MIT disclaimer, SPDX
--   License List 3.23
HPND_sell_MIT_disclaimer_xserver :: LicenseId

-- | HPND-sell-regexpr, Historical Permission Notice and
--   Disclaimer - sell regexpr variant, SPDX License List 3.23
HPND_sell_regexpr :: LicenseId

-- | HPND-sell-variant-MIT-disclaimer, HPND sell variant with MIT
--   disclaimer, SPDX License List 3.23
HPND_sell_variant_MIT_disclaimer :: LicenseId

-- | HPND-sell-variant, Historical Permission Notice and
--   Disclaimer - sell variant, SPDX License List 3.6, SPDX License List
--   3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List
--   3.23
HPND_sell_variant :: LicenseId

-- | HPND-UC, Historical Permission Notice and Disclaimer -
--   University of California variant, SPDX License List 3.23
HPND_UC :: LicenseId

-- | HPND, Historical Permission Notice and Disclaimer
HPND :: LicenseId

-- | HTMLTIDY, HTML Tidy License, SPDX License List 3.16, SPDX
--   License List 3.23
HTMLTIDY :: LicenseId

-- | IBM-pibs, IBM PowerPC Initialization and Boot Software
IBM_pibs :: LicenseId

-- | ICU, ICU License
ICU :: LicenseId

-- | IEC-Code-Components-EULA, IEC Code Components End-user
--   licence agreement, SPDX License List 3.23
IEC_Code_Components_EULA :: LicenseId

-- | IJG-short, Independent JPEG Group License - short, SPDX
--   License List 3.23
IJG_short :: LicenseId

-- | IJG, Independent JPEG Group License
IJG :: LicenseId

-- | ImageMagick, ImageMagick License
ImageMagick :: LicenseId

-- | iMatix, iMatix Standard Function Library Agreement
IMatix :: LicenseId

-- | Imlib2, Imlib2 License
Imlib2 :: LicenseId

-- | Info-ZIP, Info-ZIP License
Info_ZIP :: LicenseId

-- | Inner-Net-2.0, Inner Net License v2.0, SPDX License List 3.23
Inner_Net_2_0 :: LicenseId

-- | Intel-ACPI, Intel ACPI Software License Agreement
Intel_ACPI :: LicenseId

-- | Intel, Intel Open Source License
Intel :: LicenseId

-- | Interbase-1.0, Interbase Public License v1.0
Interbase_1_0 :: LicenseId

-- | IPA, IPA Font License
IPA :: LicenseId

-- | IPL-1.0, IBM Public License v1.0
IPL_1_0 :: LicenseId

-- | ISC-Veillard, ISC Veillard variant, SPDX License List 3.23
ISC_Veillard :: LicenseId

-- | ISC, ISC License
ISC :: LicenseId

-- | Jam, Jam License, SPDX License List 3.16, SPDX License List
--   3.23
Jam :: LicenseId

-- | JasPer-2.0, JasPer License
JasPer_2_0 :: LicenseId

-- | JPL-image, JPL Image Use Policy, SPDX License List 3.23
JPL_image :: LicenseId

-- | JPNIC, Japan Network Information Center License, SPDX License
--   List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License
--   List 3.16, SPDX License List 3.23
JPNIC :: LicenseId

-- | JSON, JSON License
JSON :: LicenseId

-- | Kastrup, Kastrup License, SPDX License List 3.23
Kastrup :: LicenseId

-- | Kazlib, Kazlib License, SPDX License List 3.23
Kazlib :: LicenseId

-- | Knuth-CTAN, Knuth CTAN License, SPDX License List 3.23
Knuth_CTAN :: LicenseId

-- | LAL-1.2, Licence Art Libre 1.2
LAL_1_2 :: LicenseId

-- | LAL-1.3, Licence Art Libre 1.3
LAL_1_3 :: LicenseId

-- | Latex2e-translated-notice, Latex2e with translated notice
--   permission, SPDX License List 3.23
Latex2e_translated_notice :: LicenseId

-- | Latex2e, Latex2e License
Latex2e :: LicenseId

-- | Leptonica, Leptonica License
Leptonica :: LicenseId

-- | LGPL-2.0-only, GNU Library General Public License v2 only
LGPL_2_0_only :: LicenseId

-- | LGPL-2.0-or-later, GNU Library General Public License v2 or
--   later
LGPL_2_0_or_later :: LicenseId

-- | LGPL-2.1-only, GNU Lesser General Public License v2.1 only
LGPL_2_1_only :: LicenseId

-- | LGPL-2.1-or-later, GNU Lesser General Public License v2.1 or
--   later
LGPL_2_1_or_later :: LicenseId

-- | LGPL-3.0-only, GNU Lesser General Public License v3.0 only
LGPL_3_0_only :: LicenseId

-- | LGPL-3.0-or-later, GNU Lesser General Public License v3.0 or
--   later
LGPL_3_0_or_later :: LicenseId

-- | LGPLLR, Lesser General Public License For Linguistic
--   Resources
LGPLLR :: LicenseId

-- | libpng-2.0, PNG Reference Library version 2, SPDX License
--   List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License
--   List 3.16, SPDX License List 3.23
Libpng_2_0 :: LicenseId

-- | Libpng, libpng License
Libpng :: LicenseId

-- | libselinux-1.0, libselinux public domain notice, SPDX License
--   List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License
--   List 3.23
Libselinux_1_0 :: LicenseId

-- | libtiff, libtiff License
Libtiff :: LicenseId

-- | libutil-David-Nugent, libutil David Nugent License, SPDX
--   License List 3.23
Libutil_David_Nugent :: LicenseId

-- | LiLiQ-P-1.1, Licence Libre du Québec – Permissive version 1.1
LiLiQ_P_1_1 :: LicenseId

-- | LiLiQ-R-1.1, Licence Libre du Québec – Réciprocité version
--   1.1
LiLiQ_R_1_1 :: LicenseId

-- | LiLiQ-Rplus-1.1, Licence Libre du Québec – Réciprocité forte
--   version 1.1
LiLiQ_Rplus_1_1 :: LicenseId

-- | Linux-man-pages-1-para, Linux man-pages - 1 paragraph, SPDX
--   License List 3.23
Linux_man_pages_1_para :: LicenseId

-- | Linux-man-pages-copyleft-2-para, Linux man-pages Copyleft - 2
--   paragraphs, SPDX License List 3.23
Linux_man_pages_copyleft_2_para :: LicenseId

-- | Linux-man-pages-copyleft-var, Linux man-pages Copyleft
--   Variant, SPDX License List 3.23
Linux_man_pages_copyleft_var :: LicenseId

-- | Linux-man-pages-copyleft, Linux man-pages Copyleft, SPDX
--   License List 3.16, SPDX License List 3.23
Linux_man_pages_copyleft :: LicenseId

-- | Linux-OpenIB, Linux Kernel Variant of OpenIB.org license,
--   SPDX License List 3.2, SPDX License List 3.6, SPDX License List 3.9,
--   SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.23
Linux_OpenIB :: LicenseId

-- | LOOP, Common Lisp LOOP License, SPDX License List 3.23
LOOP :: LicenseId

-- | LPD-document, LPD Documentation License, SPDX License List
--   3.23
LPD_document :: LicenseId

-- | LPL-1.02, Lucent Public License v1.02
LPL_1_02 :: LicenseId

-- | LPL-1.0, Lucent Public License Version 1.0
LPL_1_0 :: LicenseId

-- | LPPL-1.0, LaTeX Project Public License v1.0
LPPL_1_0 :: LicenseId

-- | LPPL-1.1, LaTeX Project Public License v1.1
LPPL_1_1 :: LicenseId

-- | LPPL-1.2, LaTeX Project Public License v1.2
LPPL_1_2 :: LicenseId

-- | LPPL-1.3a, LaTeX Project Public License v1.3a
LPPL_1_3a :: LicenseId

-- | LPPL-1.3c, LaTeX Project Public License v1.3c
LPPL_1_3c :: LicenseId

-- | lsof, lsof License, SPDX License List 3.23
Lsof :: LicenseId

-- | Lucida-Bitmap-Fonts, Lucida Bitmap Fonts License, SPDX
--   License List 3.23
Lucida_Bitmap_Fonts :: LicenseId

-- | LZMA-SDK-9.11-to-9.20, LZMA SDK License (versions 9.11 to
--   9.20), SPDX License List 3.23
LZMA_SDK_9_11_to_9_20 :: LicenseId

-- | LZMA-SDK-9.22, LZMA SDK License (versions 9.22 and beyond),
--   SPDX License List 3.23
LZMA_SDK_9_22 :: LicenseId

-- | Mackerras-3-Clause-acknowledgment, Mackerras 3-Clause -
--   acknowledgment variant, SPDX License List 3.23
Mackerras_3_Clause_acknowledgment :: LicenseId

-- | Mackerras-3-Clause, Mackerras 3-Clause License, SPDX License
--   List 3.23
Mackerras_3_Clause :: LicenseId

-- | magaz, magaz License, SPDX License List 3.23
Magaz :: LicenseId

-- | mailprio, mailprio License, SPDX License List 3.23
Mailprio :: LicenseId

-- | MakeIndex, MakeIndex License
MakeIndex :: LicenseId

-- | Martin-Birgmeier, Martin Birgmeier License, SPDX License List
--   3.23
Martin_Birgmeier :: LicenseId

-- | McPhee-slideshow, McPhee Slideshow License, SPDX License List
--   3.23
McPhee_slideshow :: LicenseId

-- | metamail, metamail License, SPDX License List 3.23
Metamail :: LicenseId

-- | Minpack, Minpack License, SPDX License List 3.23
Minpack :: LicenseId

-- | MirOS, The MirOS Licence
MirOS :: LicenseId

-- | MIT-0, MIT No Attribution, SPDX License List 3.2, SPDX
--   License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX
--   License List 3.16, SPDX License List 3.23
MIT_0 :: LicenseId

-- | MIT-advertising, Enlightenment License (e16)
MIT_advertising :: LicenseId

-- | MIT-CMU, CMU License
MIT_CMU :: LicenseId

-- | MIT-enna, enna License
MIT_enna :: LicenseId

-- | MIT-feh, feh License
MIT_feh :: LicenseId

-- | MIT-Festival, MIT Festival Variant, SPDX License List 3.23
MIT_Festival :: LicenseId

-- | MIT-Modern-Variant, MIT License Modern Variant, SPDX License
--   List 3.16, SPDX License List 3.23
MIT_Modern_Variant :: LicenseId

-- | MIT-open-group, MIT Open Group variant, SPDX License List
--   3.16, SPDX License List 3.23
MIT_open_group :: LicenseId

-- | MIT-testregex, MIT testregex Variant, SPDX License List 3.23
MIT_testregex :: LicenseId

-- | MIT-Wu, MIT Tom Wu Variant, SPDX License List 3.23
MIT_Wu :: LicenseId

-- | MITNFA, MIT +no-false-attribs license
MITNFA :: LicenseId

-- | MIT, MIT License
MIT :: LicenseId

-- | MMIXware, MMIXware License, SPDX License List 3.23
MMIXware :: LicenseId

-- | Motosoto, Motosoto License
Motosoto :: LicenseId

-- | MPEG-SSG, MPEG Software Simulation, SPDX License List 3.23
MPEG_SSG :: LicenseId

-- | mpi-permissive, mpi Permissive License, SPDX License List
--   3.23
Mpi_permissive :: LicenseId

-- | mpich2, mpich2 License
Mpich2 :: LicenseId

-- | MPL-1.0, Mozilla Public License 1.0
MPL_1_0 :: LicenseId

-- | MPL-1.1, Mozilla Public License 1.1
MPL_1_1 :: LicenseId

-- | MPL-2.0-no-copyleft-exception, Mozilla Public License 2.0 (no
--   copyleft exception)
MPL_2_0_no_copyleft_exception :: LicenseId

-- | MPL-2.0, Mozilla Public License 2.0
MPL_2_0 :: LicenseId

-- | mplus, mplus Font License, SPDX License List 3.23
Mplus :: LicenseId

-- | MS-LPL, Microsoft Limited Public License, SPDX License List
--   3.23
MS_LPL :: LicenseId

-- | MS-PL, Microsoft Public License
MS_PL :: LicenseId

-- | MS-RL, Microsoft Reciprocal License
MS_RL :: LicenseId

-- | MTLL, Matrix Template Library License
MTLL :: LicenseId

-- | MulanPSL-1.0, Mulan Permissive Software License, Version 1,
--   SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16,
--   SPDX License List 3.23
MulanPSL_1_0 :: LicenseId

-- | MulanPSL-2.0, Mulan Permissive Software License, Version 2,
--   SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16,
--   SPDX License List 3.23
MulanPSL_2_0 :: LicenseId

-- | Multics, Multics License
Multics :: LicenseId

-- | Mup, Mup License
Mup :: LicenseId

-- | NAIST-2003, Nara Institute of Science and Technology License
--   (2003), SPDX License List 3.16, SPDX License List 3.23
NAIST_2003 :: LicenseId

-- | NASA-1.3, NASA Open Source Agreement 1.3
NASA_1_3 :: LicenseId

-- | Naumen, Naumen Public License
Naumen :: LicenseId

-- | NBPL-1.0, Net Boolean Public License v1
NBPL_1_0 :: LicenseId

-- | NCGL-UK-2.0, Non-Commercial Government Licence, SPDX License
--   List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License
--   List 3.23
NCGL_UK_2_0 :: LicenseId

-- | NCSA, University of Illinois/NCSA Open Source License
NCSA :: LicenseId

-- | Net-SNMP, Net-SNMP License
Net_SNMP :: LicenseId

-- | NetCDF, NetCDF license
NetCDF :: LicenseId

-- | Newsletr, Newsletr License
Newsletr :: LicenseId

-- | NGPL, Nethack General Public License
NGPL :: LicenseId

-- | NICTA-1.0, NICTA Public Software License, Version 1.0, SPDX
--   License List 3.23
NICTA_1_0 :: LicenseId

-- | NIST-PD-fallback, NIST Public Domain Notice with license
--   fallback, SPDX License List 3.10, SPDX License List 3.16, SPDX License
--   List 3.23
NIST_PD_fallback :: LicenseId

-- | NIST-PD, NIST Public Domain Notice, SPDX License List 3.10,
--   SPDX License List 3.16, SPDX License List 3.23
NIST_PD :: LicenseId

-- | NIST-Software, NIST Software License, SPDX License List 3.23
NIST_Software :: LicenseId

-- | NLOD-1.0, Norwegian Licence for Open Government Data (NLOD)
--   1.0
NLOD_1_0 :: LicenseId

-- | NLOD-2.0, Norwegian Licence for Open Government Data (NLOD)
--   2.0, SPDX License List 3.16, SPDX License List 3.23
NLOD_2_0 :: LicenseId

-- | NLPL, No Limit Public License
NLPL :: LicenseId

-- | Nokia, Nokia Open Source License
Nokia :: LicenseId

-- | NOSL, Netizen Open Source License
NOSL :: LicenseId

-- | Noweb, Noweb License
Noweb :: LicenseId

-- | NPL-1.0, Netscape Public License v1.0
NPL_1_0 :: LicenseId

-- | NPL-1.1, Netscape Public License v1.1
NPL_1_1 :: LicenseId

-- | NPOSL-3.0, Non-Profit Open Software License 3.0
NPOSL_3_0 :: LicenseId

-- | NRL, NRL License
NRL :: LicenseId

-- | NTP-0, NTP No Attribution, SPDX License List 3.9, SPDX
--   License List 3.10, SPDX License List 3.16, SPDX License List 3.23
NTP_0 :: LicenseId

-- | NTP, NTP License
NTP :: LicenseId

-- | O-UDA-1.0, Open Use of Data Agreement v1.0, SPDX License List
--   3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List
--   3.23
O_UDA_1_0 :: LicenseId

-- | OCCT-PL, Open CASCADE Technology Public License
OCCT_PL :: LicenseId

-- | OCLC-2.0, OCLC Research Public License 2.0
OCLC_2_0 :: LicenseId

-- | ODbL-1.0, Open Data Commons Open Database License v1.0
ODbL_1_0 :: LicenseId

-- | ODC-By-1.0, Open Data Commons Attribution License v1.0, SPDX
--   License List 3.2, SPDX License List 3.6, SPDX License List 3.9, SPDX
--   License List 3.10, SPDX License List 3.16, SPDX License List 3.23
ODC_By_1_0 :: LicenseId

-- | OFFIS, OFFIS License, SPDX License List 3.23
OFFIS :: LicenseId

-- | OFL-1.0-no-RFN, SIL Open Font License 1.0 with no Reserved
--   Font Name, SPDX License List 3.9, SPDX License List 3.10, SPDX License
--   List 3.16, SPDX License List 3.23
OFL_1_0_no_RFN :: LicenseId

-- | OFL-1.0-RFN, SIL Open Font License 1.0 with Reserved Font
--   Name, SPDX License List 3.9, SPDX License List 3.10, SPDX License List
--   3.16, SPDX License List 3.23
OFL_1_0_RFN :: LicenseId

-- | OFL-1.0, SIL Open Font License 1.0
OFL_1_0 :: LicenseId

-- | OFL-1.1-no-RFN, SIL Open Font License 1.1 with no Reserved
--   Font Name, SPDX License List 3.9, SPDX License List 3.10, SPDX License
--   List 3.16, SPDX License List 3.23
OFL_1_1_no_RFN :: LicenseId

-- | OFL-1.1-RFN, SIL Open Font License 1.1 with Reserved Font
--   Name, SPDX License List 3.9, SPDX License List 3.10, SPDX License List
--   3.16, SPDX License List 3.23
OFL_1_1_RFN :: LicenseId

-- | OFL-1.1, SIL Open Font License 1.1
OFL_1_1 :: LicenseId

-- | OGC-1.0, OGC Software License, Version 1.0, SPDX License List
--   3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List
--   3.23
OGC_1_0 :: LicenseId

-- | OGDL-Taiwan-1.0, Taiwan Open Government Data License, version
--   1.0, SPDX License List 3.16, SPDX License List 3.23
OGDL_Taiwan_1_0 :: LicenseId

-- | OGL-Canada-2.0, Open Government Licence - Canada, SPDX
--   License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX
--   License List 3.23
OGL_Canada_2_0 :: LicenseId

-- | OGL-UK-1.0, Open Government Licence v1.0, SPDX License List
--   3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List
--   3.16, SPDX License List 3.23
OGL_UK_1_0 :: LicenseId

-- | OGL-UK-2.0, Open Government Licence v2.0, SPDX License List
--   3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List
--   3.16, SPDX License List 3.23
OGL_UK_2_0 :: LicenseId

-- | OGL-UK-3.0, Open Government Licence v3.0, SPDX License List
--   3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List
--   3.16, SPDX License List 3.23
OGL_UK_3_0 :: LicenseId

-- | OGTSL, Open Group Test Suite License
OGTSL :: LicenseId

-- | OLDAP-1.1, Open LDAP Public License v1.1
OLDAP_1_1 :: LicenseId

-- | OLDAP-1.2, Open LDAP Public License v1.2
OLDAP_1_2 :: LicenseId

-- | OLDAP-1.3, Open LDAP Public License v1.3
OLDAP_1_3 :: LicenseId

-- | OLDAP-1.4, Open LDAP Public License v1.4
OLDAP_1_4 :: LicenseId

-- | OLDAP-2.0.1, Open LDAP Public License v2.0.1
OLDAP_2_0_1 :: LicenseId

-- | OLDAP-2.0, Open LDAP Public License v2.0 (or possibly 2.0A
--   and 2.0B)
OLDAP_2_0 :: LicenseId

-- | OLDAP-2.1, Open LDAP Public License v2.1
OLDAP_2_1 :: LicenseId

-- | OLDAP-2.2.1, Open LDAP Public License v2.2.1
OLDAP_2_2_1 :: LicenseId

-- | OLDAP-2.2.2, Open LDAP Public License 2.2.2
OLDAP_2_2_2 :: LicenseId

-- | OLDAP-2.2, Open LDAP Public License v2.2
OLDAP_2_2 :: LicenseId

-- | OLDAP-2.3, Open LDAP Public License v2.3
OLDAP_2_3 :: LicenseId

-- | OLDAP-2.4, Open LDAP Public License v2.4
OLDAP_2_4 :: LicenseId

-- | OLDAP-2.5, Open LDAP Public License v2.5
OLDAP_2_5 :: LicenseId

-- | OLDAP-2.6, Open LDAP Public License v2.6
OLDAP_2_6 :: LicenseId

-- | OLDAP-2.7, Open LDAP Public License v2.7
OLDAP_2_7 :: LicenseId

-- | OLDAP-2.8, Open LDAP Public License v2.8
OLDAP_2_8 :: LicenseId

-- | OLFL-1.3, Open Logistics Foundation License Version 1.3, SPDX
--   License List 3.23
OLFL_1_3 :: LicenseId

-- | OML, Open Market License
OML :: LicenseId

-- | OpenPBS-2.3, OpenPBS v2.3 Software License, SPDX License List
--   3.23
OpenPBS_2_3 :: LicenseId

-- | OpenSSL-standalone, OpenSSL License - standalone, SPDX
--   License List 3.23
OpenSSL_standalone :: LicenseId

-- | OpenSSL, OpenSSL License
OpenSSL :: LicenseId

-- | OpenVision, OpenVision License, SPDX License List 3.23
OpenVision :: LicenseId

-- | OPL-1.0, Open Public License v1.0
OPL_1_0 :: LicenseId

-- | OPL-UK-3.0, United Kingdom Open Parliament Licence v3.0, SPDX
--   License List 3.23
OPL_UK_3_0 :: LicenseId

-- | OPUBL-1.0, Open Publication License v1.0, SPDX License List
--   3.16, SPDX License List 3.23
OPUBL_1_0 :: LicenseId

-- | OSET-PL-2.1, OSET Public License version 2.1
OSET_PL_2_1 :: LicenseId

-- | OSL-1.0, Open Software License 1.0
OSL_1_0 :: LicenseId

-- | OSL-1.1, Open Software License 1.1
OSL_1_1 :: LicenseId

-- | OSL-2.0, Open Software License 2.0
OSL_2_0 :: LicenseId

-- | OSL-2.1, Open Software License 2.1
OSL_2_1 :: LicenseId

-- | OSL-3.0, Open Software License 3.0
OSL_3_0 :: LicenseId

-- | PADL, PADL License, SPDX License List 3.23
PADL :: LicenseId

-- | Parity-6.0.0, The Parity Public License 6.0.0, SPDX License
--   List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License
--   List 3.16, SPDX License List 3.23
Parity_6_0_0 :: LicenseId

-- | Parity-7.0.0, The Parity Public License 7.0.0, SPDX License
--   List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License
--   List 3.23
Parity_7_0_0 :: LicenseId

-- | PDDL-1.0, Open Data Commons Public Domain Dedication &
--   License 1.0
PDDL_1_0 :: LicenseId

-- | PHP-3.01, PHP License v3.01
PHP_3_01 :: LicenseId

-- | PHP-3.0, PHP License v3.0
PHP_3_0 :: LicenseId

-- | Pixar, Pixar License, SPDX License List 3.23
Pixar :: LicenseId

-- | Plexus, Plexus Classworlds License
Plexus :: LicenseId

-- | pnmstitch, pnmstitch License, SPDX License List 3.23
Pnmstitch :: LicenseId

-- | PolyForm-Noncommercial-1.0.0, PolyForm Noncommercial License
--   1.0.0, SPDX License List 3.9, SPDX License List 3.10, SPDX License
--   List 3.16, SPDX License List 3.23
PolyForm_Noncommercial_1_0_0 :: LicenseId

-- | PolyForm-Small-Business-1.0.0, PolyForm Small Business
--   License 1.0.0, SPDX License List 3.9, SPDX License List 3.10, SPDX
--   License List 3.16, SPDX License List 3.23
PolyForm_Small_Business_1_0_0 :: LicenseId

-- | PostgreSQL, PostgreSQL License
PostgreSQL :: LicenseId

-- | PSF-2.0, Python Software Foundation License 2.0, SPDX License
--   List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License
--   List 3.23
PSF_2_0 :: LicenseId

-- | psfrag, psfrag License
Psfrag :: LicenseId

-- | psutils, psutils License
Psutils :: LicenseId

-- | Python-2.0.1, Python License 2.0.1, SPDX License List 3.23
Python_2_0_1 :: LicenseId

-- | Python-2.0, Python License 2.0
Python_2_0 :: LicenseId

-- | python-ldap, Python ldap License, SPDX License List 3.23
Python_ldap :: LicenseId

-- | Qhull, Qhull License
Qhull :: LicenseId

-- | QPL-1.0-INRIA-2004, Q Public License 1.0 - INRIA 2004
--   variant, SPDX License List 3.23
QPL_1_0_INRIA_2004 :: LicenseId

-- | QPL-1.0, Q Public License 1.0
QPL_1_0 :: LicenseId

-- | radvd, radvd License, SPDX License List 3.23
Radvd :: LicenseId

-- | Rdisc, Rdisc License
Rdisc :: LicenseId

-- | RHeCos-1.1, Red Hat eCos Public License v1.1
RHeCos_1_1 :: LicenseId

-- | RPL-1.1, Reciprocal Public License 1.1
RPL_1_1 :: LicenseId

-- | RPL-1.5, Reciprocal Public License 1.5
RPL_1_5 :: LicenseId

-- | RPSL-1.0, RealNetworks Public Source License v1.0
RPSL_1_0 :: LicenseId

-- | RSA-MD, RSA Message-Digest License
RSA_MD :: LicenseId

-- | RSCPL, Ricoh Source Code Public License
RSCPL :: LicenseId

-- | Ruby, Ruby License
Ruby :: LicenseId

-- | SAX-PD-2.0, Sax Public Domain Notice 2.0, SPDX License List
--   3.23
SAX_PD_2_0 :: LicenseId

-- | SAX-PD, Sax Public Domain Notice
SAX_PD :: LicenseId

-- | Saxpath, Saxpath License
Saxpath :: LicenseId

-- | SCEA, SCEA Shared Source License
SCEA :: LicenseId

-- | SchemeReport, Scheme Language Report License, SPDX License
--   List 3.16, SPDX License List 3.23
SchemeReport :: LicenseId

-- | Sendmail-8.23, Sendmail License 8.23, SPDX License List 3.6,
--   SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16,
--   SPDX License List 3.23
Sendmail_8_23 :: LicenseId

-- | Sendmail, Sendmail License
Sendmail :: LicenseId

-- | SGI-B-1.0, SGI Free Software License B v1.0
SGI_B_1_0 :: LicenseId

-- | SGI-B-1.1, SGI Free Software License B v1.1
SGI_B_1_1 :: LicenseId

-- | SGI-B-2.0, SGI Free Software License B v2.0
SGI_B_2_0 :: LicenseId

-- | SGI-OpenGL, SGI OpenGL License, SPDX License List 3.23
SGI_OpenGL :: LicenseId

-- | SGP4, SGP4 Permission Notice, SPDX License List 3.23
SGP4 :: LicenseId

-- | SHL-0.51, Solderpad Hardware License, Version 0.51, SPDX
--   License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX
--   License List 3.16, SPDX License List 3.23
SHL_0_51 :: LicenseId

-- | SHL-0.5, Solderpad Hardware License v0.5, SPDX License List
--   3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List
--   3.16, SPDX License List 3.23
SHL_0_5 :: LicenseId

-- | SimPL-2.0, Simple Public License 2.0
SimPL_2_0 :: LicenseId

-- | SISSL-1.2, Sun Industry Standards Source License v1.2
SISSL_1_2 :: LicenseId

-- | SISSL, Sun Industry Standards Source License v1.1
SISSL :: LicenseId

-- | Sleepycat, Sleepycat License
Sleepycat :: LicenseId

-- | SL, SL License, SPDX License List 3.23
SL :: LicenseId

-- | SMLNJ, Standard ML of New Jersey License
SMLNJ :: LicenseId

-- | SMPPL, Secure Messaging Protocol Public License
SMPPL :: LicenseId

-- | SNIA, SNIA Public License 1.1
SNIA :: LicenseId

-- | snprintf, snprintf License, SPDX License List 3.23
Snprintf :: LicenseId

-- | softSurfer, softSurfer License, SPDX License List 3.23
SoftSurfer :: LicenseId

-- | Soundex, Soundex License, SPDX License List 3.23
Soundex :: LicenseId

-- | Spencer-86, Spencer License 86
Spencer_86 :: LicenseId

-- | Spencer-94, Spencer License 94
Spencer_94 :: LicenseId

-- | Spencer-99, Spencer License 99
Spencer_99 :: LicenseId

-- | SPL-1.0, Sun Public License v1.0
SPL_1_0 :: LicenseId

-- | ssh-keyscan, ssh-keyscan License, SPDX License List 3.23
Ssh_keyscan :: LicenseId

-- | SSH-OpenSSH, SSH OpenSSH license, SPDX License List 3.9, SPDX
--   License List 3.10, SPDX License List 3.16, SPDX License List 3.23
SSH_OpenSSH :: LicenseId

-- | SSH-short, SSH short notice, SPDX License List 3.9, SPDX
--   License List 3.10, SPDX License List 3.16, SPDX License List 3.23
SSH_short :: LicenseId

-- | SSLeay-standalone, SSLeay License - standalone, SPDX License
--   List 3.23
SSLeay_standalone :: LicenseId

-- | SSPL-1.0, Server Side Public License, v 1, SPDX License List
--   3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List
--   3.16, SPDX License List 3.23
SSPL_1_0 :: LicenseId

-- | SugarCRM-1.1.3, SugarCRM Public License v1.1.3
SugarCRM_1_1_3 :: LicenseId

-- | Sun-PPP, Sun PPP License, SPDX License List 3.23
Sun_PPP :: LicenseId

-- | SunPro, SunPro License, SPDX License List 3.23
SunPro :: LicenseId

-- | SWL, Scheme Widget Library (SWL) Software License Agreement
SWL :: LicenseId

-- | swrule, swrule License, SPDX License List 3.23
Swrule :: LicenseId

-- | Symlinks, Symlinks License, SPDX License List 3.23
Symlinks :: LicenseId

-- | TAPR-OHL-1.0, TAPR Open Hardware License v1.0, SPDX License
--   List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License
--   List 3.16, SPDX License List 3.23
TAPR_OHL_1_0 :: LicenseId

-- | TCL, TCL/TK License
TCL :: LicenseId

-- | TCP-wrappers, TCP Wrappers License
TCP_wrappers :: LicenseId

-- | TermReadKey, TermReadKey License, SPDX License List 3.23
TermReadKey :: LicenseId

-- | TGPPL-1.0, Transitive Grace Period Public Licence 1.0, SPDX
--   License List 3.23
TGPPL_1_0 :: LicenseId

-- | TMate, TMate Open Source License
TMate :: LicenseId

-- | TORQUE-1.1, TORQUE v2.5+ Software License v1.1
TORQUE_1_1 :: LicenseId

-- | TOSL, Trusster Open Source License
TOSL :: LicenseId

-- | TPDL, Time::ParseDate License, SPDX License List 3.23
TPDL :: LicenseId

-- | TPL-1.0, THOR Public License 1.0, SPDX License List 3.23
TPL_1_0 :: LicenseId

-- | TTWL, Text-Tabs+Wrap License, SPDX License List 3.23
TTWL :: LicenseId

-- | TTYP0, TTYP0 License, SPDX License List 3.23
TTYP0 :: LicenseId

-- | TU-Berlin-1.0, Technische Universitaet Berlin License 1.0,
--   SPDX License List 3.2, SPDX License List 3.6, SPDX License List 3.9,
--   SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.23
TU_Berlin_1_0 :: LicenseId

-- | TU-Berlin-2.0, Technische Universitaet Berlin License 2.0,
--   SPDX License List 3.2, SPDX License List 3.6, SPDX License List 3.9,
--   SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.23
TU_Berlin_2_0 :: LicenseId

-- | UCAR, UCAR License, SPDX License List 3.23
UCAR :: LicenseId

-- | UCL-1.0, Upstream Compatibility License v1.0, SPDX License
--   List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License
--   List 3.23
UCL_1_0 :: LicenseId

-- | ulem, ulem License, SPDX License List 3.23
Ulem :: LicenseId

-- | UMich-Merit, Michigan/Merit Networks License, SPDX License
--   List 3.23
UMich_Merit :: LicenseId

-- | Unicode-3.0, Unicode License v3, SPDX License List 3.23
Unicode_3_0 :: LicenseId

-- | Unicode-DFS-2015, Unicode License Agreement - Data Files and
--   Software (2015)
Unicode_DFS_2015 :: LicenseId

-- | Unicode-DFS-2016, Unicode License Agreement - Data Files and
--   Software (2016)
Unicode_DFS_2016 :: LicenseId

-- | Unicode-TOU, Unicode Terms of Use
Unicode_TOU :: LicenseId

-- | UnixCrypt, UnixCrypt License, SPDX License List 3.23
UnixCrypt :: LicenseId

-- | Unlicense, The Unlicense
Unlicense :: LicenseId

-- | UPL-1.0, Universal Permissive License v1.0
UPL_1_0 :: LicenseId

-- | URT-RLE, Utah Raster Toolkit Run Length Encoded License, SPDX
--   License List 3.23
URT_RLE :: LicenseId

-- | Vim, Vim License
Vim :: LicenseId

-- | VOSTROM, VOSTROM Public License for Open Source
VOSTROM :: LicenseId

-- | VSL-1.0, Vovida Software License v1.0
VSL_1_0 :: LicenseId

-- | W3C-19980720, W3C Software Notice and License (1998-07-20)
W3C_19980720 :: LicenseId

-- | W3C-20150513, W3C Software Notice and Document License
--   (2015-05-13)
W3C_20150513 :: LicenseId

-- | W3C, W3C Software Notice and License (2002-12-31)
W3C :: LicenseId

-- | w3m, w3m License, SPDX License List 3.23
W3m :: LicenseId

-- | Watcom-1.0, Sybase Open Watcom Public License 1.0
Watcom_1_0 :: LicenseId

-- | Widget-Workshop, Widget Workshop License, SPDX License List
--   3.23
Widget_Workshop :: LicenseId

-- | Wsuipa, Wsuipa License
Wsuipa :: LicenseId

-- | WTFPL, Do What The F*ck You Want To Public License
WTFPL :: LicenseId

-- | X11-distribute-modifications-variant, X11 License
--   Distribution Modification Variant, SPDX License List 3.16, SPDX
--   License List 3.23
X11_distribute_modifications_variant :: LicenseId

-- | X11, X11 License
X11 :: LicenseId

-- | Xdebug-1.03, Xdebug License v 1.03, SPDX License List 3.23
Xdebug_1_03 :: LicenseId

-- | Xerox, Xerox License
Xerox :: LicenseId

-- | Xfig, Xfig License, SPDX License List 3.23
Xfig :: LicenseId

-- | XFree86-1.1, XFree86 License 1.1
XFree86_1_1 :: LicenseId

-- | xinetd, xinetd License
Xinetd :: LicenseId

-- | xkeyboard-config-Zinoviev, xkeyboard-config Zinoviev License,
--   SPDX License List 3.23
Xkeyboard_config_Zinoviev :: LicenseId

-- | xlock, xlock License, SPDX License List 3.23
Xlock :: LicenseId

-- | Xnet, X.Net License
Xnet :: LicenseId

-- | xpp, XPP License
Xpp :: LicenseId

-- | XSkat, XSkat License
XSkat :: LicenseId

-- | YPL-1.0, Yahoo! Public License v1.0
YPL_1_0 :: LicenseId

-- | YPL-1.1, Yahoo! Public License v1.1
YPL_1_1 :: LicenseId

-- | Zed, Zed License
Zed :: LicenseId

-- | Zeeff, Zeeff License, SPDX License List 3.23
Zeeff :: LicenseId

-- | Zend-2.0, Zend License v2.0
Zend_2_0 :: LicenseId

-- | Zimbra-1.3, Zimbra Public License v1.3
Zimbra_1_3 :: LicenseId

-- | Zimbra-1.4, Zimbra Public License v1.4
Zimbra_1_4 :: LicenseId

-- | zlib-acknowledgement, zlib/libpng License with
--   Acknowledgement
Zlib_acknowledgement :: LicenseId

-- | Zlib, zlib License
Zlib :: LicenseId

-- | ZPL-1.1, Zope Public License 1.1
ZPL_1_1 :: LicenseId

-- | ZPL-2.0, Zope Public License 2.0
ZPL_2_0 :: LicenseId

-- | ZPL-2.1, Zope Public License 2.1
ZPL_2_1 :: LicenseId

-- | License SPDX identifier, e.g. "BSD-3-Clause".
licenseId :: LicenseId -> String

-- | License name, e.g. "GNU General Public License v2.0 only"
licenseName :: LicenseId -> String

-- | Whether the license is approved by Open Source Initiative (OSI).
--   
--   See https://opensource.org/licenses/alphabetical.
licenseIsOsiApproved :: LicenseId -> Bool

-- | Whether the license is considered libre by Free Software Foundation
--   (FSF).
--   
--   See https://www.gnu.org/licenses/license-list.en.html
licenseIsFsfLibre :: LicenseId -> Bool

-- | Create a LicenseId from a String.
mkLicenseId :: LicenseListVersion -> String -> Maybe LicenseId
licenseIdList :: LicenseListVersion -> [LicenseId]

-- | Help message for migrating from non-SPDX license identifiers.
--   
--   Old License is almost SPDX, except for BSD2,
--   BSD3. This function suggests SPDX variant:
--   
--   
--   >>> licenseIdMigrationMessage "BSD3"
--   "Do you mean BSD-3-Clause?"
--   
--   
--   Also OtherLicense, AllRightsReserved, and
--   PublicDomain aren't valid SPDX identifiers
--   
--   
--   >>> traverse_ (print . licenseIdMigrationMessage) [ "OtherLicense", "AllRightsReserved", "PublicDomain" ]
--   "SPDX license list contains plenty of licenses. See https://spdx.org/licenses/. Also they can be combined into complex expressions with AND and OR."
--   "You can use NONE as a value of license field."
--   "Public Domain is a complex matter. See https://wiki.spdx.org/view/Legal_Team/Decisions/Dealing_with_Public_Domain_within_SPDX_Files. Consider using a proper license."
--   
--   
--   SPDX License list version 3.0 introduced "-only" and "-or-later"
--   variants for GNU family of licenses. See
--   https://spdx.org/news/news/2018/01/license-list-30-released
--   >>> licenseIdMigrationMessage "GPL-2.0" "SPDX license list
--   3.0 deprecated suffixless variants of GNU family of licenses. Use
--   GPL-2.0-only or GPL-2.0-or-later."
--   
--   For other common licenses their old license format coincides with the
--   SPDX identifiers:
--   
--   
--   >>> traverse eitherParsec ["GPL-2.0-only", "GPL-3.0-only", "LGPL-2.1-only", "MIT", "ISC", "MPL-2.0", "Apache-2.0"] :: Either String [LicenseId]
--   Right [GPL_2_0_only,GPL_3_0_only,LGPL_2_1_only,MIT,ISC,MPL_2_0,Apache_2_0]
--   
licenseIdMigrationMessage :: String -> String
instance Data.Binary.Class.Binary Distribution.SPDX.LicenseId.LicenseId
instance GHC.Internal.Enum.Bounded Distribution.SPDX.LicenseId.LicenseId
instance GHC.Internal.Data.Data.Data Distribution.SPDX.LicenseId.LicenseId
instance GHC.Internal.Enum.Enum Distribution.SPDX.LicenseId.LicenseId
instance GHC.Classes.Eq Distribution.SPDX.LicenseId.LicenseId
instance Control.DeepSeq.NFData Distribution.SPDX.LicenseId.LicenseId
instance GHC.Classes.Ord Distribution.SPDX.LicenseId.LicenseId
instance Distribution.Parsec.Parsec Distribution.SPDX.LicenseId.LicenseId
instance Distribution.Pretty.Pretty Distribution.SPDX.LicenseId.LicenseId
instance GHC.Internal.Read.Read Distribution.SPDX.LicenseId.LicenseId
instance GHC.Internal.Show.Show Distribution.SPDX.LicenseId.LicenseId
instance Distribution.Utils.Structured.Structured Distribution.SPDX.LicenseId.LicenseId

module Distribution.SPDX.LicenseExceptionId

-- | SPDX License Exceptions identifiers list v3.23
data LicenseExceptionId

-- | 389-exception, 389 Directory Server Exception
DS389_exception :: LicenseExceptionId

-- | Asterisk-exception, Asterisk exception, SPDX License List
--   3.23
Asterisk_exception :: LicenseExceptionId

-- | Autoconf-exception-2.0, Autoconf exception 2.0
Autoconf_exception_2_0 :: LicenseExceptionId

-- | Autoconf-exception-3.0, Autoconf exception 3.0
Autoconf_exception_3_0 :: LicenseExceptionId

-- | Autoconf-exception-generic-3.0, Autoconf generic exception
--   for GPL-3.0, SPDX License List 3.23
Autoconf_exception_generic_3_0 :: LicenseExceptionId

-- | Autoconf-exception-generic, Autoconf generic exception, SPDX
--   License List 3.23
Autoconf_exception_generic :: LicenseExceptionId

-- | Autoconf-exception-macro, Autoconf macro exception, SPDX
--   License List 3.23
Autoconf_exception_macro :: LicenseExceptionId

-- | Bison-exception-1.24, Bison exception 1.24, SPDX License List
--   3.23
Bison_exception_1_24 :: LicenseExceptionId

-- | Bison-exception-2.2, Bison exception 2.2
Bison_exception_2_2 :: LicenseExceptionId

-- | Bootloader-exception, Bootloader Distribution Exception
Bootloader_exception :: LicenseExceptionId

-- | Classpath-exception-2.0, Classpath exception 2.0
Classpath_exception_2_0 :: LicenseExceptionId

-- | CLISP-exception-2.0, CLISP exception 2.0
CLISP_exception_2_0 :: LicenseExceptionId

-- | cryptsetup-OpenSSL-exception, cryptsetup OpenSSL exception,
--   SPDX License List 3.23
Cryptsetup_OpenSSL_exception :: LicenseExceptionId

-- | DigiRule-FOSS-exception, DigiRule FOSS License Exception
DigiRule_FOSS_exception :: LicenseExceptionId

-- | eCos-exception-2.0, eCos exception 2.0
ECos_exception_2_0 :: LicenseExceptionId

-- | Fawkes-Runtime-exception, Fawkes Runtime Exception
Fawkes_Runtime_exception :: LicenseExceptionId

-- | FLTK-exception, FLTK exception
FLTK_exception :: LicenseExceptionId

-- | fmt-exception, fmt exception, SPDX License List 3.23
Fmt_exception :: LicenseExceptionId

-- | Font-exception-2.0, Font exception 2.0
Font_exception_2_0 :: LicenseExceptionId

-- | freertos-exception-2.0, FreeRTOS Exception 2.0
Freertos_exception_2_0 :: LicenseExceptionId

-- | GCC-exception-2.0-note, GCC Runtime Library exception 2.0 -
--   note variant, SPDX License List 3.23
GCC_exception_2_0_note :: LicenseExceptionId

-- | GCC-exception-2.0, GCC Runtime Library exception 2.0
GCC_exception_2_0 :: LicenseExceptionId

-- | GCC-exception-3.1, GCC Runtime Library exception 3.1
GCC_exception_3_1 :: LicenseExceptionId

-- | Gmsh-exception, Gmsh exception>, SPDX License List 3.23
Gmsh_exception :: LicenseExceptionId

-- | GNAT-exception, GNAT exception, SPDX License List 3.23
GNAT_exception :: LicenseExceptionId

-- | GNOME-examples-exception, GNOME examples exception, SPDX
--   License List 3.23
GNOME_examples_exception :: LicenseExceptionId

-- | GNU-compiler-exception, GNU Compiler Exception, SPDX License
--   List 3.23
GNU_compiler_exception :: LicenseExceptionId

-- | gnu-javamail-exception, GNU JavaMail exception
Gnu_javamail_exception :: LicenseExceptionId

-- | GPL-3.0-interface-exception, GPL-3.0 Interface Exception,
--   SPDX License List 3.23
GPL_3_0_interface_exception :: LicenseExceptionId

-- | GPL-3.0-linking-exception, GPL-3.0 Linking Exception, SPDX
--   License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX
--   License List 3.23
GPL_3_0_linking_exception :: LicenseExceptionId

-- | GPL-3.0-linking-source-exception, GPL-3.0 Linking Exception
--   (with Corresponding Source), SPDX License List 3.9, SPDX License List
--   3.10, SPDX License List 3.16, SPDX License List 3.23
GPL_3_0_linking_source_exception :: LicenseExceptionId

-- | GPL-CC-1.0, GPL Cooperation Commitment 1.0, SPDX License List
--   3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List
--   3.16, SPDX License List 3.23
GPL_CC_1_0 :: LicenseExceptionId

-- | GStreamer-exception-2005, GStreamer Exception (2005), SPDX
--   License List 3.23
GStreamer_exception_2005 :: LicenseExceptionId

-- | GStreamer-exception-2008, GStreamer Exception (2008), SPDX
--   License List 3.23
GStreamer_exception_2008 :: LicenseExceptionId

-- | i2p-gpl-java-exception, i2p GPL+Java Exception
I2p_gpl_java_exception :: LicenseExceptionId

-- | KiCad-libraries-exception, KiCad Libraries Exception, SPDX
--   License List 3.23
KiCad_libraries_exception :: LicenseExceptionId

-- | LGPL-3.0-linking-exception, LGPL-3.0 Linking Exception, SPDX
--   License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX
--   License List 3.23
LGPL_3_0_linking_exception :: LicenseExceptionId

-- | libpri-OpenH323-exception, libpri OpenH323 exception, SPDX
--   License List 3.23
Libpri_OpenH323_exception :: LicenseExceptionId

-- | Libtool-exception, Libtool Exception
Libtool_exception :: LicenseExceptionId

-- | Linux-syscall-note, Linux Syscall Note
Linux_syscall_note :: LicenseExceptionId

-- | LLGPL, LLGPL Preamble, SPDX License List 3.23
LLGPL :: LicenseExceptionId

-- | LLVM-exception, LLVM Exception, SPDX License List 3.2, SPDX
--   License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX
--   License List 3.16, SPDX License List 3.23
LLVM_exception :: LicenseExceptionId

-- | LZMA-exception, LZMA exception
LZMA_exception :: LicenseExceptionId

-- | mif-exception, Macros and Inline Functions Exception
Mif_exception :: LicenseExceptionId

-- | Nokia-Qt-exception-1.1, Nokia Qt LGPL exception 1.1, SPDX
--   License List 3.0, SPDX License List 3.2
Nokia_Qt_exception_1_1 :: LicenseExceptionId

-- | OCaml-LGPL-linking-exception, OCaml LGPL Linking Exception,
--   SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10,
--   SPDX License List 3.16, SPDX License List 3.23
OCaml_LGPL_linking_exception :: LicenseExceptionId

-- | OCCT-exception-1.0, Open CASCADE Exception 1.0
OCCT_exception_1_0 :: LicenseExceptionId

-- | OpenJDK-assembly-exception-1.0, OpenJDK Assembly exception
--   1.0, SPDX License List 3.2, SPDX License List 3.6, SPDX License List
--   3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List
--   3.23
OpenJDK_assembly_exception_1_0 :: LicenseExceptionId

-- | openvpn-openssl-exception, OpenVPN OpenSSL Exception
Openvpn_openssl_exception :: LicenseExceptionId

-- | PS-or-PDF-font-exception-20170817, PS/PDF font exception
--   (2017-08-17), SPDX License List 3.2, SPDX License List 3.6, SPDX
--   License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX
--   License List 3.23
PS_or_PDF_font_exception_20170817 :: LicenseExceptionId

-- | QPL-1.0-INRIA-2004-exception, INRIA QPL 1.0 2004 variant
--   exception, SPDX License List 3.23
QPL_1_0_INRIA_2004_exception :: LicenseExceptionId

-- | Qt-GPL-exception-1.0, Qt GPL exception 1.0, SPDX License List
--   3.2, SPDX License List 3.6, SPDX License List 3.9, SPDX License List
--   3.10, SPDX License List 3.16, SPDX License List 3.23
Qt_GPL_exception_1_0 :: LicenseExceptionId

-- | Qt-LGPL-exception-1.1, Qt LGPL exception 1.1, SPDX License
--   List 3.2, SPDX License List 3.6, SPDX License List 3.9, SPDX License
--   List 3.10, SPDX License List 3.16, SPDX License List 3.23
Qt_LGPL_exception_1_1 :: LicenseExceptionId

-- | Qwt-exception-1.0, Qwt exception 1.0
Qwt_exception_1_0 :: LicenseExceptionId

-- | SANE-exception, SANE Exception, SPDX License List 3.23
SANE_exception :: LicenseExceptionId

-- | SHL-2.0, Solderpad Hardware License v2.0, SPDX License List
--   3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List
--   3.23
SHL_2_0 :: LicenseExceptionId

-- | SHL-2.1, Solderpad Hardware License v2.1, SPDX License List
--   3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List
--   3.23
SHL_2_1 :: LicenseExceptionId

-- | stunnel-exception, stunnel Exception, SPDX License List 3.23
Stunnel_exception :: LicenseExceptionId

-- | SWI-exception, SWI exception, SPDX License List 3.23
SWI_exception :: LicenseExceptionId

-- | Swift-exception, Swift Exception, SPDX License List 3.6, SPDX
--   License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX
--   License List 3.23
Swift_exception :: LicenseExceptionId

-- | Texinfo-exception, Texinfo exception, SPDX License List 3.23
Texinfo_exception :: LicenseExceptionId

-- | u-boot-exception-2.0, U-Boot exception 2.0
U_boot_exception_2_0 :: LicenseExceptionId

-- | UBDL-exception, Unmodified Binary Distribution exception,
--   SPDX License List 3.23
UBDL_exception :: LicenseExceptionId

-- | Universal-FOSS-exception-1.0, Universal FOSS Exception,
--   Version 1.0, SPDX License List 3.6, SPDX License List 3.9, SPDX
--   License List 3.10, SPDX License List 3.16, SPDX License List 3.23
Universal_FOSS_exception_1_0 :: LicenseExceptionId

-- | vsftpd-openssl-exception, vsftpd OpenSSL exception, SPDX
--   License List 3.23
Vsftpd_openssl_exception :: LicenseExceptionId

-- | WxWindows-exception-3.1, WxWindows Library Exception 3.1
WxWindows_exception_3_1 :: LicenseExceptionId

-- | x11vnc-openssl-exception, x11vnc OpenSSL Exception, SPDX
--   License List 3.23
X11vnc_openssl_exception :: LicenseExceptionId

-- | License SPDX identifier, e.g. "BSD-3-Clause".
licenseExceptionId :: LicenseExceptionId -> String

-- | License name, e.g. "GNU General Public License v2.0 only"
licenseExceptionName :: LicenseExceptionId -> String

-- | Create a LicenseExceptionId from a String.
mkLicenseExceptionId :: LicenseListVersion -> String -> Maybe LicenseExceptionId
licenseExceptionIdList :: LicenseListVersion -> [LicenseExceptionId]
instance Data.Binary.Class.Binary Distribution.SPDX.LicenseExceptionId.LicenseExceptionId
instance GHC.Internal.Enum.Bounded Distribution.SPDX.LicenseExceptionId.LicenseExceptionId
instance GHC.Internal.Data.Data.Data Distribution.SPDX.LicenseExceptionId.LicenseExceptionId
instance GHC.Internal.Enum.Enum Distribution.SPDX.LicenseExceptionId.LicenseExceptionId
instance GHC.Classes.Eq Distribution.SPDX.LicenseExceptionId.LicenseExceptionId
instance GHC.Internal.Generics.Generic Distribution.SPDX.LicenseExceptionId.LicenseExceptionId
instance Control.DeepSeq.NFData Distribution.SPDX.LicenseExceptionId.LicenseExceptionId
instance GHC.Classes.Ord Distribution.SPDX.LicenseExceptionId.LicenseExceptionId
instance Distribution.Parsec.Parsec Distribution.SPDX.LicenseExceptionId.LicenseExceptionId
instance Distribution.Pretty.Pretty Distribution.SPDX.LicenseExceptionId.LicenseExceptionId
instance GHC.Internal.Read.Read Distribution.SPDX.LicenseExceptionId.LicenseExceptionId
instance GHC.Internal.Show.Show Distribution.SPDX.LicenseExceptionId.LicenseExceptionId
instance Distribution.Utils.Structured.Structured Distribution.SPDX.LicenseExceptionId.LicenseExceptionId

module Distribution.SPDX.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)
--   
data LicenseExpression
ELicense :: !SimpleLicenseExpression -> !Maybe LicenseExceptionId -> LicenseExpression
EAnd :: !LicenseExpression -> !LicenseExpression -> LicenseExpression
EOr :: !LicenseExpression -> !LicenseExpression -> LicenseExpression

-- | Simple License Expressions.
data SimpleLicenseExpression

-- | An SPDX License List Short Form Identifier. For example:
--   GPL-2.0-only
ELicenseId :: LicenseId -> SimpleLicenseExpression

-- | 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+
ELicenseIdPlus :: LicenseId -> SimpleLicenseExpression

-- | A SPDX user defined license reference: For example:
--   LicenseRef-23, LicenseRef-MIT-Style-1, or
--   DocumentRef-spdx-tool-1.2:LicenseRef-MIT-Style-2
ELicenseRef :: LicenseRef -> SimpleLicenseExpression
simpleLicenseExpression :: LicenseId -> LicenseExpression
instance Data.Binary.Class.Binary Distribution.SPDX.LicenseExpression.LicenseExpression
instance Data.Binary.Class.Binary Distribution.SPDX.LicenseExpression.SimpleLicenseExpression
instance GHC.Internal.Data.Data.Data Distribution.SPDX.LicenseExpression.LicenseExpression
instance GHC.Internal.Data.Data.Data Distribution.SPDX.LicenseExpression.SimpleLicenseExpression
instance GHC.Classes.Eq Distribution.SPDX.LicenseExpression.LicenseExpression
instance GHC.Classes.Eq Distribution.SPDX.LicenseExpression.SimpleLicenseExpression
instance GHC.Internal.Generics.Generic Distribution.SPDX.LicenseExpression.LicenseExpression
instance GHC.Internal.Generics.Generic Distribution.SPDX.LicenseExpression.SimpleLicenseExpression
instance Control.DeepSeq.NFData Distribution.SPDX.LicenseExpression.LicenseExpression
instance Control.DeepSeq.NFData Distribution.SPDX.LicenseExpression.SimpleLicenseExpression
instance GHC.Classes.Ord Distribution.SPDX.LicenseExpression.LicenseExpression
instance GHC.Classes.Ord Distribution.SPDX.LicenseExpression.SimpleLicenseExpression
instance Distribution.Parsec.Parsec Distribution.SPDX.LicenseExpression.LicenseExpression
instance Distribution.Parsec.Parsec Distribution.SPDX.LicenseExpression.SimpleLicenseExpression
instance Distribution.Pretty.Pretty Distribution.SPDX.LicenseExpression.LicenseExpression
instance Distribution.Pretty.Pretty Distribution.SPDX.LicenseExpression.SimpleLicenseExpression
instance GHC.Internal.Read.Read Distribution.SPDX.LicenseExpression.LicenseExpression
instance GHC.Internal.Read.Read Distribution.SPDX.LicenseExpression.SimpleLicenseExpression
instance GHC.Internal.Show.Show Distribution.SPDX.LicenseExpression.LicenseExpression
instance GHC.Internal.Show.Show Distribution.SPDX.LicenseExpression.SimpleLicenseExpression
instance Distribution.Utils.Structured.Structured Distribution.SPDX.LicenseExpression.LicenseExpression
instance Distribution.Utils.Structured.Structured Distribution.SPDX.LicenseExpression.SimpleLicenseExpression

module Distribution.SPDX.License

-- | Declared license. See section 3.15 of SPDX Specification 2.1
--   
--   Note: the NOASSERTION case is omitted.
--   
--   Old License can be migrated using following rules:
--   
--   
--   
- AllRightsReserved and UnspecifiedLicense to
--   NONE. No license specified which legally defaults to All
--   Rights Reserved. The package may not be legally modified or
--   redistributed by anyone but the rightsholder.
--   
- OtherLicense can be converted to LicenseRef
--   pointing to the file in the package.
--   
- UnknownLicense i.e. other licenses of the form
--   name-x.y, should be covered by SPDX license list, otherwise
--   use LicenseRef.
--   
- PublicDomain isn't covered. Consider using CC0. See
--   https://wiki.spdx.org/view/Legal_Team/Decisions/Dealing_with_Public_Domain_within_SPDX_Files
--   for more information.
--   
data License

-- | if the package contains no license information whatsoever; or
NONE :: License

-- | A valid SPDX License Expression as defined in Appendix IV.
License :: LicenseExpression -> License
instance Data.Binary.Class.Binary Distribution.SPDX.License.License
instance GHC.Internal.Data.Data.Data Distribution.SPDX.License.License
instance GHC.Classes.Eq Distribution.SPDX.License.License
instance GHC.Internal.Generics.Generic Distribution.SPDX.License.License
instance Control.DeepSeq.NFData Distribution.SPDX.License.License
instance GHC.Classes.Ord Distribution.SPDX.License.License
instance Distribution.Parsec.Parsec Distribution.SPDX.License.License
instance Distribution.Pretty.Pretty Distribution.SPDX.License.License
instance GHC.Internal.Read.Read Distribution.SPDX.License.License
instance GHC.Internal.Show.Show Distribution.SPDX.License.License
instance Distribution.Utils.Structured.Structured Distribution.SPDX.License.License

-- | This module implements SPDX specification version 2.1 with a version
--   3.0 license list.
--   
--   Specification is available on https://spdx.org/specifications
module Distribution.SPDX

-- | Declared license. See section 3.15 of SPDX Specification 2.1
--   
--   Note: the NOASSERTION case is omitted.
--   
--   Old License can be migrated using following rules:
--   
--   
--   
- AllRightsReserved and UnspecifiedLicense to
--   NONE. No license specified which legally defaults to All
--   Rights Reserved. The package may not be legally modified or
--   redistributed by anyone but the rightsholder.
--   
- OtherLicense can be converted to LicenseRef
--   pointing to the file in the package.
--   
- UnknownLicense i.e. other licenses of the form
--   name-x.y, should be covered by SPDX license list, otherwise
--   use LicenseRef.
--   
- PublicDomain isn't covered. Consider using CC0. See
--   https://wiki.spdx.org/view/Legal_Team/Decisions/Dealing_with_Public_Domain_within_SPDX_Files
--   for more information.
--   
data License

-- | if the package contains no license information whatsoever; or
NONE :: License

-- | A valid SPDX License Expression as defined in Appendix IV.
License :: LicenseExpression -> License

-- | 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)
--   
data LicenseExpression
ELicense :: !SimpleLicenseExpression -> !Maybe LicenseExceptionId -> LicenseExpression
EAnd :: !LicenseExpression -> !LicenseExpression -> LicenseExpression
EOr :: !LicenseExpression -> !LicenseExpression -> LicenseExpression

-- | Simple License Expressions.
data SimpleLicenseExpression

-- | An SPDX License List Short Form Identifier. For example:
--   GPL-2.0-only
ELicenseId :: LicenseId -> SimpleLicenseExpression

-- | 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+
ELicenseIdPlus :: LicenseId -> SimpleLicenseExpression

-- | A SPDX user defined license reference: For example:
--   LicenseRef-23, LicenseRef-MIT-Style-1, or
--   DocumentRef-spdx-tool-1.2:LicenseRef-MIT-Style-2
ELicenseRef :: LicenseRef -> SimpleLicenseExpression
simpleLicenseExpression :: LicenseId -> LicenseExpression

-- | SPDX License identifiers list v3.23
data LicenseId

-- | 0BSD, BSD Zero Clause License
NullBSD :: LicenseId

-- | AAL, Attribution Assurance License
AAL :: LicenseId

-- | Abstyles, Abstyles License
Abstyles :: LicenseId

-- | AdaCore-doc, AdaCore Doc License, SPDX License List 3.23
AdaCore_doc :: LicenseId

-- | Adobe-2006, Adobe Systems Incorporated Source Code License
--   Agreement
Adobe_2006 :: LicenseId

-- | Adobe-Display-PostScript, Adobe Display PostScript License,
--   SPDX License List 3.23
Adobe_Display_PostScript :: LicenseId

-- | Adobe-Glyph, Adobe Glyph List License
Adobe_Glyph :: LicenseId

-- | Adobe-Utopia, Adobe Utopia Font License, SPDX License List
--   3.23
Adobe_Utopia :: LicenseId

-- | ADSL, Amazon Digital Services License
ADSL :: LicenseId

-- | AFL-1.1, Academic Free License v1.1
AFL_1_1 :: LicenseId

-- | AFL-1.2, Academic Free License v1.2
AFL_1_2 :: LicenseId

-- | AFL-2.0, Academic Free License v2.0
AFL_2_0 :: LicenseId

-- | AFL-2.1, Academic Free License v2.1
AFL_2_1 :: LicenseId

-- | AFL-3.0, Academic Free License v3.0
AFL_3_0 :: LicenseId

-- | Afmparse, Afmparse License
Afmparse :: LicenseId

-- | AGPL-1.0, Affero General Public License v1.0, SPDX License
--   List 3.0
AGPL_1_0 :: LicenseId

-- | AGPL-1.0-only, Affero General Public License v1.0 only, SPDX
--   License List 3.2, SPDX License List 3.6, SPDX License List 3.9, SPDX
--   License List 3.10, SPDX License List 3.16, SPDX License List 3.23
AGPL_1_0_only :: LicenseId

-- | AGPL-1.0-or-later, Affero General Public License v1.0 or
--   later, SPDX License List 3.2, SPDX License List 3.6, SPDX License List
--   3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List
--   3.23
AGPL_1_0_or_later :: LicenseId

-- | AGPL-3.0-only, GNU Affero General Public License v3.0 only
AGPL_3_0_only :: LicenseId

-- | AGPL-3.0-or-later, GNU Affero General Public License v3.0 or
--   later
AGPL_3_0_or_later :: LicenseId

-- | Aladdin, Aladdin Free Public License
Aladdin :: LicenseId

-- | AMDPLPA, AMD's plpa_map.c License
AMDPLPA :: LicenseId

-- | AML-glslang, AML glslang variant License, SPDX License List
--   3.23
AML_glslang :: LicenseId

-- | AML, Apple MIT License
AML :: LicenseId

-- | AMPAS, Academy of Motion Picture Arts and Sciences BSD
AMPAS :: LicenseId

-- | ANTLR-PD-fallback, ANTLR Software Rights Notice with license
--   fallback, SPDX License List 3.16, SPDX License List 3.23
ANTLR_PD_fallback :: LicenseId

-- | ANTLR-PD, ANTLR Software Rights Notice
ANTLR_PD :: LicenseId

-- | Apache-1.0, Apache License 1.0
Apache_1_0 :: LicenseId

-- | Apache-1.1, Apache License 1.1
Apache_1_1 :: LicenseId

-- | Apache-2.0, Apache License 2.0
Apache_2_0 :: LicenseId

-- | APAFML, Adobe Postscript AFM License
APAFML :: LicenseId

-- | APL-1.0, Adaptive Public License 1.0
APL_1_0 :: LicenseId

-- | App-s2p, App::s2p License, SPDX License List 3.16, SPDX
--   License List 3.23
App_s2p :: LicenseId

-- | APSL-1.0, Apple Public Source License 1.0
APSL_1_0 :: LicenseId

-- | APSL-1.1, Apple Public Source License 1.1
APSL_1_1 :: LicenseId

-- | APSL-1.2, Apple Public Source License 1.2
APSL_1_2 :: LicenseId

-- | APSL-2.0, Apple Public Source License 2.0
APSL_2_0 :: LicenseId

-- | Arphic-1999, Arphic Public License, SPDX License List 3.23
Arphic_1999 :: LicenseId

-- | Artistic-1.0-cl8, Artistic License 1.0 w/clause 8
Artistic_1_0_cl8 :: LicenseId

-- | Artistic-1.0-Perl, Artistic License 1.0 (Perl)
Artistic_1_0_Perl :: LicenseId

-- | Artistic-1.0, Artistic License 1.0
Artistic_1_0 :: LicenseId

-- | Artistic-2.0, Artistic License 2.0
Artistic_2_0 :: LicenseId

-- | ASWF-Digital-Assets-1.0, ASWF Digital Assets License version
--   1.0, SPDX License List 3.23
ASWF_Digital_Assets_1_0 :: LicenseId

-- | ASWF-Digital-Assets-1.1, ASWF Digital Assets License 1.1,
--   SPDX License List 3.23
ASWF_Digital_Assets_1_1 :: LicenseId

-- | Baekmuk, Baekmuk License, SPDX License List 3.23
Baekmuk :: LicenseId

-- | Bahyph, Bahyph License
Bahyph :: LicenseId

-- | Barr, Barr License
Barr :: LicenseId

-- | bcrypt-Solar-Designer, bcrypt Solar Designer License, SPDX
--   License List 3.23
Bcrypt_Solar_Designer :: LicenseId

-- | Beerware, Beerware License
Beerware :: LicenseId

-- | Bitstream-Charter, Bitstream Charter Font License, SPDX
--   License List 3.23
Bitstream_Charter :: LicenseId

-- | Bitstream-Vera, Bitstream Vera Font License, SPDX License
--   List 3.23
Bitstream_Vera :: LicenseId

-- | BitTorrent-1.0, BitTorrent Open Source License v1.0
BitTorrent_1_0 :: LicenseId

-- | BitTorrent-1.1, BitTorrent Open Source License v1.1
BitTorrent_1_1 :: LicenseId

-- | blessing, SQLite Blessing, SPDX License List 3.6, SPDX
--   License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX
--   License List 3.23
Blessing :: LicenseId

-- | BlueOak-1.0.0, Blue Oak Model License 1.0.0, SPDX License
--   List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License
--   List 3.16, SPDX License List 3.23
BlueOak_1_0_0 :: LicenseId

-- | Boehm-GC, Boehm-Demers-Weiser GC License, SPDX License List
--   3.23
Boehm_GC :: LicenseId

-- | Borceux, Borceux license
Borceux :: LicenseId

-- | Brian-Gladman-2-Clause, Brian Gladman 2-Clause License, SPDX
--   License List 3.23
Brian_Gladman_2_Clause :: LicenseId

-- | Brian-Gladman-3-Clause, Brian Gladman 3-Clause License, SPDX
--   License List 3.23
Brian_Gladman_3_Clause :: LicenseId

-- | BSD-1-Clause, BSD 1-Clause License
BSD_1_Clause :: LicenseId

-- | BSD-2-Clause-FreeBSD, BSD 2-Clause FreeBSD License, SPDX
--   License List 3.0, SPDX License List 3.2, SPDX License List 3.6, SPDX
--   License List 3.9
BSD_2_Clause_FreeBSD :: LicenseId

-- | BSD-2-Clause-NetBSD, BSD 2-Clause NetBSD License, SPDX
--   License List 3.0, SPDX License List 3.2, SPDX License List 3.6
BSD_2_Clause_NetBSD :: LicenseId

-- | BSD-2-Clause-Darwin, BSD 2-Clause - Ian Darwin variant, SPDX
--   License List 3.23
BSD_2_Clause_Darwin :: LicenseId

-- | BSD-2-Clause-Patent, BSD-2-Clause Plus Patent License
BSD_2_Clause_Patent :: LicenseId

-- | BSD-2-Clause-Views, BSD 2-Clause with views sentence, SPDX
--   License List 3.10, SPDX License List 3.16, SPDX License List 3.23
BSD_2_Clause_Views :: LicenseId

-- | BSD-2-Clause, BSD 2-Clause Simplified License
BSD_2_Clause :: LicenseId

-- | BSD-3-Clause-acpica, BSD 3-Clause acpica variant, SPDX
--   License List 3.23
BSD_3_Clause_acpica :: LicenseId

-- | BSD-3-Clause-Attribution, BSD with attribution
BSD_3_Clause_Attribution :: LicenseId

-- | BSD-3-Clause-Clear, BSD 3-Clause Clear License
BSD_3_Clause_Clear :: LicenseId

-- | BSD-3-Clause-flex, BSD 3-Clause Flex variant, SPDX License
--   List 3.23
BSD_3_Clause_flex :: LicenseId

-- | BSD-3-Clause-HP, Hewlett-Packard BSD variant license, SPDX
--   License List 3.23
BSD_3_Clause_HP :: LicenseId

-- | BSD-3-Clause-LBNL, Lawrence Berkeley National Labs BSD
--   variant license
BSD_3_Clause_LBNL :: LicenseId

-- | BSD-3-Clause-Modification, BSD 3-Clause Modification, SPDX
--   License List 3.16, SPDX License List 3.23
BSD_3_Clause_Modification :: LicenseId

-- | BSD-3-Clause-No-Military-License, BSD 3-Clause No Military
--   License, SPDX License List 3.16, SPDX License List 3.23
BSD_3_Clause_No_Military_License :: LicenseId

-- | BSD-3-Clause-No-Nuclear-License-2014, BSD 3-Clause No Nuclear
--   License 2014
BSD_3_Clause_No_Nuclear_License_2014 :: LicenseId

-- | BSD-3-Clause-No-Nuclear-License, BSD 3-Clause No Nuclear
--   License
BSD_3_Clause_No_Nuclear_License :: LicenseId

-- | BSD-3-Clause-No-Nuclear-Warranty, BSD 3-Clause No Nuclear
--   Warranty
BSD_3_Clause_No_Nuclear_Warranty :: LicenseId

-- | BSD-3-Clause-Open-MPI, BSD 3-Clause Open MPI variant, SPDX
--   License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX
--   License List 3.16, SPDX License List 3.23
BSD_3_Clause_Open_MPI :: LicenseId

-- | BSD-3-Clause-Sun, BSD 3-Clause Sun Microsystems, SPDX License
--   List 3.23
BSD_3_Clause_Sun :: LicenseId

-- | BSD-3-Clause, BSD 3-Clause New or Revised
--   License
BSD_3_Clause :: LicenseId

-- | BSD-4-Clause-Shortened, BSD 4 Clause Shortened, SPDX License
--   List 3.16, SPDX License List 3.23
BSD_4_Clause_Shortened :: LicenseId

-- | BSD-4-Clause-UC, BSD-4-Clause (University of
--   California-Specific)
BSD_4_Clause_UC :: LicenseId

-- | BSD-4-Clause, BSD 4-Clause Original or Old
--   License
BSD_4_Clause :: LicenseId

-- | BSD-4.3RENO, BSD 4.3 RENO License, SPDX License List 3.23
BSD_4_3RENO :: LicenseId

-- | BSD-4.3TAHOE, BSD 4.3 TAHOE License, SPDX License List 3.23
BSD_4_3TAHOE :: LicenseId

-- | BSD-Advertising-Acknowledgement, BSD Advertising
--   Acknowledgement License, SPDX License List 3.23
BSD_Advertising_Acknowledgement :: LicenseId

-- | BSD-Attribution-HPND-disclaimer, BSD with Attribution and
--   HPND disclaimer, SPDX License List 3.23
BSD_Attribution_HPND_disclaimer :: LicenseId

-- | BSD-Inferno-Nettverk, BSD-Inferno-Nettverk, SPDX License List
--   3.23
BSD_Inferno_Nettverk :: LicenseId

-- | BSD-Protection, BSD Protection License
BSD_Protection :: LicenseId

-- | BSD-Source-beginning-file, BSD Source Code Attribution -
--   beginning of file variant, SPDX License List 3.23
BSD_Source_beginning_file :: LicenseId

-- | BSD-Source-Code, BSD Source Code Attribution
BSD_Source_Code :: LicenseId

-- | BSD-Systemics-W3Works, Systemics W3Works BSD variant license,
--   SPDX License List 3.23
BSD_Systemics_W3Works :: LicenseId

-- | BSD-Systemics, Systemics BSD variant license, SPDX License
--   List 3.23
BSD_Systemics :: LicenseId

-- | BSL-1.0, Boost Software License 1.0
BSL_1_0 :: LicenseId

-- | bzip2-1.0.5, bzip2 and libbzip2 License v1.0.5, SPDX License
--   List 3.0, SPDX License List 3.2, SPDX License List 3.6, SPDX License
--   List 3.9, SPDX License List 3.10
Bzip2_1_0_5 :: LicenseId

-- | BUSL-1.1, Business Source License 1.1, SPDX License List
--   3.16, SPDX License List 3.23
BUSL_1_1 :: LicenseId

-- | bzip2-1.0.6, bzip2 and libbzip2 License v1.0.6
Bzip2_1_0_6 :: LicenseId

-- | C-UDA-1.0, Computational Use of Data Agreement v1.0, SPDX
--   License List 3.16, SPDX License List 3.23
C_UDA_1_0 :: LicenseId

-- | CAL-1.0-Combined-Work-Exception, Cryptographic Autonomy
--   License 1.0 (Combined Work Exception), SPDX License List 3.9, SPDX
--   License List 3.10, SPDX License List 3.16, SPDX License List 3.23
CAL_1_0_Combined_Work_Exception :: LicenseId

-- | CAL-1.0, Cryptographic Autonomy License 1.0, SPDX License
--   List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License
--   List 3.23
CAL_1_0 :: LicenseId

-- | Caldera-no-preamble, Caldera License (without preamble), SPDX
--   License List 3.23
Caldera_no_preamble :: LicenseId

-- | Caldera, Caldera License
Caldera :: LicenseId

-- | CATOSL-1.1, Computer Associates Trusted Open Source License
--   1.1
CATOSL_1_1 :: LicenseId

-- | CC-BY-1.0, Creative Commons Attribution 1.0 Generic
CC_BY_1_0 :: LicenseId

-- | CC-BY-2.0, Creative Commons Attribution 2.0 Generic
CC_BY_2_0 :: LicenseId

-- | CC-BY-2.5-AU, Creative Commons Attribution 2.5 Australia,
--   SPDX License List 3.16, SPDX License List 3.23
CC_BY_2_5_AU :: LicenseId

-- | CC-BY-2.5, Creative Commons Attribution 2.5 Generic
CC_BY_2_5 :: LicenseId

-- | CC-BY-3.0-AT, Creative Commons Attribution 3.0 Austria, SPDX
--   License List 3.10, SPDX License List 3.16, SPDX License List 3.23
CC_BY_3_0_AT :: LicenseId

-- | CC-BY-3.0-AU, Creative Commons Attribution 3.0 Australia,
--   SPDX License List 3.23
CC_BY_3_0_AU :: LicenseId

-- | CC-BY-3.0-DE, Creative Commons Attribution 3.0 Germany, SPDX
--   License List 3.16, SPDX License List 3.23
CC_BY_3_0_DE :: LicenseId

-- | CC-BY-3.0-IGO, Creative Commons Attribution 3.0 IGO, SPDX
--   License List 3.23
CC_BY_3_0_IGO :: LicenseId

-- | CC-BY-3.0-NL, Creative Commons Attribution 3.0 Netherlands,
--   SPDX License List 3.16, SPDX License List 3.23
CC_BY_3_0_NL :: LicenseId

-- | CC-BY-3.0-US, Creative Commons Attribution 3.0 United States,
--   SPDX License List 3.16, SPDX License List 3.23
CC_BY_3_0_US :: LicenseId

-- | CC-BY-3.0, Creative Commons Attribution 3.0 Unported
CC_BY_3_0 :: LicenseId

-- | CC-BY-4.0, Creative Commons Attribution 4.0 International
CC_BY_4_0 :: LicenseId

-- | CC-BY-NC-1.0, Creative Commons Attribution Non Commercial 1.0
--   Generic
CC_BY_NC_1_0 :: LicenseId

-- | CC-BY-NC-2.0, Creative Commons Attribution Non Commercial 2.0
--   Generic
CC_BY_NC_2_0 :: LicenseId

-- | CC-BY-NC-2.5, Creative Commons Attribution Non Commercial 2.5
--   Generic
CC_BY_NC_2_5 :: LicenseId

-- | CC-BY-NC-3.0-DE, Creative Commons Attribution Non Commercial
--   3.0 Germany, SPDX License List 3.16, SPDX License List 3.23
CC_BY_NC_3_0_DE :: LicenseId

-- | CC-BY-NC-3.0, Creative Commons Attribution Non Commercial 3.0
--   Unported
CC_BY_NC_3_0 :: LicenseId

-- | CC-BY-NC-4.0, Creative Commons Attribution Non Commercial 4.0
--   International
CC_BY_NC_4_0 :: LicenseId

-- | CC-BY-NC-ND-1.0, Creative Commons Attribution Non Commercial
--   No Derivatives 1.0 Generic
CC_BY_NC_ND_1_0 :: LicenseId

-- | CC-BY-NC-ND-2.0, Creative Commons Attribution Non Commercial
--   No Derivatives 2.0 Generic
CC_BY_NC_ND_2_0 :: LicenseId

-- | CC-BY-NC-ND-2.5, Creative Commons Attribution Non Commercial
--   No Derivatives 2.5 Generic
CC_BY_NC_ND_2_5 :: LicenseId

-- | CC-BY-NC-ND-3.0-DE, Creative Commons Attribution Non
--   Commercial No Derivatives 3.0 Germany, SPDX License List 3.16, SPDX
--   License List 3.23
CC_BY_NC_ND_3_0_DE :: LicenseId

-- | CC-BY-NC-ND-3.0-IGO, Creative Commons Attribution Non
--   Commercial No Derivatives 3.0 IGO, SPDX License List 3.10, SPDX
--   License List 3.16, SPDX License List 3.23
CC_BY_NC_ND_3_0_IGO :: LicenseId

-- | CC-BY-NC-ND-3.0, Creative Commons Attribution Non Commercial
--   No Derivatives 3.0 Unported
CC_BY_NC_ND_3_0 :: LicenseId

-- | CC-BY-NC-ND-4.0, Creative Commons Attribution Non Commercial
--   No Derivatives 4.0 International
CC_BY_NC_ND_4_0 :: LicenseId

-- | CC-BY-NC-SA-1.0, Creative Commons Attribution Non Commercial
--   Share Alike 1.0 Generic
CC_BY_NC_SA_1_0 :: LicenseId

-- | CC-BY-NC-SA-2.0-DE, Creative Commons Attribution Non
--   Commercial Share Alike 2.0 Germany, SPDX License List 3.23
CC_BY_NC_SA_2_0_DE :: LicenseId

-- | CC-BY-NC-SA-2.0-FR, Creative Commons
--   Attribution-NonCommercial-ShareAlike 2.0 France, SPDX License List
--   3.16, SPDX License List 3.23
CC_BY_NC_SA_2_0_FR :: LicenseId

-- | CC-BY-NC-SA-2.0-UK, Creative Commons Attribution Non
--   Commercial Share Alike 2.0 England and Wales, SPDX License List 3.16,
--   SPDX License List 3.23
CC_BY_NC_SA_2_0_UK :: LicenseId

-- | CC-BY-NC-SA-2.0, Creative Commons Attribution Non Commercial
--   Share Alike 2.0 Generic
CC_BY_NC_SA_2_0 :: LicenseId

-- | CC-BY-NC-SA-2.5, Creative Commons Attribution Non Commercial
--   Share Alike 2.5 Generic
CC_BY_NC_SA_2_5 :: LicenseId

-- | CC-BY-NC-SA-3.0-DE, Creative Commons Attribution Non
--   Commercial Share Alike 3.0 Germany, SPDX License List 3.16, SPDX
--   License List 3.23
CC_BY_NC_SA_3_0_DE :: LicenseId

-- | CC-BY-NC-SA-3.0-IGO, Creative Commons Attribution Non
--   Commercial Share Alike 3.0 IGO, SPDX License List 3.16, SPDX License
--   List 3.23
CC_BY_NC_SA_3_0_IGO :: LicenseId

-- | CC-BY-NC-SA-3.0, Creative Commons Attribution Non Commercial
--   Share Alike 3.0 Unported
CC_BY_NC_SA_3_0 :: LicenseId

-- | CC-BY-NC-SA-4.0, Creative Commons Attribution Non Commercial
--   Share Alike 4.0 International
CC_BY_NC_SA_4_0 :: LicenseId

-- | CC-BY-ND-1.0, Creative Commons Attribution No Derivatives 1.0
--   Generic
CC_BY_ND_1_0 :: LicenseId

-- | CC-BY-ND-2.0, Creative Commons Attribution No Derivatives 2.0
--   Generic
CC_BY_ND_2_0 :: LicenseId

-- | CC-BY-ND-2.5, Creative Commons Attribution No Derivatives 2.5
--   Generic
CC_BY_ND_2_5 :: LicenseId

-- | CC-BY-ND-3.0-DE, Creative Commons Attribution No Derivatives
--   3.0 Germany, SPDX License List 3.16, SPDX License List 3.23
CC_BY_ND_3_0_DE :: LicenseId

-- | CC-BY-ND-3.0, Creative Commons Attribution No Derivatives 3.0
--   Unported
CC_BY_ND_3_0 :: LicenseId

-- | CC-BY-ND-4.0, Creative Commons Attribution No Derivatives 4.0
--   International
CC_BY_ND_4_0 :: LicenseId

-- | CC-BY-SA-1.0, Creative Commons Attribution Share Alike 1.0
--   Generic
CC_BY_SA_1_0 :: LicenseId

-- | CC-BY-SA-2.0-UK, Creative Commons Attribution Share Alike 2.0
--   England and Wales, SPDX License List 3.16, SPDX License List 3.23
CC_BY_SA_2_0_UK :: LicenseId

-- | CC-BY-SA-2.0, Creative Commons Attribution Share Alike 2.0
--   Generic
CC_BY_SA_2_0 :: LicenseId

-- | CC-BY-SA-2.1-JP, Creative Commons Attribution Share Alike 2.1
--   Japan, SPDX License List 3.16, SPDX License List 3.23
CC_BY_SA_2_1_JP :: LicenseId

-- | CC-BY-SA-2.5, Creative Commons Attribution Share Alike 2.5
--   Generic
CC_BY_SA_2_5 :: LicenseId

-- | CC-BY-SA-3.0-AT, Creative Commons Attribution Share Alike 3.0
--   Austria, SPDX License List 3.10, SPDX License List 3.16, SPDX License
--   List 3.23
CC_BY_SA_3_0_AT :: LicenseId

-- | CC-BY-SA-3.0-DE, Creative Commons Attribution Share Alike 3.0
--   Germany, SPDX License List 3.16, SPDX License List 3.23
CC_BY_SA_3_0_DE :: LicenseId

-- | CC-BY-SA-3.0-IGO, Creative Commons Attribution-ShareAlike 3.0
--   IGO, SPDX License List 3.23
CC_BY_SA_3_0_IGO :: LicenseId

-- | CC-BY-SA-3.0, Creative Commons Attribution Share Alike 3.0
--   Unported
CC_BY_SA_3_0 :: LicenseId

-- | CC-BY-SA-4.0, Creative Commons Attribution Share Alike 4.0
--   International
CC_BY_SA_4_0 :: LicenseId

-- | CC-PDDC, Creative Commons Public Domain Dedication and
--   Certification, SPDX License List 3.6, SPDX License List 3.9, SPDX
--   License List 3.10, SPDX License List 3.16, SPDX License List 3.23
CC_PDDC :: LicenseId

-- | CC0-1.0, Creative Commons Zero v1.0 Universal
CC0_1_0 :: LicenseId

-- | CDDL-1.0, Common Development and Distribution License 1.0
CDDL_1_0 :: LicenseId

-- | CDDL-1.1, Common Development and Distribution License 1.1
CDDL_1_1 :: LicenseId

-- | CDL-1.0, Common Documentation License 1.0, SPDX License List
--   3.16, SPDX License List 3.23
CDL_1_0 :: LicenseId

-- | CDLA-Permissive-1.0, Community Data License Agreement
--   Permissive 1.0
CDLA_Permissive_1_0 :: LicenseId

-- | CDLA-Permissive-2.0, Community Data License Agreement
--   Permissive 2.0, SPDX License List 3.16, SPDX License List 3.23
CDLA_Permissive_2_0 :: LicenseId

-- | CDLA-Sharing-1.0, Community Data License Agreement Sharing
--   1.0
CDLA_Sharing_1_0 :: LicenseId

-- | CECILL-1.0, CeCILL Free Software License Agreement v1.0
CECILL_1_0 :: LicenseId

-- | CECILL-1.1, CeCILL Free Software License Agreement v1.1
CECILL_1_1 :: LicenseId

-- | CECILL-2.0, CeCILL Free Software License Agreement v2.0
CECILL_2_0 :: LicenseId

-- | CECILL-2.1, CeCILL Free Software License Agreement v2.1
CECILL_2_1 :: LicenseId

-- | CECILL-B, CeCILL-B Free Software License Agreement
CECILL_B :: LicenseId

-- | CECILL-C, CeCILL-C Free Software License Agreement
CECILL_C :: LicenseId

-- | CERN-OHL-1.1, CERN Open Hardware Licence v1.1, SPDX License
--   List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License
--   List 3.16, SPDX License List 3.23
CERN_OHL_1_1 :: LicenseId

-- | CERN-OHL-1.2, CERN Open Hardware Licence v1.2, SPDX License
--   List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License
--   List 3.16, SPDX License List 3.23
CERN_OHL_1_2 :: LicenseId

-- | CERN-OHL-P-2.0, CERN Open Hardware Licence Version 2 -
--   Permissive, SPDX License List 3.9, SPDX License List 3.10, SPDX
--   License List 3.16, SPDX License List 3.23
CERN_OHL_P_2_0 :: LicenseId

-- | CERN-OHL-S-2.0, CERN Open Hardware Licence Version 2 -
--   Strongly Reciprocal, SPDX License List 3.9, SPDX License List 3.10,
--   SPDX License List 3.16, SPDX License List 3.23
CERN_OHL_S_2_0 :: LicenseId

-- | CERN-OHL-W-2.0, CERN Open Hardware Licence Version 2 - Weakly
--   Reciprocal, SPDX License List 3.9, SPDX License List 3.10, SPDX
--   License List 3.16, SPDX License List 3.23
CERN_OHL_W_2_0 :: LicenseId

-- | CFITSIO, CFITSIO License, SPDX License List 3.23
CFITSIO :: LicenseId

-- | check-cvs, check-cvs License, SPDX License List 3.23
Check_cvs :: LicenseId

-- | checkmk, Checkmk License, SPDX License List 3.23
Checkmk :: LicenseId

-- | ClArtistic, Clarified Artistic License
ClArtistic :: LicenseId

-- | Clips, Clips License, SPDX License List 3.23
Clips :: LicenseId

-- | CMU-Mach-nodoc, CMU Mach - no notices-in-documentation
--   variant, SPDX License List 3.23
CMU_Mach_nodoc :: LicenseId

-- | CMU-Mach, CMU Mach License, SPDX License List 3.23
CMU_Mach :: LicenseId

-- | CNRI-Jython, CNRI Jython License
CNRI_Jython :: LicenseId

-- | CNRI-Python-GPL-Compatible, CNRI Python Open Source GPL
--   Compatible License Agreement
CNRI_Python_GPL_Compatible :: LicenseId

-- | CNRI-Python, CNRI Python License
CNRI_Python :: LicenseId

-- | COIL-1.0, Copyfree Open Innovation License, SPDX License List
--   3.16, SPDX License List 3.23
COIL_1_0 :: LicenseId

-- | Community-Spec-1.0, Community Specification License 1.0, SPDX
--   License List 3.16, SPDX License List 3.23
Community_Spec_1_0 :: LicenseId

-- | Condor-1.1, Condor Public License v1.1
Condor_1_1 :: LicenseId

-- | copyleft-next-0.3.0, copyleft-next 0.3.0, SPDX License List
--   3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List
--   3.16, SPDX License List 3.23
Copyleft_next_0_3_0 :: LicenseId

-- | copyleft-next-0.3.1, copyleft-next 0.3.1, SPDX License List
--   3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List
--   3.16, SPDX License List 3.23
Copyleft_next_0_3_1 :: LicenseId

-- | Cornell-Lossless-JPEG, Cornell Lossless JPEG License, SPDX
--   License List 3.23
Cornell_Lossless_JPEG :: LicenseId

-- | CPAL-1.0, Common Public Attribution License 1.0
CPAL_1_0 :: LicenseId

-- | CPL-1.0, Common Public License 1.0
CPL_1_0 :: LicenseId

-- | CPOL-1.02, Code Project Open License 1.02
CPOL_1_02 :: LicenseId

-- | Cronyx, Cronyx License, SPDX License List 3.23
Cronyx :: LicenseId

-- | Crossword, Crossword License
Crossword :: LicenseId

-- | CrystalStacker, CrystalStacker License
CrystalStacker :: LicenseId

-- | CUA-OPL-1.0, CUA Office Public License v1.0
CUA_OPL_1_0 :: LicenseId

-- | Cube, Cube License
Cube :: LicenseId

-- | curl, curl License
Curl :: LicenseId

-- | D-FSL-1.0, Deutsche Freie Software Lizenz
D_FSL_1_0 :: LicenseId

-- | DEC-3-Clause, DEC 3-Clause License, SPDX License List 3.23
DEC_3_Clause :: LicenseId

-- | diffmark, diffmark license
Diffmark :: LicenseId

-- | DL-DE-BY-2.0, Data licence Germany – attribution – version
--   2.0, SPDX License List 3.16, SPDX License List 3.23
DL_DE_BY_2_0 :: LicenseId

-- | DL-DE-ZERO-2.0, Data licence Germany – zero – version 2.0,
--   SPDX License List 3.23
DL_DE_ZERO_2_0 :: LicenseId

-- | DOC, DOC License
DOC :: LicenseId

-- | Dotseqn, Dotseqn License
Dotseqn :: LicenseId

-- | DRL-1.0, Detection Rule License 1.0, SPDX License List 3.16,
--   SPDX License List 3.23
DRL_1_0 :: LicenseId

-- | DRL-1.1, Detection Rule License 1.1, SPDX License List 3.23
DRL_1_1 :: LicenseId

-- | DSDP, DSDP License
DSDP :: LicenseId

-- | dtoa, David M. Gay dtoa License, SPDX License List 3.23
Dtoa :: LicenseId

-- | dvipdfm, dvipdfm License
Dvipdfm :: LicenseId

-- | ECL-1.0, Educational Community License v1.0
ECL_1_0 :: LicenseId

-- | ECL-2.0, Educational Community License v2.0
ECL_2_0 :: LicenseId

-- | EFL-1.0, Eiffel Forum License v1.0
EFL_1_0 :: LicenseId

-- | EFL-2.0, Eiffel Forum License v2.0
EFL_2_0 :: LicenseId

-- | eGenix, eGenix.com Public License 1.1.0
EGenix :: LicenseId

-- | Elastic-2.0, Elastic License 2.0, SPDX License List 3.16,
--   SPDX License List 3.23
Elastic_2_0 :: LicenseId

-- | Entessa, Entessa Public License v1.0
Entessa :: LicenseId

-- | EPICS, EPICS Open License, SPDX License List 3.10, SPDX
--   License List 3.16, SPDX License List 3.23
EPICS :: LicenseId

-- | EPL-1.0, Eclipse Public License 1.0
EPL_1_0 :: LicenseId

-- | EPL-2.0, Eclipse Public License 2.0
EPL_2_0 :: LicenseId

-- | ErlPL-1.1, Erlang Public License v1.1
ErlPL_1_1 :: LicenseId

-- | etalab-2.0, Etalab Open License 2.0, SPDX License List 3.9,
--   SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.23
Etalab_2_0 :: LicenseId

-- | EUDatagrid, EU DataGrid Software License
EUDatagrid :: LicenseId

-- | EUPL-1.0, European Union Public License 1.0
EUPL_1_0 :: LicenseId

-- | EUPL-1.1, European Union Public License 1.1
EUPL_1_1 :: LicenseId

-- | EUPL-1.2, European Union Public License 1.2
EUPL_1_2 :: LicenseId

-- | Eurosym, Eurosym License
Eurosym :: LicenseId

-- | Fair, Fair License
Fair :: LicenseId

-- | FBM, Fuzzy Bitmap License, SPDX License List 3.23
FBM :: LicenseId

-- | FDK-AAC, Fraunhofer FDK AAC Codec Library, SPDX License List
--   3.16, SPDX License List 3.23
FDK_AAC :: LicenseId

-- | Ferguson-Twofish, Ferguson Twofish License, SPDX License List
--   3.23
Ferguson_Twofish :: LicenseId

-- | Frameworx-1.0, Frameworx Open License 1.0
Frameworx_1_0 :: LicenseId

-- | FreeBSD-DOC, FreeBSD Documentation License, SPDX License List
--   3.16, SPDX License List 3.23
FreeBSD_DOC :: LicenseId

-- | FreeImage, FreeImage Public License v1.0
FreeImage :: LicenseId

-- | FSFAP-no-warranty-disclaimer, FSF All Permissive License
--   (without Warranty), SPDX License List 3.23
FSFAP_no_warranty_disclaimer :: LicenseId

-- | FSFAP, FSF All Permissive License
FSFAP :: LicenseId

-- | FSFULLRWD, FSF Unlimited License (With License Retention and
--   Warranty Disclaimer), SPDX License List 3.23
FSFULLRWD :: LicenseId

-- | FSFULLR, FSF Unlimited License (with License Retention)
FSFULLR :: LicenseId

-- | FSFUL, FSF Unlimited License
FSFUL :: LicenseId

-- | FTL, Freetype Project License
FTL :: LicenseId

-- | Furuseth, Furuseth License, SPDX License List 3.23
Furuseth :: LicenseId

-- | fwlw, fwlw License, SPDX License List 3.23
Fwlw :: LicenseId

-- | GCR-docs, Gnome GCR Documentation License, SPDX License List
--   3.23
GCR_docs :: LicenseId

-- | GD, GD License, SPDX License List 3.16, SPDX License List
--   3.23
GD :: LicenseId

-- | GFDL-1.1-invariants-only, GNU Free Documentation License v1.1
--   only - invariants, SPDX License List 3.10, SPDX License List 3.16,
--   SPDX License List 3.23
GFDL_1_1_invariants_only :: LicenseId

-- | GFDL-1.1-invariants-or-later, GNU Free Documentation License
--   v1.1 or later - invariants, SPDX License List 3.10, SPDX License List
--   3.16, SPDX License List 3.23
GFDL_1_1_invariants_or_later :: LicenseId

-- | GFDL-1.1-no-invariants-only, GNU Free Documentation License
--   v1.1 only - no invariants, SPDX License List 3.10, SPDX License List
--   3.16, SPDX License List 3.23
GFDL_1_1_no_invariants_only :: LicenseId

-- | GFDL-1.1-no-invariants-or-later, GNU Free Documentation
--   License v1.1 or later - no invariants, SPDX License List 3.10, SPDX
--   License List 3.16, SPDX License List 3.23
GFDL_1_1_no_invariants_or_later :: LicenseId

-- | GFDL-1.1-only, GNU Free Documentation License v1.1 only
GFDL_1_1_only :: LicenseId

-- | GFDL-1.1-or-later, GNU Free Documentation License v1.1 or
--   later
GFDL_1_1_or_later :: LicenseId

-- | GFDL-1.2-invariants-only, GNU Free Documentation License v1.2
--   only - invariants, SPDX License List 3.10, SPDX License List 3.16,
--   SPDX License List 3.23
GFDL_1_2_invariants_only :: LicenseId

-- | GFDL-1.2-invariants-or-later, GNU Free Documentation License
--   v1.2 or later - invariants, SPDX License List 3.10, SPDX License List
--   3.16, SPDX License List 3.23
GFDL_1_2_invariants_or_later :: LicenseId

-- | GFDL-1.2-no-invariants-only, GNU Free Documentation License
--   v1.2 only - no invariants, SPDX License List 3.10, SPDX License List
--   3.16, SPDX License List 3.23
GFDL_1_2_no_invariants_only :: LicenseId

-- | GFDL-1.2-no-invariants-or-later, GNU Free Documentation
--   License v1.2 or later - no invariants, SPDX License List 3.10, SPDX
--   License List 3.16, SPDX License List 3.23
GFDL_1_2_no_invariants_or_later :: LicenseId

-- | GFDL-1.2-only, GNU Free Documentation License v1.2 only
GFDL_1_2_only :: LicenseId

-- | GFDL-1.2-or-later, GNU Free Documentation License v1.2 or
--   later
GFDL_1_2_or_later :: LicenseId

-- | GFDL-1.3-invariants-only, GNU Free Documentation License v1.3
--   only - invariants, SPDX License List 3.10, SPDX License List 3.16,
--   SPDX License List 3.23
GFDL_1_3_invariants_only :: LicenseId

-- | GFDL-1.3-invariants-or-later, GNU Free Documentation License
--   v1.3 or later - invariants, SPDX License List 3.10, SPDX License List
--   3.16, SPDX License List 3.23
GFDL_1_3_invariants_or_later :: LicenseId

-- | GFDL-1.3-no-invariants-only, GNU Free Documentation License
--   v1.3 only - no invariants, SPDX License List 3.10, SPDX License List
--   3.16, SPDX License List 3.23
GFDL_1_3_no_invariants_only :: LicenseId

-- | GFDL-1.3-no-invariants-or-later, GNU Free Documentation
--   License v1.3 or later - no invariants, SPDX License List 3.10, SPDX
--   License List 3.16, SPDX License List 3.23
GFDL_1_3_no_invariants_or_later :: LicenseId

-- | GFDL-1.3-only, GNU Free Documentation License v1.3 only
GFDL_1_3_only :: LicenseId

-- | GFDL-1.3-or-later, GNU Free Documentation License v1.3 or
--   later
GFDL_1_3_or_later :: LicenseId

-- | Giftware, Giftware License
Giftware :: LicenseId

-- | GL2PS, GL2PS License
GL2PS :: LicenseId

-- | Glide, 3dfx Glide License
Glide :: LicenseId

-- | Glulxe, Glulxe License
Glulxe :: LicenseId

-- | GLWTPL, Good Luck With That Public License, SPDX License List
--   3.10, SPDX License List 3.16, SPDX License List 3.23
GLWTPL :: LicenseId

-- | gnuplot, gnuplot License
Gnuplot :: LicenseId

-- | GPL-1.0-only, GNU General Public License v1.0 only
GPL_1_0_only :: LicenseId

-- | GPL-1.0-or-later, GNU General Public License v1.0 or later
GPL_1_0_or_later :: LicenseId

-- | GPL-2.0-only, GNU General Public License v2.0 only
GPL_2_0_only :: LicenseId

-- | GPL-2.0-or-later, GNU General Public License v2.0 or later
GPL_2_0_or_later :: LicenseId

-- | GPL-3.0-only, GNU General Public License v3.0 only
GPL_3_0_only :: LicenseId

-- | GPL-3.0-or-later, GNU General Public License v3.0 or later
GPL_3_0_or_later :: LicenseId

-- | Graphics-Gems, Graphics Gems License, SPDX License List 3.23
Graphics_Gems :: LicenseId

-- | gSOAP-1.3b, gSOAP Public License v1.3b
GSOAP_1_3b :: LicenseId

-- | gtkbook, gtkbook License, SPDX License List 3.23
Gtkbook :: LicenseId

-- | HaskellReport, Haskell Language Report License
HaskellReport :: LicenseId

-- | hdparm, hdparm License, SPDX License List 3.23
Hdparm :: LicenseId

-- | Hippocratic-2.1, Hippocratic License 2.1, SPDX License List
--   3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List
--   3.23
Hippocratic_2_1 :: LicenseId

-- | HP-1986, Hewlett-Packard 1986 License, SPDX License List 3.23
HP_1986 :: LicenseId

-- | HP-1989, Hewlett-Packard 1989 License, SPDX License List 3.23
HP_1989 :: LicenseId

-- | HPND-DEC, Historical Permission Notice and Disclaimer - DEC
--   variant, SPDX License List 3.23
HPND_DEC :: LicenseId

-- | HPND-doc-sell, Historical Permission Notice and Disclaimer -
--   documentation sell variant, SPDX License List 3.23
HPND_doc_sell :: LicenseId

-- | HPND-doc, Historical Permission Notice and Disclaimer -
--   documentation variant, SPDX License List 3.23
HPND_doc :: LicenseId

-- | HPND-export-US-modify, HPND with US Government export control
--   warning and modification rqmt, SPDX License List 3.23
HPND_export_US_modify :: LicenseId

-- | HPND-export-US, HPND with US Government export control
--   warning, SPDX License List 3.23
HPND_export_US :: LicenseId

-- | HPND-Fenneberg-Livingston, Historical Permission Notice and
--   Disclaimer - Fenneberg-Livingston variant, SPDX License List 3.23
HPND_Fenneberg_Livingston :: LicenseId

-- | HPND-INRIA-IMAG, Historical Permission Notice and Disclaimer
--   - INRIA-IMAG variant, SPDX License List 3.23
HPND_INRIA_IMAG :: LicenseId

-- | HPND-Kevlin-Henney, Historical Permission Notice and
--   Disclaimer - Kevlin Henney variant, SPDX License List 3.23
HPND_Kevlin_Henney :: LicenseId

-- | HPND-Markus-Kuhn, Historical Permission Notice and Disclaimer
--   - Markus Kuhn variant, SPDX License List 3.23
HPND_Markus_Kuhn :: LicenseId

-- | HPND-MIT-disclaimer, Historical Permission Notice and
--   Disclaimer with MIT disclaimer, SPDX License List 3.23
HPND_MIT_disclaimer :: LicenseId

-- | HPND-Pbmplus, Historical Permission Notice and Disclaimer -
--   Pbmplus variant, SPDX License List 3.23
HPND_Pbmplus :: LicenseId

-- | HPND-sell-MIT-disclaimer-xserver, Historical Permission
--   Notice and Disclaimer - sell xserver variant with MIT disclaimer, SPDX
--   License List 3.23
HPND_sell_MIT_disclaimer_xserver :: LicenseId

-- | HPND-sell-regexpr, Historical Permission Notice and
--   Disclaimer - sell regexpr variant, SPDX License List 3.23
HPND_sell_regexpr :: LicenseId

-- | HPND-sell-variant-MIT-disclaimer, HPND sell variant with MIT
--   disclaimer, SPDX License List 3.23
HPND_sell_variant_MIT_disclaimer :: LicenseId

-- | HPND-sell-variant, Historical Permission Notice and
--   Disclaimer - sell variant, SPDX License List 3.6, SPDX License List
--   3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List
--   3.23
HPND_sell_variant :: LicenseId

-- | HPND-UC, Historical Permission Notice and Disclaimer -
--   University of California variant, SPDX License List 3.23
HPND_UC :: LicenseId

-- | HPND, Historical Permission Notice and Disclaimer
HPND :: LicenseId

-- | HTMLTIDY, HTML Tidy License, SPDX License List 3.16, SPDX
--   License List 3.23
HTMLTIDY :: LicenseId

-- | IBM-pibs, IBM PowerPC Initialization and Boot Software
IBM_pibs :: LicenseId

-- | ICU, ICU License
ICU :: LicenseId

-- | IEC-Code-Components-EULA, IEC Code Components End-user
--   licence agreement, SPDX License List 3.23
IEC_Code_Components_EULA :: LicenseId

-- | IJG-short, Independent JPEG Group License - short, SPDX
--   License List 3.23
IJG_short :: LicenseId

-- | IJG, Independent JPEG Group License
IJG :: LicenseId

-- | ImageMagick, ImageMagick License
ImageMagick :: LicenseId

-- | iMatix, iMatix Standard Function Library Agreement
IMatix :: LicenseId

-- | Imlib2, Imlib2 License
Imlib2 :: LicenseId

-- | Info-ZIP, Info-ZIP License
Info_ZIP :: LicenseId

-- | Inner-Net-2.0, Inner Net License v2.0, SPDX License List 3.23
Inner_Net_2_0 :: LicenseId

-- | Intel-ACPI, Intel ACPI Software License Agreement
Intel_ACPI :: LicenseId

-- | Intel, Intel Open Source License
Intel :: LicenseId

-- | Interbase-1.0, Interbase Public License v1.0
Interbase_1_0 :: LicenseId

-- | IPA, IPA Font License
IPA :: LicenseId

-- | IPL-1.0, IBM Public License v1.0
IPL_1_0 :: LicenseId

-- | ISC-Veillard, ISC Veillard variant, SPDX License List 3.23
ISC_Veillard :: LicenseId

-- | ISC, ISC License
ISC :: LicenseId

-- | Jam, Jam License, SPDX License List 3.16, SPDX License List
--   3.23
Jam :: LicenseId

-- | JasPer-2.0, JasPer License
JasPer_2_0 :: LicenseId

-- | JPL-image, JPL Image Use Policy, SPDX License List 3.23
JPL_image :: LicenseId

-- | JPNIC, Japan Network Information Center License, SPDX License
--   List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License
--   List 3.16, SPDX License List 3.23
JPNIC :: LicenseId

-- | JSON, JSON License
JSON :: LicenseId

-- | Kastrup, Kastrup License, SPDX License List 3.23
Kastrup :: LicenseId

-- | Kazlib, Kazlib License, SPDX License List 3.23
Kazlib :: LicenseId

-- | Knuth-CTAN, Knuth CTAN License, SPDX License List 3.23
Knuth_CTAN :: LicenseId

-- | LAL-1.2, Licence Art Libre 1.2
LAL_1_2 :: LicenseId

-- | LAL-1.3, Licence Art Libre 1.3
LAL_1_3 :: LicenseId

-- | Latex2e-translated-notice, Latex2e with translated notice
--   permission, SPDX License List 3.23
Latex2e_translated_notice :: LicenseId

-- | Latex2e, Latex2e License
Latex2e :: LicenseId

-- | Leptonica, Leptonica License
Leptonica :: LicenseId

-- | LGPL-2.0-only, GNU Library General Public License v2 only
LGPL_2_0_only :: LicenseId

-- | LGPL-2.0-or-later, GNU Library General Public License v2 or
--   later
LGPL_2_0_or_later :: LicenseId

-- | LGPL-2.1-only, GNU Lesser General Public License v2.1 only
LGPL_2_1_only :: LicenseId

-- | LGPL-2.1-or-later, GNU Lesser General Public License v2.1 or
--   later
LGPL_2_1_or_later :: LicenseId

-- | LGPL-3.0-only, GNU Lesser General Public License v3.0 only
LGPL_3_0_only :: LicenseId

-- | LGPL-3.0-or-later, GNU Lesser General Public License v3.0 or
--   later
LGPL_3_0_or_later :: LicenseId

-- | LGPLLR, Lesser General Public License For Linguistic
--   Resources
LGPLLR :: LicenseId

-- | libpng-2.0, PNG Reference Library version 2, SPDX License
--   List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License
--   List 3.16, SPDX License List 3.23
Libpng_2_0 :: LicenseId

-- | Libpng, libpng License
Libpng :: LicenseId

-- | libselinux-1.0, libselinux public domain notice, SPDX License
--   List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License
--   List 3.23
Libselinux_1_0 :: LicenseId

-- | libtiff, libtiff License
Libtiff :: LicenseId

-- | libutil-David-Nugent, libutil David Nugent License, SPDX
--   License List 3.23
Libutil_David_Nugent :: LicenseId

-- | LiLiQ-P-1.1, Licence Libre du Québec – Permissive version 1.1
LiLiQ_P_1_1 :: LicenseId

-- | LiLiQ-R-1.1, Licence Libre du Québec – Réciprocité version
--   1.1
LiLiQ_R_1_1 :: LicenseId

-- | LiLiQ-Rplus-1.1, Licence Libre du Québec – Réciprocité forte
--   version 1.1
LiLiQ_Rplus_1_1 :: LicenseId

-- | Linux-man-pages-1-para, Linux man-pages - 1 paragraph, SPDX
--   License List 3.23
Linux_man_pages_1_para :: LicenseId

-- | Linux-man-pages-copyleft-2-para, Linux man-pages Copyleft - 2
--   paragraphs, SPDX License List 3.23
Linux_man_pages_copyleft_2_para :: LicenseId

-- | Linux-man-pages-copyleft-var, Linux man-pages Copyleft
--   Variant, SPDX License List 3.23
Linux_man_pages_copyleft_var :: LicenseId

-- | Linux-man-pages-copyleft, Linux man-pages Copyleft, SPDX
--   License List 3.16, SPDX License List 3.23
Linux_man_pages_copyleft :: LicenseId

-- | Linux-OpenIB, Linux Kernel Variant of OpenIB.org license,
--   SPDX License List 3.2, SPDX License List 3.6, SPDX License List 3.9,
--   SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.23
Linux_OpenIB :: LicenseId

-- | LOOP, Common Lisp LOOP License, SPDX License List 3.23
LOOP :: LicenseId

-- | LPD-document, LPD Documentation License, SPDX License List
--   3.23
LPD_document :: LicenseId

-- | LPL-1.02, Lucent Public License v1.02
LPL_1_02 :: LicenseId

-- | LPL-1.0, Lucent Public License Version 1.0
LPL_1_0 :: LicenseId

-- | LPPL-1.0, LaTeX Project Public License v1.0
LPPL_1_0 :: LicenseId

-- | LPPL-1.1, LaTeX Project Public License v1.1
LPPL_1_1 :: LicenseId

-- | LPPL-1.2, LaTeX Project Public License v1.2
LPPL_1_2 :: LicenseId

-- | LPPL-1.3a, LaTeX Project Public License v1.3a
LPPL_1_3a :: LicenseId

-- | LPPL-1.3c, LaTeX Project Public License v1.3c
LPPL_1_3c :: LicenseId

-- | lsof, lsof License, SPDX License List 3.23
Lsof :: LicenseId

-- | Lucida-Bitmap-Fonts, Lucida Bitmap Fonts License, SPDX
--   License List 3.23
Lucida_Bitmap_Fonts :: LicenseId

-- | LZMA-SDK-9.11-to-9.20, LZMA SDK License (versions 9.11 to
--   9.20), SPDX License List 3.23
LZMA_SDK_9_11_to_9_20 :: LicenseId

-- | LZMA-SDK-9.22, LZMA SDK License (versions 9.22 and beyond),
--   SPDX License List 3.23
LZMA_SDK_9_22 :: LicenseId

-- | Mackerras-3-Clause-acknowledgment, Mackerras 3-Clause -
--   acknowledgment variant, SPDX License List 3.23
Mackerras_3_Clause_acknowledgment :: LicenseId

-- | Mackerras-3-Clause, Mackerras 3-Clause License, SPDX License
--   List 3.23
Mackerras_3_Clause :: LicenseId

-- | magaz, magaz License, SPDX License List 3.23
Magaz :: LicenseId

-- | mailprio, mailprio License, SPDX License List 3.23
Mailprio :: LicenseId

-- | MakeIndex, MakeIndex License
MakeIndex :: LicenseId

-- | Martin-Birgmeier, Martin Birgmeier License, SPDX License List
--   3.23
Martin_Birgmeier :: LicenseId

-- | McPhee-slideshow, McPhee Slideshow License, SPDX License List
--   3.23
McPhee_slideshow :: LicenseId

-- | metamail, metamail License, SPDX License List 3.23
Metamail :: LicenseId

-- | Minpack, Minpack License, SPDX License List 3.23
Minpack :: LicenseId

-- | MirOS, The MirOS Licence
MirOS :: LicenseId

-- | MIT-0, MIT No Attribution, SPDX License List 3.2, SPDX
--   License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX
--   License List 3.16, SPDX License List 3.23
MIT_0 :: LicenseId

-- | MIT-advertising, Enlightenment License (e16)
MIT_advertising :: LicenseId

-- | MIT-CMU, CMU License
MIT_CMU :: LicenseId

-- | MIT-enna, enna License
MIT_enna :: LicenseId

-- | MIT-feh, feh License
MIT_feh :: LicenseId

-- | MIT-Festival, MIT Festival Variant, SPDX License List 3.23
MIT_Festival :: LicenseId

-- | MIT-Modern-Variant, MIT License Modern Variant, SPDX License
--   List 3.16, SPDX License List 3.23
MIT_Modern_Variant :: LicenseId

-- | MIT-open-group, MIT Open Group variant, SPDX License List
--   3.16, SPDX License List 3.23
MIT_open_group :: LicenseId

-- | MIT-testregex, MIT testregex Variant, SPDX License List 3.23
MIT_testregex :: LicenseId

-- | MIT-Wu, MIT Tom Wu Variant, SPDX License List 3.23
MIT_Wu :: LicenseId

-- | MITNFA, MIT +no-false-attribs license
MITNFA :: LicenseId

-- | MIT, MIT License
MIT :: LicenseId

-- | MMIXware, MMIXware License, SPDX License List 3.23
MMIXware :: LicenseId

-- | Motosoto, Motosoto License
Motosoto :: LicenseId

-- | MPEG-SSG, MPEG Software Simulation, SPDX License List 3.23
MPEG_SSG :: LicenseId

-- | mpi-permissive, mpi Permissive License, SPDX License List
--   3.23
Mpi_permissive :: LicenseId

-- | mpich2, mpich2 License
Mpich2 :: LicenseId

-- | MPL-1.0, Mozilla Public License 1.0
MPL_1_0 :: LicenseId

-- | MPL-1.1, Mozilla Public License 1.1
MPL_1_1 :: LicenseId

-- | MPL-2.0-no-copyleft-exception, Mozilla Public License 2.0 (no
--   copyleft exception)
MPL_2_0_no_copyleft_exception :: LicenseId

-- | MPL-2.0, Mozilla Public License 2.0
MPL_2_0 :: LicenseId

-- | mplus, mplus Font License, SPDX License List 3.23
Mplus :: LicenseId

-- | MS-LPL, Microsoft Limited Public License, SPDX License List
--   3.23
MS_LPL :: LicenseId

-- | MS-PL, Microsoft Public License
MS_PL :: LicenseId

-- | MS-RL, Microsoft Reciprocal License
MS_RL :: LicenseId

-- | MTLL, Matrix Template Library License
MTLL :: LicenseId

-- | MulanPSL-1.0, Mulan Permissive Software License, Version 1,
--   SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16,
--   SPDX License List 3.23
MulanPSL_1_0 :: LicenseId

-- | MulanPSL-2.0, Mulan Permissive Software License, Version 2,
--   SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16,
--   SPDX License List 3.23
MulanPSL_2_0 :: LicenseId

-- | Multics, Multics License
Multics :: LicenseId

-- | Mup, Mup License
Mup :: LicenseId

-- | NAIST-2003, Nara Institute of Science and Technology License
--   (2003), SPDX License List 3.16, SPDX License List 3.23
NAIST_2003 :: LicenseId

-- | NASA-1.3, NASA Open Source Agreement 1.3
NASA_1_3 :: LicenseId

-- | Naumen, Naumen Public License
Naumen :: LicenseId

-- | NBPL-1.0, Net Boolean Public License v1
NBPL_1_0 :: LicenseId

-- | NCGL-UK-2.0, Non-Commercial Government Licence, SPDX License
--   List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License
--   List 3.23
NCGL_UK_2_0 :: LicenseId

-- | NCSA, University of Illinois/NCSA Open Source License
NCSA :: LicenseId

-- | Net-SNMP, Net-SNMP License
Net_SNMP :: LicenseId

-- | NetCDF, NetCDF license
NetCDF :: LicenseId

-- | Newsletr, Newsletr License
Newsletr :: LicenseId

-- | NGPL, Nethack General Public License
NGPL :: LicenseId

-- | NICTA-1.0, NICTA Public Software License, Version 1.0, SPDX
--   License List 3.23
NICTA_1_0 :: LicenseId

-- | NIST-PD-fallback, NIST Public Domain Notice with license
--   fallback, SPDX License List 3.10, SPDX License List 3.16, SPDX License
--   List 3.23
NIST_PD_fallback :: LicenseId

-- | NIST-PD, NIST Public Domain Notice, SPDX License List 3.10,
--   SPDX License List 3.16, SPDX License List 3.23
NIST_PD :: LicenseId

-- | NIST-Software, NIST Software License, SPDX License List 3.23
NIST_Software :: LicenseId

-- | NLOD-1.0, Norwegian Licence for Open Government Data (NLOD)
--   1.0
NLOD_1_0 :: LicenseId

-- | NLOD-2.0, Norwegian Licence for Open Government Data (NLOD)
--   2.0, SPDX License List 3.16, SPDX License List 3.23
NLOD_2_0 :: LicenseId

-- | NLPL, No Limit Public License
NLPL :: LicenseId

-- | Nokia, Nokia Open Source License
Nokia :: LicenseId

-- | NOSL, Netizen Open Source License
NOSL :: LicenseId

-- | Noweb, Noweb License
Noweb :: LicenseId

-- | NPL-1.0, Netscape Public License v1.0
NPL_1_0 :: LicenseId

-- | NPL-1.1, Netscape Public License v1.1
NPL_1_1 :: LicenseId

-- | NPOSL-3.0, Non-Profit Open Software License 3.0
NPOSL_3_0 :: LicenseId

-- | NRL, NRL License
NRL :: LicenseId

-- | NTP-0, NTP No Attribution, SPDX License List 3.9, SPDX
--   License List 3.10, SPDX License List 3.16, SPDX License List 3.23
NTP_0 :: LicenseId

-- | NTP, NTP License
NTP :: LicenseId

-- | O-UDA-1.0, Open Use of Data Agreement v1.0, SPDX License List
--   3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List
--   3.23
O_UDA_1_0 :: LicenseId

-- | OCCT-PL, Open CASCADE Technology Public License
OCCT_PL :: LicenseId

-- | OCLC-2.0, OCLC Research Public License 2.0
OCLC_2_0 :: LicenseId

-- | ODbL-1.0, Open Data Commons Open Database License v1.0
ODbL_1_0 :: LicenseId

-- | ODC-By-1.0, Open Data Commons Attribution License v1.0, SPDX
--   License List 3.2, SPDX License List 3.6, SPDX License List 3.9, SPDX
--   License List 3.10, SPDX License List 3.16, SPDX License List 3.23
ODC_By_1_0 :: LicenseId

-- | OFFIS, OFFIS License, SPDX License List 3.23
OFFIS :: LicenseId

-- | OFL-1.0-no-RFN, SIL Open Font License 1.0 with no Reserved
--   Font Name, SPDX License List 3.9, SPDX License List 3.10, SPDX License
--   List 3.16, SPDX License List 3.23
OFL_1_0_no_RFN :: LicenseId

-- | OFL-1.0-RFN, SIL Open Font License 1.0 with Reserved Font
--   Name, SPDX License List 3.9, SPDX License List 3.10, SPDX License List
--   3.16, SPDX License List 3.23
OFL_1_0_RFN :: LicenseId

-- | OFL-1.0, SIL Open Font License 1.0
OFL_1_0 :: LicenseId

-- | OFL-1.1-no-RFN, SIL Open Font License 1.1 with no Reserved
--   Font Name, SPDX License List 3.9, SPDX License List 3.10, SPDX License
--   List 3.16, SPDX License List 3.23
OFL_1_1_no_RFN :: LicenseId

-- | OFL-1.1-RFN, SIL Open Font License 1.1 with Reserved Font
--   Name, SPDX License List 3.9, SPDX License List 3.10, SPDX License List
--   3.16, SPDX License List 3.23
OFL_1_1_RFN :: LicenseId

-- | OFL-1.1, SIL Open Font License 1.1
OFL_1_1 :: LicenseId

-- | OGC-1.0, OGC Software License, Version 1.0, SPDX License List
--   3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List
--   3.23
OGC_1_0 :: LicenseId

-- | OGDL-Taiwan-1.0, Taiwan Open Government Data License, version
--   1.0, SPDX License List 3.16, SPDX License List 3.23
OGDL_Taiwan_1_0 :: LicenseId

-- | OGL-Canada-2.0, Open Government Licence - Canada, SPDX
--   License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX
--   License List 3.23
OGL_Canada_2_0 :: LicenseId

-- | OGL-UK-1.0, Open Government Licence v1.0, SPDX License List
--   3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List
--   3.16, SPDX License List 3.23
OGL_UK_1_0 :: LicenseId

-- | OGL-UK-2.0, Open Government Licence v2.0, SPDX License List
--   3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List
--   3.16, SPDX License List 3.23
OGL_UK_2_0 :: LicenseId

-- | OGL-UK-3.0, Open Government Licence v3.0, SPDX License List
--   3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List
--   3.16, SPDX License List 3.23
OGL_UK_3_0 :: LicenseId

-- | OGTSL, Open Group Test Suite License
OGTSL :: LicenseId

-- | OLDAP-1.1, Open LDAP Public License v1.1
OLDAP_1_1 :: LicenseId

-- | OLDAP-1.2, Open LDAP Public License v1.2
OLDAP_1_2 :: LicenseId

-- | OLDAP-1.3, Open LDAP Public License v1.3
OLDAP_1_3 :: LicenseId

-- | OLDAP-1.4, Open LDAP Public License v1.4
OLDAP_1_4 :: LicenseId

-- | OLDAP-2.0.1, Open LDAP Public License v2.0.1
OLDAP_2_0_1 :: LicenseId

-- | OLDAP-2.0, Open LDAP Public License v2.0 (or possibly 2.0A
--   and 2.0B)
OLDAP_2_0 :: LicenseId

-- | OLDAP-2.1, Open LDAP Public License v2.1
OLDAP_2_1 :: LicenseId

-- | OLDAP-2.2.1, Open LDAP Public License v2.2.1
OLDAP_2_2_1 :: LicenseId

-- | OLDAP-2.2.2, Open LDAP Public License 2.2.2
OLDAP_2_2_2 :: LicenseId

-- | OLDAP-2.2, Open LDAP Public License v2.2
OLDAP_2_2 :: LicenseId

-- | OLDAP-2.3, Open LDAP Public License v2.3
OLDAP_2_3 :: LicenseId

-- | OLDAP-2.4, Open LDAP Public License v2.4
OLDAP_2_4 :: LicenseId

-- | OLDAP-2.5, Open LDAP Public License v2.5
OLDAP_2_5 :: LicenseId

-- | OLDAP-2.6, Open LDAP Public License v2.6
OLDAP_2_6 :: LicenseId

-- | OLDAP-2.7, Open LDAP Public License v2.7
OLDAP_2_7 :: LicenseId

-- | OLDAP-2.8, Open LDAP Public License v2.8
OLDAP_2_8 :: LicenseId

-- | OLFL-1.3, Open Logistics Foundation License Version 1.3, SPDX
--   License List 3.23
OLFL_1_3 :: LicenseId

-- | OML, Open Market License
OML :: LicenseId

-- | OpenPBS-2.3, OpenPBS v2.3 Software License, SPDX License List
--   3.23
OpenPBS_2_3 :: LicenseId

-- | OpenSSL-standalone, OpenSSL License - standalone, SPDX
--   License List 3.23
OpenSSL_standalone :: LicenseId

-- | OpenSSL, OpenSSL License
OpenSSL :: LicenseId

-- | OpenVision, OpenVision License, SPDX License List 3.23
OpenVision :: LicenseId

-- | OPL-1.0, Open Public License v1.0
OPL_1_0 :: LicenseId

-- | OPL-UK-3.0, United Kingdom Open Parliament Licence v3.0, SPDX
--   License List 3.23
OPL_UK_3_0 :: LicenseId

-- | OPUBL-1.0, Open Publication License v1.0, SPDX License List
--   3.16, SPDX License List 3.23
OPUBL_1_0 :: LicenseId

-- | OSET-PL-2.1, OSET Public License version 2.1
OSET_PL_2_1 :: LicenseId

-- | OSL-1.0, Open Software License 1.0
OSL_1_0 :: LicenseId

-- | OSL-1.1, Open Software License 1.1
OSL_1_1 :: LicenseId

-- | OSL-2.0, Open Software License 2.0
OSL_2_0 :: LicenseId

-- | OSL-2.1, Open Software License 2.1
OSL_2_1 :: LicenseId

-- | OSL-3.0, Open Software License 3.0
OSL_3_0 :: LicenseId

-- | PADL, PADL License, SPDX License List 3.23
PADL :: LicenseId

-- | Parity-6.0.0, The Parity Public License 6.0.0, SPDX License
--   List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License
--   List 3.16, SPDX License List 3.23
Parity_6_0_0 :: LicenseId

-- | Parity-7.0.0, The Parity Public License 7.0.0, SPDX License
--   List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License
--   List 3.23
Parity_7_0_0 :: LicenseId

-- | PDDL-1.0, Open Data Commons Public Domain Dedication &
--   License 1.0
PDDL_1_0 :: LicenseId

-- | PHP-3.01, PHP License v3.01
PHP_3_01 :: LicenseId

-- | PHP-3.0, PHP License v3.0
PHP_3_0 :: LicenseId

-- | Pixar, Pixar License, SPDX License List 3.23
Pixar :: LicenseId

-- | Plexus, Plexus Classworlds License
Plexus :: LicenseId

-- | pnmstitch, pnmstitch License, SPDX License List 3.23
Pnmstitch :: LicenseId

-- | PolyForm-Noncommercial-1.0.0, PolyForm Noncommercial License
--   1.0.0, SPDX License List 3.9, SPDX License List 3.10, SPDX License
--   List 3.16, SPDX License List 3.23
PolyForm_Noncommercial_1_0_0 :: LicenseId

-- | PolyForm-Small-Business-1.0.0, PolyForm Small Business
--   License 1.0.0, SPDX License List 3.9, SPDX License List 3.10, SPDX
--   License List 3.16, SPDX License List 3.23
PolyForm_Small_Business_1_0_0 :: LicenseId

-- | PostgreSQL, PostgreSQL License
PostgreSQL :: LicenseId

-- | PSF-2.0, Python Software Foundation License 2.0, SPDX License
--   List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License
--   List 3.23
PSF_2_0 :: LicenseId

-- | psfrag, psfrag License
Psfrag :: LicenseId

-- | psutils, psutils License
Psutils :: LicenseId

-- | Python-2.0.1, Python License 2.0.1, SPDX License List 3.23
Python_2_0_1 :: LicenseId

-- | Python-2.0, Python License 2.0
Python_2_0 :: LicenseId

-- | python-ldap, Python ldap License, SPDX License List 3.23
Python_ldap :: LicenseId

-- | Qhull, Qhull License
Qhull :: LicenseId

-- | QPL-1.0-INRIA-2004, Q Public License 1.0 - INRIA 2004
--   variant, SPDX License List 3.23
QPL_1_0_INRIA_2004 :: LicenseId

-- | QPL-1.0, Q Public License 1.0
QPL_1_0 :: LicenseId

-- | radvd, radvd License, SPDX License List 3.23
Radvd :: LicenseId

-- | Rdisc, Rdisc License
Rdisc :: LicenseId

-- | RHeCos-1.1, Red Hat eCos Public License v1.1
RHeCos_1_1 :: LicenseId

-- | RPL-1.1, Reciprocal Public License 1.1
RPL_1_1 :: LicenseId

-- | RPL-1.5, Reciprocal Public License 1.5
RPL_1_5 :: LicenseId

-- | RPSL-1.0, RealNetworks Public Source License v1.0
RPSL_1_0 :: LicenseId

-- | RSA-MD, RSA Message-Digest License
RSA_MD :: LicenseId

-- | RSCPL, Ricoh Source Code Public License
RSCPL :: LicenseId

-- | Ruby, Ruby License
Ruby :: LicenseId

-- | SAX-PD-2.0, Sax Public Domain Notice 2.0, SPDX License List
--   3.23
SAX_PD_2_0 :: LicenseId

-- | SAX-PD, Sax Public Domain Notice
SAX_PD :: LicenseId

-- | Saxpath, Saxpath License
Saxpath :: LicenseId

-- | SCEA, SCEA Shared Source License
SCEA :: LicenseId

-- | SchemeReport, Scheme Language Report License, SPDX License
--   List 3.16, SPDX License List 3.23
SchemeReport :: LicenseId

-- | Sendmail-8.23, Sendmail License 8.23, SPDX License List 3.6,
--   SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16,
--   SPDX License List 3.23
Sendmail_8_23 :: LicenseId

-- | Sendmail, Sendmail License
Sendmail :: LicenseId

-- | SGI-B-1.0, SGI Free Software License B v1.0
SGI_B_1_0 :: LicenseId

-- | SGI-B-1.1, SGI Free Software License B v1.1
SGI_B_1_1 :: LicenseId

-- | SGI-B-2.0, SGI Free Software License B v2.0
SGI_B_2_0 :: LicenseId

-- | SGI-OpenGL, SGI OpenGL License, SPDX License List 3.23
SGI_OpenGL :: LicenseId

-- | SGP4, SGP4 Permission Notice, SPDX License List 3.23
SGP4 :: LicenseId

-- | SHL-0.51, Solderpad Hardware License, Version 0.51, SPDX
--   License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX
--   License List 3.16, SPDX License List 3.23
SHL_0_51 :: LicenseId

-- | SHL-0.5, Solderpad Hardware License v0.5, SPDX License List
--   3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List
--   3.16, SPDX License List 3.23
SHL_0_5 :: LicenseId

-- | SimPL-2.0, Simple Public License 2.0
SimPL_2_0 :: LicenseId

-- | SISSL-1.2, Sun Industry Standards Source License v1.2
SISSL_1_2 :: LicenseId

-- | SISSL, Sun Industry Standards Source License v1.1
SISSL :: LicenseId

-- | Sleepycat, Sleepycat License
Sleepycat :: LicenseId

-- | SL, SL License, SPDX License List 3.23
SL :: LicenseId

-- | SMLNJ, Standard ML of New Jersey License
SMLNJ :: LicenseId

-- | SMPPL, Secure Messaging Protocol Public License
SMPPL :: LicenseId

-- | SNIA, SNIA Public License 1.1
SNIA :: LicenseId

-- | snprintf, snprintf License, SPDX License List 3.23
Snprintf :: LicenseId

-- | softSurfer, softSurfer License, SPDX License List 3.23
SoftSurfer :: LicenseId

-- | Soundex, Soundex License, SPDX License List 3.23
Soundex :: LicenseId

-- | Spencer-86, Spencer License 86
Spencer_86 :: LicenseId

-- | Spencer-94, Spencer License 94
Spencer_94 :: LicenseId

-- | Spencer-99, Spencer License 99
Spencer_99 :: LicenseId

-- | SPL-1.0, Sun Public License v1.0
SPL_1_0 :: LicenseId

-- | ssh-keyscan, ssh-keyscan License, SPDX License List 3.23
Ssh_keyscan :: LicenseId

-- | SSH-OpenSSH, SSH OpenSSH license, SPDX License List 3.9, SPDX
--   License List 3.10, SPDX License List 3.16, SPDX License List 3.23
SSH_OpenSSH :: LicenseId

-- | SSH-short, SSH short notice, SPDX License List 3.9, SPDX
--   License List 3.10, SPDX License List 3.16, SPDX License List 3.23
SSH_short :: LicenseId

-- | SSLeay-standalone, SSLeay License - standalone, SPDX License
--   List 3.23
SSLeay_standalone :: LicenseId

-- | SSPL-1.0, Server Side Public License, v 1, SPDX License List
--   3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List
--   3.16, SPDX License List 3.23
SSPL_1_0 :: LicenseId

-- | SugarCRM-1.1.3, SugarCRM Public License v1.1.3
SugarCRM_1_1_3 :: LicenseId

-- | Sun-PPP, Sun PPP License, SPDX License List 3.23
Sun_PPP :: LicenseId

-- | SunPro, SunPro License, SPDX License List 3.23
SunPro :: LicenseId

-- | SWL, Scheme Widget Library (SWL) Software License Agreement
SWL :: LicenseId

-- | swrule, swrule License, SPDX License List 3.23
Swrule :: LicenseId

-- | Symlinks, Symlinks License, SPDX License List 3.23
Symlinks :: LicenseId

-- | TAPR-OHL-1.0, TAPR Open Hardware License v1.0, SPDX License
--   List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License
--   List 3.16, SPDX License List 3.23
TAPR_OHL_1_0 :: LicenseId

-- | TCL, TCL/TK License
TCL :: LicenseId

-- | TCP-wrappers, TCP Wrappers License
TCP_wrappers :: LicenseId

-- | TermReadKey, TermReadKey License, SPDX License List 3.23
TermReadKey :: LicenseId

-- | TGPPL-1.0, Transitive Grace Period Public Licence 1.0, SPDX
--   License List 3.23
TGPPL_1_0 :: LicenseId

-- | TMate, TMate Open Source License
TMate :: LicenseId

-- | TORQUE-1.1, TORQUE v2.5+ Software License v1.1
TORQUE_1_1 :: LicenseId

-- | TOSL, Trusster Open Source License
TOSL :: LicenseId

-- | TPDL, Time::ParseDate License, SPDX License List 3.23
TPDL :: LicenseId

-- | TPL-1.0, THOR Public License 1.0, SPDX License List 3.23
TPL_1_0 :: LicenseId

-- | TTWL, Text-Tabs+Wrap License, SPDX License List 3.23
TTWL :: LicenseId

-- | TTYP0, TTYP0 License, SPDX License List 3.23
TTYP0 :: LicenseId

-- | TU-Berlin-1.0, Technische Universitaet Berlin License 1.0,
--   SPDX License List 3.2, SPDX License List 3.6, SPDX License List 3.9,
--   SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.23
TU_Berlin_1_0 :: LicenseId

-- | TU-Berlin-2.0, Technische Universitaet Berlin License 2.0,
--   SPDX License List 3.2, SPDX License List 3.6, SPDX License List 3.9,
--   SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.23
TU_Berlin_2_0 :: LicenseId

-- | UCAR, UCAR License, SPDX License List 3.23
UCAR :: LicenseId

-- | UCL-1.0, Upstream Compatibility License v1.0, SPDX License
--   List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License
--   List 3.23
UCL_1_0 :: LicenseId

-- | ulem, ulem License, SPDX License List 3.23
Ulem :: LicenseId

-- | UMich-Merit, Michigan/Merit Networks License, SPDX License
--   List 3.23
UMich_Merit :: LicenseId

-- | Unicode-3.0, Unicode License v3, SPDX License List 3.23
Unicode_3_0 :: LicenseId

-- | Unicode-DFS-2015, Unicode License Agreement - Data Files and
--   Software (2015)
Unicode_DFS_2015 :: LicenseId

-- | Unicode-DFS-2016, Unicode License Agreement - Data Files and
--   Software (2016)
Unicode_DFS_2016 :: LicenseId

-- | Unicode-TOU, Unicode Terms of Use
Unicode_TOU :: LicenseId

-- | UnixCrypt, UnixCrypt License, SPDX License List 3.23
UnixCrypt :: LicenseId

-- | Unlicense, The Unlicense
Unlicense :: LicenseId

-- | UPL-1.0, Universal Permissive License v1.0
UPL_1_0 :: LicenseId

-- | URT-RLE, Utah Raster Toolkit Run Length Encoded License, SPDX
--   License List 3.23
URT_RLE :: LicenseId

-- | Vim, Vim License
Vim :: LicenseId

-- | VOSTROM, VOSTROM Public License for Open Source
VOSTROM :: LicenseId

-- | VSL-1.0, Vovida Software License v1.0
VSL_1_0 :: LicenseId

-- | W3C-19980720, W3C Software Notice and License (1998-07-20)
W3C_19980720 :: LicenseId

-- | W3C-20150513, W3C Software Notice and Document License
--   (2015-05-13)
W3C_20150513 :: LicenseId

-- | W3C, W3C Software Notice and License (2002-12-31)
W3C :: LicenseId

-- | w3m, w3m License, SPDX License List 3.23
W3m :: LicenseId

-- | Watcom-1.0, Sybase Open Watcom Public License 1.0
Watcom_1_0 :: LicenseId

-- | Widget-Workshop, Widget Workshop License, SPDX License List
--   3.23
Widget_Workshop :: LicenseId

-- | Wsuipa, Wsuipa License
Wsuipa :: LicenseId

-- | WTFPL, Do What The F*ck You Want To Public License
WTFPL :: LicenseId

-- | X11-distribute-modifications-variant, X11 License
--   Distribution Modification Variant, SPDX License List 3.16, SPDX
--   License List 3.23
X11_distribute_modifications_variant :: LicenseId

-- | X11, X11 License
X11 :: LicenseId

-- | Xdebug-1.03, Xdebug License v 1.03, SPDX License List 3.23
Xdebug_1_03 :: LicenseId

-- | Xerox, Xerox License
Xerox :: LicenseId

-- | Xfig, Xfig License, SPDX License List 3.23
Xfig :: LicenseId

-- | XFree86-1.1, XFree86 License 1.1
XFree86_1_1 :: LicenseId

-- | xinetd, xinetd License
Xinetd :: LicenseId

-- | xkeyboard-config-Zinoviev, xkeyboard-config Zinoviev License,
--   SPDX License List 3.23
Xkeyboard_config_Zinoviev :: LicenseId

-- | xlock, xlock License, SPDX License List 3.23
Xlock :: LicenseId

-- | Xnet, X.Net License
Xnet :: LicenseId

-- | xpp, XPP License
Xpp :: LicenseId

-- | XSkat, XSkat License
XSkat :: LicenseId

-- | YPL-1.0, Yahoo! Public License v1.0
YPL_1_0 :: LicenseId

-- | YPL-1.1, Yahoo! Public License v1.1
YPL_1_1 :: LicenseId

-- | Zed, Zed License
Zed :: LicenseId

-- | Zeeff, Zeeff License, SPDX License List 3.23
Zeeff :: LicenseId

-- | Zend-2.0, Zend License v2.0
Zend_2_0 :: LicenseId

-- | Zimbra-1.3, Zimbra Public License v1.3
Zimbra_1_3 :: LicenseId

-- | Zimbra-1.4, Zimbra Public License v1.4
Zimbra_1_4 :: LicenseId

-- | zlib-acknowledgement, zlib/libpng License with
--   Acknowledgement
Zlib_acknowledgement :: LicenseId

-- | Zlib, zlib License
Zlib :: LicenseId

-- | ZPL-1.1, Zope Public License 1.1
ZPL_1_1 :: LicenseId

-- | ZPL-2.0, Zope Public License 2.0
ZPL_2_0 :: LicenseId

-- | ZPL-2.1, Zope Public License 2.1
ZPL_2_1 :: LicenseId

-- | License SPDX identifier, e.g. "BSD-3-Clause".
licenseId :: LicenseId -> String

-- | License name, e.g. "GNU General Public License v2.0 only"
licenseName :: LicenseId -> String

-- | Whether the license is approved by Open Source Initiative (OSI).
--   
--   See https://opensource.org/licenses/alphabetical.
licenseIsOsiApproved :: LicenseId -> Bool

-- | Create a LicenseId from a String.
mkLicenseId :: LicenseListVersion -> String -> Maybe LicenseId
licenseIdList :: LicenseListVersion -> [LicenseId]

-- | SPDX License Exceptions identifiers list v3.23
data LicenseExceptionId

-- | 389-exception, 389 Directory Server Exception
DS389_exception :: LicenseExceptionId

-- | Asterisk-exception, Asterisk exception, SPDX License List
--   3.23
Asterisk_exception :: LicenseExceptionId

-- | Autoconf-exception-2.0, Autoconf exception 2.0
Autoconf_exception_2_0 :: LicenseExceptionId

-- | Autoconf-exception-3.0, Autoconf exception 3.0
Autoconf_exception_3_0 :: LicenseExceptionId

-- | Autoconf-exception-generic-3.0, Autoconf generic exception
--   for GPL-3.0, SPDX License List 3.23
Autoconf_exception_generic_3_0 :: LicenseExceptionId

-- | Autoconf-exception-generic, Autoconf generic exception, SPDX
--   License List 3.23
Autoconf_exception_generic :: LicenseExceptionId

-- | Autoconf-exception-macro, Autoconf macro exception, SPDX
--   License List 3.23
Autoconf_exception_macro :: LicenseExceptionId

-- | Bison-exception-1.24, Bison exception 1.24, SPDX License List
--   3.23
Bison_exception_1_24 :: LicenseExceptionId

-- | Bison-exception-2.2, Bison exception 2.2
Bison_exception_2_2 :: LicenseExceptionId

-- | Bootloader-exception, Bootloader Distribution Exception
Bootloader_exception :: LicenseExceptionId

-- | Classpath-exception-2.0, Classpath exception 2.0
Classpath_exception_2_0 :: LicenseExceptionId

-- | CLISP-exception-2.0, CLISP exception 2.0
CLISP_exception_2_0 :: LicenseExceptionId

-- | cryptsetup-OpenSSL-exception, cryptsetup OpenSSL exception,
--   SPDX License List 3.23
Cryptsetup_OpenSSL_exception :: LicenseExceptionId

-- | DigiRule-FOSS-exception, DigiRule FOSS License Exception
DigiRule_FOSS_exception :: LicenseExceptionId

-- | eCos-exception-2.0, eCos exception 2.0
ECos_exception_2_0 :: LicenseExceptionId

-- | Fawkes-Runtime-exception, Fawkes Runtime Exception
Fawkes_Runtime_exception :: LicenseExceptionId

-- | FLTK-exception, FLTK exception
FLTK_exception :: LicenseExceptionId

-- | fmt-exception, fmt exception, SPDX License List 3.23
Fmt_exception :: LicenseExceptionId

-- | Font-exception-2.0, Font exception 2.0
Font_exception_2_0 :: LicenseExceptionId

-- | freertos-exception-2.0, FreeRTOS Exception 2.0
Freertos_exception_2_0 :: LicenseExceptionId

-- | GCC-exception-2.0-note, GCC Runtime Library exception 2.0 -
--   note variant, SPDX License List 3.23
GCC_exception_2_0_note :: LicenseExceptionId

-- | GCC-exception-2.0, GCC Runtime Library exception 2.0
GCC_exception_2_0 :: LicenseExceptionId

-- | GCC-exception-3.1, GCC Runtime Library exception 3.1
GCC_exception_3_1 :: LicenseExceptionId

-- | Gmsh-exception, Gmsh exception>, SPDX License List 3.23
Gmsh_exception :: LicenseExceptionId

-- | GNAT-exception, GNAT exception, SPDX License List 3.23
GNAT_exception :: LicenseExceptionId

-- | GNOME-examples-exception, GNOME examples exception, SPDX
--   License List 3.23
GNOME_examples_exception :: LicenseExceptionId

-- | GNU-compiler-exception, GNU Compiler Exception, SPDX License
--   List 3.23
GNU_compiler_exception :: LicenseExceptionId

-- | gnu-javamail-exception, GNU JavaMail exception
Gnu_javamail_exception :: LicenseExceptionId

-- | GPL-3.0-interface-exception, GPL-3.0 Interface Exception,
--   SPDX License List 3.23
GPL_3_0_interface_exception :: LicenseExceptionId

-- | GPL-3.0-linking-exception, GPL-3.0 Linking Exception, SPDX
--   License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX
--   License List 3.23
GPL_3_0_linking_exception :: LicenseExceptionId

-- | GPL-3.0-linking-source-exception, GPL-3.0 Linking Exception
--   (with Corresponding Source), SPDX License List 3.9, SPDX License List
--   3.10, SPDX License List 3.16, SPDX License List 3.23
GPL_3_0_linking_source_exception :: LicenseExceptionId

-- | GPL-CC-1.0, GPL Cooperation Commitment 1.0, SPDX License List
--   3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List
--   3.16, SPDX License List 3.23
GPL_CC_1_0 :: LicenseExceptionId

-- | GStreamer-exception-2005, GStreamer Exception (2005), SPDX
--   License List 3.23
GStreamer_exception_2005 :: LicenseExceptionId

-- | GStreamer-exception-2008, GStreamer Exception (2008), SPDX
--   License List 3.23
GStreamer_exception_2008 :: LicenseExceptionId

-- | i2p-gpl-java-exception, i2p GPL+Java Exception
I2p_gpl_java_exception :: LicenseExceptionId

-- | KiCad-libraries-exception, KiCad Libraries Exception, SPDX
--   License List 3.23
KiCad_libraries_exception :: LicenseExceptionId

-- | LGPL-3.0-linking-exception, LGPL-3.0 Linking Exception, SPDX
--   License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX
--   License List 3.23
LGPL_3_0_linking_exception :: LicenseExceptionId

-- | libpri-OpenH323-exception, libpri OpenH323 exception, SPDX
--   License List 3.23
Libpri_OpenH323_exception :: LicenseExceptionId

-- | Libtool-exception, Libtool Exception
Libtool_exception :: LicenseExceptionId

-- | Linux-syscall-note, Linux Syscall Note
Linux_syscall_note :: LicenseExceptionId

-- | LLGPL, LLGPL Preamble, SPDX License List 3.23
LLGPL :: LicenseExceptionId

-- | LLVM-exception, LLVM Exception, SPDX License List 3.2, SPDX
--   License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX
--   License List 3.16, SPDX License List 3.23
LLVM_exception :: LicenseExceptionId

-- | LZMA-exception, LZMA exception
LZMA_exception :: LicenseExceptionId

-- | mif-exception, Macros and Inline Functions Exception
Mif_exception :: LicenseExceptionId

-- | Nokia-Qt-exception-1.1, Nokia Qt LGPL exception 1.1, SPDX
--   License List 3.0, SPDX License List 3.2
Nokia_Qt_exception_1_1 :: LicenseExceptionId

-- | OCaml-LGPL-linking-exception, OCaml LGPL Linking Exception,
--   SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10,
--   SPDX License List 3.16, SPDX License List 3.23
OCaml_LGPL_linking_exception :: LicenseExceptionId

-- | OCCT-exception-1.0, Open CASCADE Exception 1.0
OCCT_exception_1_0 :: LicenseExceptionId

-- | OpenJDK-assembly-exception-1.0, OpenJDK Assembly exception
--   1.0, SPDX License List 3.2, SPDX License List 3.6, SPDX License List
--   3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List
--   3.23
OpenJDK_assembly_exception_1_0 :: LicenseExceptionId

-- | openvpn-openssl-exception, OpenVPN OpenSSL Exception
Openvpn_openssl_exception :: LicenseExceptionId

-- | PS-or-PDF-font-exception-20170817, PS/PDF font exception
--   (2017-08-17), SPDX License List 3.2, SPDX License List 3.6, SPDX
--   License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX
--   License List 3.23
PS_or_PDF_font_exception_20170817 :: LicenseExceptionId

-- | QPL-1.0-INRIA-2004-exception, INRIA QPL 1.0 2004 variant
--   exception, SPDX License List 3.23
QPL_1_0_INRIA_2004_exception :: LicenseExceptionId

-- | Qt-GPL-exception-1.0, Qt GPL exception 1.0, SPDX License List
--   3.2, SPDX License List 3.6, SPDX License List 3.9, SPDX License List
--   3.10, SPDX License List 3.16, SPDX License List 3.23
Qt_GPL_exception_1_0 :: LicenseExceptionId

-- | Qt-LGPL-exception-1.1, Qt LGPL exception 1.1, SPDX License
--   List 3.2, SPDX License List 3.6, SPDX License List 3.9, SPDX License
--   List 3.10, SPDX License List 3.16, SPDX License List 3.23
Qt_LGPL_exception_1_1 :: LicenseExceptionId

-- | Qwt-exception-1.0, Qwt exception 1.0
Qwt_exception_1_0 :: LicenseExceptionId

-- | SANE-exception, SANE Exception, SPDX License List 3.23
SANE_exception :: LicenseExceptionId

-- | SHL-2.0, Solderpad Hardware License v2.0, SPDX License List
--   3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List
--   3.23
SHL_2_0 :: LicenseExceptionId

-- | SHL-2.1, Solderpad Hardware License v2.1, SPDX License List
--   3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List
--   3.23
SHL_2_1 :: LicenseExceptionId

-- | stunnel-exception, stunnel Exception, SPDX License List 3.23
Stunnel_exception :: LicenseExceptionId

-- | SWI-exception, SWI exception, SPDX License List 3.23
SWI_exception :: LicenseExceptionId

-- | Swift-exception, Swift Exception, SPDX License List 3.6, SPDX
--   License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX
--   License List 3.23
Swift_exception :: LicenseExceptionId

-- | Texinfo-exception, Texinfo exception, SPDX License List 3.23
Texinfo_exception :: LicenseExceptionId

-- | u-boot-exception-2.0, U-Boot exception 2.0
U_boot_exception_2_0 :: LicenseExceptionId

-- | UBDL-exception, Unmodified Binary Distribution exception,
--   SPDX License List 3.23
UBDL_exception :: LicenseExceptionId

-- | Universal-FOSS-exception-1.0, Universal FOSS Exception,
--   Version 1.0, SPDX License List 3.6, SPDX License List 3.9, SPDX
--   License List 3.10, SPDX License List 3.16, SPDX License List 3.23
Universal_FOSS_exception_1_0 :: LicenseExceptionId

-- | vsftpd-openssl-exception, vsftpd OpenSSL exception, SPDX
--   License List 3.23
Vsftpd_openssl_exception :: LicenseExceptionId

-- | WxWindows-exception-3.1, WxWindows Library Exception 3.1
WxWindows_exception_3_1 :: LicenseExceptionId

-- | x11vnc-openssl-exception, x11vnc OpenSSL Exception, SPDX
--   License List 3.23
X11vnc_openssl_exception :: LicenseExceptionId

-- | License SPDX identifier, e.g. "BSD-3-Clause".
licenseExceptionId :: LicenseExceptionId -> String

-- | License name, e.g. "GNU General Public License v2.0 only"
licenseExceptionName :: LicenseExceptionId -> String

-- | Create a LicenseExceptionId from a String.
mkLicenseExceptionId :: LicenseListVersion -> String -> Maybe LicenseExceptionId
licenseExceptionIdList :: LicenseListVersion -> [LicenseExceptionId]

-- | A user defined license reference denoted by
--   LicenseRef-[idstring] (for a license not on the SPDX License
--   List);
data LicenseRef

-- | License reference.
licenseRef :: LicenseRef -> String

-- | Document reference.
licenseDocumentRef :: LicenseRef -> Maybe String

-- | Create LicenseRef from optional document ref and name.
mkLicenseRef :: Maybe String -> String -> Maybe LicenseRef

-- | Like mkLicenseRef but convert invalid characters into
--   -.
mkLicenseRef' :: Maybe String -> String -> LicenseRef

-- | SPDX License List version Cabal is aware of.
data LicenseListVersion
LicenseListVersion_3_0 :: LicenseListVersion
LicenseListVersion_3_2 :: LicenseListVersion
LicenseListVersion_3_6 :: LicenseListVersion
LicenseListVersion_3_9 :: LicenseListVersion
LicenseListVersion_3_10 :: LicenseListVersion
LicenseListVersion_3_16 :: LicenseListVersion
LicenseListVersion_3_23 :: LicenseListVersion
cabalSpecVersionToSPDXListVersion :: CabalSpecVersion -> LicenseListVersion

-- | Data type for Haskell module names.
module Distribution.ModuleName

-- | A valid Haskell module name.
data ModuleName
fromString :: IsString a => String -> a

-- | Construct a ModuleName from valid module components, i.e. parts
--   separated by dots.

-- | Deprecated: Exists for cabal-install only
fromComponents :: [String] -> ModuleName

-- | The individual components of a hierarchical module name. For example
--   
--   
--   components (fromString "A.B.C") = ["A", "B", "C"]
--   
components :: ModuleName -> [String]

-- | Convert a module name to a file path, but without any file extension.
--   For example:
--   
--   
--   toFilePath (fromString "A.B.C") = "A/B/C"
--   
toFilePath :: ModuleName -> FilePath

-- | The module name Main.
main :: ModuleName
validModuleComponent :: String -> Bool
instance Data.Binary.Class.Binary Distribution.ModuleName.ModuleName
instance GHC.Internal.Data.Data.Data Distribution.ModuleName.ModuleName
instance GHC.Classes.Eq Distribution.ModuleName.ModuleName
instance GHC.Internal.Generics.Generic Distribution.ModuleName.ModuleName
instance GHC.Internal.Data.String.IsString Distribution.ModuleName.ModuleName
instance Control.DeepSeq.NFData Distribution.ModuleName.ModuleName
instance GHC.Classes.Ord Distribution.ModuleName.ModuleName
instance Distribution.Parsec.Parsec Distribution.ModuleName.ModuleName
instance Distribution.Pretty.Pretty Distribution.ModuleName.ModuleName
instance GHC.Internal.Read.Read Distribution.ModuleName.ModuleName
instance GHC.Internal.Show.Show Distribution.ModuleName.ModuleName
instance Distribution.Utils.Structured.Structured Distribution.ModuleName.ModuleName

module Distribution.Types.ModuleRenaming

-- | Renaming applied to the modules provided by a package. The boolean
--   indicates whether or not to also include all of the original names of
--   modules. Thus, ModuleRenaming False [] is "don't expose any
--   modules, and ModuleRenaming True [(Data.Bool,
--   Bool)] is, "expose all modules, but also expose
--   Data.Bool as Bool". If a renaming is omitted you get
--   the DefaultRenaming.
--   
--   (NB: This is a list not a map so that we can preserve order.)
data ModuleRenaming

-- | A module renaming/thinning; e.g., (A as B, C as C) brings
--   B and C into scope.
ModuleRenaming :: [(ModuleName, ModuleName)] -> ModuleRenaming

-- | The default renaming, bringing all exported modules into scope.
DefaultRenaming :: ModuleRenaming

-- | Hiding renaming, e.g., hiding (A, B), bringing all exported
--   modules into scope except the hidden ones.
HidingRenaming :: [ModuleName] -> ModuleRenaming

-- | Interpret a ModuleRenaming as a partial map from
--   ModuleName to ModuleName. For efficiency, you should
--   partially apply it with ModuleRenaming and then reuse it.
interpModuleRenaming :: ModuleRenaming -> ModuleName -> Maybe ModuleName

-- | The default renaming, if something is specified in
--   build-depends only.
defaultRenaming :: ModuleRenaming

-- | Tests if its the default renaming; we can use a more compact syntax in
--   IncludeRenaming in this case.
isDefaultRenaming :: ModuleRenaming -> Bool
instance Data.Binary.Class.Binary Distribution.Types.ModuleRenaming.ModuleRenaming
instance GHC.Internal.Data.Data.Data Distribution.Types.ModuleRenaming.ModuleRenaming
instance GHC.Classes.Eq Distribution.Types.ModuleRenaming.ModuleRenaming
instance GHC.Internal.Generics.Generic Distribution.Types.ModuleRenaming.ModuleRenaming
instance Control.DeepSeq.NFData Distribution.Types.ModuleRenaming.ModuleRenaming
instance GHC.Classes.Ord Distribution.Types.ModuleRenaming.ModuleRenaming
instance Distribution.Parsec.Parsec Distribution.Types.ModuleRenaming.ModuleRenaming
instance Distribution.Pretty.Pretty Distribution.Types.ModuleRenaming.ModuleRenaming
instance GHC.Internal.Read.Read Distribution.Types.ModuleRenaming.ModuleRenaming
instance GHC.Internal.Show.Show Distribution.Types.ModuleRenaming.ModuleRenaming
instance Distribution.Utils.Structured.Structured Distribution.Types.ModuleRenaming.ModuleRenaming

module Distribution.Types.IncludeRenaming

-- | A renaming on an include: (provides renaming, requires renaming)
data IncludeRenaming
IncludeRenaming :: ModuleRenaming -> ModuleRenaming -> IncludeRenaming
[includeProvidesRn] :: IncludeRenaming -> ModuleRenaming
[includeRequiresRn] :: IncludeRenaming -> ModuleRenaming

-- | The defaultIncludeRenaming applied when you only
--   build-depends on a package.
defaultIncludeRenaming :: IncludeRenaming

-- | Is an IncludeRenaming the default one?
isDefaultIncludeRenaming :: IncludeRenaming -> Bool
instance Data.Binary.Class.Binary Distribution.Types.IncludeRenaming.IncludeRenaming
instance GHC.Internal.Data.Data.Data Distribution.Types.IncludeRenaming.IncludeRenaming
instance GHC.Classes.Eq Distribution.Types.IncludeRenaming.IncludeRenaming
instance GHC.Internal.Generics.Generic Distribution.Types.IncludeRenaming.IncludeRenaming
instance Control.DeepSeq.NFData Distribution.Types.IncludeRenaming.IncludeRenaming
instance GHC.Classes.Ord Distribution.Types.IncludeRenaming.IncludeRenaming
instance Distribution.Parsec.Parsec Distribution.Types.IncludeRenaming.IncludeRenaming
instance Distribution.Pretty.Pretty Distribution.Types.IncludeRenaming.IncludeRenaming
instance GHC.Internal.Read.Read Distribution.Types.IncludeRenaming.IncludeRenaming
instance GHC.Internal.Show.Show Distribution.Types.IncludeRenaming.IncludeRenaming
instance Distribution.Utils.Structured.Structured Distribution.Types.IncludeRenaming.IncludeRenaming

module Distribution.Types.Mixin

-- | Invariant: if mixinLibraryName is LSubLibName,
--   it's not the same as mixinPackageName. In other words, the same
--   invariant as Dependency has.
data Mixin
Mixin :: PackageName -> LibraryName -> IncludeRenaming -> Mixin
[mixinPackageName] :: Mixin -> PackageName
[mixinLibraryName] :: Mixin -> LibraryName
[mixinIncludeRenaming] :: Mixin -> IncludeRenaming

-- | Smart constructor of Mixin, enforces invariant.
mkMixin :: PackageName -> LibraryName -> IncludeRenaming -> Mixin

-- | Restore invariant
normaliseMixin :: Mixin -> Mixin
instance Data.Binary.Class.Binary Distribution.Types.Mixin.Mixin
instance GHC.Internal.Data.Data.Data Distribution.Types.Mixin.Mixin
instance GHC.Classes.Eq Distribution.Types.Mixin.Mixin
instance GHC.Internal.Generics.Generic Distribution.Types.Mixin.Mixin
instance Control.DeepSeq.NFData Distribution.Types.Mixin.Mixin
instance GHC.Classes.Ord Distribution.Types.Mixin.Mixin
instance Distribution.Parsec.Parsec Distribution.Types.Mixin.Mixin
instance Distribution.Pretty.Pretty Distribution.Types.Mixin.Mixin
instance GHC.Internal.Read.Read Distribution.Types.Mixin.Mixin
instance GHC.Internal.Show.Show Distribution.Types.Mixin.Mixin
instance Distribution.Utils.Structured.Structured Distribution.Types.Mixin.Mixin

module Distribution.Types.ModuleReexport
data ModuleReexport
ModuleReexport :: Maybe PackageName -> ModuleName -> ModuleName -> ModuleReexport
[moduleReexportOriginalPackage] :: ModuleReexport -> Maybe PackageName
[moduleReexportOriginalName] :: ModuleReexport -> ModuleName
[moduleReexportName] :: ModuleReexport -> ModuleName
instance Data.Binary.Class.Binary Distribution.Types.ModuleReexport.ModuleReexport
instance GHC.Internal.Data.Data.Data Distribution.Types.ModuleReexport.ModuleReexport
instance GHC.Classes.Eq Distribution.Types.ModuleReexport.ModuleReexport
instance GHC.Internal.Generics.Generic Distribution.Types.ModuleReexport.ModuleReexport
instance Control.DeepSeq.NFData Distribution.Types.ModuleReexport.ModuleReexport
instance GHC.Classes.Ord Distribution.Types.ModuleReexport.ModuleReexport
instance Distribution.Parsec.Parsec Distribution.Types.ModuleReexport.ModuleReexport
instance Distribution.Pretty.Pretty Distribution.Types.ModuleReexport.ModuleReexport
instance GHC.Internal.Read.Read Distribution.Types.ModuleReexport.ModuleReexport
instance GHC.Internal.Show.Show Distribution.Types.ModuleReexport.ModuleReexport
instance Distribution.Utils.Structured.Structured Distribution.Types.ModuleReexport.ModuleReexport

-- | A data type representing directed graphs, backed by Data.Graph.
--   It is strict in the node type.
--   
--   This is an alternative interface to Data.Graph. In this
--   interface, nodes (identified by the IsNode type class) are
--   associated with a key and record the keys of their neighbors. This
--   interface is more convenient than Graph, which requires
--   vertices to be explicitly handled by integer indexes.
--   
--   The current implementation has somewhat peculiar performance
--   characteristics. The asymptotics of all map-like operations mirror
--   their counterparts in Data.Map. However, to perform a graph
--   operation, we first must build the Data.Graph representation,
--   an operation that takes O(V + E log V). However, this operation
--   can be amortized across all queries on that particular graph.
--   
--   Some nodes may be broken, i.e., refer to neighbors which are not
--   stored in the graph. In our graph algorithms, we transparently ignore
--   such edges; however, you can easily query for the broken vertices of a
--   graph using broken (and should, e.g., to ensure that a closure
--   of a graph is well-formed.) It's possible to take a closed subset of a
--   broken graph and get a well-formed graph.
module Distribution.Compat.Graph

-- | A graph of nodes a. The nodes are expected to have instance
--   of class IsNode.
data Graph a

-- | The IsNode class is used for datatypes which represent directed
--   graph nodes. A node of type a is associated with some unique
--   key of type Key a; given a node we can determine its
--   key (nodeKey) and the keys of its neighbors
--   (nodeNeighbors).
class Ord Key a => IsNode a where {
    type Key a;
}
nodeKey :: IsNode a => a -> Key a
nodeNeighbors :: IsNode a => a -> [Key a]

-- | O(1). Is the graph empty?
null :: Graph a -> Bool

-- | O(1). The number of nodes in the graph.
size :: Graph a -> Int

-- | O(log V). Check if the key is in the graph.
member :: IsNode a => Key a -> Graph a -> Bool

-- | O(log V). Lookup the node at a key in the graph.
lookup :: IsNode a => Key a -> Graph a -> Maybe a

-- | O(1). The empty graph.
empty :: IsNode a => Graph a

-- | O(log V). Insert a node into a graph.
insert :: IsNode a => a -> Graph a -> Graph a

-- | O(log V). Delete the node at a key from the graph.
deleteKey :: IsNode a => Key a -> Graph a -> Graph a

-- | O(log V). Lookup and delete. This function returns the deleted
--   value if it existed.
deleteLookup :: IsNode a => Key a -> Graph a -> (Maybe a, Graph a)

-- | O(V + V'). Left-biased union, preferring entries from the first
--   map when conflicts occur.
unionLeft :: IsNode a => Graph a -> Graph a -> Graph a

-- | O(V + V'). Right-biased union, preferring entries from the
--   second map when conflicts occur. nodeKey x = nodeKey
--   (f x).
unionRight :: IsNode a => Graph a -> Graph a -> Graph a

-- | Ω(V + E). Compute the strongly connected components of a graph.
--   Requires amortized construction of graph.
stronglyConnComp :: Graph a -> [SCC a]

-- | Strongly connected component.
data SCC vertex

-- | A single vertex that is not in any cycle.
AcyclicSCC :: vertex -> SCC vertex

-- | A maximal set of mutually reachable vertices.
NECyclicSCC :: {-# UNPACK #-} !NonEmpty vertex -> SCC vertex

-- | Partial pattern synonym for backward compatibility with containers
--   < 0.7.
pattern CyclicSCC :: [vertex] -> SCC vertex

-- | Ω(V + E). Compute the cycles of a graph. Requires amortized
--   construction of graph.
cycles :: Graph a -> [[a]]

-- | O(1). Return a list of nodes paired with their broken neighbors
--   (i.e., neighbor keys which are not in the graph). Requires amortized
--   construction of graph.
broken :: Graph a -> [(a, [Key a])]

-- | Lookup the immediate neighbors from a key in the graph. Requires
--   amortized construction of graph.
neighbors :: Graph a -> Key a -> Maybe [a]

-- | Lookup the immediate reverse neighbors from a key in the graph.
--   Requires amortized construction of graph.
revNeighbors :: Graph a -> Key a -> Maybe [a]

-- | Compute the subgraph which is the closure of some set of keys. Returns
--   Nothing if one (or more) keys are not present in the graph.
--   Requires amortized construction of graph.
closure :: Graph a -> [Key a] -> Maybe [a]

-- | Compute the reverse closure of a graph from some set of keys. Returns
--   Nothing if one (or more) keys are not present in the graph.
--   Requires amortized construction of graph.
revClosure :: Graph a -> [Key a] -> Maybe [a]

-- | Topologically sort the nodes of a graph. Requires amortized
--   construction of graph.
topSort :: Graph a -> [a]

-- | Reverse topologically sort the nodes of a graph. Requires amortized
--   construction of graph.
revTopSort :: Graph a -> [a]

-- | O(1). Convert a graph into a map from keys to nodes. The
--   resulting map m is guaranteed to have the property that
--   all ((k,n) -> k == nodeKey n) (toList
--   m).
toMap :: Graph a -> Map (Key a) a

-- | O(V log V). Convert a list of nodes (with distinct keys) into a
--   graph.
fromDistinctList :: (IsNode a, Show (Key a)) => [a] -> Graph a

-- | O(V). Convert a graph into a list of nodes.
toList :: Graph a -> [a]

-- | O(V). Convert a graph into a list of keys.
keys :: Graph a -> [Key a]

-- | O(V). Convert a graph into a set of keys.
keysSet :: Graph a -> Set (Key a)

-- | O(1). Convert a graph into a Graph. Requires amortized
--   construction of graph.
toGraph :: Graph a -> (Graph, Vertex -> a, Key a -> Maybe Vertex)

-- | A simple, trivial data type which admits an IsNode instance.
data Node k a
N :: a -> k -> [k] -> Node k a

-- | Get the value from a Node.
nodeValue :: Node k a -> a
instance (Distribution.Compat.Graph.IsNode a, Data.Binary.Class.Binary a, GHC.Internal.Show.Show (Distribution.Compat.Graph.Key a)) => Data.Binary.Class.Binary (Distribution.Compat.Graph.Graph a)
instance (GHC.Classes.Eq (Distribution.Compat.Graph.Key a), GHC.Classes.Eq a) => GHC.Classes.Eq (Distribution.Compat.Graph.Graph a)
instance (GHC.Classes.Eq a, GHC.Classes.Eq k) => GHC.Classes.Eq (Distribution.Compat.Graph.Node k a)
instance GHC.Internal.Data.Foldable.Foldable Distribution.Compat.Graph.Graph
instance GHC.Internal.Base.Functor (Distribution.Compat.Graph.Node k)
instance (Distribution.Compat.Graph.IsNode a, Distribution.Compat.Graph.IsNode b, Distribution.Compat.Graph.Key a GHC.Types.~ Distribution.Compat.Graph.Key b) => Distribution.Compat.Graph.IsNode (GHC.Internal.Data.Either.Either a b)
instance GHC.Classes.Ord k => Distribution.Compat.Graph.IsNode (Distribution.Compat.Graph.Node k a)
instance (Control.DeepSeq.NFData a, Control.DeepSeq.NFData (Distribution.Compat.Graph.Key a)) => Control.DeepSeq.NFData (Distribution.Compat.Graph.Graph a)
instance (Distribution.Compat.Graph.IsNode a, GHC.Internal.Read.Read a, GHC.Internal.Show.Show (Distribution.Compat.Graph.Key a)) => GHC.Internal.Read.Read (Distribution.Compat.Graph.Graph a)
instance GHC.Internal.Show.Show a => GHC.Internal.Show.Show (Distribution.Compat.Graph.Graph a)
instance (GHC.Internal.Show.Show a, GHC.Internal.Show.Show k) => GHC.Internal.Show.Show (Distribution.Compat.Graph.Node k a)
instance Distribution.Utils.Structured.Structured a => Distribution.Utils.Structured.Structured (Distribution.Compat.Graph.Graph a)

-- | Exports the Version type along with a parser and pretty
--   printer. A version is something like "1.3.3". It also defines
--   the VersionRange data types. Version ranges are like ">=
--   1.2 && < 2".
module Distribution.Version

-- | A Version represents the version of a software entity.
--   
--   Instances of Eq and Ord are provided, which gives exact
--   equality and lexicographic ordering of the version number components
--   (i.e. 2.1 > 2.0, 1.2.3 > 1.2.2, etc.).
--   
--   This type is opaque and distinct from the Version type in
--   Data.Version since Cabal-2.0. The difference extends
--   to the Binary instance using a different (and more compact)
--   encoding.
data Version

-- | Version 0. A lower bound of Version.
version0 :: Version

-- | Construct Version from list of version number components.
--   
--   For instance, mkVersion [3,2,1] constructs a Version
--   representing the version 3.2.1.
--   
--   All version components must be non-negative. mkVersion []
--   currently represents the special null version; see also
--   nullVersion.
mkVersion :: [Int] -> Version

-- | Variant of mkVersion which converts a Data.Version
--   Version into Cabal's Version type.
mkVersion' :: Version -> Version

-- | Unpack Version into list of version number components.
--   
--   This is the inverse to mkVersion, so the following holds:
--   
--   
--   (versionNumbers . mkVersion) vs == vs
--   
versionNumbers :: Version -> [Int]

-- | Constant representing the special null Version
--   
--   The nullVersion compares (via Ord) as less than every
--   proper Version value.
nullVersion :: Version

-- | Apply function to list of version number components
--   
--   
--   alterVersion f == mkVersion . f . versionNumbers
--   
alterVersion :: ([Int] -> [Int]) -> Version -> Version
data VersionRange

-- | The version range -any. That is, a version range containing
--   all versions.
--   
--   
--   withinRange v anyVersion = True
--   
anyVersion :: VersionRange

-- | The empty version range -none, that is a version range
--   containing no versions.
--   
--   This can be constructed using any unsatisfiable version range
--   expression, for example < 0.
--   
--   
--   withinRange v noVersion = False
--   
noVersion :: VersionRange

-- | The version range == v.
--   
--   
--   withinRange v' (thisVersion v) = v' == v
--   
thisVersion :: Version -> VersionRange

-- | The version range /= v.
--   
--   
--   withinRange v' (notThisVersion v) = v' /= v
--   
notThisVersion :: Version -> VersionRange

-- | The version range > v.
--   
--   
--   withinRange v' (laterVersion v) = v' > v
--   
laterVersion :: Version -> VersionRange

-- | The version range < v.
--   
--   
--   withinRange v' (earlierVersion v) = v' < v
--   
earlierVersion :: Version -> VersionRange

-- | The version range >= v.
--   
--   
--   withinRange v' (orLaterVersion v) = v' >= v
--   
orLaterVersion :: Version -> VersionRange

-- | The version range <= v.
--   
--   
--   withinRange v' (orEarlierVersion v) = v' <= v
--   
orEarlierVersion :: Version -> VersionRange

-- | The version range vr1 || vr2.
--   
--   
--     withinRange v' (unionVersionRanges vr1 vr2)
--   = withinRange v' vr1 || withinRange v' vr2
--   
unionVersionRanges :: VersionRange -> VersionRange -> VersionRange

-- | The version range vr1 && vr2.
--   
--   
--     withinRange v' (intersectVersionRanges vr1 vr2)
--   = withinRange v' vr1 && withinRange v' vr2
--   
intersectVersionRanges :: VersionRange -> VersionRange -> VersionRange

-- | The version range == v.*.
--   
--   For example, for version 1.2, the version range ==
--   1.2.* is the same as >= 1.2 && < 1.3.
--   
--   
--   withinRange v' (withinVersion v) = v' >= v && v' < upper v
--     where
--       upper (Version lower t) = Version (init lower ++ [last lower + 1]) t
--   
withinVersion :: Version -> VersionRange

-- | The version range ^>= v.
--   
--   For example, for version 1.2.3.4, the version range
--   ^>= 1.2.3.4 is the same as >= 1.2.3.4 &&
--   < 1.3.
--   
--   Note that ^>= 1 is equivalent to >= 1 &&
--   < 1.1.
majorBoundVersion :: Version -> VersionRange

-- | Does this version fall within the given range?
--   
--   This is the evaluation function for the VersionRange type.
withinRange :: Version -> VersionRange -> Bool

-- | Does this VersionRange place any restriction on the
--   Version or is it in fact equivalent to AnyVersion.
--   
--   Note this is a semantic check, not simply a syntactic check. So for
--   example the following is True (for all v).
--   
--   
--   isAnyVersion (EarlierVersion v `UnionVersionRanges` orLaterVersion v)
--   
isAnyVersion :: VersionRange -> Bool

-- | This is the converse of isAnyVersion. It check if the version
--   range is empty, if there is no possible version that satisfies the
--   version range.
--   
--   For example this is True (for all v):
--   
--   
--   isNoVersion (EarlierVersion v `IntersectVersionRanges` LaterVersion v)
--   
isNoVersion :: VersionRange -> Bool

-- | Is this version range in fact just a specific version?
--   
--   For example the version range ">= 3 && <= 3"
--   contains only the version 3.
isSpecificVersion :: VersionRange -> Maybe Version

-- | Simplify a VersionRange expression. For non-empty version
--   ranges this produces a canonical form. Empty or inconsistent version
--   ranges are left as-is because that provides more information.
--   
--   If you need a canonical form use fromVersionIntervals .
--   toVersionIntervals
--   
--   It satisfies the following properties:
--   
--   
--   withinRange v (simplifyVersionRange r) = withinRange v r
--   
--   
--   
--       withinRange v r = withinRange v r'
--   ==> simplifyVersionRange r = simplifyVersionRange r'
--    || isNoVersion r
--    || isNoVersion r'
--   
simplifyVersionRange :: VersionRange -> VersionRange

-- | Fold over the basic syntactic structure of a VersionRange.
--   
--   This provides a syntactic view of the expression defining the version
--   range. The syntactic sugar ">= v", "<= v" and
--   "== v.*" is presented in terms of the other basic syntax.
--   
--   For a semantic view use asVersionIntervals.
foldVersionRange :: a -> (Version -> a) -> (Version -> a) -> (Version -> a) -> (a -> a -> a) -> (a -> a -> a) -> VersionRange -> a

-- | Normalise VersionRange.
--   
--   In particular collapse (== v || > v) into >=
--   v, and so on.
normaliseVersionRange :: VersionRange -> VersionRange

-- | Remove VersionRangeParens constructors.
--   
--   Since version 3.4 this function is id, there aren't
--   VersionRangeParens constructor in VersionRange
--   anymore.
stripParensVersionRange :: VersionRange -> VersionRange

-- | Does the version range have an upper bound?
hasUpperBound :: VersionRange -> Bool

-- | Does the version range have an explicit lower bound?
--   
--   Note: this function only considers the user-specified lower bounds,
--   but not the implicit >=0 lower bound.
hasLowerBound :: VersionRange -> Bool

-- | F-Algebra of VersionRange. See cataVersionRange.
data VersionRangeF a

-- | == version.
ThisVersionF :: Version -> VersionRangeF a

-- | > version. NB: not >=
LaterVersionF :: Version -> VersionRangeF a

-- | >= version.
OrLaterVersionF :: Version -> VersionRangeF a

-- | < version.
EarlierVersionF :: Version -> VersionRangeF a

-- | <= version.
OrEarlierVersionF :: Version -> VersionRangeF a

-- | ^>= version, same as >= version && <
--   MAJ(version)+1.
MajorBoundVersionF :: Version -> VersionRangeF a

-- | ||.
UnionVersionRangesF :: a -> a -> VersionRangeF a

-- | &&.
IntersectVersionRangesF :: a -> a -> VersionRangeF a

-- | Fold VersionRange.
cataVersionRange :: (VersionRangeF a -> a) -> VersionRange -> a

-- | Unfold VersionRange.
anaVersionRange :: (a -> VersionRangeF a) -> a -> VersionRange

-- | Refold VersionRange.
hyloVersionRange :: (VersionRangeF VersionRange -> VersionRange) -> (VersionRange -> VersionRangeF VersionRange) -> VersionRange -> VersionRange

-- | Generic destructor for VersionRange.
projectVersionRange :: VersionRange -> VersionRangeF VersionRange

-- | Generic constructor for VersionRange.
embedVersionRange :: VersionRangeF VersionRange -> VersionRange

-- | Increment the last version number.
--   
--   Example: For 1.2 this returns 1.3 so that it can be
--   used as upper bound when resolving == 1.2.*. For
--   0.4.1 it returns 0.4.2.
wildcardUpperBound :: Version -> Version

-- | Compute next greater major version to be used as upper bound.
--   
--   Example: 0.4.1 produces the version 0.5 which then
--   can be used to construct a range >= 0.4.1 && <
--   0.5
majorUpperBound :: Version -> Version

-- | Given a version range, remove the highest upper bound. Example:
--   (>= 1 && < 3) || (>= 4 && < 5) is
--   converted to (>= 1 && || (= 4).
removeUpperBound :: VersionRange -> VersionRange

-- | Given a version range, remove the lowest lower bound. Example:
--   (>= 1 && || (= 4 && < 5) is
--   converted to (>= 0 && || (= 4 && <
--   5).
removeLowerBound :: VersionRange -> VersionRange

-- | Rewrite ^>= x.y.z into >= x.y.z && <
--   x.(y+1)
transformCaret :: VersionRange -> VersionRange

-- | Rewrite ^>= x.y.z into >= x.y.z
transformCaretUpper :: VersionRange -> VersionRange

-- | Rewrite ^>= x.y.z into <x.(y+1)
transformCaretLower :: VersionRange -> VersionRange

-- | View a VersionRange as a union of intervals.
--   
--   This provides a canonical view of the semantics of a
--   VersionRange as opposed to the syntax of the expression used to
--   define it. For the syntactic view use foldVersionRange.
--   
--   Each interval is non-empty. The sequence is in increasing order and no
--   intervals overlap or touch. Therefore only the first and last can be
--   unbounded. The sequence can be empty if the range is empty (e.g. a
--   range expression like && 2).
--   
--   Other checks are trivial to implement using this view. For example:
--   
--   
--   isNoVersion vr | [] <- asVersionIntervals vr = True
--                  | otherwise                   = False
--   
--   
--   
--   isSpecificVersion vr
--      | [(LowerBound v  InclusiveBound
--         ,UpperBound v' InclusiveBound)] <- asVersionIntervals vr
--      , v == v'   = Just v
--      | otherwise = Nothing
--   
asVersionIntervals :: VersionRange -> [VersionInterval]
data VersionInterval
VersionInterval :: !LowerBound -> !UpperBound -> VersionInterval
data LowerBound
LowerBound :: !Version -> !Bound -> LowerBound
data UpperBound
NoUpperBound :: UpperBound
UpperBound :: !Version -> !Bound -> UpperBound
data Bound
ExclusiveBound :: Bound
InclusiveBound :: Bound

-- | A complementary representation of a VersionRange. Instead of a
--   boolean version predicate it uses an increasing sequence of
--   non-overlapping, non-empty intervals.
--   
--   The key point is that this representation gives a canonical
--   representation for the semantics of VersionRanges. This makes
--   it easier to check things like whether a version range is empty,
--   covers all versions, or requires a certain minimum or maximum version.
--   It also makes it easy to check equality or containment. It also makes
--   it easier to identify 'simple' version predicates for translation into
--   foreign packaging systems that do not support complex version range
--   expressions.
data VersionIntervals

-- | Convert a VersionRange to a sequence of version intervals.
toVersionIntervals :: VersionRange -> VersionIntervals

-- | Convert a VersionIntervals value back into a
--   VersionRange expression representing the version intervals.
fromVersionIntervals :: VersionIntervals -> VersionRange

-- | Inspect the list of version intervals.
unVersionIntervals :: VersionIntervals -> [VersionInterval]

module Distribution.Types.TestType

-- | The "test-type" field in the test suite stanza.
data TestType

-- | "type: exitcode-stdio-x.y"
TestTypeExe :: Version -> TestType

-- | "type: detailed-x.y"
TestTypeLib :: Version -> TestType

-- | Some unknown test type e.g. "type: foo"
TestTypeUnknown :: String -> Version -> TestType
knownTestTypes :: [TestType]
testTypeExe :: TestType
testTypeLib :: TestType
instance Data.Binary.Class.Binary Distribution.Types.TestType.TestType
instance GHC.Internal.Data.Data.Data Distribution.Types.TestType.TestType
instance GHC.Classes.Eq Distribution.Types.TestType.TestType
instance GHC.Internal.Generics.Generic Distribution.Types.TestType.TestType
instance Control.DeepSeq.NFData Distribution.Types.TestType.TestType
instance GHC.Classes.Ord Distribution.Types.TestType.TestType
instance Distribution.Parsec.Parsec Distribution.Types.TestType.TestType
instance Distribution.Pretty.Pretty Distribution.Types.TestType.TestType
instance GHC.Internal.Read.Read Distribution.Types.TestType.TestType
instance GHC.Internal.Show.Show Distribution.Types.TestType.TestType
instance Distribution.Utils.Structured.Structured Distribution.Types.TestType.TestType

module Distribution.Types.TestSuiteInterface

-- | The test suite interfaces that are currently defined.
--   
--   More interfaces may be defined in future, either new revisions or
--   totally new interfaces.
data TestSuiteInterface

-- | Test interface "exitcode-stdio-1.0". The test-suite takes the form of
--   an executable. It returns a zero exit code for success, non-zero for
--   failure. The stdout and stderr channels may be logged. Test tooling
--   may pass command line arguments and/or connect the stdin channel to
--   the test.
TestSuiteExeV10 :: Version -> FilePath -> TestSuiteInterface

-- | Test interface "detailed-0.9". The test-suite takes the form of a
--   library containing a designated module that exports "tests :: [Test]".
TestSuiteLibV09 :: Version -> ModuleName -> TestSuiteInterface

-- | A test suite that does not conform to one of the above interfaces for
--   the given reason (e.g. unknown test type).
TestSuiteUnsupported :: TestType -> TestSuiteInterface
instance Data.Binary.Class.Binary Distribution.Types.TestSuiteInterface.TestSuiteInterface
instance GHC.Internal.Data.Data.Data Distribution.Types.TestSuiteInterface.TestSuiteInterface
instance GHC.Classes.Eq Distribution.Types.TestSuiteInterface.TestSuiteInterface
instance GHC.Internal.Generics.Generic Distribution.Types.TestSuiteInterface.TestSuiteInterface
instance GHC.Internal.Base.Monoid Distribution.Types.TestSuiteInterface.TestSuiteInterface
instance Control.DeepSeq.NFData Distribution.Types.TestSuiteInterface.TestSuiteInterface
instance GHC.Classes.Ord Distribution.Types.TestSuiteInterface.TestSuiteInterface
instance GHC.Internal.Read.Read Distribution.Types.TestSuiteInterface.TestSuiteInterface
instance GHC.Internal.Base.Semigroup Distribution.Types.TestSuiteInterface.TestSuiteInterface
instance GHC.Internal.Show.Show Distribution.Types.TestSuiteInterface.TestSuiteInterface
instance Distribution.Utils.Structured.Structured Distribution.Types.TestSuiteInterface.TestSuiteInterface

module Distribution.Types.PackageId

-- | The name and version of a package.
data PackageIdentifier
PackageIdentifier :: PackageName -> Version -> PackageIdentifier

-- | The name of this package, eg. foo
[pkgName] :: PackageIdentifier -> PackageName

-- | the version of this package, eg 1.2
[pkgVersion] :: PackageIdentifier -> Version

-- | Type alias so we can use the shorter name PackageId.
type PackageId = PackageIdentifier
instance Data.Binary.Class.Binary Distribution.Types.PackageId.PackageIdentifier
instance GHC.Internal.Data.Data.Data Distribution.Types.PackageId.PackageIdentifier
instance GHC.Classes.Eq Distribution.Types.PackageId.PackageIdentifier
instance GHC.Internal.Generics.Generic Distribution.Types.PackageId.PackageIdentifier
instance Control.DeepSeq.NFData Distribution.Types.PackageId.PackageIdentifier
instance GHC.Classes.Ord Distribution.Types.PackageId.PackageIdentifier
instance Distribution.Parsec.Parsec Distribution.Types.PackageId.PackageIdentifier
instance Distribution.Pretty.Pretty Distribution.Types.PackageId.PackageIdentifier
instance GHC.Internal.Read.Read Distribution.Types.PackageId.PackageIdentifier
instance GHC.Internal.Show.Show Distribution.Types.PackageId.PackageIdentifier
instance Distribution.Utils.Structured.Structured Distribution.Types.PackageId.PackageIdentifier

module Distribution.Types.UnitId

-- | A unit identifier identifies a (possibly instantiated)
--   package/component that can be installed the installed package
--   database. There are several types of components that can be installed:
--   
--   
--   
- A traditional library with no holes, so that unitIdHash
--   is Nothing. In the absence of Backpack, UnitId is the
--   same as a ComponentId.
--   
- An indefinite, Backpack library with holes. In this case,
--   unitIdHash is still Nothing, but in the install,
--   there are only interfaces, no compiled objects.
--   
- An instantiated Backpack library with all the holes filled in.
--   unitIdHash is a Just a hash of the instantiating
--   mapping.
--   
--   
--   A unit is a component plus the additional information on how the holes
--   are filled in. Thus there is a one to many relationship: for a
--   particular component there are many different ways of filling in the
--   holes, and each different combination is a unit (and has a separate
--   UnitId).
--   
--   UnitId is distinct from OpenUnitId, in that it is
--   always installed, whereas OpenUnitId are intermediate unit
--   identities that arise during mixin linking, and don't necessarily
--   correspond to any actually installed unit. Since the mapping is not
--   actually recorded in a UnitId, you can't actually substitute
--   over them (but you can substitute over OpenUnitId). See also
--   Distribution.Backpack.FullUnitId for a mechanism for expanding
--   an instantiated UnitId to retrieve its mapping.
--   
--   Backwards compatibility note: if you need to get the string
--   representation of a UnitId to pass, e.g., as a -package-id
--   flag, use the display function, which will work on all
--   versions of Cabal.
data UnitId

-- | If you need backwards compatibility, consider using display
--   instead, which is supported by all versions of Cabal.
unUnitId :: UnitId -> String
mkUnitId :: String -> UnitId

-- | A UnitId for a definite package. The DefUnitId invariant
--   says that a UnitId identified this way is definite; i.e., it
--   has no unfilled holes.
data DefUnitId

-- | Unsafely create a DefUnitId from a UnitId. Your
--   responsibility is to ensure that the DefUnitId invariant holds.
unsafeMkDefUnitId :: UnitId -> DefUnitId
unDefUnitId :: DefUnitId -> UnitId

-- | Create a unit identity with no associated hash directly from a
--   ComponentId.
newSimpleUnitId :: ComponentId -> UnitId

-- | Make an old-style UnitId from a package identifier. Assumed to be for
--   the public library
mkLegacyUnitId :: PackageId -> UnitId

-- | Returns library name prefixed with HS, suitable for filenames
getHSLibraryName :: UnitId -> String
instance Data.Binary.Class.Binary Distribution.Types.UnitId.DefUnitId
instance Data.Binary.Class.Binary Distribution.Types.UnitId.UnitId
instance GHC.Internal.Data.Data.Data Distribution.Types.UnitId.DefUnitId
instance GHC.Internal.Data.Data.Data Distribution.Types.UnitId.UnitId
instance GHC.Classes.Eq Distribution.Types.UnitId.DefUnitId
instance GHC.Classes.Eq Distribution.Types.UnitId.UnitId
instance GHC.Internal.Generics.Generic Distribution.Types.UnitId.DefUnitId
instance GHC.Internal.Generics.Generic Distribution.Types.UnitId.UnitId
instance GHC.Internal.Data.String.IsString Distribution.Types.UnitId.UnitId
instance Control.DeepSeq.NFData Distribution.Types.UnitId.DefUnitId
instance Control.DeepSeq.NFData Distribution.Types.UnitId.UnitId
instance GHC.Classes.Ord Distribution.Types.UnitId.DefUnitId
instance GHC.Classes.Ord Distribution.Types.UnitId.UnitId
instance Distribution.Parsec.Parsec Distribution.Types.UnitId.DefUnitId
instance Distribution.Parsec.Parsec Distribution.Types.UnitId.UnitId
instance Distribution.Pretty.Pretty Distribution.Types.UnitId.DefUnitId
instance Distribution.Pretty.Pretty Distribution.Types.UnitId.UnitId
instance GHC.Internal.Read.Read Distribution.Types.UnitId.DefUnitId
instance GHC.Internal.Read.Read Distribution.Types.UnitId.UnitId
instance GHC.Internal.Show.Show Distribution.Types.UnitId.DefUnitId
instance GHC.Internal.Show.Show Distribution.Types.UnitId.UnitId
instance Distribution.Utils.Structured.Structured Distribution.Types.UnitId.DefUnitId
instance Distribution.Utils.Structured.Structured Distribution.Types.UnitId.UnitId

module Distribution.Types.Module

-- | A module identity uniquely identifies a Haskell module by qualifying a
--   ModuleName with the UnitId which defined it. This type
--   distinguishes between two packages which provide a module with the
--   same name, or a module from the same package compiled with different
--   dependencies. There are a few cases where Cabal needs to know about
--   module identities, e.g., when writing out reexported modules in the
--   InstalledPackageInfo.
data Module
Module :: DefUnitId -> ModuleName -> Module
instance Data.Binary.Class.Binary Distribution.Types.Module.Module
instance GHC.Internal.Data.Data.Data Distribution.Types.Module.Module
instance GHC.Classes.Eq Distribution.Types.Module.Module
instance GHC.Internal.Generics.Generic Distribution.Types.Module.Module
instance Control.DeepSeq.NFData Distribution.Types.Module.Module
instance GHC.Classes.Ord Distribution.Types.Module.Module
instance Distribution.Parsec.Parsec Distribution.Types.Module.Module
instance Distribution.Pretty.Pretty Distribution.Types.Module.Module
instance GHC.Internal.Read.Read Distribution.Types.Module.Module
instance GHC.Internal.Show.Show Distribution.Types.Module.Module
instance Distribution.Utils.Structured.Structured Distribution.Types.Module.Module

-- | This module defines the core data types for Backpack. For more
--   details, see:
--   
--   
--   https://github.com/ezyang/ghc-proposals/blob/backpack/proposals/0000-backpack.rst
module Distribution.Backpack

-- | An OpenUnitId describes a (possibly partially) instantiated
--   Backpack component, with a description of how the holes are filled in.
--   Unlike OpenUnitId, the ModuleSubst is kept in a
--   structured form that allows for substitution (which fills in holes.)
--   This form of unit cannot be installed. It must first be converted to a
--   UnitId.
--   
--   In the absence of Backpack, there are no holes to fill, so any such
--   component always has an empty module substitution; thus we can lossily
--   represent it as a 'DefiniteUnitId uid'.
--   
--   For a source component using Backpack, however, there is more
--   structure as components may be parametrized over some signatures, and
--   these "holes" may be partially or wholly filled.
--   
--   OpenUnitId plays an important role when we are mix-in linking, and is
--   recorded to the installed packaged database for indefinite packages;
--   however, for compiled packages that are fully instantiated, we
--   instantiate OpenUnitId into UnitId.
--   
--   For more details see the Backpack spec
--   https://github.com/ezyang/ghc-proposals/blob/backpack/proposals/0000-backpack.rst
data OpenUnitId

-- | Identifies a component which may have some unfilled holes; specifying
--   its ComponentId and its OpenModuleSubst. TODO: Invariant
--   that OpenModuleSubst is non-empty? See also the Text instance.
IndefFullUnitId :: ComponentId -> OpenModuleSubst -> OpenUnitId

-- | Identifies a fully instantiated component, which has been compiled and
--   abbreviated as a hash. The embedded UnitId MUST NOT be for an
--   indefinite component; an OpenUnitId is guaranteed not to have
--   any holes.
DefiniteUnitId :: DefUnitId -> OpenUnitId

-- | Get the set of holes (ModuleVar) embedded in a UnitId.
openUnitIdFreeHoles :: OpenUnitId -> Set ModuleName

-- | Safe constructor from a UnitId. The only way to do this safely is if
--   the instantiation is provided.
mkOpenUnitId :: UnitId -> ComponentId -> OpenModuleSubst -> OpenUnitId

-- | A UnitId for a definite package. The DefUnitId invariant
--   says that a UnitId identified this way is definite; i.e., it
--   has no unfilled holes.
data DefUnitId
unDefUnitId :: DefUnitId -> UnitId

-- | Create a DefUnitId from a ComponentId and an
--   instantiation with no holes.
mkDefUnitId :: ComponentId -> Map ModuleName Module -> DefUnitId

-- | Unlike a Module, an OpenModule is either an ordinary
--   module from some unit, OR an OpenModuleVar, representing a hole
--   that needs to be filled in. Substitutions are over module variables.
data OpenModule
OpenModule :: OpenUnitId -> ModuleName -> OpenModule
OpenModuleVar :: ModuleName -> OpenModule

-- | Get the set of holes (ModuleVar) embedded in a Module.
openModuleFreeHoles :: OpenModule -> Set ModuleName

-- | An explicit substitution on modules.
--   
--   NB: These substitutions are NOT idempotent, for example, a valid
--   substitution is (A -> B, B -> A).
type OpenModuleSubst = Map ModuleName OpenModule

-- | Pretty-print the entries of a module substitution, suitable for
--   embedding into a OpenUnitId or passing to GHC via
--   --instantiate-with.
dispOpenModuleSubst :: OpenModuleSubst -> Doc

-- | Pretty-print a single entry of a module substitution.
dispOpenModuleSubstEntry :: (ModuleName, OpenModule) -> Doc

-- | Inverse to dispModSubst.
parsecOpenModuleSubst :: CabalParsing m => m OpenModuleSubst

-- | Inverse to dispModSubstEntry.
parsecOpenModuleSubstEntry :: CabalParsing m => m (ModuleName, OpenModule)

-- | Get the set of holes (ModuleVar) embedded in a
--   OpenModuleSubst. This is NOT the domain of the substitution.
openModuleSubstFreeHoles :: OpenModuleSubst -> Set ModuleName

-- | When typechecking, we don't demand that a freshly instantiated
--   IndefFullUnitId be compiled; instead, we just depend on the
--   installed indefinite unit installed at the ComponentId.
abstractUnitId :: OpenUnitId -> UnitId

-- | Take a module substitution and hash it into a string suitable for
--   UnitId. Note that since this takes Module, not
--   OpenModule, you are responsible for recursively converting
--   OpenModule into Module. See also
--   Distribution.Backpack.ReadyComponent.
hashModuleSubst :: Map ModuleName Module -> Maybe String
instance Data.Binary.Class.Binary Distribution.Backpack.OpenModule
instance Data.Binary.Class.Binary Distribution.Backpack.OpenUnitId
instance GHC.Internal.Data.Data.Data Distribution.Backpack.OpenModule
instance GHC.Internal.Data.Data.Data Distribution.Backpack.OpenUnitId
instance GHC.Classes.Eq Distribution.Backpack.OpenModule
instance GHC.Classes.Eq Distribution.Backpack.OpenUnitId
instance GHC.Internal.Generics.Generic Distribution.Backpack.OpenModule
instance GHC.Internal.Generics.Generic Distribution.Backpack.OpenUnitId
instance Control.DeepSeq.NFData Distribution.Backpack.OpenModule
instance Control.DeepSeq.NFData Distribution.Backpack.OpenUnitId
instance GHC.Classes.Ord Distribution.Backpack.OpenModule
instance GHC.Classes.Ord Distribution.Backpack.OpenUnitId
instance Distribution.Parsec.Parsec Distribution.Backpack.OpenModule
instance Distribution.Parsec.Parsec Distribution.Backpack.OpenUnitId
instance Distribution.Pretty.Pretty Distribution.Backpack.OpenModule
instance Distribution.Pretty.Pretty Distribution.Backpack.OpenUnitId
instance GHC.Internal.Read.Read Distribution.Backpack.OpenModule
instance GHC.Internal.Read.Read Distribution.Backpack.OpenUnitId
instance GHC.Internal.Show.Show Distribution.Backpack.OpenModule
instance GHC.Internal.Show.Show Distribution.Backpack.OpenUnitId
instance Distribution.Utils.Structured.Structured Distribution.Backpack.OpenModule
instance Distribution.Utils.Structured.Structured Distribution.Backpack.OpenUnitId

module Distribution.Types.ExposedModule
data ExposedModule
ExposedModule :: ModuleName -> Maybe OpenModule -> ExposedModule
[exposedName] :: ExposedModule -> ModuleName
[exposedReexport] :: ExposedModule -> Maybe OpenModule
instance Data.Binary.Class.Binary Distribution.Types.ExposedModule.ExposedModule
instance GHC.Classes.Eq Distribution.Types.ExposedModule.ExposedModule
instance GHC.Internal.Generics.Generic Distribution.Types.ExposedModule.ExposedModule
instance Control.DeepSeq.NFData Distribution.Types.ExposedModule.ExposedModule
instance Distribution.Parsec.Parsec Distribution.Types.ExposedModule.ExposedModule
instance Distribution.Pretty.Pretty Distribution.Types.ExposedModule.ExposedModule
instance GHC.Internal.Read.Read Distribution.Types.ExposedModule.ExposedModule
instance GHC.Internal.Show.Show Distribution.Types.ExposedModule.ExposedModule
instance Distribution.Utils.Structured.Structured Distribution.Types.ExposedModule.ExposedModule

module Distribution.Types.PackageVersionConstraint

-- | A version constraint on a package. Different from
--   ExeDependency and Dependency since it does not
--   specify the need for a component, not even the main library. There are
--   a few places in the codebase where Dependency was used where
--   PackageVersionConstraint is not used instead (#5570).
data PackageVersionConstraint
PackageVersionConstraint :: PackageName -> VersionRange -> PackageVersionConstraint

thisPackageVersionConstraint :: PackageIdentifier -> PackageVersionConstraint

simplifyPackageVersionConstraint :: PackageVersionConstraint -> PackageVersionConstraint
instance Data.Binary.Class.Binary Distribution.Types.PackageVersionConstraint.PackageVersionConstraint
instance GHC.Internal.Data.Data.Data Distribution.Types.PackageVersionConstraint.PackageVersionConstraint
instance GHC.Classes.Eq Distribution.Types.PackageVersionConstraint.PackageVersionConstraint
instance GHC.Internal.Generics.Generic Distribution.Types.PackageVersionConstraint.PackageVersionConstraint
instance Control.DeepSeq.NFData Distribution.Types.PackageVersionConstraint.PackageVersionConstraint
instance Distribution.Parsec.Parsec Distribution.Types.PackageVersionConstraint.PackageVersionConstraint
instance Distribution.Pretty.Pretty Distribution.Types.PackageVersionConstraint.PackageVersionConstraint
instance GHC.Internal.Read.Read Distribution.Types.PackageVersionConstraint.PackageVersionConstraint
instance GHC.Internal.Show.Show Distribution.Types.PackageVersionConstraint.PackageVersionConstraint
instance Distribution.Utils.Structured.Structured Distribution.Types.PackageVersionConstraint.PackageVersionConstraint

module Distribution.Types.PackageId.Lens

-- | The name and version of a package.
data PackageIdentifier
pkgName :: Lens' PackageIdentifier PackageName
pkgVersion :: Lens' PackageIdentifier Version

module Distribution.Types.MungedPackageId

-- | A simple pair of a MungedPackageName and Version.
--   MungedPackageName is to MungedPackageId as
--   PackageName is to PackageId. See
--   MungedPackageName for more info.
data MungedPackageId
MungedPackageId :: MungedPackageName -> Version -> MungedPackageId

-- | The combined package and component name. see documentation for
--   MungedPackageName.
[mungedName] :: MungedPackageId -> MungedPackageName

-- | The version of this package / component, eg 1.2
[mungedVersion] :: MungedPackageId -> Version
computeCompatPackageId :: PackageId -> LibraryName -> MungedPackageId
instance Data.Binary.Class.Binary Distribution.Types.MungedPackageId.MungedPackageId
instance GHC.Internal.Data.Data.Data Distribution.Types.MungedPackageId.MungedPackageId
instance GHC.Classes.Eq Distribution.Types.MungedPackageId.MungedPackageId
instance GHC.Internal.Generics.Generic Distribution.Types.MungedPackageId.MungedPackageId
instance Control.DeepSeq.NFData Distribution.Types.MungedPackageId.MungedPackageId
instance GHC.Classes.Ord Distribution.Types.MungedPackageId.MungedPackageId
instance Distribution.Parsec.Parsec Distribution.Types.MungedPackageId.MungedPackageId
instance Distribution.Pretty.Pretty Distribution.Types.MungedPackageId.MungedPackageId
instance GHC.Internal.Read.Read Distribution.Types.MungedPackageId.MungedPackageId
instance GHC.Internal.Show.Show Distribution.Types.MungedPackageId.MungedPackageId
instance Distribution.Utils.Structured.Structured Distribution.Types.MungedPackageId.MungedPackageId

module Distribution.Types.LegacyExeDependency

-- | Describes a legacy `build-tools`-style dependency on an executable
--   
--   It is "legacy" because we do not know what the build-tool referred to.
--   It could refer to a pkg-config executable (PkgconfigName), or an
--   internal executable (UnqualComponentName). Thus the name is stringly
--   typed.
data LegacyExeDependency
LegacyExeDependency :: String -> VersionRange -> LegacyExeDependency
instance Data.Binary.Class.Binary Distribution.Types.LegacyExeDependency.LegacyExeDependency
instance GHC.Internal.Data.Data.Data Distribution.Types.LegacyExeDependency.LegacyExeDependency
instance GHC.Classes.Eq Distribution.Types.LegacyExeDependency.LegacyExeDependency
instance GHC.Internal.Generics.Generic Distribution.Types.LegacyExeDependency.LegacyExeDependency
instance Control.DeepSeq.NFData Distribution.Types.LegacyExeDependency.LegacyExeDependency
instance GHC.Classes.Ord Distribution.Types.LegacyExeDependency.LegacyExeDependency
instance Distribution.Parsec.Parsec Distribution.Types.LegacyExeDependency.LegacyExeDependency
instance Distribution.Pretty.Pretty Distribution.Types.LegacyExeDependency.LegacyExeDependency
instance GHC.Internal.Read.Read Distribution.Types.LegacyExeDependency.LegacyExeDependency
instance GHC.Internal.Show.Show Distribution.Types.LegacyExeDependency.LegacyExeDependency
instance Distribution.Utils.Structured.Structured Distribution.Types.LegacyExeDependency.LegacyExeDependency

module Distribution.Types.ExeDependency

-- | Describes a dependency on an executable from a package
data ExeDependency
ExeDependency :: PackageName -> UnqualComponentName -> VersionRange -> ExeDependency
qualifiedExeName :: ExeDependency -> ComponentName
instance Data.Binary.Class.Binary Distribution.Types.ExeDependency.ExeDependency
instance GHC.Internal.Data.Data.Data Distribution.Types.ExeDependency.ExeDependency
instance GHC.Classes.Eq Distribution.Types.ExeDependency.ExeDependency
instance GHC.Internal.Generics.Generic Distribution.Types.ExeDependency.ExeDependency
instance Control.DeepSeq.NFData Distribution.Types.ExeDependency.ExeDependency
instance GHC.Classes.Ord Distribution.Types.ExeDependency.ExeDependency
instance Distribution.Parsec.Parsec Distribution.Types.ExeDependency.ExeDependency
instance Distribution.Pretty.Pretty Distribution.Types.ExeDependency.ExeDependency
instance GHC.Internal.Read.Read Distribution.Types.ExeDependency.ExeDependency
instance GHC.Internal.Show.Show Distribution.Types.ExeDependency.ExeDependency
instance Distribution.Utils.Structured.Structured Distribution.Types.ExeDependency.ExeDependency

module Distribution.Types.Dependency

-- | Describes a dependency on a source package (API)
--   
--   Invariant: package name does not appear as LSubLibName
--   in set of library names.
--   
--   Note: Dependency is not an instance of Ord, and
--   so it cannot be used in Set or as the key to a Map. For
--   these and similar use cases see DependencyMap.
data Dependency

-- | The set of libraries required from the package. Only the selected
--   libraries will be built. It does not affect the cabal-install solver
--   yet.
Dependency :: PackageName -> VersionRange -> NonEmptySet LibraryName -> Dependency

-- | Smart constructor of Dependency.
--   
--   If PackageName is appears as LSubLibName in a set of
--   sublibraries, it is automatically converted to LMainLibName.
mkDependency :: PackageName -> VersionRange -> NonEmptySet LibraryName -> Dependency
depPkgName :: Dependency -> PackageName
depVerRange :: Dependency -> VersionRange
depLibraries :: Dependency -> NonEmptySet LibraryName

-- | Simplify the VersionRange expression in a Dependency.
--   See simplifyVersionRange.
simplifyDependency :: Dependency -> Dependency

-- | Library set with main library.
mainLibSet :: NonEmptySet LibraryName
instance Data.Binary.Class.Binary Distribution.Types.Dependency.Dependency
instance GHC.Internal.Data.Data.Data Distribution.Types.Dependency.Dependency
instance GHC.Classes.Eq Distribution.Types.Dependency.Dependency
instance GHC.Internal.Generics.Generic Distribution.Types.Dependency.Dependency
instance Control.DeepSeq.NFData Distribution.Types.Dependency.Dependency
instance GHC.Classes.Ord Distribution.Types.Dependency.Dependency
instance Distribution.Parsec.Parsec Distribution.Types.Dependency.Dependency
instance Distribution.Pretty.Pretty Distribution.Types.Dependency.Dependency
instance GHC.Internal.Read.Read Distribution.Types.Dependency.Dependency
instance GHC.Internal.Show.Show Distribution.Types.Dependency.Dependency
instance Distribution.Utils.Structured.Structured Distribution.Types.Dependency.Dependency

module Distribution.Types.SetupBuildInfo
data SetupBuildInfo
SetupBuildInfo :: [Dependency] -> Bool -> SetupBuildInfo
[setupDepends] :: SetupBuildInfo -> [Dependency]

-- | Is this a default 'custom-setup' section added by the cabal-install
--   code (as opposed to user-provided)? This field is only used
--   internally, and doesn't correspond to anything in the .cabal file. See
--   #3199.
[defaultSetupDepends] :: SetupBuildInfo -> Bool
instance Data.Binary.Class.Binary Distribution.Types.SetupBuildInfo.SetupBuildInfo
instance GHC.Internal.Data.Data.Data Distribution.Types.SetupBuildInfo.SetupBuildInfo
instance GHC.Classes.Eq Distribution.Types.SetupBuildInfo.SetupBuildInfo
instance GHC.Internal.Generics.Generic Distribution.Types.SetupBuildInfo.SetupBuildInfo
instance GHC.Internal.Base.Monoid Distribution.Types.SetupBuildInfo.SetupBuildInfo
instance Control.DeepSeq.NFData Distribution.Types.SetupBuildInfo.SetupBuildInfo
instance GHC.Classes.Ord Distribution.Types.SetupBuildInfo.SetupBuildInfo
instance GHC.Internal.Read.Read Distribution.Types.SetupBuildInfo.SetupBuildInfo
instance GHC.Internal.Base.Semigroup Distribution.Types.SetupBuildInfo.SetupBuildInfo
instance GHC.Internal.Show.Show Distribution.Types.SetupBuildInfo.SetupBuildInfo
instance Distribution.Utils.Structured.Structured Distribution.Types.SetupBuildInfo.SetupBuildInfo

module Distribution.Types.SetupBuildInfo.Lens
data SetupBuildInfo
setupDepends :: Lens' SetupBuildInfo [Dependency]
defaultSetupDepends :: Lens' SetupBuildInfo Bool

module Distribution.Types.DependencyMap

-- | A map of dependencies. Newtyped since the default monoid instance is
--   not appropriate. The monoid instance uses
--   intersectVersionRanges.
data DependencyMap
toDepMap :: [Dependency] -> DependencyMap
fromDepMap :: DependencyMap -> [Dependency]
constrainBy :: DependencyMap -> [PackageVersionConstraint] -> DependencyMap
instance GHC.Classes.Eq Distribution.Types.DependencyMap.DependencyMap
instance GHC.Internal.Base.Monoid Distribution.Types.DependencyMap.DependencyMap
instance GHC.Internal.Read.Read Distribution.Types.DependencyMap.DependencyMap
instance GHC.Internal.Base.Semigroup Distribution.Types.DependencyMap.DependencyMap
instance GHC.Internal.Show.Show Distribution.Types.DependencyMap.DependencyMap

module Distribution.Types.BenchmarkType

-- | The "benchmark-type" field in the benchmark stanza.
data BenchmarkType

-- | "type: exitcode-stdio-x.y"
BenchmarkTypeExe :: Version -> BenchmarkType

-- | Some unknown benchmark type e.g. "type: foo"
BenchmarkTypeUnknown :: String -> Version -> BenchmarkType
knownBenchmarkTypes :: [BenchmarkType]
benchmarkTypeExe :: BenchmarkType
instance Data.Binary.Class.Binary Distribution.Types.BenchmarkType.BenchmarkType
instance GHC.Internal.Data.Data.Data Distribution.Types.BenchmarkType.BenchmarkType
instance GHC.Classes.Eq Distribution.Types.BenchmarkType.BenchmarkType
instance GHC.Internal.Generics.Generic Distribution.Types.BenchmarkType.BenchmarkType
instance Control.DeepSeq.NFData Distribution.Types.BenchmarkType.BenchmarkType
instance GHC.Classes.Ord Distribution.Types.BenchmarkType.BenchmarkType
instance Distribution.Parsec.Parsec Distribution.Types.BenchmarkType.BenchmarkType
instance Distribution.Pretty.Pretty Distribution.Types.BenchmarkType.BenchmarkType
instance GHC.Internal.Read.Read Distribution.Types.BenchmarkType.BenchmarkType
instance GHC.Internal.Show.Show Distribution.Types.BenchmarkType.BenchmarkType
instance Distribution.Utils.Structured.Structured Distribution.Types.BenchmarkType.BenchmarkType

module Distribution.Types.BenchmarkInterface

-- | The benchmark interfaces that are currently defined.
--   
--   More interfaces may be defined in future, either new revisions or
--   totally new interfaces.
data BenchmarkInterface

-- | Benchmark interface "exitcode-stdio-1.0". The benchmark takes the form
--   of an executable. It returns a zero exit code for success, non-zero
--   for failure. The stdout and stderr channels may be logged. Test
--   tooling may pass command line arguments and/or connect the stdin
--   channel to the test.
BenchmarkExeV10 :: Version -> FilePath -> BenchmarkInterface

-- | A benchmark that does not conform to one of the above interfaces for
--   the given reason (e.g. unknown benchmark type).
BenchmarkUnsupported :: BenchmarkType -> BenchmarkInterface
instance Data.Binary.Class.Binary Distribution.Types.BenchmarkInterface.BenchmarkInterface
instance GHC.Internal.Data.Data.Data Distribution.Types.BenchmarkInterface.BenchmarkInterface
instance GHC.Classes.Eq Distribution.Types.BenchmarkInterface.BenchmarkInterface
instance GHC.Internal.Generics.Generic Distribution.Types.BenchmarkInterface.BenchmarkInterface
instance GHC.Internal.Base.Monoid Distribution.Types.BenchmarkInterface.BenchmarkInterface
instance Control.DeepSeq.NFData Distribution.Types.BenchmarkInterface.BenchmarkInterface
instance GHC.Classes.Ord Distribution.Types.BenchmarkInterface.BenchmarkInterface
instance GHC.Internal.Read.Read Distribution.Types.BenchmarkInterface.BenchmarkInterface
instance GHC.Internal.Base.Semigroup Distribution.Types.BenchmarkInterface.BenchmarkInterface
instance GHC.Internal.Show.Show Distribution.Types.BenchmarkInterface.BenchmarkInterface
instance Distribution.Utils.Structured.Structured Distribution.Types.BenchmarkInterface.BenchmarkInterface

-- | Defines a package identifier along with a parser and pretty printer
--   for it. PackageIdentifiers consist of a name and an exact
--   version. It also defines a Dependency data type. A dependency
--   is a package name and a version range, like "foo >= 1.2
--   && < 2".
module Distribution.Package

-- | Class of things that have a PackageIdentifier
--   
--   Types in this class are all notions of a package. This allows us to
--   have different types for the different phases that packages go though,
--   from simple name/id, package description, configured or installed
--   packages.
--   
--   Not all kinds of packages can be uniquely identified by a
--   PackageIdentifier. In particular, installed packages cannot,
--   there may be many installed instances of the same source package.
class Package pkg
packageId :: Package pkg => pkg -> PackageIdentifier
packageName :: Package pkg => pkg -> PackageName
packageVersion :: Package pkg => pkg -> Version
class HasMungedPackageId pkg
mungedId :: HasMungedPackageId pkg => pkg -> MungedPackageId
mungedName' :: HasMungedPackageId pkg => pkg -> MungedPackageName
mungedVersion' :: HasMungedPackageId munged => munged -> Version

-- | Packages that have an installed unit ID
class Package pkg => HasUnitId pkg
installedUnitId :: HasUnitId pkg => pkg -> UnitId

-- | Class of installed packages.
--   
--   The primary data type which is an instance of this package is
--   InstalledPackageInfo, but when we are doing install plans in
--   Cabal install we may have other, installed package-like things which
--   contain more metadata. Installed packages have exact dependencies
--   installedDepends.
class HasUnitId pkg => PackageInstalled pkg
installedDepends :: PackageInstalled pkg => pkg -> [UnitId]
instance Distribution.Package.HasMungedPackageId Distribution.Types.MungedPackageId.MungedPackageId
instance Distribution.Package.Package Distribution.Types.PackageId.PackageIdentifier

module Distribution.Types.AbiDependency

-- | An ABI dependency is a dependency on a library which also records the
--   ABI hash (abiHash) of the library it depends on.
--   
--   The primary utility of this is to enable an extra sanity when GHC
--   loads libraries: it can check if the dependency has a matching ABI and
--   if not, refuse to load this library. This information is critical if
--   we are shadowing libraries; differences in the ABI hash let us know
--   what packages get shadowed by the new version of a package.
data AbiDependency
AbiDependency :: UnitId -> AbiHash -> AbiDependency
[depUnitId] :: AbiDependency -> UnitId
[depAbiHash] :: AbiDependency -> AbiHash
instance Data.Binary.Class.Binary Distribution.Types.AbiDependency.AbiDependency
instance GHC.Classes.Eq Distribution.Types.AbiDependency.AbiDependency
instance GHC.Internal.Generics.Generic Distribution.Types.AbiDependency.AbiDependency
instance Control.DeepSeq.NFData Distribution.Types.AbiDependency.AbiDependency
instance Distribution.Parsec.Parsec Distribution.Types.AbiDependency.AbiDependency
instance Distribution.Pretty.Pretty Distribution.Types.AbiDependency.AbiDependency
instance GHC.Internal.Read.Read Distribution.Types.AbiDependency.AbiDependency
instance GHC.Internal.Show.Show Distribution.Types.AbiDependency.AbiDependency
instance Distribution.Utils.Structured.Structured Distribution.Types.AbiDependency.AbiDependency

-- | 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:
--   
--   
--   
- The Open Source Initiative (OSI)
--   
- The Free Software Foundation (FSF)
--   
--   
--   
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.
module Distribution.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.
data License

-- | GNU General Public License, version 2 or version 3.
GPL :: Maybe Version -> License

-- | GNU Affero General Public License, version 3.
AGPL :: Maybe Version -> License

-- | GNU Lesser General Public License, version 2.1 or version
--   3.
LGPL :: Maybe Version -> License

-- | 2-clause BSD license.
BSD2 :: License

-- | 3-clause BSD license.
BSD3 :: License

-- | 4-clause BSD license. This license has not been approved by the
--   OSI and is incompatible with the GNU GPL. It is provided for
--   historical reasons and should be avoided.
BSD4 :: License

-- | MIT license.
MIT :: License

-- | ISC license
ISC :: License

-- | Mozilla Public License, version 2.0.
MPL :: Version -> License

-- | Apache License, version 2.0.
Apache :: Maybe Version -> License

-- | The author of a package disclaims any copyright to its source code and
--   dedicates it to the public domain. This is not a software license.
--   Please note that it is not possible to dedicate works to the public
--   domain in every jurisdiction, nor is a work that is in the public
--   domain in one jurisdiction necessarily in the public domain elsewhere.
PublicDomain :: License

-- | Explicitly 'All Rights Reserved', eg for proprietary software. The
--   package may not be legally modified or redistributed by anyone but the
--   rightsholder.
AllRightsReserved :: License

-- | No license specified which legally defaults to 'All Rights Reserved'.
--   The package may not be legally modified or redistributed by anyone but
--   the rightsholder.
UnspecifiedLicense :: License

-- | Any other software license.
OtherLicense :: License

-- | Indicates an erroneous license name.
UnknownLicense :: String -> License

-- | The list of all currently recognised licenses.
knownLicenses :: [License]

-- | Convert old License to SPDX License. Non-SPDX licenses
--   are converted to LicenseRef.
licenseToSPDX :: License -> License

-- | Convert License to License,
--   
--   This is lossy conversion. We try our best.
--   
--   
--   >>> licenseFromSPDX . licenseToSPDX $ BSD3
--   BSD3
--   
--   
--   
--   >>> licenseFromSPDX . licenseToSPDX $ GPL (Just (mkVersion [3]))
--   GPL (Just (mkVersion [3]))
--   
--   
--   
--   >>> licenseFromSPDX . licenseToSPDX $ PublicDomain
--   UnknownLicense "LicenseRefPublicDomain"
--   
--   
--   
--   >>> licenseFromSPDX $ SPDX.License $ SPDX.simpleLicenseExpression SPDX.EUPL_1_1
--   UnknownLicense "EUPL-1.1"
--   
--   
--   
--   >>> licenseFromSPDX . licenseToSPDX $ AllRightsReserved
--   AllRightsReserved
--   
--   
--   
--   >>> licenseFromSPDX <$> simpleParsec "BSD-3-Clause OR GPL-3.0-only"
--   Just (UnknownLicense "BSD3ClauseORGPL30only")
--   
licenseFromSPDX :: License -> License
instance Data.Binary.Class.Binary Distribution.License.License
instance GHC.Internal.Data.Data.Data Distribution.License.License
instance GHC.Classes.Eq Distribution.License.License
instance GHC.Internal.Generics.Generic Distribution.License.License
instance Control.DeepSeq.NFData Distribution.License.License
instance GHC.Classes.Ord Distribution.License.License
instance Distribution.Parsec.Parsec Distribution.License.License
instance Distribution.Pretty.Pretty Distribution.License.License
instance GHC.Internal.Read.Read Distribution.License.License
instance GHC.Internal.Show.Show Distribution.License.License
instance Distribution.Utils.Structured.Structured Distribution.License.License

module Distribution.Types.InstalledPackageInfo
data InstalledPackageInfo
InstalledPackageInfo :: PackageId -> LibraryName -> ComponentId -> LibraryVisibility -> UnitId -> [(ModuleName, OpenModule)] -> String -> Either License License -> !ShortText -> !ShortText -> !ShortText -> !ShortText -> !ShortText -> !ShortText -> !ShortText -> !ShortText -> !ShortText -> AbiHash -> Bool -> Bool -> [ExposedModule] -> [ModuleName] -> Bool -> [FilePath] -> [FilePath] -> [FilePath] -> [FilePath] -> FilePath -> [String] -> [String] -> [String] -> [String] -> [FilePath] -> [String] -> [UnitId] -> [AbiDependency] -> [String] -> [String] -> [String] -> [FilePath] -> [String] -> [FilePath] -> [FilePath] -> Maybe FilePath -> InstalledPackageInfo
[sourcePackageId] :: InstalledPackageInfo -> PackageId
[sourceLibName] :: InstalledPackageInfo -> LibraryName
[installedComponentId_] :: InstalledPackageInfo -> ComponentId
[libVisibility] :: InstalledPackageInfo -> LibraryVisibility
[installedUnitId] :: InstalledPackageInfo -> UnitId
[instantiatedWith] :: InstalledPackageInfo -> [(ModuleName, OpenModule)]
[compatPackageKey] :: InstalledPackageInfo -> String
[license] :: InstalledPackageInfo -> Either License License
[copyright] :: InstalledPackageInfo -> !ShortText
[maintainer] :: InstalledPackageInfo -> !ShortText
[author] :: InstalledPackageInfo -> !ShortText
[stability] :: InstalledPackageInfo -> !ShortText
[homepage] :: InstalledPackageInfo -> !ShortText
[pkgUrl] :: InstalledPackageInfo -> !ShortText
[synopsis] :: InstalledPackageInfo -> !ShortText
[description] :: InstalledPackageInfo -> !ShortText
[category] :: InstalledPackageInfo -> !ShortText
[abiHash] :: InstalledPackageInfo -> AbiHash
[indefinite] :: InstalledPackageInfo -> Bool
[exposed] :: InstalledPackageInfo -> Bool
[exposedModules] :: InstalledPackageInfo -> [ExposedModule]
[hiddenModules] :: InstalledPackageInfo -> [ModuleName]
[trusted] :: InstalledPackageInfo -> Bool
[importDirs] :: InstalledPackageInfo -> [FilePath]
[libraryDirs] :: InstalledPackageInfo -> [FilePath]
[libraryDirsStatic] :: InstalledPackageInfo -> [FilePath]

-- | overrides libraryDirs
[libraryDynDirs] :: InstalledPackageInfo -> [FilePath]
[dataDir] :: InstalledPackageInfo -> FilePath
[hsLibraries] :: InstalledPackageInfo -> [String]
[extraLibraries] :: InstalledPackageInfo -> [String]
[extraLibrariesStatic] :: InstalledPackageInfo -> [String]
[extraGHCiLibraries] :: InstalledPackageInfo -> [String]
[includeDirs] :: InstalledPackageInfo -> [FilePath]
[includes] :: InstalledPackageInfo -> [String]
[depends] :: InstalledPackageInfo -> [UnitId]
[abiDepends] :: InstalledPackageInfo -> [AbiDependency]
[ccOptions] :: InstalledPackageInfo -> [String]
[cxxOptions] :: InstalledPackageInfo -> [String]
[ldOptions] :: InstalledPackageInfo -> [String]
[frameworkDirs] :: InstalledPackageInfo -> [FilePath]
[frameworks] :: InstalledPackageInfo -> [String]
[haddockInterfaces] :: InstalledPackageInfo -> [FilePath]
[haddockHTMLs] :: InstalledPackageInfo -> [FilePath]
[pkgRoot] :: InstalledPackageInfo -> Maybe FilePath
emptyInstalledPackageInfo :: InstalledPackageInfo
mungedPackageId :: InstalledPackageInfo -> MungedPackageId

-- | Returns the munged package name, which we write into name for
--   compatibility with old versions of GHC.
mungedPackageName :: InstalledPackageInfo -> MungedPackageName

-- | An ABI dependency is a dependency on a library which also records the
--   ABI hash (abiHash) of the library it depends on.
--   
--   The primary utility of this is to enable an extra sanity when GHC
--   loads libraries: it can check if the dependency has a matching ABI and
--   if not, refuse to load this library. This information is critical if
--   we are shadowing libraries; differences in the ABI hash let us know
--   what packages get shadowed by the new version of a package.
data AbiDependency
AbiDependency :: UnitId -> AbiHash -> AbiDependency
[depUnitId] :: AbiDependency -> UnitId
[depAbiHash] :: AbiDependency -> AbiHash
data ExposedModule
ExposedModule :: ModuleName -> Maybe OpenModule -> ExposedModule
[exposedName] :: ExposedModule -> ModuleName
[exposedReexport] :: ExposedModule -> Maybe OpenModule
instance Data.Binary.Class.Binary Distribution.Types.InstalledPackageInfo.InstalledPackageInfo
instance GHC.Classes.Eq Distribution.Types.InstalledPackageInfo.InstalledPackageInfo
instance GHC.Internal.Generics.Generic Distribution.Types.InstalledPackageInfo.InstalledPackageInfo
instance Distribution.Package.HasMungedPackageId Distribution.Types.InstalledPackageInfo.InstalledPackageInfo
instance Distribution.Package.HasUnitId Distribution.Types.InstalledPackageInfo.InstalledPackageInfo
instance Distribution.Compat.Graph.IsNode Distribution.Types.InstalledPackageInfo.InstalledPackageInfo
instance Control.DeepSeq.NFData Distribution.Types.InstalledPackageInfo.InstalledPackageInfo
instance Distribution.Package.PackageInstalled Distribution.Types.InstalledPackageInfo.InstalledPackageInfo
instance Distribution.Package.Package Distribution.Types.InstalledPackageInfo.InstalledPackageInfo
instance GHC.Internal.Read.Read Distribution.Types.InstalledPackageInfo.InstalledPackageInfo
instance GHC.Internal.Show.Show Distribution.Types.InstalledPackageInfo.InstalledPackageInfo
instance Distribution.Utils.Structured.Structured Distribution.Types.InstalledPackageInfo.InstalledPackageInfo

module Distribution.Types.InstalledPackageInfo.Lens
data InstalledPackageInfo
installedUnitId :: Lens' InstalledPackageInfo UnitId
sourcePackageId :: Lens' InstalledPackageInfo PackageIdentifier
license :: Lens' InstalledPackageInfo (Either License License)
abiHash :: Lens' InstalledPackageInfo AbiHash
sourceLibName :: Lens' InstalledPackageInfo LibraryName
installedComponentId_ :: Lens' InstalledPackageInfo ComponentId
libVisibility :: Lens' InstalledPackageInfo LibraryVisibility
instantiatedWith :: Lens' InstalledPackageInfo [(ModuleName, OpenModule)]
compatPackageKey :: Lens' InstalledPackageInfo String
copyright :: Lens' InstalledPackageInfo ShortText
maintainer :: Lens' InstalledPackageInfo ShortText
author :: Lens' InstalledPackageInfo ShortText
stability :: Lens' InstalledPackageInfo ShortText
homepage :: Lens' InstalledPackageInfo ShortText
pkgUrl :: Lens' InstalledPackageInfo ShortText
synopsis :: Lens' InstalledPackageInfo ShortText
description :: Lens' InstalledPackageInfo ShortText
category :: Lens' InstalledPackageInfo ShortText
indefinite :: Lens' InstalledPackageInfo Bool
exposed :: Lens' InstalledPackageInfo Bool
exposedModules :: Lens' InstalledPackageInfo [ExposedModule]
hiddenModules :: Lens' InstalledPackageInfo [ModuleName]
trusted :: Lens' InstalledPackageInfo Bool
importDirs :: Lens' InstalledPackageInfo [FilePath]
libraryDirs :: Lens' InstalledPackageInfo [FilePath]
libraryDirsStatic :: Lens' InstalledPackageInfo [FilePath]
libraryDynDirs :: Lens' InstalledPackageInfo [FilePath]
dataDir :: Lens' InstalledPackageInfo FilePath
hsLibraries :: Lens' InstalledPackageInfo [String]
extraLibraries :: Lens' InstalledPackageInfo [String]
extraLibrariesStatic :: Lens' InstalledPackageInfo [String]
extraGHCiLibraries :: Lens' InstalledPackageInfo [String]
includeDirs :: Lens' InstalledPackageInfo [FilePath]
includes :: Lens' InstalledPackageInfo [String]
depends :: Lens' InstalledPackageInfo [UnitId]
abiDepends :: Lens' InstalledPackageInfo [AbiDependency]
ccOptions :: Lens' InstalledPackageInfo [String]
cxxOptions :: Lens' InstalledPackageInfo [String]
ldOptions :: Lens' InstalledPackageInfo [String]
frameworkDirs :: Lens' InstalledPackageInfo [FilePath]
frameworks :: Lens' InstalledPackageInfo [String]
haddockInterfaces :: Lens' InstalledPackageInfo [FilePath]
haddockHTMLs :: Lens' InstalledPackageInfo [FilePath]
pkgRoot :: Lens' InstalledPackageInfo (Maybe FilePath)

-- | A parse result type for parsers from AST to Haskell types.
module Distribution.Fields.ParseResult

-- | A monad with failure and accumulating errors and warnings.
data ParseResult a

-- | Destruct a ParseResult into the emitted warnings and either a
--   successful value or list of errors and possibly recovered a
--   spec-version declaration.
runParseResult :: ParseResult a -> ([PWarning], Either (Maybe Version, NonEmpty PError) a)

-- | Recover the parse result, so we can proceed parsing.
--   runParseResult will still result in Nothing, if there
--   are recorded errors.
recoverWith :: ParseResult a -> a -> ParseResult a

-- | Add a warning. This doesn't fail the parsing process.
parseWarning :: Position -> PWarnType -> String -> ParseResult ()

-- | Add multiple warnings at once.
parseWarnings :: [PWarning] -> ParseResult ()

-- | Add an error, but not fail the parser yet.
--   
--   For fatal failure use parseFatalFailure
parseFailure :: Position -> String -> ParseResult ()

-- | Add an fatal error.
parseFatalFailure :: Position -> String -> ParseResult a

-- | A mzero.
parseFatalFailure' :: ParseResult a

-- | Get cabal spec version.
getCabalSpecVersion :: ParseResult (Maybe Version)

-- | Set cabal spec version.
setCabalSpecVersion :: Maybe Version -> ParseResult ()

-- | Forget ParseResults warnings.
withoutWarnings :: ParseResult a -> ParseResult a
instance GHC.Internal.Base.Applicative Distribution.Fields.ParseResult.ParseResult
instance GHC.Internal.Base.Functor Distribution.Fields.ParseResult.ParseResult
instance GHC.Internal.Base.Monad Distribution.Fields.ParseResult.ParseResult

-- | Utilities to work with .cabal like file structure.
module Distribution.Fields

-- | A Cabal-like file consists of a series of fields (foo: bar)
--   and sections (library ...).
data Field ann
Field :: !Name ann -> [FieldLine ann] -> Field ann
Section :: !Name ann -> [SectionArg ann] -> [Field ann] -> Field ann

-- | A field name.
--   
--   Invariant: ByteString is lower-case ASCII.
data Name ann
Name :: !ann -> !FieldName -> Name ann

-- | A line of text representing the value of a field from a Cabal file. A
--   field may contain multiple lines.
--   
--   Invariant: ByteString has no newlines.
data FieldLine ann
FieldLine :: !ann -> !ByteString -> FieldLine ann

-- | Section arguments, e.g. name of the library
data SectionArg ann

-- | identifier, or something which looks like number. Also many dot
--   numbers, i.e. "7.6.3"
SecArgName :: !ann -> !ByteString -> SectionArg ann

-- | quoted string
SecArgStr :: !ann -> !ByteString -> SectionArg ann

-- | everything else, mm. operators (e.g. in if-section conditionals)
SecArgOther :: !ann -> !ByteString -> SectionArg ann
type FieldName = ByteString

-- | Parse cabal style ByteString into list of Fields, i.e.
--   the cabal AST.
--   
--   readFields assumes that input ByteString is valid UTF8,
--   specifically it doesn't validate that file is valid UTF8. Therefore
--   bytestrings inside returned Field will be invalid as UTF8 if
--   the input were.
--   
--   
--   >>> readFields "foo: \223"
--   Right [Field (Name (Position 1 1) "foo") [FieldLine (Position 1 6) "\223"]]
--   
--   
--   readFields won't (necessarily) fail on invalid UTF8 data, but
--   the reported positions may be off.
--   
--   You may get weird errors on non-UTF8 input, for example
--   readFields will fail on latin1 encoded non-breaking space:
--   
--   
--   >>> isLeft (readFields "\xa0 foo: bar")
--   True
--   
--   
--   That is rejected because parser thinks \xa0 is a section
--   name, and section arguments may not contain colon. If there are just
--   latin1 non-breaking spaces, they become part of the name:
--   
--   
--   >>> readFields "\xa0\&foo: bar"
--   Right [Field (Name (Position 1 1) "\160foo") [FieldLine (Position 1 7) "bar"]]
--   
--   
--   The UTF8 non-breaking space is accepted as an indentation character
--   (but warned about by readFields').
--   
--   
--   >>> readFields' "\xc2\xa0 foo: bar"
--   Right ([Field (Name (Position 1 3) "foo") [FieldLine (Position 1 8) "bar"]],[LexWarning LexWarningNBSP (Position 1 1)])
--   
readFields :: ByteString -> Either ParseError [Field Position]

-- | Like readFields but also return lexer warnings.
readFields' :: ByteString -> Either ParseError ([Field Position], [LexWarning])

-- | A monad with failure and accumulating errors and warnings.
data ParseResult a

-- | Destruct a ParseResult into the emitted warnings and either a
--   successful value or list of errors and possibly recovered a
--   spec-version declaration.
runParseResult :: ParseResult a -> ([PWarning], Either (Maybe Version, NonEmpty PError) a)

-- | Add a warning. This doesn't fail the parsing process.
parseWarning :: Position -> PWarnType -> String -> ParseResult ()

-- | Add multiple warnings at once.
parseWarnings :: [PWarning] -> ParseResult ()

-- | Add an error, but not fail the parser yet.
--   
--   For fatal failure use parseFatalFailure
parseFailure :: Position -> String -> ParseResult ()

-- | Add an fatal error.
parseFatalFailure :: Position -> String -> ParseResult a

-- | Type of parser warning. We do classify warnings.
--   
--   Different application may decide not to show some, or have fatal
--   behaviour on others
data PWarnType

-- | Unclassified warning
PWTOther :: PWarnType

-- | Invalid UTF encoding
PWTUTF :: PWarnType

-- | true or false, not True or False
PWTBoolCase :: PWarnType

-- | there are version with tags
PWTVersionTag :: PWarnType

-- | New syntax used, but no cabal-version: >= 1.2 specified
PWTNewSyntax :: PWarnType

-- | Old syntax used, and cabal-version >= 1.2 specified
PWTOldSyntax :: PWarnType
PWTDeprecatedField :: PWarnType
PWTInvalidSubsection :: PWarnType
PWTUnknownField :: PWarnType
PWTUnknownSection :: PWarnType
PWTTrailingFields :: PWarnType

-- | extra main-is field
PWTExtraMainIs :: PWarnType

-- | extra test-module field
PWTExtraTestModule :: PWarnType

-- | extra benchmark-module field
PWTExtraBenchmarkModule :: PWarnType
PWTLexNBSP :: PWarnType
PWTLexBOM :: PWarnType
PWTLexTab :: PWarnType

-- | legacy cabal file that we know how to patch
PWTQuirkyCabalFile :: PWarnType

-- | Double dash token, most likely it's a mistake - it's not a comment
PWTDoubleDash :: PWarnType

-- | e.g. name or version should be specified only once.
PWTMultipleSingularField :: PWarnType

-- | Workaround for derive-package having build-type: Default. See
--   https://github.com/haskell/cabal/issues/5020.
PWTBuildTypeDefault :: PWarnType

-- | Version operators used (without cabal-version: 1.8)
PWTVersionOperator :: PWarnType

-- | Version wildcard used (without cabal-version: 1.6)
PWTVersionWildcard :: PWarnType

-- | Warnings about cabal-version format.
PWTSpecVersion :: PWarnType

-- | Empty filepath, i.e. literally ""
PWTEmptyFilePath :: PWarnType

-- | sections contents (sections and fields) are indented inconsistently
PWTInconsistentIndentation :: PWarnType

-- | Experimental feature
PWTExperimental :: PWarnType

-- | Parser warning.
data PWarning
PWarning :: !PWarnType -> !Position -> String -> PWarning
showPWarning :: FilePath -> PWarning -> String

-- | Parser error.
data PError
PError :: Position -> String -> PError
showPError :: FilePath -> PError -> String

-- | This type is used to discern when a comment block should go before or
--   after a cabal-like file field, otherwise it would be hardcoded to a
--   single position. It is often used in conjunction with
--   PrettyField.
data CommentPosition
CommentBefore :: [String] -> CommentPosition
CommentAfter :: [String] -> CommentPosition
NoComment :: CommentPosition
data PrettyField ann
PrettyField :: ann -> FieldName -> Doc -> PrettyField ann
PrettySection :: ann -> FieldName -> [Doc] -> [PrettyField ann] -> PrettyField ann
PrettyEmpty :: PrettyField ann

-- | Prettyprint a list of fields.
--   
--   Note: the first argument should return Strings without newlines
--   and properly prefixes (with --) to count as comments. This
--   unsafety is left in place so one could generate empty lines between
--   comment lines.
showFields :: (ann -> CommentPosition) -> [PrettyField ann] -> String
genericFromParsecFields :: Applicative f => (FieldName -> [FieldLine ann] -> f Doc) -> (FieldName -> [SectionArg ann] -> f [Doc]) -> [Field ann] -> f [PrettyField ann]

-- | Simple variant of genericFromParsecField
fromParsecFields :: [Field ann] -> [PrettyField ann]

-- | Haskell language dialects and extensions
module Language.Haskell.Extension

-- | This represents a Haskell language dialect.
--   
--   Language Extensions are interpreted relative to one of these
--   base languages.
data Language

-- | The Haskell 98 language as defined by the Haskell 98 report.
--   http://haskell.org/onlinereport/
Haskell98 :: Language

-- | The Haskell 2010 language as defined by the Haskell 2010 report.
--   http://www.haskell.org/onlinereport/haskell2010
Haskell2010 :: Language

-- | The GHC2021 collection of language extensions.
--   https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0380-ghc2021.rst
GHC2021 :: Language

-- | The GHC2024 collection of language extensions.
--   https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0613-ghc2024.rst
GHC2024 :: Language

-- | An unknown language, identified by its name.
UnknownLanguage :: String -> Language

-- | List of known (supported) languages for GHC, oldest first.
knownLanguages :: [Language]
classifyLanguage :: String -> Language

-- | This represents language extensions beyond a base Language
--   definition (such as Haskell98) that are supported by some
--   implementations, usually in some special mode.
--   
--   Where applicable, references are given to an implementation's official
--   documentation.
data Extension

-- | Enable a known extension
EnableExtension :: KnownExtension -> Extension

-- | Disable a known extension
DisableExtension :: KnownExtension -> Extension

-- | An unknown extension, identified by the name of its LANGUAGE
--   pragma.
UnknownExtension :: String -> Extension

-- | Known Haskell language extensions, including deprecated and
--   undocumented ones.
--   
--   Check “Overview of all language extensions” in GHC User’s Guide
--   for more information.
data KnownExtension

-- | Allow overlapping class instances, provided there is a unique most
--   specific instance for each use.
OverlappingInstances :: KnownExtension

-- | Ignore structural rules guaranteeing the termination of class instance
--   resolution. Termination is guaranteed by a fixed-depth recursion
--   stack, and compilation may fail if this depth is exceeded.
UndecidableInstances :: KnownExtension

-- | Implies OverlappingInstances. Allow the implementation to
--   choose an instance even when it is possible that further instantiation
--   of types will lead to a more specific instance being applicable.
IncoherentInstances :: KnownExtension

-- | (deprecated) Deprecated in favour of RecursiveDo.
--   
--   Old description: Allow recursive bindings in do blocks, using
--   the rec keyword. See also RecursiveDo.
DoRec :: KnownExtension

-- | Allow recursive bindings in do blocks, using the rec
--   keyword, or mdo, a variant of do.
RecursiveDo :: KnownExtension

-- | Provide syntax for writing list comprehensions which iterate over
--   several lists together, like the zipWith family of functions.
ParallelListComp :: KnownExtension

-- | Allow multiple parameters in a type class.
MultiParamTypeClasses :: KnownExtension

-- | Enable the dreaded monomorphism restriction.
MonomorphismRestriction :: KnownExtension

-- | Enable deep subsumption, relaxing the simple subsumption rules,
--   implicitly inserting eta-expansions when matching up function types
--   with different quantification structures.
DeepSubsumption :: KnownExtension

-- | Allow a specification attached to a multi-parameter type class which
--   indicates that some parameters are entirely determined by others. The
--   implementation will check that this property holds for the declared
--   instances, and will use this property to reduce ambiguity in instance
--   resolution.
FunctionalDependencies :: KnownExtension

-- | (deprecated) A synonym for RankNTypes.
--   
--   Old description: Like RankNTypes but does not allow a
--   higher-rank type to itself appear on the left of a function arrow.
Rank2Types :: KnownExtension

-- | Allow a universally-quantified type to occur on the left of a function
--   arrow.
RankNTypes :: KnownExtension

-- | (deprecated) A synonym for RankNTypes.
--   
--   Old description: Allow data constructors to have polymorphic
--   arguments. Unlike RankNTypes, does not allow this for ordinary
--   functions.
PolymorphicComponents :: KnownExtension

-- | Allow existentially-quantified data constructors.
ExistentialQuantification :: KnownExtension

-- | Cause a type variable in a signature, which has an explicit
--   forall quantifier, to scope over the definition of the
--   accompanying value declaration.
ScopedTypeVariables :: KnownExtension

-- | Deprecated, use ScopedTypeVariables instead.
PatternSignatures :: KnownExtension

-- | Enable implicit function parameters with dynamic scope.
ImplicitParams :: KnownExtension

-- | Relax some restrictions on the form of the context of a type
--   signature.
FlexibleContexts :: KnownExtension

-- | Relax some restrictions on the form of the context of an instance
--   declaration.
FlexibleInstances :: KnownExtension

-- | Allow data type declarations with no constructors.
EmptyDataDecls :: KnownExtension

-- | Run the C preprocessor on Haskell source code.
CPP :: KnownExtension

-- | Allow an explicit kind signature giving the kind of types over which a
--   type variable ranges.
KindSignatures :: KnownExtension

-- | Enable a form of pattern which forces evaluation before an attempted
--   match, and a form of strict let/where binding.
BangPatterns :: KnownExtension

-- | Allow type synonyms in instance heads.
TypeSynonymInstances :: KnownExtension

-- | Enable Template Haskell, a system for compile-time metaprogramming.
TemplateHaskell :: KnownExtension

-- | Enable the Foreign Function Interface. In GHC, implements the standard
--   Haskell 98 Foreign Function Interface Addendum, plus some GHC-specific
--   extensions.
ForeignFunctionInterface :: KnownExtension

-- | Enable arrow notation.
Arrows :: KnownExtension

-- | (deprecated) Enable generic type classes, with default
--   instances defined in terms of the algebraic structure of a type.
Generics :: KnownExtension

-- | Enable the implicit importing of the module Prelude. When
--   disabled, when desugaring certain built-in syntax into ordinary
--   identifiers, use whatever is in scope rather than the Prelude
--   -- version.
ImplicitPrelude :: KnownExtension

-- | Enable syntax for implicitly binding local names corresponding to the
--   field names of a record. Puns bind specific names, unlike
--   RecordWildCards.
NamedFieldPuns :: KnownExtension

-- | Enable a form of guard which matches a pattern and binds variables.
PatternGuards :: KnownExtension

-- | Allow a type declared with newtype to use deriving
--   for any class with an instance for the underlying type.
GeneralizedNewtypeDeriving :: KnownExtension
GeneralisedNewtypeDeriving :: KnownExtension

-- | Enable the "Trex" extensible records system.
ExtensibleRecords :: KnownExtension

-- | Enable type synonyms which are transparent in some definitions and
--   opaque elsewhere, as a way of implementing abstract datatypes.
RestrictedTypeSynonyms :: KnownExtension

-- | Enable an alternate syntax for string literals, with string
--   templating.
HereDocuments :: KnownExtension

-- | Allow the character # as a postfix modifier on identifiers.
--   Also enables literal syntax for unboxed values.
MagicHash :: KnownExtension

-- | Allow data types and type synonyms which are indexed by types, i.e.
--   ad-hoc polymorphism for types.
TypeFamilies :: KnownExtension

-- | Allow a standalone declaration which invokes the type class
--   deriving mechanism.
StandaloneDeriving :: KnownExtension

-- | Allow certain Unicode characters to stand for certain ASCII character
--   sequences, e.g. keywords and punctuation.
UnicodeSyntax :: KnownExtension

-- | Allow the use of unboxed types as foreign types, e.g. in foreign
--   import and foreign export.
UnliftedFFITypes :: KnownExtension

-- | Enable interruptible FFI.
InterruptibleFFI :: KnownExtension

-- | Allow use of CAPI FFI calling convention (foreign import
--   capi).
CApiFFI :: KnownExtension

-- | Defer validity checking of types until after expanding type synonyms,
--   relaxing the constraints on how synonyms may be used.
LiberalTypeSynonyms :: KnownExtension

-- | Allow the name of a type constructor, type class, or type variable to
--   be an infix operator.
TypeOperators :: KnownExtension

-- | Enable syntax for implicitly binding local names corresponding to the
--   field names of a record. A wildcard binds all unmentioned names,
--   unlike NamedFieldPuns.
RecordWildCards :: KnownExtension

-- | Deprecated, use NamedFieldPuns instead.
RecordPuns :: KnownExtension

-- | Allow a record field name to be disambiguated by the type of the
--   record it's in.
DisambiguateRecordFields :: KnownExtension

-- | Enable traditional record syntax (as supported by Haskell 98)
TraditionalRecordSyntax :: KnownExtension

-- | Enable overloading of string literals using a type class, much like
--   integer literals.
OverloadedStrings :: KnownExtension

-- | Enable generalized algebraic data types, in which type variables may
--   be instantiated on a per-constructor basis. Implies GADTSyntax.
GADTs :: KnownExtension

-- | Enable GADT syntax for declaring ordinary algebraic datatypes.
GADTSyntax :: KnownExtension

-- | (deprecated) Has no effect.
--   
--   Old description: Make pattern bindings monomorphic.
MonoPatBinds :: KnownExtension

-- | Relax the requirements on mutually-recursive polymorphic functions.
RelaxedPolyRec :: KnownExtension

-- | Allow default instantiation of polymorphic types in more situations.
ExtendedDefaultRules :: KnownExtension

-- | Enable unboxed tuples.
UnboxedTuples :: KnownExtension

-- | Enable deriving for classes Typeable and Data.
DeriveDataTypeable :: KnownExtension

-- | Enable deriving for Generic and Generic1.
DeriveGeneric :: KnownExtension

-- | Enable support for default signatures.
DefaultSignatures :: KnownExtension

-- | Allow type signatures to be specified in instance declarations.
InstanceSigs :: KnownExtension

-- | Allow a class method's type to place additional constraints on a class
--   type variable.
ConstrainedClassMethods :: KnownExtension

-- | Allow imports to be qualified by the package name the module is
--   intended to be imported from, e.g.
--   
--   
--   import "network" Network.Socket
--   
PackageImports :: KnownExtension

-- | (deprecated) Allow a type variable to be instantiated at a
--   polymorphic type.
ImpredicativeTypes :: KnownExtension

-- | (deprecated) Change the syntax for qualified infix operators.
NewQualifiedOperators :: KnownExtension

-- | Relax the interpretation of left operator sections to allow unary
--   postfix operators.
PostfixOperators :: KnownExtension

-- | Enable quasi-quotation, a mechanism for defining new concrete syntax
--   for expressions and patterns.
QuasiQuotes :: KnownExtension

-- | Enable generalized list comprehensions, supporting operations such as
--   sorting and grouping.
TransformListComp :: KnownExtension

-- | Enable monad comprehensions, which generalise the list comprehension
--   syntax to work for any monad.
MonadComprehensions :: KnownExtension

-- | Enable view patterns, which match a value by applying a function and
--   matching on the result.
ViewPatterns :: KnownExtension

-- | Allow concrete XML syntax to be used in expressions and patterns, as
--   per the Haskell Server Pages extension language:
--   http://www.haskell.org/haskellwiki/HSP. The ideas behind it are
--   discussed in the paper "Haskell Server Pages through Dynamic Loading"
--   by Niklas Broberg, from Haskell Workshop '05.
XmlSyntax :: KnownExtension

-- | Allow regular pattern matching over lists, as discussed in the paper
--   "Regular Expression Patterns" by Niklas Broberg, Andreas Farre and
--   Josef Svenningsson, from ICFP '04.
RegularPatterns :: KnownExtension

-- | Enable the use of tuple sections, e.g. (, True) desugars into
--   x -> (x, True).
TupleSections :: KnownExtension

-- | Allow GHC primops, written in C--, to be imported into a Haskell file.
GHCForeignImportPrim :: KnownExtension

-- | Support for patterns of the form n + k, where k is
--   an integer literal.
NPlusKPatterns :: KnownExtension

-- | Improve the layout rule when if expressions are used in a
--   do block.
DoAndIfThenElse :: KnownExtension

-- | Enable support for multi-way if-expressions.
MultiWayIf :: KnownExtension

-- | Enable support lambda-case expressions.
LambdaCase :: KnownExtension

-- | Makes much of the Haskell sugar be desugared into calls to the
--   function with a particular name that is in scope.
RebindableSyntax :: KnownExtension

-- | Make forall a keyword in types, which can be used to give the
--   generalisation explicitly.
ExplicitForAll :: KnownExtension

-- | Allow contexts to be put on datatypes, e.g. the Eq a in
--   data Eq a => Set a = NilSet | ConsSet a (Set a).
DatatypeContexts :: KnownExtension

-- | Local (let and where) bindings are monomorphic.
MonoLocalBinds :: KnownExtension

-- | Enable deriving for the Functor class.
DeriveFunctor :: KnownExtension

-- | Enable deriving for the Traversable class.
DeriveTraversable :: KnownExtension

-- | Enable deriving for the Foldable class.
DeriveFoldable :: KnownExtension

-- | Enable non-decreasing indentation for do blocks.
NondecreasingIndentation :: KnownExtension

-- | Allow imports to be qualified with a safe keyword that requires the
--   imported module be trusted as according to the Safe Haskell definition
--   of trust.
--   
--   
--   import safe Network.Socket
--   
SafeImports :: KnownExtension

-- | Compile a module in the Safe, Safe Haskell mode -- a restricted form
--   of the Haskell language to ensure type safety.
Safe :: KnownExtension

-- | Compile a module in the Trustworthy, Safe Haskell mode -- no
--   restrictions apply but the module is marked as trusted as long as the
--   package the module resides in is trusted.
Trustworthy :: KnownExtension

-- | Compile a module in the Unsafe, Safe Haskell mode so that modules
--   compiled using Safe, Safe Haskell mode can't import it.
Unsafe :: KnownExtension

-- | Allow type classimplicit parameterequality constraints to be
--   used as types with the special kind constraint. Also generalise the
--   (ctxt => ty) syntax so that any type of kind constraint
--   can occur before the arrow.
ConstraintKinds :: KnownExtension

-- | Enable kind polymorphism.
PolyKinds :: KnownExtension

-- | Enable datatype promotion.
DataKinds :: KnownExtension

-- | Enable type data declarations, defining constructors at the
--   type level.
TypeData :: KnownExtension

-- | Enable parallel arrays syntax ([:, :]) for Data
--   Parallel Haskell.
ParallelArrays :: KnownExtension

-- | Enable explicit role annotations, like in (type role Foo
--   representational representational).
RoleAnnotations :: KnownExtension

-- | Enable overloading of list literals, arithmetic sequences and list
--   patterns using the IsList type class.
OverloadedLists :: KnownExtension

-- | Enable case expressions that have no alternatives. Also applies to
--   lambda-case expressions if they are enabled.
EmptyCase :: KnownExtension

-- | (deprecated) Deprecated in favour of DeriveDataTypeable.
--   
--   Old description: Triggers the generation of derived Typeable
--   instances for every datatype and type class declaration.
AutoDeriveTypeable :: KnownExtension

-- | Desugars negative literals directly (without using negate).
NegativeLiterals :: KnownExtension

-- | Allow the use of binary integer literal syntax (e.g.
--   0b11001001 to denote 201).
BinaryLiterals :: KnownExtension

-- | Allow the use of floating literal syntax for all instances of
--   Num, including Int and Integer.
NumDecimals :: KnownExtension

-- | Enable support for type classes with no type parameter.
NullaryTypeClasses :: KnownExtension

-- | Enable explicit namespaces in module import/export lists.
ExplicitNamespaces :: KnownExtension

-- | Allow the user to write ambiguous types, and the type inference engine
--   to infer them.
AllowAmbiguousTypes :: KnownExtension

-- | Enable foreign import javascript.
JavaScriptFFI :: KnownExtension

-- | Allow giving names to and abstracting over patterns.
PatternSynonyms :: KnownExtension

-- | Allow anonymous placeholders (underscore) inside type signatures. The
--   type inference engine will generate a message describing the type
--   inferred at the hole's location.
PartialTypeSignatures :: KnownExtension

-- | Allow named placeholders written with a leading underscore inside type
--   signatures. Wildcards with the same name unify to the same type.
NamedWildCards :: KnownExtension

-- | Enable deriving for any class.
DeriveAnyClass :: KnownExtension

-- | Enable deriving for the Lift class.
DeriveLift :: KnownExtension

-- | Enable support for 'static pointers' (and the static keyword)
--   to refer to globally stable names, even across different programs.
StaticPointers :: KnownExtension

-- | Switches data type declarations to be strict by default (as if they
--   had a bang using BangPatterns), and allow opt-in field
--   laziness using ~.
StrictData :: KnownExtension

-- | Switches all pattern bindings to be strict by default (as if they had
--   a bang using BangPatterns), ordinary patterns are recovered
--   using ~. Implies StrictData.
Strict :: KnownExtension

-- | Allows do-notation for types that are
--   Applicative as well as Monad. When
--   enabled, desugaring do notation tries to use
--   (*) and fmap and join
--   as far as possible.
ApplicativeDo :: KnownExtension

-- | Allow records to use duplicated field labels for accessors.
DuplicateRecordFields :: KnownExtension

-- | Enable explicit type applications with the syntax id @Int.
TypeApplications :: KnownExtension

-- | Dissolve the distinction between types and kinds, allowing the
--   compiler to reason about kind equality and therefore enabling GADTs to
--   be promoted to the type-level.
TypeInType :: KnownExtension

-- | Allow recursive (and therefore undecidable) super-class relationships.
UndecidableSuperClasses :: KnownExtension

-- | A temporary extension to help library authors check if their code will
--   compile with the new planned desugaring of fail.
MonadFailDesugaring :: KnownExtension

-- | A subset of TemplateHaskell including only quoting.
TemplateHaskellQuotes :: KnownExtension

-- | Allows use of the #label syntax.
OverloadedLabels :: KnownExtension

-- | Allow functional dependency annotations on type families to declare
--   them as injective.
TypeFamilyDependencies :: KnownExtension

-- | Allow multiple deriving clauses, each optionally qualified
--   with a strategy.
DerivingStrategies :: KnownExtension

-- | Enable deriving instances via types of the same runtime
--   representation. Implies DerivingStrategies.
DerivingVia :: KnownExtension

-- | Enable the use of unboxed sum syntax.
UnboxedSums :: KnownExtension

-- | Allow use of hexadecimal literal notation for floating-point values.
HexFloatLiterals :: KnownExtension

-- | Allow do blocks etc. in argument position.
BlockArguments :: KnownExtension

-- | Allow use of underscores in numeric literals.
NumericUnderscores :: KnownExtension

-- | Allow forall in constraints.
QuantifiedConstraints :: KnownExtension

-- | Have * refer to Type.
StarIsType :: KnownExtension

-- | Liberalises deriving to provide instances for empty data types.
EmptyDataDeriving :: KnownExtension

-- | Enable detection of complete user-supplied kind signatures.
CUSKs :: KnownExtension

-- | Allows the syntax import M qualified.
ImportQualifiedPost :: KnownExtension

-- | Allow the use of standalone kind signatures.
StandaloneKindSignatures :: KnownExtension

-- | Enable unlifted newtypes.
UnliftedNewtypes :: KnownExtension

-- | Use whitespace to determine whether the minus sign stands for negation
--   or subtraction.
LexicalNegation :: KnownExtension

-- | Enable qualified do-notation desugaring.
QualifiedDo :: KnownExtension

-- | Enable linear types.
LinearTypes :: KnownExtension

-- | Allow the use of visible forall in types of terms.
RequiredTypeArguments :: KnownExtension

-- | Enable the generation of selector functions corresponding to record
--   fields.
FieldSelectors :: KnownExtension

-- | Enable the use of record dot-accessor and updater syntax
OverloadedRecordDot :: KnownExtension

-- | Provides record . syntax in record updates, e.g. x
--   {foo.bar = 1}.
OverloadedRecordUpdate :: KnownExtension

-- | Enable data types for which an unlifted or levity-polymorphic result
--   kind is inferred.
UnliftedDatatypes :: KnownExtension

-- | Enable syntax for primitive numeric literals, e.g. 3#Int8
ExtendedLiterals :: KnownExtension

-- | Undocumented parsing-related extensions introduced in GHC 7.0.
AlternativeLayoutRule :: KnownExtension

-- | Undocumented parsing-related extensions introduced in GHC 7.0.
AlternativeLayoutRuleTransitional :: KnownExtension

-- | Undocumented parsing-related extensions introduced in GHC 7.2.
RelaxedLayout :: KnownExtension

-- | Allow the use of type abstraction syntax.
TypeAbstractions :: KnownExtension

-- | Allow the use of built-in syntax for list, tuple and sum type
--   constructors rather than being exclusive to data constructors.
ListTuplePuns :: KnownExtension

-- | Extensions that have been deprecated, possibly paired with another
--   extension that replaces it.
deprecatedExtensions :: [(Extension, Maybe Extension)]
classifyExtension :: String -> Extension
knownExtensions :: [KnownExtension]
instance Data.Binary.Class.Binary Language.Haskell.Extension.Extension
instance Data.Binary.Class.Binary Language.Haskell.Extension.KnownExtension
instance Data.Binary.Class.Binary Language.Haskell.Extension.Language
instance GHC.Internal.Enum.Bounded Language.Haskell.Extension.KnownExtension
instance GHC.Internal.Data.Data.Data Language.Haskell.Extension.Extension
instance GHC.Internal.Data.Data.Data Language.Haskell.Extension.KnownExtension
instance GHC.Internal.Data.Data.Data Language.Haskell.Extension.Language
instance GHC.Internal.Enum.Enum Language.Haskell.Extension.KnownExtension
instance GHC.Classes.Eq Language.Haskell.Extension.Extension
instance GHC.Classes.Eq Language.Haskell.Extension.KnownExtension
instance GHC.Classes.Eq Language.Haskell.Extension.Language
instance GHC.Internal.Generics.Generic Language.Haskell.Extension.Extension
instance GHC.Internal.Generics.Generic Language.Haskell.Extension.KnownExtension
instance GHC.Internal.Generics.Generic Language.Haskell.Extension.Language
instance Control.DeepSeq.NFData Language.Haskell.Extension.Extension
instance Control.DeepSeq.NFData Language.Haskell.Extension.KnownExtension
instance Control.DeepSeq.NFData Language.Haskell.Extension.Language
instance GHC.Classes.Ord Language.Haskell.Extension.Extension
instance GHC.Classes.Ord Language.Haskell.Extension.KnownExtension
instance GHC.Classes.Ord Language.Haskell.Extension.Language
instance Distribution.Parsec.Parsec Language.Haskell.Extension.Extension
instance Distribution.Parsec.Parsec Language.Haskell.Extension.Language
instance Distribution.Pretty.Pretty Language.Haskell.Extension.Extension
instance Distribution.Pretty.Pretty Language.Haskell.Extension.KnownExtension
instance Distribution.Pretty.Pretty Language.Haskell.Extension.Language
instance GHC.Internal.Read.Read Language.Haskell.Extension.Extension
instance GHC.Internal.Read.Read Language.Haskell.Extension.KnownExtension
instance GHC.Internal.Read.Read Language.Haskell.Extension.Language
instance GHC.Internal.Show.Show Language.Haskell.Extension.Extension
instance GHC.Internal.Show.Show Language.Haskell.Extension.KnownExtension
instance GHC.Internal.Show.Show Language.Haskell.Extension.Language
instance Distribution.Utils.Structured.Structured Language.Haskell.Extension.Extension
instance Distribution.Utils.Structured.Structured Language.Haskell.Extension.KnownExtension
instance Distribution.Utils.Structured.Structured Language.Haskell.Extension.Language

-- | This has an enumeration of the various compilers that Cabal knows
--   about. It also specifies the default compiler. Sadly you'll often see
--   code that does case analysis on this compiler flavour enumeration
--   like:
--   
--   
--   case compilerFlavor comp of
--     GHC -> GHC.getInstalledPackages verbosity packageDb progdb
--   
--   
--   Obviously it would be better to use the proper Compiler
--   abstraction because that would keep all the compiler-specific code
--   together. Unfortunately we cannot make this change yet without
--   breaking the UserHooks api, which would break all custom
--   Setup.hs files, so for the moment we just have to live with
--   this deficiency. If you're interested, see ticket #57.
module Distribution.Compiler
data CompilerFlavor
GHC :: CompilerFlavor
GHCJS :: CompilerFlavor
NHC :: CompilerFlavor
YHC :: CompilerFlavor
Hugs :: CompilerFlavor
HBC :: CompilerFlavor
Helium :: CompilerFlavor
JHC :: CompilerFlavor
LHC :: CompilerFlavor
UHC :: CompilerFlavor
Eta :: CompilerFlavor
MHS :: CompilerFlavor
HaskellSuite :: String -> CompilerFlavor
OtherCompiler :: String -> CompilerFlavor
buildCompilerId :: CompilerId
buildCompilerFlavor :: CompilerFlavor

-- | The default compiler flavour to pick when compiling stuff. This
--   defaults to the compiler used to build the Cabal lib.
--   
--   However if it's not a recognised compiler then it's Nothing and
--   the user will have to specify which compiler they want.
defaultCompilerFlavor :: Maybe CompilerFlavor
classifyCompilerFlavor :: String -> CompilerFlavor
knownCompilerFlavors :: [CompilerFlavor]

-- | PerCompilerFlavor carries only info per GHC and GHCJS
--   
--   Cabal parses only ghc-options and ghcjs-options,
--   others are omitted.
data PerCompilerFlavor v
PerCompilerFlavor :: v -> v -> PerCompilerFlavor v
perCompilerFlavorToList :: PerCompilerFlavor v -> [(CompilerFlavor, v)]
data CompilerId
CompilerId :: CompilerFlavor -> Version -> CompilerId

-- | Compiler information used for resolving configurations. Some fields
--   can be set to Nothing to indicate that the information is unknown.
data CompilerInfo
CompilerInfo :: CompilerId -> AbiTag -> Maybe [CompilerId] -> Maybe [Language] -> Maybe [Extension] -> CompilerInfo

-- | Compiler flavour and version.
[compilerInfoId] :: CompilerInfo -> CompilerId

-- | Tag for distinguishing incompatible ABI's on the same architecture/os.
[compilerInfoAbiTag] :: CompilerInfo -> AbiTag

-- | Other implementations that this compiler claims to be compatible with,
--   if known.
[compilerInfoCompat] :: CompilerInfo -> Maybe [CompilerId]

-- | Supported language standards, if known.
[compilerInfoLanguages] :: CompilerInfo -> Maybe [Language]

-- | Supported extensions, if known.
[compilerInfoExtensions] :: CompilerInfo -> Maybe [Extension]

-- | Make a CompilerInfo of which only the known information is its
--   CompilerId, its AbiTag and that it does not claim to be compatible
--   with other compiler id's.
unknownCompilerInfo :: CompilerId -> AbiTag -> CompilerInfo
data AbiTag
NoAbiTag :: AbiTag
AbiTag :: String -> AbiTag
abiTagString :: AbiTag -> String
instance Data.Binary.Class.Binary Distribution.Compiler.AbiTag
instance Data.Binary.Class.Binary Distribution.Compiler.CompilerFlavor
instance Data.Binary.Class.Binary Distribution.Compiler.CompilerId
instance Data.Binary.Class.Binary Distribution.Compiler.CompilerInfo
instance Data.Binary.Class.Binary a => Data.Binary.Class.Binary (Distribution.Compiler.PerCompilerFlavor a)
instance GHC.Internal.Data.Data.Data Distribution.Compiler.CompilerFlavor
instance GHC.Internal.Data.Data.Data v => GHC.Internal.Data.Data.Data (Distribution.Compiler.PerCompilerFlavor v)
instance GHC.Classes.Eq Distribution.Compiler.AbiTag
instance GHC.Classes.Eq Distribution.Compiler.CompilerFlavor
instance GHC.Classes.Eq Distribution.Compiler.CompilerId
instance GHC.Classes.Eq v => GHC.Classes.Eq (Distribution.Compiler.PerCompilerFlavor v)
instance GHC.Internal.Data.Foldable.Foldable Distribution.Compiler.PerCompilerFlavor
instance GHC.Internal.Base.Functor Distribution.Compiler.PerCompilerFlavor
instance GHC.Internal.Generics.Generic Distribution.Compiler.AbiTag
instance GHC.Internal.Generics.Generic Distribution.Compiler.CompilerFlavor
instance GHC.Internal.Generics.Generic Distribution.Compiler.CompilerId
instance GHC.Internal.Generics.Generic Distribution.Compiler.CompilerInfo
instance GHC.Internal.Generics.Generic (Distribution.Compiler.PerCompilerFlavor v)
instance (GHC.Internal.Base.Semigroup a, GHC.Internal.Base.Monoid a) => GHC.Internal.Base.Monoid (Distribution.Compiler.PerCompilerFlavor a)
instance Control.DeepSeq.NFData Distribution.Compiler.CompilerFlavor
instance Control.DeepSeq.NFData Distribution.Compiler.CompilerId
instance Control.DeepSeq.NFData a => Control.DeepSeq.NFData (Distribution.Compiler.PerCompilerFlavor a)
instance GHC.Classes.Ord Distribution.Compiler.CompilerFlavor
instance GHC.Classes.Ord Distribution.Compiler.CompilerId
instance GHC.Classes.Ord v => GHC.Classes.Ord (Distribution.Compiler.PerCompilerFlavor v)
instance Distribution.Parsec.Parsec Distribution.Compiler.AbiTag
instance Distribution.Parsec.Parsec Distribution.Compiler.CompilerFlavor
instance Distribution.Parsec.Parsec Distribution.Compiler.CompilerId
instance Distribution.Pretty.Pretty Distribution.Compiler.AbiTag
instance Distribution.Pretty.Pretty Distribution.Compiler.CompilerFlavor
instance Distribution.Pretty.Pretty Distribution.Compiler.CompilerId
instance GHC.Internal.Read.Read Distribution.Compiler.AbiTag
instance GHC.Internal.Read.Read Distribution.Compiler.CompilerFlavor
instance GHC.Internal.Read.Read Distribution.Compiler.CompilerId
instance GHC.Internal.Read.Read Distribution.Compiler.CompilerInfo
instance GHC.Internal.Read.Read v => GHC.Internal.Read.Read (Distribution.Compiler.PerCompilerFlavor v)
instance GHC.Internal.Base.Semigroup a => GHC.Internal.Base.Semigroup (Distribution.Compiler.PerCompilerFlavor a)
instance GHC.Internal.Show.Show Distribution.Compiler.AbiTag
instance GHC.Internal.Show.Show Distribution.Compiler.CompilerFlavor
instance GHC.Internal.Show.Show Distribution.Compiler.CompilerId
instance GHC.Internal.Show.Show Distribution.Compiler.CompilerInfo
instance GHC.Internal.Show.Show v => GHC.Internal.Show.Show (Distribution.Compiler.PerCompilerFlavor v)
instance Distribution.Utils.Structured.Structured Distribution.Compiler.AbiTag
instance Distribution.Utils.Structured.Structured Distribution.Compiler.CompilerFlavor
instance Distribution.Utils.Structured.Structured Distribution.Compiler.CompilerId
instance Distribution.Utils.Structured.Structured a => Distribution.Utils.Structured.Structured (Distribution.Compiler.PerCompilerFlavor a)
instance GHC.Internal.Data.Traversable.Traversable Distribution.Compiler.PerCompilerFlavor

module Distribution.Types.ConfVar

-- | A ConfVar represents the variable type used.
data ConfVar
OS :: OS -> ConfVar
Arch :: Arch -> ConfVar
PackageFlag :: FlagName -> ConfVar
Impl :: CompilerFlavor -> VersionRange -> ConfVar
instance Data.Binary.Class.Binary Distribution.Types.ConfVar.ConfVar
instance GHC.Internal.Data.Data.Data Distribution.Types.ConfVar.ConfVar
instance GHC.Classes.Eq Distribution.Types.ConfVar.ConfVar
instance GHC.Internal.Generics.Generic Distribution.Types.ConfVar.ConfVar
instance Control.DeepSeq.NFData Distribution.Types.ConfVar.ConfVar
instance GHC.Internal.Show.Show Distribution.Types.ConfVar.ConfVar
instance Distribution.Utils.Structured.Structured Distribution.Types.ConfVar.ConfVar

module Distribution.Fields.ConfVar

-- | Parse Condition ConfVar from section arguments
--   provided by parsec based outline parser.
parseConditionConfVar :: [SectionArg Position] -> ParseResult (Condition ConfVar)
parseConditionConfVarFromClause :: ByteString -> Either ParseError (Condition ConfVar)

module Distribution.Types.BuildInfo
data BuildInfo
BuildInfo :: Bool -> [LegacyExeDependency] -> [ExeDependency] -> [String] -> [String] -> [String] -> [String] -> [String] -> [String] -> [String] -> [PkgconfigDependency] -> [String] -> [String] -> [FilePath] -> [FilePath] -> [FilePath] -> [FilePath] -> [FilePath] -> [SymbolicPath PackageDir SourceDir] -> [ModuleName] -> [ModuleName] -> [ModuleName] -> Maybe Language -> [Language] -> [Extension] -> [Extension] -> [Extension] -> [String] -> [String] -> [String] -> [String] -> [String] -> [String] -> [String] -> [String] -> [FilePath] -> [FilePath] -> [FilePath] -> [FilePath] -> PerCompilerFlavor [String] -> PerCompilerFlavor [String] -> PerCompilerFlavor [String] -> PerCompilerFlavor [String] -> [(String, String)] -> [Dependency] -> [Mixin] -> BuildInfo

-- | component is buildable here
[buildable] :: BuildInfo -> Bool

-- | Tools needed to build this bit.
--   
--   This is a legacy field that buildToolDepends largely
--   supersedes.
--   
--   Unless use are very sure what you are doing, use the functions in
--   Distribution.Simple.BuildToolDepends rather than accessing this
--   field directly.
[buildTools] :: BuildInfo -> [LegacyExeDependency]

-- | Haskell tools needed to build this bit
--   
--   This field is better than buildTools because it allows one to
--   precisely specify an executable in a package.
--   
--   Unless use are very sure what you are doing, use the functions in
--   Distribution.Simple.BuildToolDepends rather than accessing this
--   field directly.
[buildToolDepends] :: BuildInfo -> [ExeDependency]

-- | options for pre-processing Haskell code
[cppOptions] :: BuildInfo -> [String]

-- | options for assembler
[asmOptions] :: BuildInfo -> [String]

-- | options for C-- compiler
[cmmOptions] :: BuildInfo -> [String]

-- | options for C compiler
[ccOptions] :: BuildInfo -> [String]

-- | options for C++ compiler
[cxxOptions] :: BuildInfo -> [String]

-- | options for linker
[ldOptions] :: BuildInfo -> [String]

-- | options for hsc2hs
[hsc2hsOptions] :: BuildInfo -> [String]

-- | pkg-config packages that are used
[pkgconfigDepends] :: BuildInfo -> [PkgconfigDependency]

-- | support frameworks for Mac OS X
[frameworks] :: BuildInfo -> [String]

-- | extra locations to find frameworks.
[extraFrameworkDirs] :: BuildInfo -> [String]

-- | Assembly files.
[asmSources] :: BuildInfo -> [FilePath]

-- | C-- files.
[cmmSources] :: BuildInfo -> [FilePath]
[cSources] :: BuildInfo -> [FilePath]
[cxxSources] :: BuildInfo -> [FilePath]
[jsSources] :: BuildInfo -> [FilePath]

-- | where to look for the Haskell module hierarchy
[hsSourceDirs] :: BuildInfo -> [SymbolicPath PackageDir SourceDir]

-- | non-exposed or non-main modules
[otherModules] :: BuildInfo -> [ModuleName]

-- | exposed modules that do not have a source file (e.g. GHC.Prim
--   from ghc-prim package)
[virtualModules] :: BuildInfo -> [ModuleName]

-- | not present on sdist, Paths_* or user-generated with a custom Setup.hs
[autogenModules] :: BuildInfo -> [ModuleName]

-- | language used when not explicitly specified
[defaultLanguage] :: BuildInfo -> Maybe Language

-- | other languages used within the package
[otherLanguages] :: BuildInfo -> [Language]

-- | language extensions used by all modules
[defaultExtensions] :: BuildInfo -> [Extension]

-- | other language extensions used within the package
[otherExtensions] :: BuildInfo -> [Extension]

-- | the old extensions field, treated same as defaultExtensions
[oldExtensions] :: BuildInfo -> [Extension]

-- | what libraries to link with when compiling a program that uses your
--   package
[extraLibs] :: BuildInfo -> [String]

-- | what libraries to link with when compiling a program fully statically
--   that uses your package
[extraLibsStatic] :: BuildInfo -> [String]

-- | if present, overrides extraLibs when package is loaded with GHCi.
[extraGHCiLibs] :: BuildInfo -> [String]

-- | if present, adds libs to hs-libraries, which become part of the
--   package. Example 1: the Cffi library shipping with the rts, alongside
--   the HSrts-1.0.a,.o,... Example 2: a library that is being built by a
--   foreign tool (e.g. rust) and copied and registered together with this
--   library. The logic on how this library is built will have to be
--   encoded in a custom Setup for now. Otherwise cabal would need to learn
--   how to call arbitrary library builders.
[extraBundledLibs] :: BuildInfo -> [String]

-- | Hidden Flag. This set of strings, will be appended to all libraries
--   when copying. E.g. [libHSname_flavour | flavour <-
--   extraLibFlavours]. This should only be needed in very specific cases,
--   e.g. the rts package, where there are multiple copies of
--   slightly differently built libs.
[extraLibFlavours] :: BuildInfo -> [String]

-- | Hidden Flag. This set of strings will be appended to all
--   dynamic libraries when copying. This is particularly useful
--   with the rts package, where we want different dynamic
--   flavours of the RTS library to be installed.
[extraDynLibFlavours] :: BuildInfo -> [String]
[extraLibDirs] :: BuildInfo -> [String]
[extraLibDirsStatic] :: BuildInfo -> [String]

-- | directories to find .h files
[includeDirs] :: BuildInfo -> [FilePath]

-- | The .h files to be found in includeDirs
[includes] :: BuildInfo -> [FilePath]

-- | The .h files to be generated (e.g. by autoconf)
[autogenIncludes] :: BuildInfo -> [FilePath]

-- | .h files to install with the package
[installIncludes] :: BuildInfo -> [FilePath]
[options] :: BuildInfo -> PerCompilerFlavor [String]
[profOptions] :: BuildInfo -> PerCompilerFlavor [String]
[sharedOptions] :: BuildInfo -> PerCompilerFlavor [String]
[staticOptions] :: BuildInfo -> PerCompilerFlavor [String]

-- | Custom fields starting with x-, stored in a simple assoc-list.
[customFieldsBI] :: BuildInfo -> [(String, String)]

-- | Dependencies specific to a library or executable target
[targetBuildDepends] :: BuildInfo -> [Dependency]
[mixins] :: BuildInfo -> [Mixin]
emptyBuildInfo :: BuildInfo

-- | The Languages used by this component
allLanguages :: BuildInfo -> [Language]

-- | The Extensions that are used somewhere by this component
allExtensions :: BuildInfo -> [Extension]

-- | The Extensions that are used by all modules in this component
usedExtensions :: BuildInfo -> [Extension]

-- | Whether any modules in this component use Template Haskell or Quasi
--   Quotes
usesTemplateHaskellOrQQ :: BuildInfo -> Bool

-- | Select options for a particular Haskell compiler.
hcOptions :: CompilerFlavor -> BuildInfo -> [String]
hcProfOptions :: CompilerFlavor -> BuildInfo -> [String]
hcSharedOptions :: CompilerFlavor -> BuildInfo -> [String]
hcStaticOptions :: CompilerFlavor -> BuildInfo -> [String]
instance Data.Binary.Class.Binary Distribution.Types.BuildInfo.BuildInfo
instance GHC.Internal.Data.Data.Data Distribution.Types.BuildInfo.BuildInfo
instance GHC.Classes.Eq Distribution.Types.BuildInfo.BuildInfo
instance GHC.Internal.Generics.Generic Distribution.Types.BuildInfo.BuildInfo
instance GHC.Internal.Base.Monoid Distribution.Types.BuildInfo.BuildInfo
instance Control.DeepSeq.NFData Distribution.Types.BuildInfo.BuildInfo
instance GHC.Classes.Ord Distribution.Types.BuildInfo.BuildInfo
instance GHC.Internal.Read.Read Distribution.Types.BuildInfo.BuildInfo
instance GHC.Internal.Base.Semigroup Distribution.Types.BuildInfo.BuildInfo
instance GHC.Internal.Show.Show Distribution.Types.BuildInfo.BuildInfo
instance Distribution.Utils.Structured.Structured Distribution.Types.BuildInfo.BuildInfo

module Distribution.Types.HookedBuildInfo

-- | HookedBuildInfo is mechanism that hooks can use to override the
--   BuildInfos inside packages. One example use-case (which is used
--   in core libraries today) is as a way of passing flags which are
--   computed by a configure script into Cabal. In this case, the autoconf
--   build type adds hooks to read in a textual HookedBuildInfo
--   format prior to doing any operations.
--   
--   Quite honestly, this mechanism is a massive hack since we shouldn't be
--   editing the PackageDescription data structure (it's easy to
--   assume that this data structure shouldn't change and run into bugs,
--   see for example 1c20a6328579af9e37677d507e2e9836ef70ab9d). But it's a
--   bit convenient, because there isn't another data structure that allows
--   adding extra BuildInfo style things.
--   
--   In any case, a lot of care has to be taken to make sure the
--   HookedBuildInfo is applied to the PackageDescription.
--   In general this process occurs in Distribution.Simple, which is
--   responsible for orchestrating the hooks mechanism. The general
--   strategy:
--   
--   
--   
- We run the pre-hook, which produces a HookedBuildInfo
--   (e.g., in the Autoconf case, it reads it out from a file).
--   
- We sanity-check the hooked build info with
--   sanityCheckHookedBuildInfo.
--   
- We update our PackageDescription (either freshly read or
--   cached from LocalBuildInfo) with
--   updatePackageDescription.
--   
--   
--   In principle, we are also supposed to update the copy of the
--   PackageDescription stored in LocalBuildInfo at
--   localPkgDescr. Unfortunately, in practice, there are lots of
--   Custom setup scripts which fail to update localPkgDescr so
--   you really shouldn't rely on it. It's not DEPRECATED because there are
--   legitimate uses for it, but... yeah. Sharp knife. See
--   https://github.com/haskell/cabal/issues/3606 for more
--   information on the issue.
--   
--   It is not well-specified whether or not a HookedBuildInfo
--   applied at configure time is persistent to the
--   LocalBuildInfo. The fact that HookedBuildInfo is
--   passed to confHook MIGHT SUGGEST that the
--   HookedBuildInfo is applied at this time, but actually since
--   9317b67e6122ab14e53f81b573bd0ecb388eca5a it has been ONLY used to
--   create a modified package description that we check for problems: it
--   is never actually saved to the LBI. Since HookedBuildInfo is
--   applied monoidally to the existing build infos (and it is not an
--   idempotent monoid), it could break things to save it, since we are
--   obligated to apply any new HookedBuildInfo and then we'd get
--   the effect twice. But this does mean we have to re-apply it every
--   time. Hey, it's more flexibility.
type HookedBuildInfo = (Maybe BuildInfo, [(UnqualComponentName, BuildInfo)])
emptyHookedBuildInfo :: HookedBuildInfo

module Distribution.Types.BuildInfo.Lens
data BuildInfo

-- | Classy lenses for BuildInfo.
class HasBuildInfo a
buildInfo :: HasBuildInfo a => Lens' a BuildInfo
buildable :: HasBuildInfo a => Lens' a Bool
buildTools :: HasBuildInfo a => Lens' a [LegacyExeDependency]
buildToolDepends :: HasBuildInfo a => Lens' a [ExeDependency]
cppOptions :: HasBuildInfo a => Lens' a [String]
asmOptions :: HasBuildInfo a => Lens' a [String]
cmmOptions :: HasBuildInfo a => Lens' a [String]
ccOptions :: HasBuildInfo a => Lens' a [String]
cxxOptions :: HasBuildInfo a => Lens' a [String]
ldOptions :: HasBuildInfo a => Lens' a [String]
hsc2hsOptions :: HasBuildInfo a => Lens' a [String]
pkgconfigDepends :: HasBuildInfo a => Lens' a [PkgconfigDependency]
frameworks :: HasBuildInfo a => Lens' a [String]
extraFrameworkDirs :: HasBuildInfo a => Lens' a [String]
asmSources :: HasBuildInfo a => Lens' a [FilePath]
cmmSources :: HasBuildInfo a => Lens' a [FilePath]
cSources :: HasBuildInfo a => Lens' a [FilePath]
cxxSources :: HasBuildInfo a => Lens' a [FilePath]
jsSources :: HasBuildInfo a => Lens' a [FilePath]
hsSourceDirs :: HasBuildInfo a => Lens' a [SymbolicPath PackageDir SourceDir]
otherModules :: HasBuildInfo a => Lens' a [ModuleName]
virtualModules :: HasBuildInfo a => Lens' a [ModuleName]
autogenModules :: HasBuildInfo a => Lens' a [ModuleName]
defaultLanguage :: HasBuildInfo a => Lens' a (Maybe Language)
otherLanguages :: HasBuildInfo a => Lens' a [Language]
defaultExtensions :: HasBuildInfo a => Lens' a [Extension]
otherExtensions :: HasBuildInfo a => Lens' a [Extension]
oldExtensions :: HasBuildInfo a => Lens' a [Extension]
extraLibs :: HasBuildInfo a => Lens' a [String]
extraLibsStatic :: HasBuildInfo a => Lens' a [String]
extraGHCiLibs :: HasBuildInfo a => Lens' a [String]
extraBundledLibs :: HasBuildInfo a => Lens' a [String]
extraLibFlavours :: HasBuildInfo a => Lens' a [String]
extraDynLibFlavours :: HasBuildInfo a => Lens' a [String]
extraLibDirs :: HasBuildInfo a => Lens' a [String]
extraLibDirsStatic :: HasBuildInfo a => Lens' a [String]
includeDirs :: HasBuildInfo a => Lens' a [FilePath]
includes :: HasBuildInfo a => Lens' a [FilePath]
autogenIncludes :: HasBuildInfo a => Lens' a [FilePath]
installIncludes :: HasBuildInfo a => Lens' a [FilePath]
options :: HasBuildInfo a => Lens' a (PerCompilerFlavor [String])
profOptions :: HasBuildInfo a => Lens' a (PerCompilerFlavor [String])
sharedOptions :: HasBuildInfo a => Lens' a (PerCompilerFlavor [String])
staticOptions :: HasBuildInfo a => Lens' a (PerCompilerFlavor [String])
customFieldsBI :: HasBuildInfo a => Lens' a [(String, String)]
targetBuildDepends :: HasBuildInfo a => Lens' a [Dependency]
mixins :: HasBuildInfo a => Lens' a [Mixin]
class HasBuildInfos a
traverseBuildInfos :: HasBuildInfos a => Traversal' a BuildInfo
instance Distribution.Types.BuildInfo.Lens.HasBuildInfo Distribution.Types.BuildInfo.BuildInfo

module Distribution.Types.TestSuite

-- | A "test-suite" stanza in a cabal file.
data TestSuite
TestSuite :: UnqualComponentName -> TestSuiteInterface -> BuildInfo -> [String] -> TestSuite
[testName] :: TestSuite -> UnqualComponentName
[testInterface] :: TestSuite -> TestSuiteInterface
[testBuildInfo] :: TestSuite -> BuildInfo
[testCodeGenerators] :: TestSuite -> [String]
emptyTestSuite :: TestSuite
testType :: TestSuite -> TestType

-- | Get all the module names from a test suite.
testModules :: TestSuite -> [ModuleName]

-- | Get all the auto generated module names from a test suite. This are a
--   subset of testModules.
testModulesAutogen :: TestSuite -> [ModuleName]
instance Data.Binary.Class.Binary Distribution.Types.TestSuite.TestSuite
instance GHC.Internal.Data.Data.Data Distribution.Types.TestSuite.TestSuite
instance GHC.Classes.Eq Distribution.Types.TestSuite.TestSuite
instance GHC.Internal.Generics.Generic Distribution.Types.TestSuite.TestSuite
instance Distribution.Types.BuildInfo.Lens.HasBuildInfo Distribution.Types.TestSuite.TestSuite
instance GHC.Internal.Base.Monoid Distribution.Types.TestSuite.TestSuite
instance Control.DeepSeq.NFData Distribution.Types.TestSuite.TestSuite
instance GHC.Classes.Ord Distribution.Types.TestSuite.TestSuite
instance GHC.Internal.Read.Read Distribution.Types.TestSuite.TestSuite
instance GHC.Internal.Base.Semigroup Distribution.Types.TestSuite.TestSuite
instance GHC.Internal.Show.Show Distribution.Types.TestSuite.TestSuite
instance Distribution.Utils.Structured.Structured Distribution.Types.TestSuite.TestSuite

module Distribution.Types.TestSuite.Lens

-- | A "test-suite" stanza in a cabal file.
data TestSuite
testBuildInfo :: Lens' TestSuite BuildInfo
testName :: Lens' TestSuite UnqualComponentName
testInterface :: Lens' TestSuite TestSuiteInterface

module Distribution.Types.Library
data Library
Library :: LibraryName -> [ModuleName] -> [ModuleReexport] -> [ModuleName] -> Bool -> LibraryVisibility -> BuildInfo -> Library
[libName] :: Library -> LibraryName
[exposedModules] :: Library -> [ModuleName]
[reexportedModules] :: Library -> [ModuleReexport]

-- | What sigs need implementations?
[signatures] :: Library -> [ModuleName]

-- | Is the lib to be exposed by default? (i.e. whether its modules
--   available in GHCi for example)
[libExposed] :: Library -> Bool

-- | Whether this multilib can be used as a dependency for other packages.
[libVisibility] :: Library -> LibraryVisibility
[libBuildInfo] :: Library -> BuildInfo
emptyLibrary :: Library

-- | Get all the module names from the library (exposed and internal
--   modules) which are explicitly listed in the package description which
--   would need to be compiled. (This does not include reexports, which do
--   not need to be compiled.) This may not include all modules for which
--   GHC generated interface files (i.e., implicit modules.)
explicitLibModules :: Library -> [ModuleName]

-- | Get all the auto generated module names from the library, exposed or
--   not. This are a subset of libModules.
libModulesAutogen :: Library -> [ModuleName]
instance Data.Binary.Class.Binary Distribution.Types.Library.Library
instance GHC.Internal.Data.Data.Data Distribution.Types.Library.Library
instance GHC.Classes.Eq Distribution.Types.Library.Library
instance GHC.Internal.Generics.Generic Distribution.Types.Library.Library
instance Distribution.Types.BuildInfo.Lens.HasBuildInfo Distribution.Types.Library.Library
instance GHC.Internal.Base.Monoid Distribution.Types.Library.Library
instance Control.DeepSeq.NFData Distribution.Types.Library.Library
instance GHC.Classes.Ord Distribution.Types.Library.Library
instance GHC.Internal.Read.Read Distribution.Types.Library.Library
instance GHC.Internal.Base.Semigroup Distribution.Types.Library.Library
instance GHC.Internal.Show.Show Distribution.Types.Library.Library
instance Distribution.Utils.Structured.Structured Distribution.Types.Library.Library

module Distribution.Types.Library.Lens
data Library
libName :: Lens' Library LibraryName
libBuildInfo :: Lens' Library BuildInfo
libVisibility :: Lens' Library LibraryVisibility
exposedModules :: Lens' Library [ModuleName]
reexportedModules :: Lens' Library [ModuleReexport]
signatures :: Lens' Library [ModuleName]
libExposed :: Lens' Library Bool

module Distribution.Types.ForeignLib

-- | A foreign library stanza is like a library stanza, except that the
--   built code is intended for consumption by a non-Haskell client.
data ForeignLib
ForeignLib :: UnqualComponentName -> ForeignLibType -> [ForeignLibOption] -> BuildInfo -> Maybe LibVersionInfo -> Maybe Version -> [FilePath] -> ForeignLib

-- | Name of the foreign library
[foreignLibName] :: ForeignLib -> UnqualComponentName

-- | What kind of foreign library is this (static or dynamic).
[foreignLibType] :: ForeignLib -> ForeignLibType

-- | What options apply to this foreign library (e.g., are we merging in
--   all foreign dependencies.)
[foreignLibOptions] :: ForeignLib -> [ForeignLibOption]

-- | Build information for this foreign library.
[foreignLibBuildInfo] :: ForeignLib -> BuildInfo

-- | Libtool-style version-info data to compute library version. Refer to
--   the libtool documentation on the current:revision:age versioning
--   scheme.
[foreignLibVersionInfo] :: ForeignLib -> Maybe LibVersionInfo

-- | Linux library version
[foreignLibVersionLinux] :: ForeignLib -> Maybe Version

-- | (Windows-specific) module definition files
--   
--   This is a list rather than a maybe field so that we can flatten the
--   condition trees (for instance, when creating an sdist)
[foreignLibModDefFile] :: ForeignLib -> [FilePath]

-- | An empty foreign library.
emptyForeignLib :: ForeignLib

-- | Modules defined by a foreign library.
foreignLibModules :: ForeignLib -> [ModuleName]

-- | Is the foreign library shared?
foreignLibIsShared :: ForeignLib -> Bool

-- | Get a version number for a foreign library. If we're on Linux, and a
--   Linux version is specified, use that. If we're on Linux, and
--   libtool-style version-info is specified, translate that field into
--   appropriate version numbers. Otherwise, this feature is unsupported so
--   we don't return any version data.
foreignLibVersion :: ForeignLib -> OS -> [Int]
data LibVersionInfo

-- | Construct LibVersionInfo from (current, revision, age)
--   numbers.
--   
--   For instance, mkLibVersionInfo (3,0,0) constructs a
--   LibVersionInfo representing the version-info 3:0:0.
--   
--   All version components must be non-negative.
mkLibVersionInfo :: (Int, Int, Int) -> LibVersionInfo

-- | From a given LibVersionInfo, extract the (current,
--   revision, age) numbers.
libVersionInfoCRA :: LibVersionInfo -> (Int, Int, Int)

-- | Given a version-info field, produce a major.minor.build
--   version
libVersionNumber :: LibVersionInfo -> (Int, Int, Int)

-- | Given a version-info field, return "major.minor.build" as a
--   String
libVersionNumberShow :: LibVersionInfo -> String

-- | Return the major version of a version-info field.
libVersionMajor :: LibVersionInfo -> Int
instance Data.Binary.Class.Binary Distribution.Types.ForeignLib.ForeignLib
instance Data.Binary.Class.Binary Distribution.Types.ForeignLib.LibVersionInfo
instance GHC.Internal.Data.Data.Data Distribution.Types.ForeignLib.ForeignLib
instance GHC.Internal.Data.Data.Data Distribution.Types.ForeignLib.LibVersionInfo
instance GHC.Classes.Eq Distribution.Types.ForeignLib.ForeignLib
instance GHC.Classes.Eq Distribution.Types.ForeignLib.LibVersionInfo
instance GHC.Internal.Generics.Generic Distribution.Types.ForeignLib.ForeignLib
instance GHC.Internal.Generics.Generic Distribution.Types.ForeignLib.LibVersionInfo
instance Distribution.Types.BuildInfo.Lens.HasBuildInfo Distribution.Types.ForeignLib.ForeignLib
instance GHC.Internal.Base.Monoid Distribution.Types.ForeignLib.ForeignLib
instance Control.DeepSeq.NFData Distribution.Types.ForeignLib.ForeignLib
instance Control.DeepSeq.NFData Distribution.Types.ForeignLib.LibVersionInfo
instance GHC.Classes.Ord Distribution.Types.ForeignLib.ForeignLib
instance GHC.Classes.Ord Distribution.Types.ForeignLib.LibVersionInfo
instance Distribution.Parsec.Parsec Distribution.Types.ForeignLib.LibVersionInfo
instance Distribution.Pretty.Pretty Distribution.Types.ForeignLib.LibVersionInfo
instance GHC.Internal.Read.Read Distribution.Types.ForeignLib.ForeignLib
instance GHC.Internal.Read.Read Distribution.Types.ForeignLib.LibVersionInfo
instance GHC.Internal.Base.Semigroup Distribution.Types.ForeignLib.ForeignLib
instance GHC.Internal.Show.Show Distribution.Types.ForeignLib.ForeignLib
instance GHC.Internal.Show.Show Distribution.Types.ForeignLib.LibVersionInfo
instance Distribution.Utils.Structured.Structured Distribution.Types.ForeignLib.ForeignLib
instance Distribution.Utils.Structured.Structured Distribution.Types.ForeignLib.LibVersionInfo

module Distribution.Types.ForeignLib.Lens

-- | A foreign library stanza is like a library stanza, except that the
--   built code is intended for consumption by a non-Haskell client.
data ForeignLib
foreignLibName :: Lens' ForeignLib UnqualComponentName
foreignLibBuildInfo :: Lens' ForeignLib BuildInfo
foreignLibType :: Lens' ForeignLib ForeignLibType
foreignLibOptions :: Lens' ForeignLib [ForeignLibOption]
foreignLibVersionInfo :: Lens' ForeignLib (Maybe LibVersionInfo)
foreignLibVersionLinux :: Lens' ForeignLib (Maybe Version)
foreignLibModDefFile :: Lens' ForeignLib [FilePath]

module Distribution.Types.Executable
data Executable
Executable :: UnqualComponentName -> FilePath -> ExecutableScope -> BuildInfo -> Executable
[exeName] :: Executable -> UnqualComponentName
[modulePath] :: Executable -> FilePath
[exeScope] :: Executable -> ExecutableScope
[buildInfo] :: Executable -> BuildInfo
emptyExecutable :: Executable

-- | Get all the module names from an exe
exeModules :: Executable -> [ModuleName]

-- | Get all the auto generated module names from an exe This are a subset
--   of exeModules.
exeModulesAutogen :: Executable -> [ModuleName]
instance Data.Binary.Class.Binary Distribution.Types.Executable.Executable
instance GHC.Internal.Data.Data.Data Distribution.Types.Executable.Executable
instance GHC.Classes.Eq Distribution.Types.Executable.Executable
instance GHC.Internal.Generics.Generic Distribution.Types.Executable.Executable
instance Distribution.Types.BuildInfo.Lens.HasBuildInfo Distribution.Types.Executable.Executable
instance GHC.Internal.Base.Monoid Distribution.Types.Executable.Executable
instance Control.DeepSeq.NFData Distribution.Types.Executable.Executable
instance GHC.Classes.Ord Distribution.Types.Executable.Executable
instance GHC.Internal.Read.Read Distribution.Types.Executable.Executable
instance GHC.Internal.Base.Semigroup Distribution.Types.Executable.Executable
instance GHC.Internal.Show.Show Distribution.Types.Executable.Executable
instance Distribution.Utils.Structured.Structured Distribution.Types.Executable.Executable

module Distribution.Types.Executable.Lens
data Executable
exeName :: Lens' Executable UnqualComponentName
exeBuildInfo :: Lens' Executable BuildInfo
modulePath :: Lens' Executable String
exeScope :: Lens' Executable ExecutableScope

module Distribution.Types.Benchmark

-- | A "benchmark" stanza in a cabal file.
data Benchmark
Benchmark :: UnqualComponentName -> BenchmarkInterface -> BuildInfo -> Benchmark
[benchmarkName] :: Benchmark -> UnqualComponentName
[benchmarkInterface] :: Benchmark -> BenchmarkInterface
[benchmarkBuildInfo] :: Benchmark -> BuildInfo
emptyBenchmark :: Benchmark
benchmarkType :: Benchmark -> BenchmarkType

-- | Get all the module names from a benchmark.
benchmarkModules :: Benchmark -> [ModuleName]

-- | Get all the auto generated module names from a benchmark. This are a
--   subset of benchmarkModules.
benchmarkModulesAutogen :: Benchmark -> [ModuleName]
instance Data.Binary.Class.Binary Distribution.Types.Benchmark.Benchmark
instance GHC.Internal.Data.Data.Data Distribution.Types.Benchmark.Benchmark
instance GHC.Classes.Eq Distribution.Types.Benchmark.Benchmark
instance GHC.Internal.Generics.Generic Distribution.Types.Benchmark.Benchmark
instance Distribution.Types.BuildInfo.Lens.HasBuildInfo Distribution.Types.Benchmark.Benchmark
instance GHC.Internal.Base.Monoid Distribution.Types.Benchmark.Benchmark
instance Control.DeepSeq.NFData Distribution.Types.Benchmark.Benchmark
instance GHC.Classes.Ord Distribution.Types.Benchmark.Benchmark
instance GHC.Internal.Read.Read Distribution.Types.Benchmark.Benchmark
instance GHC.Internal.Base.Semigroup Distribution.Types.Benchmark.Benchmark
instance GHC.Internal.Show.Show Distribution.Types.Benchmark.Benchmark
instance Distribution.Utils.Structured.Structured Distribution.Types.Benchmark.Benchmark

module Distribution.Types.Component
data Component
CLib :: Library -> Component
CFLib :: ForeignLib -> Component
CExe :: Executable -> Component
CTest :: TestSuite -> Component
CBench :: Benchmark -> Component
foldComponent :: (Library -> a) -> (ForeignLib -> a) -> (Executable -> a) -> (TestSuite -> a) -> (Benchmark -> a) -> Component -> a
componentBuildInfo :: Component -> BuildInfo

-- | Is a component buildable (i.e., not marked with buildable:
--   False)? See also this note in
--   Distribution.Types.ComponentRequestedSpec#buildable_vs_enabled_components.
componentBuildable :: Component -> Bool
componentName :: Component -> ComponentName
partitionComponents :: [Component] -> ([Library], [ForeignLib], [Executable], [TestSuite], [Benchmark])
instance Data.Binary.Class.Binary Distribution.Types.Component.Component
instance GHC.Classes.Eq Distribution.Types.Component.Component
instance GHC.Internal.Generics.Generic Distribution.Types.Component.Component
instance Distribution.Types.BuildInfo.Lens.HasBuildInfo Distribution.Types.Component.Component
instance GHC.Internal.Read.Read Distribution.Types.Component.Component
instance GHC.Internal.Base.Semigroup Distribution.Types.Component.Component
instance GHC.Internal.Show.Show Distribution.Types.Component.Component
instance Distribution.Utils.Structured.Structured Distribution.Types.Component.Component

module Distribution.Types.ComponentRequestedSpec

-- | Describes what components are enabled by user-interaction. See also
--   this note in
--   Distribution.Types.ComponentRequestedSpec#buildable_vs_enabled_components.
data ComponentRequestedSpec
ComponentRequestedSpec :: Bool -> Bool -> ComponentRequestedSpec
[testsRequested] :: ComponentRequestedSpec -> Bool
[benchmarksRequested] :: ComponentRequestedSpec -> Bool
OneComponentRequestedSpec :: ComponentName -> ComponentRequestedSpec

-- | A reason explaining why a component is disabled.
data ComponentDisabledReason
DisabledComponent :: ComponentDisabledReason
DisabledAllTests :: ComponentDisabledReason
DisabledAllBenchmarks :: ComponentDisabledReason
DisabledAllButOne :: String -> ComponentDisabledReason

-- | The default set of enabled components. Historically tests and
--   benchmarks are NOT enabled by default.
defaultComponentRequestedSpec :: ComponentRequestedSpec

-- | Is this component name enabled? See also this note in
--   Distribution.Types.ComponentRequestedSpec#buildable_vs_enabled_components.
componentNameRequested :: ComponentRequestedSpec -> ComponentName -> Bool

-- | Is this component enabled? See also this note in
--   Distribution.Types.ComponentRequestedSpec#buildable_vs_enabled_components.
componentEnabled :: ComponentRequestedSpec -> Component -> Bool

-- | Is this component disabled, and if so, why?
componentDisabledReason :: ComponentRequestedSpec -> Component -> Maybe ComponentDisabledReason
instance Data.Binary.Class.Binary Distribution.Types.ComponentRequestedSpec.ComponentRequestedSpec
instance GHC.Classes.Eq Distribution.Types.ComponentRequestedSpec.ComponentRequestedSpec
instance GHC.Internal.Generics.Generic Distribution.Types.ComponentRequestedSpec.ComponentRequestedSpec
instance GHC.Internal.Read.Read Distribution.Types.ComponentRequestedSpec.ComponentRequestedSpec
instance GHC.Internal.Show.Show Distribution.Types.ComponentRequestedSpec.ComponentRequestedSpec
instance Distribution.Utils.Structured.Structured Distribution.Types.ComponentRequestedSpec.ComponentRequestedSpec

-- | This defines the data structure for the .cabal file format.
--   There are several parts to this structure. It has top level info and
--   then Library, Executable, TestSuite, and
--   Benchmark sections each of which have associated
--   BuildInfo data that's used to build the library, exe, test, or
--   benchmark. To further complicate things there is both a
--   PackageDescription and a GenericPackageDescription.
--   This distinction relates to cabal configurations. When we initially
--   read a .cabal file we get a
--   GenericPackageDescription which has all the conditional
--   sections. Before actually building a package we have to decide on each
--   conditional. Once we've done that we get a PackageDescription.
--   It was done this way initially to avoid breaking too much stuff when
--   the feature was introduced. It could probably do with being
--   rationalised at some point to make it simpler.
module Distribution.Types.PackageDescription

-- | This data type is the internal representation of the file
--   pkg.cabal. It contains two kinds of information about the
--   package: information which is needed for all packages, such as the
--   package name and version, and information which is needed for the
--   simple build system only, such as the compiler options and library
--   name.
data PackageDescription
PackageDescription :: CabalSpecVersion -> PackageIdentifier -> Either License License -> [SymbolicPath PackageDir LicenseFile] -> !ShortText -> !ShortText -> !ShortText -> !ShortText -> [(CompilerFlavor, VersionRange)] -> !ShortText -> !ShortText -> !ShortText -> [SourceRepo] -> !ShortText -> !ShortText -> !ShortText -> [(String, String)] -> Maybe BuildType -> Maybe SetupBuildInfo -> Maybe Library -> [Library] -> [Executable] -> [ForeignLib] -> [TestSuite] -> [Benchmark] -> [FilePath] -> FilePath -> [FilePath] -> [FilePath] -> [FilePath] -> PackageDescription

-- | The version of the Cabal spec that this package description uses.
[specVersion] :: PackageDescription -> CabalSpecVersion
[package] :: PackageDescription -> PackageIdentifier
[licenseRaw] :: PackageDescription -> Either License License
[licenseFiles] :: PackageDescription -> [SymbolicPath PackageDir LicenseFile]
[copyright] :: PackageDescription -> !ShortText
[maintainer] :: PackageDescription -> !ShortText
[author] :: PackageDescription -> !ShortText
[stability] :: PackageDescription -> !ShortText
[testedWith] :: PackageDescription -> [(CompilerFlavor, VersionRange)]
[homepage] :: PackageDescription -> !ShortText
[pkgUrl] :: PackageDescription -> !ShortText
[bugReports] :: PackageDescription -> !ShortText
[sourceRepos] :: PackageDescription -> [SourceRepo]

-- | A one-line summary of this package
[synopsis] :: PackageDescription -> !ShortText

-- | A more verbose description of this package
[description] :: PackageDescription -> !ShortText
[category] :: PackageDescription -> !ShortText

-- | Custom fields starting with x-, stored in a simple assoc-list.
[customFieldsPD] :: PackageDescription -> [(String, String)]

-- | The original build-type value as parsed from the
--   .cabal file without defaulting. See also buildType.
[buildTypeRaw] :: PackageDescription -> Maybe BuildType
[setupBuildInfo] :: PackageDescription -> Maybe SetupBuildInfo
[library] :: PackageDescription -> Maybe Library
[subLibraries] :: PackageDescription -> [Library]
[executables] :: PackageDescription -> [Executable]
[foreignLibs] :: PackageDescription -> [ForeignLib]
[testSuites] :: PackageDescription -> [TestSuite]
[benchmarks] :: PackageDescription -> [Benchmark]
[dataFiles] :: PackageDescription -> [FilePath]
[dataDir] :: PackageDescription -> FilePath
[extraSrcFiles] :: PackageDescription -> [FilePath]
[extraTmpFiles] :: PackageDescription -> [FilePath]
[extraDocFiles] :: PackageDescription -> [FilePath]

-- | The SPDX LicenseExpression of the package.
license :: PackageDescription -> License

-- | See license.
license' :: Either License License -> License

-- | The effective build-type after applying defaulting rules.
--   
--   The original build-type value parsed is stored in the
--   buildTypeRaw field. However, the build-type field is
--   optional and can therefore be empty in which case we need to compute
--   the effective build-type. This function implements the
--   following defaulting rules:
--   
--   
--   
- For cabal-version:2.0 and below, default to the
--   Custom build-type unconditionally.
--   
- Otherwise, if a custom-setup stanza is defined, default
--   to the Custom build-type; else default to Simple
--   build-type.
--   
buildType :: PackageDescription -> BuildType
emptyPackageDescription :: PackageDescription

-- | Does this package have a buildable PUBLIC library?
hasPublicLib :: PackageDescription -> Bool

-- | Does this package have any libraries?
hasLibs :: PackageDescription -> Bool
allLibraries :: PackageDescription -> [Library]

-- | If the package description has a buildable library section, call the
--   given function with the library build info as argument. You probably
--   want withLibLBI if you have a LocalBuildInfo, see
--   the note in
--   Distribution.Types.ComponentRequestedSpec#buildable_vs_enabled_components
--   for more information.
withLib :: PackageDescription -> (Library -> IO ()) -> IO ()

-- | does this package have any executables?
hasExes :: PackageDescription -> Bool

-- | Perform the action on each buildable Executable in the package
--   description. You probably want withExeLBI if you have a
--   LocalBuildInfo, see the note in
--   Distribution.Types.ComponentRequestedSpec#buildable_vs_enabled_components
--   for more information.
withExe :: PackageDescription -> (Executable -> IO ()) -> IO ()

-- | Does this package have any test suites?
hasTests :: PackageDescription -> Bool

-- | Perform an action on each buildable TestSuite in a package. You
--   probably want withTestLBI if you have a
--   LocalBuildInfo, see the note in
--   Distribution.Types.ComponentRequestedSpec#buildable_vs_enabled_components
--   for more information.
withTest :: PackageDescription -> (TestSuite -> IO ()) -> IO ()

-- | Does this package have any benchmarks?
hasBenchmarks :: PackageDescription -> Bool

-- | Perform an action on each buildable Benchmark in a package. You
--   probably want withBenchLBI if you have a
--   LocalBuildInfo, see the note in
--   Distribution.Types.ComponentRequestedSpec#buildable_vs_enabled_components
--   for more information.
withBenchmark :: PackageDescription -> (Benchmark -> IO ()) -> IO ()

-- | Does this package have any foreign libraries?
hasForeignLibs :: PackageDescription -> Bool

-- | Perform the action on each buildable ForeignLib in the package
--   description.
withForeignLib :: PackageDescription -> (ForeignLib -> IO ()) -> IO ()

-- | All BuildInfo in the PackageDescription: libraries,
--   executables, test-suites and benchmarks.
--   
--   Useful for implementing package checks.
allBuildInfo :: PackageDescription -> [BuildInfo]

-- | Return all of the BuildInfos of enabled components, i.e., all
--   of the ones that would be built if you run ./Setup build.
enabledBuildInfos :: PackageDescription -> ComponentRequestedSpec -> [BuildInfo]

-- | Get the combined build-depends entries of all components.
allBuildDepends :: PackageDescription -> [Dependency]

-- | Get the combined build-depends entries of all enabled components, per
--   the given request spec.
enabledBuildDepends :: PackageDescription -> ComponentRequestedSpec -> [Dependency]
updatePackageDescription :: HookedBuildInfo -> PackageDescription -> PackageDescription

-- | All the components in the package.
pkgComponents :: PackageDescription -> [Component]

-- | A list of all components in the package that are buildable, i.e., were
--   not marked with buildable: False. This does NOT indicate if
--   we are actually going to build the component, see
--   enabledComponents instead.
pkgBuildableComponents :: PackageDescription -> [Component]

-- | A list of all components in the package that are enabled.
enabledComponents :: PackageDescription -> ComponentRequestedSpec -> [Component]
lookupComponent :: PackageDescription -> ComponentName -> Maybe Component
getComponent :: PackageDescription -> ComponentName -> Component
instance Data.Binary.Class.Binary Distribution.Types.PackageDescription.PackageDescription
instance GHC.Internal.Data.Data.Data Distribution.Types.PackageDescription.PackageDescription
instance GHC.Classes.Eq Distribution.Types.PackageDescription.PackageDescription
instance GHC.Internal.Generics.Generic Distribution.Types.PackageDescription.PackageDescription
instance Distribution.Types.BuildInfo.Lens.HasBuildInfos Distribution.Types.PackageDescription.PackageDescription
instance Control.DeepSeq.NFData Distribution.Types.PackageDescription.PackageDescription
instance GHC.Classes.Ord Distribution.Types.PackageDescription.PackageDescription
instance Distribution.Package.Package Distribution.Types.PackageDescription.PackageDescription
instance GHC.Internal.Read.Read Distribution.Types.PackageDescription.PackageDescription
instance GHC.Internal.Show.Show Distribution.Types.PackageDescription.PackageDescription
instance Distribution.Utils.Structured.Structured Distribution.Types.PackageDescription.PackageDescription

module Distribution.Types.GenericPackageDescription
data GenericPackageDescription
GenericPackageDescription :: PackageDescription -> Maybe Version -> [PackageFlag] -> Maybe (CondTree ConfVar [Dependency] Library) -> [(UnqualComponentName, CondTree ConfVar [Dependency] Library)] -> [(UnqualComponentName, CondTree ConfVar [Dependency] ForeignLib)] -> [(UnqualComponentName, CondTree ConfVar [Dependency] Executable)] -> [(UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)] -> [(UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)] -> GenericPackageDescription
[packageDescription] :: GenericPackageDescription -> PackageDescription

-- | This is a version as specified in source. We populate this field in
--   index reading for dummy GPDs, only when GPD reading failed, but
--   scanning haven't.
--   
--   Cabal-the-library never produces GPDs with Just as gpdScannedVersion.
--   
--   Perfectly, PackageIndex should have sum type, so we don't need to have
--   dummy GPDs.
[gpdScannedVersion] :: GenericPackageDescription -> Maybe Version
[genPackageFlags] :: GenericPackageDescription -> [PackageFlag]
[condLibrary] :: GenericPackageDescription -> Maybe (CondTree ConfVar [Dependency] Library)
[condSubLibraries] :: GenericPackageDescription -> [(UnqualComponentName, CondTree ConfVar [Dependency] Library)]
[condForeignLibs] :: GenericPackageDescription -> [(UnqualComponentName, CondTree ConfVar [Dependency] ForeignLib)]
[condExecutables] :: GenericPackageDescription -> [(UnqualComponentName, CondTree ConfVar [Dependency] Executable)]
[condTestSuites] :: GenericPackageDescription -> [(UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)]
[condBenchmarks] :: GenericPackageDescription -> [(UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)]
emptyGenericPackageDescription :: GenericPackageDescription
instance Data.Binary.Class.Binary Distribution.Types.GenericPackageDescription.GenericPackageDescription
instance GHC.Internal.Data.Data.Data Distribution.Types.GenericPackageDescription.GenericPackageDescription
instance GHC.Classes.Eq Distribution.Types.GenericPackageDescription.GenericPackageDescription
instance GHC.Internal.Generics.Generic Distribution.Types.GenericPackageDescription.GenericPackageDescription
instance Distribution.Types.BuildInfo.Lens.HasBuildInfos Distribution.Types.GenericPackageDescription.GenericPackageDescription
instance Control.DeepSeq.NFData Distribution.Types.GenericPackageDescription.GenericPackageDescription
instance Distribution.Package.Package Distribution.Types.GenericPackageDescription.GenericPackageDescription
instance GHC.Internal.Show.Show Distribution.Types.GenericPackageDescription.GenericPackageDescription
instance Distribution.Utils.Structured.Structured Distribution.Types.GenericPackageDescription.GenericPackageDescription

module Distribution.Types.GenericPackageDescription.Lens
data GenericPackageDescription

-- | A flag can represent a feature to be included, or a way of linking a
--   target against its dependencies, or in fact whatever you can think of.
data PackageFlag

-- | A FlagName is the name of a user-defined configuration flag
--   
--   Use mkFlagName and unFlagName to convert from/to a
--   String.
--   
--   This type is opaque since Cabal-2.0
data FlagName

-- | A ConfVar represents the variable type used.
data ConfVar
OS :: OS -> ConfVar
Arch :: Arch -> ConfVar
PackageFlag :: FlagName -> ConfVar
Impl :: CompilerFlavor -> VersionRange -> ConfVar
packageDescription :: Lens' GenericPackageDescription PackageDescription
flagName :: Lens' PackageFlag FlagName
flagDescription :: Lens' PackageFlag String
flagDefault :: Lens' PackageFlag Bool
flagManual :: Lens' PackageFlag Bool
gpdScannedVersion :: Lens' GenericPackageDescription (Maybe Version)
genPackageFlags :: Lens' GenericPackageDescription [PackageFlag]
condLibrary :: Lens' GenericPackageDescription (Maybe (CondTree ConfVar [Dependency] Library))
condSubLibraries :: Lens' GenericPackageDescription [(UnqualComponentName, CondTree ConfVar [Dependency] Library)]
condForeignLibs :: Lens' GenericPackageDescription [(UnqualComponentName, CondTree ConfVar [Dependency] ForeignLib)]
condExecutables :: Lens' GenericPackageDescription [(UnqualComponentName, CondTree ConfVar [Dependency] Executable)]
condTestSuites :: Lens' GenericPackageDescription [(UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)]
condBenchmarks :: Lens' GenericPackageDescription [(UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)]
allCondTrees :: Applicative f => (forall a. () => CondTree ConfVar [Dependency] a -> f (CondTree ConfVar [Dependency] a)) -> GenericPackageDescription -> f GenericPackageDescription
_OS :: Traversal' ConfVar OS
_Arch :: Traversal' ConfVar Arch
_PackageFlag :: Traversal' ConfVar FlagName
_Impl :: Traversal' ConfVar (CompilerFlavor, VersionRange)

module Distribution.Types.Benchmark.Lens

-- | A "benchmark" stanza in a cabal file.
data Benchmark
benchmarkName :: Lens' Benchmark UnqualComponentName
benchmarkBuildInfo :: Lens' Benchmark BuildInfo
benchmarkInterface :: Lens' Benchmark BenchmarkInterface

module Distribution.Types.PackageDescription.Lens

-- | This data type is the internal representation of the file
--   pkg.cabal. It contains two kinds of information about the
--   package: information which is needed for all packages, such as the
--   package name and version, and information which is needed for the
--   simple build system only, such as the compiler options and library
--   name.
data PackageDescription

componentBuildInfo :: ComponentName -> Traversal' PackageDescription BuildInfo

allLibraries :: Traversal' PackageDescription Library
package :: Lens' PackageDescription PackageIdentifier
copyright :: Lens' PackageDescription ShortText
maintainer :: Lens' PackageDescription ShortText
author :: Lens' PackageDescription ShortText
stability :: Lens' PackageDescription ShortText
homepage :: Lens' PackageDescription ShortText
pkgUrl :: Lens' PackageDescription ShortText
synopsis :: Lens' PackageDescription ShortText
description :: Lens' PackageDescription ShortText
category :: Lens' PackageDescription ShortText
dataDir :: Lens' PackageDescription FilePath
specVersion :: Lens' PackageDescription CabalSpecVersion
licenseRaw :: Lens' PackageDescription (Either License License)
licenseFiles :: Lens' PackageDescription [SymbolicPath PackageDir LicenseFile]
testedWith :: Lens' PackageDescription [(CompilerFlavor, VersionRange)]
bugReports :: Lens' PackageDescription ShortText
sourceRepos :: Lens' PackageDescription [SourceRepo]
customFieldsPD :: Lens' PackageDescription [(String, String)]
buildTypeRaw :: Lens' PackageDescription (Maybe BuildType)
setupBuildInfo :: Lens' PackageDescription (Maybe SetupBuildInfo)
library :: Lens' PackageDescription (Maybe Library)
subLibraries :: Lens' PackageDescription [Library]
executables :: Lens' PackageDescription [Executable]
foreignLibs :: Lens' PackageDescription [ForeignLib]
testSuites :: Lens' PackageDescription [TestSuite]
benchmarks :: Lens' PackageDescription [Benchmark]
dataFiles :: Lens' PackageDescription [FilePath]
extraSrcFiles :: Lens' PackageDescription [String]
extraTmpFiles :: Lens' PackageDescription [String]
extraDocFiles :: Lens' PackageDescription [String]

componentModules :: Monoid r => ComponentName -> Getting r PackageDescription [ModuleName]

module Distribution.Types.Lens

-- | Backwards compatibility reexport of most things you need to know about
--   .cabal files.
module Distribution.PackageDescription

-- | This is about the cabal configurations feature. It exports
--   finalizePD and flattenPackageDescription which are
--   functions for converting GenericPackageDescriptions down to
--   PackageDescriptions. It has code for working with the tree of
--   conditions and resolving or flattening conditions.
module Distribution.PackageDescription.Configuration

-- | Create a package description with all configurations resolved.
--   
--   This function takes a GenericPackageDescription and several
--   environment parameters and tries to generate PackageDescription
--   by finding a flag assignment that result in satisfiable dependencies.
--   
--   It takes as inputs a not necessarily complete specifications of flags
--   assignments, an optional package index as well as platform parameters.
--   If some flags are not assigned explicitly, this function will try to
--   pick an assignment that causes this function to succeed. The package
--   index is optional since on some platforms we cannot determine which
--   packages have been installed before. When no package index is
--   supplied, every dependency is assumed to be satisfiable, therefore all
--   not explicitly assigned flags will get their default values.
--   
--   This function will fail if it cannot find a flag assignment that leads
--   to satisfiable dependencies. (It will not try alternative assignments
--   for explicitly specified flags.) In case of failure it will return the
--   missing dependencies that it encountered when trying different flag
--   assignments. On success, it will return the package description and
--   the full flag assignment chosen.
--   
--   Note that this drops any stanzas which have buildable: False.
--   While this is arguably the right thing to do, it means we give bad
--   error messages in some situations, see #3858.
finalizePD :: FlagAssignment -> ComponentRequestedSpec -> (Dependency -> Bool) -> Platform -> CompilerInfo -> [PackageVersionConstraint] -> GenericPackageDescription -> Either [Dependency] (PackageDescription, FlagAssignment)

-- | Flatten a generic package description by ignoring all conditions and
--   just join the field descriptors into on package description. Note,
--   however, that this may lead to inconsistent field values, since all
--   values are joined into one field, which may not be possible in the
--   original package description, due to the use of exclusive choices (if
--   ... else ...).
--   
--   TODO: One particularly tricky case is defaulting. In the original
--   package description, e.g., the source directory might either be the
--   default or a certain, explicitly set path. Since defaults are filled
--   in only after the package has been resolved and when no explicit value
--   has been set, the default path will be missing from the package
--   description returned by this function.
flattenPackageDescription :: GenericPackageDescription -> PackageDescription

-- | Parse a configuration condition from a string.
parseCondition :: CabalParsing m => m (Condition ConfVar)
freeVars :: CondTree ConfVar c a -> [FlagName]

-- | Extract the condition matched by the given predicate from a cond tree.
--   
--   We use this mainly for extracting buildable conditions (see the Note
--   in Distribution.PackageDescription.Configuration), but the function is
--   in fact more general.
extractCondition :: Eq v => (a -> Bool) -> CondTree v c a -> Condition v

-- | Extract conditions matched by the given predicate from all cond trees
--   in a GenericPackageDescription.
extractConditions :: (BuildInfo -> Bool) -> GenericPackageDescription -> [Condition ConfVar]

-- | Transforms a CondTree by putting the input under the "then"
--   branch of a conditional that is True when Buildable is True. If
--   addBuildableCondition can determine that Buildable is always
--   True, it returns the input unchanged. If Buildable is always False, it
--   returns the empty CondTree.
addBuildableCondition :: (Eq v, Monoid a, Monoid c) => (a -> BuildInfo) -> CondTree v c a -> CondTree v c a
mapCondTree :: (a -> b) -> (c -> d) -> (Condition v -> Condition w) -> CondTree v c a -> CondTree w d b
mapTreeData :: (a -> b) -> CondTree v c a -> CondTree v c b
mapTreeConds :: (Condition v -> Condition w) -> CondTree v c a -> CondTree w c a
mapTreeConstrs :: (c -> d) -> CondTree v c a -> CondTree v d a
transformAllBuildInfos :: (BuildInfo -> BuildInfo) -> (SetupBuildInfo -> SetupBuildInfo) -> GenericPackageDescription -> GenericPackageDescription

-- | Walk a GenericPackageDescription and apply f to all
--   nested build-depends fields.
transformAllBuildDepends :: (Dependency -> Dependency) -> GenericPackageDescription -> GenericPackageDescription

-- | Walk a GenericPackageDescription and apply f to all
--   nested build-depends fields.
transformAllBuildDependsN :: ([Dependency] -> [Dependency]) -> GenericPackageDescription -> GenericPackageDescription

-- | Simplify a configuration condition using the OS and arch names.
--   Returns the names of all the flags occurring in the condition.
simplifyWithSysParams :: OS -> Arch -> CompilerInfo -> Condition ConfVar -> (Condition FlagName, [FlagName])
instance GHC.Internal.Base.Semigroup d => GHC.Internal.Base.Monoid (Distribution.PackageDescription.Configuration.DepTestRslt d)
instance GHC.Internal.Base.Monoid Distribution.PackageDescription.Configuration.PDTagged
instance GHC.Internal.Base.Semigroup Distribution.PackageDescription.Configuration.DepMapUnion
instance GHC.Internal.Base.Semigroup d => GHC.Internal.Base.Semigroup (Distribution.PackageDescription.Configuration.DepTestRslt d)
instance GHC.Internal.Base.Semigroup Distribution.PackageDescription.Configuration.PDTagged
instance GHC.Internal.Show.Show Distribution.PackageDescription.Configuration.PDTagged

-- | This module provides newtype wrappers to be used with
--   Distribution.FieldGrammar.
module Distribution.FieldGrammar.Newtypes

-- | alaList and alaList' are simply List, with
--   additional phantom arguments to constrain the resulting type
--   
--   
--   >>> :t alaList VCat
--   alaList VCat :: [a] -> List VCat (Identity a) a
--   
--   
--   
--   >>> :t alaList' FSep Token
--   alaList' FSep Token :: [String] -> List FSep Token String
--   
alaList :: sep -> [a] -> List sep (Identity a) a

-- | More general version of alaList.
alaList' :: sep -> (a -> b) -> [a] -> List sep b a

-- | Vertical list with commas. Displayed with vcat
data CommaVCat
CommaVCat :: CommaVCat

-- | Paragraph fill list with commas. Displayed with fsep
data CommaFSep
CommaFSep :: CommaFSep

-- | Vertical list with optional commas. Displayed with vcat.
data VCat
VCat :: VCat

-- | Paragraph fill list with optional commas. Displayed with fsep.
data FSep
FSep :: FSep

-- | Paragraph fill list without commas. Displayed with fsep.
data NoCommaFSep
NoCommaFSep :: NoCommaFSep
class Sep sep
prettySep :: Sep sep => Proxy sep -> [Doc] -> Doc
parseSep :: (Sep sep, CabalParsing m) => Proxy sep -> m a -> m [a]
parseSepNE :: (Sep sep, CabalParsing m) => Proxy sep -> m a -> m (NonEmpty a)

-- | List separated with optional commas. Displayed with sep,
--   arguments of type a are parsed and pretty-printed as
--   b.
data List sep b a

-- | alaSet and alaSet' are simply Set' constructor,
--   with additional phantom arguments to constrain the resulting type
--   
--   
--   >>> :t alaSet VCat
--   alaSet VCat :: Set a -> Set' VCat (Identity a) a
--   
--   
--   
--   >>> :t alaSet' FSep Token
--   alaSet' FSep Token :: Set String -> Set' FSep Token String
--   
--   
--   
--   >>> unpack' (alaSet' FSep Token) <$> eitherParsec "foo bar foo"
--   Right (fromList ["bar","foo"])
--   
alaSet :: sep -> Set a -> Set' sep (Identity a) a

-- | More general version of alaSet.
alaSet' :: sep -> (a -> b) -> Set a -> Set' sep b a

-- | Like List, but for Set.
data Set' sep b a

-- | alaNonEmpty and alaNonEmpty' are simply NonEmpty'
--   constructor, with additional phantom arguments to constrain the
--   resulting type
--   
--   
--   >>> :t alaNonEmpty VCat
--   alaNonEmpty VCat :: NonEmpty a -> NonEmpty' VCat (Identity a) a
--   
--   
--   
--   >>> unpack' (alaNonEmpty' FSep Token) <$> eitherParsec "foo bar foo"
--   Right ("foo" :| ["bar","foo"])
--   
alaNonEmpty :: sep -> NonEmpty a -> NonEmpty' sep (Identity a) a

-- | More general version of alaNonEmpty.
alaNonEmpty' :: sep -> (a -> b) -> NonEmpty a -> NonEmpty' sep b a

-- | Like List, but for NonEmpty.
data NonEmpty' sep b a

-- | Version range or just version, i.e. cabal-version field.
--   
--   There are few things to consider:
--   
--   
--   
- Starting with 2.2 the cabal-version field should be the first
--   field in the file and only exact version is accepted. Therefore if we
--   get e.g. >= 2.2, we fail. See
--   https://github.com/haskell/cabal/issues/4899
--   
--   
--   We have this newtype, as writing Parsec and Pretty instances for
--   CabalSpecVersion would cause cycle in modules: Version ->
--   CabalSpecVersion -> Parsec -> ...
newtype SpecVersion
SpecVersion :: CabalSpecVersion -> SpecVersion
[getSpecVersion] :: SpecVersion -> CabalSpecVersion

-- | Version range or just version
newtype TestedWith
TestedWith :: (CompilerFlavor, VersionRange) -> TestedWith
[getTestedWith] :: TestedWith -> (CompilerFlavor, VersionRange)

-- | SPDX License expression or legacy license
newtype SpecLicense
SpecLicense :: Either License License -> SpecLicense
[getSpecLicense] :: SpecLicense -> Either License License

-- | Haskell string or [^ ,]+
newtype Token
Token :: String -> Token
[getToken] :: Token -> String

-- | Haskell string or [^ ]+
newtype Token'
Token' :: String -> Token'
[getToken'] :: Token' -> String

-- | Either "quoted" or un-quoted.
newtype MQuoted a
MQuoted :: a -> MQuoted a
[getMQuoted] :: MQuoted a -> a

-- | Filepath are parsed as Token.
newtype FilePathNT
FilePathNT :: String -> FilePathNT
[getFilePathNT] :: FilePathNT -> String
instance GHC.Classes.Eq Distribution.FieldGrammar.Newtypes.SpecLicense
instance GHC.Classes.Eq Distribution.FieldGrammar.Newtypes.SpecVersion
instance Distribution.Compat.Newtype.Newtype Distribution.CabalSpecVersion.CabalSpecVersion Distribution.FieldGrammar.Newtypes.SpecVersion
instance Distribution.Compat.Newtype.Newtype (GHC.Internal.Data.Either.Either Distribution.SPDX.License.License Distribution.License.License) Distribution.FieldGrammar.Newtypes.SpecLicense
instance Distribution.Compat.Newtype.Newtype GHC.Internal.Base.String Distribution.FieldGrammar.Newtypes.FilePathNT
instance Distribution.Compat.Newtype.Newtype [a] (Distribution.FieldGrammar.Newtypes.List sep wrapper a)
instance Distribution.Compat.Newtype.Newtype GHC.Internal.Base.String Distribution.FieldGrammar.Newtypes.Token
instance Distribution.Compat.Newtype.Newtype GHC.Internal.Base.String Distribution.FieldGrammar.Newtypes.Token'
instance Distribution.Compat.Newtype.Newtype (GHC.Internal.Base.NonEmpty a) (Distribution.FieldGrammar.Newtypes.NonEmpty' sep wrapper a)
instance Distribution.Compat.Newtype.Newtype (Data.Set.Internal.Set a) (Distribution.FieldGrammar.Newtypes.Set' sep wrapper a)
instance Distribution.Compat.Newtype.Newtype (Distribution.Compiler.CompilerFlavor, Distribution.Types.VersionRange.Internal.VersionRange) Distribution.FieldGrammar.Newtypes.TestedWith
instance Distribution.Compat.Newtype.Newtype a (Distribution.FieldGrammar.Newtypes.MQuoted a)
instance Distribution.Parsec.Parsec Distribution.FieldGrammar.Newtypes.FilePathNT
instance (Distribution.Compat.Newtype.Newtype a b, Distribution.FieldGrammar.Newtypes.Sep sep, Distribution.Parsec.Parsec b) => Distribution.Parsec.Parsec (Distribution.FieldGrammar.Newtypes.List sep b a)
instance Distribution.Parsec.Parsec a => Distribution.Parsec.Parsec (Distribution.FieldGrammar.Newtypes.MQuoted a)
instance (Distribution.Compat.Newtype.Newtype a b, Distribution.FieldGrammar.Newtypes.Sep sep, Distribution.Parsec.Parsec b) => Distribution.Parsec.Parsec (Distribution.FieldGrammar.Newtypes.NonEmpty' sep b a)
instance (Distribution.Compat.Newtype.Newtype a b, GHC.Classes.Ord a, Distribution.FieldGrammar.Newtypes.Sep sep, Distribution.Parsec.Parsec b) => Distribution.Parsec.Parsec (Distribution.FieldGrammar.Newtypes.Set' sep b a)
instance Distribution.Parsec.Parsec Distribution.FieldGrammar.Newtypes.SpecLicense
instance Distribution.Parsec.Parsec Distribution.FieldGrammar.Newtypes.SpecVersion
instance Distribution.Parsec.Parsec Distribution.FieldGrammar.Newtypes.TestedWith
instance Distribution.Parsec.Parsec Distribution.FieldGrammar.Newtypes.Token
instance Distribution.Parsec.Parsec Distribution.FieldGrammar.Newtypes.Token'
instance Distribution.Pretty.Pretty Distribution.FieldGrammar.Newtypes.FilePathNT
instance (Distribution.Compat.Newtype.Newtype a b, Distribution.FieldGrammar.Newtypes.Sep sep, Distribution.Pretty.Pretty b) => Distribution.Pretty.Pretty (Distribution.FieldGrammar.Newtypes.List sep b a)
instance Distribution.Pretty.Pretty a => Distribution.Pretty.Pretty (Distribution.FieldGrammar.Newtypes.MQuoted a)
instance (Distribution.Compat.Newtype.Newtype a b, Distribution.FieldGrammar.Newtypes.Sep sep, Distribution.Pretty.Pretty b) => Distribution.Pretty.Pretty (Distribution.FieldGrammar.Newtypes.NonEmpty' sep b a)
instance (Distribution.Compat.Newtype.Newtype a b, Distribution.FieldGrammar.Newtypes.Sep sep, Distribution.Pretty.Pretty b) => Distribution.Pretty.Pretty (Distribution.FieldGrammar.Newtypes.Set' sep b a)
instance Distribution.Pretty.Pretty Distribution.FieldGrammar.Newtypes.SpecLicense
instance Distribution.Pretty.Pretty Distribution.FieldGrammar.Newtypes.SpecVersion
instance Distribution.Pretty.Pretty Distribution.FieldGrammar.Newtypes.TestedWith
instance Distribution.Pretty.Pretty Distribution.FieldGrammar.Newtypes.Token
instance Distribution.Pretty.Pretty Distribution.FieldGrammar.Newtypes.Token'
instance Distribution.FieldGrammar.Newtypes.Sep Distribution.FieldGrammar.Newtypes.CommaFSep
instance Distribution.FieldGrammar.Newtypes.Sep Distribution.FieldGrammar.Newtypes.CommaVCat
instance Distribution.FieldGrammar.Newtypes.Sep Distribution.FieldGrammar.Newtypes.FSep
instance Distribution.FieldGrammar.Newtypes.Sep Distribution.FieldGrammar.Newtypes.NoCommaFSep
instance Distribution.FieldGrammar.Newtypes.Sep Distribution.FieldGrammar.Newtypes.VCat
instance GHC.Internal.Show.Show Distribution.FieldGrammar.Newtypes.SpecLicense
instance GHC.Internal.Show.Show Distribution.FieldGrammar.Newtypes.SpecVersion

module Distribution.FieldGrammar.Class

-- | FieldGrammar is parametrised by
--   
--   
--   
- s which is a structure we are parsing. We need this to
--   provide prettyprinter functionality
--   
- a type of the field.
--   
--   
--   Note: We'd like to have forall s. Applicative (f s)
--   context.
class (c SpecVersion, c TestedWith, c SpecLicense, c Token, c Token', c FilePathNT) => FieldGrammar (c :: Type -> Constraint) (g :: Type -> Type -> Type) | g -> c

-- | Unfocus, zoom out, blur FieldGrammar.
blurFieldGrammar :: FieldGrammar c g => ALens' a b -> g b d -> g a d

-- | Field which should be defined, exactly once.
uniqueFieldAla :: (FieldGrammar c g, c b, Newtype a b) => FieldName -> (a -> b) -> ALens' s a -> g s a

-- | Boolean field with a default value.
booleanFieldDef :: FieldGrammar c g => FieldName -> ALens' s Bool -> Bool -> g s Bool

-- | Optional field.
optionalFieldAla :: (FieldGrammar c g, c b, Newtype a b) => FieldName -> (a -> b) -> ALens' s (Maybe a) -> g s (Maybe a)

-- | Optional field with default value.
optionalFieldDefAla :: (FieldGrammar c g, c b, Newtype a b, Eq a) => FieldName -> (a -> b) -> ALens' s a -> a -> g s a
freeTextField :: FieldGrammar c g => FieldName -> ALens' s (Maybe String) -> g s (Maybe String)
freeTextFieldDef :: FieldGrammar c g => FieldName -> ALens' s String -> g s String

freeTextFieldDefST :: FieldGrammar c g => FieldName -> ALens' s ShortText -> g s ShortText

-- | Monoidal field.
--   
--   Values are combined with mappend.
--   
--   Note: optionalFieldAla is a monoidalField with
--   Last monoid.
monoidalFieldAla :: (FieldGrammar c g, c b, Monoid a, Newtype a b) => FieldName -> (a -> b) -> ALens' s a -> g s a

-- | Parser matching all fields with a name starting with a prefix.
prefixedFields :: FieldGrammar c g => FieldName -> ALens' s [(String, String)] -> g s [(String, String)]

-- | Known field, which we don't parse, nor pretty print.
knownField :: FieldGrammar c g => FieldName -> g s ()

-- | Field which is parsed but not pretty printed.
hiddenField :: FieldGrammar c g => g s a -> g s a

-- | Deprecated since
deprecatedSince :: FieldGrammar c g => CabalSpecVersion -> String -> g s a -> g s a

-- | Removed in. If we encounter removed field, parsing fails.
removedIn :: FieldGrammar c g => CabalSpecVersion -> String -> g s a -> g s a

-- | Annotate field with since spec-version.
availableSince :: FieldGrammar c g => CabalSpecVersion -> a -> g s a -> g s a

-- | Annotate field with since spec-version. This is used to recognise, but
--   warn about the field. It is used to process other-extensions
--   field.
--   
--   Default implementation is to not warn.
availableSinceWarn :: FieldGrammar c g => CabalSpecVersion -> g s a -> g s a

-- | Field which can be defined at most once.
uniqueField :: forall (c :: Type -> Constraint) g a s. (FieldGrammar c g, c (Identity a)) => FieldName -> ALens' s a -> g s a

-- | Field which can be defined at most once.
optionalField :: forall (c :: Type -> Constraint) g a s. (FieldGrammar c g, c (Identity a)) => FieldName -> ALens' s (Maybe a) -> g s (Maybe a)

-- | Optional field with default value.
optionalFieldDef :: forall (c :: Type -> Constraint) g s a. (FieldGrammar c g, Functor (g s), c (Identity a), Eq a) => FieldName -> ALens' s a -> a -> g s a

-- | Field which can be define multiple times, and the results are
--   mappended.
monoidalField :: forall (c :: Type -> Constraint) g a s. (FieldGrammar c g, c (Identity a), Monoid a) => FieldName -> ALens' s a -> g s a

-- | Default implementation for freeTextFieldDefST.
defaultFreeTextFieldDefST :: forall g s (c :: Type -> Constraint). (Functor (g s), FieldGrammar c g) => FieldName -> ALens' s ShortText -> g s ShortText

module Distribution.FieldGrammar.Pretty
data PrettyFieldGrammar s a

-- | We can use PrettyFieldGrammar to pp print the s.
--   
--   Note: there is not trailing ($+$ text "").
prettyFieldGrammar :: CabalSpecVersion -> PrettyFieldGrammar s a -> s -> [PrettyField ()]
instance GHC.Internal.Base.Applicative (Distribution.FieldGrammar.Pretty.PrettyFieldGrammar s)
instance Distribution.FieldGrammar.Class.FieldGrammar Distribution.Pretty.Pretty Distribution.FieldGrammar.Pretty.PrettyFieldGrammar
instance GHC.Internal.Base.Functor (Distribution.FieldGrammar.Pretty.PrettyFieldGrammar s)

-- | This module provides a FieldGrammarParser, one way to parse
--   .cabal -like files.
--   
--   Fields can be specified multiple times in the .cabal files. The order
--   of such entries is important, but the mutual ordering of different
--   fields is not.Also conditional sections are considered after
--   non-conditional data. The example of this silent-commutation quirk is
--   the fact that
--   
--   
--   buildable: True
--   if os(linux)
--     buildable: False
--   
--   
--   and
--   
--   
--   if os(linux)
--     buildable: False
--   buildable: True
--   
--   
--   behave the same! This is the limitation of
--   GeneralPackageDescription structure.
--   
--   So we transform the list of fields [Field ann] into a
--   map of grouped ordinary fields and a list of lists of sections:
--   Fields ann = Map FieldName
--   [NamelessField ann] and [[Section ann]].
--   
--   We need list of list of sections, because we need to distinguish
--   situations where there are fields in between. For example
--   
--   
--   if flag(bytestring-lt-0_10_4)
--     build-depends: bytestring < 0.10.4
--   
--   default-language: Haskell2020
--   
--   else
--     build-depends: bytestring >= 0.10.4
--   
--   
--   is obviously invalid specification.
--   
--   We can parse Fields like we parse aeson objects, yet
--   we use slightly higher-level API, so we can process unspecified
--   fields, to report unknown fields and save custom x-fields.
module Distribution.FieldGrammar.Parsec
data ParsecFieldGrammar s a
parseFieldGrammar :: CabalSpecVersion -> Fields Position -> ParsecFieldGrammar s a -> ParseResult a
fieldGrammarKnownFieldList :: ParsecFieldGrammar s a -> [FieldName]
type Fields ann = Map FieldName [NamelessField ann]

-- | Single field, without name, but with its annotation.
data NamelessField ann
MkNamelessField :: !ann -> [FieldLine ann] -> NamelessField ann
namelessFieldAnn :: NamelessField ann -> ann

-- | The Section constructor of Field.
data Section ann
MkSection :: !Name ann -> [SectionArg ann] -> [Field ann] -> Section ann
runFieldParser :: Position -> ParsecParser a -> CabalSpecVersion -> [FieldLine Position] -> ParseResult a
runFieldParser' :: [Position] -> ParsecParser a -> CabalSpecVersion -> FieldLineStream -> ParseResult a
fieldLinesToStream :: [FieldLine ann] -> FieldLineStream
instance GHC.Internal.Base.Applicative (Distribution.FieldGrammar.Parsec.ParsecFieldGrammar s)
instance GHC.Classes.Eq ann => GHC.Classes.Eq (Distribution.FieldGrammar.Parsec.NamelessField ann)
instance GHC.Classes.Eq ann => GHC.Classes.Eq (Distribution.FieldGrammar.Parsec.Section ann)
instance Distribution.FieldGrammar.Class.FieldGrammar Distribution.Parsec.Parsec Distribution.FieldGrammar.Parsec.ParsecFieldGrammar
instance GHC.Internal.Base.Functor Distribution.FieldGrammar.Parsec.NamelessField
instance GHC.Internal.Base.Functor (Distribution.FieldGrammar.Parsec.ParsecFieldGrammar s)
instance GHC.Internal.Base.Functor Distribution.FieldGrammar.Parsec.Section
instance GHC.Internal.Show.Show ann => GHC.Internal.Show.Show (Distribution.FieldGrammar.Parsec.NamelessField ann)
instance GHC.Internal.Show.Show ann => GHC.Internal.Show.Show (Distribution.FieldGrammar.Parsec.Section ann)

-- | This module provides a way to specify a grammar of .cabal
--   -like files.
module Distribution.FieldGrammar

-- | FieldGrammar is parametrised by
--   
--   
--   
- s which is a structure we are parsing. We need this to
--   provide prettyprinter functionality
--   
- a type of the field.
--   
--   
--   Note: We'd like to have forall s. Applicative (f s)
--   context.
class (c SpecVersion, c TestedWith, c SpecLicense, c Token, c Token', c FilePathNT) => FieldGrammar (c :: Type -> Constraint) (g :: Type -> Type -> Type) | g -> c

-- | Unfocus, zoom out, blur FieldGrammar.
blurFieldGrammar :: FieldGrammar c g => ALens' a b -> g b d -> g a d

-- | Field which should be defined, exactly once.
uniqueFieldAla :: (FieldGrammar c g, c b, Newtype a b) => FieldName -> (a -> b) -> ALens' s a -> g s a

-- | Boolean field with a default value.
booleanFieldDef :: FieldGrammar c g => FieldName -> ALens' s Bool -> Bool -> g s Bool

-- | Optional field.
optionalFieldAla :: (FieldGrammar c g, c b, Newtype a b) => FieldName -> (a -> b) -> ALens' s (Maybe a) -> g s (Maybe a)

-- | Optional field with default value.
optionalFieldDefAla :: (FieldGrammar c g, c b, Newtype a b, Eq a) => FieldName -> (a -> b) -> ALens' s a -> a -> g s a
freeTextField :: FieldGrammar c g => FieldName -> ALens' s (Maybe String) -> g s (Maybe String)
freeTextFieldDef :: FieldGrammar c g => FieldName -> ALens' s String -> g s String

freeTextFieldDefST :: FieldGrammar c g => FieldName -> ALens' s ShortText -> g s ShortText

-- | Monoidal field.
--   
--   Values are combined with mappend.
--   
--   Note: optionalFieldAla is a monoidalField with
--   Last monoid.
monoidalFieldAla :: (FieldGrammar c g, c b, Monoid a, Newtype a b) => FieldName -> (a -> b) -> ALens' s a -> g s a

-- | Parser matching all fields with a name starting with a prefix.
prefixedFields :: FieldGrammar c g => FieldName -> ALens' s [(String, String)] -> g s [(String, String)]

-- | Known field, which we don't parse, nor pretty print.
knownField :: FieldGrammar c g => FieldName -> g s ()

-- | Field which is parsed but not pretty printed.
hiddenField :: FieldGrammar c g => g s a -> g s a

-- | Deprecated since
deprecatedSince :: FieldGrammar c g => CabalSpecVersion -> String -> g s a -> g s a

-- | Removed in. If we encounter removed field, parsing fails.
removedIn :: FieldGrammar c g => CabalSpecVersion -> String -> g s a -> g s a

-- | Annotate field with since spec-version.
availableSince :: FieldGrammar c g => CabalSpecVersion -> a -> g s a -> g s a

-- | Annotate field with since spec-version. This is used to recognise, but
--   warn about the field. It is used to process other-extensions
--   field.
--   
--   Default implementation is to not warn.
availableSinceWarn :: FieldGrammar c g => CabalSpecVersion -> g s a -> g s a

-- | Field which can be defined at most once.
uniqueField :: forall (c :: Type -> Constraint) g a s. (FieldGrammar c g, c (Identity a)) => FieldName -> ALens' s a -> g s a

-- | Field which can be defined at most once.
optionalField :: forall (c :: Type -> Constraint) g a s. (FieldGrammar c g, c (Identity a)) => FieldName -> ALens' s (Maybe a) -> g s (Maybe a)

-- | Optional field with default value.
optionalFieldDef :: forall (c :: Type -> Constraint) g s a. (FieldGrammar c g, Functor (g s), c (Identity a), Eq a) => FieldName -> ALens' s a -> a -> g s a

-- | Field which can be define multiple times, and the results are
--   mappended.
monoidalField :: forall (c :: Type -> Constraint) g a s. (FieldGrammar c g, c (Identity a), Monoid a) => FieldName -> ALens' s a -> g s a
data ParsecFieldGrammar s a
type ParsecFieldGrammar' a = ParsecFieldGrammar a a
parseFieldGrammar :: CabalSpecVersion -> Fields Position -> ParsecFieldGrammar s a -> ParseResult a
fieldGrammarKnownFieldList :: ParsecFieldGrammar s a -> [FieldName]
data PrettyFieldGrammar s a
type PrettyFieldGrammar' a = PrettyFieldGrammar a a

-- | We can use PrettyFieldGrammar to pp print the s.
--   
--   Note: there is not trailing ($+$ text "").
prettyFieldGrammar :: CabalSpecVersion -> PrettyFieldGrammar s a -> s -> [PrettyField ()]

-- | Reverse function application which binds tighter than <$>
--   and <*>. Useful for refining grammar specification.
--   
--   
--   <*> monoidalFieldAla "extensions"           (alaList' FSep MQuoted)       oldExtensions
--       ^^^ deprecatedSince [1,12] "Please use 'default-extensions' or 'other-extensions' fields."
--   
(^^^) :: a -> (a -> b) -> b
infixl 5 ^^^

-- | The Section constructor of Field.
data Section ann
MkSection :: !Name ann -> [SectionArg ann] -> [Field ann] -> Section ann
type Fields ann = Map FieldName [NamelessField ann]

-- | Partition field list into field map and groups of sections.
partitionFields :: [Field ann] -> (Fields ann, [[Section ann]])

-- | Take all fields from the front.
takeFields :: [Field ann] -> (Fields ann, [Field ann])
runFieldParser :: Position -> ParsecParser a -> CabalSpecVersion -> [FieldLine Position] -> ParseResult a
runFieldParser' :: [Position] -> ParsecParser a -> CabalSpecVersion -> FieldLineStream -> ParseResult a

-- | Default implementation for freeTextFieldDefST.
defaultFreeTextFieldDefST :: forall g s (c :: Type -> Constraint). (Functor (g s), FieldGrammar c g) => FieldName -> ALens' s ShortText -> g s ShortText

-- | GenericPackageDescription Field descriptions
module Distribution.PackageDescription.FieldGrammar
packageDescriptionFieldGrammar :: forall (c :: Type -> Constraint) g. (FieldGrammar c g, Applicative (g PackageDescription), Applicative (g PackageIdentifier), c (Identity BuildType), c (Identity PackageName), c (Identity Version), c (List FSep FilePathNT String), c (List FSep CompatFilePath String), c (List FSep (Identity (SymbolicPath PackageDir LicenseFile)) (SymbolicPath PackageDir LicenseFile)), c (List FSep TestedWith (CompilerFlavor, VersionRange)), c (List VCat FilePathNT String), c FilePathNT, c CompatLicenseFile, c CompatFilePath, c SpecLicense, c SpecVersion) => g PackageDescription PackageDescription

-- | Compat FilePath accepts empty file path, but issues a warning.
--   
--   There are simply too many (~1200) package definition files
--   
--   
--   license-file: ""
--   
--   
--   and
--   
--   
--   data-dir: ""
--   
--   
--   across Hackage to outrule them completely. I suspect some of them are
--   generated (e.g. formatted) by machine.
newtype CompatFilePath
CompatFilePath :: FilePath -> CompatFilePath
[getCompatFilePath] :: CompatFilePath -> FilePath
newtype CompatLicenseFile
CompatLicenseFile :: [SymbolicPath PackageDir LicenseFile] -> CompatLicenseFile
[getCompatLicenseFile] :: CompatLicenseFile -> [SymbolicPath PackageDir LicenseFile]
libraryFieldGrammar :: forall (c :: Type -> Constraint) g. (FieldGrammar c g, Applicative (g Library), Applicative (g BuildInfo), c (Identity LibraryVisibility), c (List CommaFSep (Identity ExeDependency) ExeDependency), c (List CommaFSep (Identity LegacyExeDependency) LegacyExeDependency), c (List CommaFSep (Identity PkgconfigDependency) PkgconfigDependency), c (List CommaVCat (Identity Dependency) Dependency), c (List CommaVCat (Identity Mixin) Mixin), c (List CommaVCat (Identity ModuleReexport) ModuleReexport), c (List FSep (MQuoted Extension) Extension), c (List FSep (MQuoted Language) Language), c (List FSep FilePathNT String), c (List FSep Token String), c (List NoCommaFSep Token' String), c (List VCat (MQuoted ModuleName) ModuleName), c (List VCat FilePathNT String), c (List FSep (Identity (SymbolicPath PackageDir SourceDir)) (SymbolicPath PackageDir SourceDir)), c (List VCat Token String), c (MQuoted Language)) => LibraryName -> g Library Library
foreignLibFieldGrammar :: forall (c :: Type -> Constraint) g. (FieldGrammar c g, Applicative (g ForeignLib), Applicative (g BuildInfo), c (Identity ForeignLibType), c (Identity LibVersionInfo), c (Identity Version), c (List CommaFSep (Identity ExeDependency) ExeDependency), c (List CommaFSep (Identity LegacyExeDependency) LegacyExeDependency), c (List CommaFSep (Identity PkgconfigDependency) PkgconfigDependency), c (List CommaVCat (Identity Dependency) Dependency), c (List CommaVCat (Identity Mixin) Mixin), c (List FSep (Identity ForeignLibOption) ForeignLibOption), c (List FSep (MQuoted Extension) Extension), c (List FSep (MQuoted Language) Language), c (List FSep FilePathNT String), c (List FSep Token String), c (List FSep (Identity (SymbolicPath PackageDir SourceDir)) (SymbolicPath PackageDir SourceDir)), c (List NoCommaFSep Token' String), c (List VCat (MQuoted ModuleName) ModuleName), c (List VCat FilePathNT String), c (List VCat Token String), c (MQuoted Language)) => UnqualComponentName -> g ForeignLib ForeignLib
executableFieldGrammar :: forall (c :: Type -> Constraint) g. (FieldGrammar c g, Applicative (g Executable), Applicative (g BuildInfo), c (Identity ExecutableScope), c (List CommaFSep (Identity ExeDependency) ExeDependency), c (List CommaFSep (Identity LegacyExeDependency) LegacyExeDependency), c (List CommaFSep (Identity PkgconfigDependency) PkgconfigDependency), c (List CommaVCat (Identity Dependency) Dependency), c (List CommaVCat (Identity Mixin) Mixin), c (List FSep (MQuoted Extension) Extension), c (List FSep (MQuoted Language) Language), c (List FSep FilePathNT String), c (List FSep Token String), c (List FSep (Identity (SymbolicPath PackageDir SourceDir)) (SymbolicPath PackageDir SourceDir)), c (List NoCommaFSep Token' String), c (List VCat (MQuoted ModuleName) ModuleName), c (List VCat FilePathNT String), c (List VCat Token String), c (MQuoted Language)) => UnqualComponentName -> g Executable Executable

-- | An intermediate type just used for parsing the test-suite stanza.
--   After validation it is converted into the proper TestSuite
--   type.
data TestSuiteStanza
TestSuiteStanza :: Maybe TestType -> Maybe FilePath -> Maybe ModuleName -> BuildInfo -> [String] -> TestSuiteStanza
[_testStanzaTestType] :: TestSuiteStanza -> Maybe TestType
[_testStanzaMainIs] :: TestSuiteStanza -> Maybe FilePath
[_testStanzaTestModule] :: TestSuiteStanza -> Maybe ModuleName
[_testStanzaBuildInfo] :: TestSuiteStanza -> BuildInfo
[_testStanzaCodeGenerators] :: TestSuiteStanza -> [String]
testSuiteFieldGrammar :: forall (c :: Type -> Constraint) g. (FieldGrammar c g, Applicative (g TestSuiteStanza), Applicative (g BuildInfo), c (Identity ModuleName), c (Identity TestType), c (List CommaFSep (Identity ExeDependency) ExeDependency), c (List CommaFSep (Identity LegacyExeDependency) LegacyExeDependency), c (List CommaFSep (Identity PkgconfigDependency) PkgconfigDependency), c (List CommaFSep Token String), c (List CommaVCat (Identity Dependency) Dependency), c (List CommaVCat (Identity Mixin) Mixin), c (List FSep (MQuoted Extension) Extension), c (List FSep (MQuoted Language) Language), c (List FSep FilePathNT String), c (List FSep Token String), c (List NoCommaFSep Token' String), c (List VCat (MQuoted ModuleName) ModuleName), c (List VCat FilePathNT String), c (List FSep (Identity (SymbolicPath PackageDir SourceDir)) (SymbolicPath PackageDir SourceDir)), c (List VCat Token String), c (MQuoted Language)) => g TestSuiteStanza TestSuiteStanza
validateTestSuite :: CabalSpecVersion -> Position -> TestSuiteStanza -> ParseResult TestSuite
unvalidateTestSuite :: TestSuite -> TestSuiteStanza
testStanzaTestType :: Lens' TestSuiteStanza (Maybe TestType)
testStanzaMainIs :: Lens' TestSuiteStanza (Maybe FilePath)
testStanzaTestModule :: Lens' TestSuiteStanza (Maybe ModuleName)
testStanzaBuildInfo :: Lens' TestSuiteStanza BuildInfo

-- | An intermediate type just used for parsing the benchmark stanza. After
--   validation it is converted into the proper Benchmark type.
data BenchmarkStanza
BenchmarkStanza :: Maybe BenchmarkType -> Maybe FilePath -> Maybe ModuleName -> BuildInfo -> BenchmarkStanza
[_benchmarkStanzaBenchmarkType] :: BenchmarkStanza -> Maybe BenchmarkType
[_benchmarkStanzaMainIs] :: BenchmarkStanza -> Maybe FilePath
[_benchmarkStanzaBenchmarkModule] :: BenchmarkStanza -> Maybe ModuleName
[_benchmarkStanzaBuildInfo] :: BenchmarkStanza -> BuildInfo
benchmarkFieldGrammar :: forall (c :: Type -> Constraint) g. (FieldGrammar c g, Applicative (g BenchmarkStanza), Applicative (g BuildInfo), c (Identity BenchmarkType), c (Identity ModuleName), c (List CommaFSep (Identity ExeDependency) ExeDependency), c (List CommaFSep (Identity LegacyExeDependency) LegacyExeDependency), c (List CommaFSep (Identity PkgconfigDependency) PkgconfigDependency), c (List CommaVCat (Identity Dependency) Dependency), c (List CommaVCat (Identity Mixin) Mixin), c (List FSep (MQuoted Extension) Extension), c (List FSep (MQuoted Language) Language), c (List FSep FilePathNT String), c (List FSep Token String), c (List NoCommaFSep Token' String), c (List VCat (MQuoted ModuleName) ModuleName), c (List VCat FilePathNT String), c (List FSep (Identity (SymbolicPath PackageDir SourceDir)) (SymbolicPath PackageDir SourceDir)), c (List VCat Token String), c (MQuoted Language)) => g BenchmarkStanza BenchmarkStanza
validateBenchmark :: CabalSpecVersion -> Position -> BenchmarkStanza -> ParseResult Benchmark
unvalidateBenchmark :: Benchmark -> BenchmarkStanza
formatDependencyList :: [Dependency] -> List CommaVCat (Identity Dependency) Dependency
formatExposedModules :: [ModuleName] -> List VCat (MQuoted ModuleName) ModuleName
formatExtraSourceFiles :: [FilePath] -> List VCat FilePathNT FilePath
formatHsSourceDirs :: [SymbolicPath PackageDir SourceDir] -> List FSep (Identity (SymbolicPath PackageDir SourceDir)) (SymbolicPath PackageDir SourceDir)
formatMixinList :: [Mixin] -> List CommaVCat (Identity Mixin) Mixin
formatOtherExtensions :: [Extension] -> List FSep (MQuoted Extension) Extension
formatOtherModules :: [ModuleName] -> List VCat (MQuoted ModuleName) ModuleName
benchmarkStanzaBenchmarkType :: Lens' BenchmarkStanza (Maybe BenchmarkType)
benchmarkStanzaMainIs :: Lens' BenchmarkStanza (Maybe FilePath)
benchmarkStanzaBenchmarkModule :: Lens' BenchmarkStanza (Maybe ModuleName)
benchmarkStanzaBuildInfo :: Lens' BenchmarkStanza BuildInfo
flagFieldGrammar :: forall (c :: Type -> Constraint) g. (FieldGrammar c g, Applicative (g PackageFlag)) => FlagName -> g PackageFlag PackageFlag
sourceRepoFieldGrammar :: forall (c :: Type -> Constraint) g. (FieldGrammar c g, Applicative (g SourceRepo), c (Identity RepoType), c Token, c FilePathNT) => RepoKind -> g SourceRepo SourceRepo
setupBInfoFieldGrammar :: forall (c :: Type -> Constraint) g. (FieldGrammar c g, Functor (g SetupBuildInfo), c (List CommaVCat (Identity Dependency) Dependency)) => Bool -> g SetupBuildInfo SetupBuildInfo
buildInfoFieldGrammar :: forall (c :: Type -> Constraint) g. (FieldGrammar c g, Applicative (g BuildInfo), c (List CommaFSep (Identity ExeDependency) ExeDependency), c (List CommaFSep (Identity LegacyExeDependency) LegacyExeDependency), c (List CommaFSep (Identity PkgconfigDependency) PkgconfigDependency), c (List CommaVCat (Identity Dependency) Dependency), c (List CommaVCat (Identity Mixin) Mixin), c (List FSep (MQuoted Extension) Extension), c (List FSep (MQuoted Language) Language), c (List FSep FilePathNT String), c (List FSep Token String), c (List NoCommaFSep Token' String), c (List VCat (MQuoted ModuleName) ModuleName), c (List VCat FilePathNT String), c (List FSep (Identity (SymbolicPath PackageDir SourceDir)) (SymbolicPath PackageDir SourceDir)), c (List VCat Token String), c (MQuoted Language)) => g BuildInfo BuildInfo
instance Distribution.Types.BuildInfo.Lens.HasBuildInfo Distribution.PackageDescription.FieldGrammar.BenchmarkStanza
instance Distribution.Types.BuildInfo.Lens.HasBuildInfo Distribution.PackageDescription.FieldGrammar.TestSuiteStanza
instance Distribution.Compat.Newtype.Newtype GHC.Internal.Base.String Distribution.PackageDescription.FieldGrammar.CompatFilePath
instance Distribution.Compat.Newtype.Newtype [Distribution.Utils.Path.SymbolicPath Distribution.Utils.Path.PackageDir Distribution.Utils.Path.LicenseFile] Distribution.PackageDescription.FieldGrammar.CompatLicenseFile
instance Distribution.Parsec.Parsec Distribution.PackageDescription.FieldGrammar.CompatFilePath
instance Distribution.Parsec.Parsec Distribution.PackageDescription.FieldGrammar.CompatLicenseFile
instance Distribution.Pretty.Pretty Distribution.PackageDescription.FieldGrammar.CompatFilePath
instance Distribution.Pretty.Pretty Distribution.PackageDescription.FieldGrammar.CompatLicenseFile

-- | Pretty printing for cabal files
module Distribution.PackageDescription.PrettyPrint

-- | Writes a .cabal file from a generic package description
writeGenericPackageDescription :: FilePath -> GenericPackageDescription -> IO ()

-- | Writes a generic package description to a string
showGenericPackageDescription :: GenericPackageDescription -> String

-- | Convert a generic package description to PrettyFields.
ppGenericPackageDescription :: CabalSpecVersion -> GenericPackageDescription -> [PrettyField ()]

writePackageDescription :: FilePath -> PackageDescription -> IO ()

showPackageDescription :: PackageDescription -> String

writeHookedBuildInfo :: FilePath -> HookedBuildInfo -> IO ()

showHookedBuildInfo :: HookedBuildInfo -> String

-- | This defined parsers and partial pretty printers for the
--   .cabal format.
module Distribution.PackageDescription.Parsec

-- | Parses the given file into a GenericPackageDescription.
--   
--   In Cabal 1.2 the syntax for package descriptions was changed to a
--   format with sections and possibly indented property descriptions.
parseGenericPackageDescription :: ByteString -> ParseResult GenericPackageDescription

-- | Maybe variant of parseGenericPackageDescription
parseGenericPackageDescriptionMaybe :: ByteString -> Maybe GenericPackageDescription

-- | A monad with failure and accumulating errors and warnings.
data ParseResult a

-- | Destruct a ParseResult into the emitted warnings and either a
--   successful value or list of errors and possibly recovered a
--   spec-version declaration.
runParseResult :: ParseResult a -> ([PWarning], Either (Maybe Version, NonEmpty PError) a)

-- | Quickly scan new-style spec-version
--   
--   A new-style spec-version declaration begins the .cabal file and follow
--   the following case-insensitive grammar (expressed in RFC5234 ABNF):
--   
--   
--   newstyle-spec-version-decl = "cabal-version" *WS ":" *WS newstyle-pec-version *WS
--   
--   spec-version               = NUM "." NUM [ "." NUM ]
--   
--   NUM    = DIGIT0 / DIGITP 1*DIGIT0
--   DIGIT0 = %x30-39
--   DIGITP = %x31-39
--   WS = %20
--   
scanSpecVersion :: ByteString -> Maybe Version
parseHookedBuildInfo :: ByteString -> ParseResult HookedBuildInfo
instance GHC.Classes.Eq Distribution.PackageDescription.Parsec.Syntax
instance Distribution.PackageDescription.Parsec.FromBuildInfo Distribution.PackageDescription.FieldGrammar.BenchmarkStanza
instance Distribution.PackageDescription.Parsec.FromBuildInfo Distribution.Types.BuildInfo.BuildInfo
instance Distribution.PackageDescription.Parsec.FromBuildInfo Distribution.Types.Executable.Executable
instance Distribution.PackageDescription.Parsec.FromBuildInfo Distribution.Types.ForeignLib.ForeignLib
instance Distribution.PackageDescription.Parsec.FromBuildInfo Distribution.PackageDescription.FieldGrammar.TestSuiteStanza
instance GHC.Internal.Show.Show Distribution.PackageDescription.Parsec.Syntax

module Distribution.FieldGrammar.FieldDescrs

-- | A collection of field parsers and pretty-printers.
data FieldDescrs s a

-- | Lookup a field value pretty-printer.
fieldDescrPretty :: FieldDescrs s a -> FieldName -> Maybe (s -> Doc)

-- | Lookup a field value parser.
fieldDescrParse :: CabalParsing m => FieldDescrs s a -> FieldName -> Maybe (s -> m s)
fieldDescrsToList :: CabalParsing m => FieldDescrs s a -> [(FieldName, s -> Doc, s -> m s)]
instance GHC.Internal.Base.Applicative (Distribution.FieldGrammar.FieldDescrs.FieldDescrs s)
instance Distribution.FieldGrammar.Class.FieldGrammar Distribution.FieldGrammar.FieldDescrs.ParsecPretty Distribution.FieldGrammar.FieldDescrs.FieldDescrs
instance GHC.Internal.Base.Functor (Distribution.FieldGrammar.FieldDescrs.FieldDescrs s)
instance (Distribution.Parsec.Parsec a, Distribution.Pretty.Pretty a) => Distribution.FieldGrammar.FieldDescrs.ParsecPretty a

module Distribution.Types.InstalledPackageInfo.FieldGrammar
ipiFieldGrammar :: forall (c :: Type -> Constraint) g. (FieldGrammar c g, Applicative (g InstalledPackageInfo), Applicative (g Basic), c (Identity AbiHash), c (Identity LibraryVisibility), c (Identity PackageName), c (Identity UnitId), c (Identity UnqualComponentName), c (List FSep (Identity AbiDependency) AbiDependency), c (List FSep (Identity UnitId) UnitId), c (List FSep (MQuoted ModuleName) ModuleName), c (List FSep FilePathNT String), c (List FSep Token String), c (MQuoted MungedPackageName), c (MQuoted Version), c CompatPackageKey, c ExposedModules, c InstWith, c SpecLicenseLenient) => g InstalledPackageInfo InstalledPackageInfo
instance Distribution.Compat.Newtype.Newtype (GHC.Internal.Data.Either.Either Distribution.SPDX.License.License Distribution.License.License) Distribution.Types.InstalledPackageInfo.FieldGrammar.SpecLicenseLenient
instance Distribution.Compat.Newtype.Newtype GHC.Internal.Base.String Distribution.Types.InstalledPackageInfo.FieldGrammar.CompatPackageKey
instance Distribution.Compat.Newtype.Newtype [Distribution.Types.ExposedModule.ExposedModule] Distribution.Types.InstalledPackageInfo.FieldGrammar.ExposedModules
instance Distribution.Compat.Newtype.Newtype [(Distribution.ModuleName.ModuleName, Distribution.Backpack.OpenModule)] Distribution.Types.InstalledPackageInfo.FieldGrammar.InstWith
instance Distribution.Parsec.Parsec Distribution.Types.InstalledPackageInfo.FieldGrammar.CompatPackageKey
instance Distribution.Parsec.Parsec Distribution.Types.InstalledPackageInfo.FieldGrammar.ExposedModules
instance Distribution.Parsec.Parsec Distribution.Types.InstalledPackageInfo.FieldGrammar.InstWith
instance Distribution.Parsec.Parsec Distribution.Types.InstalledPackageInfo.FieldGrammar.SpecLicenseLenient
instance Distribution.Pretty.Pretty Distribution.Types.InstalledPackageInfo.FieldGrammar.CompatPackageKey
instance Distribution.Pretty.Pretty Distribution.Types.InstalledPackageInfo.FieldGrammar.ExposedModules
instance Distribution.Pretty.Pretty Distribution.Types.InstalledPackageInfo.FieldGrammar.InstWith
instance Distribution.Pretty.Pretty Distribution.Types.InstalledPackageInfo.FieldGrammar.SpecLicenseLenient

-- | This is the information about an installed package that is
--   communicated to the ghc-pkg program in order to register a
--   package. ghc-pkg now consumes this package format (as of
--   version 6.4). This is specific to GHC at the moment.
--   
--   The .cabal file format is for describing a package that is
--   not yet installed. It has a lot of flexibility, like conditionals and
--   dependency ranges. As such, that format is not at all suitable for
--   describing a package that has already been built and installed. By the
--   time we get to that stage, we have resolved all conditionals and
--   resolved dependency version constraints to exact versions of dependent
--   packages. So, this module defines the InstalledPackageInfo data
--   structure that contains all the info we keep about an installed
--   package. There is a parser and pretty printer. The textual format is
--   rather simpler than the .cabal format: there are no sections,
--   for example.
module Distribution.InstalledPackageInfo
data InstalledPackageInfo
InstalledPackageInfo :: PackageId -> LibraryName -> ComponentId -> LibraryVisibility -> UnitId -> [(ModuleName, OpenModule)] -> String -> Either License License -> !ShortText -> !ShortText -> !ShortText -> !ShortText -> !ShortText -> !ShortText -> !ShortText -> !ShortText -> !ShortText -> AbiHash -> Bool -> Bool -> [ExposedModule] -> [ModuleName] -> Bool -> [FilePath] -> [FilePath] -> [FilePath] -> [FilePath] -> FilePath -> [String] -> [String] -> [String] -> [String] -> [FilePath] -> [String] -> [UnitId] -> [AbiDependency] -> [String] -> [String] -> [String] -> [FilePath] -> [String] -> [FilePath] -> [FilePath] -> Maybe FilePath -> InstalledPackageInfo
[sourcePackageId] :: InstalledPackageInfo -> PackageId
[sourceLibName] :: InstalledPackageInfo -> LibraryName
[installedComponentId_] :: InstalledPackageInfo -> ComponentId
[libVisibility] :: InstalledPackageInfo -> LibraryVisibility
[installedUnitId] :: InstalledPackageInfo -> UnitId
[instantiatedWith] :: InstalledPackageInfo -> [(ModuleName, OpenModule)]
[compatPackageKey] :: InstalledPackageInfo -> String
[license] :: InstalledPackageInfo -> Either License License
[copyright] :: InstalledPackageInfo -> !ShortText
[maintainer] :: InstalledPackageInfo -> !ShortText
[author] :: InstalledPackageInfo -> !ShortText
[stability] :: InstalledPackageInfo -> !ShortText
[homepage] :: InstalledPackageInfo -> !ShortText
[pkgUrl] :: InstalledPackageInfo -> !ShortText
[synopsis] :: InstalledPackageInfo -> !ShortText
[description] :: InstalledPackageInfo -> !ShortText
[category] :: InstalledPackageInfo -> !ShortText
[abiHash] :: InstalledPackageInfo -> AbiHash
[indefinite] :: InstalledPackageInfo -> Bool
[exposed] :: InstalledPackageInfo -> Bool
[exposedModules] :: InstalledPackageInfo -> [ExposedModule]
[hiddenModules] :: InstalledPackageInfo -> [ModuleName]
[trusted] :: InstalledPackageInfo -> Bool
[importDirs] :: InstalledPackageInfo -> [FilePath]
[libraryDirs] :: InstalledPackageInfo -> [FilePath]
[libraryDirsStatic] :: InstalledPackageInfo -> [FilePath]

-- | overrides libraryDirs
[libraryDynDirs] :: InstalledPackageInfo -> [FilePath]
[dataDir] :: InstalledPackageInfo -> FilePath
[hsLibraries] :: InstalledPackageInfo -> [String]
[extraLibraries] :: InstalledPackageInfo -> [String]
[extraLibrariesStatic] :: InstalledPackageInfo -> [String]
[extraGHCiLibraries] :: InstalledPackageInfo -> [String]
[includeDirs] :: InstalledPackageInfo -> [FilePath]
[includes] :: InstalledPackageInfo -> [String]
[depends] :: InstalledPackageInfo -> [UnitId]
[abiDepends] :: InstalledPackageInfo -> [AbiDependency]
[ccOptions] :: InstalledPackageInfo -> [String]
[cxxOptions] :: InstalledPackageInfo -> [String]
[ldOptions] :: InstalledPackageInfo -> [String]
[frameworkDirs] :: InstalledPackageInfo -> [FilePath]
[frameworks] :: InstalledPackageInfo -> [String]
[haddockInterfaces] :: InstalledPackageInfo -> [FilePath]
[haddockHTMLs] :: InstalledPackageInfo -> [FilePath]
[pkgRoot] :: InstalledPackageInfo -> Maybe FilePath
installedComponentId :: InstalledPackageInfo -> ComponentId

-- | Get the indefinite unit identity representing this package. This IS
--   NOT guaranteed to give you a substitution; for instantiated packages
--   you will get DefiniteUnitId (installedUnitId ipi). For
--   indefinite libraries, however, you will correctly get an
--   OpenUnitId with the appropriate OpenModuleSubst.
installedOpenUnitId :: InstalledPackageInfo -> OpenUnitId
sourceComponentName :: InstalledPackageInfo -> ComponentName

-- | Returns the set of module names which need to be filled for an
--   indefinite package, or the empty set if the package is definite.
requiredSignatures :: InstalledPackageInfo -> Set ModuleName
data ExposedModule
ExposedModule :: ModuleName -> Maybe OpenModule -> ExposedModule
[exposedName] :: ExposedModule -> ModuleName
[exposedReexport] :: ExposedModule -> Maybe OpenModule

-- | An ABI dependency is a dependency on a library which also records the
--   ABI hash (abiHash) of the library it depends on.
--   
--   The primary utility of this is to enable an extra sanity when GHC
--   loads libraries: it can check if the dependency has a matching ABI and
--   if not, refuse to load this library. This information is critical if
--   we are shadowing libraries; differences in the ABI hash let us know
--   what packages get shadowed by the new version of a package.
data AbiDependency
AbiDependency :: UnitId -> AbiHash -> AbiDependency
[depUnitId] :: AbiDependency -> UnitId
[depAbiHash] :: AbiDependency -> AbiHash
emptyInstalledPackageInfo :: InstalledPackageInfo

-- | Return either errors, or IPI with list of warnings
parseInstalledPackageInfo :: ByteString -> Either (NonEmpty String) ([String], InstalledPackageInfo)

-- | Pretty print InstalledPackageInfo.
--   
--   pkgRoot isn't printed, as ghc-pkg prints it manually (as
--   GHC-8.4).
showInstalledPackageInfo :: InstalledPackageInfo -> String

-- | The variant of showInstalledPackageInfo which outputs
--   pkgroot field too.
showFullInstalledPackageInfo :: InstalledPackageInfo -> String

-- | 
--   >>> let ipi = emptyInstalledPackageInfo { maintainer = fromString "Tester" }
--   
--   >>> fmap ($ ipi) $ showInstalledPackageInfoField "maintainer"
--   Just "maintainer: Tester"
--   
showInstalledPackageInfoField :: String -> Maybe (InstalledPackageInfo -> String)
showSimpleInstalledPackageInfoField :: String -> Maybe (InstalledPackageInfo -> String)
