Quantcast
Channel: OCaml - Topics tagged dune
Viewing all articles
Browse latest Browse all 527

Dune: evaluating an expression before printing its boolean value

$
0
0

In my dune file, I have a rule similar to this:

(rule
  (deps (universe))
  (targets "foo")
  (action (with-stdout-to "foo" (echo "a " (= 1 2) "\n")))
)

But the above does not parse (Error: Unexpected list).

I’d like to tell Dune to evaluate the expression (= 1 2) (resulting in false), then print it as a string (so the output would be a false\n).

Is it possible to do so?

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 527

Trending Articles