recursive types (and operations on them, like pretty-printing, comparison and unification) seem to be working.
big part of the code base still needs to be 'ported' to the updated type constructors.
This commit is contained in:
parent
55c5d7cffa
commit
8eec5b9239
34 changed files with 523 additions and 295 deletions
|
|
@ -14,7 +14,7 @@ export const structType = fields => {
|
|||
}
|
||||
const [field, ...rest] = fields;
|
||||
const fieldType = getRight(field);
|
||||
return prodType(fieldType)(structType(rest));
|
||||
return prodType(() => fieldType)(() => structType(rest));
|
||||
};
|
||||
|
||||
export const makeConstructor = fields => {
|
||||
|
|
@ -41,7 +41,7 @@ export const makeConstructorType = type => fields => {
|
|||
}
|
||||
const [field, ...rest] = fields;
|
||||
const fieldType = getRight(field);
|
||||
return fnType(fieldType)(makeConstructorType(rest));
|
||||
return fnType(() => fieldType)(() => makeConstructorType(rest));
|
||||
};
|
||||
|
||||
export const makeGetters = fields => {
|
||||
|
|
@ -60,6 +60,6 @@ export const makeGetters = fields => {
|
|||
export const makeGettersTypes = type => fields => {
|
||||
return fields.map(field => {
|
||||
const fieldType = getRight(field);
|
||||
return fnType(type)(fieldType);
|
||||
return fnType(() => type)(() => fieldType);
|
||||
});
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue