stedolan / malfunction

Malfunctional Programming
Other
336 stars 19 forks source link

Failure on `primrec` example #28

Closed sloboegen closed 3 years ago

sloboegen commented 3 years ago

I tried to run the primerec-example (I didn't edit any files). It compiled with warning and crashed at runtime:

  $ dune build examples/primrec.exe
  File "_none_", line 1:
  Warning 58: no cmx file was found in path for module Middle_end, and its interface was not compiled with -opaque

  $ dune exec -- examples/primrec.exe
  Fatal error: exception Failure("camlMalfunction_Code_1")

But if the usage of compile_and_load-function (primrec.ml, lines 122, 147) is commented out, then there will be no error.

Could you please tell me what I'm doing wrong. My compiler verison is 4.07.1.

stedolan commented 3 years ago

Turns out this example has been broken for a while - it wasn't getting run when the tests did. Fixed now. (The warning is still there - that was a bug in OCaml itself. It's harmless but annoying, and gone in more recent releases)