bugGuile - Bugs: bug #19807, srfi-19: current-time return type...

 
 

bug #19807: srfi-19: current-time return type inconsistency

Submitted by:  None
Submitted on:  Sat 05 May 2007 02:23:40 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 09 May 2007 09:17:38 PM UTC, comment #2:

This is now fixed in both the `HEAD' and 1.8 CVS branches.

Thanks for your report!

Ludovic.

Ludovic Courtès <civodul>
Project Administrator
Sun 06 May 2007 08:36:59 AM UTC, comment #1:

A further point:

The shadowed version of make-time-process calls make-time with its positional parameters in the wrong order:

guile> (use-modules (srfi srfi-19))
guile> (current-time time-process)
#<time type: time-process nanosecond: 0 second: 350000000>

Scott

Anonymous
Sat 05 May 2007 02:23:40 PM UTC, original submission:

The procedure current-time in srfi-19 returns a time record:

guile> (current-time)
#<time type: time-utc nanosecond: ...

...except when the time type time-process is requested in which case a list is returned:

guile> (current-time time-process)
(time-process ...

This causes other functionality to break, for example time-difference:

guile> (time-difference
(current-time)
(current-time))
#<time type: time-duration nanosecond: ...

guile> (time-difference
(current-time time-process)
(current-time time-process))
...
... not-a-record (time-process ...
ABORT: (misc-error)

Suggested fix:

There are two definitions of priv:current-time-process in srfi-19.scm. The first returns a time record, and second returns the list. Commenting out the second gives me the behavior I expected.

thanks for your time,
Scott Shedden

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by civodul (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 09 May 2007 09:17:38 PM UTCcivodulOpen/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1