bv-sized-1.0.0: 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 (BV w) 
Instances
(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

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.0-7ojTcINbUEOBofHAbwvbSS" True) (C1 (MetaCons "SignedBV" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (BV w))))

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

Convenience wrapper for mkBV.