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=-3.2 required=10.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-Spam-Pyzor: Received: from SHEARERSHOT (c-24-60-255-210.hsd1.ma.comcast.net [24.60.255.210]) (authenticated bits=0) by cs3.bu.edu (8.13.6/8.13.6) with ESMTP id kAK3ItQH025976; Sun, 19 Nov 2006 22:19:51 -0500 Message-Id: <200611200319.kAK3ItQH025976@cs3.bu.edu> From: "Rui Shi" <shearer@cs.bu.edu> To: <samepst@cs.bu.edu> Cc: <cs520@cs.bu.edu> Subject: RE: Programming Assignment 4 Date: Sun, 19 Nov 2006 22:18:56 -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: AccMTjr9G4KJi3MgTDSRVvFtZJJZewABBN7A In-Reply-To: <1667.71.192.166.44.1163990854.squirrel@cs-squirrelmail.bu.edu> X-Clamav-Status: No Status: RO Content-Length: 798 X-UID: 54 X-Keywords:
In order to use the CT-proj, you have to verify that the term being
projected is actually of a tuple type. As a result, you may need to solve
the all contraints collected so far to get the type.
-Rui
-----Original Message-----
From: samepst@cs.bu.edu [mailto:samepst@cs.bu.edu]
Sent: Sunday, November 19, 2006 9:48 PM
To: cs520@cs.bu.edu
Subject: Programming Assignment 4
During the implementation of pa4, I ran into a problem with the rule
CT-proj. Here is an example of a term t which produces the error:
t= (lam (x: int) => (5,x)) 4
t is typed by CT-App:
t:X |(int->(int*int) = int->X
However CT-Proj cannot be applied to
t.2
because t is of type X instead of T1*T2*..Tn
Type X cannot be determined until unification, so my typechecker fails at
this point.
Thank you,
-Sam Epstein
This archive was generated by hypermail 2b29 : Thu Dec 14 2006 - 16:31:59 EST