Apr 25, 2008 | 2 min read

using with type on a variant type

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.

By: Stephen Weeks
Apr 16, 2008 | 1 min read

OCaml Annoyance #23: type declarations are implicitly recursive

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...

By: Yaron Minsky
Apr 02, 2008 | 2 min read

The ML sweet spot

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...

By: Yaron Minsky
Mar 26, 2008 | 1 min read

Bind without tears

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...

By: Yaron Minsky
Mar 20, 2008 | 1 min read

Variable-argument functions

Here’s another puzzle:

By: Stephen Weeks
Mar 15, 2008 | 8 min read

Typing RPCs

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...

By: Yaron Minsky
Mar 14, 2008 | 1 min read

Using let module for matching

In OCaml, referring to constructors defined in other modules can be somewhat awkward. Suppose we have a module like the following.

By: Stephen Weeks
Mar 11, 2008 | 1 min read

Extracting an exception from a module

The Unix module defines the Unix_error exception constructor.

By: Stephen Weeks
Mar 07, 2008 | 1 min read

A universal type?

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...

By: Stephen Weeks
Mar 05, 2008 | 1 min read

Talking at Penn

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...

By: Yaron Minsky
Feb 28, 2008 | 1 min read

We've got a blog!

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...

By: Yaron Minsky
Feb 28, 2008 | 7 min read

HOWTO: Static access control using phantom types

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...

By: Yaron Minsky