Permalink
Browse files

merging

  • Loading branch information...
1 parent 42d3c1f commit ea4732da16bab9da0e0c17b58949096f076343b8 Mattis Jeppsson committed May 19, 2010
Showing with 5 additions and 40 deletions.
  1. +5 −40 haskell.js
View
@@ -1,42 +1,7 @@
var haskell = {
- parser: {},
- interpreter: {},
- ast: {},
- typechecker: {}
-};
-
-haskell.env = function() {
- this.symbols = {};
- this.arg_list = {};
-
- this.set_symbol = function(symbol, value, evaluated) {
- var s = {};
- s.value = value;
- s.evaluated = evaluated == undefined ? false : evaluated;
-
- this.symbols[symbol] = s;
- }
-
- this.get_symbol = function(symbol) {
- return this.symbols[symbol];
- }
-
- this.exists_symbol = function(symbol) {
- return this.symbols[symbol] != undefined;
- }
-
- this.set_arg_list = function(args) {
- this.arg_list = args;
- }
-}
-
-haskell.eval = function(code) {
- if (typeof(console) == "undefined") {
- console = {};
- console.log = function() {};
- }
-
- var ast = haskell.parser.parse(code).ast;
- console.log("%o", ast);
- return haskell.interpreter.interpret(new haskell.env(), ast);
+ parser: {},
+ interpreter: {},
+ ast: {},
+ primitives: {},
+ utilities: {}
};

0 comments on commit ea4732d

Please sign in to comment.