on master help sign in
amr renamed allMimeRender
commit8087fae18bdf7b3bb23d4693c59a1580acb31618 authorThomas Sutton <me@thomas-sutton.id.au> dateFri 20 Feb 2015, 08:03 (12 years ago) parent0daa8d2
2 files changed+2−3
example/greet.hs−1 src/Servant/Docs.hs+2−2
example/greet.hs−1
@@ -12,7 +12,6 @@ import Data.String.Conversions
1212import Data.Text (Text)
1313import GHC.Generics
1414import Servant.API
15−import Servant.API.ContentTypes
1615import Servant.Docs
1716
1817-- * Example
src/Servant/Docs.hs+2−2
@@ -455,7 +455,7 @@ sampleByteString
455455 -> Proxy a
456456 -> [(M.MediaType, ByteString)]
457457sampleByteString ctypes@Proxy Proxy =
458− maybe [] (amr ctypes) (toSample :: Maybe a)
458+ maybe [] (allMimeRender ctypes) (toSample :: Maybe a)
459459
460460-- | Synthesise a list of sample values of a particular type, encoded in the
461461-- specified media types.
@@ -466,7 +466,7 @@ sampleByteStrings
466466 -> [(Text, M.MediaType, ByteString)]
467467sampleByteStrings ctypes@Proxy Proxy =
468468 let samples = toSamples :: [(Text, a)]
469− enc (t, s) = uncurry (t,,) <$> amr ctypes s
469+ enc (t, s) = uncurry (t,,) <$> allMimeRender ctypes s
470470 in concatMap enc samples
471471
472472-- | Generate a list of 'MediaType' values describing the content types