HasReps Plain; exposing SitemapResponse

This commit is contained in:
Michael Snoyman 2009-12-22 00:17:54 +02:00
parent c8078f0be3
commit abe8b16cfd
2 changed files with 4 additions and 1 deletions

View File

@ -21,6 +21,7 @@ module Yesod.Helpers.Sitemap
, SitemapUrl (..)
, SitemapLoc (..)
, SitemapChangeFreq (..)
, SitemapResponse (..)
) where
import Yesod.Definitions

View File

@ -149,8 +149,10 @@ instance HasReps [(ContentType, Content)] where
(x:_) -> x
_ -> error "chooseRep [(ContentType, Content)] of empty"
newtype Plain = Plain Text
newtype Plain = Plain { unPlain :: Text }
deriving (Eq, Show)
instance HasReps Plain where
reps = [(TypePlain, return . cs . unPlain)]
plain :: ConvertSuccess x Text => x -> Plain
plain = Plain . cs