Official documentation for Dune is available here: https://dune.readthedocs.io/en/latest/index.html
Questions tagged [dune]
30 questions
5
votes
0 answers
How to add a library dependency in a dune project that manages the .opam file without an intermediate build error?
dune will generate and update a project's .opam file when you run dune build, letting you just manage the project's dependencies in dune-project.
However, this seems to require an awkward step when adding a new dependency. The only sequence of…

Jake
- 2,852
- 7
- 32
- 39
2
votes
1 answer
Including subpackages using dune (no implementation provided for modules, but modules are in dune file)
While compiling a project with dune that uses the fmt and logs packages , I ended up getting this weird error
File "_none_", line 1:
Error: No implementations provided for the following modules:
Fmt_cli referenced from…

tbrugere
- 755
- 7
- 17
2
votes
1 answer
Generating executable .ml test cases from a glob of plaintext files using dune
I'm in the process of writing a test suite for some lexing/parsing and it would be much cleaner if I could drop test input/output files in a directory and have dune generate OCaml test cases for each of these during a step in compilation.
I figured…

s1gtrap
- 162
- 2
- 10
2
votes
1 answer
unbound module Base
I am following this tutorial for OCaml when I try to write this program in a file and then compile and execute with dune.
open Base
open Stdio
let rec read_and_accumulate accum =
let line = In_channel.input_line In_channel.stdin in
match line…

Kronos
- 126
- 8
2
votes
2 answers
Ocaml: Load an external library from Git in my dune project using opam
I have my main dune project, which includes an implementation for a small parser library. Ideally, I would like to put the parser library into a different package and just depend on that in my main dune project somehow.
The way I would do this in…

Prophet
- 186
- 8
1
vote
1 answer
How to solve this SQL error varbinary = varchar(42)
I am trying to learn something new, might I know what is the error message mean?
I tried to change the code in below, then work fine. What is the difference between them?

AnsonChan
- 43
- 8
1
vote
1 answer
How do I install ocamlfind first properly before other opam packages without root permissions?
I was trying to install some coq packages with opam but have this hack:
# coq-equations seems to rely on ocamlfind for it's build, but doesn't
# list it as a dependency, so opam sometimes tries to install
# coq-equations before ocamlfind. Splitting…

Charlie Parker
- 5,884
- 57
- 198
- 323
1
vote
1 answer
Does dune support glob patterns for libraries?
Background
I'm trying to expose two dune libraries from the same directory - one for some interfaces, and the other for their implementations.
For example, let's say I have the following sources:
foo_api.ml
module type Foo = sig
val foo:…

Trent Small
- 1,213
- 8
- 12
1
vote
0 answers
Error installation with some OCaml packages
I am trying to install some Ocaml packages but for some reason I am having some errors with installing dune, ocamlbuild, and ocamlfind. By running sudo opam install ocamlfind ounit utop dune qcheck, the following error came up:
[ERROR] The…

hnsvhns
- 31
- 5
1
vote
0 answers
SQL/DUNE ANALYTICS query for all erc-20 holders on specific date
I was wondering if there was a way to query all addresses holding an erc-20 token on a specific date i.e. wallet address of all wallets holding $LINK on May 1st, 2019. If I'm correct using "evt_transfer" is only showing wallets that bought or sold…

maharishi444
- 21
- 4
1
vote
1 answer
Dividing two SQL queries
I am not super familiar with SQL queries, but I am trying to divide the results of two queries, ex. # of users with at least $x / total # of users, and I keep running into an error. Here is the code:
SELECT x.number / y.number
FROM
(
SELECT…

Alex
- 232
- 1
- 8
1
vote
2 answers
dune-ocaml : No implementations provided for the following modules:
I tried to compile an OCaml code with Dune but got the following error:
Error: No implementations provided for the following modules:
CallccBp referenced from bin/.CallccTest.eobjs/native/dune__exe__CallccTest.cmx
by executing the command : $ dune…

MMY MMY
- 13
- 2
1
vote
1 answer
Unable to install OCaml on macOS Mac M1
I had installed merlin 6 months ago to be able to compile Ocaml and I had no problems. I have recently upgraded to update everything but it was impossible to make the package work.
When I try to reinstall it I get this error message (opam install -y…

ThéoS
- 103
- 1
- 1
- 7
1
vote
0 answers
Using dune in OCaml, does promote overwrite manual changes?
The nice thing about Rust and generated code, is that it can live in the target directory and rust-analyzer makes it easy to go and see what's there. But in OCaml, with dune, if I have a rule to generate some code, for example:
(rule
(target…

David 天宇 Wong
- 3,724
- 4
- 35
- 47
0
votes
0 answers
How to cast uint256 to varchar in DuneSQL?
How to cast uint256 to varchar in DuneSQL?
Here is an example query
Here is an output
Error: Line 36:11: Cannot cast array(uint256) to uint256 at line 36, position 11 [Execution ID: 01H8J5X9M7BKXB59N0ZFYS4F7J]
#dune

xinbenlv
- 893
- 9
- 15