How To Install ocaml-easy-format on CentOS 7

In this tutorial we learn how to install ocaml-easy-format on CentOS 7. ocaml-easy-format is High-level and functional interface to the Format module

Introduction

In this tutorial we learn how to install ocaml-easy-format on CentOS 7.

What is ocaml-easy-format

This module offers a high-level and functional interface to the Format module of the OCaml standard library. It is a pretty-printing facility, i.e. it takes as input some code represented as a tree and formats this code into the most visually satisfying result, breaking and indenting lines of code where appropriate. Input data must be first modeled and converted into a tree using 3 kinds of nodes atoms lists labeled nodes Atoms represent any text that is guaranteed to be printed as-is. Lists can model any sequence of items such as arrays of data or lists of definitions that are labeled with something like “int main”, “let x =” or “x

We can use yum or dnf to install ocaml-easy-format on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install ocaml-easy-format.

Install ocaml-easy-format on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

After updating yum database, We can install ocaml-easy-format using yum by running the following command:

sudo yum -y install ocaml-easy-format

Install ocaml-easy-format on CentOS 7 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

After updating yum database, We can install ocaml-easy-format using dnf by running the following command:

sudo dnf -y install ocaml-easy-format

How To Uninstall ocaml-easy-format on CentOS 7

To uninstall only the ocaml-easy-format package we can use the following command:

sudo dnf remove ocaml-easy-format

References

Summary

In this tutorial we learn how to install ocaml-easy-format on CentOS 7 using yum and dnf.