git.iko.soy/typeable/http-api-data
on master help sign in
Fixed missing imports..
commit17354d15b2ef6254ff38b80a72f0925243f9a684 authorMomemtumMori <admin@momemtummori.info> dateWed 9 Jul 2014, 05:00 (12 years ago) parent54247f9
1 file changed+3−2
Web/PathPieces.hs+3−2
Web/PathPieces.hs+3−2
@@ -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