How To Install ghc-relude on Fedora 36

In this tutorial we learn how to install ghc-relude in Fedora 36. ghc-relude is An alternative Haskell prelude for productivity and safety

Introduction

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

What is ghc-relude

‘relude’ is an alternative prelude library. If you find the default ‘Prelude’ unsatisfying, despite its advantages, consider using ‘relude’ instead. == Relude goals and design principles * Productivity standard library, and ‘relude’ helps you with writing safer and more efficient code faster. * Total programming bugs and runtime exceptions in pure code. The types of partial functions lie about their behavior. And even if it is not always possible to rely only on total functions, ‘relude’ strives to encourage best-practices and reduce the chances of introducing a bug. * Type-safety one of our guiding principles. If it is possible, we express this concept through the types. Example (NonEmpty a -> f ()) -> f () ’ * Performance functions (e.g. our custom performant ‘sum’ and ‘product’), introduce ‘INLINE’ and ‘SPECIALIZE’ pragmas where appropriate, and make efficient container types (e.g. ‘Map’, ‘HashMap’, ‘Set’) more accessible. * Minimalism (low number of dependencies) ‘relude’ to stick to any specific lens or text formatting or logging library. Where possible, ‘relude’ depends only on boot libraries. * Convenience functions into scope, and make available functions easier to use. * Excellent documentation 1. Tutorial 2. Migration guide from ‘Prelude’ 3. Haddock for every function with examples tested by doctest 4. Documentation regarding internal module structure 5. ‘relude’-specific HLint rules * User-friendliness Only some basic familiarity with the common libraries like ’text’ and ‘containers’ should be enough (but not necessary). * Exploration without introducing breaking changes. ‘relude’ uses the approach with ‘Extra.*’ modules which are not exported by default. The chosen approach makes it quite easy for us to provide new functionality without breaking anything and let the users decide to use it or not.

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

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

sudo dnf -y install ghc-relude

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

sudo yum -y install ghc-relude

How To Uninstall ghc-relude on Fedora 36

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

sudo dnf remove ghc-relude

ghc-relude Package Contents on Fedora 36

/usr/lib/.build-id
/usr/lib/.build-id/c4
/usr/lib/.build-id/c4/63d6664109a73b6a6b8abbafd976abac86f3eb
/usr/lib64/libHSrelude-0.7.0.0-yjmQ8ULj3qKu1kTfacGaN-ghc8.10.5.so
/usr/share/licenses/ghc-relude
/usr/share/licenses/ghc-relude/LICENSE

References

Summary

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