dope2/primitives/unit.js

13 lines
312 B
JavaScript

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