Fix broken PathPiece instance

This commit is contained in:
Michael Snoyman 2014-04-17 21:21:35 +03:00
parent d1ce84317d
commit 1925f11952

View File

@ -19,7 +19,7 @@ data PackageNameVersion = PackageNameVersion !PackageName !Version
deriving (Show, Read, Typeable, Eq, Ord)
instance PathPiece PackageNameVersion where
toPathPiece (PackageNameVersion x y) = concat [toPathPiece x, "-", toPathPiece y]
toPathPiece (PackageNameVersion x y) = concat [toPathPiece x, "-", toPathPiece y, ".tar.gz"]
fromPathPiece t' | Just t <- stripSuffix ".tar.gz" t' =
case T.breakOnEnd "-" t of
("", _) -> Nothing