sbv-5.12: SMT Based Verification: Symbolic Haskell theorem prover using SMT solving.

Copyright(c) Brian Huffman
LicenseBSD3
Maintainererkokl@gmail.com
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Data.SBV.Examples.Misc.Word4

Description

Demonstrates how new sizes of word/int types can be defined and used with SBV.

Synopsis

Documentation

newtype Word4 Source #

Word4 as a newtype. Invariant: Word4 x should satisfy x < 16.

Constructors

Word4 Word8 

Instances

Bounded Word4 Source #

Bounded instance; from 0 to 255

Enum Word4 Source #

Enum instance, trivial definitions.

Eq Word4 Source # 

Methods

(==) :: Word4 -> Word4 -> Bool #

(/=) :: Word4 -> Word4 -> Bool #

Integral Word4 Source #

Integral instance, again using Word8 instance and casting. NB. we do not need to use the smart constructor here as neither the quotient nor the remainder can overflow a Word4.

Data Word4 Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Word4 -> c Word4 #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Word4 #

toConstr :: Word4 -> Constr #

dataTypeOf :: Word4 -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Word4) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Word4) #

gmapT :: (forall b. Data b => b -> b) -> Word4 -> Word4 #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Word4 -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Word4 -> r #

gmapQ :: (forall d. Data d => d -> u) -> Word4 -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Word4 -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Word4 -> m Word4 #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Word4 -> m Word4 #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Word4 -> m Word4 #

Num Word4 Source #

Num instance, merely lifts underlying 8-bit operation and casts back

Ord Word4 Source # 

Methods

compare :: Word4 -> Word4 -> Ordering #

(<) :: Word4 -> Word4 -> Bool #

(<=) :: Word4 -> Word4 -> Bool #

(>) :: Word4 -> Word4 -> Bool #

(>=) :: Word4 -> Word4 -> Bool #

max :: Word4 -> Word4 -> Word4 #

min :: Word4 -> Word4 -> Word4 #

Read Word4 Source #

Read instance. We read as an 8-bit word, and coerce

Real Word4 Source #

Real instance simply uses the Word8 instance

Methods

toRational :: Word4 -> Rational #

Show Word4 Source #

Show instance

Methods

showsPrec :: Int -> Word4 -> ShowS #

show :: Word4 -> String #

showList :: [Word4] -> ShowS #

Bits Word4 Source #

Bits instance