oldk1331 wrote:
> 
> When Spad compiler is rewritten in Spad, typoOf will be a
> ordinary Spad function...

No.  It will be internal compiler function which happens to
be implemented by Spad code.

> For now, you can build something similar:
> 
> )abbrev package TYPEPKG TypePackage
> 
> TypePackage (T : Type) : Exports == Impl where
>   Exports == with
>     typeof : T -> Type
>   Impl == add
>     typeof (x : T) == T
> 

Note that you need already have type for this to work.  In
other words you created fancy identity function.

> ====
> 
> And some tests:
> 
> typeof 1
> typeof Integer
> typeof (_+$Integer)
> typeof Ring -- Failed, typeOf can
> typeof Type -- Failed, typeOf can

In Spad categories are not of first class: you can pass them
only to limited number of internal operations (basically Join).
 
-- 
                              Waldek Hebisch

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to