module Twitter.User where import Text.XML.HaXml import Twitter.Xml data User = User { screen_name :: String } deriving (Show, Eq) user_from_content :: Content -> (Maybe User) user_from_content c = if (length names) == 0 then Nothing else case (get_char_data (names !! 0)) of Nothing -> Nothing (Just content) -> Just (User (content)) where names = user_screen_name c