From 5ccddd3af321b5771f936690a78a62cd60219d4b Mon Sep 17 00:00:00 2001 From: Danila Danko Date: Wed, 14 Feb 2024 15:27:48 +0300 Subject: [PATCH] refactor: readme structure, commands --- README.md | 93 ++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 62 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index 21420c2da..67bab4d5f 100644 --- a/README.md +++ b/README.md @@ -14,41 +14,49 @@ Contrary to traditional normalization in λ-calculus, we aim at rewriting rules help reduce certain metrics of expressions. In particular, we are interested in reducing attribute access (`t.a`) that amounts to _dynamic dispatch_. -## Usage +## Install -Clone this repo. +You can install the `normalizer-phi` executable globally via [stack](https://docs.haskellstack.org/en/stable). +Then, the `normalize-phi` executable will be available on `PATH`. + +### Install from the repository ```sh -git clone https://github.com/objectionary/normalizer.git +git clone https://github.com/objectionary/normalizer cd normalizer +export LANG=C.UTF-8 +stack install normalize-phi +normalize-phi --help ``` -### Install - -You can install the `normalizer-phi` executable globally via [stack](https://docs.haskellstack.org/en/stable/README/). -Then, the `normalize-phi` executable will be available on `PATH` and in `~/.local/bin/` on `Linux` and `macOS`. +### Install from Hackage ```sh -stack install -normalize-phi --help +stack update +export LANG=C.UTF-8 +stack install --resolver lts-22.11 eo-phi-normalizer-0.1.0 ``` -Alternatively, run the executable via `stack` without global installation (see the following sections). +### Uninstall -### CLI +Learn where `stack` installs programs. -The `eo-phi-normalizer` package provides an executable `normalize-phi` that has a CLI. +```sh +stack path --programs +``` -Run the executable via `stack run`. +Learn how to uninstall a program. ```sh -stack run normalize-phi -- --help +stack uninstall ``` -Or +## Use + +Learn about `normalize-phi` options. ```sh -stack run -- --help +normalize-phi --help ``` ```console @@ -64,12 +72,13 @@ Available options: -o,--output STRING Output file path (defaults to stdout) ``` -#### expression +### Sample program -Save an expression into a file `test.phi` that will be used in subsequent commands. +Save a $\varphi$-calculus program to a file. +This program will be used in subsequent commands. ```sh -cat > test.phi < program.phi < test.phi <