Idris2Doc : Data.Bits

Data.Bits

Reexports

importpublic Data.Fin

Definitions

interfaceBits : Type->Type
  The `Bits` interface defines bitwise operations over integral types.

Parameters: a
Methods:
0Index : Type
(.&.) : a->a->a
  Bitwise "and"

Fixity Declaration: infixl operator, level 7
(.|.) : a->a->a
  Bitwise "or"

Fixity Declaration: infixl operator, level 5
xor : a->a->a
  Bitwise "xor".

Fixity Declaration: infixl operator, level 6
shiftL : a->Index->a
  Shift the argument left by the specified number of bits.

Fixity Declaration: infixl operator, level 8
shiftR : a->Index->a
  Shift the argument right by the specified number of bits.

Fixity Declaration: infixl operator, level 8
bit : Index->a
  Sets the `i`-th bit.
zeroBits : a
  The value with all bits unset.
complement : a->a
  Returns the bitwise complement of a value.
oneBits : a
  The value with all bits set..
complementBit : a->Index->a
  `complementBit x i` is the same as `xor x (bit i)`.
clearBit : a->Index->a
  `clearBit x i` is the same as `x .&. complement (bit i)`
testBit : a->Index->Bool
  Tests, whether the i-th bit is set in the given value.
setBit : a->Index->a
  Sets the i-th bit of a value.

Implementations:
Bitsa=>Bits (Identitya)
BitsBits8
BitsBits16
BitsBits32
BitsBits64
BitsInt
BitsInt8
BitsInt16
BitsInt32
BitsInt64
BitsInteger
Bitsa=>Bits (Constab)
0Index : Bitsa=>Type
Totality: total
Visibility: public export
(.&.) : Bitsa=>a->a->a
  Bitwise "and"

Totality: total
Visibility: public export
Fixity Declaration: infixl operator, level 7
(.|.) : Bitsa=>a->a->a
  Bitwise "or"

Totality: total
Visibility: public export
Fixity Declaration: infixl operator, level 5
xor : Bitsa=>a->a->a
  Bitwise "xor".

Totality: total
Visibility: public export
Fixity Declaration: infixl operator, level 6
shiftL : {auto__con : Bitsa} ->a->Index->a
  Shift the argument left by the specified number of bits.

Totality: total
Visibility: public export
Fixity Declaration: infixl operator, level 8
shiftR : {auto__con : Bitsa} ->a->Index->a
  Shift the argument right by the specified number of bits.

Totality: total
Visibility: public export
Fixity Declaration: infixl operator, level 8
bit : {auto__con : Bitsa} ->Index->a
  Sets the `i`-th bit.

Totality: total
Visibility: public export
zeroBits : Bitsa=>a
  The value with all bits unset.

Totality: total
Visibility: public export
complement : Bitsa=>a->a
  Returns the bitwise complement of a value.

Totality: total
Visibility: public export
oneBits : Bitsa=>a
  The value with all bits set..

Totality: total
Visibility: public export
complementBit : {auto__con : Bitsa} ->a->Index->a
  `complementBit x i` is the same as `xor x (bit i)`.

Totality: total
Visibility: public export
clearBit : {auto__con : Bitsa} ->a->Index->a
  `clearBit x i` is the same as `x .&. complement (bit i)`

Totality: total
Visibility: public export
testBit : {auto__con : Bitsa} ->a->Index->Bool
  Tests, whether the i-th bit is set in the given value.

Totality: total
Visibility: public export
setBit : {auto__con : Bitsa} ->a->Index->a
  Sets the i-th bit of a value.

Totality: total
Visibility: public export
interfaceFiniteBits : Type->Type
Parameters: a
Constraints: Bits a
Methods:
bitSize : Nat
  Return the number of bits in values of type `t`.
bitsToIndex : FinbitSize->Index
  Properly correlates `bitSize` and `Index`.
popCount : a->Nat
  Return the number of set bits in the argument.  This number is
known as the population count or the Hamming weight.
rotR : a->FinbitSize->a
  Rotate the argument right by the specified number of bits.
rotL : a->FinbitSize->a
  Rotate the argument left by the specified number of bits.

Implementations:
FiniteBitsBits8
FiniteBitsBits16
FiniteBitsBits32
FiniteBitsBits64
FiniteBitsInt
FiniteBitsInt8
FiniteBitsInt16
FiniteBitsInt32
FiniteBitsInt64
bitSize : FiniteBitsa=>Nat
  Return the number of bits in values of type `t`.

Totality: total
Visibility: public export
bitsToIndex : {auto__con : FiniteBitsa} ->FinbitSize->Index
  Properly correlates `bitSize` and `Index`.

Totality: total
Visibility: public export
popCount : FiniteBitsa=>a->Nat
  Return the number of set bits in the argument.  This number is
known as the population count or the Hamming weight.

Totality: total
Visibility: public export
rotR : {auto__con : FiniteBitsa} ->a->FinbitSize->a
  Rotate the argument right by the specified number of bits.

Totality: total
Visibility: public export
rotL : {auto__con : FiniteBitsa} ->a->FinbitSize->a
  Rotate the argument left by the specified number of bits.

Totality: total
Visibility: public export
asBitVector : {auto{conArg:6938} : FiniteBitsa} ->a->VectbitSizeBool
Totality: total
Visibility: public export
asString : FiniteBitsa=>a->String
Totality: total
Visibility: public export