@@ -83,9 +83,12 @@ instance PathMultiPiece [L.Text] where
83 toPathMultiPiece = map $ S.concat . L.toChunks
83 toPathMultiPiece = map $ S.concat . L.toChunks
85instance (PathPiece a) => PathPiece (Maybe a) where
85instance (PathPiece a) => PathPiece (Maybe a) where
86− fromPathPiece s = case s of
86+ fromPathPiece s = if isPrefixOf "Just " s
87− "Nothing" -> Just Nothing
88− _ -> Just $ fromPathPiece s
87+ then Just $ fromPathPiece $ fromJust $ stripPrefix "Just " s
89 toPathPiece m = case m of
92 toPathPiece m = case m of
90 Just s -> toPathPiece s
93 Just s -> toPathPiece s
91 _ -> "Nothing"
94 _ -> "Nothing"