From 6aab2439095f27a8f4c754343f8d8f6674576c2c Mon Sep 17 00:00:00 2001 From: Arnaud Bailly Date: Sun, 2 Nov 2025 21:38:48 +0100 Subject: better rendering for evaluation output --- lambda-calcul/haskell/src/Minilang/REPL/Net.hs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'lambda-calcul/haskell/src/Minilang') 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 -- cgit v1.3.1