summaryrefslogtreecommitdiff
path: root/lambda-calcul/haskell
diff options
context:
space:
mode:
authorArnaud Bailly <arnaud@pankzsoft.com>2025-11-03 20:30:47 +0100
committerArnaud Bailly <arnaud@pankzsoft.com>2025-11-03 20:30:47 +0100
commit78fac35c6e7a987bc2b6a37d78cd2c07c3a0efa2 (patch)
treebaefbeeb657b8cb43a9adef396d4a4e1bb74ffa0 /lambda-calcul/haskell
parent05800b377de4e2883faad1ae047139ea8fef00ba (diff)
downloadlambda-nantes-78fac35c6e7a987bc2b6a37d78cd2c07c3a0efa2.tar.gz
Fix representation of types
Diffstat (limited to 'lambda-calcul/haskell')
-rw-r--r--lambda-calcul/haskell/public/repl.js4
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;
}