{-# LANGUAGE CPP, MagicHash, UnboxedTuples, Trustworthy, GeneralizedNewtypeDeriving #-}
module SDP.Unboxed.WordAs
(
WordAs8 (..), WordAs16 (..), WordAs32 (..), WordAs64 (..)
)
where
import Prelude ()
import SDP.SafePrelude
import SDP.Unboxed
import SDP.Index
import GHC.Base
import GHC.Exts
import Foreign.Storable
import Text.Read
#include "MachDeps.h"
default ()
newtype WordAs8 = WordAs8 Word
deriving ( WordAs8 -> WordAs8 -> Bool
(WordAs8 -> WordAs8 -> Bool)
-> (WordAs8 -> WordAs8 -> Bool) -> Eq WordAs8
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: WordAs8 -> WordAs8 -> Bool
$c/= :: WordAs8 -> WordAs8 -> Bool
== :: WordAs8 -> WordAs8 -> Bool
$c== :: WordAs8 -> WordAs8 -> Bool
Eq, Eq WordAs8
Eq WordAs8
-> (WordAs8 -> WordAs8 -> Ordering)
-> (WordAs8 -> WordAs8 -> Bool)
-> (WordAs8 -> WordAs8 -> Bool)
-> (WordAs8 -> WordAs8 -> Bool)
-> (WordAs8 -> WordAs8 -> Bool)
-> (WordAs8 -> WordAs8 -> WordAs8)
-> (WordAs8 -> WordAs8 -> WordAs8)
-> Ord WordAs8
WordAs8 -> WordAs8 -> Bool
WordAs8 -> WordAs8 -> Ordering
WordAs8 -> WordAs8 -> WordAs8
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: WordAs8 -> WordAs8 -> WordAs8
$cmin :: WordAs8 -> WordAs8 -> WordAs8
max :: WordAs8 -> WordAs8 -> WordAs8
$cmax :: WordAs8 -> WordAs8 -> WordAs8
>= :: WordAs8 -> WordAs8 -> Bool
$c>= :: WordAs8 -> WordAs8 -> Bool
> :: WordAs8 -> WordAs8 -> Bool
$c> :: WordAs8 -> WordAs8 -> Bool
<= :: WordAs8 -> WordAs8 -> Bool
$c<= :: WordAs8 -> WordAs8 -> Bool
< :: WordAs8 -> WordAs8 -> Bool
$c< :: WordAs8 -> WordAs8 -> Bool
compare :: WordAs8 -> WordAs8 -> Ordering
$ccompare :: WordAs8 -> WordAs8 -> Ordering
$cp1Ord :: Eq WordAs8
Ord, Int -> WordAs8
WordAs8 -> Int
WordAs8 -> [WordAs8]
WordAs8 -> WordAs8
WordAs8 -> WordAs8 -> [WordAs8]
WordAs8 -> WordAs8 -> WordAs8 -> [WordAs8]
(WordAs8 -> WordAs8)
-> (WordAs8 -> WordAs8)
-> (Int -> WordAs8)
-> (WordAs8 -> Int)
-> (WordAs8 -> [WordAs8])
-> (WordAs8 -> WordAs8 -> [WordAs8])
-> (WordAs8 -> WordAs8 -> [WordAs8])
-> (WordAs8 -> WordAs8 -> WordAs8 -> [WordAs8])
-> Enum WordAs8
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
enumFromThenTo :: WordAs8 -> WordAs8 -> WordAs8 -> [WordAs8]
$cenumFromThenTo :: WordAs8 -> WordAs8 -> WordAs8 -> [WordAs8]
enumFromTo :: WordAs8 -> WordAs8 -> [WordAs8]
$cenumFromTo :: WordAs8 -> WordAs8 -> [WordAs8]
enumFromThen :: WordAs8 -> WordAs8 -> [WordAs8]
$cenumFromThen :: WordAs8 -> WordAs8 -> [WordAs8]
enumFrom :: WordAs8 -> [WordAs8]
$cenumFrom :: WordAs8 -> [WordAs8]
fromEnum :: WordAs8 -> Int
$cfromEnum :: WordAs8 -> Int
toEnum :: Int -> WordAs8
$ctoEnum :: Int -> WordAs8
pred :: WordAs8 -> WordAs8
$cpred :: WordAs8 -> WordAs8
succ :: WordAs8 -> WordAs8
$csucc :: WordAs8 -> WordAs8
Enum, WordAs8
WordAs8 -> WordAs8 -> Bounded WordAs8
forall a. a -> a -> Bounded a
maxBound :: WordAs8
$cmaxBound :: WordAs8
minBound :: WordAs8
$cminBound :: WordAs8
Bounded, Integer -> WordAs8
WordAs8 -> WordAs8
WordAs8 -> WordAs8 -> WordAs8
(WordAs8 -> WordAs8 -> WordAs8)
-> (WordAs8 -> WordAs8 -> WordAs8)
-> (WordAs8 -> WordAs8 -> WordAs8)
-> (WordAs8 -> WordAs8)
-> (WordAs8 -> WordAs8)
-> (WordAs8 -> WordAs8)
-> (Integer -> WordAs8)
-> Num WordAs8
forall a.
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (Integer -> a)
-> Num a
fromInteger :: Integer -> WordAs8
$cfromInteger :: Integer -> WordAs8
signum :: WordAs8 -> WordAs8
$csignum :: WordAs8 -> WordAs8
abs :: WordAs8 -> WordAs8
$cabs :: WordAs8 -> WordAs8
negate :: WordAs8 -> WordAs8
$cnegate :: WordAs8 -> WordAs8
* :: WordAs8 -> WordAs8 -> WordAs8
$c* :: WordAs8 -> WordAs8 -> WordAs8
- :: WordAs8 -> WordAs8 -> WordAs8
$c- :: WordAs8 -> WordAs8 -> WordAs8
+ :: WordAs8 -> WordAs8 -> WordAs8
$c+ :: WordAs8 -> WordAs8 -> WordAs8
Num, Num WordAs8
Ord WordAs8
Num WordAs8 -> Ord WordAs8 -> (WordAs8 -> Rational) -> Real WordAs8
WordAs8 -> Rational
forall a. Num a -> Ord a -> (a -> Rational) -> Real a
toRational :: WordAs8 -> Rational
$ctoRational :: WordAs8 -> Rational
$cp2Real :: Ord WordAs8
$cp1Real :: Num WordAs8
Real, Enum WordAs8
Real WordAs8
Real WordAs8
-> Enum WordAs8
-> (WordAs8 -> WordAs8 -> WordAs8)
-> (WordAs8 -> WordAs8 -> WordAs8)
-> (WordAs8 -> WordAs8 -> WordAs8)
-> (WordAs8 -> WordAs8 -> WordAs8)
-> (WordAs8 -> WordAs8 -> (WordAs8, WordAs8))
-> (WordAs8 -> WordAs8 -> (WordAs8, WordAs8))
-> (WordAs8 -> Integer)
-> Integral WordAs8
WordAs8 -> Integer
WordAs8 -> WordAs8 -> (WordAs8, WordAs8)
WordAs8 -> WordAs8 -> WordAs8
forall a.
Real a
-> Enum a
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> (a, a))
-> (a -> a -> (a, a))
-> (a -> Integer)
-> Integral a
toInteger :: WordAs8 -> Integer
$ctoInteger :: WordAs8 -> Integer
divMod :: WordAs8 -> WordAs8 -> (WordAs8, WordAs8)
$cdivMod :: WordAs8 -> WordAs8 -> (WordAs8, WordAs8)
quotRem :: WordAs8 -> WordAs8 -> (WordAs8, WordAs8)
$cquotRem :: WordAs8 -> WordAs8 -> (WordAs8, WordAs8)
mod :: WordAs8 -> WordAs8 -> WordAs8
$cmod :: WordAs8 -> WordAs8 -> WordAs8
div :: WordAs8 -> WordAs8 -> WordAs8
$cdiv :: WordAs8 -> WordAs8 -> WordAs8
rem :: WordAs8 -> WordAs8 -> WordAs8
$crem :: WordAs8 -> WordAs8 -> WordAs8
quot :: WordAs8 -> WordAs8 -> WordAs8
$cquot :: WordAs8 -> WordAs8 -> WordAs8
$cp2Integral :: Enum WordAs8
$cp1Integral :: Real WordAs8
Integral )
newtype WordAs16 = WordAs16 Word
deriving ( WordAs16 -> WordAs16 -> Bool
(WordAs16 -> WordAs16 -> Bool)
-> (WordAs16 -> WordAs16 -> Bool) -> Eq WordAs16
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: WordAs16 -> WordAs16 -> Bool
$c/= :: WordAs16 -> WordAs16 -> Bool
== :: WordAs16 -> WordAs16 -> Bool
$c== :: WordAs16 -> WordAs16 -> Bool
Eq, Eq WordAs16
Eq WordAs16
-> (WordAs16 -> WordAs16 -> Ordering)
-> (WordAs16 -> WordAs16 -> Bool)
-> (WordAs16 -> WordAs16 -> Bool)
-> (WordAs16 -> WordAs16 -> Bool)
-> (WordAs16 -> WordAs16 -> Bool)
-> (WordAs16 -> WordAs16 -> WordAs16)
-> (WordAs16 -> WordAs16 -> WordAs16)
-> Ord WordAs16
WordAs16 -> WordAs16 -> Bool
WordAs16 -> WordAs16 -> Ordering
WordAs16 -> WordAs16 -> WordAs16
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: WordAs16 -> WordAs16 -> WordAs16
$cmin :: WordAs16 -> WordAs16 -> WordAs16
max :: WordAs16 -> WordAs16 -> WordAs16
$cmax :: WordAs16 -> WordAs16 -> WordAs16
>= :: WordAs16 -> WordAs16 -> Bool
$c>= :: WordAs16 -> WordAs16 -> Bool
> :: WordAs16 -> WordAs16 -> Bool
$c> :: WordAs16 -> WordAs16 -> Bool
<= :: WordAs16 -> WordAs16 -> Bool
$c<= :: WordAs16 -> WordAs16 -> Bool
< :: WordAs16 -> WordAs16 -> Bool
$c< :: WordAs16 -> WordAs16 -> Bool
compare :: WordAs16 -> WordAs16 -> Ordering
$ccompare :: WordAs16 -> WordAs16 -> Ordering
$cp1Ord :: Eq WordAs16
Ord, Int -> WordAs16
WordAs16 -> Int
WordAs16 -> [WordAs16]
WordAs16 -> WordAs16
WordAs16 -> WordAs16 -> [WordAs16]
WordAs16 -> WordAs16 -> WordAs16 -> [WordAs16]
(WordAs16 -> WordAs16)
-> (WordAs16 -> WordAs16)
-> (Int -> WordAs16)
-> (WordAs16 -> Int)
-> (WordAs16 -> [WordAs16])
-> (WordAs16 -> WordAs16 -> [WordAs16])
-> (WordAs16 -> WordAs16 -> [WordAs16])
-> (WordAs16 -> WordAs16 -> WordAs16 -> [WordAs16])
-> Enum WordAs16
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
enumFromThenTo :: WordAs16 -> WordAs16 -> WordAs16 -> [WordAs16]
$cenumFromThenTo :: WordAs16 -> WordAs16 -> WordAs16 -> [WordAs16]
enumFromTo :: WordAs16 -> WordAs16 -> [WordAs16]
$cenumFromTo :: WordAs16 -> WordAs16 -> [WordAs16]
enumFromThen :: WordAs16 -> WordAs16 -> [WordAs16]
$cenumFromThen :: WordAs16 -> WordAs16 -> [WordAs16]
enumFrom :: WordAs16 -> [WordAs16]
$cenumFrom :: WordAs16 -> [WordAs16]
fromEnum :: WordAs16 -> Int
$cfromEnum :: WordAs16 -> Int
toEnum :: Int -> WordAs16
$ctoEnum :: Int -> WordAs16
pred :: WordAs16 -> WordAs16
$cpred :: WordAs16 -> WordAs16
succ :: WordAs16 -> WordAs16
$csucc :: WordAs16 -> WordAs16
Enum, WordAs16
WordAs16 -> WordAs16 -> Bounded WordAs16
forall a. a -> a -> Bounded a
maxBound :: WordAs16
$cmaxBound :: WordAs16
minBound :: WordAs16
$cminBound :: WordAs16
Bounded, Integer -> WordAs16
WordAs16 -> WordAs16
WordAs16 -> WordAs16 -> WordAs16
(WordAs16 -> WordAs16 -> WordAs16)
-> (WordAs16 -> WordAs16 -> WordAs16)
-> (WordAs16 -> WordAs16 -> WordAs16)
-> (WordAs16 -> WordAs16)
-> (WordAs16 -> WordAs16)
-> (WordAs16 -> WordAs16)
-> (Integer -> WordAs16)
-> Num WordAs16
forall a.
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (Integer -> a)
-> Num a
fromInteger :: Integer -> WordAs16
$cfromInteger :: Integer -> WordAs16
signum :: WordAs16 -> WordAs16
$csignum :: WordAs16 -> WordAs16
abs :: WordAs16 -> WordAs16
$cabs :: WordAs16 -> WordAs16
negate :: WordAs16 -> WordAs16
$cnegate :: WordAs16 -> WordAs16
* :: WordAs16 -> WordAs16 -> WordAs16
$c* :: WordAs16 -> WordAs16 -> WordAs16
- :: WordAs16 -> WordAs16 -> WordAs16
$c- :: WordAs16 -> WordAs16 -> WordAs16
+ :: WordAs16 -> WordAs16 -> WordAs16
$c+ :: WordAs16 -> WordAs16 -> WordAs16
Num, Num WordAs16
Ord WordAs16
Num WordAs16
-> Ord WordAs16 -> (WordAs16 -> Rational) -> Real WordAs16
WordAs16 -> Rational
forall a. Num a -> Ord a -> (a -> Rational) -> Real a
toRational :: WordAs16 -> Rational
$ctoRational :: WordAs16 -> Rational
$cp2Real :: Ord WordAs16
$cp1Real :: Num WordAs16
Real, Enum WordAs16
Real WordAs16
Real WordAs16
-> Enum WordAs16
-> (WordAs16 -> WordAs16 -> WordAs16)
-> (WordAs16 -> WordAs16 -> WordAs16)
-> (WordAs16 -> WordAs16 -> WordAs16)
-> (WordAs16 -> WordAs16 -> WordAs16)
-> (WordAs16 -> WordAs16 -> (WordAs16, WordAs16))
-> (WordAs16 -> WordAs16 -> (WordAs16, WordAs16))
-> (WordAs16 -> Integer)
-> Integral WordAs16
WordAs16 -> Integer
WordAs16 -> WordAs16 -> (WordAs16, WordAs16)
WordAs16 -> WordAs16 -> WordAs16
forall a.
Real a
-> Enum a
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> (a, a))
-> (a -> a -> (a, a))
-> (a -> Integer)
-> Integral a
toInteger :: WordAs16 -> Integer
$ctoInteger :: WordAs16 -> Integer
divMod :: WordAs16 -> WordAs16 -> (WordAs16, WordAs16)
$cdivMod :: WordAs16 -> WordAs16 -> (WordAs16, WordAs16)
quotRem :: WordAs16 -> WordAs16 -> (WordAs16, WordAs16)
$cquotRem :: WordAs16 -> WordAs16 -> (WordAs16, WordAs16)
mod :: WordAs16 -> WordAs16 -> WordAs16
$cmod :: WordAs16 -> WordAs16 -> WordAs16
div :: WordAs16 -> WordAs16 -> WordAs16
$cdiv :: WordAs16 -> WordAs16 -> WordAs16
rem :: WordAs16 -> WordAs16 -> WordAs16
$crem :: WordAs16 -> WordAs16 -> WordAs16
quot :: WordAs16 -> WordAs16 -> WordAs16
$cquot :: WordAs16 -> WordAs16 -> WordAs16
$cp2Integral :: Enum WordAs16
$cp1Integral :: Real WordAs16
Integral )
newtype WordAs32 = WordAs32 Word
deriving ( WordAs32 -> WordAs32 -> Bool
(WordAs32 -> WordAs32 -> Bool)
-> (WordAs32 -> WordAs32 -> Bool) -> Eq WordAs32
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: WordAs32 -> WordAs32 -> Bool
$c/= :: WordAs32 -> WordAs32 -> Bool
== :: WordAs32 -> WordAs32 -> Bool
$c== :: WordAs32 -> WordAs32 -> Bool
Eq, Eq WordAs32
Eq WordAs32
-> (WordAs32 -> WordAs32 -> Ordering)
-> (WordAs32 -> WordAs32 -> Bool)
-> (WordAs32 -> WordAs32 -> Bool)
-> (WordAs32 -> WordAs32 -> Bool)
-> (WordAs32 -> WordAs32 -> Bool)
-> (WordAs32 -> WordAs32 -> WordAs32)
-> (WordAs32 -> WordAs32 -> WordAs32)
-> Ord WordAs32
WordAs32 -> WordAs32 -> Bool
WordAs32 -> WordAs32 -> Ordering
WordAs32 -> WordAs32 -> WordAs32
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: WordAs32 -> WordAs32 -> WordAs32
$cmin :: WordAs32 -> WordAs32 -> WordAs32
max :: WordAs32 -> WordAs32 -> WordAs32
$cmax :: WordAs32 -> WordAs32 -> WordAs32
>= :: WordAs32 -> WordAs32 -> Bool
$c>= :: WordAs32 -> WordAs32 -> Bool
> :: WordAs32 -> WordAs32 -> Bool
$c> :: WordAs32 -> WordAs32 -> Bool
<= :: WordAs32 -> WordAs32 -> Bool
$c<= :: WordAs32 -> WordAs32 -> Bool
< :: WordAs32 -> WordAs32 -> Bool
$c< :: WordAs32 -> WordAs32 -> Bool
compare :: WordAs32 -> WordAs32 -> Ordering
$ccompare :: WordAs32 -> WordAs32 -> Ordering
$cp1Ord :: Eq WordAs32
Ord, Int -> WordAs32
WordAs32 -> Int
WordAs32 -> [WordAs32]
WordAs32 -> WordAs32
WordAs32 -> WordAs32 -> [WordAs32]
WordAs32 -> WordAs32 -> WordAs32 -> [WordAs32]
(WordAs32 -> WordAs32)
-> (WordAs32 -> WordAs32)
-> (Int -> WordAs32)
-> (WordAs32 -> Int)
-> (WordAs32 -> [WordAs32])
-> (WordAs32 -> WordAs32 -> [WordAs32])
-> (WordAs32 -> WordAs32 -> [WordAs32])
-> (WordAs32 -> WordAs32 -> WordAs32 -> [WordAs32])
-> Enum WordAs32
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
enumFromThenTo :: WordAs32 -> WordAs32 -> WordAs32 -> [WordAs32]
$cenumFromThenTo :: WordAs32 -> WordAs32 -> WordAs32 -> [WordAs32]
enumFromTo :: WordAs32 -> WordAs32 -> [WordAs32]
$cenumFromTo :: WordAs32 -> WordAs32 -> [WordAs32]
enumFromThen :: WordAs32 -> WordAs32 -> [WordAs32]
$cenumFromThen :: WordAs32 -> WordAs32 -> [WordAs32]
enumFrom :: WordAs32 -> [WordAs32]
$cenumFrom :: WordAs32 -> [WordAs32]
fromEnum :: WordAs32 -> Int
$cfromEnum :: WordAs32 -> Int
toEnum :: Int -> WordAs32
$ctoEnum :: Int -> WordAs32
pred :: WordAs32 -> WordAs32
$cpred :: WordAs32 -> WordAs32
succ :: WordAs32 -> WordAs32
$csucc :: WordAs32 -> WordAs32
Enum, WordAs32
WordAs32 -> WordAs32 -> Bounded WordAs32
forall a. a -> a -> Bounded a
maxBound :: WordAs32
$cmaxBound :: WordAs32
minBound :: WordAs32
$cminBound :: WordAs32
Bounded, Integer -> WordAs32
WordAs32 -> WordAs32
WordAs32 -> WordAs32 -> WordAs32
(WordAs32 -> WordAs32 -> WordAs32)
-> (WordAs32 -> WordAs32 -> WordAs32)
-> (WordAs32 -> WordAs32 -> WordAs32)
-> (WordAs32 -> WordAs32)
-> (WordAs32 -> WordAs32)
-> (WordAs32 -> WordAs32)
-> (Integer -> WordAs32)
-> Num WordAs32
forall a.
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (Integer -> a)
-> Num a
fromInteger :: Integer -> WordAs32
$cfromInteger :: Integer -> WordAs32
signum :: WordAs32 -> WordAs32
$csignum :: WordAs32 -> WordAs32
abs :: WordAs32 -> WordAs32
$cabs :: WordAs32 -> WordAs32
negate :: WordAs32 -> WordAs32
$cnegate :: WordAs32 -> WordAs32
* :: WordAs32 -> WordAs32 -> WordAs32
$c* :: WordAs32 -> WordAs32 -> WordAs32
- :: WordAs32 -> WordAs32 -> WordAs32
$c- :: WordAs32 -> WordAs32 -> WordAs32
+ :: WordAs32 -> WordAs32 -> WordAs32
$c+ :: WordAs32 -> WordAs32 -> WordAs32
Num, Num WordAs32
Ord WordAs32
Num WordAs32
-> Ord WordAs32 -> (WordAs32 -> Rational) -> Real WordAs32
WordAs32 -> Rational
forall a. Num a -> Ord a -> (a -> Rational) -> Real a
toRational :: WordAs32 -> Rational
$ctoRational :: WordAs32 -> Rational
$cp2Real :: Ord WordAs32
$cp1Real :: Num WordAs32
Real, Enum WordAs32
Real WordAs32
Real WordAs32
-> Enum WordAs32
-> (WordAs32 -> WordAs32 -> WordAs32)
-> (WordAs32 -> WordAs32 -> WordAs32)
-> (WordAs32 -> WordAs32 -> WordAs32)
-> (WordAs32 -> WordAs32 -> WordAs32)
-> (WordAs32 -> WordAs32 -> (WordAs32, WordAs32))
-> (WordAs32 -> WordAs32 -> (WordAs32, WordAs32))
-> (WordAs32 -> Integer)
-> Integral WordAs32
WordAs32 -> Integer
WordAs32 -> WordAs32 -> (WordAs32, WordAs32)
WordAs32 -> WordAs32 -> WordAs32
forall a.
Real a
-> Enum a
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> (a, a))
-> (a -> a -> (a, a))
-> (a -> Integer)
-> Integral a
toInteger :: WordAs32 -> Integer
$ctoInteger :: WordAs32 -> Integer
divMod :: WordAs32 -> WordAs32 -> (WordAs32, WordAs32)
$cdivMod :: WordAs32 -> WordAs32 -> (WordAs32, WordAs32)
quotRem :: WordAs32 -> WordAs32 -> (WordAs32, WordAs32)
$cquotRem :: WordAs32 -> WordAs32 -> (WordAs32, WordAs32)
mod :: WordAs32 -> WordAs32 -> WordAs32
$cmod :: WordAs32 -> WordAs32 -> WordAs32
div :: WordAs32 -> WordAs32 -> WordAs32
$cdiv :: WordAs32 -> WordAs32 -> WordAs32
rem :: WordAs32 -> WordAs32 -> WordAs32
$crem :: WordAs32 -> WordAs32 -> WordAs32
quot :: WordAs32 -> WordAs32 -> WordAs32
$cquot :: WordAs32 -> WordAs32 -> WordAs32
$cp2Integral :: Enum WordAs32
$cp1Integral :: Real WordAs32
Integral )
newtype WordAs64 = WordAs64 Word
deriving ( WordAs64 -> WordAs64 -> Bool
(WordAs64 -> WordAs64 -> Bool)
-> (WordAs64 -> WordAs64 -> Bool) -> Eq WordAs64
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: WordAs64 -> WordAs64 -> Bool
$c/= :: WordAs64 -> WordAs64 -> Bool
== :: WordAs64 -> WordAs64 -> Bool
$c== :: WordAs64 -> WordAs64 -> Bool
Eq, Eq WordAs64
Eq WordAs64
-> (WordAs64 -> WordAs64 -> Ordering)
-> (WordAs64 -> WordAs64 -> Bool)
-> (WordAs64 -> WordAs64 -> Bool)
-> (WordAs64 -> WordAs64 -> Bool)
-> (WordAs64 -> WordAs64 -> Bool)
-> (WordAs64 -> WordAs64 -> WordAs64)
-> (WordAs64 -> WordAs64 -> WordAs64)
-> Ord WordAs64
WordAs64 -> WordAs64 -> Bool
WordAs64 -> WordAs64 -> Ordering
WordAs64 -> WordAs64 -> WordAs64
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: WordAs64 -> WordAs64 -> WordAs64
$cmin :: WordAs64 -> WordAs64 -> WordAs64
max :: WordAs64 -> WordAs64 -> WordAs64
$cmax :: WordAs64 -> WordAs64 -> WordAs64
>= :: WordAs64 -> WordAs64 -> Bool
$c>= :: WordAs64 -> WordAs64 -> Bool
> :: WordAs64 -> WordAs64 -> Bool
$c> :: WordAs64 -> WordAs64 -> Bool
<= :: WordAs64 -> WordAs64 -> Bool
$c<= :: WordAs64 -> WordAs64 -> Bool
< :: WordAs64 -> WordAs64 -> Bool
$c< :: WordAs64 -> WordAs64 -> Bool
compare :: WordAs64 -> WordAs64 -> Ordering
$ccompare :: WordAs64 -> WordAs64 -> Ordering
$cp1Ord :: Eq WordAs64
Ord, Int -> WordAs64
WordAs64 -> Int
WordAs64 -> [WordAs64]
WordAs64 -> WordAs64
WordAs64 -> WordAs64 -> [WordAs64]
WordAs64 -> WordAs64 -> WordAs64 -> [WordAs64]
(WordAs64 -> WordAs64)
-> (WordAs64 -> WordAs64)
-> (Int -> WordAs64)
-> (WordAs64 -> Int)
-> (WordAs64 -> [WordAs64])
-> (WordAs64 -> WordAs64 -> [WordAs64])
-> (WordAs64 -> WordAs64 -> [WordAs64])
-> (WordAs64 -> WordAs64 -> WordAs64 -> [WordAs64])
-> Enum WordAs64
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
enumFromThenTo :: WordAs64 -> WordAs64 -> WordAs64 -> [WordAs64]
$cenumFromThenTo :: WordAs64 -> WordAs64 -> WordAs64 -> [WordAs64]
enumFromTo :: WordAs64 -> WordAs64 -> [WordAs64]
$cenumFromTo :: WordAs64 -> WordAs64 -> [WordAs64]
enumFromThen :: WordAs64 -> WordAs64 -> [WordAs64]
$cenumFromThen :: WordAs64 -> WordAs64 -> [WordAs64]
enumFrom :: WordAs64 -> [WordAs64]
$cenumFrom :: WordAs64 -> [WordAs64]
fromEnum :: WordAs64 -> Int
$cfromEnum :: WordAs64 -> Int
toEnum :: Int -> WordAs64
$ctoEnum :: Int -> WordAs64
pred :: WordAs64 -> WordAs64
$cpred :: WordAs64 -> WordAs64
succ :: WordAs64 -> WordAs64
$csucc :: WordAs64 -> WordAs64
Enum, WordAs64
WordAs64 -> WordAs64 -> Bounded WordAs64
forall a. a -> a -> Bounded a
maxBound :: WordAs64
$cmaxBound :: WordAs64
minBound :: WordAs64
$cminBound :: WordAs64
Bounded, Integer -> WordAs64
WordAs64 -> WordAs64
WordAs64 -> WordAs64 -> WordAs64
(WordAs64 -> WordAs64 -> WordAs64)
-> (WordAs64 -> WordAs64 -> WordAs64)
-> (WordAs64 -> WordAs64 -> WordAs64)
-> (WordAs64 -> WordAs64)
-> (WordAs64 -> WordAs64)
-> (WordAs64 -> WordAs64)
-> (Integer -> WordAs64)
-> Num WordAs64
forall a.
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (Integer -> a)
-> Num a
fromInteger :: Integer -> WordAs64
$cfromInteger :: Integer -> WordAs64
signum :: WordAs64 -> WordAs64
$csignum :: WordAs64 -> WordAs64
abs :: WordAs64 -> WordAs64
$cabs :: WordAs64 -> WordAs64
negate :: WordAs64 -> WordAs64
$cnegate :: WordAs64 -> WordAs64
* :: WordAs64 -> WordAs64 -> WordAs64
$c* :: WordAs64 -> WordAs64 -> WordAs64
- :: WordAs64 -> WordAs64 -> WordAs64
$c- :: WordAs64 -> WordAs64 -> WordAs64
+ :: WordAs64 -> WordAs64 -> WordAs64
$c+ :: WordAs64 -> WordAs64 -> WordAs64
Num, Num WordAs64
Ord WordAs64
Num WordAs64
-> Ord WordAs64 -> (WordAs64 -> Rational) -> Real WordAs64
WordAs64 -> Rational
forall a. Num a -> Ord a -> (a -> Rational) -> Real a
toRational :: WordAs64 -> Rational
$ctoRational :: WordAs64 -> Rational
$cp2Real :: Ord WordAs64
$cp1Real :: Num WordAs64
Real, Enum WordAs64
Real WordAs64
Real WordAs64
-> Enum WordAs64
-> (WordAs64 -> WordAs64 -> WordAs64)
-> (WordAs64 -> WordAs64 -> WordAs64)
-> (WordAs64 -> WordAs64 -> WordAs64)
-> (WordAs64 -> WordAs64 -> WordAs64)
-> (WordAs64 -> WordAs64 -> (WordAs64, WordAs64))
-> (WordAs64 -> WordAs64 -> (WordAs64, WordAs64))
-> (WordAs64 -> Integer)
-> Integral WordAs64
WordAs64 -> Integer
WordAs64 -> WordAs64 -> (WordAs64, WordAs64)
WordAs64 -> WordAs64 -> WordAs64
forall a.
Real a
-> Enum a
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> (a, a))
-> (a -> a -> (a, a))
-> (a -> Integer)
-> Integral a
toInteger :: WordAs64 -> Integer
$ctoInteger :: WordAs64 -> Integer
divMod :: WordAs64 -> WordAs64 -> (WordAs64, WordAs64)
$cdivMod :: WordAs64 -> WordAs64 -> (WordAs64, WordAs64)
quotRem :: WordAs64 -> WordAs64 -> (WordAs64, WordAs64)
$cquotRem :: WordAs64 -> WordAs64 -> (WordAs64, WordAs64)
mod :: WordAs64 -> WordAs64 -> WordAs64
$cmod :: WordAs64 -> WordAs64 -> WordAs64
div :: WordAs64 -> WordAs64 -> WordAs64
$cdiv :: WordAs64 -> WordAs64 -> WordAs64
rem :: WordAs64 -> WordAs64 -> WordAs64
$crem :: WordAs64 -> WordAs64 -> WordAs64
quot :: WordAs64 -> WordAs64 -> WordAs64
$cquot :: WordAs64 -> WordAs64 -> WordAs64
$cp2Integral :: Enum WordAs64
$cp1Integral :: Real WordAs64
Integral )
instance Shape WordAs8
instance Shape WordAs16
instance Shape WordAs32
instance Shape WordAs64
instance Index WordAs8 where offset :: (WordAs8, WordAs8) -> WordAs8 -> Int
offset = (WordAs8, WordAs8) -> WordAs8 -> Int
forall i. (Index i, Integral i) => (i, i) -> i -> Int
offsetIntegral; defaultBounds :: Int -> (WordAs8, WordAs8)
defaultBounds = Int -> (WordAs8, WordAs8)
forall i. (Index i, Bounded i) => Int -> (i, i)
defaultBoundsUnsign
instance Index WordAs16 where offset :: (WordAs16, WordAs16) -> WordAs16 -> Int
offset = (WordAs16, WordAs16) -> WordAs16 -> Int
forall i. (Index i, Integral i) => (i, i) -> i -> Int
offsetIntegral; defaultBounds :: Int -> (WordAs16, WordAs16)
defaultBounds = Int -> (WordAs16, WordAs16)
forall i. (Index i, Bounded i) => Int -> (i, i)
defaultBoundsUnsign
instance Index WordAs32 where offset :: (WordAs32, WordAs32) -> WordAs32 -> Int
offset = (WordAs32, WordAs32) -> WordAs32 -> Int
forall i. (Index i, Integral i) => (i, i) -> i -> Int
offsetIntegral; defaultBounds :: Int -> (WordAs32, WordAs32)
defaultBounds = Int -> (WordAs32, WordAs32)
forall i. (Index i, Bounded i) => Int -> (i, i)
defaultBoundsUnsign
instance Index WordAs64 where offset :: (WordAs64, WordAs64) -> WordAs64 -> Int
offset = (WordAs64, WordAs64) -> WordAs64 -> Int
forall i. (Index i, Integral i) => (i, i) -> i -> Int
offsetIntegral; defaultBounds :: Int -> (WordAs64, WordAs64)
defaultBounds = Int -> (WordAs64, WordAs64)
forall i. (Index i, Bounded i) => Int -> (i, i)
defaultBoundsUnsign
instance Show WordAs8 where show :: WordAs8 -> String
show (WordAs8 Word
x) = Word -> String
forall a. Show a => a -> String
show Word
x
instance Show WordAs16 where show :: WordAs16 -> String
show (WordAs16 Word
x) = Word -> String
forall a. Show a => a -> String
show Word
x
instance Show WordAs32 where show :: WordAs32 -> String
show (WordAs32 Word
x) = Word -> String
forall a. Show a => a -> String
show Word
x
instance Show WordAs64 where show :: WordAs64 -> String
show (WordAs64 Word
x) = Word -> String
forall a. Show a => a -> String
show Word
x
instance Read WordAs8 where readPrec :: ReadPrec WordAs8
readPrec = Word -> WordAs8
WordAs8 (Word -> WordAs8) -> ReadPrec Word -> ReadPrec WordAs8
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> ReadPrec Word
forall a. Read a => ReadPrec a
readPrec
instance Read WordAs16 where readPrec :: ReadPrec WordAs16
readPrec = Word -> WordAs16
WordAs16 (Word -> WordAs16) -> ReadPrec Word -> ReadPrec WordAs16
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> ReadPrec Word
forall a. Read a => ReadPrec a
readPrec
instance Read WordAs32 where readPrec :: ReadPrec WordAs32
readPrec = Word -> WordAs32
WordAs32 (Word -> WordAs32) -> ReadPrec Word -> ReadPrec WordAs32
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> ReadPrec Word
forall a. Read a => ReadPrec a
readPrec
instance Read WordAs64 where readPrec :: ReadPrec WordAs64
readPrec = Word -> WordAs64
WordAs64 (Word -> WordAs64) -> ReadPrec Word -> ReadPrec WordAs64
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> ReadPrec Word
forall a. Read a => ReadPrec a
readPrec
instance Unboxed WordAs8
where
{-# INLINE sizeof #-}
sizeof :: WordAs8 -> Int -> Int
sizeof WordAs8
_ Int
n = Int -> Int -> Int
forall a. Ord a => a -> a -> a
max Int
0 Int
n
{-# INLINE (!#) #-}
ByteArray#
bytes# !# :: ByteArray# -> Int# -> WordAs8
!# Int#
i# = Word -> WordAs8
WordAs8 (Word# -> Word
W# (ByteArray# -> Int# -> Word#
indexWord8Array# ByteArray#
bytes# Int#
i#))
{-# INLINE (!>#) #-}
MutableByteArray# s
mbytes# !># :: MutableByteArray# s -> Int# -> State# s -> (# State# s, WordAs8 #)
!># Int#
i# = \ State# s
s1# -> case MutableByteArray# s -> Int# -> State# s -> (# State# s, Word# #)
forall d.
MutableByteArray# d -> Int# -> State# d -> (# State# d, Word# #)
readWord8Array# MutableByteArray# s
mbytes# Int#
i# State# s
s1# of
(# State# s
s2#, Word#
e# #) -> (# State# s
s2#, Word -> WordAs8
WordAs8 (Word# -> Word
W# Word#
e#) #)
writeByteArray# :: MutableByteArray# s -> Int# -> WordAs8 -> State# s -> State# s
writeByteArray# MutableByteArray# s
mbytes# Int#
n# (WordAs8 (W# Word#
e#)) = MutableByteArray# s -> Int# -> Word# -> State# s -> State# s
forall d.
MutableByteArray# d -> Int# -> Word# -> State# d -> State# d
writeWord8Array# MutableByteArray# s
mbytes# Int#
n# Word#
e#
newUnboxed :: WordAs8 -> Int# -> State# s -> (# State# s, MutableByteArray# s #)
newUnboxed WordAs8
e Int#
n# = \ State# s
s1# -> case Int# -> State# s -> (# State# s, MutableByteArray# s #)
forall d. Int# -> State# d -> (# State# d, MutableByteArray# d #)
newByteArray# (WordAs8 -> Int# -> Int#
forall e. Unboxed e => e -> Int# -> Int#
sizeof# WordAs8
e Int#
n#) State# s
s1# of
(# State# s
s2#, MutableByteArray# s
mbytes# #) -> case MutableByteArray# s -> Int# -> WordAs8 -> State# s -> State# s
forall e s.
Unboxed e =>
MutableByteArray# s -> Int# -> e -> State# s -> State# s
fillByteArray# MutableByteArray# s
mbytes# Int#
n# (WordAs8
0 :: WordAs8) State# s
s2# of
State# s
s3# -> (# State# s
s3#, MutableByteArray# s
mbytes# #)
instance Unboxed WordAs16
where
{-# INLINE sizeof #-}
sizeof :: WordAs16 -> Int -> Int
sizeof WordAs16
_ Int
n = Int -> Int -> Int
forall a. Ord a => a -> a -> a
max Int
0 Int
n Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
2
{-# INLINE (!#) #-}
ByteArray#
bytes# !# :: ByteArray# -> Int# -> WordAs16
!# Int#
i# = Word -> WordAs16
WordAs16 (Word# -> Word
W# (ByteArray# -> Int# -> Word#
indexWord16Array# ByteArray#
bytes# Int#
i#))
{-# INLINE (!>#) #-}
MutableByteArray# s
mbytes# !># :: MutableByteArray# s -> Int# -> State# s -> (# State# s, WordAs16 #)
!># Int#
i# = \ State# s
s1# -> case MutableByteArray# s -> Int# -> State# s -> (# State# s, Word# #)
forall d.
MutableByteArray# d -> Int# -> State# d -> (# State# d, Word# #)
readWord16Array# MutableByteArray# s
mbytes# Int#
i# State# s
s1# of
(# State# s
s2#, Word#
e# #) -> (# State# s
s2#, Word -> WordAs16
WordAs16 (Word# -> Word
W# Word#
e#) #)
writeByteArray# :: MutableByteArray# s -> Int# -> WordAs16 -> State# s -> State# s
writeByteArray# MutableByteArray# s
mbytes# Int#
n# (WordAs16 (W# Word#
e#)) = MutableByteArray# s -> Int# -> Word# -> State# s -> State# s
forall d.
MutableByteArray# d -> Int# -> Word# -> State# d -> State# d
writeWord16Array# MutableByteArray# s
mbytes# Int#
n# Word#
e#
newUnboxed :: WordAs16 -> Int# -> State# s -> (# State# s, MutableByteArray# s #)
newUnboxed WordAs16
e Int#
n# = \ State# s
s1# -> case Int# -> State# s -> (# State# s, MutableByteArray# s #)
forall d. Int# -> State# d -> (# State# d, MutableByteArray# d #)
newByteArray# (WordAs16 -> Int# -> Int#
forall e. Unboxed e => e -> Int# -> Int#
sizeof# WordAs16
e Int#
n#) State# s
s1# of
(# State# s
s2#, MutableByteArray# s
mbytes# #) -> case MutableByteArray# s -> Int# -> WordAs16 -> State# s -> State# s
forall e s.
Unboxed e =>
MutableByteArray# s -> Int# -> e -> State# s -> State# s
fillByteArray# MutableByteArray# s
mbytes# Int#
n# (WordAs16
0 :: WordAs16) State# s
s2# of
State# s
s3# -> (# State# s
s3#, MutableByteArray# s
mbytes# #)
instance Unboxed WordAs32
where
{-# INLINE sizeof #-}
sizeof :: WordAs32 -> Int -> Int
sizeof WordAs32
_ Int
n = Int -> Int -> Int
forall a. Ord a => a -> a -> a
max Int
0 Int
n Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
4
{-# INLINE (!#) #-}
ByteArray#
bytes# !# :: ByteArray# -> Int# -> WordAs32
!# Int#
i# = Word -> WordAs32
WordAs32 (Word# -> Word
W# (ByteArray# -> Int# -> Word#
indexWord32Array# ByteArray#
bytes# Int#
i#))
{-# INLINE (!>#) #-}
MutableByteArray# s
mbytes# !># :: MutableByteArray# s -> Int# -> State# s -> (# State# s, WordAs32 #)
!># Int#
i# = \ State# s
s1# -> case MutableByteArray# s -> Int# -> State# s -> (# State# s, Word# #)
forall d.
MutableByteArray# d -> Int# -> State# d -> (# State# d, Word# #)
readWord32Array# MutableByteArray# s
mbytes# Int#
i# State# s
s1# of
(# State# s
s2#, Word#
e# #) -> (# State# s
s2#, Word -> WordAs32
WordAs32 (Word# -> Word
W# Word#
e#) #)
writeByteArray# :: MutableByteArray# s -> Int# -> WordAs32 -> State# s -> State# s
writeByteArray# MutableByteArray# s
mbytes# Int#
n# (WordAs32 (W# Word#
e#)) = MutableByteArray# s -> Int# -> Word# -> State# s -> State# s
forall d.
MutableByteArray# d -> Int# -> Word# -> State# d -> State# d
writeWord32Array# MutableByteArray# s
mbytes# Int#
n# Word#
e#
newUnboxed :: WordAs32 -> Int# -> State# s -> (# State# s, MutableByteArray# s #)
newUnboxed WordAs32
e Int#
n# = \ State# s
s1# -> case Int# -> State# s -> (# State# s, MutableByteArray# s #)
forall d. Int# -> State# d -> (# State# d, MutableByteArray# d #)
newByteArray# (WordAs32 -> Int# -> Int#
forall e. Unboxed e => e -> Int# -> Int#
sizeof# WordAs32
e Int#
n#) State# s
s1# of
(# State# s
s2#, MutableByteArray# s
mbytes# #) -> case MutableByteArray# s -> Int# -> WordAs32 -> State# s -> State# s
forall e s.
Unboxed e =>
MutableByteArray# s -> Int# -> e -> State# s -> State# s
fillByteArray# MutableByteArray# s
mbytes# Int#
n# (WordAs32
0 :: WordAs32) State# s
s2# of
State# s
s3# -> (# State# s
s3#, MutableByteArray# s
mbytes# #)
instance Unboxed WordAs64
where
{-# INLINE sizeof #-}
sizeof :: WordAs64 -> Int -> Int
sizeof WordAs64
_ Int
n = Int -> Int -> Int
forall a. Ord a => a -> a -> a
max Int
0 Int
n Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
8
{-# INLINE (!#) #-}
ByteArray#
bytes# !# :: ByteArray# -> Int# -> WordAs64
!# Int#
i# = Word -> WordAs64
WordAs64 (Word# -> Word
W# (ByteArray# -> Int# -> Word#
indexWord64Array# ByteArray#
bytes# Int#
i#))
{-# INLINE (!>#) #-}
MutableByteArray# s
mbytes# !># :: MutableByteArray# s -> Int# -> State# s -> (# State# s, WordAs64 #)
!># Int#
i# = \ State# s
s1# -> case MutableByteArray# s -> Int# -> State# s -> (# State# s, Word# #)
forall d.
MutableByteArray# d -> Int# -> State# d -> (# State# d, Word# #)
readWord64Array# MutableByteArray# s
mbytes# Int#
i# State# s
s1# of
(# State# s
s2#, Word#
e# #) -> (# State# s
s2#, Word -> WordAs64
WordAs64 (Word# -> Word
W# Word#
e#) #)
writeByteArray# :: MutableByteArray# s -> Int# -> WordAs64 -> State# s -> State# s
writeByteArray# MutableByteArray# s
mbytes# Int#
n# (WordAs64 (W# Word#
e#)) = MutableByteArray# s -> Int# -> Word# -> State# s -> State# s
forall d.
MutableByteArray# d -> Int# -> Word# -> State# d -> State# d
writeWord64Array# MutableByteArray# s
mbytes# Int#
n# Word#
e#
newUnboxed :: WordAs64 -> Int# -> State# s -> (# State# s, MutableByteArray# s #)
newUnboxed WordAs64
e Int#
n# = \ State# s
s1# -> case Int# -> State# s -> (# State# s, MutableByteArray# s #)
forall d. Int# -> State# d -> (# State# d, MutableByteArray# d #)
newByteArray# (WordAs64 -> Int# -> Int#
forall e. Unboxed e => e -> Int# -> Int#
sizeof# WordAs64
e Int#
n#) State# s
s1# of
(# State# s
s2#, MutableByteArray# s
mbytes# #) -> case MutableByteArray# s -> Int# -> WordAs64 -> State# s -> State# s
forall e s.
Unboxed e =>
MutableByteArray# s -> Int# -> e -> State# s -> State# s
fillByteArray# MutableByteArray# s
mbytes# Int#
n# (WordAs64
0 :: WordAs64) State# s
s2# of
State# s
s3# -> (# State# s
s3#, MutableByteArray# s
mbytes# #)
instance Storable WordAs8
where
sizeOf :: WordAs8 -> Int
sizeOf WordAs8
_ = SIZEOF_WORD8
alignment :: WordAs8 -> Int
alignment WordAs8
_ = ALIGNMENT_WORD8
peekElemOff :: Ptr WordAs8 -> Int -> IO WordAs8
peekElemOff (Ptr Addr#
p#) (I# Int#
i#) = (State# RealWorld -> (# State# RealWorld, WordAs8 #)) -> IO WordAs8
forall a. (State# RealWorld -> (# State# RealWorld, a #)) -> IO a
IO ((State# RealWorld -> (# State# RealWorld, WordAs8 #))
-> IO WordAs8)
-> (State# RealWorld -> (# State# RealWorld, WordAs8 #))
-> IO WordAs8
forall a b. (a -> b) -> a -> b
$
\ State# RealWorld
s1# -> case Addr# -> Int# -> State# RealWorld -> (# State# RealWorld, Word# #)
forall d. Addr# -> Int# -> State# d -> (# State# d, Word# #)
readWord8OffAddr# Addr#
p# Int#
i# State# RealWorld
s1# of
(# State# RealWorld
s2#, Word#
x #) -> (# State# RealWorld
s2#, Word -> WordAs8
WordAs8 (Word# -> Word
W# Word#
x) #)
pokeElemOff :: Ptr WordAs8 -> Int -> WordAs8 -> IO ()
pokeElemOff (Ptr Addr#
p#) (I# Int#
i#) (WordAs8 (W# Word#
x)) = (State# RealWorld -> (# State# RealWorld, () #)) -> IO ()
forall a. (State# RealWorld -> (# State# RealWorld, a #)) -> IO a
IO ((State# RealWorld -> (# State# RealWorld, () #)) -> IO ())
-> (State# RealWorld -> (# State# RealWorld, () #)) -> IO ()
forall a b. (a -> b) -> a -> b
$
\ State# RealWorld
s1# -> case Addr# -> Int# -> Word# -> State# RealWorld -> State# RealWorld
forall d. Addr# -> Int# -> Word# -> State# d -> State# d
writeWord8OffAddr# Addr#
p# Int#
i# Word#
x State# RealWorld
s1# of State# RealWorld
s2 -> (# State# RealWorld
s2, () #)
instance Storable WordAs16
where
sizeOf :: WordAs16 -> Int
sizeOf WordAs16
_ = SIZEOF_WORD16
alignment :: WordAs16 -> Int
alignment WordAs16
_ = ALIGNMENT_WORD16
peekElemOff :: Ptr WordAs16 -> Int -> IO WordAs16
peekElemOff (Ptr Addr#
p#) (I# Int#
i#) = (State# RealWorld -> (# State# RealWorld, WordAs16 #))
-> IO WordAs16
forall a. (State# RealWorld -> (# State# RealWorld, a #)) -> IO a
IO ((State# RealWorld -> (# State# RealWorld, WordAs16 #))
-> IO WordAs16)
-> (State# RealWorld -> (# State# RealWorld, WordAs16 #))
-> IO WordAs16
forall a b. (a -> b) -> a -> b
$
\ State# RealWorld
s1# -> case Addr# -> Int# -> State# RealWorld -> (# State# RealWorld, Word# #)
forall d. Addr# -> Int# -> State# d -> (# State# d, Word# #)
readWord16OffAddr# Addr#
p# Int#
i# State# RealWorld
s1# of
(# State# RealWorld
s2, Word#
x #) -> (# State# RealWorld
s2, Word -> WordAs16
WordAs16 (Word# -> Word
W# Word#
x) #)
pokeElemOff :: Ptr WordAs16 -> Int -> WordAs16 -> IO ()
pokeElemOff (Ptr Addr#
p#) (I# Int#
i#) (WordAs16 (W# Word#
x)) = (State# RealWorld -> (# State# RealWorld, () #)) -> IO ()
forall a. (State# RealWorld -> (# State# RealWorld, a #)) -> IO a
IO ((State# RealWorld -> (# State# RealWorld, () #)) -> IO ())
-> (State# RealWorld -> (# State# RealWorld, () #)) -> IO ()
forall a b. (a -> b) -> a -> b
$
\ State# RealWorld
s1# -> case Addr# -> Int# -> Word# -> State# RealWorld -> State# RealWorld
forall d. Addr# -> Int# -> Word# -> State# d -> State# d
writeWord16OffAddr# Addr#
p# Int#
i# Word#
x State# RealWorld
s1# of State# RealWorld
s2 -> (# State# RealWorld
s2, () #)
instance Storable WordAs32
where
sizeOf :: WordAs32 -> Int
sizeOf WordAs32
_ = SIZEOF_WORD32
alignment :: WordAs32 -> Int
alignment WordAs32
_ = ALIGNMENT_WORD32
peekElemOff :: Ptr WordAs32 -> Int -> IO WordAs32
peekElemOff (Ptr Addr#
p#) (I# Int#
i#) = (State# RealWorld -> (# State# RealWorld, WordAs32 #))
-> IO WordAs32
forall a. (State# RealWorld -> (# State# RealWorld, a #)) -> IO a
IO ((State# RealWorld -> (# State# RealWorld, WordAs32 #))
-> IO WordAs32)
-> (State# RealWorld -> (# State# RealWorld, WordAs32 #))
-> IO WordAs32
forall a b. (a -> b) -> a -> b
$
\ State# RealWorld
s1# -> case Addr# -> Int# -> State# RealWorld -> (# State# RealWorld, Word# #)
forall d. Addr# -> Int# -> State# d -> (# State# d, Word# #)
readWord32OffAddr# Addr#
p# Int#
i# State# RealWorld
s1# of
(# State# RealWorld
s2, Word#
x #) -> (# State# RealWorld
s2, Word -> WordAs32
WordAs32 (Word# -> Word
W# Word#
x) #)
pokeElemOff :: Ptr WordAs32 -> Int -> WordAs32 -> IO ()
pokeElemOff (Ptr Addr#
p#) (I# Int#
i#) (WordAs32 (W# Word#
x)) = (State# RealWorld -> (# State# RealWorld, () #)) -> IO ()
forall a. (State# RealWorld -> (# State# RealWorld, a #)) -> IO a
IO ((State# RealWorld -> (# State# RealWorld, () #)) -> IO ())
-> (State# RealWorld -> (# State# RealWorld, () #)) -> IO ()
forall a b. (a -> b) -> a -> b
$
\ State# RealWorld
s1# -> case Addr# -> Int# -> Word# -> State# RealWorld -> State# RealWorld
forall d. Addr# -> Int# -> Word# -> State# d -> State# d
writeWord32OffAddr# Addr#
p# Int#
i# Word#
x State# RealWorld
s1# of State# RealWorld
s2 -> (# State# RealWorld
s2, () #)
instance Storable WordAs64
where
sizeOf :: WordAs64 -> Int
sizeOf WordAs64
_ = SIZEOF_WORD64
alignment :: WordAs64 -> Int
alignment WordAs64
_ = ALIGNMENT_WORD64
peekElemOff :: Ptr WordAs64 -> Int -> IO WordAs64
peekElemOff (Ptr Addr#
p#) (I# Int#
i#) = (State# RealWorld -> (# State# RealWorld, WordAs64 #))
-> IO WordAs64
forall a. (State# RealWorld -> (# State# RealWorld, a #)) -> IO a
IO ((State# RealWorld -> (# State# RealWorld, WordAs64 #))
-> IO WordAs64)
-> (State# RealWorld -> (# State# RealWorld, WordAs64 #))
-> IO WordAs64
forall a b. (a -> b) -> a -> b
$
\ State# RealWorld
s1# -> case Addr# -> Int# -> State# RealWorld -> (# State# RealWorld, Word# #)
forall d. Addr# -> Int# -> State# d -> (# State# d, Word# #)
readWord64OffAddr# Addr#
p# Int#
i# State# RealWorld
s1# of
(# State# RealWorld
s2, Word#
x #) -> (# State# RealWorld
s2, Word -> WordAs64
WordAs64 (Word# -> Word
W# Word#
x) #)
pokeElemOff :: Ptr WordAs64 -> Int -> WordAs64 -> IO ()
pokeElemOff (Ptr Addr#
p#) (I# Int#
i#) (WordAs64 (W# Word#
x)) = (State# RealWorld -> (# State# RealWorld, () #)) -> IO ()
forall a. (State# RealWorld -> (# State# RealWorld, a #)) -> IO a
IO ((State# RealWorld -> (# State# RealWorld, () #)) -> IO ())
-> (State# RealWorld -> (# State# RealWorld, () #)) -> IO ()
forall a b. (a -> b) -> a -> b
$
\ State# RealWorld
s1# -> case Addr# -> Int# -> Word# -> State# RealWorld -> State# RealWorld
forall d. Addr# -> Int# -> Word# -> State# d -> State# d
writeWord64OffAddr# Addr#
p# Int#
i# Word#
x State# RealWorld
s1# of State# RealWorld
s2 -> (# State# RealWorld
s2, () #)