diff options
author | Jed Barber <jjbarber@y7mail.com> | 2014-12-06 09:10:25 +1100 |
---|---|---|
committer | Jed Barber <jjbarber@y7mail.com> | 2014-12-06 09:10:25 +1100 |
commit | b7c93bf60c350af983e44d5ee778fd459fa60e97 (patch) | |
tree | 567e9e54c4cbbce54b1a386549a9445e05bb01b7 /src/Grasp/Types/Instruction.hs | |
parent | ef7ed9cc9292554a90e644c92533cfc0e2a50896 (diff) |
Skeleton code for interpreter added
Diffstat (limited to 'src/Grasp/Types/Instruction.hs')
-rw-r--r-- | src/Grasp/Types/Instruction.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Grasp/Types/Instruction.hs b/src/Grasp/Types/Instruction.hs index 0ff4002..e618222 100644 --- a/src/Grasp/Types/Instruction.hs +++ b/src/Grasp/Types/Instruction.hs @@ -4,7 +4,8 @@ module Grasp.Types.Instruction ( mk, toString, - toFloat + toFloat, + toInt ) where @@ -30,3 +31,6 @@ toString (Instruction i) = i toFloat :: Instruction -> Maybe Float toFloat (Instruction i) = readMaybe i +toInt :: Instruction -> Maybe Int +toInt (Instruction i) = readMaybe i + |