Ensuring that a function is polymorphic
Here’s a little trick that I find useful when I get a type error due to a function that I believe is polymorphic, but isn’t...
Here’s a little trick that I find useful when I get a type error due to a function that I believe is polymorphic, but isn’t...
This is intended to be the first in a series of posts talking about the design principles behind core, Jane Street’s alternative to OCaml’s standard...
We are proud to announce the first public release of `core`, Jane Street's own alternative to OCaml's standard library. We use this library as the...
Here’s a type-checking problem I ran into today. I had a module with a variant type matching a signature that exposed the variant type.
Unlike let declarations, type declarations in OCaml are automatically recursive. This seems harmless at first, but it actually causes more trouble than it’s worth. To...
I just got back from visiting Northeastern and Harvard where I yet again flogged a version of my POPL talk. Olin Shivers was my host...
One of the annoyances of using monads in OCaml is that the syntax is awkward. You can see why if you look at a simple...
Here’s another puzzle:
At Jane Street, we end up writing lots of messaging protocols, and many of these protocols end up being simple RPC-style protocols, *i.e.*, protocols with...
In OCaml, referring to constructors defined in other modules can be somewhat awkward. Suppose we have a module like the following.
The Unix module defines the Unix_error exception constructor.
Is it possible in OCaml to implement a universal type, into which any other type can be embedded? More concretely, is possible to implement the...
I just got back from an enjoyable visit at Penn. I gave a version of my POPL talk for an audience consisting in large part...
Jane Street finally has a blog! Jane Street is one of the biggest commercial users of OCaml, and we like to think that we’ve picked...
We thought that phantom types would be an appropriate topic for our first real post because they are a good example of a powerful and...