@@ -13,16 +13,21 @@ import Data.Text (Text)
13-- import Data.Time (ZonedTime)
13-- import Data.Time (ZonedTime)
14import GHC.Generics (Generic)
14import GHC.Generics (Generic)
15import Prelude hiding (id)
15import Prelude hiding (id)
16+import Control.DeepSeq
17data Metadata = Metadata {
18data Metadata = Metadata {
18 result_type :: Text
19 result_type :: Text
19 } deriving (Eq, Show, Typeable, Data, Generic)
20 } deriving (Eq, Show, Typeable, Data, Generic)
22+instance NFData Metadata
21data Geo = Geo {
24data Geo = Geo {
22 type_ :: Text
25 type_ :: Text
23 , coordinates :: (Double, Double)
26 , coordinates :: (Double, Double)
24 } deriving (Eq, Show, Typeable, Data, Generic)
27 } deriving (Eq, Show, Typeable, Data, Generic)
26data Story = Story {
31data Story = Story {
27 from_user_id_str :: Text
32 from_user_id_str :: Text
28 , profile_image_url :: Text
33 , profile_image_url :: Text
@@ -40,6 +45,8 @@ data Story = Story {
40 , source :: Text
45 , source :: Text
41 } deriving (Show, Typeable, Data, Generic)
46 } deriving (Show, Typeable, Data, Generic)
43data Result = Result {
50data Result = Result {
44 results :: [Story]
51 results :: [Story]
45 , max_id :: Int64
52 , max_id :: Int64
@@ -53,3 +60,5 @@ data Result = Result {
53 , max_id_str :: Text
60 , max_id_str :: Text
54 , query :: Text
61 , query :: Text
55 } deriving (Show, Typeable, Data, Generic)
62 } deriving (Show, Typeable, Data, Generic)
64+instance NFData Result