>>665
ListT を使えばと思ったけどだめだった。
・参考
https://blog.mudatobunka.org/entry/2018/01/03/233314
・残骸
module Rand2 where

-- stack install list-t
-- stack exec ghci

import Control.Monad.IO.Class ( liftIO )
import ListT ( ListT, toList )
import System.Random ( Random(randomIO, randomRIO) )

t1 :: ListT IO Int
t1 = return 3

t2 :: ListT IO Int
t2 = liftIO (randomIO :: IO Int)

t3 :: ListT IO [Int]
t3 = repeat <$> t2

output :: ListT IO [Int] -> IO ()
output t3 = do
li0 <- toList t3
print $ take 10 $ head li0