Serge D. Mechveliani wrote:
>
> On Fri, Mar 09, 2012 at 10:31:23AM +0100, Ralf Hemmecke wrote:
> >> 2. Change the line after `-- (I)' to the next (commented) line - of
> >> Product(...),
> >> Change the line after `-- (II)' to the next (commented) line - of
> >> eDom := construct(...).
> >> Then, the comipler reports the error of somewhat
> >> "SetCategory is not a LIST".
> >>
> >> But may be, I guess now -- why!
> >> Because the class SetCategory is not a member of SetCategory,
> >> and even not of a LIST
> >> (while Record does not apply such a restriction).
> >> If so, then there remains only the first question.
> >
>
> > [..]
> > You try to construct
> >
> > Product(DomainConstruction, SetCategory)
> >
> > However, the following shows you that this cannot work.
> > [..]
> > You give "SetCategory" as "B". But SetCategory is not of type
> > SetCategory. So this must fail.
>
> I see.
>
> > I agree, however, that the error message, is quite confusing.
>
> Why? Before checking SetCategory, it, probably checks the membership to
> LIST. And reports that it is not of LIST (so Product is not applicable).
> If so, then the report is precise.
No. The message with "LIST" in it reports internal problem in
typechecker. The problem should not happen on correct types,
but otherwise the message says a little about typechecker and
almost nothing about problem in your program. In particular,
the word "LIST" is about internal typechecker data structures,
and has nothing to do with FriCAS 'List' type.
In general, if you see '>> System error:' this is a low-level
problem. Sometimes such low level problem are directly
caused by users, for example when you divide by 0 FriCAS
let low level code detect to problem and you get
'System error:'. But in many cases relation of low-level
problem to user input is complicated and may be unknown
to users. In such cases I try to insert checks at higher
level to catch problems early and present more sensible
error message.
BTW: 'System error:' means that problem was detected by Lisp
runtime and message is from Lisp. 'Error detected within library code:'
is for errors which Spad code found. 'Apparent user error:'
means that error was found by Spad compiler.
--
Waldek Hebisch
[email protected]
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/fricas-devel?hl=en.