X-Git-Url: https://git.rmz.io/my-scheme.git/blobdiff_plain/f124ec5ddc0b30d092be82eb7b9fd3a9d1f47990..b95d19b43830747d76eab4c01805ef531e897795:/app/Main.hs diff --git a/app/Main.hs b/app/Main.hs index 2740935..a94dc2c 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -2,7 +2,15 @@ module Main where import Text.ParserCombinators.Parsec import System.Environment +symbol :: Parser Char +symbol = oneOf "!#$%&|*+-/:<=>?@^_~" + +readExpr :: String -> String +readExpr input = case parse symbol "lisp" input of + Left err -> "No match: " ++ show err + Right val -> "Found value" + main :: IO () main = do args <- getLine - putStrLn (args) + putStrLn (readExpr args)