]> gitweb @ CieloNegro.org - time-w3c.git/blobdiff - Data/Time/W3C/Parser.hs
slight sig change
[time-w3c.git] / Data / Time / W3C / Parser.hs
index 539a024280152be30c6643d4cbbac91157c86821..64f96b28e2f79259f80d0279dca056cc9afee5df 100644 (file)
@@ -5,11 +5,12 @@ module Data.Time.W3C.Parser
 
 import qualified Text.Parsec as P
 
+import Data.Convertible
 import Data.Time.W3C.Parser.Parsec
 import Data.Time.W3C.Types
 
-parse :: String -> Maybe W3CDateTime
+parse :: Convertible W3CDateTime t => String -> Maybe t
 parse src
     = case P.parse w3cDateTime "" src of
-        Right w3c -> Just w3c
+        Right w3c -> Just (convert w3c)
         Left  _   -> Nothing