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:
@ -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 _ -> ""
|
||||
|
Reference in New Issue
Block a user