add nominal types for 2D points
This commit is contained in:
parent
94efde3e65
commit
18b5e56ff0
6 changed files with 110 additions and 21 deletions
40
main.js
40
main.js
|
|
@ -100,29 +100,31 @@ const ModuleValues = {l:[
|
|||
{i: {variant: "L", value: 100n}, t: sumType(Int, Bool)},
|
||||
]};
|
||||
|
||||
import { select } from '@inquirer/prompts';
|
||||
import { ModulePoint } from "./lib/point.js";
|
||||
|
||||
|
||||
const ctx = new Context({l:[
|
||||
...ModuleMetaCircular.l,
|
||||
...ModuleTyped.l,
|
||||
// ...ModuleConformable,
|
||||
// ...ModuleConformanceCheckConforms,
|
||||
// ...ModuleNum,
|
||||
// ...ModuleEq,
|
||||
...ModuleBool.l,
|
||||
...ModuleInt.l,
|
||||
...ModuleDouble.l,
|
||||
// ...ModuleSquare,
|
||||
// ...ModuleList,
|
||||
...makeIdFn(Int).l,
|
||||
...makeSquare({i: mulInt, t: Int_to_Int_to_Int}).l,
|
||||
...makeSquare({i: mulDouble, t: Double_to_Double_to_Double}).l,
|
||||
...ModuleList.l,
|
||||
...ModuleValues.l,
|
||||
...ModuleModule.l,
|
||||
// ...ModuleMetaCircular.l,
|
||||
// ...ModuleTyped.l,
|
||||
// // ...ModuleConformable,
|
||||
// // ...ModuleConformanceCheckConforms,
|
||||
// // ...ModuleNum,
|
||||
// // ...ModuleEq,
|
||||
// ...ModuleBool.l,
|
||||
// ...ModuleInt.l,
|
||||
// ...ModuleDouble.l,
|
||||
// // ...ModuleSquare,
|
||||
// // ...ModuleList,
|
||||
// ...makeIdFn(Int).l,
|
||||
// ...makeSquare({i: mulInt, t: Int_to_Int_to_Int}).l,
|
||||
// ...makeSquare({i: mulDouble, t: Double_to_Double_to_Double}).l,
|
||||
// ...ModuleList.l,
|
||||
// ...ModuleValues.l,
|
||||
// ...ModuleModule.l,
|
||||
...ModulePoint.l,
|
||||
]});
|
||||
|
||||
import { input, select } from '@inquirer/prompts';
|
||||
|
||||
const makeChoice = ([i, t]) => {
|
||||
return {
|
||||
value: {i, t: t[0]},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue