diff options
Diffstat (limited to 'lambda-calcul/haskell')
| -rw-r--r-- | lambda-calcul/haskell/public/repl.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lambda-calcul/haskell/public/repl.js b/lambda-calcul/haskell/public/repl.js index c0de921..bd7e743 100644 --- a/lambda-calcul/haskell/public/repl.js +++ b/lambda-calcul/haskell/public/repl.js @@ -63,7 +63,7 @@ function prettyTerm(term) { function prettyType(type) { if(type.tag === "TyVar") { return type.contents; - } else if(type.tag === "TyArr") { + } else if(type.tag === ":->") { return "(" + prettyType(type.contents[0]) + " -> " + prettyType(type.contents[1]) + ")"; } return JSON.stringify(type); @@ -72,7 +72,7 @@ function prettyType(type) { function formatResult(text) { const result = JSON.parse(text); if (result.tag === "Evaluated") { - return prettyTerm(result.contents[0]) + ':' + prettyType(result.contents[1]); + return prettyTerm(result.contents[0]) + ' : ' + prettyType(result.contents[1]); } else if (result.tag === "Msg" ) { return result.contents; } |
