aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Operators.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Operators.hs b/src/Operators.hs
index 9eaec38..fc0608e 100644
--- a/src/Operators.hs
+++ b/src/Operators.hs
@@ -19,6 +19,10 @@ data LispNumber = I Integer
19 | F Double 19 | F Double
20 20
21instance Num LispNumber where 21instance Num LispNumber where
22 -- TODO:
23 -- float op anything = float
24 -- int op int = int
25 -- int op float = float
22 (I a) + (I b) = I $ a + b 26 (I a) + (I b) = I $ a + b
23 (F a) + (F b) = F $ a + b 27 (F a) + (F b) = F $ a + b
24 (I a) - (I b) = I $ a - b 28 (I a) - (I b) = I $ a - b