fp_parse xml = do
hl <- parse_headline xml
parsed_articles <- fp_parse_articles xml
- case parsed_articles of
- [] -> return Nothing
- x -> return $ Just $ FullPage (fromJust hl) x
+ return $ case parsed_articles of
+ [] -> Nothing
+ x -> Just $ FullPage (fromJust hl) x