haskus-binary-1.5: Haskus binary format manipulation

Safe HaskellNone
LanguageHaskell2010

Haskus.Number.Int

Contents

Description

Signed primitive integers

Synopsis

Documentation

type family IntAtLeast (n :: Nat) where ... Source #

Return a Int with at least n bits

Equations

IntAtLeast n = If (n <=? 8) Int8 (If (n <=? 16) Int16 (If (n <=? 32) Int32 (Assert (n <=? 64) Int64 (Text "Cannot find Int with size " :<>: ShowType n)))) 

type family IntN (n :: Nat) where ... Source #

Return a Int with exactly n bits

Equations

IntN 8 = Int8 
IntN 16 = Int16 
IntN 32 = Int32 
IntN 64 = Int64 
IntN n = TypeError (Text "Cannot find Int with size " :<>: ShowType n) 

Unlifted

module GHC.Int

data Int# :: TYPE IntRep #

(+#) :: Int# -> Int# -> Int# infixl 6 #

(-#) :: Int# -> Int# -> Int# infixl 6 #

(==#) :: Int# -> Int# -> Int# infix 4 #

(>#) :: Int# -> Int# -> Int# infix 4 #

(<#) :: Int# -> Int# -> Int# infix 4 #

(>=#) :: Int# -> Int# -> Int# infix 4 #

(<=#) :: Int# -> Int# -> Int# infix 4 #

isTrue# :: Int# -> Bool #

Alias for tagToEnum#. Returns True if its parameter is 1# and False if it is 0#.