]> gitweb @ CieloNegro.org - time-w3c.git/commitdiff
slight sig change
authorPHO <pho@cielonegro.org>
Thu, 11 Mar 2010 09:54:48 +0000 (18:54 +0900)
committerPHO <pho@cielonegro.org>
Thu, 11 Mar 2010 09:54:48 +0000 (18:54 +0900)
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 qualified Text.Parsec as P
 
+import Data.Convertible
 import Data.Time.W3C.Parser.Parsec
 import Data.Time.W3C.Types
 
 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
 parse src
     = case P.parse w3cDateTime "" src of
-        Right w3c -> Just w3c
+        Right w3c -> Just (convert w3c)
         Left  _   -> Nothing
         Left  _   -> Nothing