How To Install hdevtools on Ubuntu 20.04

Hostnbit
In this tutorial we learn how to install hdevtools on Ubuntu 20.04. hdevtools is GHC powered daemon for fast Haskell development

Advertisements

Introduction

In this tutorial we learn how to install hdevtools on Ubuntu 20.04.

What is hdevtools

hdevtools is:

hdevtools is a backend for text editor plugins, to allow for things such as
syntax and type checking of Haskell code, and retrieving type information, all
directly from within your text editor.

The advantage that hdevtools has over ghc-mod is that it runs silently
in a persistent background process, and therefore is able to keeps all of your
Haskell modules and dependent libraries loaded in memory. This way, when you
change only a single source file, only it needs to be reloaded and rechecked,
instead of having to reload everything.

This makes hdevtools very fast for checking syntax and type errors (runs
just as fast as the “:reload” command in GHCi).

In fact, syntax and type checking is so fast, that you can safely enable auto
checking on every save. Even for huge projects, checking is nearly instant.

In addition to checking Haskell source code for errors, hdevtools has tools
for getting info about identifiers, and getting type information for snippets
of code.

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

Advertisements

Install hdevtools Using apt-get

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

sudo apt-get update

After updating apt database, We can install hdevtools using apt-get by running the following command:

sudo apt-get -y install hdevtools

Install hdevtools Using apt

Update apt database with apt using the following command.

Advertisements

sudo apt update

After updating apt database, We can install hdevtools using apt by running the following command:

sudo apt -y install hdevtools

Install hdevtools 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 hdevtools using aptitude by running the following command:

sudo aptitude -y install hdevtools

How To Uninstall hdevtools on Ubuntu 20.04

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

sudo apt-get remove hdevtools

Uninstall hdevtools And Its Dependencies

To uninstall hdevtools and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:

sudo apt-get -y autoremove hdevtools

Remove hdevtools Configurations and Data

To remove hdevtools configuration and data from Ubuntu 20.04 we can use the following command:

sudo apt-get -y purge hdevtools

Remove hdevtools configuration, data, and all of its dependencies

We can use the following command to remove hdevtools configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge hdevtools

References

Summary

In this tutorial we learn how to install hdevtools package on Ubuntu 20.04 using different package management tools: apt, apt-get and aptitude.

Hostnbit

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Menu Title
Scroll to Top