- else
- case first_status_id of
- Nothing -> Nothing
- (Just status_id_data) ->
- case first_created_at of
- Nothing -> Nothing
- (Just created_at_data) ->
- case first_user of
- Nothing -> Nothing
- (Just user_object) ->
- case (reads status_id_data :: [(Integer, String)]) of
- [] -> Nothing
- parseresult:_ -> Just (Status (fst parseresult) created_at_data all_text user_object)
-
+ else do
+ first_status_id <- get_char_data (status_ids !! 0)
+ integer_status_id <- parse_status_id first_status_id
+ first_created_at <- get_char_data (created_ats !! 0)
+ first_user <- user_from_content (users !! 0)
+ first_retweeted <- get_char_data (retweeteds !! 0)
+
+ let is_reply = case (length reply_to_status_ids) of
+ 0 -> False
+ _ -> True
+
+ let is_retweet = case first_retweeted of
+ "true" -> True
+ _ -> False
+
+ return (Status
+ integer_status_id
+ first_created_at
+ all_text
+ first_user
+ is_reply
+ is_retweet)