Skip to content

Commit

Permalink
ready for more
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-johnson-4 committed Oct 12, 2024
1 parent 9d5f23e commit e597d3b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 17 deletions.
14 changes: 7 additions & 7 deletions BOOTSTRAP/cli.s
Original file line number Diff line number Diff line change
Expand Up @@ -22652,7 +22652,7 @@ uuid_0000000000073ccc:
cmp $0, %RAX
jne uuid_0000000000073cdc
#Call Fragment cdecl::call : Arrow<Cons<ImplicitContext,?>,Nil>+DontChain
#call function apply-or-cons-and-specialize : Arrow<Cons<Cons<Cons<String,Type>,Type>,AST>,Type>+GlobalVariable
#call function maybe-specialize : Arrow<Cons<Cons<Cons<String,Type>,Type>,AST>,Type>+GlobalVariable
push %RBX
push %RBP
mov %RSP, %RBX
Expand Down Expand Up @@ -22714,7 +22714,7 @@ uuid_0000000000073ccc:
pushq -184(%rbp)
pushq -192(%rbp)
mov %RBX, %RBP
call apply_SB_or_SB_cons_SB_and_SB_specialize_CL_ArrowTypeConsASTConsTypeConsTypeString
call maybe_SB_specialize_CL_ArrowTypeConsASTConsTypeConsTypeString
mov %RBP, %RSP
pop %RBP
pop %RBX
Expand Down Expand Up @@ -23247,7 +23247,7 @@ uuid_0000000000073c64:
jmp uuid_0000000000073c70
uuid_0000000000073c6f:
#Call Fragment cdecl::call : Arrow<Cons<ImplicitContext,?>,Nil>+DontChain
#call function apply-or-cons-and-specialize : Arrow<Cons<Cons<Cons<String,Type>,Type>,AST>,Type>+GlobalVariable
#call function maybe-specialize : Arrow<Cons<Cons<Cons<String,Type>,Type>,AST>,Type>+GlobalVariable
push %RBX
push %RBP
mov %RSP, %RBX
Expand Down Expand Up @@ -23412,7 +23412,7 @@ uuid_0000000000073c6f:
pushq -184(%rbp)
pushq -192(%rbp)
mov %RBX, %RBP
call apply_SB_or_SB_cons_SB_and_SB_specialize_CL_ArrowTypeConsASTConsTypeConsTypeString
call maybe_SB_specialize_CL_ArrowTypeConsASTConsTypeConsTypeString
mov %RBP, %RSP
pop %RBP
pop %RBX
Expand Down Expand Up @@ -24070,7 +24070,7 @@ uuid_0000000000073c07:
pop %RBP
pop %RBX
#Call Fragment cdecl::call : Arrow<Cons<ImplicitContext,?>,Nil>+DontChain
#call function apply-or-cons-and-specialize : Arrow<Cons<Cons<Cons<String,Type>,Type>,AST>,Type>+GlobalVariable
#call function maybe-specialize : Arrow<Cons<Cons<Cons<String,Type>,Type>,AST>,Type>+GlobalVariable
push %RBX
push %RBP
mov %RSP, %RBX
Expand Down Expand Up @@ -24132,7 +24132,7 @@ uuid_0000000000073c07:
pushq -184(%rbp)
pushq -192(%rbp)
mov %RBX, %RBP
call apply_SB_or_SB_cons_SB_and_SB_specialize_CL_ArrowTypeConsASTConsTypeConsTypeString
call maybe_SB_specialize_CL_ArrowTypeConsASTConsTypeConsTypeString
mov %RBP, %RSP
pop %RBP
pop %RBX
Expand Down Expand Up @@ -277867,7 +277867,7 @@ uuid_0000000000073c6d:
.ascii "Tuple"
.zero 1
uuid_0000000000073cc0:
.ascii "File: SRC/infer-expr.lm Line: 210 Column: 14"
.ascii "File: SRC/infer-expr.lm Line: 206 Column: 14"
.zero 1
uuid_0000000000073cd2:
.ascii "Arrow"
Expand Down
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.17.2"
version = "1.17.3"
authors = ["Andrew <andrew@subarctic.org>"]
license = "MIT"
description = "Typed Macro Assembler (backed by Coq proofs-of-correctness)"
Expand Down
12 changes: 3 additions & 9 deletions SRC/infer-expr.lm
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,7 @@ infer-expr := λ(: tctx TContext)(: term AST)(: scoped IsScoped)(: hint Type)(:
)))
(ascript-normal( term (t1 'Nil_s) ))

(apply-or-cons-and-specialize(
'del_s (typeof-var-raw( term tctx 'del_s )) rt term
))
(maybe-specialize( 'del_s (typeof-var-raw( term tctx 'del_s )) rt term ))
))
( (App( l r )) (
(let l-used Unused)
Expand All @@ -196,9 +194,7 @@ infer-expr := λ(: tctx TContext)(: term AST)(: scoped IsScoped)(: hint Type)(:
) ())
(ascript-normal( term rt ))
(if (==( (var-name-if-var l) 'Rc_s )) (
(apply-or-cons-and-specialize(
'inc_s
(typeof-var-raw( term tctx 'inc_s ))
(maybe-specialize( 'inc_s (typeof-var-raw( term tctx 'inc_s ))
(t2( 'Rc_s (p2(slot( (p2(slot( (p1 (typeof r)) 'Array_s ))) 'Tuple_s ))) )) # invert Rc constructor to get type parameter
term
))
Expand All @@ -221,9 +217,7 @@ infer-expr := λ(: tctx TContext)(: term AST)(: scoped IsScoped)(: hint Type)(:
(let rt (typeof rhs))
(ascript-normal( term (enrich( (t3( 'Arrow_s lt rt )) tlt )) ))
(if (is-blob tlt) () (
(apply-or-cons-and-specialize(
'cdecl::return_s (typeof-var-raw( term tctx 'cdecl::return_s )) rt term
))
(maybe-specialize( 'cdecl::return_s (typeof-var-raw( term tctx 'cdecl::return_s )) rt term ))
))
))
( (Var( v vtk )) (
Expand Down

0 comments on commit e597d3b

Please sign in to comment.