Qian Yun
unread,Aug 26, 2021, 5:23:58 AM8/26/21Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to fricas-devel
Currently "hash" gives error for List, like:
(1) -> hash [1]
>> System error:
The value
1
is not of type
CONS
The reason is that "Qfirst" in following patch is
a Lisp function without type, so compiler assumes
its type to be '%' instead of "S".
diff --git a/src/algebra/list.spad b/src/algebra/list.spad
index e3d19e51..c4c7a0d1 100644
--- a/src/algebra/list.spad
+++ b/src/algebra/list.spad
@@ -173,7 +173,7 @@ List(S : Type) : Exports == Implementation where
hashUpdate!(s : HashState, x : %) : HashState ==
while not empty? x repeat
- s := hashUpdate!(s, Qfirst x)
+ s := hashUpdate!(s, Qfirst x)$S
x := Qrest x
s