X-Git-Url: http://gitweb.michael.orlitzky.com/?p=dead%2Fhalcyon.git;a=blobdiff_plain;f=src%2FTwitter%2FStatus.hs;h=93b3f4e1cc2621cebac388766d567fa2401a0f0d;hp=275e89352fea47e02c453404474c5e6041bfd110;hb=94484087fbfe98d6735aa82798a9bf506f97fd19;hpb=17dd116706c4a971e1f5c68daa1656af5eff5cd2 diff --git a/src/Twitter/Status.hs b/src/Twitter/Status.hs index 275e893..93b3f4e 100644 --- a/src/Twitter/Status.hs +++ b/src/Twitter/Status.hs @@ -15,7 +15,6 @@ data Status = Status { status_id :: Integer, - status_from_content :: Content -> (Maybe Status) status_from_content content = @@ -38,19 +37,19 @@ status_from_content content = case (reads status_id_data :: [(Integer, String)]) of [] -> Nothing parseresult:_ -> Just (Status (fst parseresult) created_at_data all_text user_object) - + where status_ids = (unique_id content) first_status_id = get_char_data (status_ids !! 0) - + created_ats = (status_created_at content) - first_created_at = get_char_data (created_ats !! 0) + first_created_at = get_char_data (created_ats !! 0) texts = (status_text content) all_text = concat $ catMaybes (map get_char_data texts) - + users = (status_user content) - first_user = user_from_content (users !! 0) + first_user = user_from_content (users !! 0) @@ -86,7 +85,7 @@ pretty_print status = get_max_status_id :: [Status] -> Integer -get_max_status_id statuses = +get_max_status_id statuses = maximum status_ids where status_ids = map status_id statuses \ No newline at end of file