This article presents the use of the destruct command in Merlin and OCaml-lsp to generate missing patterns, or to specify patterns in pattern matching.
The Federated Blog allows webring members to showcase federated +articles on this page from time to time. The list of articles is not +calculated automatically (via RSS/Atom feeds) but is the result of a manual +addition. You can retrieve the ATOM feed from the federated blog.
+In this article, we're going to look at how generalised openings can be used to reproduce a common practice in other languages, which I call, somewhat pompously, import strategies,
Guarded methods allow constraints to be attached to the receiver (self) only for certain methods, so that these methods can only be called if the receiver satisfies these constraints (these guards). OCaml does not syntactically allow this type of method to be defined directly. In this note, we'll look at how to encode them using a type equality witness.