Expansion of testing suite to cover incl. library

Expands the testing suite to verify behavior of provided library
functions. Updates the README further for clarification on important
concepts.
This commit is contained in:
James Eversole
2024-12-29 10:28:32 -06:00
parent c30f17367f
commit 60a9e3c1ee
5 changed files with 118 additions and 46 deletions

View File

@ -28,7 +28,7 @@ repl env = runInputT defaultSettings (loop env)
case Map.lookup "__result" newEnv of
Just r -> do
outputStrLn $ "tricu > " ++ show r
outputStrLn $ "DECODE -: " ++ decodeResult r
outputStrLn $ "DECODE -: \"" ++ decodeResult r ++ "\""
Nothing -> return ()
loop newEnv
@ -36,7 +36,7 @@ decodeResult :: T -> String
decodeResult tc = case toNumber tc of
Right num -> show num
Left _ -> case toString tc of
Right str -> "\"" ++ str ++ "\""
Right str -> str
Left _ -> case toList tc of
Right list -> "[" ++ intercalate ", " (map decodeResult list) ++ "]"
Left _ -> ""