@@ -1,3 +1,5 @@
1+{-# LANGUAGE DeriveDataTypeable #-}
1module Data.Aeson.Types
3module Data.Aeson.Types
@@ -15,6 +17,7 @@ import Data.Map (Map)
15import Data.Text (Text, pack, unpack)
17import Data.Text (Text, pack, unpack)
16import Data.Time.Clock (UTCTime)
18import Data.Time.Clock (UTCTime)
17import Data.Time.Format (formatTime, parseTime)
19import Data.Time.Format (formatTime, parseTime)
20+import Data.Typeable (Typeable)
18import Data.Vector (Vector)
21import Data.Vector (Vector)
19import System.Locale (defaultTimeLocale)
22import System.Locale (defaultTimeLocale)
20import qualified Data.Map as M
23import qualified Data.Map as M
@@ -29,7 +32,7 @@ data Value = Object Object
29 | Number Double
32 | Number Double
30 | Bool !Bool
33 | Bool !Bool
32− deriving (Eq, Show)
35+ deriving (Eq, Show, Typeable)
34(.=) :: ToJSON a => Text -> a -> Object
37(.=) :: ToJSON a => Text -> a -> Object
35name .= value = M.singleton name (toJSON value)
38name .= value = M.singleton name (toJSON value)