How To Install libghc-psqueues-prof on Kali Linux

In this tutorial we learn how to install libghc-psqueues-prof on Kali Linux. libghc-psqueues-prof is Pure priority search queues; profiling libraries

Introduction

In this tutorial we learn how to install libghc-psqueues-prof on Kali Linux.

What is libghc-psqueues-prof

libghc-psqueues-prof is:

This package provides Priority Search Queues in three different flavors.

  • OrdPSQ k p v, which uses the Ord k instance to provide fast insertion, deletion and lookup. This implementation is based on Ralf Hinze’s “A Simple Implementation Technique for Priority Search Queues”. Hence, it is similar to the PSQueue library, although it is considerably faster and provides a slightly different API.

  • IntPSQ p v is a far more efficient implementation. It fixes the key type to Int and uses a radix tree (like IntMap) with an additional min-heap property.

  • HashPSQ k p v is a fairly straightforward extension of IntPSQ: it simply uses the keys’ hashes as indices in the IntPSQ. If there are any hash collisions, it uses an OrdPSQ to resolve those. The performance of this implementation is comparable to that of IntPSQ, but it is more widely applicable since the keys are not restricted to Int, but rather to any Hashable datatype.

Each of the three implementations provides the same API, so they can be used interchangeably.

Typical applications of Priority Search Queues include:

  • Caches, and more specifically LRU Caches;

  • Schedulers;

  • Pathfinding algorithms, such as Dijkstra’s and A*.

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

There are three methods to install libghc-psqueues-prof on Kali Linux. 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-psqueues-prof 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-psqueues-prof using apt-get by running the following command:

sudo apt-get -y install libghc-psqueues-prof

Install libghc-psqueues-prof Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install libghc-psqueues-prof

Install libghc-psqueues-prof Using aptitude

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

sudo aptitude update

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

sudo aptitude -y install libghc-psqueues-prof

How To Uninstall libghc-psqueues-prof on Kali Linux

To uninstall only the libghc-psqueues-prof package we can use the following command:

sudo apt-get remove libghc-psqueues-prof

Uninstall libghc-psqueues-prof And Its Dependencies

To uninstall libghc-psqueues-prof and its dependencies that are no longer needed by Kali Linux, we can use the command below:

sudo apt-get -y autoremove libghc-psqueues-prof

Remove libghc-psqueues-prof Configurations and Data

To remove libghc-psqueues-prof configuration and data from Kali Linux we can use the following command:

sudo apt-get -y purge libghc-psqueues-prof

Remove libghc-psqueues-prof configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge libghc-psqueues-prof

Dependencies

libghc-psqueues-prof have the following dependencies:

References

Summary

In this tutorial we learn how to install libghc-psqueues-prof package on Kali Linux using different package management tools: apt, apt-get and aptitude.