Simplify encoding code slightly

This commit is contained in:
Thomas Sutton 2015-02-19 13:15:25 +11:00
parent 3451dcf186
commit d62c61224b

View file

@ -462,8 +462,7 @@ sampleByteStrings
-> [(Text, M.MediaType, ByteString)] -> [(Text, M.MediaType, ByteString)]
sampleByteStrings ctypes@Proxy Proxy = sampleByteStrings ctypes@Proxy Proxy =
let samples = toSamples :: [(Text, a)] let samples = toSamples :: [(Text, a)]
ext t (a,b) = (t,a,b) enc (t, s) = (\(m,b) -> (t,m,b)) <$> amr ctypes s
enc (t, s) = ext t <$> amr ctypes s
in concatMap enc samples in concatMap enc samples
-- | The class that helps us automatically get documentation -- | The class that helps us automatically get documentation