hls-cabal-plugin-2.4.0.0: Cabal integration plugin with Haskell Language Server
Safe HaskellSafe-Inferred
LanguageHaskell2010

Ide.Plugin.Cabal.Parse

Contents

Synopsis

Documentation

parseCabalFileContents #

Arguments

:: ByteString

UTF-8 encoded bytestring

-> IO ([PWarning], Either (Maybe Version, NonEmpty PError) GenericPackageDescription) 

Re-exports

data NonEmpty a #

Constructors

a :| [a] 

Instances

Instances details
Foldable NonEmpty 
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

Traversable NonEmpty 
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 
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 
Instance details

Defined in GHC.Base

Methods

fmap :: (a -> b) -> NonEmpty a -> NonEmpty b #

(<$) :: a -> NonEmpty b -> NonEmpty a #

Monad NonEmpty 
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 
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 :: k -> Type

Methods

from1 :: forall (a :: k). NonEmpty a -> Rep1 NonEmpty a

to1 :: forall (a :: k). Rep1 NonEmpty a -> NonEmpty a

Lift a => Lift (NonEmpty a :: Type) 
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

Semigroup (NonEmpty a) 
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) :: Type -> Type

Methods

from :: NonEmpty a -> Rep (NonEmpty a) x

to :: Rep (NonEmpty a) x -> NonEmpty a

IsList (NonEmpty a) 
Instance details

Defined in GHC.IsList

Associated Types

type Item (NonEmpty 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) 
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) 
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) 
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) 
Instance details

Defined in GHC.Base

Methods

(==) :: NonEmpty a -> NonEmpty a -> Bool #

(/=) :: NonEmpty a -> NonEmpty a -> Bool #

Ord a => Ord (NonEmpty a) 
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)) #

Wrapped (NonEmpty a) 
Instance details

Defined in Control.Lens.Wrapped

Associated Types

type 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

type Rep1 NonEmpty 
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 List)))
type Rep (NonEmpty a) 
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 #

Constructors

PWarning !PWarnType !Position String 

Instances

Instances details
Generic PWarning 
Instance details

Defined in Distribution.Parsec.Warning

Associated Types

type Rep PWarning :: Type -> Type

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.1.0" '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 #

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 :: Type -> Type

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.1.0" '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 #

Constructors

PError Position String 

Instances

Instances details
Generic PError 
Instance details

Defined in Distribution.Parsec.Error

Associated Types

type Rep PError :: Type -> Type

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.1.0" '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 #

Constructors

Position !Int !Int 

Instances

Instances details
Generic Position 
Instance details

Defined in Distribution.Parsec.Position

Associated Types

type Rep Position :: Type -> Type

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.1.0" '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

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

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 :: Type -> Type

Show GenericPackageDescription 
Instance details

Defined in Distribution.Types.GenericPackageDescription

Binary GenericPackageDescription 
Instance details

Defined in Distribution.Types.GenericPackageDescription

NFData GenericPackageDescription 
Instance details

Defined in Distribution.Types.GenericPackageDescription

Eq GenericPackageDescription 
Instance details

Defined in Distribution.Types.GenericPackageDescription

type Rep GenericPackageDescription 
Instance details

Defined in Distribution.Types.GenericPackageDescription

type Rep GenericPackageDescription = D1 ('MetaData "GenericPackageDescription" "Distribution.Types.GenericPackageDescription" "Cabal-syntax-3.10.1.0" '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)]))))))