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

--
You received this message because you are subscribed to the Google Groups "FriCAS - 
computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/48b492fe-e442-8d36-089c-f2f6245a0980%40gmail.com.

Reply via email to