Add cabal-install-3.4.0.0-rc1
This commit is contained in:
parent
86a4b10de6
commit
d30d2ac8a5
@ -111,6 +111,7 @@ validate dls = do
|
|||||||
where
|
where
|
||||||
isUniqueTag Latest = True
|
isUniqueTag Latest = True
|
||||||
isUniqueTag Recommended = True
|
isUniqueTag Recommended = True
|
||||||
|
isUniqueTag Prerelease = False
|
||||||
isUniqueTag (Base _) = False
|
isUniqueTag (Base _) = False
|
||||||
isUniqueTag (UnknownTag _) = False
|
isUniqueTag (UnknownTag _) = False
|
||||||
|
|
||||||
|
@ -112,6 +112,7 @@ ui AppState {..} =
|
|||||||
|
|
||||||
printTag Recommended = withAttr "recommended" $ str "recommended"
|
printTag Recommended = withAttr "recommended" $ str "recommended"
|
||||||
printTag Latest = withAttr "latest" $ str "latest"
|
printTag Latest = withAttr "latest" $ str "latest"
|
||||||
|
printTag Prerelease = withAttr "prerelease" $ str "prerelease"
|
||||||
printTag (Base pvp'') = str ("base-" ++ T.unpack (prettyPVP pvp''))
|
printTag (Base pvp'') = str ("base-" ++ T.unpack (prettyPVP pvp''))
|
||||||
printTag (UnknownTag t ) = str t
|
printTag (UnknownTag t ) = str t
|
||||||
|
|
||||||
@ -137,6 +138,7 @@ defaultAttributes = attrMap
|
|||||||
, ("installed" , Vty.defAttr `Vty.withForeColor` Vty.green)
|
, ("installed" , Vty.defAttr `Vty.withForeColor` Vty.green)
|
||||||
, ("recommended" , Vty.defAttr `Vty.withForeColor` Vty.green)
|
, ("recommended" , Vty.defAttr `Vty.withForeColor` Vty.green)
|
||||||
, ("latest" , Vty.defAttr `Vty.withForeColor` Vty.yellow)
|
, ("latest" , Vty.defAttr `Vty.withForeColor` Vty.yellow)
|
||||||
|
, ("prerelease" , Vty.defAttr `Vty.withForeColor` Vty.red)
|
||||||
, ("help" , Vty.defAttr `Vty.withStyle` Vty.italic)
|
, ("help" , Vty.defAttr `Vty.withStyle` Vty.italic)
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -1422,6 +1422,7 @@ printListResult raw lr = do
|
|||||||
where
|
where
|
||||||
printTag Recommended = color' Green "recommended"
|
printTag Recommended = color' Green "recommended"
|
||||||
printTag Latest = color' Yellow "latest"
|
printTag Latest = color' Yellow "latest"
|
||||||
|
printTag Prerelease = color' Red "prerelease"
|
||||||
printTag (Base pvp'') = "base-" ++ T.unpack (prettyPVP pvp'')
|
printTag (Base pvp'') = "base-" ++ T.unpack (prettyPVP pvp'')
|
||||||
printTag (UnknownTag t ) = t
|
printTag (UnknownTag t ) = t
|
||||||
color' = case raw of
|
color' = case raw of
|
||||||
|
@ -92,6 +92,7 @@ data VersionInfo = VersionInfo
|
|||||||
-- | A tag. These are currently attached to a version of a tool.
|
-- | A tag. These are currently attached to a version of a tool.
|
||||||
data Tag = Latest
|
data Tag = Latest
|
||||||
| Recommended
|
| Recommended
|
||||||
|
| Prerelease
|
||||||
| Base PVP
|
| Base PVP
|
||||||
| UnknownTag String -- ^ used for upwardscompat
|
| UnknownTag String -- ^ used for upwardscompat
|
||||||
deriving (Ord, Eq, Show) -- FIXME: manual JSON instance
|
deriving (Ord, Eq, Show) -- FIXME: manual JSON instance
|
||||||
|
@ -53,6 +53,7 @@ deriveJSON defaultOptions { fieldLabelModifier = removeLensFieldLabel } ''Requir
|
|||||||
instance ToJSON Tag where
|
instance ToJSON Tag where
|
||||||
toJSON Latest = String "Latest"
|
toJSON Latest = String "Latest"
|
||||||
toJSON Recommended = String "Recommended"
|
toJSON Recommended = String "Recommended"
|
||||||
|
toJSON Prerelease = String "Prerelease"
|
||||||
toJSON (Base pvp'') = String ("base-" <> prettyPVP pvp'')
|
toJSON (Base pvp'') = String ("base-" <> prettyPVP pvp'')
|
||||||
toJSON (UnknownTag x ) = String (T.pack x)
|
toJSON (UnknownTag x ) = String (T.pack x)
|
||||||
|
|
||||||
@ -60,6 +61,7 @@ instance FromJSON Tag where
|
|||||||
parseJSON = withText "Tag" $ \t -> case T.unpack t of
|
parseJSON = withText "Tag" $ \t -> case T.unpack t of
|
||||||
"Latest" -> pure Latest
|
"Latest" -> pure Latest
|
||||||
"Recommended" -> pure Recommended
|
"Recommended" -> pure Recommended
|
||||||
|
"Prerelease" -> pure Prerelease
|
||||||
('b' : 'a' : 's' : 'e' : '-' : ver') -> case pvp (T.pack ver') of
|
('b' : 'a' : 's' : 'e' : '-' : ver') -> case pvp (T.pack ver') of
|
||||||
Right x -> pure $ Base x
|
Right x -> pure $ Base x
|
||||||
Left e -> fail . show $ e
|
Left e -> fail . show $ e
|
||||||
|
Loading…
Reference in New Issue
Block a user