Hi Waldek,

Something weird was introduced in
commit 2e4faf4b (Pass more type declarations to Lisp compiler).

Maybe also connected to issue #81 but somewhat more deadly to me than that.
https://github.com/fricas/fricas/issues/81

After compiling the attached program with FriCAS from commit
2e4faf4b1ff681bd82fb086246fd19726ce0c729 I see the following session.
The strange message at the end does not appear when I compile the sources just one commit before.

It looks as if the true in boolT is not the same as true.
Waldek can you explain why there is a difference at all?
Why does assertTrue(true) work and assertTrue(boolT) doesn't?
Is this due to delayed evaluation?

Can you actually reproduce this behaviour?

Ralf

(1) -> z: Integer := 2

   (1)  2
Type: Integer
(2) -> moo := z exquo z

   (2)  1
Type: Union(Integer,...)
(3) -> boolT: Boolean := moo case Integer

   (3)  true
Type: Boolean
(4) -> boolF: Boolean := moo case "failed"

   (4)  false
Type: Boolean
(5) -> assertTrue(true)

   (5)  true
Type: Boolean
(6) -> assertTrue(boolF)

   (6)  false
Type: Boolean
(7) -> assertTrue(boolT)

   >> System error:
   The value
  TRUE
is not of type
  (MEMBER T NIL)
when binding |b|

--
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/b9397c42-ac80-ec52-a1f2-e3ff32f56f00%40hemmecke.org.
)abbrev package FOO Foo
Foo(): with
    assertTrue:  Boolean -> Boolean
  == add
    assertTrue(b: Boolean): Boolean ==
        b => true
        false
)compile debug.spad
z: Integer := 2
moo := z exquo z
boolT: Boolean := moo case Integer
boolF: Boolean := moo case "failed"
assertTrue(true)
assertTrue(boolF)
assertTrue(boolT)

Reply via email to