Stop using to/of conventions backwards

This commit is contained in:
James Eversole
2024-12-28 07:24:19 -06:00
parent 2e539eb545
commit e376d13a93
5 changed files with 33 additions and 33 deletions

View File

@ -33,10 +33,10 @@ repl env = runInputT defaultSettings (loop env)
loop newEnv
decodeResult :: T -> String
decodeResult tc = case ofNumber tc of
decodeResult tc = case toNumber tc of
Right num -> show num
Left _ -> case ofString tc of
Left _ -> case toString tc of
Right str -> "\"" ++ str ++ "\""
Left _ -> case ofList tc of
Left _ -> case toList tc of
Right list -> "[" ++ intercalate ", " (map decodeResult list) ++ "]"
Left _ -> ""