@@ -118,17 +118,9 @@ class PathMultiPiece s where
118118 fromPathMultiPiece :: [S.Text] -> Maybe s
119119 toPathMultiPiece :: s -> [S.Text]
120120
121−instance PathMultiPiece [String] where
122− fromPathMultiPiece = Just . map S.unpack
123− toPathMultiPiece = map S.pack
124−
125−instance PathMultiPiece [S.Text] where
126− fromPathMultiPiece = Just
127− toPathMultiPiece = id
128−
129−instance PathMultiPiece [L.Text] where
130− fromPathMultiPiece = Just . map (L.fromChunks . return)
131− toPathMultiPiece = map $ S.concat . L.toChunks
121+instance PathPiece a => PathMultiPiece [a] where
122+ fromPathMultiPiece = mapM fromPathPiece
123+ toPathMultiPiece = map toPathPiece
132124
133125{-# DEPRECATED toSinglePiece "Use toPathPiece instead of toSinglePiece" #-}
134126toSinglePiece :: PathPiece p => p -> S.Text