Safe Haskell | None |
---|---|

Language | Haskell2010 |

- newtype Unsigned n = U {}
- size# :: KnownNat n => Unsigned n -> Int
- pack# :: Unsigned n -> BitVector n
- unpack# :: BitVector n -> Unsigned n
- eq# :: Unsigned n -> Unsigned n -> Bool
- neq# :: Unsigned n -> Unsigned n -> Bool
- lt# :: Unsigned n -> Unsigned n -> Bool
- ge# :: Unsigned n -> Unsigned n -> Bool
- gt# :: Unsigned n -> Unsigned n -> Bool
- le# :: Unsigned n -> Unsigned n -> Bool
- enumFrom# :: KnownNat n => Unsigned n -> [Unsigned n]
- enumFromThen# :: KnownNat n => Unsigned n -> Unsigned n -> [Unsigned n]
- enumFromTo# :: KnownNat n => Unsigned n -> Unsigned n -> [Unsigned n]
- enumFromThenTo# :: KnownNat n => Unsigned n -> Unsigned n -> Unsigned n -> [Unsigned n]
- minBound# :: KnownNat n => Unsigned n
- maxBound# :: KnownNat n => Unsigned n
- (+#) :: KnownNat n => Unsigned n -> Unsigned n -> Unsigned n
- (-#) :: KnownNat n => Unsigned n -> Unsigned n -> Unsigned n
- (*#) :: KnownNat n => Unsigned n -> Unsigned n -> Unsigned n
- negate# :: KnownNat n => Unsigned n -> Unsigned n
- fromInteger# :: KnownNat n => Integer -> Unsigned n
- plus# :: KnownNat (1 + Max m n) => Unsigned m -> Unsigned n -> Unsigned (1 + Max m n)
- minus# :: KnownNat (1 + Max m n) => Unsigned m -> Unsigned n -> Unsigned (1 + Max m n)
- times# :: KnownNat (m + n) => Unsigned m -> Unsigned n -> Unsigned (m + n)
- quot# :: Unsigned n -> Unsigned n -> Unsigned n
- rem# :: Unsigned n -> Unsigned n -> Unsigned n
- mod# :: Unsigned n -> Unsigned n -> Unsigned n
- toInteger# :: Unsigned n -> Integer
- and# :: Unsigned n -> Unsigned n -> Unsigned n
- or# :: Unsigned n -> Unsigned n -> Unsigned n
- xor# :: Unsigned n -> Unsigned n -> Unsigned n
- complement# :: KnownNat n => Unsigned n -> Unsigned n
- shiftL# :: KnownNat n => Unsigned n -> Int -> Unsigned n
- shiftR# :: KnownNat n => Unsigned n -> Int -> Unsigned n
- rotateL# :: KnownNat n => Unsigned n -> Int -> Unsigned n
- rotateR# :: KnownNat n => Unsigned n -> Int -> Unsigned n
- popCount# :: Unsigned n -> Int
- resize# :: KnownNat m => Unsigned n -> Unsigned m

# Datatypes

Arbitrary-width unsigned integer represented by `n`

bits

Given `n`

bits, an `Unsigned`

`n`

number has a range of: [0 .. 2^`n`

-1]

**NB**: The `Num`

operators perform `wrap-around`

on overflow. If you want
saturation on overflow, check out the `SaturatingNum`

class.

U | The constructor, |

Resize Unsigned | |

KnownNat n => Bounded (Unsigned n) | |

KnownNat n => Enum (Unsigned n) | The functions: |

Eq (Unsigned n) | |

KnownNat n => Integral (Unsigned n) | |

KnownNat n => Num (Unsigned n) | |

Ord (Unsigned n) | |

KnownNat n => Real (Unsigned n) | |

Show (Unsigned n) | |

KnownNat n => Bits (Unsigned n) | |

KnownNat n => FiniteBits (Unsigned n) | |

KnownNat n => Default (Unsigned n) | |

KnownNat n => Lift (Unsigned n) | |

(KnownNat n, KnownNat ((+) 1 n), KnownNat ((+) n n)) => SaturatingNum (Unsigned n) | |

BitPack (Unsigned n) | |

Bundle (Unsigned n) | |

(KnownNat ((+) 1 (Max m n)), KnownNat ((+) m n)) => ExtendingNum (Unsigned m) (Unsigned n) | |

Typeable (Nat -> *) Unsigned | |

type Unbundled clk (Unsigned n) = CSignal clk (Unsigned n) | |

type BitSize (Unsigned n) = n | |

type AResult (Unsigned m) (Unsigned n) = Unsigned ((+) 1 (Max m n)) | |

type MResult (Unsigned m) (Unsigned n) = Unsigned ((+) m n) |

# Accessors

## Length information

# Type classes

## BitConvert

## Eq

## Ord

## Enum (not synthesisable)

## Bounded

## Num

fromInteger# :: KnownNat n => Integer -> Unsigned n Source

## ExtendingNum

## Integral

toInteger# :: Unsigned n -> Integer Source

## Bits

complement# :: KnownNat n => Unsigned n -> Unsigned n Source