on master help sign in
Simplify encoding code slightly more
f303f61Thomas Sutton
src/Servant/Docs.hs+1−1
@@ -462,7 +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− enc (t, s) = (\(m,b) -> (t,m,b)) <$> amr ctypes s
465+ enc (t, s) = uncurry (t,,) <$> amr ctypes s
466 in concatMap enc samples
466 in concatMap enc samples
467
467
468-- | The class that helps us automatically get documentation
468-- | The class that helps us automatically get documentation