Stop using to/of conventions backwards
This commit is contained in:
@ -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 _ -> ""
|
||||
|
Reference in New Issue
Block a user