]> gitweb @ CieloNegro.org - Lucu.git/blobdiff - Network/HTTP/Lucu/Request.hs
Slight speed improvement
[Lucu.git] / Network / HTTP / Lucu / Request.hs
index b316730d1112174b26e8aec564b20dd4c38c2ea0..3fc0164ca167de1116504478e0363e6e421de1cb 100644 (file)
@@ -76,7 +76,7 @@ methodP = (let methods = [ ("OPTIONS", OPTIONS)
                          , ("TRACE"  , TRACE  )
                          , ("CONNECT", CONNECT)
                          ]
-           in foldl (<|>) (fail "") $ map (\ (str, mth)
+           in foldl (<|>) failP $ map (\ (str, mth)
                                            -> string str >> return mth) methods)
           <|>
           token >>= return . ExtensionMethod
@@ -85,5 +85,5 @@ methodP = (let methods = [ ("OPTIONS", OPTIONS)
 uriP :: Parser URI
 uriP = do str <- many1 $ satisfy (\ c -> not (isCtl c || c == ' '))
           case parseURIReference str of
-            Nothing  -> fail ""
+            Nothing  -> failP
             Just uri -> return uri
\ No newline at end of file