greatly simplify type registry

This commit is contained in:
Joeri Exelmans 2025-03-20 17:29:13 +01:00
parent 303fa869a8
commit 4ca60784aa
3 changed files with 36 additions and 85 deletions

View file

@ -1,19 +1,17 @@
import { Function, Type } from "../metacircular.js";
import { Double } from "../primitives/symbols.js";
import { String } from "../structures/list_types/string.js";
import { nominalType, NominalType } from "../structures/nominal_type.js";
import { makeProductType } from "../structures/product.js";
import { fnType, prodType, typedFnType } from "../type_registry.js";
import { prodType, typedFnType } from "../type_registry.js";
const PointCartesian2D = nominalType(
// just a unique number, to make sure that our type is only equal to itself
"PointCartesian2D")
// just a unique number, to make sure that our type is only equal to itself
// BigInt("0xBBAAD62B10EE21993BA690A732DA2A6875CE4B6F5E7139D5AEC9FD887F9D24A8"))
(prodType(Double, Double));
const PointPolar2D = nominalType(
// just a unique number, to make sure that our type is only equal to itself
"PointPolar2D")
// just a unique number, to make sure that our type is only equal to itself
// BigInt("0x31CDAB4B3D84C4EB27D3C111FD7580E533268B72E05BD694F8B262913E018B72"))
(prodType(Double, Double));