clash-prelude-0.7.2: CAES Language for Synchronous Hardware - Prelude library

Copyright(C) 2013-2015, University of Twente
LicenseBSD2 (see the file LICENSE)
MaintainerChristiaan Baaij <>
Safe HaskellNone






data Signed n Source

Arbitrary-width signed integer represented by n bits, including the sign bit.

Uses standard 2-complements representation. Meaning that, given n bits, a Signed n number has a range of: [-(2^(n-1)) .. 2^(n-1)-1]

NB: The Num operators perform wrap-around on overflow. If you want saturation on overflow, check out the SaturatingNum class.


Resize Signed Source 
KnownNat n => Bounded (Signed n) Source 
KnownNat n => Enum (Signed n) Source

The functions: enumFrom, enumFromThen, enumFromTo, and enumFromThenTo, are not synthesisable.

Eq (Signed n) Source 
KnownNat n => Integral (Signed n) Source 
KnownNat n => Num (Signed n) Source

Operators do wrap-around on overflow

Ord (Signed n) Source 
KnownNat n => Real (Signed n) Source 
Show (Signed n) Source 
KnownNat n => Bits (Signed n) Source 
KnownNat n => FiniteBits (Signed n) Source 
KnownNat n => Default (Signed n) Source 
KnownNat n => Lift (Signed n) Source 
(KnownNat n, KnownNat ((+) 1 n), KnownNat ((+) n n)) => SaturatingNum (Signed n) Source 
KnownNat n => BitPack (Signed n) Source 
Bundle (Signed n) Source 
(KnownNat ((+) 1 (Max m n)), KnownNat ((+) m n)) => ExtendingNum (Signed m) (Signed n) Source 
type Unbundled' clk (Signed n) = Signal' clk (Signed n) 
type BitSize (Signed n) = n Source 
type AResult (Signed m) (Signed n) = Signed ((+) 1 (Max m n)) Source 
type MResult (Signed m) (Signed n) = Signed ((+) m n) Source