]> git.rmz.io Git - my-scheme.git/blobdiff - app/Main.hs
Add LispVal data type which can hold any Lisp value
[my-scheme.git] / app / Main.hs
index 852089135df8fa8b9ccef54f9699d95bc41d8df2..c64fd18d83b0cdf0575889388df8cfa6344619c8 100644 (file)
@@ -2,6 +2,13 @@ module Main where
 import Text.ParserCombinators.Parsec hiding (spaces)
 import System.Environment
 
+data LispVal = Atom String
+             | List [LispVal]
+             | DottedList [LispVal] LispVal
+             | Number Integer
+             | String String
+             | Bool Bool
+
 symbol :: Parser Char
 symbol = oneOf "!#$%&|*+-/:<=>?@^_~"