Unbound value when one module calls another module in same directory

I’m just starting with OCaml and trying to structure my program into modules, but I’m running into trouble.

I have an Rpc module and an Ethereum module - I want to call functions in Rpc from Ethereum.



let encode_rpc_eth_syncing =
    encode_rpc "eth_syncing"



val encode_rpc_eth_syncing : string


open Async


let get_syncing_status t =
    let r = Rpc.encode_rpc_eth_syncing in
    call_rpc t ~request:r

When I run dune build, I get the error: Unbound value Rpc.encode_rpc_eth_syncing

I’m not sure what’s going on, as I managed to call functions in the Ethereum module fine from my Main file! Any help is greatly appreciated.

I’ve solved this, in case anyone stumbles on this post.

The Async library exposes its own Rpc library which was taking priority over my own module. Renaming my module fixed this issue!