Skip to content

Commit

Permalink
Rebuilds.
Browse files Browse the repository at this point in the history
  • Loading branch information
skaller committed May 23, 2022
1 parent 989f6ff commit 12dc4e2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/compiler/flx_bind/flx_bbind.ml
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,19 @@ let hfind msg h k =
let rec fix_typeofs state bsym_table t =
match t with
| BTYP_typeof (symbol_index,expr) ->
(*
print_endline ("Found typeof to fix: " ^ Flx_btype.st t);
*)
let env = Flx_lookup.build_env
state.lookup_state bsym_table (Some symbol_index)
in
let be = Flx_lookup.bind_expression
state.lookup_state bsym_table env expr
in
let typ = snd be in
(*
print_endline ("Fixed typeof : " ^ Flx_btype.st t ^ ", set to " ^ Flx_btype.st typ);
*)
typ
| _ -> Flx_btype.map ~f_btype:(fix_typeofs state bsym_table) t

Expand Down
7 changes: 6 additions & 1 deletion src/compiler/flx_core/flx_beta.ml
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,9 @@ and type_list_index counter bsym_table (ls: (Flx_btype.t * int) list) t =
false
end
then begin
(*
print_endline ("Type list index found term " ^ Flx_btype.st hd ^ " in trail depth " ^ string_of_int depth);
*)
Some depth
end
else aux tl
Expand Down Expand Up @@ -307,7 +309,9 @@ print_endline ("Flx_beta: beta-reduce: hacking metatype of fixpoint, type is " ^
print_endline ("Flx_beta: kind is " ^ sk mt);
*)
let fp = btyp_fix (j-depth) mt in
(*
print_endline ("Beta-reduce: type list index found term in trail, returning fixpoint " ^ sbt bsym_table fp);
*)
fp

| None ->
Expand All @@ -322,8 +326,9 @@ print_endline "Type list index returned None";
let ts = List.map br ts in
begin try
let bsym = Flx_bsym_table.find bsym_table index in
(*
if bsym.Flx_bsym.id = "any" then print_endline ("Beta reduce any!");

*)
let bbdcl = Flx_bsym.bbdcl bsym in
begin match bbdcl with
| Flx_bbdcl.BBDCL_structural_type_alias (bvs, alias)
Expand Down

0 comments on commit 12dc4e2

Please sign in to comment.