mirror of
https://github.com/commercialhaskell/stackage.git
synced 2026-02-21 18:47:54 +01:00
remove-old-stack-work-libs.hs: need to check regexp match result
This commit is contained in:
parent
86e5490e70
commit
f905c9455d
@ -28,8 +28,9 @@ main = do
|
|||||||
|
|
||||||
extractNameInternal :: String -> String
|
extractNameInternal :: String -> String
|
||||||
extractNameInternal p =
|
extractNameInternal p =
|
||||||
let (name,_,internal) = p =~ "-[0-9.]+-[0-9A-Za-z]{20,22}" :: (String, String, String)
|
let (name,match,internal) = p =~ "-[0-9.]+-[0-9A-Za-z]{20,22}" :: (String, String, String)
|
||||||
in name ++ internal
|
in if null match || null name then error $ p ++ " not in correct name-version-hash format"
|
||||||
|
else name ++ internal
|
||||||
|
|
||||||
samePkgDynLib d1 d2 = pkgDynName d1 == pkgDynName d2
|
samePkgDynLib d1 d2 = pkgDynName d1 == pkgDynName d2
|
||||||
where
|
where
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user