This commit is contained in:
Joeri Exelmans 2025-04-18 09:14:55 +02:00
parent c51e517b66
commit 3be17c1148
2 changed files with 5 additions and 1 deletions

View file

@ -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') {

View file

@ -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;