stack-1.3.2: The Haskell Tool Stack

Safe Haskell | None
Language | Haskell2010

Stack.Types.PackageIdentifier

Description

Package identifier (name-version).

Synopsis

- data PackageIdentifier = PackageIdentifier {
  - packageIdentifierName :: !PackageName
  - packageIdentifierVersion :: !Version
  }
- toTuple :: PackageIdentifier -> (PackageName, Version)
- fromTuple :: (PackageName, Version) -> PackageIdentifier
- parsePackageIdentifier :: MonadThrow m => Text -> m PackageIdentifier
- parsePackageIdentifierFromString :: MonadThrow m => String -> m PackageIdentifier
- packageIdentifierParser :: Parser PackageIdentifier
- packageIdentifierString :: PackageIdentifier -> String
- packageIdentifierText :: PackageIdentifier -> Text

# Documentation

data PackageIdentifier #

A pkg-ver combination.

Constructors

PackageIdentifier |
Fields packageIdentifierName :: !PackageName Get the name part of the identifier. packageIdentifierVersion :: !Version Get the version part of the identifier.

Instances

Eq PackageIdentifier # |
Methods (==) :: PackageIdentifier -> PackageIdentifier -> Bool # (/=) :: PackageIdentifier -> PackageIdentifier -> Bool #
Data PackageIdentifier # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PackageIdentifier -> c PackageIdentifier # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c PackageIdentifier # toConstr :: PackageIdentifier -> Constr # dataTypeOf :: PackageIdentifier -> DataType # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c PackageIdentifier) # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PackageIdentifier) # gmapT :: (forall b. Data b => b -> b) -> PackageIdentifier -> PackageIdentifier # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PackageIdentifier -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PackageIdentifier -> r # gmapQ :: (forall d. Data d => d -> u) -> PackageIdentifier -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> PackageIdentifier -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> PackageIdentifier -> m PackageIdentifier # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PackageIdentifier -> m PackageIdentifier # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PackageIdentifier -> m PackageIdentifier #
Ord PackageIdentifier # |
Methods compare :: PackageIdentifier -> PackageIdentifier -> Ordering # (<) :: PackageIdentifier -> PackageIdentifier -> Bool # (<=) :: PackageIdentifier -> PackageIdentifier -> Bool # (>) :: PackageIdentifier -> PackageIdentifier -> Bool # (>=) :: PackageIdentifier -> PackageIdentifier -> Bool # max :: PackageIdentifier -> PackageIdentifier -> PackageIdentifier # min :: PackageIdentifier -> PackageIdentifier -> PackageIdentifier #
Show PackageIdentifier # |
Methods showsPrec :: Int -> PackageIdentifier -> ShowS # show :: PackageIdentifier -> String # showList :: [PackageIdentifier] -> ShowS #
Generic PackageIdentifier # |
Associated Types type Rep PackageIdentifier :: * -> * # Methods from :: PackageIdentifier -> Rep PackageIdentifier x # to :: Rep PackageIdentifier x -> PackageIdentifier #
Hashable PackageIdentifier # |
Methods hashWithSalt :: Int -> PackageIdentifier -> Int # hash :: PackageIdentifier -> Int #
FromJSON PackageIdentifier # |
Methods parseJSON :: Value -> Parser PackageIdentifier # parseJSONList :: Value -> Parser [PackageIdentifier] #
ToJSON PackageIdentifier # |
Methods toJSON :: PackageIdentifier -> Value # toEncoding :: PackageIdentifier -> Encoding # toJSONList :: [PackageIdentifier] -> Value # toEncodingList :: [PackageIdentifier] -> Encoding #
NFData PackageIdentifier # |
Methods rnf :: PackageIdentifier -> () #
Store PackageIdentifier # |
Methods size :: Size PackageIdentifier # poke :: PackageIdentifier -> Poke () # peek :: Peek PackageIdentifier #
type Rep PackageIdentifier # |
type Rep PackageIdentifier = D1 (MetaData "PackageIdentifier" "Stack.Types.PackageIdentifier" "stack-1.3.2-BJTOe4yfRNq2cDDPL8b7LK" False) (C1 (MetaCons "PackageIdentifier" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "packageIdentifierName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 PackageName)) (S1 (MetaSel (Just Symbol "packageIdentifierVersion") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Version))))
type Ann PackageIdentifier # |
type Ann PackageIdentifier = AnsiAnn

toTuple :: PackageIdentifier -> (PackageName, Version) #

Convert from a package identifier to a tuple.

fromTuple :: (PackageName, Version) -> PackageIdentifier #

Convert from a tuple to a package identifier.

parsePackageIdentifier :: MonadThrow m => Text -> m PackageIdentifier #

Convenient way to parse a package identifier from a `Text`.

parsePackageIdentifierFromString :: MonadThrow m => String -> m PackageIdentifier #

Convenience function for parsing from a `String`.

packageIdentifierParser :: Parser PackageIdentifier #

A parser for a package-version pair.

packageIdentifierString :: PackageIdentifier -> String #

Get a string representation of the package identifier; name-ver.

packageIdentifierText :: PackageIdentifier -> Text #

Get a Text representation of the package identifier; name-ver.