[Git][ghc/ghc][wip/jeltsch/system-io-implementation-into-base] 25 commits: Check that shift values are valid