From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id A4219BB84 for ; Fri, 15 Aug 2008 13:06:01 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AikBAIL/pEiAsLzWo2dsb2JhbACSBwEBAQEBAQcFCAcRoHyBVg X-IronPort-AV: E=Sophos;i="4.32,214,1217800800"; d="scan'208";a="16139906" Received: from zivlnx25.uni-muenster.de ([128.176.188.214]) by mail1-smtp-roc.national.inria.fr with ESMTP; 15 Aug 2008 13:06:01 +0200 Received: from [128.176.151.35] (VPNPOOL01-0281.UNI-MUENSTER.DE [128.176.151.35]) by zivlnx25.uni-muenster.de (Postfix) with ESMTP id B7636B57F6; Fri, 15 Aug 2008 13:06:00 +0200 (CEST) In-Reply-To: <9d3ec8300808141137i2b5e606fh2f4803843ef13e88@mail.gmail.com> References: <200808141121.25463.peng.zang@gmail.com> <9d3ec8300808141137i2b5e606fh2f4803843ef13e88@mail.gmail.com> Mime-Version: 1.0 (Apple Message framework v753.1) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <0F5010B7-5122-40CC-BCAC-A56B27D6D87F@uni-muenster.de> Cc: "Jim Farrand" , Caml Mailing List Content-Transfer-Encoding: 7bit From: Wolfgang Lux Subject: Re: [Caml-list] Typeclasses in OCaml (Was: Haskell vs OCaml) Date: Fri, 15 Aug 2008 13:03:03 +0200 To: "Till Varoquaux" X-Mailer: Apple Mail (2.753.1) X-Spam: no; 0.00; wlux:01 uni-muenster:01 ocaml:01 haskell:01 ocaml:01 inference:01 haskell:01 decidable:01 haskell's:01 recursion:01 annotations:01 haskell's:01 inference:01 polymorphic:01 wrote:01 Till Varoquaux wrote: > Typw inference in haskell is not decideable (nor is it in ocaml when > using objects) and you have to provide some type information. Huh? The only thing that is not decidable in Haskell's type system is polymorphic recursion. Apart from that you do not need any type annotations (except in order to get around Haskell's monomorphism restriction, but that is a different story). > On top of breaking inference type cleases come at a high run tine > cost. Type classes do not break type inference. Just read Mark P. Jones's papers. Regards Wolfgang