Gabriel Scherer
Gabriel Scherer
Hm, if you are doing this direction I would rather merge the two `Texp_apply(Val_prim _, _)` cases together, with a sub-match on known-expansive primitives and a default case for the...
I'm happy to either leave `Fun.id` as-is or to implement it directly -- all things being equal I prefer pure OCaml code to weird primitives, so I find @lthls' suggestion...
`Obj.magic` cannot be written as pure OCaml code without a primitive, so I suppose that `%identity` was added for this. It is sometimes useful to implement more specific unsafe casts...
@WillSewell: on my (Linux, amd64) machine, the OCaml results are much better than the results given in the README. I used Go as a control, which has 4.0ms on my...
I don't think you need a ppx for this: ```ocaml (* library code *) let alive x f = let result = f x in Sys.opaque_identity x; result (* generic...
Personally I prefer to have only a few binding operators that have a well-understood meaning (sometimes, like `let@`, they have a single definition; sometimes it is ad-hoc polymorphism because they...
(I reduced the amount of list gymnastics involved.)
I only skimmed the issue briefly, but this smells like a pattern-exhaustivity-checking issue to me. See #9511, #9514 as possibly-relevant issues on this part of the codebase.
Note: there are two phases in the type-checker when checking exhaustivity of GADT matchines: 1. generate syntactically-valid counter-examples that may be ill-typed (this done in `Parmatch.exhaust`) 2. filter out those...
When we check a pattern `K (p1, p2)`, it may be possible to detect that the value of `p1` may in fact not influence the typability of `p2`. Intuitively, this...