rename some things
This commit is contained in:
parent
e04cac4f7d
commit
8a4bd44f04
16 changed files with 92 additions and 60 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import { Unit } from "../primitives/types.js";
|
||||
import { unit } from "../primitives/unit.js";
|
||||
import { capitalizeFirstLetter } from "../util/util.js";
|
||||
import { constructorProduct, getLeft, getRight } from "./product.js";
|
||||
import { newProduct, getLeft, getRight } from "./product.js";
|
||||
import { fnType, prodType } from "./types.js";
|
||||
|
||||
// 'fields' is an array of (name: string, type: Type) pairs.
|
||||
|
|
@ -26,7 +26,7 @@ export const makeConstructor = fields => {
|
|||
return nextParam => {
|
||||
const wrappedName = 'wrapped_' + ret.name;
|
||||
const newRet = {
|
||||
[wrappedName]: inner => constructorProduct(nextParam)(ret(inner)),
|
||||
[wrappedName]: inner => newProduct(nextParam)(ret(inner)),
|
||||
}[wrappedName];
|
||||
return internal(nParams-1, newRet);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue