Bounds for #5669 #5668 #5667 #5666, and add th-compat
Bounds for #5669 #5668 #5667 #5666, and add th-compat

soenkehahn/stackage,mrkkrp/stackage,Daniel-Diaz/stackage,fpco/stackage,massysett/stackage,simonmichael/stackage,michalkonecny/stackage,iand675/stackage,jonschoning/stackage,clinty/stackage