summaryrefslogtreecommitdiff
path: root/lambda-calcul/haskell/src
diff options
context:
space:
mode:
authorArnaud Bailly <arnaud@pankzsoft.com>2025-11-02 21:38:48 +0100
committerArnaud Bailly <arnaud@pankzsoft.com>2025-11-02 21:38:48 +0100
commit6aab2439095f27a8f4c754343f8d8f6674576c2c (patch)
tree47aa9ad5c8c9cc4b0eb71171909c0de76a679b9d /lambda-calcul/haskell/src
parentfc00cff556372e914d3cf15c39700b4ff7c3541c (diff)
downloadlambda-nantes-6aab2439095f27a8f4c754343f8d8f6674576c2c.tar.gz
better rendering for evaluation output
Diffstat (limited to 'lambda-calcul/haskell/src')
-rw-r--r--lambda-calcul/haskell/src/Minilang/REPL/Net.hs9
1 files changed, 8 insertions, 1 deletions
diff --git a/lambda-calcul/haskell/src/Minilang/REPL/Net.hs b/lambda-calcul/haskell/src/Minilang/REPL/Net.hs
index 1bafeaa..43d2560 100644
--- a/lambda-calcul/haskell/src/Minilang/REPL/Net.hs
+++ b/lambda-calcul/haskell/src/Minilang/REPL/Net.hs
@@ -24,6 +24,7 @@ import Data.Text.Encoding (decodeUtf8With)
import Data.Text.Encoding.Error (lenientDecode)
import Minilang.Log
import Minilang.REPL (withInputs)
+import Minilang.REPL.Pure (render)
import Minilang.REPL.Purer (purerREPL)
import Minilang.REPL.Run (runREPL)
import Minilang.REPL.Types
@@ -92,7 +93,13 @@ instance MonadREPL (Net IO) where
output a = do
gets connection >>= lift . wsSend a
- netLog (object ["action" .= ("output" :: Text), "content" .= a])
+ netLog
+ ( object
+ [ "action" .= ("output" :: Text),
+ "content" .= a,
+ "rendered" .= render a
+ ]
+ )
prompt = pure ()
getEnv = gets repl >>= lift . readTVarIO