From b7c93bf60c350af983e44d5ee778fd459fa60e97 Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Sat, 6 Dec 2014 09:10:25 +1100 Subject: Skeleton code for interpreter added --- src/Grasp/Types/Instruction.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/Grasp/Types/Instruction.hs') 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 + -- cgit