summaryrefslogtreecommitdiff
path: root/src/Transfer/Interpreter.hs
diff options
context:
space:
mode:
authorbringert <bringert@cs.chalmers.se>2005-11-29 15:48:13 +0000
committerbringert <bringert@cs.chalmers.se>2005-11-29 15:48:13 +0000
commiteef20fa404f11fda0b9f73da1a3ee41db3201062 (patch)
treef03879bedcf2a7885b092d18581f11a994a008be /src/Transfer/Interpreter.hs
parent2be80a7e3b4834bd3146ac9d2f27190fd0689d27 (diff)
Added meta variables to transfer front-end and core.
Diffstat (limited to 'src/Transfer/Interpreter.hs')
-rw-r--r--src/Transfer/Interpreter.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Transfer/Interpreter.hs b/src/Transfer/Interpreter.hs
index 44618b756..78b004c8d 100644
--- a/src/Transfer/Interpreter.hs
+++ b/src/Transfer/Interpreter.hs
@@ -16,6 +16,7 @@ data Value = VStr String
| VClos Env Exp
| VCons CIdent [Value]
| VPrim (Value -> Value)
+ | VMeta Integer
deriving (Show)
instance Show (a -> b) where
@@ -128,6 +129,7 @@ eval env x = case x of
EType -> VType
EStr str -> VStr str
EInt n -> VInt n
+ EMeta (TMeta t) -> VMeta (read $ drop 1 t)
firstMatch :: Value -> [Case] -> Maybe (Exp,[(CIdent,Value)])
firstMatch _ [] = Nothing