Skip to content

Commit

Permalink
[compiler] smal fix
Browse files Browse the repository at this point in the history
  • Loading branch information
FissoreD committed Oct 8, 2024
1 parent 3a7367f commit bdd74d2
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/compiler.ml
Original file line number Diff line number Diff line change
Expand Up @@ -2979,6 +2979,10 @@ let static_check ~exec ~checker:(state,program)


let estract_info_from_types tname {Types.lst} (state, tlist, functionality) =
set_spaghetti_printer pp_const (fun fmt e -> Format.fprintf fmt "%s" (Symbols.show state e));
(* if List.length lst > 1 then *)
Format.printf "%s --> [%a]\n%!" (Symbols.show state tname)
(fun fmt e -> Format.pp_print_list ~pp_sep:(fun fmt _ -> Format.fprintf fmt ",,,,") pp_ttype fmt e) (List.map (fun (e: Types.typ) -> e.decl.ttype.ttype) lst);
let functionality = ref functionality in
let state = ref state in
let l =
Expand All @@ -2987,12 +2991,7 @@ let static_check ~exec ~checker:(state,program)
let ttypet = unfold_type_abbrevs ~is_typeabbrev:false ~compiler_state initial_depth type_abbrevs ttype 0 in
let st, ttypet = quote_pretype time ~compiler_state st ttypet in
state := st;
begin
if is_functional ttype.ttype then
let st, f = mkQCon time ~compiler_state st ~on_type:false tname in
state := st;
functionality := f :: !functionality
end;
if is_functional ttype.ttype then functionality := c :: !functionality;
App(colonc,c, [close_w_binder forallc ttypet ttype.tamap])) lst
in
!state, l :: tlist, !functionality
Expand Down

0 comments on commit bdd74d2

Please sign in to comment.