From 33c2119708d374c6fab9de446a0cf0c8c449a921 Mon Sep 17 00:00:00 2001 From: James Eversole Date: Mon, 27 Jan 2025 16:28:40 -0600 Subject: [PATCH] Don't require available library to run REPL or decoder --- README.md | 2 +- src/Main.hs | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 33bfdc5..adfef14 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ tricu > 12 [Releases are available for Linux.](https://git.eversole.co/James/tricu/releases) -Or you can easily build and/or run this project using [Nix](https://nixos.org/download/). +Or you can easily build and run this project using [Nix](https://nixos.org/download/). - Quick Start (REPL): - `nix run git+https://git.eversole.co/James/tricu` diff --git a/src/Main.hs b/src/Main.hs index a7b4a66..49c2f9f 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -60,8 +60,7 @@ main = do Repl -> do putStrLn "Welcome to the tricu REPL" putStrLn "You can exit with `CTRL+D` or the `:_exit` command.`" - library <- liftIO $ evaluateFile "./lib/base.tri" - repl $ Map.delete "!result" library + repl Map.empty Evaluate { file = filePaths, form = form } -> do result <- case filePaths of [] -> do @@ -77,8 +76,7 @@ main = do value <- case filePaths of [] -> getContents (filePath:_) -> readFile filePath - library <- liftIO $ evaluateFile "./lib/base.tri" - putStrLn $ decodeResult $ result $ evalTricu library $ parseTricu value + putStrLn $ decodeResult $ result $ evalTricu Map.empty $ parseTricu value runTricu :: String -> T runTricu input =