Brian Ward
Brian Ward
I was eventually able to get this to work by making a copy of the instrumented binary somewhere outside of _build, and then hard-coding that path into my tests. Not...
Another option -- perhaps too specific for this library -- would be a function like ```ocaml val labeled_count: string -> int t (** Returns an [int t] that produces strings...
Fair enough -- my use case (error messages, mostly) tends to avoid any irregular words, but it is worth worrying about in generic code. The `one_of` function was actually what...
This is what I have golfed it down to. It seems almost unnecessary for inclusion at this point, but I still think it would be nice to provide "out of...
I think this combinator would only be useful with so-called “countable” nouns (e.g “zero apples”), which are pluralized. It’s true for some words you don’t add an s (e.g. “zero...
That seems reasonable! Maybe it’s over-thinking things, but I almost want ~more to be ?more with a default value that is equivalent to one ^ “s”. I think the only...
I don’t mind the extra unit argument, it seems like a nice trade off for not needing to type double in the typical case
I’m not sure “one” would ever use the int argument, so it could be a unit t (or even just a string? the interesting formatting will almost certainly be in...
It’s less general, but I personally would go for this > `val Fmt.en_cardinal : one:string -> ?other:string -> unit -> int Fmt.t` And then a second function, Fmt.counted_en_cardinal, which handles...
Those both look very sleek, I'd be happy to have them as a user :)