summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
200ca1e)
Inject `showVal` as the `show` member of an instance of `Show LispVal`.
| String String
| Character Char
| Bool Bool
| String String
| Character Char
| Bool Bool
symbol :: Parser Char
symbol = oneOf "!#$%&|*+-/:<=>?@^_~"
symbol :: Parser Char
symbol = oneOf "!#$%&|*+-/:<=>?@^_~"
Left err -> "No match: " ++ show err
Right val -> "Found value: " ++ showVal val
Left err -> "No match: " ++ show err
Right val -> "Found value: " ++ showVal val
+instance Show LispVal where show = showVal
showVal :: LispVal -> String
showVal (Atom atom) = atom
showVal (List list) = "(" ++ unwordsList list ++ ")"
showVal :: LispVal -> String
showVal (Atom atom) = atom
showVal (List list) = "(" ++ unwordsList list ++ ")"