Skip to content

Commit

Permalink
Merge pull request #1134 from andrew-johnson-4/port-lm-to-lsts-fwelio
Browse files Browse the repository at this point in the history
Port lm to lsts fwelio
  • Loading branch information
andrew-johnson-4 authored Jan 21, 2025
2 parents e6d7975 + 13271c7 commit ee2f58a
Show file tree
Hide file tree
Showing 10 changed files with 21,512 additions and 21,530 deletions.
43,004 changes: 21,494 additions & 21,510 deletions BOOTSTRAP/cli.c

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "lambda_mountain"
version = "1.20.32"
version = "1.20.33"
authors = ["Andrew <[email protected]>"]
license = "MIT"
description = "Typed Macro Assembler (backed by Coq proofs-of-correctness)"
Expand Down
1 change: 1 addition & 0 deletions SRC/index-index.lm
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import SRC/unit-types.lsts;
import SRC/unit-ast.lsts;
import SRC/unit-inference.lsts;
import SRC/unit-fragments.lsts;
import SRC/unit-globals.lsts;
import SRC/unit-drivers.lsts;

import SRC/index-definitions.lm;
Expand Down
2 changes: 0 additions & 2 deletions SRC/index-types.lm
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import SRC/is-class.lm;
import SRC/is-only-child.lsts;
import SRC/is-sized-array.lsts;
import SRC/fields-of-tag.lm;
import SRC/type-constructors.lm;
import SRC/type-complex-fields.lm;
import SRC/get-vararg-inner.lm;
import SRC/maybe-specialize.lm;
Expand Down Expand Up @@ -66,7 +65,6 @@ import SRC/type-of-s.lm;
import SRC/type-of-s-with-fields.lm;

import SRC/typeof-lhs.lm;
import SRC/typeof-tag.lm;
import SRC/cons-head.lm;
import SRC/cons-tail.lm;
import SRC/parameter-number.lm;
Expand Down
7 changes: 2 additions & 5 deletions SRC/infer-type-constructor.lm
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ infer-type-constructor := λ(: base-type Type)(: body AST). (: (
(add-quick-prop( (t1(+( 'Tag::_s tag ))) (t3( 'Array_s base-type TAny )) (t2( 'CaseNumber_s (t1(to-string(index-of-tag tag))) )) ))
(index-class-of-tag( tag base-type ))
(index-fields-of-tag( tag base-type TAny (t1 'Nil_s) ))
(set type-constructors-index (.bind( type-constructors-index tag rtype )))
(set r 8_u64)
(set global-type-context (.bind( global-type-context tag rtype body )))
(let constructor-tt (t2( 'Constructor_s (t1 tag) )))
))
( (App( (Lit( tag _ )) args )) (
Expand All @@ -48,9 +47,7 @@ infer-type-constructor := λ(: base-type Type)(: body AST). (: (
(set-type-fields( base-type atype ))
(index-class-of-tag( tag base-type ))
(index-fields-of-tag( tag base-type base-type atype ))
(set type-constructors-index (.bind( type-constructors-index tag (t3( 'Arrow_s atype rtype )) )))
(set r 8_u64)
(let constructor-tt (t2( 'Constructor_s (t1 tag) )))
(set global-type-context (.bind( global-type-context tag (t3( 'Arrow_s atype rtype )) body )))
))
( ASTEOF () )
))
Expand Down
4 changes: 4 additions & 0 deletions SRC/tctx-bind.lsts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

let .bind(tctx: TContext, k: CString, kt: Type, kv: AST): TContext = (
TCtxBind { close(tctx), k, kt, kv }
);
3 changes: 0 additions & 3 deletions SRC/type-constructors.lm

This file was deleted.

9 changes: 0 additions & 9 deletions SRC/typeof-tag.lm

This file was deleted.

4 changes: 4 additions & 0 deletions SRC/typeof-tag.lsts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

let typeof-tag(tag: CString): Type = (
typeof-var-raw(ASTEOF, global-type-context, tag)
);
6 changes: 6 additions & 0 deletions SRC/unit-globals.lsts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

import SRC/typeof-tag.lsts;

import SRC/tctx-bind.lsts;

# global indexes

0 comments on commit ee2f58a

Please sign in to comment.