How To Install libghc-bitwise-dev on Debian 12

Learn how to install libghc-bitwise-dev on Debian 12 with this tutorial. libghc-bitwise-dev is fast multi-dimensional unboxed bit packed Bool arrays

Introduction

In this tutorial we learn how to install libghc-bitwise-dev on Debian 12.

What is libghc-bitwise-dev

libghc-bitwise-dev is:

Unboxed multidimensional bit packed Bool arrays with fast aggregate operations based on lifting Bool operations to bitwise operations.

There are many other bit packed structures out there, but none met all of these requirements:

(1) unboxed bit packed Bool array,

(2) multi-dimensional indexing,

(3) fast (de)serialization, or interoperable with foreign code,

(4) fast aggregate operations (fold, map, zip).

Quick tour of the bitwise library:

[Data.Bits.Bitwise] Lift boolean operations on ‘Bool’ to bitwise operations on ‘Data.Bits.Bits’.

[Data.Array.BitArray] Immutable bit arrays.

[Data.Array.BitArray.ST] Mutable bit arrays in ‘Control.Monad.ST.ST’.

[Data.Array.BitArray.IO] Mutable bit arrays in ‘IO’.

[Data.Array.BitArray.ByteString] (De)serialization.

[Codec.Image.PBM] Portable bitmap monochrome 2D image format.

Very rough performance benchmarks:

  • immutable random access single bit reads: @BitArray ix@ is about 40% slower than @UArray ix Bool@,

  • ‘Control.Monad.ST.ST’ mutable random access single bit reads: @STBitArray s ix@ is about the same as @STUArray s ix Bool@,

  • immutable map @Bool -> Bool@: @BitArray ix@ is about 85x faster than @UArray ix Bool@,

  • immutable zipWith @Bool -> Bool -> Bool@: @BitArray ix@ is about 1300x faster than @UArray ix Bool@.

This package provides a library for the Haskell programming language. See http://www.haskell.org/ for more information on Haskell.

There are three methods to install libghc-bitwise-dev on Debian 12. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install libghc-bitwise-dev Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install libghc-bitwise-dev using apt-get by running the following command:

sudo apt-get -y install libghc-bitwise-dev

Install libghc-bitwise-dev Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install libghc-bitwise-dev using apt by running the following command:

sudo apt -y install libghc-bitwise-dev

Install libghc-bitwise-dev Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Debian. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install libghc-bitwise-dev using aptitude by running the following command:

sudo aptitude -y install libghc-bitwise-dev

How To Uninstall libghc-bitwise-dev on Debian 12

To uninstall only the libghc-bitwise-dev package we can use the following command:

sudo apt-get remove libghc-bitwise-dev

Uninstall libghc-bitwise-dev And Its Dependencies

To uninstall libghc-bitwise-dev and its dependencies that are no longer needed by Debian 12, we can use the command below:

sudo apt-get -y autoremove libghc-bitwise-dev

Remove libghc-bitwise-dev Configurations and Data

To remove libghc-bitwise-dev configuration and data from Debian 12 we can use the following command:

sudo apt-get -y purge libghc-bitwise-dev

Remove libghc-bitwise-dev configuration, data, and all of its dependencies

We can use the following command to remove libghc-bitwise-dev configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge libghc-bitwise-dev

Dependencies

libghc-bitwise-dev have the following dependencies:

References

Summary

In this tutorial we learn how to install libghc-bitwise-dev package on Debian 12 using different package management tools: apt, apt-get and aptitude.