I wrote:
> Franz Lehner wrote:
> >
> > The bug discussed earlier (compiler is confusing categories)
> > has been hitting again.
> > On Thu, Jul 09, 2009 at 05:39:44PM +0200, Waldek Hebisch wrote:
> > > The error is coused by line 170 in nruncomp.boot:
> > >
> > > [op,[dc,:[genDeltaSig x for x in nsig]],['T,cform]]
> > > ^^^^
> > >
> > > At first glance 'nsig' makes no sense here, after replacing it
> > > by 'sig' the error goes away. But using 'sig' we get errors
> > > in other places.
> > I tried to build after changing 'nsig' to 'sig'
> > and the build stops after compiling FS.spad
> >
> > ****** comp fails at level 2 with expression: ******
> > (|SparseMultivariatePolynomial| | << R >> | (|Kernel| $))
> > ****** level 2 ******
> > $x:= R
> > $m:= (Ring)
> > $f:=
> > ((((|opquote| #) (|opdiff| #) (~= #) (= #) ...)))
> >
> > >> Apparent user error:
> > Cannot coerce R
> > of mode (Comparable)
> > to mode (Ring)
> >
> > and actually the compiler is right,
> > at the beginning of FS.spad we find:
> > ************************************************************
> > FunctionSpace(R : Comparable): Category == Definition where
> > ^^^^^^^^^^^^^^
> > OP ==> BasicOperator
> > O ==> OutputForm
> > SY ==> Symbol
> > N ==> NonNegativeInteger
> > Z ==> Integer
> > K ==> Kernel %
> > Q ==> Fraction R
> > PR ==> Polynomial R
> > MP ==> SparseMultivariatePolynomial(R, K)
> > ^
> > QF==> PolynomialCategoryQuotientFunctions(IndexedExponents
> > K,K,R,SparseMultivariatePolynomial(R, K),%)
> > ************************************************************
> > but SMP really needs a ring as first argument and Comparable
> > does not make sense here, only later (after line 455)
> > 455: if R has Ring then
> > it makes sense and MP starts being used.
>
> Franz, the '==>' lines are macro definitions. They are _not_
> type checked. Only result of expansion is used. I remeber
> that I did found some errors of similar sort, but I do not
> remeber if the error were in FS.
I have now looked at my test tree and I see:
- -- these are needed in Ring only, but need to be declared here
- -- because of compiler bug: if they are declared inside the Ring
- -- case, then they are not visible inside the IntegralDomain case.
- smpIsMult : MP -> Union(Record(coef:Z, var:K),"failed")
<snip>
There is a section of definitions that should be conditioned on
Ring but are not. I corrected this, but then there were further
errors...
--
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=.