I can’t seem to have the toplevel to be the version I want but I’ve been successfully able to switch between compiler version.
Check the session where I try switching version but the toplevel doesn’t change but the compiler does.
(base) ❯ opam switch list
# switch compiler description
→ 4.05.0 ocaml-base-compiler.4.05.0 4.05.0
4.06.0 ocaml-base-compiler.4.06.0 4.06.0
4.07.0 ocaml-base-compiler.4.07.0 4.07.0
default ocaml-system.4.07.0 default
(base) ❯ opam switch 4.06.0
(base) ❯ ocaml --version
The OCaml toplevel, version 4.07.0
(base) ❯ opam switch list
# switch compiler description
4.05.0 ocaml-base-compiler.4.05.0 4.05.0
→ 4.06.0 ocaml-base-compiler.4.06.0 4.06.0
4.07.0 ocaml-base-compiler.4.07.0 4.07.0
default ocaml-system.4.07.0 default
How does one switch OCaml version everywhere consistently? i.e. Toplevel, compiler etc (not sure if there are more things I should make sure to switch)
related question: