People,
I have the following question on a  type parameter in a package
(for  FriCAS-1.1.5):

  ---------------------------------- 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.
But I think, the whole package becomes incorrect, because  f  uses  T,
which is not listed in parameters.

Is it true that  `Foo(T : Type)'  requires each exported function in 
the package to explicitly use  T  in its type declaration?
And  `Foo(T : Type, S : Type)'  will require of each exported function to 
use both T and S ?

Another question:  how to organize applying `newline' instead of
                   `newline()' ?

Thank you in advance for explanation,

------
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.

Reply via email to