9ff782c89bc0b7e60cda43a7d47379b97470083b
[dead/lwn-epub.git] / src / LWN / FullPage.hs
1 module LWN.FullPage
2 where
3
4 import Epublishable
5 import LWN.Article
6 import XHTML
7
8 -- | An LWN page with more than one article on it. These require
9 -- different parsing and display functions than the single-article
10 -- pages.
11 data FullPage = FullPage { articles :: [Article] }
12
13 instance XHTML FullPage where
14 to_xhtml fp = ""
15
16 instance Epublishable FullPage where
17 parse xml = do
18 articles <- parse_articles xml
19 case articles of
20 (x:xs)@all -> return $ Just $ FullPage all
21 _ -> return Nothing
22
23 title _ = "LWN.net"