Dear Waldek,
This is about a misleading error message.
When I compile my code with this function
initialize(m: List F): % ==
t: F := first m
per [initialize(t)$AB, sort(smallerGrade?, rest m), empty()]
the compiler spits out the stuff at the end of the mail.
In particular it it marks the error to this.
(|construct| | << | ((|Sel| AB |initialize|) |t|) | >> |
That came to me as a surprise, because the changes to the previous
version did not involve anything connected to iniitalize, but rather
were a renaming of smallerGrade? to less?.
Now I see that the compiler gave a warning:
[4] initialize: smallerGrade? has no value
which should not be a warning, but is the actual cause of the error.
I should also have renamed smallerGrade? to less? in the function cited
above.
Is it worth it that I make a small example program that you can compile
and that demonstrates the above proplem? Or do we just leave the
situation as is? I think, it's a bug, but I have no immediate incentive
to invest time in it, since the compiler messages are anyway usually
pretty hard to decipher.
Ralf
===================================================================
compiling exported initialize : List F -> $
Semantic Errors:
[1] addPair!: f1 is BOTH a variable and a literal
[2] addPair!: f2 is BOTH a variable and a literal
Warnings:
[1] update!: irr has no value
[2] update!: red has no value
[3] update!: cbe has no value
[4] initialize: smallerGrade? has no value
****** comp fails at level 6 with expression: ******
error in function initialize
(SEQ (|:=| (|:| |t| F) (|first| |m|))
(|exit| 1
(|pretend|
(@
(|construct| | << | ((|Sel| AB |initialize|) |t|) | >> |
(|sort| |smallerGrade?| (|rest| |m|)) (|empty|))
(|Record| (|:| |ab| AB) (|:| |cbe| (|List| F))
(|:| |pairs|
(|XHashTable| (|Integer|)
(|List|
(|Record| (|:| |f1| F) (|:| |f2|
F)))))))
$)))
****** level 6 ******
$x:= ((Sel AB initialize) t)
$m:= F
$f:=
((((|t| # #) (|m| # #) (|#| #) (< #) ...) ((|multiplier| # #) (|less?| #))
((|less?| #) (|orderedC?| # #) (C # #) (~= #) ...)))
>> Apparent user error:
NoValueMode
is an unknown mode
--
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/a08ca232-5cab-99fb-cad2-1dd072cd6c1d%40hemmecke.org.