Stream: coqbot devs & users

Topic: `String.trim`


view this post on Zulip Jason Gross (Apr 29 2021 at 21:43):

What's the way to invoke String.trim in coqbot sources? Merlin seems to know its type, but dune complains it doesn't exist.

view this post on Zulip Emilio Jesús Gallego Arias (Apr 29 2021 at 21:46):

That's on the stdlib since 4.0.0

view this post on Zulip Emilio Jesús Gallego Arias (Apr 29 2021 at 21:46):

so weird, does Stdlib.String.trim work?

view this post on Zulip Emilio Jesús Gallego Arias (Apr 29 2021 at 21:46):

maybe something is shadowing the String module; please post the error message

view this post on Zulip Emilio Jesús Gallego Arias (Apr 29 2021 at 21:47):

I guess it is ocamlc that complains, right?

view this post on Zulip Emilio Jesús Gallego Arias (Apr 29 2021 at 21:47):

[Would be weird for dune to complain about this]

view this post on Zulip Jason Gross (Apr 29 2021 at 21:50):

Error message is:

$ dune build --ignore-promoted-rules
File "src/bot.ml", line 203, characters 17-28:
203 |                 (String.trim
                       ^^^^^^^^^^^
Error: Unbound value String.trim

view this post on Zulip Jason Gross (Apr 29 2021 at 21:50):

Stdlib.String.trim indeed works, thanks!

view this post on Zulip Gaëtan Gilbert (Apr 30 2021 at 06:49):

probably String is shadowed by Base

view this post on Zulip Théo Zimmermann (Apr 30 2021 at 08:20):

Yes, exactly.


Last updated: Dec 06 2023 at 15:01 UTC