From 0096bb5559224b4c9bbe74317e07dc71cfc09c70 Mon Sep 17 00:00:00 2001 From: Joeri Exelmans Date: Fri, 16 May 2025 14:07:36 +0200 Subject: [PATCH] allow comparison of type variable instances --- lib/compare/dynamic.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/compare/dynamic.js b/lib/compare/dynamic.js index 35d6a96..98a115f 100644 --- a/lib/compare/dynamic.js +++ b/lib/compare/dynamic.js @@ -13,7 +13,10 @@ export const compareDynamic = x => y => compareTypes(getType(x))(getType(y)) || makeCompareFn(getType(x))(getInst(x))(getInst(y)); -const cannotCompareTypeVarInstances = _ => _ => { throw new Error("Cannot compare instance of type variables"); } +// const cannotCompareTypeVarInstances = _ => _ => { throw new Error("Cannot compare instance of type variables"); } + + +const cannotCompareTypeVarInstances = _ => _ => 0; const typeSymbolToCmp = new Map([ [symbolInt , compareInts ],