rotate package:rebase

rotate x i rotates x left by i bits if i is positive, or right by -i bits otherwise. For unbounded types like Integer, rotate is equivalent to shift. An instance can define either this unified rotate or rotateL and rotateR, depending on which is more convenient for the type in question.
Rotate the argument left by the specified number of bits (which must be non-negative). An instance can define either this and rotateR or the unified rotate, depending on which is more convenient for the type in question.
Rotate the argument right by the specified number of bits (which must be non-negative). An instance can define either this and rotateL or the unified rotate, depending on which is more convenient for the type in question.