Bill Page <bill.p...@newsynthesis.org> writes: | On Wed, Nov 9, 2011 at 2:45 AM, Ralf Hemmecke wrote: | > Looking at http://en.wikibooks.org/wiki/Haskell/Category_theory#Monads and | > my previous attempt to model it in Aldor... | > http://groups.google.com/group/fricas-devel/msg/38e7d6dca39cc46c | > | > Actually, now I believe that | > | > #include "aldor" | > Monad(C: Category, A: C, M: C -> C): Category == with { | > unit: A -> M A; | > mult: M M A -> M A; | > } | > | > is not the way one would naturally do this in Aldor. | > | | What precisely do you think is wrong with what you wrote? | | Although objections might be raised about the passing of categories as | parameters (see Gaby's comments), I think that in principle the syntax | and semantics of this is well defined even if not necessarily | implemented in all versions of Axiom.
I suspect the reason why it is not implemented is that the semantics may not be well-defined in the AXIOM model. In that model, there is no category variable/parameter and every category form is evaluated. See uses of compMakeCategoryObject to type check domain forms. One thing that is lost in this discussion is that Haskell does not have type classes as parameters. The parameter to Monad is not an arbitrary function, it is a type constructor. All attempts I have seen so far have been busy trying to pass a category (what would be a type class in Haskell) to a functor. -- Gaby -- 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 fricas-devel@googlegroups.com. To unsubscribe from this group, send email to fricas-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/fricas-devel?hl=en.