-
-
Notifications
You must be signed in to change notification settings - Fork 38
Description
I'm really loving Sketch π, however, I ran into problems trying to use OCaml's Queue module -- the types all checked out, and code execution ran without issue, until I actually called Queue.create().
After some digging, I realized that Queue uses some unsafe type coercion via Obj.magic() in a number of methods; Queue.create() is one of them.
Further testing revealed that Obj.magic() worked in cases involving bool, int, and float, but broke code execution when used to assign string or record type.
I have a Sketch that illustrates the problem in more detail:
https://sketch.sh/s/O5RAG6SC1rDRGzTu3d6GaU/
Right now, it seems like the only possible workaround is to roll my own Queue module. I'm still fairly new when it comes to reason/ocaml, but I'd love to help out if possible.