Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
northOfThule committed Apr 20, 2010
1 parent 43c1731 commit 659eb5c
Showing 1 changed file with 20 additions and 23 deletions.
43 changes: 20 additions & 23 deletions haskell.hiji.js
Expand Up @@ -4,7 +4,6 @@ var DOWN = '40';
var is_module_loaded = false;
var modules = new Array();


(function($){

var evaluateHaskell = function(line, env)
Expand Down Expand Up @@ -95,29 +94,27 @@ var modules = new Array();

// load a module
function load_module(module){

is_module_loaded = false;

jQuery.ajax({
async : false,
url : module,
success: function(prelude_data){
console.log(prelude_data);
try {
var ast = haskell.parser.parse(prelude_data);
console.log("%o", ast);
if (ast.ast == undefined) {
console.log("Syntax Error");
}
else {
haskell.interpreter.prepare(ast.ast, env);
is_module_loaded = true;
is_module_loaded = false;
jQuery.ajax({
async : false,
url : module,
success: function(prelude_data){
console.log(prelude_data);
try {
var ast = haskell.parser.parse(prelude_data);
console.log("%o", ast);
if (ast.ast == undefined) {
console.log("Syntax Error");
}
} catch(e) {
console.log("%o", e);
}
}
});
else {
haskell.interpreter.prepare(ast.ast, env);
is_module_loaded = true;
}
} catch(e) {
console.log("%o", e);
}
}
});
}

function isCommand(l){
Expand Down

0 comments on commit 659eb5c

Please sign in to comment.