From 3be17c11485a48b4cf5d33f9fb507ddce10690b9 Mon Sep 17 00:00:00 2001 From: Joeri Exelmans Date: Fri, 18 Apr 2025 09:14:55 +0200 Subject: [PATCH] doc --- compare/primitives.js | 2 +- compare/versioning.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/compare/primitives.js b/compare/primitives.js index d0aa60d..cac01e7 100644 --- a/compare/primitives.js +++ b/compare/primitives.js @@ -1,4 +1,4 @@ -import { Char, Double, Int, Unit } from "../primitives/types.js"; +// Total ordering of primitive types export const compareNumbers = x => y => { if (typeof(x) !== 'number' || typeof(y) !== 'number') { diff --git a/compare/versioning.js b/compare/versioning.js index b546655..e483d5a 100644 --- a/compare/versioning.js +++ b/compare/versioning.js @@ -1,3 +1,7 @@ +// Total ordering of slots and values (versioning library). +// Problem: A Value produced by a transformation can depend on other Values of any type! +// So, we cannot statically know the entire type -> resort to dynamic typing for these? + export const compareSlots = compareElems => slotA => slotB => { if (slotA.depth < slotB.depth) { return -1;