dope2/primitives/unit.js

15 lines
346 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))),
]};