Your code:
)abbrev package TF TypeFinder
TypeFinder(S: Type): with
GetType: S -> Type
== add
GetType(x: S): Type == S
---
Note: Proper indentation
seems to work fine as a spad package in FriCAS. What problem do you
see in Aldor? Are you using Aldor standalone or as the library
compiler for FriCAS?
Regards,
Bill Page.
On Thu, Jul 28, 2011 at 2:17 PM, Yrogirg <[email protected]> wrote:
>>But why would you want that anyway? What use case do you have in mind?
>
> I was thinking out exercises to help me better understand aldor,
> particularly what can be done with types being first-class objects. As
> such Zen exercise I took a function that returns a type of its
> argument --- I wanted to find out whether such function is possible or
> not and why.
>
> I came up with
>
> #include "aldor"
> #pile
>
> TypeFinder(S: Type): with
> GetType: S -> Type
> == add
> GetType(x: S): Type == S
>
> I thought it to be a bit unpractical to import
> TypeFinder(TypeInQuestion) every time.
>
> But anyway the code above doesn't seem to work as I expected.
>
> --
> 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.
>
>
--
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.