How To Install ghc-STMonadTrans on CentOS 7

In this tutorial we learn how to install ghc-STMonadTrans on CentOS 7. ghc-STMonadTrans is A monad transformer version of the ST monad

Introduction

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

What is ghc-STMonadTrans

A monad transformer version of the ST monad. This monad transformer should not be used with monads that can contain multiple answers, like the list monad. The reason being that it will be duplicated across the different answers and this causes Bad Things to happen (such as loss of referential transparency). Safe monads include the monads State, Reader, Writer, Maybe and combinations of their corresponding monad transformers.

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

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

sudo yum -y install ghc-STMonadTrans

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

sudo dnf -y install ghc-STMonadTrans

How To Uninstall ghc-STMonadTrans on CentOS 7

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

sudo dnf remove ghc-STMonadTrans

References

Summary

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