template :: Feed url -> Hamlet url
template arg = 
#if __GLASGOW_HASKELL__ >= 700
    [xhamlet|
#else
    [$xhamlet|
#endif
    \<?xml version="1.0" encoding="utf-8"?>
    <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"
        <channel
            <atom:link href=@{feedLinkSelf arg} rel="self" type=#{S8.unpack typeRss}
            <title>#{feedTitle arg}
            <link>@{feedLinkHome arg}
            <description>#{feedDescription arg}
            <lastBuildDate>#{formatRFC822 $ feedUpdated arg}
            <language>#{feedLanguage arg}

            $forall entry <- feedEntries arg
                ^{entryTemplate entry}
    |]
template :: Feed url -> Hamlet url
template arg = 
#if __GLASGOW_HASKELL__ >= 700
    [xhamlet|
#else
    [$xhamlet|
#endif
    \<?xml version="1.0" encoding="utf-8"?>
    <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"
        <channel
            <atom:link href=@{feedLinkSelf arg} rel="self" type=#{S8.unpack typeRss}
            <title>#{feedTitle arg}
            <link>@{feedLinkHome arg}
            <description>#{feedDescription arg}
            <lastBuildDate>#{formatRFC822 $ feedUpdated arg}
            <language>#{feedLanguage arg}

            $forall entry <- feedEntries arg
                ^{entryTemplate entry}
    |]
template arg = 
#if __GLASGOW_HASKELL__ >= 700
    [xhamlet|
#else
    [$xhamlet|
#endif
    \<?xml version="1.0" encoding="utf-8"?>
    <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"
        <channel
            <atom:link href=@{feedLinkSelf arg} rel="self" type=#{S8.unpack typeRss}
            <title>#{feedTitle arg}
            <link>@{feedLinkHome arg}
            <description>#{feedDescription arg}
            <lastBuildDate>#{formatRFC822 $ feedUpdated arg}
            <language>#{feedLanguage arg}

            $forall entry <- feedEntries arg
                ^{entryTemplate entry}
    |]