X-Git-Url: http://gitweb.michael.orlitzky.com/?p=dead%2Flwn-epub.git;a=blobdiff_plain;f=src%2FLWN%2FFullPage.hs;fp=src%2FLWN%2FFullPage.hs;h=9ff782c89bc0b7e60cda43a7d47379b97470083b;hp=0000000000000000000000000000000000000000;hb=b591d5f5c3c47d253c24144beae1edf8648cd94b;hpb=8e5616a377196f0a200947173d4c78a3dca8a55f diff --git a/src/LWN/FullPage.hs b/src/LWN/FullPage.hs new file mode 100644 index 0000000..9ff782c --- /dev/null +++ b/src/LWN/FullPage.hs @@ -0,0 +1,23 @@ +module LWN.FullPage +where + +import Epublishable +import LWN.Article +import XHTML + +-- | An LWN page with more than one article on it. These require +-- different parsing and display functions than the single-article +-- pages. +data FullPage = FullPage { articles :: [Article] } + +instance XHTML FullPage where + to_xhtml fp = "" + +instance Epublishable FullPage where + parse xml = do + articles <- parse_articles xml + case articles of + (x:xs)@all -> return $ Just $ FullPage all + _ -> return Nothing + + title _ = "LWN.net"