How To Install ghc-async on CentOS 7

In this tutorial we learn how to install ghc-async on CentOS 7. ghc-async is Asynchronous IO operations

Introduction

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

What is ghc-async

This package provides a higher-level interface over threads, in which an “Async a” is a concurrent thread that will eventually deliver a value of type “a”. The package provides ways to create “Async” computations, wait for their results, and cancel them. Using Async is safer than using threads in two ways * When waiting for a thread to return a result, if the thread dies with an exception then the caller must either re-throw the exception (‘wait’) or handle it (‘waitCatch’); the exception cannot be ignored. * The API makes it possible to build a tree of threads that are automatically killed when their parent dies (see ‘withAsync’).

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

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

sudo yum -y install ghc-async

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

sudo dnf -y install ghc-async

How To Uninstall ghc-async on CentOS 7

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

sudo dnf remove ghc-async

References

Summary

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