aboutsummaryrefslogtreecommitdiffstats
path: root/lib/cuprate/implementation/sagittarius.sld
blob: 64ea8838ee5fafb6f0c0a23df7521d77e5ba869d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
(define-library (cuprate implementation sagittarius)
  (import (scheme base) (scheme format) (srfi 146 hash) (srfi 225)
          (scheme hash-table) (scheme comparator))
  (export pretty-print default-test-dto
          alist->default-dictionary
          make-eq-map implementation-rewriters)
  (include "srfi-125-eq-map.scm")
  (begin
    (define (pretty-print obj)
      (show #t (pretty obj)))
    (define implementation-rewriters '()))
  (cond-expand
    ;; Sagittarius has SRFI-146 hashmaps. If the full SRFI-225 is loaded
    ;; (which is hackily checked by checking if micro-srfi-225 is NOT
    ;; loadable) then use them.
    ((library (micro-srfi-225))
     (begin
       (define default-test-dto eqv-alist-dto)
       (define (alist->default-dictionary x) x)))
    (else
     (begin
       (define default-test-dto hash-mapping-dto)
       (define (alist->default-dictionary x)
         (alist->hashmap (make-default-comparator) x))))))