diff --git a/ocaml/Bitlist.ml b/ocaml/Bitlist.ml index 02cc680f..c333485a 100644 --- a/ocaml/Bitlist.ml +++ b/ocaml/Bitlist.ml @@ -64,7 +64,7 @@ let of_int64_list l = (* Compute n_int *) let n_int_of_mo_tot_num mo_tot_num = - let bit_kind_size = Bit_kind_size.to_int Qpackage.bit_kind_size in + let bit_kind_size = Bit_kind_size.to_int (Lazy.force Qpackage.bit_kind_size) in N_int_number.of_int ( (mo_tot_num-1)/bit_kind_size + 1 ) ;; diff --git a/ocaml/Qpackage.ml b/ocaml/Qpackage.ml index 603cbaa1..9726deb6 100644 --- a/ocaml/Qpackage.ml +++ b/ocaml/Qpackage.ml @@ -10,7 +10,7 @@ Please source the quantum_package.rc file." | Some x -> x ;; -let bit_kind_size = +let bit_kind_size = lazy ( let filename = root^"/src/Bitmask/bitmasks_module.f90" in if not (Sys.file_exists_exn filename) then raise (Failure ("File "^filename^" not found")); @@ -37,5 +37,5 @@ let bit_kind_size = | _ -> get_data tail end in - get_data lines + get_data lines ) ;;