big part of the code base still needs to be 'ported' to the updated type constructors.
15 lines
592 B
JavaScript
15 lines
592 B
JavaScript
import { typedFnType } from "../structures/types.js";
|
|
import { Type } from "./types.js";
|
|
import {Bool, Double} from "./types.js";
|
|
|
|
export const addDouble = x => y => x + y;
|
|
export const mulDouble = x => y => x * y;
|
|
export const eqDouble = x => y => x === y;
|
|
|
|
export const ModuleDouble = {l:[
|
|
{i: Double, t: Type},
|
|
|
|
...typedFnType(addDouble, fnType => fnType(() => Double)(fnType(Double)(() => Double))),
|
|
...typedFnType(mulDouble, fnType => fnType(() => Double)(fnType(Double)(() => Double))),
|
|
...typedFnType(eqDouble, fnType => fnType(() => Double)(fnType(Double)(() => Bool))),
|
|
]};
|