How To Install ghc-safe on Fedora 36
Introduction
In this tutorial we learn how to install ghc-safe
on Fedora 36.
What is ghc-safe
A library wrapping ‘Prelude’/‘Data.List’ functions that can throw exceptions, such as ‘head’ and ‘!!’. Each unsafe function has up to four variants, e.g. with ’tail’ * ’tail * ’tailMay * ’tailDef * ’tailNote supplements the error message. * ’tailSafe the case of ’tail’. This package is divided into three modules * “Safe” contains safe variants of ‘Prelude’ and ‘Data.List’ functions. * “Safe.Foldable” contains safe variants of ‘Foldable’ functions. * “Safe.Exact” creates crashing versions of functions like ‘zip’ (errors if the lists are not equal) and ’take’ (errors if there are not enough elements), then wraps them to provide safe variants.
We can use yum
or dnf
to install ghc-safe
on Fedora 36. In this tutorial we discuss both methods but you only need to choose one of method to install ghc-safe.
Install ghc-safe 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-safe
using dnf
by running the following command:
sudo dnf -y install ghc-safe
Install ghc-safe 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-safe
using yum
by running the following command:
sudo yum -y install ghc-safe
How To Uninstall ghc-safe on Fedora 36
To uninstall only the ghc-safe
package we can use the following command:
sudo dnf remove ghc-safe
ghc-safe Package Contents on Fedora 36
/usr/lib/.build-id
/usr/lib/.build-id/71
/usr/lib/.build-id/71/799e57d72c16b9d64ef3cc35017fba98496576
/usr/lib64/libHSsafe-0.3.19-DlKvqLTtraZKItu5PR3KBM-ghc8.10.5.so
/usr/share/licenses/ghc-safe
/usr/share/licenses/ghc-safe/LICENSE
References
Summary
In this tutorial we learn how to install ghc-safe
on Fedora 36 using yum and [dnf]((/fedora/36/dnf/).