HasReps Plain; exposing SitemapResponse
This commit is contained in:
parent
c8078f0be3
commit
abe8b16cfd
@ -21,6 +21,7 @@ module Yesod.Helpers.Sitemap
|
||||
, SitemapUrl (..)
|
||||
, SitemapLoc (..)
|
||||
, SitemapChangeFreq (..)
|
||||
, SitemapResponse (..)
|
||||
) where
|
||||
|
||||
import Yesod.Definitions
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user