From 78fac35c6e7a987bc2b6a37d78cd2c07c3a0efa2 Mon Sep 17 00:00:00 2001 From: Arnaud Bailly Date: Mon, 3 Nov 2025 20:30:47 +0100 Subject: Fix representation of types --- lambda-calcul/haskell/public/repl.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lambda-calcul') 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; } -- cgit v1.3.1