| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Numeric.Sized.WordOfSize
Description
This module exports the WordOfSize type and associated functions.
- newtype WordOfSize n = WordOfSize {}
- allWordsOfSize :: KnownNat n => [WordOfSize n]
Documentation
newtype WordOfSize n Source #
An unsigned integer type with a size decided by a type-level nat. Numeric operations wraparound by default:
>>>(255 :: WordOfSize 8) + 10
Constructors
| WordOfSize | |
Fields | |
Instances
| KnownNat n => Bounded (WordOfSize n) Source # | |
| KnownNat n => Enum (WordOfSize n) Source # | |
| KnownNat n => Eq (WordOfSize n) Source # | |
| KnownNat n => Integral (WordOfSize n) Source # | |
| KnownNat n => Num (WordOfSize n) Source # | |
| KnownNat n => Ord (WordOfSize n) Source # | |
| KnownNat n => Real (WordOfSize n) Source # | |
| KnownNat n => Show (WordOfSize n) Source # | |
| KnownNat n => Ix (WordOfSize n) Source # | |
| Generic (WordOfSize n) Source # | |
| KnownNat n => Bits (WordOfSize n) Source # | |
| KnownNat n => FiniteBits (WordOfSize n) Source # | |
| type Rep (WordOfSize n) Source # | |
allWordsOfSize :: KnownNat n => [WordOfSize n] Source #
Generates all words of a given size
>>>allWordOfSize :: [WordOfSize 3][0,1,2,3,4,5,6,7]