Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Wrapping a
- toWrapping :: SaturatingNum a => a -> Wrapping a
Documentation
A wrapping number type is one where all operations wrap between minBound and maxBound (and vice-versa) if the result goes out of bounds for the underlying type.
Numbers can be converted to wrap by default using toWrapping
.
Instances
toWrapping :: SaturatingNum a => a -> Wrapping a Source #