How To Install alex on Fedora 34

alex is Tool for generating lexical analysers in Haskell

Introduction

In this tutorial we learn how to install alex on Fedora 34.

What is alex

Alex is a tool for generating lexical analysers in Haskell. It takes a description of tokens based on regular expressions and generates a Haskell module containing code for scanning text efficiently. It is similar to the tool lex or flex for C/C++.

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

Install alex on Fedora 34 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

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

sudo dnf -y install alex

Install alex on Fedora 34 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install alex using yum by running the following command:

sudo yum -y install alex

How To Uninstall alex on Fedora 34

To uninstall only the alex package we can use the following command:

sudo dnf remove alex

alex Package Contents on Fedora 34

/usr/bin/alex
/usr/lib/.build-id
/usr/lib/.build-id/61
/usr/lib/.build-id/61/c63460d30ca34614abfc7ba843a03e9a251770
/usr/share/alex-3.2.5
/usr/share/alex-3.2.5/AlexTemplate
/usr/share/alex-3.2.5/AlexTemplate-debug
/usr/share/alex-3.2.5/AlexTemplate-ghc
/usr/share/alex-3.2.5/AlexTemplate-ghc-debug
/usr/share/alex-3.2.5/AlexTemplate-ghc-nopred
/usr/share/alex-3.2.5/AlexWrapper-basic
/usr/share/alex-3.2.5/AlexWrapper-basic-bytestring
/usr/share/alex-3.2.5/AlexWrapper-gscan
/usr/share/alex-3.2.5/AlexWrapper-monad
/usr/share/alex-3.2.5/AlexWrapper-monad-bytestring
/usr/share/alex-3.2.5/AlexWrapper-monadUserState
/usr/share/alex-3.2.5/AlexWrapper-monadUserState-bytestring
/usr/share/alex-3.2.5/AlexWrapper-posn
/usr/share/alex-3.2.5/AlexWrapper-posn-bytestring
/usr/share/alex-3.2.5/AlexWrapper-strict-bytestring
/usr/share/doc/alex
/usr/share/doc/alex/CHANGELOG.md
/usr/share/doc/alex/README.md
/usr/share/doc/alex/TODO
/usr/share/doc/alex/alex
/usr/share/doc/alex/alex/about.html
/usr/share/doc/alex/alex/alex-files.html
/usr/share/doc/alex/alex/api.html
/usr/share/doc/alex/alex/basic-api.html
/usr/share/doc/alex/alex/bug-reports.html
/usr/share/doc/alex/alex/charsets.html
/usr/share/doc/alex/alex/fptools.css
/usr/share/doc/alex/alex/index.html
/usr/share/doc/alex/alex/introduction.html
/usr/share/doc/alex/alex/invoking.html
/usr/share/doc/alex/alex/license.html
/usr/share/doc/alex/alex/regexps.html
/usr/share/doc/alex/alex/relnotes-20.html
/usr/share/doc/alex/alex/relnotes-210.html
/usr/share/doc/alex/alex/relnotes-22.html
/usr/share/doc/alex/alex/syntax.html
/usr/share/doc/alex/alex/types.html
/usr/share/doc/alex/alex/wrappers.html
/usr/share/doc/alex/examples
/usr/share/doc/alex/examples/Makefile
/usr/share/doc/alex/examples/Tokens.x
/usr/share/doc/alex/examples/Tokens_gscan.x
/usr/share/doc/alex/examples/Tokens_posn.x
/usr/share/doc/alex/examples/examples.x
/usr/share/doc/alex/examples/haskell.x
/usr/share/doc/alex/examples/lit.x
/usr/share/doc/alex/examples/pp.x
/usr/share/doc/alex/examples/state.x
/usr/share/doc/alex/examples/tiny.y
/usr/share/doc/alex/examples/words.x
/usr/share/doc/alex/examples/words_monad.x
/usr/share/doc/alex/examples/words_posn.x
/usr/share/licenses/alex
/usr/share/licenses/alex/LICENSE
/usr/share/man/man1/alex.1.gz

References

Summary

In this tutorial we learn how to install alex on Fedora 34 using yum and dnf.