mirror of
https://github.com/commercialhaskell/stackage-server.git
synced 2026-01-28 20:00:24 +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)
|
deriving (Show, Read, Typeable, Eq, Ord)
|
||||||
|
|
||||||
instance PathPiece PackageNameVersion where
|
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' =
|
fromPathPiece t' | Just t <- stripSuffix ".tar.gz" t' =
|
||||||
case T.breakOnEnd "-" t of
|
case T.breakOnEnd "-" t of
|
||||||
("", _) -> Nothing
|
("", _) -> Nothing
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user