unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* datum->syntax[-object] in 1.9
@ 2010-01-13 13:04 Daniel Llorens del Río
  2010-01-13 23:42 ` Andy Wingo
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Llorens del Río @ 2010-01-13 13:04 UTC (permalink / raw)
  To: guile-devel


Hello,

In Guile 1.9, datum->syntax-object from (ice-9 syncase) doesn't exist  
anymore. It's now called 'datum->syntax' and is part of the core.

By providing datum->syntax-object in (ice-9 syncase), we could keep  
some 1.8.7 code compatible with Guile 1.9, without affecting people  
that rely on the core support.

The patch at the end of this message fixes the issue for me.

Regards,

	Daniel

—

 From 73077031dd1d531f1e9b785ccdc87075b48cf481 Mon Sep 17 00:00:00 2001
From: Daniel Llorens <llorens@xxxxxx>
Date: Wed, 13 Jan 2010 13:52:36 +0100
Subject: [PATCH] Add datum->syntax-object as an alias to datum- 
 >syntax when (ice-9 syncase) is included.

---
  module/ice-9/syncase.scm |    6 ++++++
  1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/module/ice-9/syncase.scm b/module/ice-9/syncase.scm
index 210a232..8a6003a 100644
--- a/module/ice-9/syncase.scm
+++ b/module/ice-9/syncase.scm
@@ -19,6 +19,12 @@
  (define-module (ice-9 syncase)
    )

+(define-syntax datum->syntax-object
+  (syntax-rules ()
+    ((_ x ...) (datum->syntax x ...))))
+
+(export-syntax datum->syntax-object)
+
  (issue-deprecation-warning
   "Syntax-case macros are now a part of Guile core; importing (ice-9  
syncase) is no longer necessary.")

-- 
1.5.4.3





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

* Re: datum->syntax[-object] in 1.9
  2010-01-13 13:04 datum->syntax[-object] in 1.9 Daniel Llorens del Río
@ 2010-01-13 23:42 ` Andy Wingo
  2010-01-14  0:44   ` Daniel Llorens del Río
  0 siblings, 1 reply; 3+ messages in thread
From: Andy Wingo @ 2010-01-13 23:42 UTC (permalink / raw)
  To: Daniel Llorens del Río; +Cc: guile-devel

Hi Daniel,

On Wed 13 Jan 2010 14:04, Daniel Llorens del Río <dll@bluewin.ch> writes:

> By providing datum->syntax-object in (ice-9 syncase), we could keep some
> 1.8.7 code compatible with Guile 1.9, without affecting people  that
> rely on the core support.

Indeed, thanks for the suggestion. I committed a similar patch in which
they are still procedures.

Of course if you are maintaining an application or library against 1.9
and 1.8, better to make a shim library to make 1.8 seem like 1.9 -- that
way you avoid 1.9 deprecation warnings.

Cheers,

Andy
-- 
http://wingolog.org/




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

* Re: datum->syntax[-object] in 1.9
  2010-01-13 23:42 ` Andy Wingo
@ 2010-01-14  0:44   ` Daniel Llorens del Río
  0 siblings, 0 replies; 3+ messages in thread
From: Daniel Llorens del Río @ 2010-01-14  0:44 UTC (permalink / raw)
  To: Andy Wingo; +Cc: guile-devel


On 14 Jan, 2010, at 0:42, Andy Wingo wrote:

> I committed a similar patch in which they are still procedures.

I don't know what made me think they are macros…

>  if you are maintaining an application or library against 1.9 and  
> 1.8, better to make a shim library to make 1.8 seem like 1.9 --  
> that way you avoid 1.9 deprecation warnings.

That's a good idea!

Thanks,

	Daniel





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

end of thread, other threads:[~2010-01-14  0:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-13 13:04 datum->syntax[-object] in 1.9 Daniel Llorens del Río
2010-01-13 23:42 ` Andy Wingo
2010-01-14  0:44   ` Daniel Llorens del Río

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).