unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* source-location->source-properties
       [not found] <1877026923.880808.1290087063603.JavaMail.root@zmbs1.inria.fr>
@ 2010-11-18 21:37 ` Ludovic Courtès
  2010-11-20 22:15   ` source-location->source-properties Andy Wingo
  0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2010-11-18 21:37 UTC (permalink / raw)
  To: Andy Wingo; +Cc: guile-devel

Hi!

"Andy Wingo" <wingo@pobox.com> writes:

> --- a/module/system/base/lalr.scm
> +++ b/module/system/base/lalr.scm
> @@ -35,6 +35,7 @@
>              source-location-column
>              source-location-offset
>              source-location-length
> +            source-location->source-properties
>
>              ;; `lalr-parser' is a defmacro, which produces code that refers to
>              ;; these drivers.
> @@ -43,3 +44,8 @@
>  ;; The LALR parser generator was written by Dominique Boucher.  It's available
>  ;; from http://code.google.com/p/lalr-scm/ and released under the LGPLv3+.
>  (include-from-path "system/base/lalr.upstream.scm")
> +
> +(define (source-location->source-properties loc)
> +  `((filename . ,(source-location-input loc))
> +    (line . ,(source-location-line loc))
> +    (column . ,(source-location-column loc))))

I was thinking that this procedure could be made internal to the ES
compiler, so that the export list of (system base lalr) remains
identical to that upstream.

What do you think?

Thanks,
Ludo’.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: source-location->source-properties
  2010-11-18 21:37 ` source-location->source-properties Ludovic Courtès
@ 2010-11-20 22:15   ` Andy Wingo
  2010-11-21 22:44     ` source-location->source-properties Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: Andy Wingo @ 2010-11-20 22:15 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guile-devel

Hello :)

On Thu 18 Nov 2010 22:37, ludo@gnu.org (Ludovic Courtès) writes:

> Hi!

Hey I'm caught up to this week! :)

> "Andy Wingo" <wingo@pobox.com> writes:
>
>> +            source-location->source-properties
>
> I was thinking that this procedure could be made internal to the ES
> compiler, so that the export list of (system base lalr) remains
> identical to that upstream.

Well, we could. It just seemed like something other compiler writers
might want, so I put it here. Is it important that we have exactly the
same set of exports as upstream, or is a compatible set sufficient?

I'm happy to move it, but I would like to come to some shared
understanding of how to deal with external projects in Guile.

Andy
-- 
http://wingolog.org/



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: source-location->source-properties
  2010-11-20 22:15   ` source-location->source-properties Andy Wingo
@ 2010-11-21 22:44     ` Ludovic Courtès
  0 siblings, 0 replies; 3+ messages in thread
From: Ludovic Courtès @ 2010-11-21 22:44 UTC (permalink / raw)
  To: guile-devel

Hi!

Andy Wingo <wingo@pobox.com> writes:

> On Thu 18 Nov 2010 22:37, ludo@gnu.org (Ludovic Courtès) writes:

[...]

>> "Andy Wingo" <wingo@pobox.com> writes:
>>
>>> +            source-location->source-properties
>>
>> I was thinking that this procedure could be made internal to the ES
>> compiler, so that the export list of (system base lalr) remains
>> identical to that upstream.
>
> Well, we could. It just seemed like something other compiler writers
> might want, so I put it here.

I’d keep it private to the ES compiler until it’s actually needed
elsewhere.  No big deal, though.

> Is it important that we have exactly the same set of exports as
> upstream, or is a compatible set sufficient?

I’d rather export the same bindings as upstream.  This should make life
easier to people using the same module in other schemes, for instance.

Thanks,
Ludo’.




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-11-21 22:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1877026923.880808.1290087063603.JavaMail.root@zmbs1.inria.fr>
2010-11-18 21:37 ` source-location->source-properties Ludovic Courtès
2010-11-20 22:15   ` source-location->source-properties Andy Wingo
2010-11-21 22:44     ` source-location->source-properties Ludovic Courtès

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).