mirror of
https://github.com/commercialhaskell/stackage-server.git
synced 2026-01-12 04:08:29 +01:00
Fix broken PathPiece instance
This commit is contained in:
parent
d1ce84317d
commit
1925f11952
2
Types.hs
2
Types.hs
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user