> This seems to be the issue. Haskell98 didn't require this, Haskell2010 does, and this seems less desirable to me. Isn't it reasonable to assume that the it's the do that dominates syntactically here, and not the let?
No, so you can do stuff like:
main = do
gen <- getStdGen
let log = runModel gen $ do
initialize 72
report
replicateM_ 50 $ do
replicateM_251 migrate
report
log' = runModel gen $ do
initialize 42
report
replicateM_ 50 $ do
replicateM_251 migrate
report
log'' = runModel gen $ do
initialize 42
report
replicateM_ 50 $ do
replicateM_251 migrate
report
putStr . format $ log
putStr . format $ log'
putStr . format $ log''
Defining `log`, `log'` and `log''` with the same `let`.
Cheers,
Matteo