Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port lm to lsts fwelio #1134

Merged
merged 3 commits into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading