sbcl safety 3 fails to load fset - hash (?) value is bigger than fixnum
Cloned repo, then: rm -rf ~/.cache/common-lisp/* ; sbcl --eval "(progn (sb-ext:restrict-compiler-policy 'safety 3) (ql:quickload :fset))"
Came across this when trying to compile coalton with the fset v2.1.0 - it fails after trying to load the fasl of fset/Code/testing.lisp
fset breaks at:
((LABELS REC :IN CH-MAP-TREE-WITH) #
With the message: debugger invoked on a TYPE-ERROR @B800C747AE in thread #<THREAD tid=2307 "main thread" RUNNING {1200030003}>: The value 7452887310967083980 is not of type FIXNUM
hash values being unsigned can use the extra sign bit of fixnums I think, so in this case they can be 63 bit integers while a fixnum goes up to 62 bit numbers.
Right — the whole point of hash-mix (which hash-mixf expands to), hash-unmix, and hash-multiply is to force fixnum-modular arithmetic using safety 0. As you'll see in the code (it's in Code/port.lisp), this doesn't work for addition and subtraction on every implementation; for some I'm forced to use xor instead, which poses no risk of overflow, but has poorer distributional properties.
For what you're trying to do, though, the distributional properties don't matter. So I suggest just editing these three functions to use the fallback code (the code that's currently conditionalized out on SBCL) and trying again.