bv-sized-1.0.5: a bitvector datatype that is parameterized by the vector width
Copyright(c) Galois Inc. 2018
LicenseBSD-3
Maintainerbenselfridge@galois.com
Stabilityexperimental
Portabilityportable
Safe HaskellSafe-Inferred
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) => 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) => 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

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) => Ix (SignedBV w) Source # 
Instance details

Defined in Data.BitVector.Sized.Signed

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

Defined in Data.BitVector.Sized.Signed

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 #

NFData (SignedBV w) Source # 
Instance details

Defined in Data.BitVector.Sized.Signed

Methods

rnf :: SignedBV w -> () #

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) => 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 #

Hashable (SignedBV w) Source # 
Instance details

Defined in Data.BitVector.Sized.Signed

Methods

hashWithSalt :: Int -> SignedBV w -> Int #

hash :: SignedBV w -> Int #

(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) #

Lift (SignedBV w :: TYPE LiftedRep) Source # 
Instance details

Defined in Data.BitVector.Sized.Signed

Methods

lift :: Quote m => SignedBV w -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => SignedBV w -> Code 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.5-GweJxxC6Vv1GMjK8EgHf3h" '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.