"Serge D. Mechveliani" <[email protected]> writes:
| People,
| ---------------------------------- t.spad -------------------
| )abbrev package FOO Foo
| Foo(T : Type) : with
| f : T -> T
| newline : () -> Character
| ==
| add
| f (x: T) : T == x
| newline() : Character == char(10)
| -------------------------------------------------------------
|
| )compile t seems to compile this. And
|
| (..) -> newline()
|
| reports that there exists one function named newline and that it is
| not applicable here.
| After changing `Foo(T : Type)' to `Foo()', newline() starts to work.
The first use is really ambiguous, because the "real" type is
newline : () -> Character from Foo T if T has Type
(note the domain of computation Foo T.)
That is, newline is parameterized by a type. Your use
newline()
does not provide value for the parameter type T. You need to say
something like
newline()$Foo(typeArg)
where typeArg is the adequate type argument (e.g. Integer, String, etc.)
-- Gaby
--
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.