unwitch-3.0.0: converts between primitives
Safe HaskellNone
LanguageHaskell2010

Unwitch.Convert.Word8

Description

Conversions from Word8.

Synopsis

Conversions

toCInt :: Word8 -> CInt Source #

Widening conversion via Int32, always succeeds.

Unboxed conversions

These use GHC unboxed types and unboxed sums for zero-allocation failure handling. Requires the MagicHash, UnboxedSums and UnboxedTuples language extensions. See the GHC manual on unboxed types.

toInt8# :: Word8 -> (# Int8 | (# #) #) Source #

Unsigned->signed, source fits in Int#, roundtrip at Int#