SapphireDensetsu / ypsilon

Automatically exported from code.google.com/p/ypsilon
Other
0 stars 0 forks source link

multiple import error, but I fail to see where.. #78

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

>> ypsilon
Ypsilon 0.9.6-trunk/r382 Copyright (c) 2009 Y.Fujita, LittleWing Company 
Limited.
> (import (xitomatl file-system base))

error in library: duplicate import identifiers
  >  (library (xitomatl file-system base)
       (export current-directory
               directory-list
               delete-directory
               delete-file
       ...
  ..."/home/kend/r6rs/xitomatl/file-system/base.sls" line 26
  @  delete-file

expanding:
  >  (library (xitomatl file-system base)
       (export current-directory
               directory-list
               delete-directory
               delete-file
               make-directory
               make-symbolic-link
               change-mode
               file-mtime
               file-ctime
       ...
  ..."/home/kend/r6rs/xitomatl/file-system/base.sls" line 26

What is the expected output? What do you see instead?

- I expected the import to succeed

What version of the product are you using? On what operating system?

>> uname -a
OpenBSD whatever.whidbey.com 4.4 GENERIC#2 i386

>> gcc -v
Reading specs from /usr/lib/gcc-lib/i386-unknown-openbsd4.4/3.3.5/specs
Configured with:
Thread model: single
gcc version 3.3.5 (propolice)

Please provide any additional information below.

The current xitomatl/file-system/base/ lacks a compat.ypsilon.sls file 
which the attached is meant to fix.  

Any help in "fixing the fix" is appreciated.  [Probably something dumb on 
my part].

Thanks much!
-KenD             Ken [dot] Dickey [at] whidbey [dot] com 

Original issue reported on code.google.com by Ken.Dic...@whidbey.com on 13 Feb 2009 at 6:04

Attachments:

GoogleCodeExporter commented 8 years ago
The problem seems to be that ypsilon, even with the "--r6rs" command line 
option, 
imports both the ypsilon-specific "delete-file" as well as the 
renamed "delete-plain-file".

As I don't see an import of (rnrs files (6)), where the binding of delete-file 
is 
to be found, I don't see a way to "turn off" this conflicting binding.

Cheers,
-KenD

Original comment by Ken.Dic...@whidbey.com on 14 Feb 2009 at 5:09

GoogleCodeExporter commented 8 years ago
PILOT ERROR -- Never Mind

I see where xitomatl/file-system/base.sls imports (rnrs).

Sorry,
-KenD

Original comment by Ken.Dic...@whidbey.com on 14 Feb 2009 at 7:30

GoogleCodeExporter commented 8 years ago
Thank you for your messages.
I'm now working on compat.ypsilon.sls. ;-)
--fujita

Original comment by y.fujita...@gmail.com on 15 Feb 2009 at 4:57

GoogleCodeExporter commented 8 years ago
I have modified compat.ypsilon.sls, and it is tested with ypsilon revision 384.
(Revision 384 fixes several file operation primitives)
Now, xitomatol/tests/file-system-base-tests reports followings:
-------------
; *** checks *** : 124 correct, 1 failed. First failed example:
(guard
  (ex
    (else
      (and (i/o-filename-error? ex)
           (who-condition? ex)
           (list (condition-who ex) (cleanse-path (i/o-error-filename ex))))))
  (call-with-output-file "a/ab/abb/nope" (lambda (fop) (display "nope" fop)))
  'unexpected-return) => (open-file-output-port "a/ab/abb/nope") ; *** failed ***
 ; expected result: (call-with-output-file "a/ab/abb/nope")
-------------
*Because ypsilon uses open-file-output-port to implement call-with-output-file,
&error condition contains 'open-file-output-port' in who field.

Please try. Thank you!
-- fujita

Original comment by y.fujita...@gmail.com on 15 Feb 2009 at 1:58

Attachments:

GoogleCodeExporter commented 8 years ago
Your corrected version works very well.  Thank you for the better refinements!

-KenD

Original comment by Ken.Dic...@whidbey.com on 15 Feb 2009 at 4:52

GoogleCodeExporter commented 8 years ago
Thank you for your reply. I close this issue. :)
-- fujita

Original comment by y.fujita...@gmail.com on 20 Feb 2009 at 1:59