

Runtime types in OCaml - emillon
http://www.lexifi.com/blog/runtime-types

======
obtu
There's a self-signed certificate over there, here is a direct link to the
slides: <http://www.lexifi.com/files/resources/runtime_types.pdf>

------
exDM69
Did I misunderstand something or is this like Haskell type classes retrofitted
to O'Caml?

At least the example application in the paper, a pretty printer, is pretty
neatly solved with Haskell's show class and PrettyPrinter combinators.

~~~
emillon
These ideas are also close to the "Scrap Your Boilerplate" approach
(Data.Typeable & Data.Data typeclasses). ie, a generic pretty-printer can be
derived from _any_ type, not only those having a user-defined Show instance.

[http://research.microsoft.com/en-
us/um/people/simonpj/papers...](http://research.microsoft.com/en-
us/um/people/simonpj/papers/hmap/)

