Permalink
Browse files

hack in hhiji to show result

  • Loading branch information...
Johan Gustafsson
Johan Gustafsson committed May 17, 2010
1 parent bddc88d commit 2d7888231682d753c6e8f1927d937b31fd7658ba
Showing with 9 additions and 1 deletion.
  1. +9 −1 haskell.hiji.js
View
@@ -97,7 +97,15 @@ commands[":help"] = "HELP";
{
try {
var newLine = makeEntered(modules, line);
- var output = makeOutput(evaluateHaskell(line, env));
+
+ var result = evaluateHaskell(line, env);
+ if (result.force) {
+ result = result.force();
+ } else if (result.ptrs) {
+ result = result.ptrs[0].thunk.force();
+ }
+
+ var output = makeOutput(result);
$('.input', this).after(output).replaceWith(newLine);
$("ol",this).append(makeInput(modules));
}

0 comments on commit 2d78882

Please sign in to comment.