From 8087fae18bdf7b3bb23d4693c59a1580acb31618 Mon Sep 17 00:00:00 2001 From: Thomas Sutton Date: Fri, 20 Feb 2015 08:03:11 +1100 Subject: [PATCH] amr renamed allMimeRender --- example/greet.hs | 1 - src/Servant/Docs.hs | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/example/greet.hs b/example/greet.hs index 9a5469cb..8e1efaeb 100644 --- a/example/greet.hs +++ b/example/greet.hs @@ -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 diff --git a/src/Servant/Docs.hs b/src/Servant/Docs.hs index 504b82f6..da3bf67b 100644 --- a/src/Servant/Docs.hs +++ b/src/Servant/Docs.hs @@ -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