summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
aeb011a)
This is not necessarily better than the `liftM` method (probably isn't).
_ -> Atom atom
parseNumber :: Parser LispVal
_ -> Atom atom
parseNumber :: Parser LispVal
-parseNumber = liftM (Number . read) $ many1 digit
+parseNumber = do
+ ds <- many1 digit
+ let a = read ds
+ return $ Number a
parseExpr :: Parser LispVal
parseExpr = parseString
parseExpr :: Parser LispVal
parseExpr = parseString