How To Install libghc-monad-control-doc on Ubuntu 18.04

In this tutorial we learn how to install libghc-monad-control-doc on Ubuntu 18.04. libghc-monad-control-doc is Monad transformers to lift control operations; documentation

Introduction

In this tutorial we learn how to install libghc-monad-control-doc on Ubuntu 18.04.

What is libghc-monad-control-doc

libghc-monad-control-doc is:

It defines the type class MonadControlIO, a subset of MonadIO into which generic control operations such as catch can be lifted from IO. Instances are based on monad transformers in MonadTransControl, which includes all standard monad transformers in the transformers library except ContT. For convenience, it provides a wrapped version of Control.Exception with types generalized from IO to all monads in MonadControlIO.

Note that this package is a rewrite of Anders Kaseorg’s monad-peel library. The main difference is that this package provides CPS style operators and exploits the RankNTypes language extension to simplify most definitions.

The package includes a copy of the monad-peel testsuite written by Anders Kaseorg. The tests can be performed by using cabal test.

The following critertion based benchmark shows that monad-control is on average about 2.5 times faster than monad-peel:

http://code.haskell.org/~basvandijk/code/bench-monad-peel-control

This package provides the documentation for a library for the Haskell programming language. See http://www.haskell.org/ for more information on Haskell.

There are three methods to install libghc-monad-control-doc on Ubuntu 18.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install libghc-monad-control-doc Using apt-get

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

sudo apt-get update

After updating apt database, We can install libghc-monad-control-doc using apt-get by running the following command:

sudo apt-get -y install libghc-monad-control-doc

Install libghc-monad-control-doc Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install libghc-monad-control-doc using apt by running the following command:

sudo apt -y install libghc-monad-control-doc

Install libghc-monad-control-doc 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 Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install libghc-monad-control-doc using aptitude by running the following command:

sudo aptitude -y install libghc-monad-control-doc

How To Uninstall libghc-monad-control-doc on Ubuntu 18.04

To uninstall only the libghc-monad-control-doc package we can use the following command:

sudo apt-get remove libghc-monad-control-doc

Uninstall libghc-monad-control-doc And Its Dependencies

To uninstall libghc-monad-control-doc and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove libghc-monad-control-doc

Remove libghc-monad-control-doc Configurations and Data

To remove libghc-monad-control-doc configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge libghc-monad-control-doc

Remove libghc-monad-control-doc configuration, data, and all of its dependencies

We can use the following command to remove libghc-monad-control-doc configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge libghc-monad-control-doc

References

Summary

In this tutorial we learn how to install libghc-monad-control-doc package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.