This commit is contained in:
Joeri Exelmans 2025-03-24 08:25:53 +01:00
parent 3596e01c28
commit 6af72e525c
3 changed files with 31 additions and 5 deletions

View file

@ -36,5 +36,9 @@ const weirdFnType = makeGeneric(a =>
in: fnType({in: a, out: Int}),
out: fnType({in: lsType(a), out: a}),
}));
// we call this function with parameter of type (b -> b) ...
// giving these substitutions:
// a := b
// b := Int
console.log("should be: [Int] -> Int");
console.log(pretty(assign(weirdFnType, idFnType)));
console.log(pretty(assign(weirdFnType, idFnType)));