Vim unbound module error

I apologize for what I’m sure is a newb error but I can’t quite find an answer to this problem. I’m using vim 9.0 on Arch Linux with ocaml 5.0.0. I use ALE for linting and formatting with merlin set as the linter for ALE in my vimrc. I have the following ocaml-specific section in vimrc before any plugins are loaded:

" OCaml stuff
let g:opamshare = substitute(system('opam config var share'),'\n$','','''')
execute "set rtp+=" . g:opamshare . "/merlin/vim"
" ## added by OPAM user-setup for vim / base ## 93ee63e278bdfc07d1139a748ed3fff2 ## you can edit, but keep this line
let s:opam_share_dir = system("opam config var share")
let s:opam_share_dir = substitute(s:opam_share_dir, '[\r\n]*$', '', '')

let s:opam_configuration = {}

function! OpamConfOcpIndent()
  execute "set rtp^=" . s:opam_share_dir . "/ocp-indent/vim"
let s:opam_configuration['ocp-indent'] = function('OpamConfOcpIndent')

function! OpamConfOcpIndex()
  execute "set rtp+=" . s:opam_share_dir . "/ocp-index/vim"
let s:opam_configuration['ocp-index'] = function('OpamConfOcpIndex')

function! OpamConfMerlin()
  let l:dir = s:opam_share_dir . "/merlin/vim"
  execute "set rtp+=" . l:dir
let s:opam_configuration['merlin'] = function('OpamConfMerlin')

let s:opam_packages = ["ocp-indent", "ocp-index", "merlin"]
" following two lines cause huge slowdown in startup time.
" let s:opam_check_cmdline = ["opam list --installed --short --safe --color=never"] + s:opam_packages
" let s:opam_available_tools = split(system(join(s:opam_check_cmdline)))
" Following replacement for above is the fix from
let s:opam_available_tools = []
for tool in s:opam_packages
  " Respect package order (merlin should be after ocp-index)
  if isdirectory(s:opam_share_dir . "/" . tool)
    call add(s:opam_available_tools, tool)
    call s:opam_configuration[tool]()
" for tool in s:opam_packages
"   " Respect package order (merlin should be after ocp-index)
"   if count(s:opam_available_tools, tool) > 0
"     call s:opam_configuration[tool]()
"   endif
" endfor
" " ## end of OPAM user-setup addition for vim / base ## keep this line
" " ## added by OPAM user-setup for vim / ocp-indent ## 52537848d273f571104511fcb1c24133 ## you can edit, but keep this line
if count(s:opam_available_tools,"ocp-indent") == 0
  source "/home/matt/.opam/5.0.0/share/ocp-indent/vim/indent/ocaml.vim"
" ## end of OPAM user-setup addition for vim / ocp-indent ## keep this line

In going through the Gc tutorial everywhere there is a call to a Unix module function I see the following comment appended:
(* E: Unbound module Unix Hint: Did you mean Unit?
The file compiles and the resulting executable runs correctly so the installation and path are fine with respect to the unix module. I’m just wondering how I prevent this error in vim while editing? I’ve seen a few threads suggesting things to do with removing lines from a .merlin file but I don’t have such a file and am not using any of the modules mentioned as causing problems in those threads.