You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We can build this program using dune and run it, though you’ll need to add a dune-project and dune file, as described in Chapter 4, Files Modules and Programs.
However, Chapter 4 doesn't mention the relationship between packages and libraries or the syntax for adding a specific library in a package to a Dune file.
This is somewhat complicated by the fact that there were deprecations to the Core libraries. If you try to use Core.Time.Zone then you'll just get an error telling you to use Time_unix.
If we added a copy of the dune file, it would make the section more clear and it might expose people to the idea that there are nested scopes in packages.
Here is my dune file:
(executable
(name time_converter)
(libraries base core core_unix.time_unix stdio))
If the authors are amenable to this, I could open up a PR.
The text was updated successfully, but these errors were encountered:
In the chapter on Imperative Programming under the Terminal IO section, there is an example that allows you to find the time in a particular time zone. The functionality is in the
core_unix.time_unix
library. The example tells you make a Dune file like you do in Chapter 4:However, Chapter 4 doesn't mention the relationship between packages and libraries or the syntax for adding a specific library in a package to a Dune file.
This is somewhat complicated by the fact that there were deprecations to the Core libraries. If you try to use
Core.Time.Zone
then you'll just get an error telling you to useTime_unix
.If we added a copy of the dune file, it would make the section more clear and it might expose people to the idea that there are nested scopes in packages.
Here is my dune file:
If the authors are amenable to this, I could open up a PR.
The text was updated successfully, but these errors were encountered: