Dear FriCAS team,
compiling
)abbrev package MY-LIST MyList
MyList(T: Type) : with
intersperse : (T, List T) -> List T
==
add
intersperse(x: T, xs: List T) : List T ==
empty xs => []
-- (`empty' set erroneousely instead of `empty?'),
fricas-1.1.5 reports
**********************************************************
Compiling FriCAS source code from file
/home/mechvel/ghc/axiomInterface/fromA-aim/MyList.spad using old
system compiler.
MY-LIST abbreviates package MyList
------------------------------------------------------------------------
initializing NRLIB MY-LIST for MyList
compiling into NRLIB MY-LIST
compiling exported intersperse : (T$,List T$) -> List T$
****** comp fails at level 5 with expression: ******
error in function intersperse
(SEQ (LET #:G13576 (|empty| |xs|))
(|exit| 1 (IF #:G13576 (|construct|) |noBranch|)))
****** level 5 ******
$x:= xs
$m:= value
$f:=
((((|xs| # #) (|x| # #) (|xs| #) (|#| #) ...)))
>> Apparent user error:
Cannot coerce xs
of mode (List T$)
to mode value
**********************************************************
Why does not it produce a reasonable report, something like
"type mismatch in applying `empty' ..."
?
Regards,
------
Sergei
[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.