This fixes the error:
[10 of 10] Compiling Main ( main.hs, dist/build/yesod/yesod-tmp/Main.o )
main.hs:192:35:
Not in scope: ‘reader’
Perhaps you meant one of these:
‘header’ (imported from Options.Applicative),
‘readIO’ (imported from Prelude), ‘readLn’ (imported from Prelude)
cabal: Error: some packages failed to install:
yesod-bin-1.2.12.5 failed during the building phase. The exception was:
ExitFailure 1