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.
rpc.ml
...
let encode_rpc_eth_syncing =
encode_rpc "eth_syncing"
rpc.mli
...
val encode_rpc_eth_syncing : string
ethereum.ml
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.