How To Install cpphs on Debian 12

Learn how to install cpphs on Debian 12 with this tutorial. cpphs is Simplified cpp-a-like preprocessor for Haskell

Introduction

In this tutorial we learn how to install cpphs on Debian 12.

What is cpphs

cpphs is:

The C pre-processor has been widely used in Haskell source code. It enables conditional compilation for different compilers, different versions of the same compiler, and different OS platforms. It is also occasionally used for its macro language, which can enable certain forms of platform-specific detail-filling, such as the tedious boilerplate generation of instance definitions and FFI declarations.

However, gcc’s cpp has recently been evolving to more strictly adhere to the C standard. This has had the effect of making it increasingly incompatible with Haskell’s syntax. This is a cpp-a-like designed with Haskell’s syntax in mind.

There are three methods to install cpphs 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 cpphs Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install cpphs

Install cpphs Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install cpphs using apt by running the following command:

sudo apt -y install cpphs

Install cpphs 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 cpphs using aptitude by running the following command:

sudo aptitude -y install cpphs

How To Uninstall cpphs on Debian 12

To uninstall only the cpphs package we can use the following command:

sudo apt-get remove cpphs

Uninstall cpphs And Its Dependencies

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

sudo apt-get -y autoremove cpphs

Remove cpphs Configurations and Data

To remove cpphs configuration and data from Debian 12 we can use the following command:

sudo apt-get -y purge cpphs

Remove cpphs configuration, data, and all of its dependencies

We can use the following command to remove cpphs configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge cpphs

Dependencies

cpphs have the following dependencies:

References

Summary

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