| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Numeric.Sized.IntOfSize
Description
This module exports the IntOfSize type and associated functions.
- newtype IntOfSize n = IntOfSize {}
- allIntsOfSize :: KnownNat n => [IntOfSize n]
Documentation
An integer type with a size decided by a type-level nat. Numeric operations wraparound by default:
>>>(127 :: IntOfSize 8) + 1-128
Constructors
| IntOfSize | |
Fields | |
Instances
| KnownNat n => Bounded (IntOfSize n) Source # | |
| KnownNat n => Enum (IntOfSize n) Source # | |
| KnownNat n => Eq (IntOfSize n) Source # | |
| KnownNat n => Integral (IntOfSize n) Source # | |
| KnownNat n => Num (IntOfSize n) Source # | |
| KnownNat n => Ord (IntOfSize n) Source # | |
| KnownNat n => Real (IntOfSize n) Source # | |
| KnownNat n => Show (IntOfSize n) Source # | |
| KnownNat n => Ix (IntOfSize n) Source # | |
| Generic (IntOfSize n) Source # | |
| KnownNat n => Bits (IntOfSize n) Source # | |
| KnownNat n => FiniteBits (IntOfSize n) Source # | |
| type Rep (IntOfSize n) Source # | |
allIntsOfSize :: KnownNat n => [IntOfSize n] Source #
Generate all values, in a sensible order
>>>allIntsOfSize :: [IntOfSize 4][0,-1,1,-2,2,-3,3,-4,4,-5,5,-6,6,-7,7,-8]