Avoid duplicates in cross compilers showing up
This commit is contained in:
parent
9798e0f1d2
commit
055df584a4
@ -164,17 +164,17 @@ listVersions lt' criteria hideOld showNightly days = do
|
|||||||
strayGHCs avTools = do
|
strayGHCs avTools = do
|
||||||
ghcs <- getInstalledGHCs
|
ghcs <- getInstalledGHCs
|
||||||
fmap catMaybes $ forM ghcs $ \case
|
fmap catMaybes $ forM ghcs $ \case
|
||||||
Right tver@GHCTargetVersion{ _tvTarget = Nothing, .. } -> do
|
Right tver@GHCTargetVersion{ .. } -> do
|
||||||
case Map.lookup tver avTools of
|
case Map.lookup tver avTools of
|
||||||
Just _ -> pure Nothing
|
Just _ -> pure Nothing
|
||||||
Nothing -> do
|
Nothing -> do
|
||||||
lSet <- fmap (maybe False (\(GHCTargetVersion _ v ) -> v == _tvVersion)) $ ghcSet Nothing
|
lSet <- fmap (maybe False (\(GHCTargetVersion _ v ) -> v == _tvVersion)) $ ghcSet _tvTarget
|
||||||
fromSrc <- ghcSrcInstalled tver
|
fromSrc <- ghcSrcInstalled tver
|
||||||
hlsPowered <- fmap (elem _tvVersion) hlsGHCVersions
|
hlsPowered <- fmap (elem _tvVersion) hlsGHCVersions
|
||||||
pure $ Just $ ListResult
|
pure $ Just $ ListResult
|
||||||
{ lTool = GHC
|
{ lTool = GHC
|
||||||
, lVer = _tvVersion
|
, lVer = _tvVersion
|
||||||
, lCross = Nothing
|
, lCross = _tvTarget
|
||||||
, lTag = []
|
, lTag = []
|
||||||
, lInstalled = True
|
, lInstalled = True
|
||||||
, lStray = isNothing (Map.lookup tver avTools)
|
, lStray = isNothing (Map.lookup tver avTools)
|
||||||
@ -182,21 +182,6 @@ listVersions lt' criteria hideOld showNightly days = do
|
|||||||
, lReleaseDay = Nothing
|
, lReleaseDay = Nothing
|
||||||
, ..
|
, ..
|
||||||
}
|
}
|
||||||
Right tver@GHCTargetVersion{ .. } -> do
|
|
||||||
lSet <- fmap (maybe False (\(GHCTargetVersion _ v ) -> v == _tvVersion)) $ ghcSet _tvTarget
|
|
||||||
fromSrc <- ghcSrcInstalled tver
|
|
||||||
hlsPowered <- fmap (elem _tvVersion) hlsGHCVersions
|
|
||||||
pure $ Just $ ListResult
|
|
||||||
{ lTool = GHC
|
|
||||||
, lVer = _tvVersion
|
|
||||||
, lCross = _tvTarget
|
|
||||||
, lTag = []
|
|
||||||
, lInstalled = True
|
|
||||||
, lStray = isNothing (Map.lookup tver avTools)
|
|
||||||
, lNoBindist = False
|
|
||||||
, lReleaseDay = Nothing
|
|
||||||
, ..
|
|
||||||
}
|
|
||||||
Left e -> do
|
Left e -> do
|
||||||
logWarn
|
logWarn
|
||||||
$ "Could not parse version of stray directory" <> T.pack e
|
$ "Could not parse version of stray directory" <> T.pack e
|
||||||
|
Loading…
Reference in New Issue
Block a user