From 482152c303387e0a3f117e6d811a1fabb59a8333 Mon Sep 17 00:00:00 2001 From: Dario48 Date: Mon, 2 Mar 2026 22:18:36 +0100 Subject: [PATCH] added :s to the help text and fixed copy-pasting error --- src/bfhs.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/bfhs.hs b/src/bfhs.hs index a205b8b..4a30117 100644 --- a/src/bfhs.hs +++ b/src/bfhs.hs @@ -21,6 +21,7 @@ repl interpreter = do putStrLn " :h = this text" putStrLn " :q = quit" putStrLn " :d = print the state of the array around the index" + putStrLn " :s = print a table of all symbols and their functionality" repl interpreter ":q" -> return () ":d" -> @@ -51,11 +52,11 @@ repl interpreter = do >> putStrLn "|--------+-------------------------------------------------------------------------------------------------------|" >> putStrLn "| . | Output the byte at the data pointer. |" >> putStrLn "|--------+-------------------------------------------------------------------------------------------------------|" - >> putStrLn "| , | Accept one byte of input, storing its value in the byte at the data pointer.[b] |" + >> putStrLn "| , | Accept one byte of input, storing its value in the byte at the data pointer. |" >> putStrLn "|--------+-------------------------------------------------------------------------------------------------------|" >> putStrLn "| [ | If the byte at the data pointer is zero, jump forward to the command after the matching ] command. |" >> putStrLn "|--------+-------------------------------------------------------------------------------------------------------|" - >> putStrLn "| ] | If the byte at the data pointer is nonzero, jump back to the command after the matching [ command.[c] |" + >> putStrLn "| ] | If the byte at the data pointer is nonzero, jump back to the command after the matching [ command. |" >> putStrLn "|--------+-------------------------------------------------------------------------------------------------------|" >> repl interpreter brainfuck -> interpreter `execStr` brainfuck >>= repl