uni-util-2.3.0.3: Utilities for the uniform workbench
Safe HaskellNone
LanguageHaskell2010

Util.Bytes

Description

This defines primitive byte operations, to be used with binary conversion. For the present we use the FFI. There are probably lots of better ways.

Documentation

data Byte Source #

Instances

Instances details
Enum Byte Source # 
Instance details

Defined in Util.Bytes

Methods

succ :: Byte -> Byte #

pred :: Byte -> Byte #

toEnum :: Int -> Byte #

fromEnum :: Byte -> Int #

enumFrom :: Byte -> [Byte] #

enumFromThen :: Byte -> Byte -> [Byte] #

enumFromTo :: Byte -> Byte -> [Byte] #

enumFromThenTo :: Byte -> Byte -> Byte -> [Byte] #

Eq Byte Source # 
Instance details

Defined in Util.Bytes

Methods

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

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

Integral Byte Source # 
Instance details

Defined in Util.Bytes

Methods

quot :: Byte -> Byte -> Byte #

rem :: Byte -> Byte -> Byte #

div :: Byte -> Byte -> Byte #

mod :: Byte -> Byte -> Byte #

quotRem :: Byte -> Byte -> (Byte, Byte) #

divMod :: Byte -> Byte -> (Byte, Byte) #

toInteger :: Byte -> Integer #

Num Byte Source # 
Instance details

Defined in Util.Bytes

Methods

(+) :: Byte -> Byte -> Byte #

(-) :: Byte -> Byte -> Byte #

(*) :: Byte -> Byte -> Byte #

negate :: Byte -> Byte #

abs :: Byte -> Byte #

signum :: Byte -> Byte #

fromInteger :: Integer -> Byte #

Ord Byte Source # 
Instance details

Defined in Util.Bytes

Methods

compare :: Byte -> Byte -> Ordering #

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

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

(>) :: Byte -> Byte -> Bool #

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

max :: Byte -> Byte -> Byte #

min :: Byte -> Byte -> Byte #

Real Byte Source # 
Instance details

Defined in Util.Bytes

Methods

toRational :: Byte -> Rational #

Show Byte Source # 
Instance details

Defined in Util.Bytes

Methods

showsPrec :: Int -> Byte -> ShowS #

show :: Byte -> String #

showList :: [Byte] -> ShowS #

Bits Byte Source # 
Instance details

Defined in Util.Bytes

HasBinary Byte m Source # 
Instance details

Defined in Util.BinaryInstances

Methods

writeBin :: WriteBinary m -> Byte -> m () Source #

readBin :: ReadBinary m -> m Byte Source #

data Bytes Source #

Instances

Instances details
Monad m => HasBinary (Bytes, Int) m Source # 
Instance details

Defined in Util.BinaryInstances

Methods

writeBin :: WriteBinary m -> (Bytes, Int) -> m () Source #

readBin :: ReadBinary m -> m (Bytes, Int) Source #

putBytesToBytes :: Bytes -> Int -> Bytes -> Int -> Int -> IO () Source #

bytesAlloca :: Int -> (Bytes -> IO a) -> IO a Source #