octane-0.13.3: Parse Rocket League replays.

Safe HaskellNone
LanguageHaskell2010

Octane.Type.Word64

Synopsis

Documentation

newtype Word64 Source #

A 64-bit unsigned integer.

Constructors

Word64 Word64 

Instances

Eq Word64 Source # 

Methods

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

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

Num Word64 Source # 
Ord Word64 Source # 
Show Word64 Source #

Shown as 0x0102030405060708.

>>> show (1 :: Word64)
"0x0000000000000001"
Generic Word64 Source # 

Associated Types

type Rep Word64 :: * -> * #

Methods

from :: Word64 -> Rep Word64 x #

to :: Rep Word64 x -> Word64 #

ToJSON Word64 Source #

Encoded as a JSON number.

>>> Aeson.encode (1 :: Word64)
"1"
Binary Word64 Source #

Little-endian.

>>> Binary.decode "\x01\x00\x00\x00\x00\x00\x00\x00" :: Word64
0x0000000000000001
>>> Binary.encode (1 :: Word64)
"\SOH\NUL\NUL\NUL\NUL\NUL\NUL\NUL"

Methods

put :: Word64 -> Put #

get :: Get Word64 #

putList :: [Word64] -> Put #

BinaryBit Word64 Source #

Little-endian with the bits in each byte reversed.

>>> Binary.runGet (BinaryBit.runBitGet (BinaryBit.getBits 0)) "\x80\x00\x00\x00\x00\x00\x00\x00" :: Word64
0x0000000000000001
>>> Binary.runPut (BinaryBit.runBitPut (BinaryBit.putBits 0 (1 :: Word64)))
"\128\NUL\NUL\NUL\NUL\NUL\NUL\NUL"

Methods

putBits :: Int -> Word64 -> BitPut () #

getBits :: Int -> BitGet Word64 #

NFData Word64 Source # 

Methods

rnf :: Word64 -> () #

type Rep Word64 Source # 
type Rep Word64 = D1 (MetaData "Word64" "Octane.Type.Word64" "octane-0.13.3-GnboydEgdVpJh0hfzYOLZA" True) (C1 (MetaCons "Word64" PrefixI True) (S1 (MetaSel (Just Symbol "unpack") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Word64)))

fromWord64 :: Integral a => Word64 -> a Source #

Converts a Word64 into any Integral value.

>>> fromWord64 0x0000000000000001 :: Word.Word64
1
>>> fromWord64 0xffffffffffffffff :: Data.Int.Int64
-1

toWord64 :: Integral a => a -> Word64 Source #

Converts any Integral value into a Word64.

>>> toWord64 (1 :: Word.Word64)
0x0000000000000001
>>> toWord64 (-1 :: Data.Int.Int64)
0xffffffffffffffff