GHC はデフォルトで次の関数の末尾呼び出しの最適化を実行しますか? 唯一の奇妙な点は、再帰的に IO アクションを定義していることですが、これを TCO できない理由がわかりません。
import Control.Concurrent.MVar
consume :: MVar a -> [a] -> IO ()
consume _ [] = return ()
consume store (x:xs) = do putMVar store x
consume store xs