dope2/primitives/bool.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
382 B
JavaScript

import { fnType, typedFnType } from "../structures/types.js";
import { Type } from "./types.js";
import { Bool } from "./types.js";
const eqBool = x => y => x === y;
export const ModuleBool = {l:[
{i: true , t: Bool},
{i: false, t: Bool},
{i: Bool , t: Type},
// Bool -> Bool -> Bool
...typedFnType(eqBool, fnType => fnType(() => Bool)(fnType(Bool)(() => Bool))),
]};