X-Git-Url: https://git.rmz.io/my-scheme.git/blobdiff_plain/10ec228b216032b4d61216414aef8b1e36cf151f..d06e8ae01efc00ea0eb6f0bed346032b004aca57:/app/Main.hs diff --git a/app/Main.hs b/app/Main.hs index 22de748..7c987ce 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -22,6 +22,12 @@ parseString = do char '"' return $ String x +parseAtom :: Parser LispVal +parseAtom = do + a <- letter <|> symbol + b <- many (letter <|> digit <|> symbol) + return $ Atom (a:b) + readExpr :: String -> String readExpr input = case parse (spaces >> symbol) "lisp" input of Left err -> "No match: " ++ show err