on master help sign in
Simplify encoding code slightly
d62c612Thomas Sutton
src/Servant/Docs.hs+1−2
@@ -462,8 +462,7 @@ sampleByteStrings
462 -> [(Text, M.MediaType, ByteString)]
462 -> [(Text, M.MediaType, ByteString)]
463sampleByteStrings ctypes@Proxy Proxy =
463sampleByteStrings ctypes@Proxy Proxy =
464 let samples = toSamples :: [(Text, a)]
464 let samples = toSamples :: [(Text, a)]
465− ext t (a,b) = (t,a,b)
466− enc (t, s) = ext t <$> amr ctypes s
465+ enc (t, s) = (\(m,b) -> (t,m,b)) <$> amr ctypes s
467 in concatMap enc samples
466 in concatMap enc samples
468
467
469-- | The class that helps us automatically get documentation
468-- | The class that helps us automatically get documentation