]> gitweb @ CieloNegro.org - time-w3c.git/blobdiff - Data/Time/W3C/Parser.hs
Haddock comments
[time-w3c.git] / Data / Time / W3C / Parser.hs
index 8104ce82772f280e4713480b18c4c9f1322e438f..5bf2f9e674315d32092568d9d154b0bc8a257fae 100644 (file)
@@ -1,3 +1,4 @@
+-- | Parse W3C Date and Time string.
 module Data.Time.W3C.Parser
     ( parse
     )
@@ -9,6 +10,10 @@ import Data.Convertible
 import Data.Time.W3C.Parser.Parsec
 import Data.Time.W3C.Types
 
+-- | Parse W3C Date and Time string to anything convertible from
+-- 'W3CDateTime' type. The most obvious acceptable type is the
+-- 'W3CDateTime' itself. If the given string is ill-formatted, 'parse'
+-- returns 'Prelude.Nothing'.
 parse :: Convertible W3CDateTime t => String -> Maybe t
 parse src = case P.parse p "" src of
               Right w3c -> Just (convert w3c)