aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkshay <[email protected]>2020-10-09 13:35:56 +0100
committerAkshay <[email protected]>2020-10-09 13:35:56 +0100
commit6a9e6bd0b440234e6b5f89414ca340867e8b6c98 (patch)
tree5b762b956771d7d3dc063c729f46b9b04e580474
parent3ef6ec4bd3314efcac2504bd3a25e380d5e9514f (diff)
doc/todos
-rw-r--r--readme.txt8
-rw-r--r--src/Operators.hs4
2 files changed, 9 insertions, 3 deletions
diff --git a/readme.txt b/readme.txt
index 3892f01..6a4be58 100644
--- a/readme.txt
+++ b/readme.txt
@@ -18,9 +18,11 @@ cabal:
18 18
19 cabal run 19 cabal run
20 20
21
21todo 22todo
22---- 23----
23 24
24* use Control.Monad.Except from mtl to handle errors 25* implement correct double/int interaction (src/Operators.hs)
25* implement property based testing with quickcheck, look 26* implement boolean operations: and, not, or
26 under tests/Properties.hs 27* write Ord instance for LispNumber (src/Operators.hs)
28* implement property based testing with quickcheck (tests/Properties.hs)
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