-
Notifications
You must be signed in to change notification settings - Fork 471
Closed
Description
Minimal demo repo: https://github.com/mlms13/bsb-520-include
Per this comment in #3839, I've been trying to clean up impure modules to avoid the unnecessary explosion of import
s in the compiled JS. I noticed that the following OCaml:
include SemiringExtras.Make(IntSemiring)
let v = increment 3
Produces the following JS:
var include = SemiringExtras.Make(IntSemiring);
var increment = include.increment;
var v = Curry._1(increment, 3);
...
/* include Not a pure module */
You can see more context in the sample repo, but in this case IntSemiring
is pure and SemiringExtras
is pure, so I'm not sure what's causing the include
to make the module impure. At first I thought this was a regression with 5.2.0, but I've been able to reproduce it with 5.0.4 as well.
Metadata
Metadata
Assignees
Labels
No labels