octane-0.13.3: Parse Rocket League replays.

Safe HaskellNone
LanguageHaskell2010

Octane.Type.Int32

Synopsis

Documentation

newtype Int32 Source #

A 32-bit signed integer.

Constructors

Int32 Int32 

Instances

Eq Int32 Source # 

Methods

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

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

Num Int32 Source # 
Ord Int32 Source # 

Methods

compare :: Int32 -> Int32 -> Ordering #

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

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

(>) :: Int32 -> Int32 -> Bool #

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

max :: Int32 -> Int32 -> Int32 #

min :: Int32 -> Int32 -> Int32 #

Show Int32 Source #

Shown as 1234.

>>> show (1 :: Int32)
"1"

Methods

showsPrec :: Int -> Int32 -> ShowS #

show :: Int32 -> String #

showList :: [Int32] -> ShowS #

Generic Int32 Source # 

Associated Types

type Rep Int32 :: * -> * #

Methods

from :: Int32 -> Rep Int32 x #

to :: Rep Int32 x -> Int32 #

ToJSON Int32 Source #

Encoded as a JSON number directly.

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

Little-endian.

>>> Binary.decode "\x01\x00\x00\x00" :: Int32
1
>>> Binary.encode (1 :: Int32)
"\SOH\NUL\NUL\NUL"

Methods

put :: Int32 -> Put #

get :: Get Int32 #

putList :: [Int32] -> Put #

BinaryBit Int32 Source #

Little-endian with the bits in each byte reversed.

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

Methods

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

getBits :: Int -> BitGet Int32 #

NFData Int32 Source # 

Methods

rnf :: Int32 -> () #

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

fromInt32 :: Integral a => Int32 -> a Source #

Converts a Int32 into any Integral value.

>>> fromInt32 1 :: Int.Int32
1

toInt32 :: Integral a => a -> Int32 Source #

Converts any Integral value into a Int32.

>>> toInt32 (1 :: Int.Int32)
1