progress
This commit is contained in:
parent
33c156fc5c
commit
afd78c3b3e
5 changed files with 54 additions and 8 deletions
|
|
@ -110,9 +110,7 @@ export const mergeSubstitutions = (m1, m2) => {
|
|||
let d;
|
||||
// notice we swap m2 and m1, so the rewriting can happen both ways:
|
||||
[stable, m2, m1, d] = mergeOneWay(m1, m2);
|
||||
if (!stable) {
|
||||
deletedTypeVars = deletedTypeVars.union(d);
|
||||
}
|
||||
deletedTypeVars = deletedTypeVars.union(d);
|
||||
}
|
||||
return [new Map([...m1, ...m2]), deletedTypeVars];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ import { Bool, Int } from "../primitives/symbols.js";
|
|||
import { lsType } from "../structures/list_common.js";
|
||||
import { fnType } from "../metacircular.js";
|
||||
import { assign, makeGeneric, mergeSubstitutions, unify } from "./generics.js";
|
||||
import { select } from "@inquirer/prompts";
|
||||
|
||||
// a -> Int
|
||||
const a_to_Int = makeGeneric(a => fnType({in: a, out: Int}));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue