on master help sign in
Simplify encoding code slightly
commitd62c61224bd7e7869c436ba83bfebfdf91423bb0 authorThomas Sutton <me@thomas-sutton.id.au> dateThu 19 Feb 2015, 13:15 (12 years ago) parent3451dcf
1 file changed+1−2
src/Servant/Docs.hs+1−2
src/Servant/Docs.hs+1−2
@@ -462,8 +462,7 @@ sampleByteStrings
462462 -> [(Text, M.MediaType, ByteString)]
463463sampleByteStrings ctypes@Proxy Proxy =
464464 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
467466 in concatMap enc samples
468467
469468-- | The class that helps us automatically get documentation