[I] ➜ opam switch create 4.12.0+BS ocaml-variants.4.12.0+BS
[ERROR] No compiler matching 'ocaml-variants.4.12.0+BS' found, use 'opam
switch list-available' to see what is available, or use '--packages'
to select packages explicitly.
And
[I] ➜ opam switch create 4.12.0+BS --packages ocaml-variants.4.12.0+BS
[ERROR] ocaml-variants = 4.12.0+BS no matching version
If BS means bucklescript, now rescript, I don’t think we have ever had such variants in the opam repository and, besides, rescript is built upon an older version of the compiler (I think 4.06 or 4.08, but I may be wrong). The recommended way to install it is described on the rescript website.
I know nothing about bucklescript or melange so I don’t know if it’s enough, but the following command will create a switch named melange from a git reference:
% opam update
% opam compiler create 'anmonteiro/ocaml:75f22c872451c66a4c4aadc43abee55697268a57' --switch melange
...
% ocaml -version
The OCaml toplevel, version 4.12.0+BS
Quick note to tie up a few loose ends here: after PR#107, Melange is installable in your regular (4.12) OPAM switch, and a forked compiler is no longer needed.