diff --git a/lib/point.js b/lib/point.js index 4b1deaa..15d56f2 100644 --- a/lib/point.js +++ b/lib/point.js @@ -9,13 +9,13 @@ const PointCartesian2D = nominalType( // just a unique number, to make sure that our type is only equal to itself "PointCartesian2D") // BigInt("0xBBAAD62B10EE21993BA690A732DA2A6875CE4B6F5E7139D5AEC9FD887F9D24A8")) - (prodType(String, Double)); + (prodType(Double, Double)); const PointPolar2D = nominalType( // just a unique number, to make sure that our type is only equal to itself "PointPolar2D") // BigInt("0x31CDAB4B3D84C4EB27D3C111FD7580E533268B72E05BD694F8B262913E018B72")) - (prodType(String, Double)); + (prodType(Double, Double)); export const cart2polar = ({left: x, right: y}) => { const r = Math.sqrt(x*x + y*y); diff --git a/structures/nominal_type.js b/structures/nominal_type.js index 1b33acc..6ad7dcc 100644 --- a/structures/nominal_type.js +++ b/structures/nominal_type.js @@ -1,14 +1,10 @@ import { Type } from "../metacircular.js"; -import { Int } from "../primitives/symbols.js"; +import { String } from "../structures/list_types/string.js"; import { prodType } from "../type_registry.js"; import { makeProductType } from "./product.js"; -export const NominalType = prodType(Int, Type); +export const NominalType = prodType(String, Type); -export const ModuleNominalType = makeProductType(Int, Type); +export const ModuleNominalType = makeProductType(String, Type); -export const nominalType = x => { - const result = ModuleNominalType.l[5].i(x); // dirty!! - result.__proto__.toString = () => "HEY"; - return result; -} \ No newline at end of file +export const nominalType = ModuleNominalType.l[5].i; // dirty!!