How To Install ghc-free on Fedora 36

In this tutorial we learn how to install ghc-free in Fedora 36. ghc-free is Monads for free

Introduction

In this tutorial we learn how to install ghc-free on Fedora 36.

What is ghc-free

Free monads are useful for many tree-like structures and domain specific languages. If ‘f’ is a ‘Functor’ then the free ‘Monad’ on ‘f’ is the type of trees whose nodes are labeled with the constructors of ‘f’. The word “free” is used in the sense of “unrestricted” rather than “zero-cost” assumptions beyond those given by ‘f’ and the definition of ‘Monad’. As used here it is a standard term from the mathematical theory of adjoint functors. Cofree comonads are dual to free monads. They provide convenient ways to talk about branching streams and rose-trees, and can be used to annotate syntax trees. The cofree comonad can be seen as a stream parameterized by a ‘Functor’ that controls its branching factor. More information on free monads, including examples, can be found in the following blog posts <http

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

Install ghc-free on Fedora 36 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

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

sudo dnf -y install ghc-free

Install ghc-free on Fedora 36 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

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

sudo yum -y install ghc-free

How To Uninstall ghc-free on Fedora 36

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

sudo dnf remove ghc-free

ghc-free Package Contents on Fedora 36

/usr/lib/.build-id
/usr/lib/.build-id/8f
/usr/lib/.build-id/8f/7c8a94322e48b99d4879140d9202968ffc545c
/usr/lib64/libHSfree-5.1.7-CanjhrJjbH71mS0XjLAgmX-ghc8.10.5.so
/usr/share/licenses/ghc-free
/usr/share/licenses/ghc-free/LICENSE

References

Summary

In this tutorial we learn how to install ghc-free on Fedora 36 using yum and [dnf]((/fedora/36/dnf/).