> For the complete documentation index, see [llms.txt](https://glados.guillaume-hein.fr/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://glados.guillaume-hein.fr/introduction/installation.md).

# Installation

### Installation Guide

#### Prerequisites

Ensure that you have the following prerequisites installed on your system:

* **Haskell**: GoMelan is developed in Haskell. Install Haskell from [haskell.org](https://www.haskell.org/).
* **Git**: Git is required for cloning the GoMelan repository. Install Git from [git-scm.com](https://git-scm.com/).
* **Make**: Make command is required to compile the project. Install Make from <https://www.gnu.org/software/make/>.

#### Step 1: Clone the GoMelan Repository

Open your terminal and run the following command to clone the GoMelan repository:

```bash
git clone https://github.com/Thyodas/GoMelan.git
cd GoMelan 
```

**Step 2: Build GoMelan with Make**

Build the GoMelan project using your preferred build system. For example, using Stack:

```bash
make
```

**Step 3: You can now run GoMelan!**

Run the GLaDOS interpreter/compiler:

```sql
> ./glados --help
```

```
gomelan version 1.0.0, (C) 2023 GIACOMEL Marie - HEIN Guillaume - HOURTOULLE
Tristan - PARENTEAU Thomas - ROSSIGNON Lucas

gomelan [COMMAND] ... [OPTIONS]
  Gomelan program able to parse and execute Gomelan programmation language

Common flags:
  -h --help             Display help message
     --version          Print version information
     --numeric-version  Print just the version number
  -v --verbose          Loud verbosity
  -q --quiet            Quiet verbosity

gomelan build [OPTIONS] FILE
  Build Gomelan

  -o --out=FILE         Output file

gomelan run [OPTIONS] FILE
  Run Gomelan

gomelan interactive [OPTIONS] [FILE]
  Run Gomelan in interactive mode.
```

1. Compile a GoMelan script into a binary

   ```bash
   ./glados build YOUR_FILE
   ```
2. Then execute the binary

   ```bash
   ./glados run out.gomc
   ```

You also can run some unit tests by using the following command

1. Run the tests

   ```bash
   make tests_run
   ```

### Compatible Systems

GoMelan was tested on linux and MacOS. The import system in GoMelan might not work on Windows.
