From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Israelsson Tampe Newsgroups: gmane.lisp.guile.devel Subject: Re: Some guile-unify activities Date: Mon, 9 May 2011 13:15:10 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=0015177411a8e87e9004a2d5f394 X-Trace: dough.gmane.org 1304939725 7628 80.91.229.12 (9 May 2011 11:15:25 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 9 May 2011 11:15:25 +0000 (UTC) Cc: guile-devel To: Andy Wingo Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon May 09 13:15:21 2011 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QJOQp-0002jR-Oa for guile-devel@m.gmane.org; Mon, 09 May 2011 13:15:20 +0200 Original-Received: from localhost ([::1]:41949 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QJOQm-0006Jg-N3 for guile-devel@m.gmane.org; Mon, 09 May 2011 07:15:16 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:33054) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QJOQj-0006Ja-4n for guile-devel@gnu.org; Mon, 09 May 2011 07:15:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QJOQi-0005XJ-1k for guile-devel@gnu.org; Mon, 09 May 2011 07:15:13 -0400 Original-Received: from mail-iw0-f169.google.com ([209.85.214.169]:57553) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QJOQh-0005XF-Pi for guile-devel@gnu.org; Mon, 09 May 2011 07:15:11 -0400 Original-Received: by iwg8 with SMTP id 8so5822831iwg.0 for ; Mon, 09 May 2011 04:15:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=UMRJCIKdt27zFFDROkH5GC95iSq2GWgx5KD34qK9HjA=; b=Ym/A8HZWyDIvY8Di/+RXAzomeAqgYhXLwGCxsi/W/JYC+HQhWJH9DtratAbAKDi0a4 SjaXxm0ID9rqgzzNf+nGW7+ouSEzOkJadOJzTdDLJNVIJ53mFPPwbHn0QlU52E1zDec8 /TlPaQ349yOMyVxzimpdEhOMyWGHaIkFf3/Ow= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=kABxwpfz5gulr7c+TOI8GiRZd6hasqRbb/8UEdDKL1rgzLOtpulc0RU+r2VFmZ95SX 7rZYkhjjuLSKm9takXekXq0X+F07tt3lip2MFI118hv5qk9LNS+mziLE9M8YePXF111+ L9Ils/MyH4hXqF2PhqCsCHnVkrQcIpSsjTEE8= Original-Received: by 10.231.61.198 with SMTP id u6mr4365684ibh.160.1304939710676; Mon, 09 May 2011 04:15:10 -0700 (PDT) Original-Received: by 10.231.183.80 with HTTP; Mon, 9 May 2011 04:15:10 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.214.169 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:12471 Archived-At: --0015177411a8e87e9004a2d5f394 Content-Type: text/plain; charset=ISO-8859-1 Hmm, type annotations in typed racket is defined according to http://docs.racket-lang.org/ts-guide/more.html#%28part._.Type_.Annotation_and_.Binding_.Forms%29 Any objections against that scheme? ideas? A suggestion would be to have a type item in tree-il that works like ( type expression) And at first stage let tree-il->glil code just ignore this information. For tree-il code we could just use the method (let ((x : number 1)) code) --> ( (( number x)) (1) code) For lambda expressions we could use (lambda ([x : integer]) : symbol code) as ( (( integer x)) ( symbol code)) So, a first step would be to enter a type tree-il record and then make sure that various tree-il->* translators can use them (ignoring them at first). modify scheme->tree-il to allow typeed variants, and also enter a (type x) form directly. What do you think? On Sun, May 8, 2011 at 5:52 PM, Andy Wingo wrote: > Hi Stefan, > > Thanks for this mail, it's interesting. > > On Fri 06 May 2011 23:18, Stefan Israelsson Tampe > writes: > > > It would be good if there was a standard way to enter type information > > in guile and if that information could be hooked into the tree-il > > representation. But until then I will just use a simple macro > > framework to enter typed functions. > > Agreed, that this would be good. Something to think about for 2.2. > > Happy hacking, > > Andy > -- > http://wingolog.org/ > --0015177411a8e87e9004a2d5f394 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hmm, type annotations in typed racket is defined according to

http://docs.racket-lang.org/ts-guide/more.html#= %28part._.Type_.Annotation_and_.Binding_.Forms%29

Any objections against that scheme? ideas?

A suggestion would b= e to have a type item in tree-il that works like
(<type> type expr= ession)

And at first stage let tree-il->glil code just ignore thi= s information.

For <let>=A0 tree-il code=A0 we could just use the method
(let= ((x : number 1)) code)
-->
(<let> ((<type> number x))= (1) code)

For lambda expressions we could use
(lambda ([x : inte= ger]) : symbol code)

as

(<lambda> ((<type> integer x)) (<type> symb= ol code))

So, a first step would be to enter a type tree-il record a= nd then make sure that various tree-il->* translators can
use them (i= gnoring them at first). modify scheme->tree-il=A0 to allow typeed varian= ts, and also enter a (type x) form
directly.

What do you think?


O= n Sun, May 8, 2011 at 5:52 PM, Andy Wingo <wingo@pobox.com> wrote:
Hi Stefan,

Thanks for this mail, it's interesting.

On Fri 06 May 2011 23:18, Stefan Israelsson Tampe <stefan.itampe@gmail.com> writes:

> It would be good if there was a standard way to enter type information=
> in guile and if that information could be hooked into the tree-il
> representation. But until then I will just use a simple macro
> framework to enter typed functions.

Agreed, that this would be good. =A0Something to think about for 2.2.=

Happy hacking,

Andy
--
http://wingolog.org/=

--0015177411a8e87e9004a2d5f394--