X-Git-Url: http://git.cielonegro.org/gitweb.cgi?p=time-w3c.git;a=blobdiff_plain;f=Data%2FTime%2FW3C%2FParser.hs;h=8104ce82772f280e4713480b18c4c9f1322e438f;hp=64f96b28e2f79259f80d0279dca056cc9afee5df;hb=9b1ea615a387d121a581dc35d0e5bb91d8162811;hpb=db60f34189dcaa7f8a9ac2887b9c68c24e5d653c diff --git a/Data/Time/W3C/Parser.hs b/Data/Time/W3C/Parser.hs index 64f96b2..8104ce8 100644 --- a/Data/Time/W3C/Parser.hs +++ b/Data/Time/W3C/Parser.hs @@ -10,7 +10,10 @@ import Data.Time.W3C.Parser.Parsec import Data.Time.W3C.Types parse :: Convertible W3CDateTime t => String -> Maybe t -parse src - = case P.parse w3cDateTime "" src of - Right w3c -> Just (convert w3c) - Left _ -> Nothing +parse src = case P.parse p "" src of + Right w3c -> Just (convert w3c) + Left _ -> Nothing + where + p = do w3c <- w3cDateTime + _ <- P.eof + return w3c \ No newline at end of file