bv-sized-1.0.4: a bitvector datatype that is parameterized by the vector width
Copyright(c) Galois Inc. 2018
LicenseBSD-3
Maintainerbenselfridge@galois.com
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Data.BitVector.Sized.Signed

Description

This module defines a wrapper around the BV type, SignedBV, with instances not provided by BV.

Synopsis

Documentation

newtype SignedBV w Source #

Signed bit vector.

Constructors

SignedBV 

Fields

Instances

Instances details
(KnownNat w, 1 <= w) => Bounded (SignedBV w) Source # 
Instance details

Defined in Data.BitVector.Sized.Signed

(KnownNat w, 1 <= w) => Enum (SignedBV w) Source # 
Instance details

Defined in Data.BitVector.Sized.Signed

Eq (SignedBV w) Source # 
Instance details

Defined in Data.BitVector.Sized.Signed

Methods

(==) :: SignedBV w -> SignedBV w -> Bool #

(/=) :: SignedBV w -> SignedBV w -> Bool #

(KnownNat w, 1 <= w) => Num (SignedBV w) Source # 
Instance details

Defined in Data.BitVector.Sized.Signed

(KnownNat w, 1 <= w) => Ord (SignedBV w) Source # 
Instance details

Defined in Data.BitVector.Sized.Signed

Methods

compare :: SignedBV w -> SignedBV w -> Ordering #

(<) :: SignedBV w -> SignedBV w -> Bool #

(<=) :: SignedBV w -> SignedBV w -> Bool #

(>) :: SignedBV w -> SignedBV w -> Bool #

(>=) :: SignedBV w -> SignedBV w -> Bool #

max :: SignedBV w -> SignedBV w -> SignedBV w #

min :: SignedBV w -> SignedBV w -> SignedBV w #

Read (SignedBV w) Source # 
Instance details

Defined in Data.BitVector.Sized.Signed

Show (SignedBV w) Source # 
Instance details

Defined in Data.BitVector.Sized.Signed

Methods

showsPrec :: Int -> SignedBV w -> ShowS #

show :: SignedBV w -> String #

showList :: [SignedBV w] -> ShowS #

(KnownNat w, 1 <= w) => Ix (SignedBV w) Source # 
Instance details

Defined in Data.BitVector.Sized.Signed

Generic (SignedBV w) Source # 
Instance details

Defined in Data.BitVector.Sized.Signed

Associated Types

type Rep (SignedBV w) :: Type -> Type #

Methods

from :: SignedBV w -> Rep (SignedBV w) x #

to :: Rep (SignedBV w) x -> SignedBV w #

(KnownNat w, 1 <= w) => Bits (SignedBV w) Source # 
Instance details

Defined in Data.BitVector.Sized.Signed

(KnownNat w, 1 <= w) => FiniteBits (SignedBV w) Source # 
Instance details

Defined in Data.BitVector.Sized.Signed

(KnownNat w, 1 <= w) => Random (SignedBV w) Source # 
Instance details

Defined in Data.BitVector.Sized.Signed

Methods

randomR :: RandomGen g => (SignedBV w, SignedBV w) -> g -> (SignedBV w, g) #

random :: RandomGen g => g -> (SignedBV w, g) #

randomRs :: RandomGen g => (SignedBV w, SignedBV w) -> g -> [SignedBV w] #

randoms :: RandomGen g => g -> [SignedBV w] #

KnownNat w => Uniform (SignedBV w) Source # 
Instance details

Defined in Data.BitVector.Sized.Signed

Methods

uniformM :: StatefulGen g m => g -> m (SignedBV w) #

(KnownNat w, 1 <= w) => UniformRange (SignedBV w) Source # 
Instance details

Defined in Data.BitVector.Sized.Signed

Methods

uniformRM :: StatefulGen g m => (SignedBV w, SignedBV w) -> g -> m (SignedBV w) #

type Rep (SignedBV w) Source # 
Instance details

Defined in Data.BitVector.Sized.Signed

type Rep (SignedBV w) = D1 ('MetaData "SignedBV" "Data.BitVector.Sized.Signed" "bv-sized-1.0.4-EGq9mNcoBii2hKyuvBNKlW" 'True) (C1 ('MetaCons "SignedBV" 'PrefixI 'True) (S1 ('MetaSel ('Just "asBV") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (BV w))))

mkSignedBV :: NatRepr w -> Integer -> SignedBV w Source #

Convenience wrapper for mkBV.