Changeset 14604 in project


Ignore:
Timestamp:
05/12/09 06:37:57 (11 years ago)
Author:
Ivan Raikov
Message:

filepath ported to Chicken 4

Location:
release/4/filepath
Files:
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • release/4/filepath/trunk/filepath.meta

    r12296 r14604  
    55 ; List here all the files that should be bundled as part of your egg. 
    66
    7  (files "filepath.setup" "filepath.scm" "tests/run.scm" "filepath.html" )
     7 (files "filepath.setup" "filepath.scm" "tests" "filepath.html" )
    88
    99 ; Your egg's license:
     
    1818 ; A list of eggs filepath depends on.
    1919
    20  (needs syntax-case matchable )
     20 (needs matchable )
    2121
    2222 (doc-from-wiki)
  • release/4/filepath/trunk/filepath.scm

    r12843 r14604  
    66;; http://www-users.cs.york.ac.uk/~ndm/filepath
    77;;
    8 ;; Copyright 2008 Ivan Raikov.
     8;; Copyright 2008-2009 Ivan Raikov.
    99;;
    1010;;
     
    4040;;
    4141
    42 (require-extension syntax-case)
    43 (require-extension matchable)
    44 (require-extension srfi-1)
    45 
    46 (define-extension filepath)
    47 
    48 (declare
    49  (not usual-integrations)
    50  (fixnum)
    51  (inline)
    52  (lambda-lift)
    53  (export
    54 
     42(module filepath
     43
     44 (
    5545  filepath:posix filepath:is-windows? filepath:is-posix?
    5646
     
    9282  filepath:is-valid? filepath:make-valid
    9383 
    94   ))
    95 
    96 (cond-expand
    97    (utf8-strings (use utf8-srfi-13 utf8-srfi-14))
    98    (else (use srfi-13 srfi-14)))
     84  )
     85
     86  (import scheme chicken data-structures srfi-1 srfi-13 srfi-14)
     87
     88  (require-extension matchable)
    9989
    10090;; Utility list procedures
     
    711701(define filepath:is-relative?   is-relative?)
    712702(define filepath:is-absolute?   is-absolute?)
     703)
  • release/4/filepath/trunk/filepath.setup

    r12288 r14604  
    11;; -*- Hen -*-
    2 
    3 (define has-exports? (string>=? (chicken-version) "2.310"))
    42
    53(define (dynld-name fn)         
    64  (make-pathname #f fn ##sys#load-dynamic-extension))   
    75
    8 (compile -O -d2 -s
    9          ,@(if has-exports? '(-check-imports -emit-exports filepath.exports) '())
    10          filepath.scm)
     6(compile -O -d2 -s filepath.scm -j filepath)
     7(compile -O -d2 -s filepath.import.scm)
    118
    129(install-extension
     
    1613
    1714  ;; Files to install for your extension:
    18   `(,(dynld-name "filepath")
    19     ,@(if has-exports? '("filepath.exports") (list)) ) 
    20  
     15  `(,(dynld-name "filepath") ,(dynld-name "filepath.import") )
    2116
    2217  ;; Assoc list with properties for your extension:
    23   '((version 1.0)
     18  '((version 1.1)
    2419    (documentation "filepath.html")
    25     ,@(if has-exports? `((exports "filepath.exports")) (list)) ))
     20    ))
     21
  • release/4/filepath/trunk/tests/run.scm

    r12291 r14604  
    1 (require-extension srfi-1)
    2 (require-extension filepath)
    3 (require-extension test)
     1(require-extension srfi-1 srfi-14 test filepath)
    42
    53;; test cases from Haskell implementation
Note: See TracChangeset for help on using the changeset viewer.