HasReps Plain; exposing SitemapResponse
This commit is contained in:
parent
c8078f0be3
commit
abe8b16cfd
@ -21,6 +21,7 @@ module Yesod.Helpers.Sitemap
|
|||||||
, SitemapUrl (..)
|
, SitemapUrl (..)
|
||||||
, SitemapLoc (..)
|
, SitemapLoc (..)
|
||||||
, SitemapChangeFreq (..)
|
, SitemapChangeFreq (..)
|
||||||
|
, SitemapResponse (..)
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Yesod.Definitions
|
import Yesod.Definitions
|
||||||
|
|||||||
@ -149,8 +149,10 @@ instance HasReps [(ContentType, Content)] where
|
|||||||
(x:_) -> x
|
(x:_) -> x
|
||||||
_ -> error "chooseRep [(ContentType, Content)] of empty"
|
_ -> error "chooseRep [(ContentType, Content)] of empty"
|
||||||
|
|
||||||
newtype Plain = Plain Text
|
newtype Plain = Plain { unPlain :: Text }
|
||||||
deriving (Eq, Show)
|
deriving (Eq, Show)
|
||||||
|
instance HasReps Plain where
|
||||||
|
reps = [(TypePlain, return . cs . unPlain)]
|
||||||
|
|
||||||
plain :: ConvertSuccess x Text => x -> Plain
|
plain :: ConvertSuccess x Text => x -> Plain
|
||||||
plain = Plain . cs
|
plain = Plain . cs
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user