Help making this compile: Core.Hashtbl.create ~size:0 (module String)

This line

val mutable window_list = Core.Hashtbl.create ~size:0 (module String)

is giving me error of:

19 |       val mutable window_list = Core.Hashtbl.create ~size:0 (module String)
                                                                         ^^^^^^
Error: Signature mismatch:
       ...
       The value `sexp_of_t' is required but not provided
       File "src/hashtbl_intf.ml", line 10, characters 4-40:
         Expected declaration
                               ```


This is confusing to me, since https://dev.realworldocaml.org/maps-and-hashtables.html

has an example of

let table = Hashtbl.create (module String);;

Pass Core.String as the argument. But in general one usually uses core by opening it at the top — open Core.

1 Like

It appears to overwrite something that breaks let%component make = ... when I try to define jsoo react components.