@@ -10,6 +10,7 @@ module Web.PathPieces
1010 ) where
1111
1212import Data.Int (Int64)
13+import Data.Maybe (fromJust)
1314import qualified Data.Text as S
1415import qualified Data.Text.Lazy as L
1516import qualified Data.Text.Read
@@ -83,8 +84,8 @@ instance PathMultiPiece [L.Text] where
8384 toPathMultiPiece = map $ S.concat . L.toChunks
8485
8586instance (PathPiece a) => PathPiece (Maybe a) where
86− fromPathPiece s = if isPrefixOf "Just " s
87− then Just $ fromPathPiece $ fromJust $ stripPrefix "Just " s
87+ fromPathPiece s = if S.isPrefixOf "Just " s
88+ then Just $ fromPathPiece $ fromJust $ S.stripPrefix "Just " s
8889 else
8990 if s == "Nothing"
9091 then Just Nothing