PrintfFormat handling functions in separate files

Hi,

I have functions handling printfFormat arguments, here is an example:

    let singleInsertAction<'a> format = 
        Utils.formatStringHandler actionSingleInsertBuilder<'a> format

Which I can call as

    let s = singleInsertAction<string> "insert into instances(entity_id) VALUES (%d,%d) RETURNING id" 4 5

This works fine if the function with a printfFormat argument is defined in the same file as the call (even if placed in a different module in that same file), but fails when its module is in a different file, with the error

error FS0003: This value is not a function and cannot be applied. [/home/rb/testfs/genericstest/genericstest.fsproj]

I haven’t found a solution to that problem. Does anyone have an explanation of what happens, and how to get it working?

If you want to try it, I put all the code to reproduce it in a public repo (git clone https://gitlab.com/rbauduin/fsharp-printf-typing-problem.git). Each situation corresponds to a commit.
Here are the links to different versions:

With the code in the repo, you can easily reproduce the problem with dotnet restore and dotnet run.

Thanks in advance