I am looking to implement my own library to replace the OCaml standard library, as I am starting to use the language enough that having things named and implemented the way I find most sensible would be worthwhile.
I have replacements for a variety of data structures, etc, but not operators yet. I tried compiling without the standard library to see what I was missing and of course I need implementations of comparisons (=, <>, <=, != etc) and arithmetic (+, -, *, etc). Looking at the github repo for the standard library I see that they are external C functions, and was wondering where these implementations are,.I can’t seem to find the C files with those functions in the standard library, and ultimately these are parts of the Stdlib I wouldn’t change, but also it would be nice to see some examples of how calling C functions work in OCaml as I will inevitably need this for low level stuff and IO type stuff, and also how operator precedence and associativity is handled.
Any help is greatly appreciated