haskell-language-server-2.7.0.0: LSP server for GHC

Safe Haskell | None
Language | GHC2021

Ide.Plugin.Cabal.Parse

Contents

- Re-exports

Synopsis

- parseCabalFileContents :: ByteString -> IO ([PWarning], Either (Maybe Version, NonEmpty PError) GenericPackageDescription)
- type FilePath = String
- data NonEmpty a = a :| [a]
- data PWarning = PWarning !PWarnType !Position String
- data Version
- data PError = PError Position String
- data Position = Position !Int !Int
- data GenericPackageDescription = GenericPackageDescription {
  - packageDescription :: PackageDescription
  - gpdScannedVersion :: Maybe Version
  - genPackageFlags :: [PackageFlag]
  - condLibrary :: Maybe (CondTree ConfVar [Dependency] Library)
  - condSubLibraries :: [(UnqualComponentName, CondTree ConfVar [Dependency] Library)]
  - condForeignLibs :: [(UnqualComponentName, CondTree ConfVar [Dependency] ForeignLib)]
  - condExecutables :: [(UnqualComponentName, CondTree ConfVar [Dependency] Executable)]
  - condTestSuites :: [(UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)]
  - condBenchmarks :: [(UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)]
  }

# Documentation

parseCabalFileContents #

Arguments

:: ByteString | UTF-8 encoded bytestring
-> IO ([PWarning], Either (Maybe Version, NonEmpty PError) GenericPackageDescription) |

# Re-exports

type FilePath = String #

File and directory names are values of type `String`, whose precise meaning is operating system dependent. Files can be opened, yielding a handle which can then be used to operate on the contents of that file.

data NonEmpty a #

Non-empty (and non-strict) list type.

Since: base-4.9.0.0

Constructors

a :| [a] infixr 5 |

#### Instances

Instances details

MonadFix NonEmpty | Since: base-4.9.0.0
Instance details Defined in Control.Monad.Fix Methods mfix :: (a -> NonEmpty a) -> NonEmpty a #
MonadZip NonEmpty | Since: base-4.9.0.0
Instance details Defined in Control.Monad.Zip Methods mzip :: NonEmpty a -> NonEmpty b -> NonEmpty (a, b) # mzipWith :: (a -> b -> c) -> NonEmpty a -> NonEmpty b -> NonEmpty c # munzip :: NonEmpty (a, b) -> (NonEmpty a, NonEmpty b) #
Foldable NonEmpty | Since: base-4.9.0.0
Instance details Defined in Data.Foldable Methods fold :: Monoid m => NonEmpty m -> m # foldMap :: Monoid m => (a -> m) -> NonEmpty a -> m # foldMap' :: Monoid m => (a -> m) -> NonEmpty a -> m # foldr :: (a -> b -> b) -> b -> NonEmpty a -> b # foldr' :: (a -> b -> b) -> b -> NonEmpty a -> b # foldl :: (b -> a -> b) -> b -> NonEmpty a -> b # foldl' :: (b -> a -> b) -> b -> NonEmpty a -> b # foldr1 :: (a -> a -> a) -> NonEmpty a -> a # foldl1 :: (a -> a -> a) -> NonEmpty a -> a # toList :: NonEmpty a -> [a] # null :: NonEmpty a -> Bool # length :: NonEmpty a -> Int # elem :: Eq a => a -> NonEmpty a -> Bool # maximum :: Ord a => NonEmpty a -> a # minimum :: Ord a => NonEmpty a -> a # sum :: Num a => NonEmpty a -> a # product :: Num a => NonEmpty a -> a #
Foldable1 NonEmpty | Since: base-4.18.0.0
Instance details Defined in Data.Foldable1 Methods fold1 :: Semigroup m => NonEmpty m -> m # foldMap1 :: Semigroup m => (a -> m) -> NonEmpty a -> m # foldMap1' :: Semigroup m => (a -> m) -> NonEmpty a -> m # toNonEmpty :: NonEmpty a -> NonEmpty a # maximum :: Ord a => NonEmpty a -> a # minimum :: Ord a => NonEmpty a -> a # head :: NonEmpty a -> a # last :: NonEmpty a -> a # foldrMap1 :: (a -> b) -> (a -> b -> b) -> NonEmpty a -> b # foldlMap1' :: (a -> b) -> (b -> a -> b) -> NonEmpty a -> b # foldlMap1 :: (a -> b) -> (b -> a -> b) -> NonEmpty a -> b # foldrMap1' :: (a -> b) -> (a -> b -> b) -> NonEmpty a -> b #
Eq1 NonEmpty | Since: base-4.10.0.0
Instance details Defined in Data.Functor.Classes Methods liftEq :: (a -> b -> Bool) -> NonEmpty a -> NonEmpty b -> Bool #
Ord1 NonEmpty | Since: base-4.10.0.0
Instance details Defined in Data.Functor.Classes Methods liftCompare :: (a -> b -> Ordering) -> NonEmpty a -> NonEmpty b -> Ordering #
Read1 NonEmpty | Since: base-4.10.0.0
Instance details Defined in Data.Functor.Classes Methods liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (NonEmpty a) # liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [NonEmpty a] # liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (NonEmpty a) # liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [NonEmpty a] #
Show1 NonEmpty | Since: base-4.10.0.0
Instance details Defined in Data.Functor.Classes Methods liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> NonEmpty a -> ShowS # liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [NonEmpty a] -> ShowS #
Traversable NonEmpty | Since: base-4.9.0.0
Instance details Defined in Data.Traversable Methods traverse :: Applicative f => (a -> f b) -> NonEmpty a -> f (NonEmpty b) # sequenceA :: Applicative f => NonEmpty (f a) -> f (NonEmpty a) # mapM :: Monad m => (a -> m b) -> NonEmpty a -> m (NonEmpty b) # sequence :: Monad m => NonEmpty (m a) -> m (NonEmpty a) #
Applicative NonEmpty | Since: base-4.9.0.0
Instance details Defined in GHC.Base Methods pure :: a -> NonEmpty a # (<*>) :: NonEmpty (a -> b) -> NonEmpty a -> NonEmpty b # liftA2 :: (a -> b -> c) -> NonEmpty a -> NonEmpty b -> NonEmpty c # (*>) :: NonEmpty a -> NonEmpty b -> NonEmpty b # (<*) :: NonEmpty a -> NonEmpty b -> NonEmpty a #
Functor NonEmpty | Since: base-4.9.0.0
Instance details Defined in GHC.Base Methods fmap :: (a -> b) -> NonEmpty a -> NonEmpty b # (<$) :: a -> NonEmpty b -> NonEmpty a #
Monad NonEmpty | Since: base-4.9.0.0
Instance details Defined in GHC.Base Methods (>>=) :: NonEmpty a -> (a -> NonEmpty b) -> NonEmpty b # (>>) :: NonEmpty a -> NonEmpty b -> NonEmpty b # return :: a -> NonEmpty a #
NFData1 NonEmpty | Since: deepseq-1.4.3.0
Instance details Defined in Control.DeepSeq Methods liftRnf :: (a -> ()) -> NonEmpty a -> () #
Hashable1 NonEmpty | Since: hashable-1.3.1.0
Instance details Defined in Data.Hashable.Class Methods liftHashWithSalt :: (Int -> a -> Int) -> Int -> NonEmpty a -> Int #
Generic1 NonEmpty |
Instance details Defined in GHC.Generics Associated Types
type Rep1 NonEmpty | Since: base-4.6.0.0
Instance details Defined in GHC.Generics type Rep1 NonEmpty = D1 ('MetaData "NonEmpty" "GHC.Base" "base" 'False) (C1 ('MetaCons ":|" ('InfixI 'RightAssociative 5) 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1 :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 [])))
Methods from1 :: NonEmpty a -> Rep1 NonEmpty a # to1 :: Rep1 NonEmpty a -> NonEmpty a #
Lift a => Lift (NonEmpty a :: Type) | Since: template-haskell-2.15.0.0
Instance details Defined in Language.Haskell.TH.Syntax Methods lift :: Quote m => NonEmpty a -> m Exp # liftTyped :: forall (m :: Type -> Type). Quote m => NonEmpty a -> Code m (NonEmpty a) #
Structured a => Structured (NonEmpty a) |
Instance details Defined in Distribution.Utils.Structured Methods structure :: Proxy (NonEmpty a) -> Structure # structureHash' :: Tagged (NonEmpty a) MD5
Data a => Data (NonEmpty a) | Since: base-4.9.0.0
Instance details Defined in Data.Data Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> NonEmpty a -> c (NonEmpty a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (NonEmpty a) # toConstr :: NonEmpty a -> Constr # dataTypeOf :: NonEmpty a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (NonEmpty a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (NonEmpty a)) # gmapT :: (forall b. Data b => b -> b) -> NonEmpty a -> NonEmpty a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NonEmpty a -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NonEmpty a -> r # gmapQ :: (forall d. Data d => d -> u) -> NonEmpty a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> NonEmpty a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> NonEmpty a -> m (NonEmpty a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> NonEmpty a -> m (NonEmpty a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> NonEmpty a -> m (NonEmpty a) #
Semigroup (NonEmpty a) | Since: base-4.9.0.0
Instance details Defined in GHC.Base Methods (<>) :: NonEmpty a -> NonEmpty a -> NonEmpty a # sconcat :: NonEmpty (NonEmpty a) -> NonEmpty a # stimes :: Integral b => b -> NonEmpty a -> NonEmpty a #
Generic (NonEmpty a) |
Instance details Defined in GHC.Generics Associated Types
type Rep (NonEmpty a) | Since: base-4.6.0.0
Instance details Defined in GHC.Generics type Rep (NonEmpty a) = D1 ('MetaData "NonEmpty" "GHC.Base" "base" 'False) (C1 ('MetaCons ":|" ('InfixI 'RightAssociative 5) 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [a])))
Methods from :: NonEmpty a -> Rep (NonEmpty a) x # to :: Rep (NonEmpty a) x -> NonEmpty a #
IsList (NonEmpty a) | Since: base-4.9.0.0
Instance details Defined in GHC.IsList Associated Types
type Item (NonEmpty a) |
Instance details Defined in GHC.IsList type Item (NonEmpty a) = a
Methods fromList :: [Item (NonEmpty a)] -> NonEmpty a # fromListN :: Int -> [Item (NonEmpty a)] -> NonEmpty a # toList :: NonEmpty a -> [Item (NonEmpty a)] #
Read a => Read (NonEmpty a) | Since: base-4.11.0.0
Instance details Defined in GHC.Read Methods readsPrec :: Int -> ReadS (NonEmpty a) # readList :: ReadS [NonEmpty a] # readPrec :: ReadPrec (NonEmpty a) # readListPrec :: ReadPrec [NonEmpty a] #
Show a => Show (NonEmpty a) | Since: base-4.11.0.0
Instance details Defined in GHC.Show Methods showsPrec :: Int -> NonEmpty a -> ShowS # show :: NonEmpty a -> String # showList :: [NonEmpty a] -> ShowS #
NFData a => NFData (NonEmpty a) | Since: deepseq-1.4.2.0
Instance details Defined in Control.DeepSeq Methods rnf :: NonEmpty a -> () #
Outputable a => Outputable (NonEmpty a) |
Instance details Defined in GHC.Utils.Outputable Methods ppr :: NonEmpty a -> SDoc #
Eq a => Eq (NonEmpty a) | Since: base-4.9.0.0
Instance details Defined in GHC.Base Methods (==) :: NonEmpty a -> NonEmpty a -> Bool # (/=) :: NonEmpty a -> NonEmpty a -> Bool #
Ord a => Ord (NonEmpty a) | Since: base-4.9.0.0
Instance details Defined in GHC.Base Methods compare :: NonEmpty a -> NonEmpty a -> Ordering # (<) :: NonEmpty a -> NonEmpty a -> Bool # (<=) :: NonEmpty a -> NonEmpty a -> Bool # (>) :: NonEmpty a -> NonEmpty a -> Bool # (>=) :: NonEmpty a -> NonEmpty a -> Bool # max :: NonEmpty a -> NonEmpty a -> NonEmpty a # min :: NonEmpty a -> NonEmpty a -> NonEmpty a #
Hashable a => Hashable (NonEmpty a) |
Instance details Defined in Data.Hashable.Class Methods hashWithSalt :: Int -> NonEmpty a -> Int # hash :: NonEmpty a -> Int #
Ixed (NonEmpty a) |
Instance details Defined in Control.Lens.At Methods ix :: Index (NonEmpty a) -> Traversal' (NonEmpty a) (IxValue (NonEmpty a)) #
Reversing (NonEmpty a) |
Instance details Defined in Control.Lens.Internal.Iso Methods reversing :: NonEmpty a -> NonEmpty a #
Wrapped (NonEmpty a) |
Instance details Defined in Control.Lens.Wrapped Associated Types
type Unwrapped (NonEmpty a) |
Instance details Defined in Control.Lens.Wrapped type Unwrapped (NonEmpty a) = (a, [a])
Methods _Wrapped' :: Iso' (NonEmpty a) (Unwrapped (NonEmpty a)) #
Pretty a => Pretty (NonEmpty a) |
Instance details Defined in Prettyprinter.Internal Methods pretty :: NonEmpty a -> Doc ann # prettyList :: [NonEmpty a] -> Doc ann #
t ~ NonEmpty b => Rewrapped (NonEmpty a) t |
Instance details Defined in Control.Lens.Wrapped
Each (NonEmpty a) (NonEmpty b) a b |
    each :: Traversal (NonEmpty a) (NonEmpty b) a b
Instance details Defined in Control.Lens.Each Methods each :: Traversal (NonEmpty a) (NonEmpty b) a b #
Newtype (NonEmpty a) (NonEmpty' sep wrapper a) |
Instance details Defined in Distribution.FieldGrammar.Newtypes Methods pack :: NonEmpty a -> NonEmpty' sep wrapper a # unpack :: NonEmpty' sep wrapper a -> NonEmpty a #
type Rep1 NonEmpty | Since: base-4.6.0.0
Instance details Defined in GHC.Generics type Rep1 NonEmpty = D1 ('MetaData "NonEmpty" "GHC.Base" "base" 'False) (C1 ('MetaCons ":|" ('InfixI 'RightAssociative 5) 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1 :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 [])))
type Rep (NonEmpty a) | Since: base-4.6.0.0
Instance details Defined in GHC.Generics type Rep (NonEmpty a) = D1 ('MetaData "NonEmpty" "GHC.Base" "base" 'False) (C1 ('MetaCons ":|" ('InfixI 'RightAssociative 5) 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [a])))
type Item (NonEmpty a) |
Instance details Defined in GHC.IsList type Item (NonEmpty a) = a
type Index (NonEmpty a) |
Instance details Defined in Control.Lens.At type Index (NonEmpty a) = Int
type IxValue (NonEmpty a) |
Instance details Defined in Control.Lens.At type IxValue (NonEmpty a) = a
type Unwrapped (NonEmpty a) |
Instance details Defined in Control.Lens.Wrapped type Unwrapped (NonEmpty a) = (a, [a])

data PWarning #

Parser warning.

Constructors

PWarning !PWarnType !Position String |

#### Instances

Instances details

Generic PWarning |
Instance details Defined in Distribution.Parsec.Warning Associated Types
type Rep PWarning |
Instance details Defined in Distribution.Parsec.Warning type Rep PWarning = D1 ('MetaData "PWarning" "Distribution.Parsec.Warning" "Cabal-syntax-3.10.2.0-inplace" 'False) (C1 ('MetaCons "PWarning" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PWarnType) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Position) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String))))
Methods from :: PWarning -> Rep PWarning x # to :: Rep PWarning x -> PWarning #
Show PWarning |
Instance details Defined in Distribution.Parsec.Warning Methods showsPrec :: Int -> PWarning -> ShowS # show :: PWarning -> String # showList :: [PWarning] -> ShowS #
Binary PWarning |
Instance details Defined in Distribution.Parsec.Warning Methods put :: PWarning -> Put # get :: Get PWarning # putList :: [PWarning] -> Put #
NFData PWarning |
Instance details Defined in Distribution.Parsec.Warning Methods rnf :: PWarning -> () #
Eq PWarning |
Instance details Defined in Distribution.Parsec.Warning Methods (==) :: PWarning -> PWarning -> Bool # (/=) :: PWarning -> PWarning -> Bool #
Ord PWarning |
Instance details Defined in Distribution.Parsec.Warning Methods compare :: PWarning -> PWarning -> Ordering # (<) :: PWarning -> PWarning -> Bool # (<=) :: PWarning -> PWarning -> Bool # (>) :: PWarning -> PWarning -> Bool # (>=) :: PWarning -> PWarning -> Bool # max :: PWarning -> PWarning -> PWarning # min :: PWarning -> PWarning -> PWarning #
type Rep PWarning |
Instance details Defined in Distribution.Parsec.Warning type Rep PWarning = D1 ('MetaData "PWarning" "Distribution.Parsec.Warning" "Cabal-syntax-3.10.2.0-inplace" 'False) (C1 ('MetaCons "PWarning" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PWarnType) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Position) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String))))

data 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.

Since: Cabal-syntax-2.0.0.2

#### Instances

Instances details

Parsec Version |
Instance details Defined in Distribution.Types.Version Methods parsec :: CabalParsing m => m Version #
Pretty Version |
Instance details Defined in Distribution.Types.Version Methods pretty :: Version -> Doc # prettyVersioned :: CabalSpecVersion -> Version -> Doc #
Structured Version |
Instance details Defined in Distribution.Types.Version Methods structure :: Proxy Version -> Structure # structureHash' :: Tagged Version MD5
Data Version |
Instance details Defined in Distribution.Types.Version Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Version -> c Version # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Version # toConstr :: Version -> Constr # dataTypeOf :: Version -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Version) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Version) # gmapT :: (forall b. Data b => b -> b) -> Version -> Version # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Version -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Version -> r # gmapQ :: (forall d. Data d => d -> u) -> Version -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Version -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Version -> m Version # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Version -> m Version # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Version -> m Version #
Generic Version |
Instance details Defined in Distribution.Types.Version Associated Types
type Rep Version |
Instance details Defined in Distribution.Types.Version type Rep Version = D1 ('MetaData "Version" "Distribution.Types.Version" "Cabal-syntax-3.10.2.0-inplace" 'False) (C1 ('MetaCons "PV0" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedUnpack) (Rec0 Word64)) :+: C1 ('MetaCons "PV1" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Int])))
Methods from :: Version -> Rep Version x # to :: Rep Version x -> Version #
Read Version |
Instance details Defined in Distribution.Types.Version Methods readsPrec :: Int -> ReadS Version # readList :: ReadS [Version] # readPrec :: ReadPrec Version # readListPrec :: ReadPrec [Version] #
Show Version |
Instance details Defined in Distribution.Types.Version Methods showsPrec :: Int -> Version -> ShowS # show :: Version -> String # showList :: [Version] -> ShowS #
Binary Version |
Instance details Defined in Distribution.Types.Version Methods put :: Version -> Put # get :: Get Version # putList :: [Version] -> Put #
NFData Version |
Instance details Defined in Distribution.Types.Version Methods rnf :: Version -> () #
Eq Version |
Instance details Defined in Distribution.Types.Version Methods (==) :: Version -> Version -> Bool # (/=) :: Version -> Version -> Bool #
Ord Version |
Instance details Defined in Distribution.Types.Version Methods compare :: Version -> Version -> Ordering # (<) :: Version -> Version -> Bool # (<=) :: Version -> Version -> Bool # (>) :: Version -> Version -> Bool # (>=) :: Version -> Version -> Bool # max :: Version -> Version -> Version # min :: Version -> Version -> Version #
type Rep Version |
Instance details Defined in Distribution.Types.Version type Rep Version = D1 ('MetaData "Version" "Distribution.Types.Version" "Cabal-syntax-3.10.2.0-inplace" 'False) (C1 ('MetaCons "PV0" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedUnpack) (Rec0 Word64)) :+: C1 ('MetaCons "PV1" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Int])))

data PError #

Parser error.

Constructors

PError Position String |

#### Instances

Instances details

Generic PError |
Instance details Defined in Distribution.Parsec.Error Associated Types
type Rep PError |
Instance details Defined in Distribution.Parsec.Error type Rep PError = D1 ('MetaData "PError" "Distribution.Parsec.Error" "Cabal-syntax-3.10.2.0-inplace" 'False) (C1 ('MetaCons "PError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Position) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)))
Methods from :: PError -> Rep PError x # to :: Rep PError x -> PError #
Show PError |
Instance details Defined in Distribution.Parsec.Error Methods showsPrec :: Int -> PError -> ShowS # show :: PError -> String # showList :: [PError] -> ShowS #
Binary PError |
Instance details Defined in Distribution.Parsec.Error Methods put :: PError -> Put # get :: Get PError # putList :: [PError] -> Put #
NFData PError |
Instance details Defined in Distribution.Parsec.Error Methods rnf :: PError -> () #
type Rep PError |
Instance details Defined in Distribution.Parsec.Error type Rep PError = D1 ('MetaData "PError" "Distribution.Parsec.Error" "Cabal-syntax-3.10.2.0-inplace" 'False) (C1 ('MetaCons "PError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Position) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)))

data Position #

1-indexed row and column positions in a file.

Constructors

Position !Int !Int |

#### Instances

Instances details

Generic Position |
Instance details Defined in Distribution.Parsec.Position Associated Types
type Rep Position |
Instance details Defined in Distribution.Parsec.Position type Rep Position = D1 ('MetaData "Position" "Distribution.Parsec.Position" "Cabal-syntax-3.10.2.0-inplace" 'False) (C1 ('MetaCons "Position" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedUnpack) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedUnpack) (Rec0 Int)))
Methods from :: Position -> Rep Position x # to :: Rep Position x -> Position #
Show Position |
Instance details Defined in Distribution.Parsec.Position Methods showsPrec :: Int -> Position -> ShowS # show :: Position -> String # showList :: [Position] -> ShowS #
Binary Position |
Instance details Defined in Distribution.Parsec.Position Methods put :: Position -> Put # get :: Get Position # putList :: [Position] -> Put #
NFData Position |
Instance details Defined in Distribution.Parsec.Position Methods rnf :: Position -> () #
Eq Position |
Instance details Defined in Distribution.Parsec.Position Methods (==) :: Position -> Position -> Bool # (/=) :: Position -> Position -> Bool #
Ord Position |
Instance details Defined in Distribution.Parsec.Position Methods compare :: Position -> Position -> Ordering # (<) :: Position -> Position -> Bool # (<=) :: Position -> Position -> Bool # (>) :: Position -> Position -> Bool # (>=) :: Position -> Position -> Bool # max :: Position -> Position -> Position # min :: Position -> Position -> Position #
type Rep Position |
Instance details Defined in Distribution.Parsec.Position type Rep Position = D1 ('MetaData "Position" "Distribution.Parsec.Position" "Cabal-syntax-3.10.2.0-inplace" 'False) (C1 ('MetaCons "Position" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedUnpack) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedUnpack) (Rec0 Int)))

data GenericPackageDescription #

Constructors

GenericPackageDescription |
Fields packageDescription :: PackageDescription gpdScannedVersion :: Maybe Version 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. genPackageFlags :: [PackageFlag] condLibrary :: Maybe (CondTree ConfVar [Dependency] Library) condSubLibraries :: [(UnqualComponentName, CondTree ConfVar [Dependency] Library)] condForeignLibs :: [(UnqualComponentName, CondTree ConfVar [Dependency] ForeignLib)] condExecutables :: [(UnqualComponentName, CondTree ConfVar [Dependency] Executable)] condTestSuites :: [(UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)] condBenchmarks :: [(UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)]

#### Instances

Instances details

Package GenericPackageDescription |
Instance details Defined in Distribution.Types.GenericPackageDescription Methods packageId :: GenericPackageDescription -> PackageIdentifier #
HasBuildInfos GenericPackageDescription |
Instance details Defined in Distribution.Types.GenericPackageDescription Methods traverseBuildInfos :: Traversal' GenericPackageDescription BuildInfo #
Structured GenericPackageDescription |
Instance details Defined in Distribution.Types.GenericPackageDescription Methods structure :: Proxy GenericPackageDescription -> Structure # structureHash' :: Tagged GenericPackageDescription MD5
Data GenericPackageDescription |
Instance details Defined in Distribution.Types.GenericPackageDescription Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GenericPackageDescription -> c GenericPackageDescription # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c GenericPackageDescription # toConstr :: GenericPackageDescription -> Constr # dataTypeOf :: GenericPackageDescription -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c GenericPackageDescription) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c GenericPackageDescription) # gmapT :: (forall b. Data b => b -> b) -> GenericPackageDescription -> GenericPackageDescription # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GenericPackageDescription -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GenericPackageDescription -> r # gmapQ :: (forall d. Data d => d -> u) -> GenericPackageDescription -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> GenericPackageDescription -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> GenericPackageDescription -> m GenericPackageDescription # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GenericPackageDescription -> m GenericPackageDescription # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GenericPackageDescription -> m GenericPackageDescription #
Generic GenericPackageDescription |
Instance details Defined in Distribution.Types.GenericPackageDescription Associated Types
type Rep GenericPackageDescription |
Instance details Defined in Distribution.Types.GenericPackageDescription type Rep GenericPackageDescription = D1 ('MetaData "GenericPackageDescription" "Distribution.Types.GenericPackageDescription" "Cabal-syntax-3.10.2.0-inplace" 'False) (C1 ('MetaCons "GenericPackageDescription" 'PrefixI 'True) (((S1 ('MetaSel ('Just "packageDescription") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PackageDescription) :*: S1 ('MetaSel ('Just "gpdScannedVersion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Version))) :*: (S1 ('MetaSel ('Just "genPackageFlags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [PackageFlag]) :*: S1 ('MetaSel ('Just "condLibrary") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (CondTree ConfVar [Dependency] Library))))) :*: ((S1 ('MetaSel ('Just "condSubLibraries") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(UnqualComponentName, CondTree ConfVar [Dependency] Library)]) :*: S1 ('MetaSel ('Just "condForeignLibs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(UnqualComponentName, CondTree ConfVar [Dependency] ForeignLib)])) :*: (S1 ('MetaSel ('Just "condExecutables") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(UnqualComponentName, CondTree ConfVar [Dependency] Executable)]) :*: (S1 ('MetaSel ('Just "condTestSuites") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)]) :*: S1 ('MetaSel ('Just "condBenchmarks") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)]))))))
Methods from :: GenericPackageDescription -> Rep GenericPackageDescription x # to :: Rep GenericPackageDescription x -> GenericPackageDescription #
Show GenericPackageDescription |
Instance details Defined in Distribution.Types.GenericPackageDescription Methods showsPrec :: Int -> GenericPackageDescription -> ShowS # show :: GenericPackageDescription -> String # showList :: [GenericPackageDescription] -> ShowS #
Binary GenericPackageDescription |
Instance details Defined in Distribution.Types.GenericPackageDescription Methods put :: GenericPackageDescription -> Put # get :: Get GenericPackageDescription # putList :: [GenericPackageDescription] -> Put #
NFData GenericPackageDescription |
Instance details Defined in Distribution.Types.GenericPackageDescription Methods rnf :: GenericPackageDescription -> () #
Eq GenericPackageDescription |
Instance details Defined in Distribution.Types.GenericPackageDescription Methods (==) :: GenericPackageDescription -> GenericPackageDescription -> Bool # (/=) :: GenericPackageDescription -> GenericPackageDescription -> Bool #
type Rep GenericPackageDescription |
Instance details Defined in Distribution.Types.GenericPackageDescription type Rep GenericPackageDescription = D1 ('MetaData "GenericPackageDescription" "Distribution.Types.GenericPackageDescription" "Cabal-syntax-3.10.2.0-inplace" 'False) (C1 ('MetaCons "GenericPackageDescription" 'PrefixI 'True) (((S1 ('MetaSel ('Just "packageDescription") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PackageDescription) :*: S1 ('MetaSel ('Just "gpdScannedVersion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Version))) :*: (S1 ('MetaSel ('Just "genPackageFlags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [PackageFlag]) :*: S1 ('MetaSel ('Just "condLibrary") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (CondTree ConfVar [Dependency] Library))))) :*: ((S1 ('MetaSel ('Just "condSubLibraries") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(UnqualComponentName, CondTree ConfVar [Dependency] Library)]) :*: S1 ('MetaSel ('Just "condForeignLibs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(UnqualComponentName, CondTree ConfVar [Dependency] ForeignLib)])) :*: (S1 ('MetaSel ('Just "condExecutables") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(UnqualComponentName, CondTree ConfVar [Dependency] Executable)]) :*: (S1 ('MetaSel ('Just "condTestSuites") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)]) :*: S1 ('MetaSel ('Just "condBenchmarks") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)]))))))