How To Install ghc-ansi-wl-pprint on CentOS 7

In this tutorial we learn how to install ghc-ansi-wl-pprint on CentOS 7. ghc-ansi-wl-pprint is The Wadler/Leijen Pretty Printer for colored ANSI terminal output

Introduction

In this tutorial we learn how to install ghc-ansi-wl-pprint on CentOS 7.

What is ghc-ansi-wl-pprint

This is a pretty printing library based on Wadler’s paper “A Prettier Printer”. It has been enhanced with support for ANSI terminal colored output using the ansi-terminal package.

We can use yum or dnf to install ghc-ansi-wl-pprint on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install ghc-ansi-wl-pprint.

Install ghc-ansi-wl-pprint on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

After updating yum database, We can install ghc-ansi-wl-pprint using yum by running the following command:

sudo yum -y install ghc-ansi-wl-pprint

Install ghc-ansi-wl-pprint on CentOS 7 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

After updating yum database, We can install ghc-ansi-wl-pprint using dnf by running the following command:

sudo dnf -y install ghc-ansi-wl-pprint

How To Uninstall ghc-ansi-wl-pprint on CentOS 7

To uninstall only the ghc-ansi-wl-pprint package we can use the following command:

sudo dnf remove ghc-ansi-wl-pprint

References

Summary

In this tutorial we learn how to install ghc-ansi-wl-pprint on CentOS 7 using yum and dnf.