From 6a9e6bd0b440234e6b5f89414ca340867e8b6c98 Mon Sep 17 00:00:00 2001 From: Akshay Date: Fri, 9 Oct 2020 18:05:56 +0530 Subject: doc/todos --- readme.txt | 8 +++++--- src/Operators.hs | 4 ++++ 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: cabal run + todo ---- -* use Control.Monad.Except from mtl to handle errors -* implement property based testing with quickcheck, look - under tests/Properties.hs +* implement correct double/int interaction (src/Operators.hs) +* implement boolean operations: and, not, or +* write Ord instance for LispNumber (src/Operators.hs) +* 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 | F Double instance Num LispNumber where + -- TODO: + -- float op anything = float + -- int op int = int + -- int op float = float (I a) + (I b) = I $ a + b (F a) + (F b) = F $ a + b (I a) - (I b) = I $ a - b -- cgit v1.2.3