| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Clash.Num.Wrapping
Synopsis
- newtype Wrapping a = Wrapping {
- fromWrapping :: 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.
Constructors
| Wrapping | |
Fields
| |
Instances
toWrapping :: SaturatingNum a => a -> Wrapping a Source #