janestreet / sexplib

Automated S-expression conversion
MIT License
147 stars 27 forks source link

Make `num` dependency optional #45

Open Leonidas-from-XIV opened 4 months ago

Leonidas-from-XIV commented 4 months ago

sexplib pulls in a dependency on num which for most users is unnecessary. Those users that need sexplib.num to convert to and from num values have a dependency on num already (and thus it won't change anything for them), those who don't, have no need for num in their dependency cone and don't need to have sexplib.num.

Normally OPAM subpackages are preferred over optional packages, but in this case having sexplib.num be optional depending on the installation of num seems quite sensible.

H/T to @emillon for pointing this out.