As far as I know, do blocks in Haskell are just some kind of syntactic sugar for monadic bind operators. For example, one could convert
do
Yes, all of them can be converted to bind syntax; in fact, they are converted internally by the compiler.
I hope this translation of your example gives you the hint:
main = readFile "foo.txt" >>= \f -> (print $ "prefix " ++ f) >> (print $ f ++ " postfix")