Distribution.Types.PackageId.Lens
data PackageIdentifier Source #
The name and version of a package.
Defined in Distribution.Package
Methods
packageId :: PackageIdentifier -> PackageIdentifier Source #
>>> simpleParsec "foo-bar-0" :: Maybe PackageIdentifier Just (PackageIdentifier {pkgName = PackageName "foo-bar", pkgVersion = mkVersion [0]})
>>>
simpleParsec "foo-bar-0" :: Maybe PackageIdentifier
>>> simpleParsec "foo-bar" :: Maybe PackageIdentifier Just (PackageIdentifier {pkgName = PackageName "foo-bar", pkgVersion = mkVersion []})
simpleParsec "foo-bar" :: Maybe PackageIdentifier
Note: Stricter than Text instance
Text
>>> simpleParsec "foo-bar-0-0" :: Maybe PackageIdentifier Nothing
simpleParsec "foo-bar-0-0" :: Maybe PackageIdentifier
>>> simpleParsec "foo-bar.0" :: Maybe PackageIdentifier Nothing
simpleParsec "foo-bar.0" :: Maybe PackageIdentifier
>>> simpleParsec "foo-bar.4-2" :: Maybe PackageIdentifier Nothing
simpleParsec "foo-bar.4-2" :: Maybe PackageIdentifier
>>> simpleParsec "1.2.3" :: Maybe PackageIdentifier Nothing
simpleParsec "1.2.3" :: Maybe PackageIdentifier
Defined in Distribution.Types.PackageId
parsec :: CabalParsing m => m PackageIdentifier Source #
pretty :: PackageIdentifier -> Doc Source #
prettyVersioned :: CabalSpecVersion -> PackageIdentifier -> Doc Source #
structure :: Proxy PackageIdentifier -> Structure Source #
structureHash' :: Tagged PackageIdentifier MD5
put :: PackageIdentifier -> Put Source #
get :: Get PackageIdentifier Source #
putList :: [PackageIdentifier] -> Put Source #
rnf :: PackageIdentifier -> () Source #
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 :: forall r r'. (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 #
Associated Types
from :: PackageIdentifier -> Rep PackageIdentifier x #
to :: Rep PackageIdentifier x -> PackageIdentifier #
readsPrec :: Int -> ReadS PackageIdentifier #
readList :: ReadS [PackageIdentifier] #
readPrec :: ReadPrec PackageIdentifier #
readListPrec :: ReadPrec [PackageIdentifier] #
showsPrec :: Int -> PackageIdentifier -> ShowS #
show :: PackageIdentifier -> String #
showList :: [PackageIdentifier] -> ShowS #
(==) :: PackageIdentifier -> PackageIdentifier -> Bool #
(/=) :: PackageIdentifier -> PackageIdentifier -> Bool #
compare :: PackageIdentifier -> PackageIdentifier -> Ordering #
(<) :: PackageIdentifier -> PackageIdentifier -> Bool #
(<=) :: PackageIdentifier -> PackageIdentifier -> Bool #
(>) :: PackageIdentifier -> PackageIdentifier -> Bool #
(>=) :: PackageIdentifier -> PackageIdentifier -> Bool #
max :: PackageIdentifier -> PackageIdentifier -> PackageIdentifier #
min :: PackageIdentifier -> PackageIdentifier -> PackageIdentifier #
pkgName :: Lens' PackageIdentifier PackageName Source #
pkgVersion :: Lens' PackageIdentifier Version Source #