From 3b0d189d5a778d35484b6f1dbfa8b3dde3e56bbe Mon Sep 17 00:00:00 2001 From: Arthur Jamet <60505370+Arthi-chaud@users.noreply.github.com> Date: Sat, 1 Jul 2023 14:39:15 +0100 Subject: [PATCH] README: Add example + 'how to' section (#43) --- README.md | 41 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 92e399d..73da5fe 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,46 @@ The goal of Seminal is to overcome this weakness. To do so, Delta-debugging is l This implementation of Seminal for Haskell is a Master's Degree Project for the [University of Kent](https://www.kent.ac.uk/). ---- +## Example + +With the following file, + +```haskell +main :: IO () +main = do + putStrLn "Hello World" + return 1 +``` + +`seminal-haskell` would output this: + +``` +Suggestions: + +faulty-code.hs:4:12: +Replace `1` +with `()` +Reason: The expected type of the expression is `()`. + +faulty-code.hs:1:9-13: +Replace `main :: IO ()` +with `main :: IO Int` +Reason: Expected Type `Int`, got `()`. +``` + +## How-to + +### Installation + +To install `seminal-haskell`, you need to install [Stack](https://docs.haskellstack.org/en/stable/#how-to-install-stack). Then, run the following commands: + +``` +git clone https://github.com/Arthi-chaud/seminal-haskell.git +cd seminal-haskell +stack install +``` + +### Usage ``` Usage: seminal-haskell files... [-n|--lines N] [--lazy] [-q|--quiet]