From 4bc9f8031059550bff1175a978a185b51f0b0014 Mon Sep 17 00:00:00 2001 From: Mustafa Date: Sat, 15 Feb 2014 13:36:01 -0800 Subject: [PATCH] fixed some compatibility issue --- rhs/rhs.rkt | 18 ++++++++++++++++-- sosc/sosc.rkt | 1 + sosc/transport.rkt | 3 ++- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/rhs/rhs.rkt b/rhs/rhs.rkt index bf1661a..d473142 100644 --- a/rhs/rhs.rkt +++ b/rhs/rhs.rkt @@ -16,6 +16,18 @@ Licensed under GPL (2 or 3? FIXME) (provide (all-defined-out)) + +;; to fix rnrs compatibility + +#| +(define exact inexact->exact) + +(define inexact exact->inexact) + +(define mod remainder) +|# + + ;; prelude.scm ;;;;;;;;;;;;;;;;;;;;;; ;; enumFromThenTo :: a -> a -> a -> [a] @@ -383,13 +395,15 @@ Licensed under GPL (2 or 3? FIXME) (head l) (last xs))))) -;; length :: [a] -> Int -#;(define length +;; mlength :: [a] -> Int +(define mlength (lambda (l) (if (null? l) 0 (+ 1 (length (tail l)))))) + + ;; list1 :: a -> [a] (define list1 (lambda (x) diff --git a/sosc/sosc.rkt b/sosc/sosc.rkt index 86abe32..7579d67 100644 --- a/sosc/sosc.rkt +++ b/sosc/sosc.rkt @@ -7,6 +7,7 @@ "../rhs/rhs.rkt" "bytevector.rkt" rnrs/bytevectors-6 ;; TODO - should be provided by bytevector.rkt + rnrs/io/ports-6 ) diff --git a/sosc/transport.rkt b/sosc/transport.rkt index 422de86..29424ce 100644 --- a/sosc/transport.rkt +++ b/sosc/transport.rkt @@ -6,7 +6,8 @@ "sosc.rkt" "ip.rkt") -(provide (all-defined-out)) +(provide (all-defined-out) + (all-from-out "ip.rkt"))