HCoop
/
bpt
/
guile.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Restrict intsets and maps to non-negative integers
[bpt/guile.git]
/
module
/
language
/
cps
/
intmap.scm
diff --git
a/module/language/cps/intmap.scm
b/module/language/cps/intmap.scm
index
7be27c9
..
152985a
100644
(file)
--- a/
module/language/cps/intmap.scm
+++ b/
module/language/cps/intmap.scm
@@
-121,6
+121,9
@@
(match bs
(($ <intmap> min shift root)
(cond
+ ((< i 0)
+ ;; The power-of-two spanning trick doesn't work across 0.
+ (error "Intmaps can only map non-negative integers." i))
((not val) (intmap-remove bs i))
((not root)
;; Add first element.