Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Ide.Plugin.Cabal.Parse
Contents
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
Arguments
:: ByteString | UTF-8 encoded bytestring |
-> IO ([PWarning], Either (Maybe Version, NonEmpty PError) GenericPackageDescription) |
Re-exports
Constructors
a :| [a] |
Instances
Foldable NonEmpty | |
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 elem :: Eq a => a -> NonEmpty a -> Bool maximum :: Ord a => NonEmpty a -> a minimum :: Ord a => NonEmpty a -> a | |
Traversable NonEmpty | |
Applicative NonEmpty | |
Functor NonEmpty | |
Monad NonEmpty | |
NFData1 NonEmpty | |
Defined in Control.DeepSeq | |
Hashable1 NonEmpty | Since: hashable-1.3.1.0 |
Defined in Data.Hashable.Class Methods liftHashWithSalt :: (Int -> a -> Int) -> Int -> NonEmpty a -> Int # | |
Generic1 NonEmpty | |
Lift a => Lift (NonEmpty a :: Type) | |
Structured a => Structured (NonEmpty a) | |
Defined in Distribution.Utils.Structured | |
Semigroup (NonEmpty a) | |
Generic (NonEmpty a) | |
IsList (NonEmpty a) | |
Read a => Read (NonEmpty a) | |
Show a => Show (NonEmpty a) | |
NFData a => NFData (NonEmpty a) | |
Defined in Control.DeepSeq | |
Outputable a => Outputable (NonEmpty a) | |
Defined in GHC.Utils.Outputable | |
Eq a => Eq (NonEmpty a) | |
Ord a => Ord (NonEmpty a) | |
Hashable a => Hashable (NonEmpty a) | |
Defined in Data.Hashable.Class | |
Ixed (NonEmpty a) | |
Defined in Control.Lens.At | |
Wrapped (NonEmpty a) | |
Pretty a => Pretty (NonEmpty a) | |
Defined in Prettyprinter.Internal | |
t ~ NonEmpty b => Rewrapped (NonEmpty a) t | |
Defined in Control.Lens.Wrapped | |
type Rep1 NonEmpty | |
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) | |
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) | |
Defined in GHC.IsList type Item (NonEmpty a) = a | |
type Index (NonEmpty a) | |
Defined in Control.Lens.At | |
type IxValue (NonEmpty a) | |
Defined in Control.Lens.At | |
type Unwrapped (NonEmpty a) | |
Defined in Control.Lens.Wrapped |
Instances
Generic PWarning | |
Show PWarning | |
Binary PWarning | |
NFData PWarning | |
Defined in Distribution.Parsec.Warning | |
Eq PWarning | |
Ord PWarning | |
Defined in Distribution.Parsec.Warning | |
type Rep PWarning | |
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)))) |
Instances
Parsec Version | |
Defined in Distribution.Types.Version | |
Pretty Version | |
Defined in Distribution.Types.Version | |
Structured Version | |
Defined in Distribution.Types.Version | |
Data Version | |
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 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 | |
Read Version | |
Show Version | |
Binary Version | |
NFData Version | |
Defined in Distribution.Types.Version | |
Eq Version | |
Ord Version | |
type Rep Version | |
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]))) |
Instances
Generic PError | |
Show PError | |
Binary PError | |
NFData PError | |
Defined in Distribution.Parsec.Error | |
type Rep PError | |
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))) |
Constructors
Position !Int !Int |
Instances
Generic Position | |
Show Position | |
Binary Position | |
NFData Position | |
Defined in Distribution.Parsec.Position | |
Eq Position | |
Ord Position | |
Defined in Distribution.Parsec.Position | |
type Rep Position | |
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
Package GenericPackageDescription | |
Defined in Distribution.Types.GenericPackageDescription Methods packageId :: GenericPackageDescription -> PackageIdentifier | |
HasBuildInfos GenericPackageDescription | |
Defined in Distribution.Types.GenericPackageDescription Methods traverseBuildInfos :: Traversal' GenericPackageDescription BuildInfo | |
Structured GenericPackageDescription | |
Defined in Distribution.Types.GenericPackageDescription Methods structure :: Proxy GenericPackageDescription -> Structure structureHash' :: Tagged GenericPackageDescription MD5 | |
Data GenericPackageDescription | |
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 | |
Defined in Distribution.Types.GenericPackageDescription Associated Types type Rep GenericPackageDescription :: Type -> Type Methods from :: GenericPackageDescription -> Rep GenericPackageDescription x to :: Rep GenericPackageDescription x -> GenericPackageDescription | |
Show GenericPackageDescription | |
Defined in Distribution.Types.GenericPackageDescription Methods showsPrec :: Int -> GenericPackageDescription -> ShowS # show :: GenericPackageDescription -> String # showList :: [GenericPackageDescription] -> ShowS # | |
Binary GenericPackageDescription | |
Defined in Distribution.Types.GenericPackageDescription Methods put :: GenericPackageDescription -> Put get :: Get GenericPackageDescription putList :: [GenericPackageDescription] -> Put | |
NFData GenericPackageDescription | |
Defined in Distribution.Types.GenericPackageDescription Methods rnf :: GenericPackageDescription -> () # | |
Eq GenericPackageDescription | |
Defined in Distribution.Types.GenericPackageDescription Methods (==) :: GenericPackageDescription -> GenericPackageDescription -> Bool # (/=) :: GenericPackageDescription -> GenericPackageDescription -> Bool # | |
type Rep GenericPackageDescription | |
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)])))))) |