Hi Waldek, I have now found this:
https://github.com/fricas/fricas/blob/master/src/algebra/polycat.spad#L1223 op_of_PS : Symbol := CAR(devaluate(PS)$Lisp)$Lisp It's rather lispy, but can it count as a "supported" way to get the name of a constructor? Actually, the question arises whether introspection should be allowed at all. If yes, then all supported forms should make it into a package. Ralf On 9/27/20 2:09 PM, Ralf Hemmecke wrote: > I would like to get the name of a type as a string. > In a FriCAS session I can simply do > > (15) -> unparse(Integer :: InputForm) > > Function Selection for unparse > Arguments: INFORM > > [1] signature: INFORM -> STRING > implemented: slot (String)$ from INFORM > > > (15) "Integer()" > Type: String > > Unfortunately, that doesn't work in the compiler. > > Is there a simple way to get the name or do I have to use some trick? > > Ralf > -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/fricas-devel/169dc8c1-680e-a8e5-4fe2-a88f9ecd8dc7%40hemmecke.org.
