From 1723239d9bf8bc221072ea309f093e76edbeab55 Mon Sep 17 00:00:00 2001 From: darkf Date: Sun, 20 Oct 2013 16:26:53 -0700 Subject: [PATCH] add itos builtin --- interp.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/interp.hs b/interp.hs index f75ee26..6f12443 100644 --- a/interp.hs +++ b/interp.hs @@ -54,6 +54,7 @@ initialState = ([stdout, stdin], ("stdout", StreamV 0), ("putstr", Builtin $ BIF _putstr), ("putstrln", Builtin $ BIF (\x -> _putstr $ x +$ StrV "\n")), + ("itos", Builtin $ BIF (\(IntV i) -> return $ StrV $ show i)), ("getline", Builtin $ BIF _getline)]) eval :: AST -> InterpState Value