From ac043f91b1603ebc8fbddab72b6700d9a2abdb5d Mon Sep 17 00:00:00 2001 From: Antti Holvikari Date: Thu, 21 Dec 2023 08:35:48 +0200 Subject: [PATCH] Use symbol-hashtables --- spago.yaml | 3 ++- src/Data/Array.ss | 7 ++----- src/Data/Array/ST.ss | 5 ++--- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/spago.yaml b/spago.yaml index 52b224e..2ea7b9e 100644 --- a/spago.yaml +++ b/spago.yaml @@ -28,4 +28,5 @@ workspace: args: - build package_set: - url: https://raw.githubusercontent.com/purescm/purescm/d004ff2a076d370e613d6601d5e0a342c895fe56/package-sets/1.0.0.json + url: https://raw.githubusercontent.com/purescm/purescm/b274cdff179c8b666e7ba991e3c818eaa4e3551a/package-sets/1.0.0.json + hash: sha256-W6+GRQDfEIGumQjZqLc/vr692dlqiz4oQHIHGjzCBOU= diff --git a/src/Data/Array.ss b/src/Data/Array.ss index cb15587..b7d7b88 100644 --- a/src/Data/Array.ss +++ b/src/Data/Array.ss @@ -24,11 +24,8 @@ allImpl unsafeIndexImpl ) - (import (only (rnrs base) define lambda begin quote cons - let let* let-values cond if not and or - * + - = < > >= <= boolean?) + (import (except (chezscheme) length reverse) (only (rnrs sorting) vector-sort!) - (only (chezscheme) fx/) (prefix (purs runtime) rt:) (prefix (purs runtime srfi :214) srfi:214:)) @@ -142,7 +139,7 @@ (define partitionImpl (lambda (f xs) (let-values ([(yes no) (srfi:214:flexvector-partition f xs)]) - (rt:make-object (cons "yes" yes) (cons "no" no))))) + (rt:make-object (cons 'yes yes) (cons 'no no))))) (define scanlImpl (lambda (f b xs) diff --git a/src/Data/Array/ST.ss b/src/Data/Array/ST.ss index 9ce1e41..1d735a4 100644 --- a/src/Data/Array/ST.ss +++ b/src/Data/Array/ST.ss @@ -15,9 +15,8 @@ sortByImpl thawImpl freezeImpl) - (import (only (rnrs base) define lambda cond let let* begin cons if and < > >= <= + -) + (import (chezscheme) (only (rnrs sorting) vector-sort!) - (only (chezscheme) fx/) (prefix (purs runtime) rt:) (prefix (purs runtime srfi :214) srfi:214:)) @@ -98,7 +97,7 @@ (lambda (xs) (srfi:214:flexvector-map/index (lambda (i x) - (rt:make-object (cons "index" i) (cons "value" x))) + (rt:make-object (cons 'index i) (cons 'value x))) xs))) (define copyImpl