]> gitweb @ CieloNegro.org - time-w3c.git/blobdiff - Data/Time/W3C/Types.hs
renamed modules
[time-w3c.git] / Data / Time / W3C / Types.hs
similarity index 98%
rename from Data/Time/W3CDateTime/Types.hs
rename to Data/Time/W3C/Types.hs
index c7573eb09814481b69bd9402e183d9282334790d..9f48f68be58dbc627f8f08a6e4d6b71a612f11e9 100644 (file)
@@ -1,4 +1,4 @@
-module Data.Time.W3CDateTime.Types
+module Data.Time.W3C.Types
     ( W3CDateTime(..)
     )
     where
     ( W3CDateTime(..)
     )
     where
@@ -23,6 +23,16 @@ data W3CDateTime
       }
     deriving (Show, Eq, Typeable)
 
       }
     deriving (Show, Eq, Typeable)
 
+fetch :: (Show a, Typeable a, Typeable b) =>
+         String
+      -> (a -> Maybe b)
+      -> a
+      -> ConvertResult b
+fetch name f a
+    = case f a of
+        Nothing -> convError ("No " ++ name ++ " information in the given value") a
+        Just b  -> return b
+
 instance Convertible Day W3CDateTime where
     safeConvert day
         = case toGregorian day of
 instance Convertible Day W3CDateTime where
     safeConvert day
         = case toGregorian day of
@@ -36,16 +46,6 @@ instance Convertible Day W3CDateTime where
                                      , w3cTimeZone = Nothing
                                      }
 
                                      , w3cTimeZone = Nothing
                                      }
 
-fetch :: (Show a, Typeable a, Typeable b) =>
-         String
-      -> (a -> Maybe b)
-      -> a
-      -> ConvertResult b
-fetch name f a
-    = case f a of
-        Nothing -> convError ("No " ++ name ++ " information in the given value") a
-        Just b  -> return b
-
 instance Convertible W3CDateTime Day where
     safeConvert w3c
         = do let y = w3cYear w3c
 instance Convertible W3CDateTime Day where
     safeConvert w3c
         = do let y = w3cYear w3c