Skip to content

Commit

Permalink
Merge pull request #1207 from andrew-johnson-4/lm-to-lsts-wqpefkp
Browse files Browse the repository at this point in the history
Lm to lsts wqpefkp
  • Loading branch information
andrew-johnson-4 authored Jan 31, 2025
2 parents 0c1a236 + 93f95bf commit a4c7711
Show file tree
Hide file tree
Showing 6 changed files with 21,739 additions and 22,139 deletions.
43,770 changes: 21,723 additions & 22,047 deletions BOOTSTRAP/cli.c

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions SRC/index-types.lm
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ import SRC/index-of-tag.lm;
import SRC/is-sized-array.lsts;
import SRC/maybe-specialize.lm;

import SRC/is-constructor.lm;

import SRC/union.lm;
import SRC/tag-of.lm;
import SRC/has-infinite.lm;
Expand All @@ -30,7 +28,6 @@ import SRC/cons-tail.lm;
import SRC/apply.lm;
import SRC/apply.lsts;
import SRC/apply-plural.lm;
import SRC/reduce-plural.lm;
import SRC/apply-or-cons-and-specialize.lm;
import SRC/try-specialize.lm;

Expand Down
34 changes: 0 additions & 34 deletions SRC/is-constructor.lm

This file was deleted.

55 changes: 0 additions & 55 deletions SRC/reduce-plural.lm

This file was deleted.

15 changes: 15 additions & 0 deletions SRC/reduce-plural.lsts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

let reduce-plural(dpts: List<Type>): List<Type> = (
let pts = [] :: List<Tuple<Type,Type>>;
for pt in dpts { pts = cons(Tuple{denormalize-arrow(pt),pt},pts); };
let return = [] :: List<Type>;
for Tuple{try-denormal=first, try=second} in pts {
for Tuple{tst-denormal=first, tst=second} in pts {
if not(is(try-denormal,tst-denormal)) && can-unify(try-denormal.domain, tst-denormal.domain) {
try = TAny{};
}
};
if non-zero(try) { return = cons(try, return); }
};
return;
);
1 change: 1 addition & 0 deletions SRC/unit-inference.lsts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import SRC/tctx-substitute.lm;
import SRC/tctx-union.lsts;
import SRC/tctx-and.lsts;
import SRC/tctx-bind.lsts;
import SRC/reduce-plural.lsts;

# corollaries
import SRC/quick-prop.lsts;
Expand Down

0 comments on commit a4c7711

Please sign in to comment.