From 5044a550bdc0e50431f982d4f35ab3841f000252 Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Mon, 5 May 2014 12:10:18 +1000 Subject: Skeleton of interpreter added --- src/Grasp/Interpreter.hs | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/Grasp/Interpreter.hs diff --git a/src/Grasp/Interpreter.hs b/src/Grasp/Interpreter.hs new file mode 100644 index 0000000..19b9a0f --- /dev/null +++ b/src/Grasp/Interpreter.hs @@ -0,0 +1,35 @@ +module Grasp.Interpreter ( + grasp + ) where + + +import Grasp.Types +import Grasp.Parser + + + +type IP = [LNode String] + + + + +grasp :: GraspProgram -> IO () +grasp g = + let ips = map (:[]) (nodesWithName g "grasp:main") + in interpret g ips + + + +reachable :: GraspProgram -> [LNode String] +reachable g = [] + + + +garbageCollect :: GraspProgram -> GraspProgram +garbageCollect g = g + + + +interpret :: GraspProgram -> [IP] -> IO () +interpret g ips = return () + -- cgit