Skip to content
Snippets Groups Projects
Commit 5341edf3 authored by Alec Theriault's avatar Alec Theriault Committed by Ben Gamari
Browse files

Error out of invalid Int/Word bit shifts

Although the Haddock's for `shiftL` and `shiftR` do require the number
of bits to be non-negative, we should still check this before calling
out to primitives (which also have undefined behaviour for negative bit
shifts).

If a user _really_ wants to bypass checks that the number of bits is
sensible, they already have the aptly-named `unsafeShiftL`/`unsafeShiftR`
at their disposal.

See #16111.
parent a90a2aea
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment