forked from fernandocastor/skimscheme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
LispVal.hs
32 lines (22 loc) · 894 Bytes
/
LispVal.hs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
module LispVal (LispVal(Atom, List, DottedList, Number, String, Bool, Error, Native, NativeComp)) where
-----------------------------------------------------------
-- BASIC DATATYPES --
-----------------------------------------------------------
{-
In Lisp, the data types representing code structures are the same as the
data types representing values. This somewhat simplifies the
construction of an interpreter. For other languages, one would use
different datatypes to represent structures that appear in the code
(statements, expressions, declarations, etc.) and the data that their
evaluation produces.
-}
--Teste
data LispVal = Atom String
| List [ LispVal ]
| DottedList [ LispVal ] LispVal
| Number Integer
| String String
| Bool Bool
| Error String
| Native ([LispVal] -> LispVal)
| NativeComp ([LispVal] -> LispVal)