on master help sign in
Add a deconstruction function for DotNetTime
commit3b4e0d8c997d449897411399c3948af6cda4f048 authorBryan O'Sullivan <bos@mailrank.com> dateWed 9 Mar 2011, 17:10 (16 years ago) parentb3e9a97
1 file changed+3−2
Data/Aeson/Types.hs+3−2
Data/Aeson/Types.hs+3−2
@@ -585,8 +585,9 @@ instance FromJSON Value where
585585
586586-- | A newtype wrapper for 'UTCTime' that uses the same non-standard
587587-- serialization format as Microsoft .NET.
588−newtype DotNetTime = DotNetTime UTCTime
589− deriving (Eq, Ord, Read, Show, Typeable, FormatTime)
588+newtype DotNetTime = DotNetTime {
589+ fromDotNetTime :: UTCTime
590+ } deriving (Eq, Ord, Read, Show, Typeable, FormatTime)
590591
591592instance ToJSON DotNetTime where
592593 toJSON (DotNetTime t) =