Mark Clements wrote:
> 
> A hack using packages is given below. This currently works for T in {Integer, 
> Symbol}, List(T), Product(S,T) and Product(List(S),List(T)). Extension should 
> not be too painful...
> 
> Kindly, Mark.
> 
> -- base types
> )abbrev package SHOW Show
> Show() : Export == Implementation  where
>    Export == with
>       show: Integer -> String
>       show: Symbol -> String
>       -- etc
>    Implementation == add
>       show (n:Integer) == string n
>       show (n:Symbol) == string n
>       -- etc
> 
> -- single type (e.g. homogeneous aggregates)
> )abbrev package SHOW1 Show1
> Show1(T:SetCategory) : Export == Implementation where
>    Export == with
>       if Show has (show:T->String) then
>          show: List(T) -> String

This means that Show1 will only work for types mentioned in
Show.  Conseqently your approach will be only able to handle
finite number of types -- for practical purposes this may be
enough, but Sergei wants infinite family...

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

Reply via email to