Merge content store

This commit is contained in:
2025-05-22 16:13:57 -05:00
parent 3717942589
commit 43e83be9a4
13 changed files with 1000 additions and 217 deletions

View File

@@ -5,6 +5,7 @@ import FileEval
import Parser (parseTricu)
import REPL
import Research
import ContentStore
import Control.Monad (foldM)
import Control.Monad.IO.Class (liftIO)
@@ -65,7 +66,7 @@ main = do
putStrLn "Welcome to the tricu REPL"
putStrLn "You may exit with `CTRL+D` or the `!exit` command."
putStrLn "Try typing `!` with tab completion for more commands."
repl Map.empty
repl
Evaluate { file = filePaths, form = form } -> do
result <- case filePaths of
[] -> runTricuT <$> getContents
@@ -81,8 +82,6 @@ main = do
(filePath:_) -> readFile filePath
putStrLn $ decodeResult $ result $ evalTricu Map.empty $ parseTricu value
-- Simple interfaces
runTricu :: String -> String
runTricu = formatT TreeCalculus . runTricuT
@@ -125,4 +124,4 @@ runTricuEnvWithEnv env input =
let asts = parseTricu input
finalEnv = evalTricu env asts
res = result finalEnv
in (finalEnv, formatT TreeCalculus res)
in (finalEnv, formatT TreeCalculus res)