RE: Implementation 4

From: Rui Shi (shearer@cs.bu.edu)
Date: Mon Nov 27 2006 - 13:04:16 EST


Return-Path: <shearer@cs.bu.edu>
X-Spam-HitLevel: 
X-Spam-DCC: CTc-dcc2: cs3.bu.edu 1031; Body=1 Fuz1=1 Fuz2=1
X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on cs3.bu.edu
X-Spam-Level: 
X-Spam-Status: No, score=-4.4 required=10.0 tests=ALL_TRUSTED,AWL,BAYES_00  autolearn=ham version=3.1.0
X-Spam-Pyzor: 
Received: from SHEARERSHOT (cs-dhcp150 [128.197.10.150]) (authenticated bits=0) by cs3.bu.edu (8.13.6/8.13.6) with ESMTP id kARI4Eqn013458; Mon, 27 Nov 2006 13:04:17 -0500
Message-Id: <200611271804.kARI4Eqn013458@cs3.bu.edu>
From: "Rui Shi" <shearer@cs.bu.edu>
To: <samepst@cs.bu.edu>
Cc: <cs520@cs.bu.edu>
Subject: RE: Implementation 4
Date: Mon, 27 Nov 2006 13:04:16 -0500
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook, Build 11.0.5510
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962
Thread-Index: AccSS5Z9qoJam2b8SVCwB6cGd/rVJgAAjDyA
In-Reply-To: <11109.71.192.166.44.1164649425.squirrel@cs-squirrelmail.bu.edu>
X-Clamav-Status: No
Status: RO
Content-Length: 845
X-UID: 61
X-Keywords:                                                                                                    


Hi,

I didn't see the point of the change. From my point of view, "TpUni of int"
is sufficient for the purpose.

In fact, to represent universal type scheme, you don't need to have explicit
qualifiers as implied by your proposed changes. For instance

let f = lam y => y in (f 10, f true)

when you do the constraint generation, f's type can be (TpUni 1 -> TpUni 1)
which is equivalent to \forall a. a -> a.

Hope that is helpful.

- Rui

-----Original Message-----
From: samepst@cs.bu.edu [mailto:samepst@cs.bu.edu]
Sent: Monday, November 27, 2006 12:44 PM
To: shearer@cs.bu.edu
Subject: Implementation 4

Hello,

I had to make a few changes to the framework of programming assignment 4 to
implement the let-polymorphism using type scheme. I changed:

TpUni of int

to

TpScheme of int list * stp

is this acceptable?

Thanks,
-Sam



This archive was generated by hypermail 2b29 : Thu Dec 14 2006 - 16:31:59 EST