dope2/primitives/unit.js
Joeri Exelmans 8eec5b9239 recursive types (and operations on them, like pretty-printing, comparison and unification) seem to be working.
big part of the code base still needs to be 'ported' to the updated type constructors.
2025-05-05 17:17:45 +02:00

15 lines
358 B
JavaScript

import { typedFnType } from "../structures/types.js";
import { Bool, Type, Unit } from "./types.js";
export const eqUnit = x => y => x === y;
export const unit = {};
export const ModuleUnit = {l:[
{i: unit, t: Unit},
{i: Unit, t: Type},
// Unit -> Unit -> Bool
...typedFnType(eqUnit, fnType => fnType(() => Unit)(fnType(Unit)(() => Bool))),
]};