How To Install ghc-transformers on CentOS 7

In this tutorial we learn how to install ghc-transformers on CentOS 7. ghc-transformers is Concrete functor and monad transformers

Introduction

In this tutorial we learn how to install ghc-transformers on CentOS 7.

What is ghc-transformers

A portable library of functor and monad transformers, inspired by the paper “Functional Programming with Overloading and Higher-Order Polymorphism”, by Mark P Jones, in “Advanced School of Functional Programming”, 1995 (<http This package contains * the monad transformer class (in “Control.Monad.Trans.Class”) * concrete functor and monad transformers, each with associated operations and functions to lift operations associated with other transformers. It can be used on its own in portable Haskell code, or with the monad classes in the ‘mtl’ or ‘monads-tf’ packages, which automatically lift operations introduced by monad transformers through other transformers.

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

Install ghc-transformers 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-transformers using yum by running the following command:

sudo yum -y install ghc-transformers

Install ghc-transformers 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-transformers using dnf by running the following command:

sudo dnf -y install ghc-transformers

How To Uninstall ghc-transformers on CentOS 7

To uninstall only the ghc-transformers package we can use the following command:

sudo dnf remove ghc-transformers

References

Summary

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