Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Typeclasses in OCaml (Was: Haskell vs OCaml)
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2008-08-14 (20:53)
From: Nathaniel Gray <n8gray@g...>
Subject: Re: [Caml-list] Typeclasses in OCaml (Was: Haskell vs OCaml)
On Thu, Aug 14, 2008 at 7:46 AM, Jim Farrand <> wrote:
> 2008/8/14 Peng Zang <>:
>> In Haskell you can write a function that takes anything that is "showable" (a
>> type class) and print it out.  The sig would be something like (I'm mixing
>> OCaml and Haskell syntax here, but hopefully the point is still clear):
> Out of curiosity, are there any theoretical reasons why OCaml could
> not be extended with type classes?  They are one of my favourite
> features of Haskell, and I think they would really improve OCaml.

It could be done.  See this paper from POPL '07:


>>>-- Nathaniel Gray -- Caltech Computer Science ------>
>>>-- Mojave Project -- -->