Skip to content
  • Alec Theriault's avatar
    Error out of invalid Int/Word bit shifts · 5341edf3
    Alec Theriault authored and Ben Gamari's avatar Ben Gamari committed
    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.
    5341edf3
To find the state of this project's repository at the time of any of these versions, check out the tags.