2 ms·
Maybe I misunderstand what you mean, but why not just: writeStdout :: ByteStream a -> IO () Maybe you could even leave out the `a` type since arguably a `
by WJW 5y ago
Maybe I misunderstand what you mean, but why not just:
writeStdout :: ByteStream a -> IO ()
Maybe you could even leave out the `a` type since arguably a `ByteStream` should only contain bytes anyway. When writing to stdout you don't really need a return value usually, so that could just be (). The IO monad can encapsulate any amount of side effects in the same function, so you could fit your additional side effects in besides writing to stdout.