amr renamed allMimeRender

This commit is contained in:
Thomas Sutton 2015-02-20 08:03:11 +11:00
parent 0daa8d27a5
commit 8087fae18b
2 changed files with 2 additions and 3 deletions

View File

@ -12,7 +12,6 @@ import Data.String.Conversions
import Data.Text (Text)
import GHC.Generics
import Servant.API
import Servant.API.ContentTypes
import Servant.Docs
-- * Example

View File

@ -455,7 +455,7 @@ sampleByteString
-> Proxy a
-> [(M.MediaType, ByteString)]
sampleByteString ctypes@Proxy Proxy =
maybe [] (amr ctypes) (toSample :: Maybe a)
maybe [] (allMimeRender ctypes) (toSample :: Maybe a)
-- | Synthesise a list of sample values of a particular type, encoded in the
-- specified media types.
@ -466,7 +466,7 @@ sampleByteStrings
-> [(Text, M.MediaType, ByteString)]
sampleByteStrings ctypes@Proxy Proxy =
let samples = toSamples :: [(Text, a)]
enc (t, s) = uncurry (t,,) <$> amr ctypes s
enc (t, s) = uncurry (t,,) <$> allMimeRender ctypes s
in concatMap enc samples
-- | Generate a list of 'MediaType' values describing the content types